/* ─────────────────────────────
   LIGHT-ONLY FOUNDATION
   ───────────────────────────── */
:root,
html,
body,
[data-bs-theme],
[data-theme]{
  color-scheme: light !important; /* Force les contrôles/UA en clair */
}

/* Variables design (light seulement) */
:root{
  --primary:#5b7cfa;
  --primary-2:#3f62ff;
  --text:#0e1116;
  --muted:#667085;
  --bg:#ffffff;
  --surface:#f6f8fc;
  --radius:14px;
  --shadow:0 10px 40px rgba(0,0,0,.08);
  --appbar-h:64px;
  --control-h:40px;
  --control-pad-x:.75rem;
  --drawer-w:clamp(320px,92vw,520px);
  --menu-icon-w:20px;
  --menu-icon-size:18px;
  --menu-gap:.6rem;

  /* Scrollbars & accent */
  accent-color:var(--primary);
}

/* Si l’OS est en dark, on **reste** en clair */
@media (prefers-color-scheme: dark){
  :root{ color-scheme: light !important; }
  html, body{ background:#fff !important; color:var(--text) !important; }
  [data-bs-theme="dark"],
  [data-theme="dark"]{
    background:#fff !important; color:var(--text) !important;
  }
}

/* Neutralise d’éventuels thèmes “dark” déclarés par attribut */
[data-bs-theme="dark"], [data-theme="dark"]{
  --bs-body-bg:#fff !important;
  --bs-body-color:#0e1116 !important;
  --bs-tertiary-bg:#fff !important;
  --bs-border-color:rgba(0,0,0,.08) !important;
}

/* ─────────────────────────────
   RESET & BASE
   ───────────────────────────── */
*{ box-sizing:border-box }
html,body{ margin:0; padding:0; height:100% }
html,body{ background:var(--bg); color:var(--text); font-family:Inter,system-ui,-apple-system,Segoe UI,Roboto,"Helvetica Neue",Arial }
body{ min-height:100dvh; display:flex; flex-direction:column }

img{ max-width:100%; display:block }
a{ color:inherit; text-decoration:none }
.container{ width:min(1200px,92%); margin-inline:auto }

/* Focus visibles (clair) */
:where(a,button,.chip,[role="button"],[tabindex]:not([tabindex="-1"])):focus-visible{
  outline:none;
  box-shadow:0 0 0 3px color-mix(in oklab, var(--primary) 25%, transparent);
  border-radius:10px;
}

/* Skip link accessible */
.skip-link{ position:absolute; left:-9999px; top:auto; width:1px; height:1px; overflow:hidden }
.skip-link:focus{
  left:16px; top:16px; width:auto; height:auto;
  padding:.5rem .75rem; background:#111; color:#fff;
  border-radius:10px; z-index:2000
}

/* Scrollbars toujours clairs (WebKit) */
*::-webkit-scrollbar{ width:12px; height:12px }
*::-webkit-scrollbar-track{ background:#f2f4f7 }
*::-webkit-scrollbar-thumb{
  background:rgba(0,0,0,.28); border-radius:10px; border:3px solid #f2f4f7
}

/* ─────────────────────────────
   CHIPS
   ───────────────────────────── */
.chip{
  display:inline-flex; align-items:center; gap:.5rem;
  height:var(--control-h); padding:0 var(--control-pad-x);
  border:1px solid rgba(0,0,0,.08); border-radius:12px;
  background:#fff; font-weight:700; line-height:1;
}
.chip i{ font-size:.95rem }
.chip--primary{
  border-color:transparent;
  background:linear-gradient(90deg,var(--primary),var(--primary-2));
  color:#fff;
}
.chip--icon{ width:var(--control-h); padding:0; justify-content:center }
.chip--icon i{ transform:translateY(0); transition:transform .15s ease }
.chip--icon:hover i{ transform:translateY(-1px) }

/* ─────────────────────────────
   APP BAR (TOUJOURS BLANC, PAS DE TRANSPARENCE)
   ───────────────────────────── */
.appbar{ position:fixed; inset:0 0 auto 0; z-index:3000 }
.appbar__inner{
  background:#fff !important;          /* pas de rgba() ni blur */
  backdrop-filter:none !important;
  border-bottom:1px solid rgba(0,0,0,.06);
  transition:box-shadow .2s ease, background .2s ease;
  padding-inline:max(env(safe-area-inset-left),8px) max(env(safe-area-inset-right),8px);
}
body.is-scrolled .appbar__inner{ box-shadow:0 8px 28px rgba(0,0,0,.08) }
.appbar__row{ display:flex; align-items:center; gap:.9rem; min-height:64px; justify-content:space-between }
.brand{ display:flex; align-items:center; gap:.6rem }
.brand img{ border-radius:8px }
.brand__text{ font-weight:800; letter-spacing:.01em }
.appbar__nav{ margin-left:0 }
.appbar__menu{ display:flex; gap:1rem; list-style:none; padding:0; margin:0 }
.appbar__menu a{ font-weight:600; opacity:.92; text-decoration:none }
.appbar__menu a:hover{ opacity:1 }
@media(max-width:992px){ .appbar__nav{ display:none } }
.appbar__actions{ margin-left:auto; display:flex; align-items:center; gap:.5rem }
.appbar__toggle{
  display:inline-flex; flex-direction:column; justify-content:center; align-items:center;
  width:var(--control-h); height:var(--control-h); gap:4px;
  border:1px solid rgba(0,0,0,.08); border-radius:12px; background:#fff;
}
.appbar__toggle span{
  display:block; width:18px; height:2px; background:#475467; border-radius:2px; transition:.2s;
}
.appbar__toggle[aria-expanded=true] span:nth-child(1){ transform:translateY(6px) rotate(45deg) }
.appbar__toggle[aria-expanded=true] span:nth-child(2){ opacity:0 }
.appbar__toggle[aria-expanded=true] span:nth-child(3){ transform:translateY(-6px) rotate(-45deg) }

/* Contenu sous appbar */
.with-appbar,
main.with-appbar{ padding-top:var(--appbar-h) }

/* ─────────────────────────────
   LANG MENU (toujours clair)
   ───────────────────────────── */
.lang-switch{ position:relative }
.lang-switch .chip{ height:var(--control-h) }
.lang-switch .menu{
  position:absolute; right:0; top:calc(100% + .2rem); z-index:1200;
  background:#fff; border:1px solid rgba(0,0,0,.08); border-radius:12px;
  box-shadow:var(--shadow); list-style:none; margin:0; padding:.35rem; width:240px; display:none;
}
.lang-switch[aria-expanded=true] .menu{ display:block }
.menu--radio .menu__item{
  display:flex; align-items:center; gap:.6rem; width:100%;
  padding:.55rem .6rem; border-radius:10px; text-align:left; border:none; background:#fff; font-weight:600;
}
.menu--radio .menu__item:hover{ background:#f5f7fb }
.menu__check{ width:18px; display:inline-flex; justify-content:center; opacity:.2 }
.menu__code{ margin-left:auto; opacity:.65 }
.menu__item[aria-checked=true] .menu__check{ opacity:1 }

/* ─────────────────────────────
   DRAWER (panneau blanc, voile clair)
   ───────────────────────────── */
.drawer{
  position:fixed; inset:0; z-index:3001;
  display:grid; grid-template-columns:1fr var(--drawer-w);
  opacity:0; pointer-events:none;
}
.drawer__backdrop{
  /* voile clair au lieu de noir */
  background:rgba(255,255,255,.65) !important;
  backdrop-filter:blur(2px); transition:opacity .25s ease; opacity:0;
}
.drawer__panel{
  background:#fff !important;          /* pas de transparence */
  backdrop-filter:none !important;
  border-left:1px solid rgba(0,0,0,.08);
  transform:translateX(100%); transition:transform .28s cubic-bezier(.22,.61,.36,1);
  display:flex; flex-direction:column; height:100%; overflow:hidden;
  padding-bottom:max(env(safe-area-inset-bottom),12px);
}
.drawer.is-open{ opacity:1; pointer-events:auto }
.drawer.is-open .drawer__backdrop{ opacity:1 }
.drawer.is-open .drawer__panel{ transform:translateX(0) }

.drawer__header{ display:flex; align-items:center; justify-content:space-between; padding:.7rem .8rem; border-bottom:1px solid rgba(0,0,0,.06) }
.drawer__title{ font-weight:800 }
.drawer__nav{ padding:.75rem; flex:1; overflow:auto; -webkit-overflow-scrolling:touch; --drawer-nav-pad:.75rem }
.drawer__menu{ list-style:none; padding:0; margin:0 }
.drawer__menu li{ margin:.15rem 0 }
.drawer__menu a{
  display:flex; align-items:center; gap:var(--menu-gap);
  padding:.65rem .75rem; border-radius:10px; font-weight:600; text-decoration:none; background:#fff;
}
.drawer__menu a:hover{ background:#f5f7fb }
.drawer__menu .divider{ height:1px; background:rgba(0,0,0,.08); margin:.6rem 0 }
.drawer__menu .group{
  font-size:.8rem; text-transform:uppercase; letter-spacing:.06em; color:var(--muted);
  margin:.4rem 0 .2rem .2rem; padding-left:0!important; margin-left:calc(.25*var(--drawer-nav-pad))!important;
}
.drawer__lang{ margin-top:auto; padding:.75rem!important }
.drawer .menu{ max-height:40vh; overflow:auto; width:min(92vw,420px) }
.brand--static{ pointer-events:none; cursor:default; text-decoration:none }

@media(min-width:768px){
  .drawer__panel{ border-top-left-radius:16px; border-bottom-left-radius:16px; box-shadow:-18px 0 50px rgba(0,0,0,.18) }
}
@media(max-width:479px){ :root{ --drawer-w:100vw } }
@media(min-width:480px) and (max-width:767px){ :root{ --drawer-w:92vw } }
@media(min-width:768px) and (max-width:1023px){ :root{ --drawer-w:420px } }
@media(min-width:1024px) and (max-width:1439px){ :root{ --drawer-w:480px } }
@media(min-width:1440px){ :root{ --drawer-w:520px } }

.drawer__menu a>i{ width:var(--menu-icon-w); min-width:var(--menu-icon-w); height:var(--menu-icon-w); display:inline-flex; align-items:center; justify-content:center; font-size:var(--menu-icon-size); line-height:1; margin:0; text-align:center; font-weight:900 }
.drawer__menu .group{ padding-left:0!important }
[dir="ltr"] .drawer__menu a>i{ margin-right:.5rem }
[dir="rtl"] .drawer__menu a>i{ margin-left:.5rem }

/* Appbar container en pleine largeur */
.appbar .container{
  width:100%!important; max-width:none!important; margin-left:0!important; margin-right:0!important;
  padding-left:12px!important; padding-right:12px!important;
}

/* ─────────────────────────────
   FOOTER
   ───────────────────────────── */
.footer{ margin-top:auto; flex-shrink:0; padding:.6rem 0!important; font-size:.92rem; line-height:1.2 }
@media(max-width:480px){ .footer{ padding:.5rem 0!important } }
.footer p{ margin:0 }

/* ─────────────────────────────
   COOKIE BANNER (clair)
   ───────────────────────────── */
#cc-banner{
  position:fixed; left:50%; transform:translateX(-50%);
  bottom:0; width:min(100%,860px); z-index:9999; padding:0 12px 12px;
}
@media(min-width:768px){ #cc-banner{ width:min(92vw,860px) } }

/* Carte claire (plus de fond noir) */
#cc-banner .cc-card{
  background:#fff !important; color:var(--text) !important;
  border:1px solid rgba(0,0,0,.08); border-radius:14px;
  box-shadow:0 10px 30px rgba(0,0,0,.12); padding:14px 14px;
}
#cc-banner:focus-within .cc-card{
  outline:none; box-shadow:0 0 0 4px color-mix(in oklab, var(--primary) 25%, transparent), var(--shadow, 0 10px 30px rgba(0,0,0,.12));
}

/* Le bouton “outline” devient sombre (visible sur fond blanc) */
#cc-banner .btn-outline-light{
  color:var(--text) !important;
  border-color:rgba(0,0,0,.45) !important;
  background:transparent !important;
}
#cc-banner .btn-outline-light:hover,
#cc-banner .btn-outline-light:focus,
#cc-banner .btn-outline-light:active{
  color:var(--text) !important;
  background:#f5f7fb !important;
  border-color:rgba(0,0,0,.55) !important;
}

