/* ---------- Version claire (data-theme="light") : fond blanc cassé chaud, encre violette, accent corail ---------- */
html[data-theme="light"] {
  color-scheme: light;
  --nuit: #FBF8F4; --nuit-rgb: 251, 248, 244; --surface: #F2EDE7; --ligne: rgba(23, 18, 31, .13); --trait: rgba(23, 18, 31, .15);
  --craie: #17121F; --brume: #5C5567; --peche: #4E3C90; --texte-doux: #3F384A; --souligne: rgba(23, 18, 31, .35);
  --verre: rgba(255, 255, 255, .62); --verre-fort: rgba(255, 255, 255, .88); --verre-bord: rgba(78, 60, 144, .16);
  --verre-ombre: 0 10px 38px rgba(78, 60, 144, .1), inset 0 1px 0 rgba(255, 255, 255, .95);
}
html[data-theme="light"] .lueur-violet { background: radial-gradient(closest-side, rgba(110, 84, 214, .16), rgba(110, 84, 214, .05) 45%, transparent 72%); }
html[data-theme="light"] .lueur-peche { background: radial-gradient(closest-side, rgba(244, 162, 151, .22), transparent 70%); }
html[data-theme="light"] .grain { opacity: .05; mix-blend-mode: multiply; }
html[data-theme="light"] .bouton { background: #17121F; color: #fff; }
html[data-theme="light"] .bouton:hover { background: #4E3C90; color: #fff; }
html[data-theme="light"] .bouton-ligne { color: #17121F; border-color: rgba(23, 18, 31, .32); background: rgba(255, 255, 255, .5); }
html[data-theme="light"] .bouton-ligne:hover { background: #17121F; color: #fff; border-color: #17121F; }
html[data-theme="light"] .ouverture .actions .bouton { background: #17121F; }
/* Menu : pilule claire en permanence */
html[data-theme="light"] .nav::before { background: rgba(255, 255, 255, .6); border-color: rgba(255, 255, 255, .9); box-shadow: 0 10px 36px rgba(78, 60, 144, .13), inset 0 1px 0 rgba(255, 255, 255, .95); }
html[data-theme="light"] .nav nav a:not(.bouton-ligne) { color: #4a4258; }
html[data-theme="light"] .nav nav a:not(.bouton-ligne):hover { color: #17121f; }
html[data-theme="light"] .burger span { background: #17121f; }
html[data-theme="light"] .nav.ouvert nav a:not(.bouton-ligne) { color: var(--craie); }
/* Hero : le fondu se perd dans le fond clair */
html[data-theme="light"] .hero-fond::after { background: linear-gradient(180deg, transparent calc(100% - 720px), rgba(150, 130, 220, .14) calc(100% - 420px), transparent 100%); }
html[data-theme="light"] .defiler { border-color: rgba(78, 60, 144, .22); background: rgba(255, 255, 255, .6); color: var(--craie); box-shadow: 0 8px 28px rgba(78, 60, 144, .14), inset 0 1px 0 rgba(255, 255, 255, .95); }
html[data-theme="light"] .defiler:hover { background: #fff; border-color: rgba(78, 60, 144, .5); }
html[data-theme="light"] .progression { color: #4a4258; }
/* Logos clients : les versions « -clair » ne servent qu'en thème clair */
.defile-piste img.clair { display: none; }
/* Logos clients : couleurs d'origine sur fond clair (fichiers « -clair ») */
html[data-theme="light"] .defile-piste img:not(.clair), html[data-theme="light"] .defile-piste img.couleur { display: none; }
html[data-theme="light"] .defile-piste img.clair { display: block; opacity: .88; filter: none; transition: opacity .3s; }
html[data-theme="light"] .defile-piste li:hover img.clair { opacity: 1; }
/* Cartes et images */
html[data-theme="light"] .rangee img, html[data-theme="light"] .rangee video { border-color: rgba(23, 18, 31, .1); }
html[data-theme="light"] .offre, html[data-theme="light"] .faq details, html[data-theme="light"] .etude-meta, html[data-theme="light"] .etude-liste li, html[data-theme="light"] .etude-suivant { box-shadow: var(--verre-ombre); }
html[data-theme="light"] .etude-suivant:hover { background: var(--verre-fort); border-color: rgba(78, 60, 144, .4); }
html[data-theme="light"] .faq details[open] { background: var(--verre-fort); }
html[data-theme="light"] .a-fournir { opacity: 1; }
html[data-theme="light"] ::selection { background: rgba(244, 162, 151, .45); }

/* ---------- Bouton soleil / lune : verre dépoli, curseur flottant avec rebond, ondes à la bascule ---------- */
.theme-toggle { position: relative; display: flex; align-items: center; flex: none; zoom: .6; width: 104px; height: 64px; padding: 6px; margin: 0; border: 1px solid var(--verre-bord); border-radius: 999px; cursor: pointer; -webkit-appearance: none; appearance: none; color: inherit;
  background: linear-gradient(135deg, rgba(255,255,255,.1), rgba(255,255,255,.03)); -webkit-backdrop-filter: blur(16px) saturate(170%); backdrop-filter: blur(16px) saturate(170%);
  box-shadow: 0 8px 28px rgba(0,0,0,.32), inset 0 1px 0 rgba(255,255,255,.16), inset 0 -1px 0 rgba(255,255,255,.04);
  transition: background .4s, box-shadow .4s, border-color .4s, transform .2s; }
.theme-toggle:hover { border-color: rgba(243,163,149,.45); }
.theme-toggle:active { transform: scale(.97); }
.theme-toggle:focus-visible { outline: 2px solid var(--peche); outline-offset: 5px; }
.theme-toggle > span { pointer-events: none; }
.tt-rim { position: absolute; inset: 3px; border-radius: 999px; border: 1px solid rgba(255,255,255,.07); }
.tt-gloss { position: absolute; inset: 0; border-radius: 999px; background: linear-gradient(180deg, rgba(255,255,255,.22) 0%, rgba(255,255,255,0) 46%); mix-blend-mode: soft-light; }
.tt-ao { display: none; }
.tt-fonds { position: absolute; inset: 0; display: flex; align-items: center; justify-content: space-between; padding: 0 17px; }
.theme-toggle svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; transition: color .4s, opacity .35s, transform .5s cubic-bezier(.2,.8,.2,1); }
.tt-fonds svg { color: rgba(243,238,234,.45); }
/* curseur : galet de verre qui flotte, avec un halo aux couleurs de la marque */
.tt-pouce { position: relative; z-index: 2; display: flex; align-items: center; justify-content: center; flex: none; width: 44px; height: 44px; overflow: hidden; border-radius: 50%; transform: translateX(0);
  background: linear-gradient(145deg, rgba(255,255,255,.6), rgba(255,255,255,.2)); border: 1px solid rgba(255,255,255,.65);
  -webkit-backdrop-filter: blur(10px) saturate(160%); backdrop-filter: blur(10px) saturate(160%);
  box-shadow: 0 8px 22px rgba(244,162,151,.38), 0 2px 6px rgba(0,0,0,.18), inset 0 1px 0 rgba(255,255,255,.85), inset 0 -6px 12px rgba(244,162,151,.25);
  transition: transform .65s cubic-bezier(.3,1.6,.45,1), background .4s, box-shadow .4s, border-color .4s; }
.tt-brillance { position: absolute; inset: 0; border-radius: 50%; background: radial-gradient(circle at 30% 22%, rgba(255,255,255,.75), rgba(255,255,255,0) 52%); }
.tt-icone { position: relative; z-index: 2; display: grid; place-items: center; }
.tt-icone svg { grid-area: 1 / 1; }
.tt-icone .ic-soleil { color: #E8785F; } .tt-icone .ic-lune { color: #4E3C90; }
/* clair : curseur à gauche, soleil visible */
html[data-theme="light"] .theme-toggle { border-color: rgba(78,60,144,.2); background: linear-gradient(135deg, rgba(255,255,255,.7), rgba(255,255,255,.35));
  box-shadow: 0 8px 26px rgba(78,60,144,.14), inset 0 1px 0 rgba(255,255,255,.95), inset 0 -1px 0 rgba(78,60,144,.06); }
html[data-theme="light"] .theme-toggle:hover { border-color: rgba(78,60,144,.45); }
html[data-theme="light"] .tt-rim { border-color: rgba(78,60,144,.08); }
html[data-theme="light"] .tt-gloss { background: linear-gradient(180deg, rgba(255,255,255,.8) 0%, rgba(255,255,255,0) 50%); mix-blend-mode: normal; opacity: .6; }
html[data-theme="light"] .tt-fonds svg { color: rgba(23,18,31,.38); }
html[data-theme="light"] .tt-pouce { background: linear-gradient(145deg, rgba(255,255,255,.98), rgba(255,255,255,.7)); border-color: rgba(255,255,255,.95);
  box-shadow: 0 8px 22px rgba(244,162,151,.45), 0 2px 6px rgba(78,60,144,.16), inset 0 1px 0 #fff, inset 0 -6px 12px rgba(244,162,151,.22); }
html[data-theme="light"] .tt-icone .ic-lune { opacity: 0; transform: rotate(-70deg) scale(.5); }
/* sombre : curseur à droite, lune visible, halo violet */
html[data-theme="dark"] .tt-pouce { transform: translateX(46px); background: linear-gradient(145deg, rgba(255,255,255,.26), rgba(255,255,255,.07)); border-color: rgba(255,255,255,.34);
  box-shadow: 0 8px 22px rgba(120,98,214,.5), 0 2px 6px rgba(0,0,0,.35), inset 0 1px 0 rgba(255,255,255,.45), inset 0 -6px 12px rgba(120,98,214,.28); }
html[data-theme="dark"] .tt-icone .ic-lune { color: #E3D9FF; }
html[data-theme="dark"] .tt-icone .ic-soleil { opacity: 0; transform: rotate(70deg) scale(.5); }
/* sur la barre de menu claire (thème clair) le bouton garde son verre clair ; le sombre reste sombre */
/* ondes à la bascule */
.tt-particules { position: absolute; inset: 0; pointer-events: none; }
.tt-p { position: absolute; left: 50%; top: 50%; width: 10px; height: 10px; margin: -5px 0 0 -5px; border-radius: 50%; background: radial-gradient(circle, rgba(244,162,151,.85) 0%, rgba(244,162,151,0) 70%); animation: tt-onde var(--dur, .6s) var(--delai, 0s) ease-out both; }
.tt-p.vers-sombre { background: radial-gradient(circle, rgba(150,128,240,.7) 0%, rgba(150,128,240,0) 70%); --s: 6; }
.tt-p::after { content: ""; position: absolute; inset: 0; border-radius: 50%; opacity: .4; mix-blend-mode: overlay; background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E"); }
@keyframes tt-onde { 0% { transform: scale(0); opacity: 0; } 40% { opacity: 1; } 100% { transform: scale(var(--s, 8)); opacity: 0; } }
.nav nav .theme-toggle { margin-left: 6px; zoom: .7; }
.pied .theme-toggle { zoom: .62; }
@media (max-width: 640px) { .js-menu .nav nav .theme-toggle { margin: 22px 0 0; zoom: .85; } }
@media (prefers-reduced-motion: reduce) { .theme-toggle, .tt-pouce, .theme-toggle svg { transition: none; } .tt-p { display: none; } }
