/* Thème sombre : des gris très foncés, neutres, jamais de noir pur. Se charge après styles.css et n'agit que sous html[data-theme="dark"].
   Deux fonds alternent d'une section à l'autre. Tout ce qui est posé dessus gagne un cran de clarté. */
html[data-theme="dark"] {
  color-scheme: dark;
  --fond: #161617;      /* ouverture, méthode, services, questions, pied de page */
  --fond-2: #1d1d1f;    /* créations, expertise, engagement, contact */
  --surface: #262629;   /* cartes, scène, fenêtres */
  --relief: #303034;    /* ce qui est posé sur une surface, champs, messages reçus */
  --actif: #3d3d42;     /* sélection, survol, messages envoyés */

  --lu: #f5f5f7;          /* texte */
  --lu-2: #b0b0b6;        /* texte secondaire */
  --bord: #8a8a90;        /* contour des commandes */
  --paper: var(--fond);
  --white: var(--fond);
  --ink: var(--lu);
  --ink-2: var(--relief);
  --ink-3: var(--actif);
  --cream: var(--lu);
  --cream-2: var(--surface);
  --ember: var(--lu);
  --ember-text: var(--lu);
  --mute-light: var(--lu-2);
  --mute-dark: var(--lu-2);
  --line: rgba(255, 255, 255, .12);
  --line-ink: rgba(255, 255, 255, .12);
  --shadow-soft: none;
}

:where(html[data-theme="dark"]) ::selection { background: var(--lu); color: var(--fond); }

