/* Worshiplani — apparence et thèmes communs à toutes les applications (socle, 5 octobre 2026).
   Référence : specs/design.md §2 (apparence), §3.10 (thèmes) et §6.1 (bouton flottant, panneau, sélecteur).

   CE QUE CE FICHIER APPORTE
   1. Les JETONS (--wl-…) : verre dépoli, creux, textes, ombre, et la couleur du thème (--wl-accent…).
   2. Trois COMPOSANTS prêts à l'emploi : .wl-fab (bouton flottant), .wl-panel (panneau), .wl-seg (sélecteur segmenté).
   3. Les BARRES DE DÉFILEMENT « Verre » (.wl-sb…), dessinées par assets/scroll.js (design §3.9, THM-05, THM-06).
   4. L'INFOBULLE commune (.wl-tip), posée par assets/tooltip.js (design §3.11, THM-07).

   COMMENT IL SE RÈGLE (attributs posés sur <html> par assets/theme.js, avant le premier affichage)
   - data-theme = "light" | "dark"            l'APPARENCE résolue (Système / Jour / Nuit) ;
   - data-app   = "director" | "service" | "member" | "stage" | "center"   l'application, écrite dans sa page ;
   - data-skin  = "brand" | "gold" | "blue"   le THÈME, propre à chaque application : couleur de son logo (défaut), Or ou Bleu ;
                  Worshipdirector propose en plus "teal", son thème d'origine.
   Sans data-skin (l'accueil du hub), le repère est l'or.

   Les noms sont préfixés « wl- » pour ne heurter aucun jeton ni aucune classe déjà en place dans une application. */

/* ---------- 1. Jetons neutres : jour ---------- */
:root{
  --wl-glass:rgba(255,255,255,.74);            /* fond des boutons flottants et des panneaux */
  --wl-glass-edge:rgba(255,255,255,.7);        /* liseré intérieur d'1 px */
  --wl-well:rgba(15,23,42,.08);                /* creux des contrôles (palette A « Net », THM-15 ; .07 avant) */
  --wl-thumb:#ffffff;                          /* option choisie d'un sélecteur */
  --wl-thumb-shadow:0 1px 2px rgba(16,24,32,.16), 0 0 0 .5px rgba(16,24,32,.06);
  --wl-text:#0f1722;                           /* palette A « Net » (THM-15, 31 octobre 2026 ; #16202a et #5b6773 avant) */
  --wl-text-soft:#475467;
  --wl-solid:#16202a; --wl-on-solid:#ffffff;   /* bouton plein */
  --wl-ui:#ffffff;                             /* fond de repli, sans flou */
  --wl-float-shadow:0 2px 6px rgba(16,24,32,.10), 0 24px 60px -12px rgba(16,24,32,.38);
  /* Couleur du thème — par défaut l'or (accueil du hub, thème « Or »). */
  --wl-accent:#c79a4b;                         /* repères : icônes, cercle, filet, option active, focus */
  --wl-accent-ink:#7e5b1d;                     /* texte à la couleur du thème sur fond neutre et sur sa teinte (≥ 4,5 ; #8a6420 avant l'audit UX, A3) */
  --wl-accent-on:#3d2a0c;                      /* texte sur une teinte légère du thème */
  --wl-on-accent:#1b1a16;                      /* texte sur un fond plein à la couleur du thème */
  /* Titres : Montserrat Medium partout (design §4, décisions du 5 et du 14 octobre 2026). Échelle commune, de la page à l'encart. */
  --wl-f-title:"Montserrat","Open Sans","Segoe UI",Arial,sans-serif;
  /* Police d'interface (THM-08, 23 octobre 2026) : le seul endroit où elle se règle. Chaque pile l'appelle par
     var(--wl-f-ui, "Open Sans") puis garde ses polices de secours : le secours sert tant que le service worker rend un theme.css
     d'avant ce jeton (cache d'abord), sinon toute la déclaration tomberait. Les paroles de Worshipdirector ont leur propre réglage
     (--wd-lyr-font) et ne suivent pas ce jeton. */
  --wl-f-ui:"Open Sans";
  --wl-t-page:20px;                            /* titre d'une page ou d'une fiche dans le contenu */
  --wl-t-sheet:18px;                           /* titre d'une feuille, d'un panneau, d'une boîte de dialogue */
  --wl-t-zone:16px;                            /* titre d'une zone (section) */
  --wl-t-box:14px;                             /* titre d'un encart (carte, groupe) */
  /* Mouvement commun (design §8, option A « montée-fondu », décision du 14 octobre 2026). */
  --wl-ease-in:cubic-bezier(.2,.8,.2,1);      /* entrée : part vite, se pose doucement */
  --wl-ease-out:cubic-bezier(.4,0,1,1);       /* sortie : part doucement, file */
  --wl-dur-fast:.12s; --wl-dur:.2s; --wl-dur-slow:.32s;
  --wl-rise:8px;                               /* montée du contenu qui arrive */
  --wl-stagger:30ms;                           /* écart de la cascade */
  --wl-swap-out:.12s;                          /* changement d'onglet : fondu de l'ancien écran (26 octobre 2026) */
  --wl-swap-wait:.12s;                         /* … et attente avant l'entrée du nouveau */
  /* Densité (GAB-15, 16 octobre 2026) : au doigt, cibles de 44 px et graisses pleines ; à la souris sur ordinateur, voir plus bas. */
  --wl-tap:44px;                               /* hauteur d'un bouton, d'un champ, côté d'un bouton rond */
  --wl-fs-max:16px;                            /* plafond du texte d'interface (14,5 à 16 px) */
  --wl-w6:600; --wl-w7:700;                    /* demi-gras et gras d'Open Sans (police variable 300–800) */
}
/* ---------- 1 ter. Densité ordinateur (GAB-15, décisions du 16 octobre 2026, cran 2 le même jour) ----------
   Souris et écran d'au moins 1 024 px : boutons de 32 px (loi de Fitts à la souris ; WCAG 2.5.8 demande 24 px), texte
   d'interface plafonné à 13,5 px, demi-gras et gras allégés, titres de deux crans plus petits. Tablette et téléphone ne changent pas. */