/* Layout mobile propre */
@media (max-width:576px){
  #cc-banner{ padding:8px 8px 12px }
  #cc-banner .cc-card{
    display:flex; align-items:flex-start; gap:10px; flex-wrap:wrap;
    border-radius:14px; padding:12px 12px;
  }
  #cc-banner .cc-card > i{ font-size:18px; line-height:1; margin-top:2px; order:1; color:var(--text) }
  #cc-banner .cc-card .flex-fill{ order:2; min-width:0 }
  #cc-banner .cc-card strong{
    display:block; margin:0 0 2px;
    font-size:clamp(14px,3.9vw,16px); line-height:1.25;
  }
  #cc-banner .cc-card small{
    display:block; margin:0;
    font-size:clamp(12.5px,3.5vw,14px); line-height:1.35; opacity:.9;
  }
  #cc-banner .cc-card .d-flex{ order:3; width:100%; gap:.5rem; margin-top:8px }
  #cc-banner .cc-card .d-flex .btn{ flex:1 1 0; min-height:44px; font-weight:700 }
}

/* ─────────────────────────────
   UTILS & ALIGN
   ───────────────────────────── */
.brand--static{ pointer-events:none; cursor:default; text-decoration:none }
#langSwitchMobile{ position:relative }
#langSwitchMobile .menu{
  top:calc(100% + .2rem); bottom:auto; left:50%; right:auto; transform:translateX(-50%);
  width:min(420px,calc(var(--drawer-w) - 24px),calc(100vw - 24px));
  max-height:40vh; overflow:auto; z-index:1200;
}
#langSwitchMobile[aria-expanded=true] .menu{ display:block }
#langSwitchMobile .menu--radio .menu__item{ padding:.6rem .7rem }

/* ─────────────────────────────
   BOOTSTRAP OVERLAYS (toujours clairs)
   ───────────────────────────── */
.modal-backdrop.show,
.offcanvas-backdrop.show{
  background:rgba(255,255,255,.65) !important; /* voile clair */
}
.dropdown-menu{
  background:#fff !important; color:var(--text) !important;
  border:1px solid rgba(0,0,0,.08) !important; box-shadow:var(--shadow) !important;
}

.map { width: 100%; height: clamp(320px, 60vh, 520px); border-radius: var(--radius); overflow: hidden; }
.p-1 { padding: 1rem; }
.mb-1 { margin-bottom: 1rem; }
.brand--static { cursor: default; }
.brand--static:hover { text-decoration: none; }
