/* =========================================================
   AIC Finanz — styles additionnels (non fournis par le template Gudfin)
   Logo texte, sélecteur de langue, widget de chat, bandeau cookies,
   formulaires (honeypot, alertes, anti-spam), page Kreditantrag.
   Couleurs alignées sur css/base.css (:root) : #ecab23 / #16222d.
   ========================================================= */

/* ---- Simulateur de financement (loan-application.php) ----
   Etape 1 en pleine largeur au chargement ; au clic sur "Jetzt simulieren",
   .aic-sim-row passe en grid 2 colonnes anime (grid-template-columns est
   interpolable) : le formulaire se retrecit a gauche pendant que le
   resultat apparait a droite. Sur mobile, on desactive l'animation de
   largeur (pas de sens sur petit ecran) et on empile normalement. ---- */
.aic-sim-row {
  display: grid;
  grid-template-columns: 1fr 0fr;
  gap: 0 24px;
  align-items: stretch;
  transition: grid-template-columns 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}
.aic-sim-row.is-simulated {
  grid-template-columns: 0.44fr 0.56fr;
}
.aic-sim-col-form,
.aic-sim-col-results {
  min-width: 0;
}
.aic-sim-col-results {
  overflow: hidden;
  opacity: 0;
  transition: opacity 0.4s ease;
}
.aic-sim-row.is-simulated .aic-sim-col-results {
  opacity: 1;
  transition: opacity 0.4s ease 0.25s;
}
@media only screen and (max-width: 991px) {
  .aic-sim-row,
  .aic-sim-row.is-simulated {
    display: block;
    transition: none;
  }
  .aic-sim-col-results {
    margin-top: 24px;
    max-height: 0;
    opacity: 0;
    transition: max-height 0.5s ease, opacity 0.4s ease;
  }
  .aic-sim-row.is-simulated .aic-sim-col-results {
    max-height: 2000px;
    opacity: 1;
  }
}
.aic-sim-card {
  padding: 40px;
  border-radius: 6px;
  height: 100%;
}
@media only screen and (max-width: 767px) {
  .aic-sim-card { padding: 26px 20px; }
}
/* Le template dimensionne .pbmit-title a 48px (cf. shortcode.css) pour des
   sections pleine largeur — dans les cartes etroites du simulateur, un titre
   de plusieurs mots se retrouve alors coupe quasiment un mot par ligne. */
.aic-sim-card .pbmit-heading-subheading .pbmit-title {
  font-size: 24px;
  line-height: 1.3;
  letter-spacing: normal;
}
.aic-field-label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  color: var(--pbmit-secondary-color);
  margin-bottom: 6px;
  text-transform: uppercase;
  letter-spacing: 0.4px;
}
.aic-form-section-title {
  font-size: 15px;
  font-weight: 700;
  color: var(--pbmit-secondary-color);
  padding-bottom: 8px;
  border-bottom: 1px solid rgba(22,34,45,0.08);
}
/* ---- Sélecteur d'indicatif téléphonique (loan-application.php, étape 2) ----
   Le <select> natif reste dans le DOM (visuellement masqué) uniquement comme
   porteur de la valeur/nom soumis avec le formulaire ; .phone-code-picker
   est le menu déroulant personnalisé construit par js/phone-selector.js
   (un <select><option> ne peut afficher ni image ni icône — d'où un vrai
   menu custom pour montrer le drapeau, via la librairie flag-icons plutôt
   que des emoji-drapeaux, invisibles sous Windows). ---- */