@media (pointer:fine) and (min-width:1024px){
  :root{ --wl-tap:32px; --wl-fs-max:13.5px; --wl-w6:540; --wl-w7:640;
    --wl-t-page:17px; --wl-t-sheet:16px; --wl-t-zone:14px; }
}
/* ---------- 1 bis. Jetons neutres : nuit ---------- */
[data-theme="dark"]{
  --wl-glass:rgba(30,37,46,.72);
  --wl-glass-edge:rgba(255,255,255,.09);
  --wl-well:rgba(255,255,255,.07);
  --wl-thumb:rgba(255,255,255,.16);
  --wl-thumb-shadow:0 1px 2px rgba(0,0,0,.4);
  --wl-text:#cdd4dd;   /* adouci la nuit (THM-09, 29 octobre 2026 ; #eef2f6 avant) */
  --wl-text-soft:#a3aebb;
  --wl-solid:#eef2f6; --wl-on-solid:#131a21;
  --wl-ui:#1a2028;
  --wl-float-shadow:0 2px 6px rgba(0,0,0,.36), 0 16px 40px -14px rgba(0,0,0,.6);   /* plus courte (17 octobre 2026) : la grande ombre dessinait un rectangle sombre sous la pilule */
  --wl-accent:#d6ad62; --wl-accent-ink:#e2c585; --wl-accent-on:#f3dfb4; --wl-on-accent:#1b1a16;
}

/* ---------- 1 quater. Worshiplani next (design §6.5, NXT-01 ; lot 0 du 19 octobre 2026) ----------
   Jetons du dessin de Worshiplani next, seul dessin depuis le 21 octobre 2026 : sans préfixe depuis l'étape 3 du retrait de l'ancien
   dessin (une page dont theme.js manque garde ses couleurs). Valeurs de la planche « Écrans épurés Worshiplani »
   (https://claude.ai/artifact/VhdihZ4qWx2QuUjohNjPfs). */
:root{
  /* Jour : palette A « Net » (THM-15, décision de l'utilisateur du 31 octobre 2026 : fond un cran plus gris, cartes cernées,
     encres plus foncées, texte discret à 4,6 : 1 ; avant : #f4f5f7, creux .06, filet .085, cerne .05, #16202a, #5b6773, #8b95a1). */
  --wl-nx-bg:#e6eaf0;                          /* fond calme de l'écran */
  --wl-nx-surface:#ffffff;                     /* liste groupée, carte, feuille */
  --wl-nx-well:rgba(15,23,42,.09);             /* champ, badge, creux */
  --wl-nx-line:rgba(15,23,42,.12);             /* filet entre deux lignes */
  --wl-nx-ring:rgba(15,23,42,.10);             /* cerne d'1 px des surfaces */
  --wl-nx-lift:0 1px 2px rgba(15,23,42,.08), 0 8px 20px -14px rgba(15,23,42,.30);   /* ombre douce des listes groupées */
  --wl-nx-ink:#0f1722; --wl-nx-soft:#475467; --wl-nx-faint:#5e6876;   /* audit de design C1, 9 novembre 2026 : 4,7 : 1 sur le fond et un creux (#6b7686 avant, 3,8) */
  --wl-nx-glass:rgba(255,255,255,.78);         /* pilule */
  --wl-nx-float:0 2px 6px rgba(16,24,32,.08), 0 16px 36px -14px rgba(16,24,32,.35);
  --wl-nx-ok:#2a7046; --wl-nx-ok-bg:#e3f2e8; --wl-nx-warn:#8a5a10; --wl-nx-warn-bg:#fbefd6; --wl-nx-danger:#c0392b; --wl-nx-danger-ink:#a33025; --wl-nx-scrim:rgba(16,24,32,.35);
  --wl-nx-hero:#236a9e; --wl-nx-hero-2:#12395b;   /* carte « Ton prochain service » de l'accueil (§3.7) */
  --wl-nx-t-screen:26px; --wl-nx-t-card:21px;     /* titre d'écran, titre de carte en aplat (§4) ; 34 et 27 dès 701 px */
  --wl-nx-row:58px;                            /* hauteur d'une ligne de liste groupée */
  --wl-nx-r-field:calc(14px * var(--wl-rs, 1)); --wl-nx-r-group:calc(20px * var(--wl-rs, 1)); --wl-nx-r-card:calc(24px * var(--wl-rs, 1));
  --wl-nx-badge-h:18px; --wl-nx-badge-fs:11px; /* métadonnées en petits badges (§4) */
}
:root[data-theme="dark"]{
  --wl-nx-lift:0 0 transparent;               /* la nuit, pas d'ombre sous les listes */
  --wl-nx-bg:#0f1318; --wl-nx-surface:#181d24; --wl-nx-well:rgba(255,255,255,.065); --wl-nx-line:rgba(255,255,255,.075); --wl-nx-ring:rgba(255,255,255,.04);
  --wl-nx-ink:#cdd4dd; --wl-nx-soft:#a3aebb;   /* encre adoucie la nuit (THM-09, #eef2f6 avant) */
  --wl-nx-faint:#858f9c;                      /* audit UX A2, 3 novembre 2026 : 5,2 : 1 sur le fond (#6f7a87 avant, 3,9) */
  --wl-nx-glass:rgba(27,33,41,.84); --wl-nx-float:0 2px 6px rgba(0,0,0,.4), 0 16px 36px -14px rgba(0,0,0,.7);
  --wl-nx-ok:#8cc19f; --wl-nx-ok-bg:rgba(80,180,120,.15); --wl-nx-warn:#dbb874; --wl-nx-warn-bg:rgba(240,180,60,.13); --wl-nx-danger:#e2857d; --wl-nx-danger-ink:#e5918a; --wl-nx-scrim:rgba(0,0,0,.55);
  --wl-nx-hero:#1b4f7c; --wl-nx-hero-2:#0a1a29;
}
@media (min-width:701px){ :root{ --wl-nx-t-screen:34px; --wl-nx-t-card:27px; } }
/* Cran 3 (21 octobre 2026, demande de l'utilisateur : textes un peu gros, border-radius trop gros) : texte d'interface 13 px,
   titres d'un cran de moins, grands titres 28/23 px, coins à 65 % (--wl-rs multiplie chaque rayon de 6 px et plus). */