/* actions */
:where(html[data-theme="dark"]) .skip, :where(html[data-theme="dark"]) .btn, :where(html[data-theme="dark"]) .contact .btn, :where(html[data-theme="dark"]) .offer .offer-end .btn, :where(html[data-theme="dark"]) .send, :where(html[data-theme="dark"]) .talk-form .send { background: var(--lu); color: var(--fond); }
:where(html[data-theme="dark"]) .btn:hover, :where(html[data-theme="dark"]) .contact .btn:hover, :where(html[data-theme="dark"]) .offer .offer-end .btn:hover { background: #d2d2d7; }
:where(html[data-theme="dark"]) .more { --sous: var(--bord); }

/* ouverture */
:where(html[data-theme="dark"]) .cta-call { border-color: var(--bord); }
:where(html[data-theme="dark"]) :is(.q-area, .q-field input) { background: var(--relief); }
:where(html[data-theme="dark"]) :is(.q-area, .q-field input)[aria-invalid="true"] { border-color: var(--lu); box-shadow: 0 0 0 1px var(--lu); }
:where(html[data-theme="dark"]) :is(.q-error, .q-msg) { color: var(--lu); font-weight: 600; }
:where(html[data-theme="dark"]) .hs { --st: var(--surface); --line-st: rgba(255, 255, 255, .12); --wb: var(--relief); --cb: var(--actif); --tx: var(--lu); --mu: var(--lu-2); --lo: var(--lu-2); --hi: var(--lu); --ln: rgba(255, 255, 255, .12); --sk: var(--surface); --ac: var(--lu); --on: var(--fond); box-shadow: inset 0 0 0 1px var(--line); }
:where(html[data-theme="dark"]) .hp-right { background: var(--relief); }
:where(html[data-theme="dark"]) .h-cover { background: var(--surface); color: var(--lu); }
@media (min-width: 701px) {
  :where(html[data-theme="dark"]) .h-note { background: var(--fond); color: var(--lu); box-shadow: inset 0 0 0 1px var(--line); }
}
:where(html[data-theme="dark"]) .h-notch { background: var(--fond); }
:where(html[data-theme="dark"]) :is(.h-rail u, .h-bar i) { background: var(--actif); }
:where(html[data-theme="dark"]) .hs-cursor path { fill: var(--lu); stroke: var(--fond); }
:where(html[data-theme="dark"]) .h-switch::after { background: var(--fond); }

/* navigation */
:where(html[data-theme="dark"]) .nav { background: rgba(22, 22, 23, .8); }
:where(html[data-theme="dark"]) .nav nav a { color: var(--lu-2); }
:where(html[data-theme="dark"]) .nav nav a:hover, :where(html[data-theme="dark"]) .nav nav a.here { color: var(--lu); }

/* conversation */
:where(html[data-theme="dark"]) .dots i, :where(html[data-theme="dark"]) .say .dots i { background: var(--lu-2); }

/* formats */
:where(html[data-theme="dark"]) .tabs { background: var(--surface); }
:where(html[data-theme="dark"]) .tab-pill { background: var(--actif); box-shadow: none; }
:where(html[data-theme="dark"]) .tabs button { color: var(--lu-2); }
:where(html[data-theme="dark"]) .tabs button[aria-selected="true"] { background: var(--actif); color: var(--lu); box-shadow: none; }

/* maquettes */
:where(html[data-theme="dark"]) .win, :where(html[data-theme="dark"]) .win-os { background: var(--surface); color: var(--lu); box-shadow: inset 0 0 0 1px var(--line); }
:where(html[data-theme="dark"]) .bar, :where(html[data-theme="dark"]) .m-status { color: var(--lu-2); }
:where(html[data-theme="dark"]) .bar i, :where(html[data-theme="dark"]) .window-bar i { background: var(--actif); }
:where(html[data-theme="dark"]) .m { background: var(--relief); }
:where(html[data-theme="dark"]) .m em { background: var(--lu); color: var(--fond); }
:where(html[data-theme="dark"]) .m s { background: var(--actif); }
:where(html[data-theme="dark"]) .m-doc s { background: var(--surface); }
:where(html[data-theme="dark"]) .m-rail { background: var(--surface); }
:where(html[data-theme="dark"]) .m-rail b { background: var(--lu); }
:where(html[data-theme="dark"]) .m-rail s { background: var(--actif); }
:where(html[data-theme="dark"]) .m-cols > div, :where(html[data-theme="dark"]) .m-week { background: var(--surface); }
:where(html[data-theme="dark"]) .m-cols p, :where(html[data-theme="dark"]) .m-form label span, :where(html[data-theme="dark"]) .m-land > div span, :where(html[data-theme="dark"]) .m-doc { background: var(--actif); }
:where(html[data-theme="dark"]) .m-cols p.hot { background: var(--actif); color: var(--lu); box-shadow: inset 0 0 0 1px var(--lu); }
:where(html[data-theme="dark"]) .m-week i { background: var(--actif); }
:where(html[data-theme="dark"]) .m-week i:nth-child(6) { background: var(--actif); box-shadow: inset 0 3px 0 var(--lu); }
:where(html[data-theme="dark"]) .m-desk ul { background: var(--surface); }
:where(html[data-theme="dark"]) .m-desk li.hot { background: var(--actif); color: var(--lu); }
:where(html[data-theme="dark"]) .m-row, :where(html[data-theme="dark"]) .m-doc hr { border-color: var(--line); }
:where(html[data-theme="dark"]) .m-form label span { border-color: var(--line); }
:where(html[data-theme="dark"]) .m-doc p { color: var(--lu); }
:where(html[data-theme="dark"]) .m-land > div i { background: var(--lu); }
:where(html[data-theme="dark"]) .m-hero { background: var(--surface); }
:where(html[data-theme="dark"]) .m-arts i { background: var(--actif); }

/* méthode */
:where(html[data-theme="dark"]) .window { background: var(--surface); box-shadow: inset 0 0 0 1px var(--line); }
:where(html[data-theme="dark"]) .canvas { background: var(--fond); }
:where(html[data-theme="dark"]) .app-side { border-color: var(--bord); }
:where(html[data-theme="dark"]) .window:is([data-step="2"], [data-step="3"], [data-step="4"]) .app { background: var(--relief); color: var(--lu); }
:where(html[data-theme="dark"]) .window:is([data-step="2"], [data-step="3"], [data-step="4"]) .app-side { background: var(--surface); }
:where(html[data-theme="dark"]) .window:is([data-step="2"], [data-step="3"], [data-step="4"]) .app-side b { background: var(--lu); border-color: var(--lu); }
:where(html[data-theme="dark"]) .window:is([data-step="2"], [data-step="3"], [data-step="4"]) .app-side s { background: var(--actif); border-color: var(--actif); opacity: 1; }
:where(html[data-theme="dark"]) .window:is([data-step="2"], [data-step="3"], [data-step="4"]) .app-cta { background: var(--lu); border-color: var(--lu); color: var(--fond); }
:where(html[data-theme="dark"]) .window:is([data-step="2"], [data-step="3"], [data-step="4"]) :is(.app-cards div, .app-ai) { background: var(--actif); }
:where(html[data-theme="dark"]) .window:is([data-step="2"], [data-step="3"], [data-step="4"]) .canvas .app-chart { background: var(--surface); }
:where(html[data-theme="dark"]) .window:is([data-step="2"], [data-step="3"], [data-step="4"]) .app-chart i { background: var(--actif); border-color: var(--actif); }
:where(html[data-theme="dark"]) .window:is([data-step="2"], [data-step="3"], [data-step="4"]) .app-chart i:last-child { background: var(--actif); border-color: var(--actif); box-shadow: inset 0 3px 0 var(--lu); }
:where(html[data-theme="dark"]) .bubble.you { background: var(--relief); }
:where(html[data-theme="dark"]) .bubble.me { background: var(--actif); color: var(--lu); }
:where(html[data-theme="dark"]) .code, :where(html[data-theme="dark"]) .deploy { background: var(--fond); color: var(--lu-2); border: 1px solid var(--line); }
:where(html[data-theme="dark"]) .code span { color: var(--lu); font-weight: 600; }
:where(html[data-theme="dark"]) .deploy { color: var(--lu); }
:where(html[data-theme="dark"]) .toast { background: var(--actif); color: var(--lu); border: 1px solid var(--line); }

/* sections */
:where(html[data-theme="dark"]) .creations { background: var(--fond-2); }
:where(html[data-theme="dark"]) .expertise { background: var(--fond-2); color: var(--lu); }
:where(html[data-theme="dark"]) .services { background: var(--fond); }
:where(html[data-theme="dark"]) .why { background: var(--fond-2); }
:where(html[data-theme="dark"]) .contact { background: var(--fond-2); color: var(--lu); }

/* services */
:where(html[data-theme="dark"]) .offer, :where(html[data-theme="dark"]) .offer-dark { background: var(--surface); color: var(--lu); }
:where(html[data-theme="dark"]) .trace { background: var(--relief); }
:where(html[data-theme="dark"]) .trace li { opacity: 1; }
:where(html[data-theme="dark"]) .trace li:not(.active) :is(b, svg) { color: var(--lu-2); }
:where(html[data-theme="dark"]) .trace li.active { background: var(--actif); }
:where(html[data-theme="dark"]) .trace li.human.active { border-color: var(--bord); }

/* engagement */
.js:where([data-theme="dark"]) .statement .w { color: #77777d; }

/* contact */

@media (max-width: 900px) {
  .js:where([data-theme="dark"]) .planet { background: var(--fond-2); }
  :where(html[data-theme="dark"]) .nav nav, :where(html[data-theme="dark"]) .nav.open { background: var(--fond); }
}

/* contours : le même gris partout */
:where(html[data-theme="dark"]) :is(.q-choice span, .q-area, .q-field input) { border-color: var(--bord); }
:where(html[data-theme="dark"]) .q-choice input:checked + span { border-color: var(--hi); }
:where(html[data-theme="dark"]) :is(.contact, .expertise) { border: 0; }

/* portfolio : les tuiles gardent la couleur du projet */
:where(html[data-theme="dark"]) .t-bao .btn { background: #14160a; color: #fff; }
:where(html[data-theme="dark"]) .t-bao .more { color: #14160a; --sous: rgba(20, 22, 10, .4); }
:where(html[data-theme="dark"]) .t-sob { background: var(--surface); color: var(--lu); }
:where(html[data-theme="dark"]) .t-sob .btn { background: var(--lu); color: var(--fond); }
:where(html[data-theme="dark"]) .t-sob .t-plus { background: var(--actif); }
:where(html[data-theme="dark"]) .t-form .more { color: #161615; --sous: rgba(22, 22, 21, .4); }
:where(html[data-theme="dark"]) .t-face { background: var(--fond-2); }
:where(html[data-theme="dark"]) .t-next { background: var(--surface); }
:where(html[data-theme="dark"]) .t-info { background: var(--surface); }
:where(html[data-theme="dark"]) .t-close { background: var(--actif); }
:where(html[data-theme="dark"]) .t-sob::after { content: ""; position: absolute; inset: 0; z-index: 4; border-radius: inherit; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .12); pointer-events: none; }
:where(html[data-theme="dark"]) :is(.c-option, .c-input, .c-slot) { border-color: var(--bord); }
:where(html[data-theme="dark"]) .hs .c-error { color: var(--lu); font-weight: 600; }
:where(html[data-theme="dark"]) .flux { --card: var(--surface); --row: var(--relief); --bd: rgba(255, 255, 255, .10); --hi: var(--lu); --lo: var(--lu-2); --wire: #55555b; --ac: #f5f5f7; --ac-bg: rgba(255, 255, 255, .09); --ac-lo: #f5f5f7; }
:where(html[data-theme="dark"]) .fx-links circle { fill: var(--fond-2); }
:where(html[data-theme="dark"]) .fx-pill { background: var(--fond-2); }
:where(html[data-theme="dark"]) .fx-menu { background: var(--actif); }
:where(html[data-theme="dark"]) body .stack li { background: var(--surface); box-shadow: inset 0 0 0 1px var(--line); }
