/* ============================================================
   GEOTAX — Couche UX globale (v117)
   Chargée après les styles inline de chaque page.
   Accessibilité, mobile, formulaires, micro-interactions.
   ============================================================ */

/* ---------- Fondations ---------- */
html { -webkit-text-size-adjust: 100%; }
body { -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; }
img { max-width: 100%; }
::selection { background: #CBB98E; color: #1A2233; }

/* ---------- Focus clavier visible (a11y) ---------- */
:focus { outline: none; }
:focus-visible {
  outline: 3px solid #CBB98E;
  outline-offset: 2px;
  border-radius: 3px;
}
.btn:focus-visible, a.btn:focus-visible {
  outline: 3px solid #1A2233;
  outline-offset: 3px;
}

/* ---------- Lien d'évitement (injecté par ux.js) ---------- */
.skip-link {
  position: absolute;
  top: -60px;
  left: 16px;
  z-index: 2000;
  background: #1A2233;
  color: #fff;
  padding: 12px 20px;
  border-radius: 0 0 6px 6px;
  text-decoration: none;
  font-weight: 600;
  font-size: 14px;
  transition: top 0.2s ease;
}
.skip-link:focus { top: 0; }

/* ---------- Cibles tactiles ≥ 44px ---------- */
.btn, a.btn {
  min-height: 48px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.btn:active { transform: scale(0.98); }
.mobile-menu a { padding: 14px 0; min-height: 44px; display: flex; align-items: center; }
.lang-toggle a { padding: 10px 6px; display: inline-flex; align-items: center; min-height: 40px; }
.hamburger { padding: 12px; margin: 0; min-width: 48px; min-height: 48px; justify-content: center; }
footer a { display: inline-block; padding: 3px 0; }

/* ---------- En-tête mobile : anti-débordement (v119) ---------- */
@media (max-width: 960px) {
  nav { gap: 10px; overflow: hidden; }
  /* Le CTA nav est redondant sur mobile (présent dans le menu déroulant + barre flottante) */
  .nav-actions .btn, .nav-actions a.btn { display: none !important; }
  .nav-actions { gap: 10px; flex-shrink: 0; }
  .lang-toggle a { padding: 10px 4px; }
  .nav-brand { min-width: 0; flex-shrink: 1; overflow: hidden; gap: 10px; }
  .nav-text h1 { white-space: nowrap; }
  .nav-text p { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 44vw; }
}
@media (max-width: 420px) {
  .nav-text p { display: none; }   /* tagline masquée sur très petits écrans */
  .nav-text h1 { font-size: 16px; }
}
@media (max-width: 480px) {
  .filter-bar { top: 70px; }       /* la nav passe à 70px sous 480px */
}

/* ---------- Menu mobile : confort et défilement ---------- */
.mobile-menu {
  max-height: calc(100dvh - 80px);
  overflow-y: auto;
  overscroll-behavior: contain;
}
body.menu-open { overflow: hidden; }

/* ---------- Formulaires ---------- */
input, select, textarea {
  font-size: 16px !important; /* évite le zoom automatique iOS */
  min-height: 48px;
  border-radius: 6px;
  accent-color: #CBB98E;
}
textarea { min-height: 140px; }
input:focus-visible, select:focus-visible, textarea:focus-visible {
  outline: 2px solid #CBB98E;
  outline-offset: 1px;
  border-color: #CBB98E;
}
/* États de validation natifs, sans JS : seulement après interaction */
input:user-invalid, select:user-invalid, textarea:user-invalid {
  border-color: #B3261E !important;
  box-shadow: 0 0 0 1px #B3261E;
}
label { cursor: pointer; }

/* ---------- Accordéons FAQ ---------- */
.faq-header { min-height: 56px; gap: 12px; }
.faq-header:hover { color: #8A7745; }
.faq-toggle { flex-shrink: 0; }

/* ---------- Tableaux larges : défilement horizontal mobile ---------- */
.table-scroll {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  margin: 0 -16px;
  padding: 0 16px;
  scrollbar-width: thin;
}
.table-scroll table { min-width: 640px; }

/* ---------- Bas de page : UNE seule barre fixe, sans superposition (v120) ---------- */
.sticky-cta-mobile, .float-book {
  padding-bottom: calc(env(safe-area-inset-bottom, 0px));
}
/* Masquage doux des barres quand le footer est à l'écran (mobile ET desktop) */
.sticky-cta-mobile, .float-cta, .floating-bar {
  transition: transform 0.35s ease, opacity 0.35s ease;
}
body.gx-footer-visible .sticky-cta-mobile,
body.gx-footer-visible .float-cta,
body.gx-footer-visible .floating-bar {
  transform: translateY(130%);
  opacity: 0;
  pointer-events: none;
}
@media (max-width: 768px) {
  /* Espace réservé pour la barre fixe : le contenu/footer n'est plus recouvert */
  body { padding-bottom: calc(60px + env(safe-area-inset-bottom, 0px)); }
  /* Une seule barre : la barre Exit tax (présente sur toutes les pages) ;
     la barre tél+RDV (.float-cta/.floating-bar) est réservée aux pages consultation */
  .float-cta, .floating-bar { display: none !important; }
  body.gx-consult .float-cta, body.gx-consult .floating-bar { display: flex !important; }
  body.gx-consult .sticky-cta-mobile { display: none !important; }
  /* Flottants droits empilés AU-DESSUS de la barre */
  .btt { bottom: calc(72px + env(safe-area-inset-bottom, 0px)) !important; right: 16px; }
  .whatsapp-button { bottom: calc(128px + env(safe-area-inset-bottom, 0px)) !important; }
}

/* ---------- Confort de lecture mobile ---------- */
@media (max-width: 768px) {
  body { line-height: 1.65; }
  .hero { height: auto; min-height: 540px; padding-top: 48px; padding-bottom: 48px; }
  h1 { font-size: clamp(30px, 8.5vw, 40px); }
  h2 { font-size: clamp(26px, 7vw, 34px); }
  .container { padding-left: 20px; padding-right: 20px; }
}

/* ---------- Animations : respect des préférences ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  .reveal { opacity: 1 !important; transform: none !important; }
}

/* ---------- Impression ---------- */
@media print {
  nav, .mobile-menu, .hamburger, .sticky-cta-mobile, .float-book,
  .skip-link, .back-to-top, [class*="sticky"] { display: none !important; }
  body { color: #000; background: #fff; }
  a { color: #000; text-decoration: underline; }
  .hero { height: auto; min-height: 0; background: none !important; color: #000; }
  .hero * { color: #000 !important; }
}


/* ============================================================
   v126 — Lot A : menu principal à déroulants (desktop, CSS pur)
   + accordéons natifs du menu mobile
   ============================================================ */
.nav-menu .has-sub { position: relative; }
.nav-menu .sub-menu { position: absolute; top: 100%; left: -16px; min-width: 240px; background: #fff; box-shadow: 0 12px 32px rgba(0, 0, 0, .12); border-radius: 6px; padding: 10px 0; margin: 0; list-style: none; opacity: 0; visibility: hidden; transform: translateY(6px); transition: all .2s ease; z-index: 1100; }
.nav-menu .has-sub:hover > .sub-menu,
.nav-menu .has-sub:focus-within > .sub-menu { opacity: 1; visibility: visible; transform: translateY(0); }
.nav-menu .sub-menu li { margin: 0; padding: 0; }
.nav-menu .sub-menu a { display: block; padding: 9px 18px; font-size: 13px; color: #1A2233; text-transform: none; letter-spacing: normal; white-space: nowrap; }
.nav-menu .sub-menu a:hover { background: #F6F2E9; color: #1A2233; }
.nav-menu .has-sub > a::after { content: " \25BE"; font-size: 10px; color: #CBB98E; }

/* Accordéons natifs du menu mobile */
.mobile-menu details { border-bottom: 1px solid #efefef; }
.mobile-menu summary { padding: 14px 0; font-weight: 600; cursor: pointer; list-style: none; min-height: 44px; display: flex; align-items: center; justify-content: space-between; }
.mobile-menu summary::-webkit-details-marker { display: none; }
.mobile-menu summary::after { content: "+"; color: #CBB98E; font-size: 18px; }
.mobile-menu details[open] summary::after { content: "\2013"; }
.mobile-menu details a { display: block; padding: 10px 0 10px 14px; min-height: 40px; }
.mobile-menu .mobile-cta { margin-top: 12px; background: #CBB98E; color: #1A2233; text-align: center; padding: 14px; border-radius: 4px; font-weight: 700; }

/* Les déroulants desktop n'interfèrent pas : le hamburger prime en mobile */
@media (max-width: 960px) {
  .nav-menu .sub-menu { display: none !important; }
}

/* ============================================================
   Texte non copiable — sélection désactivée (CSS uniquement)
   N'affecte pas l'indexation Google ni la détection par les IA,
   qui lisent le code HTML source et non la sélection navigateur.
   Les champs de formulaire restent sélectionnables/utilisables.
   ============================================================ */
body {
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  user-select: none;
  -webkit-touch-callout: none;
}
input, textarea, select, [contenteditable="true"] {
  -webkit-user-select: text;
  -moz-user-select: text;
  -ms-user-select: text;
  user-select: text;
}
img { -webkit-user-drag: none; user-drag: none; }


/* ============ v2 (2a) — mobile : CTA fixe unique + menu redessiné ============ */
.sticky-cta-mobile{display:none !important}
@media (max-width:960px){.btt{display:none !important}}
.mobile-menu{padding:14px 22px 24px;gap:0;max-height:calc(100vh - 80px);overflow-y:auto}
.mobile-menu details{border-bottom:1px solid #efece5}
.mobile-menu details summary{list-style:none;display:flex;justify-content:space-between;align-items:center;padding:16px 0;font-family:'Cormorant Garamond',serif;font-size:20px;font-weight:600;color:#1A2233;cursor:pointer}
.mobile-menu details summary::-webkit-details-marker{display:none}
.mobile-menu details summary::after{content:"\25B8";color:#b39855;font-size:11px}
.mobile-menu details[open] summary::after{content:"\25BE"}
.mobile-menu details[open]{padding-bottom:14px}
.mobile-menu details a{display:block;font-size:14px;color:#4a5261;padding:7px 0 7px 14px;border-left:2px solid #CBB98E;margin-left:2px;border-bottom:none}
.mobile-menu > a{border-bottom:1px solid #efece5;padding:16px 0;font-weight:500}
.mobile-menu .mobile-cta{background:#CBB98E;color:#1A2233;text-align:center;font-weight:600;border-radius:3px;padding:15px;border-bottom:none;margin-top:16px}

/* ============ v2 — FAQ épurée (toutes pages) ============ */
.faq-item{background:transparent !important;border:none !important;border-bottom:1px solid #ece6d8 !important;border-radius:0 !important;margin-bottom:0 !important;box-shadow:none !important}
.faq-item:hover{box-shadow:none !important;border-color:#ece6d8 !important}
.faq-header{background:transparent !important;padding:22px 4px !important}
.faq-header:hover{background:transparent !important}
.faq-content,.faq-body{background:transparent !important}
.faq-answer,.faq-body-content{padding:0 44px 24px 4px !important}

/* ============ v2 — pages internes : harmonisation ============ */
/* Héros de sous-pages : alignés à gauche (colonne inchangée) */
.hero{text-align:left;}
.hero .breadcrumb{margin-left:0}
/* Titres de section : filet fin façon v2 */
.service-section h2::after{width:26px;height:2px;border-radius:0}
/* Encarts inline : coins nets */
.service-section [style*="border-radius:8px"],.silo-content [style*="border-radius:8px"],.service-section [style*="border-radius: 8px"],.silo-content [style*="border-radius: 8px"]{border-radius:3px !important}
/* Étapes numérotées : chiffres serif, sans cercle */
.step-circle{width:auto;height:auto;border:none;border-radius:0;font-size:36px;margin:0 auto 12px}
/* Boutons : coins nets partout */
.btn{border-radius:3px}