@media (pointer:fine) and (min-width:1024px){
  :root{ --wl-fs-max:13px; --wl-rs:.65; --wl-t-page:16px; --wl-t-sheet:15px; --wl-t-zone:13px; --wl-t-box:13px; --wl-nx-t-screen:28px; --wl-nx-t-card:23px; }
}

/* ---------- 2. Thèmes (design §3.10) : Or, Bleu, couleur du logo ---------- */
/* Or (valeurs de Worshipdirector, design §3.8). */
[data-skin="gold"]{ --wl-accent:#c79a4b; --wl-accent-ink:#7e5b1d; --wl-accent-on:#3d2a0c; --wl-on-accent:#1b1a16; }
[data-skin="gold"][data-theme="dark"]{ --wl-accent:#d6ad62; --wl-accent-ink:#e2c585; --wl-accent-on:#f3dfb4; --wl-on-accent:#1b1a16; }
/* Bleu (valeurs de Worshipdirector, design §3.8). */
[data-skin="blue"]{ --wl-accent:#3d7ed6; --wl-accent-ink:#2b5fa8; --wl-accent-on:#10305e; --wl-on-accent:#ffffff; }
[data-skin="blue"][data-theme="dark"]{ --wl-accent:#7fb0f0; --wl-accent-ink:#a9c9f5; --wl-accent-on:#dce9fb; --wl-on-accent:#0f1c2e; }
/* Teal : thème d'origine de Worshipdirector, gardé en plus des trois (décision du 5 octobre 2026). */
[data-skin="teal"]{ --wl-accent:#2e8f8f; --wl-accent-ink:#1f6b6b; --wl-accent-on:#0f3b3b; --wl-on-accent:#ffffff; }
[data-skin="teal"][data-theme="dark"]{ --wl-accent:#3fc1a8; --wl-accent-ink:#6fd3be; --wl-accent-on:#c9f0e7; --wl-on-accent:#06201f; }
/* Couleur du logo de l'application (design §3.7) : le jour, repère = la teinte claire du logo et texte = sa teinte foncée
   (foncée encore pour Worshipservice, Worshipmember et Hubcenter : ≥ 4,5 sur leur teinte, audit UX A3, 3 novembre 2026) ;
   la nuit, repère = la teinte du mot et texte = une teinte plus claire. */
[data-skin="brand"][data-app="director"]{ --wl-accent:#ad5c71; --wl-accent-ink:#934761; --wl-accent-on:#4a1f2e; --wl-on-accent:#ffffff; }
[data-skin="brand"][data-app="director"][data-theme="dark"]{ --wl-accent:#ba6379; --wl-accent-ink:#e3a3b3; --wl-accent-on:#f6dbe2; --wl-on-accent:#1d0d12; }
[data-skin="brand"][data-app="service"]{ --wl-accent:#5c90c1; --wl-accent-ink:#3a628e; --wl-accent-on:#15304c; --wl-on-accent:#0d1a28; }
[data-skin="brand"][data-app="service"][data-theme="dark"]{ --wl-accent:#729eca; --wl-accent-ink:#9abfdf; --wl-accent-on:#dcebf7; --wl-on-accent:#0d1a28; }
[data-skin="brand"][data-app="member"]{ --wl-accent:#b28c34; --wl-accent-ink:#785b1f; --wl-accent-on:#3a2a08; --wl-on-accent:#1b1a16; }
[data-skin="brand"][data-app="member"][data-theme="dark"]{ --wl-accent:#d3b569; --wl-accent-ink:#e7d298; --wl-accent-on:#f5e9c6; --wl-on-accent:#1b1a16; }
[data-skin="brand"][data-app="stage"]{ --wl-accent:#7a5ea8; --wl-accent-ink:#5c4683; --wl-accent-on:#2a1d45; --wl-on-accent:#ffffff; }
[data-skin="brand"][data-app="stage"][data-theme="dark"]{ --wl-accent:#b3a0d6; --wl-accent-ink:#cfc1e8; --wl-accent-on:#ece5f7; --wl-on-accent:#1a1229; }
[data-skin="brand"][data-app="center"]{ --wl-accent:#8a93a3; --wl-accent-ink:#545c6a; --wl-accent-on:#262c36; --wl-on-accent:#161b22; }
[data-skin="brand"][data-app="center"][data-theme="dark"]{ --wl-accent:#c2cbd6; --wl-accent-ink:#dfe5ec; --wl-accent-on:#f1f4f7; --wl-on-accent:#161b22; }

/* Changement d'apparence ou de thème : fondu court des couleurs (classe posée 300 ms par assets/theme.js). */
.wl-theme-fade, .wl-theme-fade *{ transition:background-color .25s ease, color .25s ease, box-shadow .25s ease, border-color .25s ease, fill .25s ease !important; }
@media (prefers-reduced-motion:reduce){ .wl-theme-fade, .wl-theme-fade *{ transition:none !important; } }

/* ---------- 3. Bouton flottant ---------- */
/* Rangée fixe en bas à droite ; plusieurs boutons s'y rangent côte à côte. */
.wl-fabs{ position:fixed; z-index:20; display:flex; gap:10px;
  right:max(16px, env(safe-area-inset-right, 0px)); bottom:calc(16px + env(safe-area-inset-bottom, 0px));
  transition:transform .18s ease, opacity .18s ease; }
.wl-fab{ display:inline-flex; align-items:center; gap:9px; min-height:50px; padding:0 20px 0 16px; margin:0;
  border:0; border-radius:999px; cursor:pointer; color:var(--wl-text);
  font:var(--wl-w6, 600) min(15px, var(--wl-fs-max, 15px))/1.4 var(--wl-f-ui, "Open Sans"),"Segoe UI",Calibri,Arial,sans-serif; letter-spacing:.005em;
  background:var(--wl-glass); -webkit-backdrop-filter:blur(18px) saturate(1.5); backdrop-filter:blur(18px) saturate(1.5);
  box-shadow:inset 0 0 0 1px var(--wl-glass-edge), 0 0 0 1px color-mix(in srgb, var(--wl-accent) 55%, transparent), var(--wl-float-shadow);
  -webkit-tap-highlight-color:transparent; touch-action:manipulation; -webkit-user-select:none; user-select:none;
  transition:transform .18s ease, opacity .18s ease; }
.wl-fab svg{ width:20px; height:20px; flex:none; color:var(--wl-accent); fill:none; stroke:currentColor; }
.wl-fab:active{ transform:scale(.97); }
.wl-fab:focus-visible{ outline:2px solid var(--wl-accent); outline-offset:3px;
  box-shadow:inset 0 0 0 1px var(--wl-glass-edge), 0 0 0 1px var(--wl-accent), var(--wl-float-shadow); }
/* Écran étroit : le bouton se réduit à son icône (pastille ronde de 50 px), son nom reste lu par les lecteurs d'écran. */
@media (max-width:480px){
  .wl-fab.wl-fab-compact{ width:50px; padding:0; justify-content:center; }
  .wl-fab.wl-fab-compact .wl-fab-label{ position:absolute; width:1px; height:1px; overflow:hidden; clip:rect(0 0 0 0); white-space:nowrap; }
}

/* ---------- 4. Panneau ---------- */
.wl-panel{ position:fixed; z-index:21; display:flex; flex-direction:column; overflow:hidden; margin:0;
  right:max(16px, env(safe-area-inset-right, 0px)); bottom:calc(78px + env(safe-area-inset-bottom, 0px));
  width:min(390px, calc(100vw - 32px)); max-height:min(680px, calc(100dvh - 110px));
  border-radius:calc(22px * var(--wl-rs, 1)); color:var(--wl-text); font:400 min(15px, var(--wl-fs-max, 15px))/1.4 var(--wl-f-ui, "Open Sans"),"Segoe UI",Calibri,Arial,sans-serif;
  background:var(--wl-glass); -webkit-backdrop-filter:blur(26px) saturate(1.6); backdrop-filter:blur(26px) saturate(1.6);
  box-shadow:inset 0 0 0 1px var(--wl-glass-edge), var(--wl-float-shadow);
  /* Fermé : invisible, hors de l'ordre de tabulation et des lecteurs d'écran (visibility), légèrement abaissé. */
  opacity:0; visibility:hidden; pointer-events:none; transform:translateY(14px) scale(.985); transform-origin:100% 100%;
  transition:opacity .2s ease, transform .24s cubic-bezier(.2,.8,.2,1), visibility 0s linear .24s; }
.wl-panel.is-open{ opacity:1; visibility:visible; pointer-events:auto; transform:none;
  transition:opacity .2s ease, transform .24s cubic-bezier(.2,.8,.2,1), visibility 0s; }
/* Filet à la couleur du thème, en haut. */
.wl-panel::before{ content:""; position:absolute; left:22px; right:22px; top:0; height:1px; opacity:.9; pointer-events:none;
  background:linear-gradient(90deg, transparent, var(--wl-accent), transparent); }
.wl-panel-grip{ display:none; }
.wl-panel-head{ display:flex; align-items:center; justify-content:space-between; gap:12px; padding:16px 14px 6px 22px; }
/* Titre : Montserrat Medium, la police du logo (design §4, décision du 5 octobre 2026). */
.wl-panel-title{ margin:0; font:500 var(--wl-t-sheet)/1.3 var(--wl-f-title); letter-spacing:-.02em; color:var(--wl-text); }
/* Croix « Fermer » (GAB-39, 10 novembre 2026, option C « Pastille ») : le dessin de `.wlu-x` du gabarit React, pour l'accueil et l'Aide. */
.wl-panel-close{ position:relative; flex:none; width:32px; height:32px; padding:0; border:0; border-radius:50%; cursor:pointer;
  display:inline-flex; align-items:center; justify-content:center; color:var(--wl-nx-soft); background:var(--wl-nx-well);
  -webkit-tap-highlight-color:transparent; touch-action:manipulation; transition:background-color .15s ease, color .15s ease, transform .12s ease; }
.wl-panel-close::after{ content:""; position:absolute; inset:min(0px, calc(50% - var(--wl-tap, 44px) / 2)); }
.wl-panel-close svg{ width:16px; height:16px; fill:none; stroke:currentColor; stroke-width:2.3; stroke-linecap:round; pointer-events:none; }
.wl-panel-close:active{ transform:scale(.92); }
.wl-panel-close:focus-visible{ outline:2px solid var(--wl-accent); outline-offset:2px; }
@media (hover:hover){ .wl-panel-close:hover{ background:color-mix(in srgb, var(--wl-nx-ink) 14%, transparent); color:var(--wl-nx-ink); } }
@media (prefers-reduced-motion:reduce){ .wl-panel-close{ transition:none; } .wl-panel-close:active{ transform:none; } }
.wl-panel-body{ padding:4px 22px 18px; overflow-y:auto; overscroll-behavior:contain; scrollbar-width:thin; }
.wl-grp{ padding:14px 0 16px; }
.wl-grp + .wl-grp{ border-top:1px solid color-mix(in srgb, var(--wl-text) 10%, transparent); }
.wl-grp-title{ margin:0 0 8px; font:500 var(--wl-t-box)/1.4 var(--wl-f-title); letter-spacing:-.01em; color:var(--wl-text-soft); }
/* Titres communs (design §4, décision du 14 octobre 2026) : page 20, feuille 18, zone 16, encart 14 ; Montserrat Medium, jamais en capitales forcées. */
.wl-h-page, .wl-h-sheet, .wl-h-zone, .wl-h-box{ margin:0; font-family:var(--wl-f-title); font-weight:500; text-transform:none; color:var(--wl-text); }
.wl-h-page{ font-size:var(--wl-t-page); line-height:1.25; letter-spacing:-.02em; }
.wl-h-sheet{ font-size:var(--wl-t-sheet); line-height:1.3; letter-spacing:-.02em; }
.wl-h-zone{ font-size:var(--wl-t-zone); line-height:1.3; letter-spacing:-.01em; }
.wl-h-box{ font-size:var(--wl-t-box); line-height:1.35; letter-spacing:-.01em; }
.wl-hint{ margin:8px 2px 0; font-size:12.5px; line-height:1.45; color:var(--wl-text-soft); }
.wl-panel-label{ margin:12px 2px 6px; font:500 var(--wl-t-box, 14px)/1.35 var(--wl-f-title); letter-spacing:-.01em; color:var(--wl-text-soft); }
/* Téléphone (≤ 700 px) : feuille du bas, avec sa poignée ; les boutons flottants s'effacent tant qu'elle est ouverte. */
@media (max-width:700px){
  .wl-panel{ left:8px; right:8px; bottom:calc(8px + env(safe-area-inset-bottom, 0px)); width:auto; max-height:74dvh;
    border-radius:calc(24px * var(--wl-rs, 1)); transform:translateY(28px); transform-origin:50% 100%; }
  .wl-panel-grip{ display:block; flex:none; width:38px; height:4px; margin:8px auto 0; border-radius:2px;
    background:color-mix(in srgb, var(--wl-text-soft) 35%, transparent); }
  .wl-panel-head{ padding-top:8px; }
  .wl-fabs.is-away{ opacity:0; transform:translateY(8px); pointer-events:none; }
}
/* Repli sans flou : fond opaque. */
@supports not ((backdrop-filter:blur(1px)) or (-webkit-backdrop-filter:blur(1px))){
  .wl-fab, .wl-panel{ background:var(--wl-ui); }
}

/* ---------- 5. Sélecteur segmenté ---------- */
.wl-seg{ display:grid; grid-auto-flow:column; grid-auto-columns:1fr; gap:2px; padding:3px; border-radius:calc(13px * var(--wl-rs, 1)); background:var(--wl-well); }
.wl-seg button{ display:inline-flex; align-items:center; justify-content:center; gap:7px; min-width:0; height:38px; padding:0 8px; margin:0;
  border:0; border-radius:calc(10px * var(--wl-rs, 1)); cursor:pointer; background:transparent; color:var(--wl-text-soft);
  font:var(--wl-w6, 600) 14px/1 var(--wl-f-ui, "Open Sans"),"Segoe UI",Calibri,Arial,sans-serif; white-space:nowrap;
  -webkit-tap-highlight-color:transparent; touch-action:manipulation; position:relative;
  transition:background-color .16s ease, color .16s ease, box-shadow .16s ease; }
.wl-seg button::after{ content:""; position:absolute; left:0; right:0; top:-3px; bottom:-3px; }   /* zone tactile de 44 px de haut */
@media (pointer:fine) and (min-width:1024px){ .wl-seg button{ height:26px; font-size:13px; } }   /* densité ordinateur (GAB-15) : 32 px avec le creux (GAB-44) */
.wl-seg button svg{ width:18px; height:18px; flex:none; fill:none; stroke:currentColor; }   /* 18 px et trait constant de 1,6 px (GAB-67, 23 novembre 2026 ; 16 px avant) */
.wl-seg button svg :is(path, rect, line, polyline, polygon, ellipse, circle:not([fill="currentColor"])){ vector-effect:non-scaling-stroke; stroke-width:var(--wl-icon-stroke, 1.6px); }
.wl-seg button:is([aria-pressed="true"], [aria-selected="true"]){ background:var(--wl-thumb); color:var(--wl-text); box-shadow:var(--wl-thumb-shadow); }
.wl-seg button:is([aria-pressed="true"], [aria-selected="true"]) svg{ color:var(--wl-accent); }   /* onglet choisi comme bouton choisi (audit UX A2) */
.wl-seg button:focus-visible{ outline:2px solid var(--wl-accent); outline-offset:2px; }
@media (hover:hover){ .wl-seg button:not([aria-pressed="true"], [aria-selected="true"]):hover{ color:var(--wl-text); } }
/* Pastille de couleur d'une option de thème (sélecteur « Thème » des applications). */
.wl-swatch{ flex:none; width:12px; height:12px; border-radius:50%; background:var(--wl-swatch, var(--wl-accent));
  box-shadow:inset 0 0 0 1px color-mix(in srgb, var(--wl-text) 18%, transparent); }

/* Curseur glissant (GAB-09, PAR-21 ; 10 octobre 2026) : posé par SegThumb (applications React) ou par theme.js (data-wl-glide).
   Sans :has(), la pastille fixe de l'option choisie reste sous le curseur : rien ne manque. */
.seg-thumb{ position:absolute; left:0; top:0; z-index:0; pointer-events:none; }
.seg-thumb[data-ready]{ transition:transform .3s cubic-bezier(.3,.9,.3,1), width .3s cubic-bezier(.3,.9,.3,1), height .3s cubic-bezier(.3,.9,.3,1), opacity .16s ease; }
.wl-seg:has(> .seg-thumb){ position:relative; }
.wl-seg:has(> .seg-thumb) > button{ z-index:1; transition:color .2s ease; }
.wl-seg:has(> .seg-thumb) > button:is([aria-pressed="true"], [aria-selected="true"]){ background:transparent; box-shadow:none; }
.wl-seg > .seg-thumb{ border-radius:calc(10px * var(--wl-rs, 1)); background:var(--wl-thumb); box-shadow:var(--wl-thumb-shadow); }
@media (prefers-reduced-motion:reduce){
  .wl-fabs, .wl-fab, .wl-panel, .wl-panel.is-open, .wl-seg button, .seg-thumb[data-ready]{ transition:none; }
}
.wl-fabs[hidden], .wl-panel[hidden]{ display:none !important; }
@media print{ .wl-fabs, .wl-panel{ display:none !important; } }

/* ---------- 6. Barres de défilement « Verre » (design §3.9, THM-05, THM-06 ; dessinées par assets/scroll.js) ---------- */
/* scroll.js pose html.wl-sb-on : la barre du système disparaît partout. Sans le script, elle reste. */
html.wl-sb-on, html.wl-sb-on *{ scrollbar-width:none; }
html.wl-sb-on ::-webkit-scrollbar{ display:none; width:0; height:0; }
:root{ --wl-sb-reflet:rgba(255,255,255,.85); }
[data-theme="dark"]{ --wl-sb-reflet:rgba(255,255,255,.24); }
/* Calque au-dessus de la page ; le cadre de chaque barre = la partie visible de sa zone. */
.wl-sb-layer{ position:fixed; inset:0; z-index:2147483000; pointer-events:none; }
.wl-sb-frame{ position:absolute; overflow:hidden; pointer-events:none; }
.wl-sb-page{ top:calc(env(safe-area-inset-top, 0px) + var(--wl-scroll-top, 0px)); bottom:calc(env(safe-area-inset-bottom, 0px) + var(--wl-scroll-bottom, 0px));
  left:env(safe-area-inset-left, 0px); right:env(safe-area-inset-right, 0px); }
/* Barre : poignée de 5 px à 4 px du bord ; en butant, jusqu'à moitié moins longue et 7,5 px d'épaisseur (--sq de 0 à 0,9). */
.wl-sb{ --w:5px; --grow:2.5px; --shrink:.5; position:absolute; opacity:0; transition:opacity .35s ease; }
.wl-sb-y{ width:9px; } .wl-sb-x{ height:9px; }
/* Curseur rapide (zone d'au moins cinq hauteurs d'écran) : 12 × 44 px, à 6 px du bord, deux traits de prise. */
.wl-sb.is-scrub{ --w:12px; --grow:3px; --shrink:.32; width:22px; }
.wl-sb.is-awake{ opacity:1; }
.wl-sb.is-none{ display:none; }
.wl-sb-thumb{ --sq:0; position:absolute; left:0; top:0; }
.wl-sb-y .wl-sb-thumb{ width:100%; } .wl-sb-x .wl-sb-thumb{ height:100%; }
.wl-sb-thumb::before{ content:""; position:absolute; inset:-4px -8px; }
.wl-sb-x .wl-sb-thumb::before{ inset:-8px -4px; }
.wl-sb.is-scrub .wl-sb-thumb::before{ inset:-4px -3px -4px -26px; }
.wl-sb.is-awake .wl-sb-thumb{ pointer-events:auto; cursor:grab; touch-action:none; }
/* Poignée éveillée sur son propre calque (8 novembre 2026, planche « Défilement plus léger », piste B) : déplacée à chaque image, elle
   n'est plus repeinte (≈ 155 → 40 ms de peinture pour 3 s de défilement, téléphone, processeur ×4). Pas pendant qu'on tire le curseur
   rapide : sa bulle de texte reste dessinée comme avant. Même dessin (captures identiques à l'octet). */
.wl-sb.is-awake .wl-sb-thumb:not(.is-dragging){ will-change:transform; }
/* Piste C, à l'essai (9 novembre 2026) : avec data-wl-scroll-timeline sur <html>, scroll.js pose .is-run sur la barre verticale de la
   page et le navigateur place lui-même la poignée sur sa course (--wl-sb-room), d'après le défilement de la page. Sinon, rien. */
@keyframes wl-sb-run-y{ from{ transform:translateY(0); } to{ transform:translateY(var(--wl-sb-room, 0px)); } }
.wl-sb-page .wl-sb-y.is-run .wl-sb-thumb{ animation:wl-sb-run-y linear both; animation-duration:auto; animation-timeline:scroll(root block); }
.wl-sb-thumb.is-dragging{ cursor:grabbing; }
/* Le verre : teinte du thème, cercle intérieur d'1 px, reflet d'1 px. Repli sans color-mix (Safari < 16,2) : verre cerclé. */
.wl-sb-glass{ --tint-a:34%; --tint-b:22%; --ring:60%; position:absolute; box-sizing:border-box; border-radius:999px;
  display:grid; place-items:center; color:var(--wl-accent-ink);
  background:var(--wl-glass); box-shadow:inset 0 0 0 1px var(--wl-accent);
  background:
    linear-gradient(90deg, transparent 1px, var(--wl-sb-reflet) 1px 2px, transparent 2px),
    linear-gradient(color-mix(in srgb, var(--wl-accent) var(--tint-a), transparent), color-mix(in srgb, var(--wl-accent) var(--tint-b), transparent)),
    var(--wl-glass);
  box-shadow:inset 0 0 0 1px color-mix(in srgb, var(--wl-accent) var(--ring), transparent), 0 1px 3px rgba(16,24,32,.18);
  -webkit-backdrop-filter:blur(8px) saturate(1.5); backdrop-filter:blur(8px) saturate(1.5); }
.wl-sb.is-near .wl-sb-glass, .wl-sb-thumb.is-dragging .wl-sb-glass{ --tint-a:55%; --tint-b:40%; --ring:90%; }
.wl-sb-y .wl-sb-glass{ top:0; left:50%; transform:translateX(-50%);
  width:calc(var(--w) + var(--grow) * var(--sq)); height:calc(100% * (1 - var(--shrink) * var(--sq))); }
.wl-sb-y .wl-sb-thumb[data-edge="end"] .wl-sb-glass{ top:auto; bottom:0; }
.wl-sb-x .wl-sb-glass{ left:0; top:50%; transform:translateY(-50%);
  height:calc(var(--w) + var(--grow) * var(--sq)); width:calc(100% * (1 - var(--shrink) * var(--sq)));
  background:
    linear-gradient(180deg, transparent 1px, var(--wl-sb-reflet) 1px 2px, transparent 2px),
    linear-gradient(90deg, color-mix(in srgb, var(--wl-accent) var(--tint-a), transparent), color-mix(in srgb, var(--wl-accent) var(--tint-b), transparent)),
    var(--wl-glass); }
.wl-sb-x .wl-sb-thumb[data-edge="end"] .wl-sb-glass{ left:auto; right:0; }
.wl-sb-y.is-scrub .wl-sb-glass{ left:auto; right:3px; transform:none; }
.wl-sb-grip{ display:none; box-sizing:border-box; width:6px; height:5px; border-block:1.5px solid currentColor; opacity:.7; }
.wl-sb.is-scrub .wl-sb-grip{ display:block; }
/* Aplatissement : suit la poussée, puis reprend sa forme avec un petit rebond (0,45 s). */
.wl-sb-thumb.is-following .wl-sb-glass{ transition:height .08s linear, width .08s linear; }
.wl-sb-thumb.is-springing .wl-sb-glass{ transition:height .45s cubic-bezier(.34,1.56,.64,1), width .45s cubic-bezier(.34,1.56,.64,1); }
/* Bulle du curseur rapide, pendant le glisser : repère (data-wl-scroll-label) du premier élément visible. */
.wl-sb-label{ position:absolute; right:calc(100% + 12px); top:50%; transform:translate(6px,-50%); white-space:nowrap; pointer-events:none; opacity:0;
  padding:7px 12px; border-radius:calc(12px * var(--wl-rs, 1)); font:500 13.5px/1.2 "Montserrat","Open Sans",-apple-system,"Segoe UI",sans-serif; letter-spacing:-.01em;
  font-variant-numeric:tabular-nums; color:var(--wl-text); background:var(--wl-ui);
  box-shadow:0 0 0 1px color-mix(in srgb, var(--wl-accent) 50%, transparent), var(--wl-float-shadow); transition:opacity .15s ease, transform .15s ease; }
.wl-sb.has-label .wl-sb-thumb.is-dragging .wl-sb-label{ opacity:1; transform:translate(0,-50%); }
@media (prefers-reduced-motion:reduce){ .wl-sb, .wl-sb-glass, .wl-sb-label{ transition:none !important; } }
html[data-wl-scroll="none"] .wl-sb-layer{ display:none; }
@media print{ .wl-sb-layer{ display:none !important; } }

/* ---------- 7. Travail en cours (design §6.1, « Travail en cours », 12 octobre 2026) ---------- */
/* Roue de 16 px à l'encre du bouton, comme .wlu-spin du gabarit React : posée dans un bouton qui attend la base ou le réseau
   (aria-busy="true"). Le bouton reste à pleine couleur pendant l'attente. */
.wl-spin{ display:inline-block; flex:none; width:16px; height:16px; margin-right:8px; vertical-align:-3px; border-radius:50%;
  border:2px solid currentColor; border-right-color:transparent; animation:wlSpin .8s linear infinite; }
button[aria-busy="true"]{ cursor:progress; }
button[aria-busy="true"]:disabled{ opacity:1; }
@keyframes wlSpin{ to{ transform:rotate(360deg); } }
@media (prefers-reduced-motion:reduce){ .wl-spin{ animation:none; border-right-color:currentColor; opacity:.6; } }

/* ---------- 8. Liste déroulante des pages natives (design §6.1, GAB-11, 13 octobre 2026) ---------- */
/* Le champ fermé des applications React (<Select /> de @worshiplani/ui) : chevron seul, gris ardoise, anneau au thème.
   Ouverte, la liste reste celle du système (les pages natives n'ont pas la feuille du gabarit). Classe à poser sur le <select>. */
select.wl-select{ -webkit-appearance:none; appearance:none; padding-right:42px; cursor:pointer; text-overflow:ellipsis;
  background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%235b6773' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat:no-repeat; background-position:right 13px center; background-size:18px 18px; }
[data-theme="dark"] select.wl-select{
  background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23a3aebb' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E"); }
select.wl-select:focus-visible{ outline:none; border-color:var(--wl-accent); box-shadow:0 0 0 3px color-mix(in srgb, var(--wl-accent) 16%, transparent); }
select.wl-select:disabled{ background-color:transparent; border-style:dashed; opacity:1; cursor:default; }

/* ---------- 9. Infobulle (design §3.11, THM-07, 15 octobre 2026 ; posée par assets/tooltip.js) ---------- */
/* Verre en encre inversée : ardoise le jour, gris clair la nuit ; filet or d'1 px en bas, le même quel que soit le thème. */
:root{
  --wl-tip-bg:rgba(31,42,51,.86); --wl-tip-ink:#ffffff; --wl-tip-soft:rgba(255,255,255,.72);
  --wl-tip-edge:rgba(255,255,255,.14); --wl-tip-filet:#d6ad62;
  --wl-tip-shadow:0 2px 6px rgba(16,24,32,.18), 0 18px 40px -12px rgba(16,24,32,.5);
}
[data-theme="dark"]{
  --wl-tip-bg:rgba(231,236,243,.9); --wl-tip-ink:#1f2a33; --wl-tip-soft:rgba(31,42,51,.7);
  --wl-tip-edge:rgba(255,255,255,.6); --wl-tip-filet:#b5883a;
  --wl-tip-shadow:0 2px 6px rgba(0,0,0,.4), 0 22px 50px -12px rgba(0,0,0,.85);
}
.wl-tip{ position:fixed; z-index:9000; box-sizing:border-box; max-width:min(260px, calc(100vw - 16px)); padding:8px 12px 9px; margin:0;
  border:1px solid var(--wl-tip-edge); border-radius:calc(10px * var(--wl-rs, 1)); background:var(--wl-tip-bg); color:var(--wl-tip-ink); box-shadow:var(--wl-tip-shadow);
  -webkit-backdrop-filter:blur(14px) saturate(1.4); backdrop-filter:blur(14px) saturate(1.4);
  font:var(--wl-w6, 600) 13px/1.35 var(--wl-f-ui, "Open Sans"),"Segoe UI",Arial,sans-serif; text-align:center; white-space:normal; overflow-wrap:break-word; pointer-events:none; }
.wl-tip::before{ content:""; position:absolute; left:14px; right:14px; bottom:0; height:1px; background:var(--wl-tip-filet); opacity:.7; }
.wl-tip::after{ content:""; position:absolute; left:var(--wl-tip-arrow, 50%); bottom:-6px; z-index:-1; width:10px; height:10px; margin-left:-5px;
  background:var(--wl-tip-bg); border-right:1px solid var(--wl-tip-edge); border-bottom:1px solid var(--wl-tip-edge); border-radius:2px; transform:rotate(45deg); }
.wl-tip.is-below::after{ bottom:auto; top:-6px; transform:rotate(225deg); }
.wl-tip small{ display:block; margin-top:2px; font-size:12px; font-weight:400; color:var(--wl-tip-soft); }
.wl-tip[hidden]{ display:none; }
@media (prefers-reduced-motion:no-preference){
  .wl-tip.is-in{ animation:wl-tip-in .14s var(--wl-ease-in, ease) both; }
  @keyframes wl-tip-in{ from{ opacity:0; translate:0 4px; } }
  .wl-tip.is-below.is-in{ animation-name:wl-tip-in-below; }
  @keyframes wl-tip-in-below{ from{ opacity:0; translate:0 -4px; } }
}
@media print{ .wl-tip{ display:none !important; } }