.phone-input-group {
  display: flex;
  gap: 10px;
}
.phone-input-group select.phone-code-select {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
.phone-input-group .phone-code-picker {
  position: relative;
  flex: 0 0 150px;
  width: 150px;
}
.phone-input-group input[type="tel"] {
  flex: 1 1 auto;
  min-width: 0;
  margin-bottom: 0;
}
.phone-code-trigger {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  height: 55px;
  font-size: 14px;
  font-family: inherit;
  color: rgba(22,34,45,0.85);
  background-color: var(--pbmit-light-color);
  padding: 10px 14px;
  border: 1px solid transparent;
  border-radius: 5px;
  cursor: pointer;
  transition: border-color .2s ease, box-shadow .2s ease;
}
.pbmit-bg-color-white .phone-code-trigger {
  background-color: var(--pbmit-white-color);
  border-color: #e4e4e4;
}
.phone-code-trigger:focus,
.phone-code-trigger[aria-expanded="true"] {
  outline: none;
  border-color: var(--pbmit-global-color);
  box-shadow: 0 0 0 3px rgba(236,171,35,0.15);
}
.phone-code-trigger .fi {
  flex-shrink: 0;
  border-radius: 2px;
  width: 20px;
  height: 15px;
  background-size: cover;
}
.phone-code-trigger-text {
  flex: 1 1 auto;
  text-align: left;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.phone-code-trigger .fa-angle-down {
  flex-shrink: 0;
  font-size: 12px;
  color: #7c898d;
}
.phone-code-list {
  position: absolute;
  z-index: 20;
  top: calc(100% + 6px);
  left: 0;
  width: 250px;
  max-height: 280px;
  overflow-y: auto;
  margin: 0;
  padding: 6px;
  list-style: none;
  background: #fff;
  border: 1px solid #e4e4e4;
  border-radius: 8px;
  box-shadow: 0 12px 34px rgba(22,34,45,0.16);
}
.phone-code-list li {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  font-size: 13px;
  color: #16222d;
  border-radius: 6px;
  cursor: pointer;
}
.phone-code-list li .fi {
  flex-shrink: 0;
  border-radius: 2px;
  width: 20px;
  height: 15px;
  background-size: cover;
}
.phone-code-list li:hover,
.phone-code-list li:focus {
  background: #ecf0f4;
  outline: none;
}
.phone-code-list li.is-active {
  background: rgba(236,171,35,0.15);
  font-weight: 600;
}
@media only screen and (max-width: 480px) {
  .phone-input-group {
    flex-wrap: wrap;
  }
  .phone-input-group .phone-code-picker {
    flex: 1 1 100%;
    width: 100%;
  }
  .phone-code-list {
    width: 100%;
  }
}

.aic-sim-disclaimer {
  font-size: 12px;
  line-height: 1.6;
  color: #7c898d;
}
.aic-sim-table-caption {
  caption-side: top;
  padding: 0 0 10px;
  font-size: 12px;
  color: #7c898d;
  text-align: left;
}
.aic-sim-summary {
  --bs-gutter-x: 1rem;
}
.aic-sim-summary__label {
  display: block;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  color: #7c898d;
  margin-bottom: 4px;
}
.aic-sim-summary__value {
  display: block;
  font-size: 17px;
  font-weight: 700;
  color: var(--pbmit-secondary-color);
  margin-bottom: 16px;
}
.aic-sim-table-wrap {
  max-height: 340px;
  overflow-y: auto;
  border: 1px solid rgba(22,34,45,0.08);
  border-radius: 6px;
}
.aic-sim-table {
  margin: 0;
  font-size: 13px;
}
.aic-sim-table thead th {
  position: sticky;
  top: 0;
  background: #ecf0f4;
  color: var(--pbmit-secondary-color);
  font-weight: 700;
  border-bottom: none;
  z-index: 1;
}
.aic-sim-table td,
.aic-sim-table th {
  padding: 10px 12px;
  white-space: nowrap;
}
.aic-sim-recap {
  background: #ecf0f4;
  border-radius: 6px;
  padding: 12px 16px;
  font-size: 14px;
  color: var(--pbmit-secondary-color);
}

/* ---- Hero slider (accueil), mobile : le template dimensionne le titre pour
   des mots courts en anglais (jusqu'a 70px de police en largeur "max-content"
   fixe, cf. css/responsive.css:2848-2858) — avec un texte allemand plus long
   ca deborde et se fait rogner. On reduit la police, on autorise le retour a
   la ligne (au lieu de max-content) et on agrandit la hauteur du slide pour
   que tout le texte reste visible et un peu plus bas sur l'ecran. ---- */
@media only screen and (max-width: 767px) {
  .pbmit-slider-one .pbmit-slider-content {
    width: 100%;
    max-width: 100%;
  }
  .pbmit-slider-one .pbmit-slider-title {
    font-size: 46px;
    line-height: 1.2;
    letter-spacing: normal;
    white-space: normal;
    padding-bottom: 16px;
  }
  .pbmit-slider-one .pbmit-slider-desc {
    font-size: 14px;
    line-height: 1.6;
    text-align: left;
  }
}
@media only screen and (max-width: 575px) {
  .pbmit-slider-one .pbmit-slider-item {
    height: 620px;
  }
  .pbmit-slider-one .pbmit-slider-content {
    padding-top: 190px;
  }
}

/* ---- Bloc "Kundenzufriedenheit" (accueil, section témoignages) : le
   template utilise height:-webkit-fill-available (peu fiable hors Chrome/
   Safari, peut dépasser la hauteur réelle du bloc témoignages voisin dans la
   même .row flex) — remplacé par 100% pour s'aligner exactement sur la
   hauteur du carousel de témoignages à côté, avec un peu moins de padding. ---- */
.testimonial-one-left {
  height: 100%;
  padding: 32px 30px;
}
.testimonial-one-left .custom-heading h2 {
  margin-bottom: 14px;
}

/* ---- Hero — liste de 3 items sous le bouton, reprise de la homepage-2 du
   template (.pbmit-slider-list-wrap) : le style n'existe dans shortcode.css
   que pour .pbmit-slider-two/.pbmit-slider-four, pas pour .pbmit-slider-one
   qu'on utilise ; on reprend les memes regles pour ce scope. ---- */
.pbmit-slider-one .pbmit-slider-list-wrap {
  margin-top: 40px;
  padding: 0;
  list-style: none;
}
.pbmit-slider-one .pbmit-slider-list-wrap li {
  display: inline-block;
  margin-right: 40px;
  font-size: 16px;
  line-height: 25px;
  font-weight: 500;
  color: var(--pbmit-white-color);
  font-family: var(--pbmit-heading-typography-font-family);
}
.pbmit-slider-one .pbmit-slider-list-wrap li:last-child {
  margin-right: 0;
}
.pbmit-slider-one .pbmit-slider-list-wrap li .pbmit-slider-list {
  display: flex;
  align-items: center;
}
.pbmit-slider-one .pbmit-slider-list-wrap li .pbmit-slider-list i {
  color: var(--pbmit-global-color);
  font-size: 24px;
  padding-right: 10px;
}
@media only screen and (max-width: 767px) {
  .pbmit-slider-one .pbmit-slider-list-wrap {
    margin-top: 24px;
  }
  .pbmit-slider-one .pbmit-slider-list-wrap li {
    display: block;
    margin-right: 0;
    margin-bottom: 10px;
    font-size: 14px;
  }
}

/* ---- Header fixe (scroll) : le template bascule normalement vers
   .pbmit-ihbox-style-3 (téléphone) et masque .pbmit-header-button une fois
   sticky (cf. shortcode.css ~3991-4011). On veut l'inverse : le bouton
   "Jetzt anfragen" reste affiché, le bloc téléphone ne doit jamais apparaître. ---- */
.pbmit-header-style-1 .pbmit-ihbox-style-3,
.pbmit-header-style-1 .pbmit-sticky-header.pbmit-fixed-header .pbmit-ihbox-style-3 {
  display: none !important;
}
/* Uniquement desktop : sur mobile (<=1200px) le template masque deja
   .pbmit-header-button dans tous les cas (menu hors-champ) — on ne doit
   pas le forcer a reapparaitre en dessous de ce seuil. */
@media only screen and (min-width: 1201px) {
  .pbmit-header-style-1 .pbmit-sticky-header.pbmit-fixed-header .pbmit-header-button {
    display: block !important;
  }
}

/* ---- Sélecteur de langue ----
   IMPORTANT : ne JAMAIS lui donner la classe .pbmit-header-search-btn du
   template. gsap-animation.js fait `jQuery(".pbmit-header-search-btn").on(
   'click', function(e){ ... e.preventDefault(); return false; })` — ce
   `return false` coupe la propagation de l'evenement, donc notre listener
   delegue sur document (voir js/aic-custom.js) ne le voit jamais passer et
   le clic paraît ne rien faire. On reproduit juste le positionnement dont
   on a besoin (a cote du burger sur mobile) sous notre propre classe. ---- */
.aic-lang-switcher {
  position: relative;
}
.aic-lang-switcher__current {
  display: flex;
  align-items: center;
  gap: 6px;
  text-decoration: none;
  font-size: 13px;
  line-height: 1;
  touch-action: manipulation;
  font-weight: 600;
  color: var(--pbmit-white-color);
}
.aic-lang-switcher__current i {
  font-size: 11px;
}
.pbmit-header-style-1 .pbmit-sticky-header.pbmit-fixed-header .aic-lang-switcher__current {
  color: var(--pbmit-blackish-color);
}
.aic-lang-switcher__flag,
.aic-lang-switcher__list img {
  width: 18px;
  height: 13px;
  object-fit: cover;
  border-radius: 2px;
  box-shadow: 0 0 0 1px rgba(0,0,0,0.08);
}
.aic-lang-switcher__list {
  position: absolute;
  top: calc(100% + 14px);
  left: 50%;
  transform: translateX(-50%);
  background: #fff;
  border-radius: 10px;
  box-shadow: 0 20px 50px rgba(22,34,45,0.18);
  list-style: none;
  margin: 0;
  padding: 8px;
  width: 190px;
  max-height: 320px;
  overflow-y: auto;
  display: none;
  z-index: 999;
}
.aic-lang-switcher.is-open .aic-lang-switcher__list { display: block; }
.aic-lang-switcher__list li a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border-radius: 6px;
  color: #16222d;
  font-size: 13px;
  line-height: 1.3;
  text-decoration: none;
}
.aic-lang-switcher__list li a:hover { background: #ecf0f4; }
.aic-lang-switcher__list li.is-current a { font-weight: 700; color: #ecab23; }
/* En dessous de 1200px, le template affiche le burger en position absolute
   a droite du header (cf. responsive.css) — .pbmit-header-search-btn recevait
   un padding-right pour ne pas passer dessous ; on applique le meme padding
   ici puisqu'on occupe desormais sa place dans la barre, juste avant le
   burger, une fois le CTA et le bloc telephone masques sur mobile. */
@media only screen and (max-width: 1200px) {
  .aic-lang-switcher {
    padding: 0 65px 0 0;
  }
  .aic-lang-switcher__list {
    left: auto;
    right: 0;
    transform: none;
  }
}
@media only screen and (max-width: 767px) {
  .aic-lang-switcher {
    padding: 5px 55px 0 0;
  }
}

/* ---- Formulaires : honeypot + alertes + anti-spam ---- */
.aic-hp-field {
  position: absolute !important;
  left: -9999px !important;
  top: -9999px !important;
  width: 1px !important;
  height: 1px !important;
  opacity: 0 !important;
  pointer-events: none;
}
.aic-antibot-label {
  display: block;
  font-size: 12px;
  color: inherit;
  opacity: 0.75;
  margin: 10px 0 6px;
}
.aic-antibot-input { width: 100%; }
.aic-form-alert {
  display: none;
  margin-top: 14px;
  padding: 12px 16px;
  border-radius: 6px;
  font-size: 13px;
  line-height: 1.5;
}
.aic-form-alert.is-success {
  display: block;
  background: rgba(16,140,90,0.1);
  color: #0d7a4d;
  border: 1px solid rgba(16,140,90,0.25);
}
.aic-form-alert.is-error {
  display: block;
  background: rgba(191,45,45,0.08);
  color: #bf2d2d;
  border: 1px solid rgba(191,45,45,0.25);
}
.aic-form-alert.is-loading {
  display: block;
  background: rgba(236,171,35,0.12);
  color: #8a6416;
  border: 1px solid rgba(236,171,35,0.3);
}

/* ===== Chat en direct — bouton flottant ===== */
.chat-float-btn {
  position: fixed;
  bottom: 20px;
  right: 20px;
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: #16222d;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 8px 24px rgba(22,34,45,0.35);
  z-index: 998;
  transition: all 0.3s ease;
}
.chat-float-btn i { color: #fff; font-size: 24px; }
.chat-float-btn:hover { background: #ecab23; transform: scale(1.08); }
.chat-float-btn::before {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  border-radius: 50%;
  background: #16222d;
  opacity: 0.5;
  animation: chatFloatPulse 2.2s ease-out infinite;
  z-index: -1;
}
@keyframes chatFloatPulse {
  0% { transform: scale(1); opacity: 0.5; }
  100% { transform: scale(1.6); opacity: 0; }
}
@media only screen and (max-width: 767px) {
  .chat-float-btn { width: 52px; height: 52px; bottom: 15px; right: 15px; }
  .chat-float-btn i { font-size: 20px; }
}

/* ===== Chat en direct — popup ===== */
.chat-popup {
  position: fixed;
  bottom: 95px;
  right: 20px;
  width: 340px;
  max-width: calc(100vw - 40px);
  background: #fff;
  border-radius: 14px;
  box-shadow: 0 20px 60px rgba(22,34,45,0.28);
  overflow: hidden;
  z-index: 999;
  opacity: 0;
  visibility: hidden;
  transform: translateY(16px) scale(0.96);
  transition: all 0.25s ease;
}
.chat-popup.active { opacity: 1; visibility: visible; transform: translateY(0) scale(1); }
.chat-popup-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 40px 16px 18px;
  background: #16222d;
  position: relative;
}
.chat-avatar, .chat-bubble-avatar {
  width: 40px; height: 40px; border-radius: 50%;
  background: #fff; padding: 6px; object-fit: contain; flex-shrink: 0;
}
.chat-window-name { display: block; color: #fff; font-weight: 700; font-size: 15px; }
.chat-window-status { display: block; color: rgba(255,255,255,0.65); font-size: 12px; margin-top: 2px; }
.chat-popup-close {
  position: absolute; top: 8px; right: 12px;
  background: none; border: none; color: #fff;
  font-size: 24px; line-height: 1; cursor: pointer; opacity: 0.75; padding: 4px;
}
.chat-popup-close:hover { opacity: 1; }
.chat-popup-body { padding: 20px 18px; background: #f6f8fa; max-height: 260px; overflow-y: auto; }
.chat-bubble { display: flex; align-items: flex-start; gap: 12px; margin-bottom: 16px; }
.chat-bubble-text {
  background: #fff; padding: 14px 18px; border-radius: 4px 16px 16px 16px;
  font-size: 14px; color: #16222d; box-shadow: 0 2px 10px rgba(22,34,45,0.06); max-width: 80%;
}
.chat-popup-footer {
  padding: 16px 18px; border-top: 1px solid #eee; background: #fff;
  display: flex; flex-direction: column; gap: 10px;
}
.chat-popup-footer .from-control {
  width: 100%; border: 1px solid rgba(22,34,45,0.15); border-radius: 8px;
  padding: 10px 14px; font-size: 13px; margin-bottom: 0;
}
.chat-popup-footer .chat-textarea { min-height: 70px; resize: vertical; }
.chat-popup-footer input.readon.submit {
  width: 100%; text-align: center; cursor: pointer;
  background: #ecab23; color: #16222d; border: none;
  border-radius: 8px; padding: 11px 16px; font-weight: 700; font-size: 13px;
}
.chat-popup-footer input.readon.submit:hover { background: #16222d; color: #fff; }
@media only screen and (max-width: 480px) {
  .chat-popup { right: 15px; bottom: 82px; width: calc(100vw - 30px); }
}

/* ===== Chat en direct — fil de discussion ===== */
.chat-thread { max-height: 260px; overflow-y: auto; display: flex; flex-direction: column; gap: 12px; }
.chat-thread-msg { display: flex; justify-content: flex-start; }
.chat-thread-msg.is-mine { justify-content: flex-end; }
.chat-thread-bubble {
  max-width: 80%; background: #fff; padding: 10px 14px; border-radius: 4px 16px 16px 16px;
  font-size: 14px; color: #16222d; box-shadow: 0 2px 10px rgba(22,34,45,0.06);
}
.chat-thread-msg.is-mine .chat-thread-bubble {
  background: #ecab23; color: #16222d; border-radius: 16px 4px 16px 16px;
  box-shadow: 0 2px 10px rgba(236,171,35,0.25);
}
.chat-thread-time { margin-top: 4px; font-size: 10px; opacity: 0.6; }

/* ===== Bandeau cookies ===== */
.cookie-consent {
  position: fixed;
  bottom: 20px;
  left: 20px;
  width: 360px;
  max-width: calc(100vw - 40px);
  background: #16222d;
  color: #fff;
  border-radius: 14px;
  box-shadow: 0 20px 60px rgba(22,34,45,0.28);
  padding: 22px 22px 20px;
  z-index: 998;
  opacity: 0;
  visibility: hidden;
  transform: translateY(16px);
  transition: all 0.25s ease;
}
.cookie-consent.active { opacity: 1; visibility: visible; transform: translateY(0); }
.cookie-consent p { margin: 0 0 18px; font-size: 14px; line-height: 1.6; color: rgba(255,255,255,0.88); }
.cookie-consent__actions { display: flex; gap: 10px; }
.cookie-consent__actions button {
  flex: 1; cursor: pointer; font-size: 14px; font-weight: 600;
  border-radius: 0 8px 0 8px; padding: 11px 16px; transition: all 0.25s ease; border: 1px solid transparent;
}
.cookie-consent__accept { background: #ecab23; color: #16222d; }
.cookie-consent__accept:hover { background: #ffffff; }
.cookie-consent__decline { background: transparent; color: #fff; border-color: rgba(255,255,255,0.35); }
.cookie-consent__decline:hover { background: rgba(255,255,255,0.1); }
@media only screen and (max-width: 480px) {
  .cookie-consent { left: 15px; right: 15px; bottom: 15px; width: auto; max-width: none; }
}

/* ---- Section video (accueil) : texte defilant "AIC Finanz Gmbh" un peu
   plus long que l'original du template — on reduit legerement la taille
   par rapport aux 170/135/100/70px du template pour eviter qu'il ne
   deborde, tout en gardant les memes paliers responsives. ---- */
.video-one-bg .pbmit-tween-effect-style-1.pbmit-tween-text .pbmit-element-title {
  font-size: 140px;
  line-height: 116px;
  letter-spacing: -5.6px;
}
@media only screen and (max-width: 1200px) {
  .video-one-bg .pbmit-tween-effect-style-1.pbmit-tween-text .pbmit-element-title {
    font-size: 112px;
    line-height: 92px;
  }
}
@media only screen and (max-width: 991px) {
  .video-one-bg .pbmit-tween-effect-style-1.pbmit-tween-text .pbmit-element-title {
    font-size: 84px;
    line-height: 68px;
  }
}
@media only screen and (max-width: 500px) {
  .video-one-bg .pbmit-tween-effect-style-1.pbmit-tween-text .pbmit-element-title {
    font-size: 58px;
    line-height: 48px;
  }
}
