/* FameFrames - application.
   Identite reprise de la landing : metal liquide. Fond nuit graphite, metal
   violet (ombre violette, lumiere lavande, filet blanc), bouton principal en
   chrome. Geist partout : titres serres en 600, interface en 400-500 ; Geist
   Mono pour les chiffres et libelles techniques. L'espace de travail reste sobre.
   Couleurs de statut distinctes de l'accent, toujours doublees d'une icone. */

:root {
  --bg:#07060b; --surface:#0f0e17; --surface-2:#171523; --surface-3:#201d2f;
  --line:rgba(233,230,255,.13); --line-2:rgba(233,230,255,.26);
  --bord-champ:rgba(233,230,255,.46);   /* bord des champs : 3:1 contre le fond, on voit ou taper */
  /* Contraste AAA (7:1) sur tous les fonds, y compris une carte selectionnee
     (accent-soft sur surface-3). La hierarchie dim / faint passe par la
     taille et la graisse, plus par un gris trop sombre pour etre lu. */
  --fg:#f5f3ff; --dim:#cfcce0; --faint:#c5c3d2;
  --accent:#d4c2ff; --accent-soft:rgba(205,184,255,.12);
  --grad:linear-gradient(100deg,#7a5cff 0%,#b7a2ff 34%,#f1ecff 50%,#9a7dff 66%,#5b3bf0 100%);
  /* Chrome : argent a reflet horizontal net, pour y poser du texte fonce en AAA. */
  --grad-clair:linear-gradient(180deg,#ffffff 0%,#eeebf8 42%,#c9c3dd 58%,#f5f3fb 100%);
  --grad-texte:var(--grad);          /* mots en degrade dans les titres */
  --st-plan:#a4c7ff; --st-cours:#62d3f2; --st-ok:#53dd9c; --st-warn:#f6c055; --st-err:#ffb1b1; --st-off:#c5c3d3;
  /* Six teintes tirees du degrade du logo. Elles ne disent pas un etat (c'est
     le role des couleurs de statut) : elles donnent une identite a un domaine
     — le montage, les textes, les paroles — pour qu'on le reconnaisse avant
     de lire son titre. Chacune tient 7:1 sur les quatre fonds. */
  --h-bleu:#8cb8ff; --h-cyan:#62d3f2; --h-menthe:#53dd9c;
  --h-violet:#c9b3ff; --h-rose:#f2a6e8; --h-ambre:#f6c055;
  /* Teinte du bloc courant : chaque module, chaque etape redefinit la sienne. */
  --teinte:var(--accent);
  /* Bouton principal : la ou l'artiste doit cliquer, ca ne peut pas etre gris. */
  --btn-fond:var(--grad-clair); --btn-texte:#0d0a22;
  --btn-lueur:rgba(110,80,255,.32);  /* son halo, et la lumiere qui suit le curseur */
  /* Titres : la meme grotesque que l'interface, serree et plus grasse. Le nom
     --serif est garde (il est partout dans les pages). */
  --serif:"Geist", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --brand:var(--serif);
  --sans:"Geist", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --mono:"Geist Mono", ui-monospace, Consolas, monospace;
  --rayon:12px;
  /* Ce qui ne peut pas s'ecrire avec les tokens ci-dessus. */
  --haut-fond:rgba(8,8,13,.86);      /* barre du haut, translucide */
  --principal-survol:#fff;           /* bouton principal survole : il eclaircit */
  --sur-plein:#0a0a12;               /* texte pose SUR une couleur de statut pleine */
  /* Trois halos derriere la page. Sur fond sombre ils EClaircissent : tres
     legers, sinon le texte pose dessus perdrait ses 7:1 (verifie les trois
     empiles au maximum). */
  --voile-1:color-mix(in srgb, var(--h-violet) 6%, transparent);
  --voile-2:color-mix(in srgb, var(--h-cyan) 5%, transparent);
  --voile-3:color-mix(in srgb, var(--h-rose) 4%, transparent);
  --ombre:rgba(0,0,0,.45); --ombre-forte:rgba(0,0,0,.6);
  --alerte-plein:var(--st-warn); --alerte-plein-texte:var(--sur-plein);
  /* Matiere metal. Biseau : un reflet net en haut, une ombre en bas, comme une
     plaque usinee. Bord metal : chrome et violet qui tournent autour du bloc
     (pose en border-box sous une bordure transparente). Matiere : la lumiere
     du haut qui glisse sur la surface. */
  --biseau:inset 0 1px 0 rgba(255,255,255,.075), inset 0 -1px 0 rgba(0,0,0,.4);
  --bord-metal:linear-gradient(150deg, rgba(255,255,255,.26), rgba(150,120,255,.3) 28%, rgba(255,255,255,.05) 60%, rgba(150,120,255,.22));
  --matiere:linear-gradient(180deg, rgba(255,255,255,.035), rgba(255,255,255,0) 120px);
  /* Rubans de metal violet de la landing, figes en image, sous la page (leur
     luminance est plafonnee a la fabrication : les reflets blancs y sont
     lavande). Le voile garde le texte pose sur la page a 7:1 : au pire, le
     plus pale (--faint) sur le reflet le plus clair du bord droit fait 7,2:1. */
  --fond-metal:url("/assets/img/fond-metal.webp");
  --voile-metal:linear-gradient(90deg, rgba(7,6,11,.92) 0%, rgba(7,6,11,.82) 50%, rgba(7,6,11,.68) 100%);
  /* Ecran vide : le metal se montre davantage, sous un voile sombre. */
  --vide-fond:linear-gradient(180deg, rgba(7,6,11,.5), rgba(7,6,11,.88) 75%), var(--fond-metal) 70% 35% / cover;
  --gravure:inset 0 1px 3px rgba(0,0,0,.45);   /* champs et pistes creuses dans la matiere */
  /* Pieces de metal : boutons, badges, etiquettes. Acier brosse = un haut, un
     bas, et une ligne de reflet a mi-hauteur ; au survol il se teinte de
     violet. Ce qui est choisi passe en metal violet (texte blanc, 7:1 sous les
     lettres). Relief : un filet clair dessus, une ombre dessous. */
  --acier-haut:#2c2839; --acier-bas:#14121b;
  --relief:inset 0 1px 0 rgba(255,255,255,.13), inset 0 -1px 0 rgba(0,0,0,.45), 0 1px 3px rgba(0,0,0,.35);
  --acier:linear-gradient(180deg, var(--acier-haut) 0%, color-mix(in srgb, var(--acier-haut) 55%, var(--acier-bas)) 47%,
                          var(--acier-bas) 53%, color-mix(in srgb, var(--acier-haut) 70%, var(--acier-bas)) 100%);
  --acier-survol:linear-gradient(180deg, color-mix(in srgb, var(--accent) 18%, var(--acier-haut)) 0%,
                                 color-mix(in srgb, var(--accent) 10%, var(--acier-haut)) 47%,
                                 color-mix(in srgb, var(--accent) 8%, var(--acier-bas)) 53%,
                                 color-mix(in srgb, var(--accent) 14%, var(--acier-haut)) 100%);
  --metal-violet:linear-gradient(180deg, #7d64f5 0%, #5434e0 40%, #3b1db8 54%, #5a3be6 100%);
  --bord-violet:linear-gradient(150deg, #efe9ff, #8f74ff 35%, #3d1fb8 70%, #c3b2ff);
  --relief-violet:inset 0 1px 0 rgba(255,255,255,.3), 0 2px 10px rgba(90,60,230,.35);
  color-scheme:dark;
}

/* Theme clair. Memes tokens, memes regles : seules les valeurs changent, donc
   tout l'ecran suit. Contraste verifie a 7:1 (AAA) sur les quatre fonds, y
   compris une carte selectionnee. Les cadres video et la timeline restent
   sombres dans les deux themes : une image se juge sur du noir.
   Papier froid, a peine bleute : la marque est froide (bleu, violet, rose),
   un fond chaud la faisait jurer. Le violet reste l'accent, les cartes sont
   blanches et posees par une ombre froide ; l'encre est presque noire. */
:root[data-theme="clair"] {
  --bg:#f1f2f6; --surface:#ffffff; --surface-2:#f7f8fb; --surface-3:#ebedf3;
  --line:rgba(22,26,56,.11); --line-2:rgba(22,26,56,.22);
  --bord-champ:rgba(22,26,56,.42);
  --fg:#11121b; --dim:#363849; --faint:#3b3d4f;
  --accent:#3a1fae; --accent-soft:rgba(58,31,174,.09);
  /* Le degrade de marque ne change pas : il porte du texte fonce, ici comme la. */
  --st-plan:#0f3a84; --st-cours:#06414f; --st-ok:#07472b; --st-warn:#573900; --st-err:#7c1111; --st-off:#413d57;
  --h-bleu:#0f3a84; --h-cyan:#06414f; --h-menthe:#07472b;
  --h-violet:#3d1fa4; --h-rose:#730f63; --h-ambre:#573900;
  /* Sur fond clair, l'argent ne ferait pas un bouton : metal violet fonce. */
  --btn-fond:linear-gradient(180deg,#6d4cf2 0%,#4a26d0 45%,#2f1597 58%,#5a37e0 100%); --btn-texte:#ffffff;
  --btn-lueur:rgba(70,40,200,.28);
  --grad-texte:linear-gradient(100deg,#2c3aad 0%,#5522a8 50%,#7a1b80 100%);
  --haut-fond:rgba(250,251,253,.86);
  --principal-survol:#000;
  --sur-plein:#ffffff;
  /* Sur fond clair, les memes halos sont des pastels PLUS CLAIRS que la page :
     la couleur monte, la luminosite aussi, donc le contraste ne peut que
     s'ameliorer par rapport au fond nu. */
  --voile-1:color-mix(in srgb, var(--h-violet) 7%, #f7f8fb);
  --voile-2:color-mix(in srgb, var(--h-cyan) 5%, #f7f8fb);
  --voile-3:color-mix(in srgb, var(--h-rose) 4%, #f7f8fb);
  --ombre:rgba(24,28,64,.08); --ombre-forte:rgba(24,28,64,.16);
  /* Metal clair : argent poli, le violet en filet. Les memes rubans, en argent
     et lavande sur le papier ; leur luminance a un plancher (fabrication) et le
     voile les eclaircit encore : le texte le plus pale garde 7:1. */
  --biseau:inset 0 1px 0 rgba(255,255,255,.95), inset 0 -1px 0 rgba(22,26,56,.07);
  --bord-metal:linear-gradient(150deg, rgba(255,255,255,.95), rgba(90,60,220,.3) 28%, rgba(22,26,56,.14) 60%, rgba(90,60,220,.22));
  --matiere:linear-gradient(180deg, rgba(255,255,255,.7), rgba(255,255,255,0) 120px);
  --fond-metal:url("/assets/img/fond-metal-clair.webp");
  --voile-metal:linear-gradient(90deg, rgba(241,242,246,.7) 0%, rgba(241,242,246,.45) 55%, rgba(241,242,246,.3) 100%);
  --vide-fond:linear-gradient(180deg, rgba(241,242,246,.35), rgba(241,242,246,.85) 75%), var(--fond-metal) 70% 35% / cover;
  --gravure:inset 0 1px 2px rgba(22,26,56,.12);
  --acier-haut:#ffffff; --acier-bas:#e6e8f0;
  --relief:inset 0 1px 0 #fff, inset 0 -1px 0 rgba(22,26,56,.1), 0 1px 3px rgba(22,26,56,.1);
  /* Pastille pleine d'alerte : un ambre vif et un chiffre fonce. L'ambre
     assombri des textes (7:1 sur blanc) faisait une pastille brune. */
  --alerte-plein:#f0b13c; --alerte-plein-texte:#1a1204;
  color-scheme:light;
}
* { box-sizing:border-box; }
html { background:var(--bg); }
body { margin:0; color:var(--fg); font:400 14.5px/1.55 var(--sans);
       -webkit-font-smoothing:antialiased; min-height:100vh; }
/* Grain de pellicule, sur toute la page, les deux themes. Un bruit colore
   etire sur l'ecran (grain doux, pas du sable), a 2,5 % : on le sent plus
   qu'on ne le voit, et le texte garde son contraste. */
body::before { content:""; position:fixed; inset:0; z-index:9999; pointer-events:none; opacity:.025;
               background-image:url("data:image/svg+xml,%3Csvg viewBox='0 0 180 180' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Cpath filter='url(%23n)' opacity='.8' d='M0 0h180v180H0z'/%3E%3C/svg%3E"); }
@media print { body::before { display:none; } }
/* Fond de page : les rubans de metal voiles, sur trois halos. En sombre les
   rubans (opaques) remplacent les halos ; en clair il n'y a pas de rubans et
   les halos restent. Un calque fixe a part : un fond "fixed" sur la page la
   ferait redessiner a chaque defilement. */
body::after { content:""; position:fixed; inset:0; z-index:-1; pointer-events:none;
              background:var(--voile-metal), var(--fond-metal) 100% 0 / cover no-repeat,
                         radial-gradient(1200px 560px at 6% -12%, var(--voile-1), transparent 66%),
                         radial-gradient(1000px 520px at 96% -6%, var(--voile-2), transparent 64%),
                         radial-gradient(900px 600px at 80% 108%, var(--voile-3), transparent 62%); }
@media print { body::after { display:none; } }
a { color:var(--accent); text-underline-offset:3px; }
button, input, select, textarea { font:inherit; color:inherit; }
:focus-visible { outline:2px solid var(--accent); outline-offset:2px; border-radius:6px; }
::selection { background:rgba(122,92,255,.45); }
/* Barres de defilement fines, au metal violet. */
* { scrollbar-width:thin; scrollbar-color:color-mix(in srgb, var(--accent) 38%, transparent) transparent; }
[hidden] { display:none !important; }
h1, h2, h3, h4 { margin:0; font-weight:600; letter-spacing:-.005em; text-wrap:balance; }
/* Titre de bloc sous le titre de page : un h2 pour la structure, la taille d'un h3. */
h2.titre-bloc { font-size:1.17em; }
/* Le contenu recoit le focus a chaque page (lecteurs d'ecran) : pas d'anneau sur un conteneur. */
#page:focus { outline:none; }
/* tap-delay : pas d'attente du double-tap sur les commandes. */
a, button, label, summary, select, [role="button"] { touch-action:manipulation; -webkit-tap-highlight-color:transparent; }
/* readable-font-size : sous 16 px, iOS zoome sur le champ touche. */
@media (max-width:760px) {
  input:not([type="range"]):not([type="checkbox"]):not([type="radio"]):not([type="color"]), select, textarea { font-size:16px; }
}
p { margin:0 0 10px; }
code, .mono { font-family:var(--mono); font-size:max(12px, .9em); }
small { font-size:max(12px, .85em); }   /* jamais sous 12 px, meme dans un texte deja petit */
kbd { font:500 12px/1 var(--mono); background:var(--surface-2); border:1px solid var(--line-2);
      border-bottom-width:2px; border-radius:5px; padding:2px 5px; color:var(--fg); }
.dim { color:var(--dim); }
.faint { color:var(--faint); }
.petit { font-size:12.5px; }
.degrade { background:var(--grad-texte); -webkit-background-clip:text; background-clip:text; color:transparent; }
.saut { position:absolute; left:-999px; top:8px; background:var(--fg); color:var(--bg); padding:8px 12px; border-radius:8px; z-index:100; }
.saut:focus { left:8px; }
.sr { position:absolute; width:1px; height:1px; overflow:hidden; clip:rect(0 0 0 0); white-space:nowrap; }

/* ------------------------------------------------------------ haut */
.haut { position:sticky; top:0; z-index:30; display:flex; align-items:center; gap:18px;
        height:58px; padding:0 20px; background:var(--matiere), var(--haut-fond);
        -webkit-backdrop-filter:blur(16px) saturate(150%); backdrop-filter:blur(16px) saturate(150%);
        border-bottom:1px solid var(--line); box-shadow:var(--biseau); }
/* Un fil de metal sous l'en-tete : violet, deux reflets presque blancs. Fixe :
   une boucle sans fin distrairait de tout le reste (WCAG 2.2.2). */
.haut::after { content:""; position:absolute; left:0; right:0; bottom:-1px; height:1.5px; opacity:.85;
               background:linear-gradient(90deg, #5b3bf0, #9a7dff 18%, #f1ecff 26%, #7a5cff 40%, #5b3bf0 55%, #b7a2ff 72%, #f1ecff 80%, #7a5cff 92%, #5b3bf0); }
.marque { display:flex; align-items:center; gap:9px; color:var(--fg); text-decoration:none;
          font:600 19px/1 var(--brand); letter-spacing:-.035em; }
.marque-icone { width:26px; height:26px; }
.nav { display:flex; gap:4px; margin-left:18px; }
.nav a { display:flex; align-items:center; gap:7px; padding:8px 12px; border-radius:9px;
         color:var(--dim); text-decoration:none; font-weight:500; }
.nav a svg { width:17px; height:17px; fill:none; stroke:currentColor; stroke-width:1.7;
             stroke-linecap:round; stroke-linejoin:round; }
.nav a:hover { color:var(--fg); background:var(--surface-2); }
/* Page courante : une pastille de metal violet, eclairee par le haut. */
.nav a[aria-current="page"] { color:var(--fg);
  background:linear-gradient(180deg, color-mix(in srgb, var(--accent) 26%, var(--surface)), color-mix(in srgb, var(--accent) 9%, var(--surface)));
  box-shadow:inset 0 1px 0 rgba(255,255,255,.14), inset 0 0 0 1px color-mix(in srgb, var(--accent) 42%, transparent),
             0 4px 16px color-mix(in srgb, var(--accent) 18%, transparent); }
.haut-fin { margin-left:auto; display:flex; align-items:center; gap:8px; }
/* Largeurs moyennes : l'en-tete (marque, menu, boutons : ~910 px) debordait
   et donnait un ascenseur horizontal a toute la page. Le menu passe en
   icones (le nom reste lu par les lecteurs d'ecran) et la pastille des rendus
   garde son anneau. Sous 761 px, le menu est en bas de l'ecran. */
@media (min-width:761px) and (max-width:1160px) {
  .rendus-texte { display:none; }
  .rendus-bouton { padding:0 5px; }
}
@media (min-width:761px) and (max-width:1000px) {
  .nav { margin-left:6px; }
  .nav a { padding:8px 10px; }
  .nav a span { position:absolute; width:1px; height:1px; overflow:hidden; clip:rect(0 0 0 0); white-space:nowrap; }
}
.icone-bouton { position:relative; display:inline-grid; place-items:center; width:36px; height:36px;
                border:1px solid transparent; border-radius:10px; background:var(--acier) padding-box, var(--bord-metal) border-box;
                color:var(--fg); cursor:pointer; box-shadow:var(--relief); transition:background .15s, transform .15s; }
.icone-bouton:hover { background:var(--acier-survol) padding-box, var(--bord-violet) border-box; }
.icone-bouton:active { transform:scale(.95); }
.icone-bouton svg { width:17px; height:17px; fill:none; stroke:currentColor; stroke-width:1.8;
                    stroke-linecap:round; stroke-linejoin:round; }
.badge-cloche { position:absolute; top:-7px; right:-8px; min-width:19px; height:19px; padding:0 5px;
                border-radius:99px; color:var(--alerte-plein-texte); font:700 11.5px/19px var(--sans); text-align:center;
                background:linear-gradient(180deg, color-mix(in srgb, var(--alerte-plein) 55%, #fff), var(--alerte-plein) 55%,
                                           color-mix(in srgb, var(--alerte-plein) 82%, #000));
                box-shadow:inset 0 1px 0 rgba(255,255,255,.55), 0 1px 3px rgba(0,0,0,.45); }
/* L'offre : une plaque de metal violet. */
.offre-pastille { font:600 12px/1 var(--sans); padding:7px 11px; border-radius:99px; text-decoration:none; white-space:nowrap;
                  color:#fff; border:1px solid transparent; box-shadow:var(--relief-violet);
                  background:var(--metal-violet) padding-box, var(--bord-violet) border-box; transition:filter .15s; }
.offre-pastille:hover { filter:brightness(1.12); }
/* Langue et theme : deux bascules, un clic chacune. Le bouton montre ce qu'on
   obtient en cliquant, pas ce qu'on a deja. */
.bascule-haut { display:grid; place-items:center; min-width:36px; min-height:32px; padding:6px 9px;
                border:1px solid transparent; border-radius:99px; color:var(--fg); box-shadow:var(--relief);
                background:var(--acier) padding-box, var(--bord-metal) border-box;
                font:600 12px/1 var(--sans); cursor:pointer; transition:background .15s; }
.bascule-haut:hover { background:var(--acier-survol) padding-box, var(--bord-violet) border-box; }
.bascule-haut:focus-visible { outline:2px solid var(--accent); outline-offset:1px; }
.bascule-haut svg { width:16px; height:16px; fill:none; stroke:currentColor; stroke-width:1.8;
                    stroke-linecap:round; stroke-linejoin:round; }
/* Dans le sombre on propose la lumiere, et l'inverse. */
.bascule-haut .lune { display:none; }
:root[data-theme="clair"] .bascule-haut .soleil { display:none; }
:root[data-theme="clair"] .bascule-haut .lune { display:block; }
/* Fuseau horaire : recherche par pays ou ville */
.champ-fuseau { position:relative; display:grid; gap:6px; }
.champ-fuseau input { width:100%; }
.fuseau-liste { position:absolute; z-index:30; top:calc(100% + 4px); left:0; right:0; max-height:300px; overflow:auto; overscroll-behavior:contain; margin:0; padding:4px;
                list-style:none; border:1px solid var(--line-2); border-radius:12px; background:var(--surface-2); box-shadow:0 18px 40px var(--ombre); }
.fuseau-liste li { display:grid; grid-template-columns:minmax(0,1fr) auto; gap:2px 10px; padding:8px 10px; border-radius:8px; cursor:pointer; }
.fuseau-liste li b { color:var(--fg); font-weight:600; }
.fuseau-liste li small { grid-column:1; color:var(--dim); font-size:12.5px; }
.fuseau-liste li .fuseau-heure { grid-row:1 / span 2; grid-column:2; align-self:center; font:500 12px var(--mono); color:var(--dim); }
.fuseau-liste li[aria-selected="true"], .fuseau-liste li:hover { background:var(--surface-3); }
.fuseau-liste .fuseau-vide { display:block; cursor:default; color:var(--dim); }
.fuseau-appareil { justify-self:start; }
.bandeau-simulation { padding:7px 20px; font-size:12.5px; color:var(--dim); text-align:center;
                      background:repeating-linear-gradient(135deg, rgba(246,192,85,.06) 0 12px, transparent 12px 24px);
                      border-bottom:1px solid var(--line); }
.bandeau-simulation b { color:var(--st-warn); font-weight:600; }

main { max-width:1180px; margin:0 auto; padding:28px 20px 120px; outline:none; }

/* ------------------------------------------------------ elements */
/* Boutons. Tous : une lumiere suit le curseur au survol (--mx, --my poses par
   core.js), le bouton s'enfonce au clic et une onde part du doigt (.onde-clic).
   Les boutons importants (principal, marque) sont en chrome : un reflet les
   traverse de temps en temps, meme sans y toucher. Animations reduites : rien
   ne bouge seul. */
.bouton { position:relative; isolation:isolate; overflow:hidden;
          display:inline-flex; align-items:center; justify-content:center; gap:8px; min-height:38px;
          padding:8px 15px; border-radius:10px; border:1px solid transparent;
          background:var(--acier) padding-box, var(--bord-metal) border-box; box-shadow:var(--relief);
          color:var(--fg); font-weight:500; font-size:14px; cursor:pointer; text-decoration:none;
          white-space:nowrap; transition:background .13s, border-color .13s, box-shadow .2s, transform .2s cubic-bezier(.2,.8,.2,1); }
.bouton::after { content:""; position:absolute; inset:0; z-index:-1; border-radius:inherit; opacity:0; pointer-events:none;
                 background:radial-gradient(70px circle at var(--mx, 50%) var(--my, 50%), color-mix(in srgb, var(--accent) 28%, transparent), transparent 70%);
                 transition:opacity .2s; }
.bouton:hover:not(:disabled) { background:var(--acier-survol) padding-box, var(--bord-violet) border-box; color:var(--fg); }
.bouton:hover:not(:disabled)::after { opacity:1; }
.bouton:active:not(:disabled) { transform:scale(.97); transition-duration:.08s; }
.bouton:disabled, .bouton[aria-disabled="true"] { opacity:.45; cursor:not-allowed; }
.bouton.principal, .bouton.marque-bouton { background:var(--btn-fond); color:var(--btn-texte); border-color:transparent; font-weight:600;
                    box-shadow:inset 0 1px 0 rgba(255,255,255,.7), inset 0 -1px 0 rgba(40,20,120,.35), 0 6px 20px var(--btn-lueur); }
.bouton.principal::before, .bouton.marque-bouton::before {
  content:""; position:absolute; inset:0; z-index:-1; pointer-events:none;
  background:linear-gradient(105deg, transparent 38%, rgba(255,255,255,.9) 50%, rgba(170,150,255,.5) 54%, transparent 64%);
  transform:translateX(-130%); animation:reflet-bouton 6s cubic-bezier(.5,0,.3,1) infinite; }
.bouton.principal::after, .bouton.marque-bouton::after {
  background:radial-gradient(80px circle at var(--mx, 50%) var(--my, 50%), var(--btn-lueur), transparent 70%); }
.bouton.principal:hover:not(:disabled), .bouton.marque-bouton:hover:not(:disabled) {
  background:var(--btn-fond); color:var(--btn-texte); border-color:transparent; transform:translateY(-1px);
  box-shadow:inset 0 1px 0 rgba(255,255,255,.7), inset 0 -1px 0 rgba(40,20,120,.35), 0 0 0 3px color-mix(in srgb, var(--accent) 22%, transparent), 0 10px 30px var(--btn-lueur); }
.bouton.principal:active:not(:disabled), .bouton.marque-bouton:active:not(:disabled) { transform:scale(.97); }
.bouton:disabled::before, .bouton[aria-disabled="true"]::before { display:none; }   /* rien ne brille sur un bouton inactif */
@keyframes reflet-bouton { 0%, 64% { transform:translateX(-130%); } 82%, 100% { transform:translateX(130%); } }
.onde-clic { position:absolute; z-index:-1; width:14px; height:14px; margin:-7px 0 0 -7px; border-radius:50%; pointer-events:none;
        background:radial-gradient(circle, color-mix(in srgb, var(--accent) 55%, transparent), transparent 70%);
        animation:onde-clic .55s cubic-bezier(.2,.7,.3,1) forwards; }
.bouton.principal .onde-clic, .bouton.marque-bouton .onde-clic, .action-forte .onde-clic { background:radial-gradient(circle, rgba(110,80,255,.55), transparent 70%); }
@keyframes onde-clic { from { transform:scale(0); opacity:1; } to { transform:scale(16); opacity:0; } }
@media (prefers-reduced-motion: reduce) {
  .bouton.principal::before, .bouton.marque-bouton::before { animation:none; }
  .bouton:active:not(:disabled), .bouton.principal:hover:not(:disabled), .bouton.marque-bouton:hover:not(:disabled) { transform:none; }
  .onde-clic { display:none; }
}
.bouton.danger { color:#fff;
  background:linear-gradient(180deg, #b23d4c 0%, #922838 47%, #781d2b 53%, #982e3e 100%) padding-box,
             linear-gradient(150deg, #ffb8c1, #8e2733 50%, #5c1520) border-box; }
.bouton.danger:hover:not(:disabled) { color:#fff;
  background:linear-gradient(180deg, #c44a59 0%, #a5303f 47%, #8a2433 53%, #ab3646 100%) padding-box,
             linear-gradient(150deg, #ffc9d0, #a8303d 50%, #6a1825) border-box; }
.bouton.fantome { background:transparent; border-color:transparent; color:var(--dim); box-shadow:none; }
.bouton.fantome:hover:not(:disabled) { color:var(--fg); background:var(--acier) padding-box, var(--bord-metal) border-box; box-shadow:var(--relief); }
.bouton.petit { min-height:30px; padding:5px 10px; font-size:13px; border-radius:8px; }
.bouton.grand { min-height:48px; padding:12px 22px; font-size:15.5px; border-radius:12px; }
.bouton .cle { font:500 12px/1 var(--mono); border:1px solid currentColor; border-radius:4px; padding:2px 4px; }

label { display:grid; gap:5px; font-size:13px; color:var(--dim); }
input[type=text], input[type=email], input[type=password], input[type=date], input[type=time], input[type=number],
input[type=search], input[type=url], select, textarea {
  width:100%; min-height:38px; padding:8px 11px; border-radius:9px; border:1px solid var(--bord-champ);
  background:var(--surface); color:var(--fg); font-size:14px; box-shadow:var(--gravure);
  transition:border-color .15s, box-shadow .2s; }
textarea { min-height:84px; resize:vertical; line-height:1.5; }
input:focus, select:focus, textarea:focus { outline:none; border-color:var(--accent);
  box-shadow:var(--gravure), 0 0 0 3px var(--accent-soft), 0 0 22px color-mix(in srgb, var(--accent) 22%, transparent); }
::placeholder { color:var(--faint); opacity:1; }
input[type=checkbox], input[type=radio] { accent-color:var(--accent); width:16px; height:16px; }
/* Curseurs : une piste gravee, un bouton chrome cercle de violet. */
input[type=range] { -webkit-appearance:none; appearance:none; height:22px; margin:0; background:transparent; cursor:pointer; }
input[type=range]::-webkit-slider-runnable-track { height:6px; border-radius:6px; box-shadow:var(--gravure);
  background:linear-gradient(90deg, color-mix(in srgb, var(--accent) 34%, var(--surface-3)), var(--surface-3)); }
input[type=range]::-moz-range-track { height:6px; border-radius:6px; box-shadow:var(--gravure); background:var(--surface-3); }
input[type=range]::-moz-range-progress { height:6px; border-radius:6px; background:linear-gradient(90deg, #4b2ad6, #a58cff); }
input[type=range]::-webkit-slider-thumb { -webkit-appearance:none; width:16px; height:16px; margin-top:-5px; border:0; border-radius:50%;
  background:radial-gradient(circle at 35% 30%, #ffffff, #e2ddf2 42%, #8d86a8 100%);
  box-shadow:0 0 0 3px color-mix(in srgb, var(--accent) 38%, transparent), 0 2px 6px rgba(0,0,0,.5);
  transition:transform .15s, box-shadow .15s; }
input[type=range]::-moz-range-thumb { width:16px; height:16px; border:0; border-radius:50%;
  background:radial-gradient(circle at 35% 30%, #ffffff, #e2ddf2 42%, #8d86a8 100%);
  box-shadow:0 0 0 3px color-mix(in srgb, var(--accent) 38%, transparent), 0 2px 6px rgba(0,0,0,.5); }
input[type=range]:hover::-webkit-slider-thumb { box-shadow:0 0 0 5px color-mix(in srgb, var(--accent) 34%, transparent), 0 2px 8px rgba(0,0,0,.5); }
input[type=range]:active::-webkit-slider-thumb { transform:scale(1.15); }
input[type=range]:focus-visible { outline:2px solid var(--accent); outline-offset:3px; border-radius:6px; }
input[type=range]:focus { box-shadow:none; }
input[type=range]:disabled { opacity:.45; cursor:not-allowed; }
input[type=color] { width:38px; height:28px; padding:0; border:0; background:transparent; cursor:pointer; }
.coche { display:flex; align-items:center; gap:9px; color:var(--fg); font-size:14px; cursor:pointer; }
.coche small { color:var(--dim); }
.champs { display:grid; gap:14px; }
.champs.deux { grid-template-columns:repeat(2, minmax(0,1fr)); }
.aide { font-size:12.5px; color:var(--faint); }
.bouton-info { width:24px; height:24px; padding:0; flex:none; border-radius:50%; border:1px solid transparent; box-shadow:var(--relief);
        background:var(--acier) padding-box, var(--bord-metal) border-box; color:var(--dim); font:600 12px/1 var(--sans); cursor:pointer; }
.bouton-info:hover, .bouton-info[aria-expanded="true"] { color:var(--fg); background:var(--acier-survol) padding-box, var(--bord-violet) border-box; }
.bulle { flex-basis:100%; display:block; padding:10px 12px; border-radius:9px; background:var(--surface-2);
         border:1px solid var(--line-2); color:var(--dim); font-size:13px; line-height:1.5; }
.compteur { margin-left:8px; font:500 12px var(--mono); color:var(--faint); text-align:right; }
.compteur.trop { color:var(--st-err); }

.carte { background:linear-gradient(180deg, color-mix(in srgb, var(--teinte) 6%, transparent), transparent 110px) padding-box,
                    var(--matiere) padding-box, linear-gradient(var(--surface), var(--surface)) padding-box,
                    var(--bord-metal) border-box;
         border:1px solid transparent; border-radius:var(--rayon); padding:18px 20px;
         box-shadow:var(--biseau), 0 2px 8px var(--ombre); }
.carte h2, .carte h3 { margin-bottom:10px; }
.carte + .carte { margin-top:14px; }
.pile { display:grid; gap:14px; }
.ligne { display:flex; align-items:center; gap:10px; flex-wrap:wrap; }
.ligne.entre { justify-content:space-between; }
.espace { flex:1; }
.grille { display:grid; gap:14px; }
.grille.deux { grid-template-columns:repeat(2, minmax(0,1fr)); }

.entete-page { display:flex; align-items:flex-end; gap:16px; flex-wrap:wrap; margin-bottom:22px; }
.entete-page h1 { font:600 clamp(28px, 3.4vw, 42px)/1.05 var(--serif); letter-spacing:-.04em; }
.entete-page h1 em { font-style:normal; background:var(--grad-texte); -webkit-background-clip:text;
                     background-clip:text; color:transparent; }
.entete-page .sous { color:var(--dim); margin-top:6px; }
.fil { font:500 12px/1.4 var(--mono); color:var(--faint); letter-spacing:.04em; margin-bottom:8px; }
.fil a { color:var(--faint); text-decoration:none; display:inline-block; padding:5px 0; }
.fil a:hover { color:var(--accent); }
.titre-section { font:500 12.5px/1.4 var(--mono); letter-spacing:.09em; text-transform:uppercase;
                 color:var(--faint); margin:26px 0 10px; display:flex; align-items:center; gap:10px; }
.titre-section::before { content:""; flex:none; width:16px; height:3px; border-radius:2px; background:var(--grad); }
.titre-section::after { content:""; flex:1; height:1px;
                        background:linear-gradient(90deg, var(--line-2), transparent); }

.onglets { display:flex; gap:2px; border-bottom:1px solid var(--line); margin:-4px 0 22px; overflow-x:auto; }
.onglets a, .onglets button { padding:10px 14px; color:var(--dim); text-decoration:none; background:none;
                              border:0; border-bottom:2px solid transparent; font-weight:500; cursor:pointer; white-space:nowrap; }
.onglets a:hover, .onglets button:hover { color:var(--fg); }
.onglets [aria-current="page"], .onglets [aria-selected="true"] { color:var(--accent); border-bottom-width:2.5px;
  border-image:var(--grad) 1; }
.onglets .nb { font:600 12px var(--sans); color:var(--faint); margin-left:5px; font-variant-numeric:tabular-nums; }

/* ------------------------------------------------------ statuts */
/* Statut : l'icone porte la couleur, le mot reste neutre. Pas de capsule :
   une rangee de pilules colorees faisait un arc-en-ciel. */
.st { display:inline-flex; align-items:center; gap:6px; font-size:12.5px; line-height:1; padding:2px 0;
      white-space:nowrap; color:var(--dim); font-weight:500; }
.st i { color:var(--c); }
.st i { font-style:normal; display:inline-grid; place-items:center; width:13px; height:13px; }
.st.plan { --c:var(--st-plan); } .st.cours { --c:var(--st-cours); } .st.ok { --c:var(--st-ok); }
.st.warn { --c:var(--st-warn); } .st.err { --c:var(--st-err); } .st.off { --c:var(--st-off); }
.st.mini { font-size:12px; padding:1px 0; }
.etiquette { display:inline-block; font:500 12px/1 var(--sans); padding:5px 8px; border-radius:7px; white-space:nowrap;
             border:1px solid transparent; background:var(--acier) padding-box, var(--bord-metal) border-box;
             box-shadow:var(--relief); color:var(--dim); font-variant-numeric:tabular-nums; }
.etiquette.alerte { color:var(--st-warn); border-color:color-mix(in srgb, var(--st-warn) 45%, transparent); }

/* ------------------------------------------------------- messages */
.note { border:1px solid var(--line-2); border-radius:10px; padding:12px 14px; font-size:13.5px; color:var(--dim); }
.note b { color:var(--fg); }
.note.alerte { border-color:color-mix(in srgb, var(--st-warn) 40%, transparent); background:color-mix(in srgb, var(--st-warn) 7%, transparent); }
.note.erreur { border-color:color-mix(in srgb, var(--st-err) 45%, transparent); background:color-mix(in srgb, var(--st-err) 8%, transparent); color:var(--st-err); }
.note.ok { border-color:color-mix(in srgb, var(--st-ok) 40%, transparent); background:color-mix(in srgb, var(--st-ok) 7%, transparent); }
.blocages { list-style:none; margin:0; padding:0; display:grid; gap:6px; }
.blocages li { display:flex; gap:8px; font-size:13.5px; color:var(--st-warn); }
.blocages li::before { content:"!"; font:600 12px/18px var(--mono); width:18px; height:18px; flex:none; text-align:center;
                       border-radius:5px; background:color-mix(in srgb, var(--st-warn) 20%, transparent); color:var(--st-warn); }

.vide { text-align:center; padding:56px 20px; border:1px solid var(--line); border-radius:16px;
         background:var(--vide-fond); box-shadow:var(--biseau); }
.vide h2 { font:600 clamp(26px,3.2vw,38px)/1.1 var(--serif); letter-spacing:-.04em; margin-bottom:10px; }
.vide h2 em { font-style:normal; background:var(--grad-texte); -webkit-background-clip:text; background-clip:text; color:transparent; }
.vide p { color:var(--dim); max-width:52ch; margin:0 auto 18px; }

/* Icones SVG (icones.js) : taille du texte, couleur du texte, alignees sur la ligne. */
.svg-ic { width:1.15em; height:1.15em; flex:none; vertical-align:-0.2em; }
.svg-ic.ic-lg { width:34px; height:34px; }
.legende-statuts { display:flex; flex-wrap:wrap; gap:8px 20px; margin-top:10px; }
.telech-clip { display:grid; gap:8px; padding:12px 14px; border:1px solid var(--line); border-radius:12px; background:var(--surface-2); }
.st i .svg-ic, .notif .ic .svg-ic { width:100%; height:100%; vertical-align:0; }
.etape-num .svg-ic, .coche-rush .svg-ic, .suivi-etapes .marque .svg-ic { width:60%; height:60%; }
.logo .ic-logo { width:58%; height:58%; color:#fff; }
.bande-clips i .svg-ic { width:11px; height:11px; }
.note > .svg-ic:first-child { margin-right:2px; }
.progres { height:6px; border-radius:4px; background:var(--surface-3); overflow:hidden; box-shadow:var(--gravure); }
.progres i { display:block; height:100%; width:0; border-radius:inherit; background:var(--grad); transition:width .25s;
             box-shadow:inset 0 1px 0 rgba(255,255,255,.35); }
.progres.indetermine i { width:35%; animation:glisse 1.3s ease-in-out infinite; }
/* Avancement qui peut rester fige un moment (transcription) : des reflets
   courent sur la barre, on voit que ca travaille. */
.progres.vivant i { background:linear-gradient(100deg, transparent 30%, rgba(255,255,255,.45) 50%, transparent 70%) 0 0 / 200% 100%,
                               var(--grad);
                    animation:reflet 1.6s linear infinite; }
@keyframes reflet { from { background-position:150% 0, 0 0; } to { background-position:-50% 0, 0 0; } }
@media (prefers-reduced-motion: reduce) { .progres.vivant i { animation:none; } }
/* Suivi d'un rendu : les etapes faites, celle en cours avec sa barre, celles a venir. */
.suivi-rendu { width:100%; max-width:340px; display:grid; gap:10px; text-align:left; }
.suivi-etapes { list-style:none; margin:0; padding:0; display:grid; gap:10px; }
.suivi-etapes li { display:grid; grid-template-columns:24px minmax(0,1fr); gap:10px; align-items:start; font-size:14px; }
.suivi-etapes .marque { width:24px; height:24px; border-radius:50%; display:grid; place-items:center; font:600 12px var(--mono);
                        border:1px solid var(--line-2); color:var(--dim); }
.suivi-etapes li.fait { color:var(--dim); }
.suivi-etapes li.fait .marque { background:var(--st-ok); border-color:var(--st-ok); color:var(--sur-plein); }
.suivi-etapes li.avenir { color:var(--dim); }
.suivi-etapes li.actif .marque { border-color:var(--h-cyan); color:var(--h-cyan);
                                background:color-mix(in srgb, var(--h-cyan) 18%, transparent); }
.suivi-etapes li.actif > div { display:grid; gap:6px; }
.suivi-etapes li.actif small { color:var(--dim); line-height:1.4; }
.suivi-etapes li > span:not(.marque) { padding-top:3px; }
.sr-only { position:absolute; width:1px; height:1px; overflow:hidden; clip:rect(0 0 0 0); white-space:nowrap; }
@keyframes glisse { 0% { transform:translateX(-100%); } 100% { transform:translateX(286%); } }   /* largeur 35 % : 100/35 */
.chargement { color:var(--faint); padding:40px 0; text-align:center; }

/* ------------------------------------------------------ listes */
.liste { display:grid; gap:1px; background:var(--line); border:1px solid var(--line); border-radius:var(--rayon); overflow:hidden;
         box-shadow:0 2px 8px var(--ombre); }
.liste > * { background:var(--surface); padding:12px 16px; }
.liste > a { color:inherit; text-decoration:none; display:block; transition:background .13s, box-shadow .13s; }
.liste > a:hover { background:color-mix(in srgb, var(--accent) 8%, var(--surface));
                   box-shadow:inset 3px 0 0 var(--accent); }
.tableau { overflow-x:auto; border:1px solid var(--line); border-radius:var(--rayon); }
table { width:100%; border-collapse:collapse; font-size:13.5px; }
th { font:500 12px/1.4 var(--mono); letter-spacing:.07em; text-transform:uppercase; color:var(--faint); text-align:left;
     padding:10px 14px; border-bottom:1px solid var(--line); background:var(--surface-2); }
td { padding:10px 14px; border-bottom:1px solid var(--line); vertical-align:middle; }
tr:last-child td { border-bottom:0; }

/* ----------------------------------------------------- cloche */
.panneau-cloche { position:fixed; z-index:40; top:62px; right:14px; width:min(420px, calc(100vw - 20px));
                  max-height:calc(100vh - 80px); overflow:auto; overscroll-behavior:contain; border:1px solid transparent; border-radius:16px;
                  background:var(--matiere) padding-box, linear-gradient(var(--surface), var(--surface)) padding-box, var(--bord-metal) border-box;
                  box-shadow:var(--biseau), 0 24px 80px var(--ombre-forte); animation:surgit .18s cubic-bezier(.2,.8,.2,1); }
.panneau-cloche header { position:sticky; top:0; display:flex; align-items:center; gap:10px; padding:12px 16px;
                         border-bottom:1px solid var(--line); background:var(--surface); z-index:1; }
.panneau-cloche > :last-child { margin-bottom:12px; }
.panneau-cloche .vide-notif { padding:0 16px 12px; margin:0; font-size:13.5px; color:var(--dim); }
/* Rendus en cours : le bouton tourne tant que quelque chose tourne. */
/* Rendus en cours : une pastille d'acier au bord violet. Un anneau de
   progression violet entoure le clap et l'avancement s'ecrit en clair
   (« Rendu · 42 % ») ; sans pourcentage connu, l'arc tourne ; en attente,
   il reste eteint. */
.rendus-bouton { position:relative; display:inline-flex; align-items:center; gap:8px; height:36px; padding:0 12px 0 5px;
                 border:1px solid transparent; border-radius:99px; color:var(--fg); cursor:pointer;
                 font:600 12.5px/1 var(--sans); font-variant-numeric:tabular-nums; white-space:nowrap;
                 background:var(--acier) padding-box, var(--bord-violet) border-box;
                 box-shadow:var(--relief), 0 0 18px color-mix(in srgb, var(--accent) 20%, transparent); }
.rendus-bouton:hover { background:var(--acier-survol) padding-box, var(--bord-violet) border-box; }
.rendus-bouton:focus-visible { outline:2px solid var(--accent); outline-offset:2px; }
.rendus-anneau { position:relative; display:grid; place-items:center; width:26px; height:26px; flex:none; }
.rendus-anneau .anneau { position:absolute; inset:0; width:100%; height:100%; transform:rotate(-90deg); overflow:visible; }
.rendus-anneau .piste { fill:none; stroke:color-mix(in srgb, var(--accent) 20%, transparent); stroke-width:3; }
.rendus-anneau .arc { fill:none; stroke:var(--accent); stroke-width:3; stroke-linecap:round;
                      stroke-dasharray:var(--pct, 0) 100; transition:stroke-dasharray .6s ease;
                      filter:drop-shadow(0 0 3px color-mix(in srgb, var(--accent) 70%, transparent)); }
.rendus-anneau .clap { width:12px; height:12px; fill:none; stroke:var(--accent); stroke-width:2.2; stroke-linecap:round; stroke-linejoin:round; }
.rendus-bouton.indetermine .arc { stroke-dasharray:28 100; transition:none; }
.rendus-bouton.indetermine .anneau { animation:tourne-anneau 1.1s linear infinite; }
.rendus-bouton.attente .arc { stroke-dasharray:0 100; }
.rendus-bouton.attente .rendus-texte { color:var(--dim); }
@keyframes tourne-anneau { from { transform:rotate(-90deg); } to { transform:rotate(270deg); } }
/* Arrivee d'un nouveau rendu : la pastille rebondit et une onde en part. */
.rendus-bouton.recoit { animation:rendu-recoit .6s cubic-bezier(.3,1.6,.5,1); }
.rendus-bouton.recoit::after { content:""; position:absolute; inset:-2px; border-radius:inherit; pointer-events:none;
                               border:2px solid var(--accent); animation:rendu-onde .8s ease-out forwards; }
@keyframes rendu-recoit { 35% { transform:scale(1.15); } }
@keyframes rendu-onde { from { opacity:.9; transform:scale(1); } to { opacity:0; transform:scale(1.7, 2.1); } }
/* L'envol : une bille de metal violet part du bouton qui a lance le rendu et
   file en arc jusqu'a la pastille, deux eclats la suivent (app.js, envol()). */
.envol-rendu, .envol-eclat { position:fixed; left:0; top:0; z-index:80; border-radius:50%; pointer-events:none; }
.envol-rendu { display:grid; place-items:center; width:40px; height:40px; margin:-20px 0 0 -20px; color:#fff;
               background:radial-gradient(circle at 35% 30%, #ffffff, #b9a6ff 30%, #6243ea 62%, #2a1490);
               box-shadow:0 0 0 1px rgba(255,255,255,.45), 0 0 26px 6px rgba(122,92,255,.55); }
.envol-rendu svg { width:18px; height:18px; fill:none; stroke:currentColor; stroke-width:2; stroke-linecap:round; stroke-linejoin:round; }
.envol-eclat { width:14px; height:14px; margin:-7px 0 0 -7px;
               background:radial-gradient(circle, #fff, rgba(165,140,255,.8) 45%, transparent 70%); }
@media (max-width:560px) { .rendus-texte { display:none; } .rendus-bouton { padding:0 5px; } }
@media (prefers-reduced-motion: reduce) {
  .rendus-bouton.indetermine .anneau, .rendus-bouton.recoit, .rendus-bouton.recoit::after { animation:none; }
}
.rendu-ligne { display:grid; gap:6px; padding:12px 16px; border-top:1px solid var(--line); }
.rendu-ligne .ligne { gap:8px; }
.rendu-ligne b { font-size:13.5px; }
.rendu-ligne .m { font:400 12px/1.5 var(--sans); color:var(--faint); margin:0; font-variant-numeric:tabular-nums; }
.rendu-ligne .progres { height:6px; }

.groupe-notif { font:600 13px/1 var(--sans); color:var(--dim); padding:16px 16px 8px; margin:0; }
/* Chaque notification est une carte a part : marge autour, fond, bordure.
   Collees bord a bord, elles se lisaient comme un seul paragraphe. */
.notif { position:relative; display:grid; grid-template-columns:28px minmax(0,1fr); gap:12px; margin:0 12px 8px; padding:12px 14px;
         border:1px solid var(--line); border-radius:12px; background:var(--matiere), var(--surface-2); box-shadow:var(--biseau); }
/* L'icone : une pastille d'acier emaillee de la couleur de la notification. */
.notif .ic { width:28px; height:28px; border-radius:8px; display:grid; place-items:center; font:600 12px/1 var(--sans);
             color:var(--c); box-shadow:var(--relief); border:1px solid color-mix(in srgb, var(--c) 40%, transparent);
             background:linear-gradient(180deg, color-mix(in srgb, var(--c) 16%, var(--acier-haut)), color-mix(in srgb, var(--c) 7%, var(--acier-bas))); }
.notif.action { --c:var(--st-warn); } .notif.surveiller { --c:var(--st-plan); } .notif.info { --c:var(--st-ok); }
/* Non lue : un temoin violet dans le coin, comme sur les cartes de sons ; le
   bord reste neutre (des bords jaunes en serie faisaient une alerte generale). */
.notif.non-lue::after { content:""; position:absolute; top:12px; right:12px; width:7px; height:7px; border-radius:50%;
                        background:radial-gradient(circle at 35% 30%, #fff, #a58cff 45%, #5b3bf0);
                        box-shadow:0 0 8px color-mix(in srgb, var(--accent) 70%, transparent); }
.notif.non-lue .t { padding-right:14px; }
.notif p { margin:0; font-size:13.5px; line-height:1.45; }
.notif .t { font-weight:600; margin-bottom:2px; }
.notif .m { font:400 12px/1.5 var(--sans); color:var(--faint); margin:0; font-variant-numeric:tabular-nums; }
/* L'heure et le bouton sur la meme ligne : cinq notifications tiennent alors
   dans un panneau qu'on lit sans faire defiler. */
.notif-pied { display:flex; align-items:center; gap:10px; flex-wrap:wrap; margin-top:6px; }
.notif-pied .bouton { margin-left:auto; }
/* Le filtre « non lues » : bouton a bascule, plein quand il est actif. */
.bascule-filtre[aria-pressed="true"] { color:#fff; border-color:transparent;   /* choisi : metal violet */
  background:var(--metal-violet) padding-box, var(--bord-violet) border-box; box-shadow:var(--relief-violet); }
.notif .actes { display:flex; flex-wrap:wrap; gap:6px; margin-top:8px; }

/* ----------------------------------------------------- modales */
.voile { position:fixed; inset:0; z-index:60; display:flex; align-items:center; justify-content:center; padding:18px;
         background:rgba(3,3,8,.68); -webkit-backdrop-filter:blur(6px); backdrop-filter:blur(6px); }
.modale { width:min(520px, 100%); max-height:calc(100vh - 36px); overflow:auto; overscroll-behavior:contain; border:1px solid transparent; border-radius:16px; padding:22px 24px;
          background:var(--matiere) padding-box, linear-gradient(var(--surface), var(--surface)) padding-box, var(--bord-metal) border-box;
          box-shadow:var(--biseau), 0 30px 90px var(--ombre-forte); animation:surgit .2s cubic-bezier(.2,.8,.2,1); }
/* Une fenetre qui s'ouvre monte d'un rien : on voit d'ou vient le changement. */
@keyframes surgit { from { opacity:0; transform:translateY(8px) scale(.985); } }
.modale.large { width:min(880px, 100%); }
.modale h2 { font-size:18px; margin-bottom:8px; }
.modale .corps { color:var(--dim); font-size:14px; }
.modale .actes { display:flex; justify-content:flex-end; gap:9px; margin-top:20px; flex-wrap:wrap; }
.modale ul { padding-left:18px; }

/* Ecran bloque pendant une action ou un rendu (voir bloquer() dans core.js) */
.blocage { position:fixed; inset:0; z-index:65; display:flex; align-items:center; justify-content:center; padding:18px;
           background:rgba(3,3,8,.6); pointer-events:none; }
.blocage-boite { width:min(400px, 100%); display:grid; gap:10px; padding:18px 20px; border-radius:14px; border:1px solid transparent;
                 background:var(--matiere) padding-box, linear-gradient(var(--surface), var(--surface)) padding-box, var(--bord-metal) border-box;
                 box-shadow:var(--biseau), 0 30px 90px var(--ombre-forte); }
.blocage-boite .progres { height:8px; }
.blocage-boite [data-contenu] { display:grid; gap:10px; }
.blocage-action { justify-self:start; pointer-events:auto; cursor:pointer !important; }
.blocage-action[data-confirmer] { background:#8e2733; border-color:#8e2733; color:#fff; }
html.ecran-bloque, html.ecran-bloque * { cursor:progress !important; }

.toasts { position:fixed; z-index:70; left:50%; bottom:22px; transform:translateX(-50%); display:grid; gap:8px;
          width:min(460px, calc(100vw - 24px)); pointer-events:none; }
.toast { pointer-events:auto; padding:11px 15px; border-radius:11px; border:1px solid transparent; font-size:14px;
         background:var(--matiere) padding-box, linear-gradient(var(--surface-3), var(--surface-3)) padding-box, var(--bord-metal) border-box;
         box-shadow:var(--biseau), 0 14px 40px var(--ombre); animation:surgit .22s cubic-bezier(.2,.8,.2,1); }
.toast.erreur { border-color:color-mix(in srgb, var(--st-err) 60%, transparent); color:var(--st-err); }
.toast.ok { border-color:color-mix(in srgb, var(--st-ok) 55%, transparent); }

/* ----------------------------------------------------- sorties */
.cartes-sorties { display:grid; gap:14px; grid-template-columns:repeat(auto-fill, minmax(280px, 1fr)); }
/* Carte d'un son : son image (la couverture d'un clip, sinon un rush), le
   titre, l'etat en un mot avec son temoin, les chiffres, la date. Les
   actions (ranger, supprimer) n'apparaissent qu'au survol ou au clavier. */
.carte-sortie { position:relative; isolation:isolate; display:grid; grid-template-columns:72px minmax(0,1fr); gap:16px;
                align-items:start; padding:14px; border-radius:14px; border:1px solid var(--line);
                background:var(--matiere), var(--surface); color:inherit; text-decoration:none;
                transition:opacity .15s, transform .2s cubic-bezier(.2,.8,.2,1), box-shadow .2s, border-color .2s;
                box-shadow:var(--biseau), 0 2px 8px var(--ombre); }
.carte-sortie:hover { border-color:color-mix(in srgb, var(--accent) 45%, var(--line));
                      transform:translateY(-2px); box-shadow:var(--biseau), 0 14px 34px var(--ombre); }
.carte-visuel { display:grid; place-items:center; width:72px; height:96px; border-radius:10px; object-fit:cover;
                background:#0b0a12; color:var(--faint);
                box-shadow:0 0 0 1px rgba(255,255,255,.1), 0 6px 16px rgba(0,0,0,.35); }
.carte-visuel.vide { background:var(--acier); box-shadow:var(--relief), 0 0 0 1px var(--line); }
.carte-visuel.vide svg { width:22px; height:22px; }
.carte-corps { display:grid; gap:7px; min-width:0; align-content:start; }
.carte-sortie h2 { font:600 19px/1.15 var(--serif); letter-spacing:-.03em; padding-right:30px;
                   display:-webkit-box; -webkit-line-clamp:2; -webkit-box-orient:vertical; overflow:hidden; overflow-wrap:anywhere; }
.carte-etat { display:flex; flex-wrap:wrap; align-items:center; gap:4px 12px; font-size:13px; color:var(--dim); }
.carte-sortie .chiffres { gap:4px 12px; font-size:13px; }
.carte-sortie .chiffres .a-valider b { color:var(--st-warn); }
.carte-modif { font-size:12px; color:var(--faint); }
.carte-sortie-cadre { position:relative; display:grid; }
/* Etat d'un son : un mot et un temoin (un vrai etat, pas une decoration).
   Brouillon : anneau eteint ; valide : vert ; publie : violet qui luit. */
.statut-son { display:inline-flex; align-items:center; gap:7px; font:600 13px/1 var(--sans); color:var(--fg); }
.statut-son::before { content:""; flex:none; width:8px; height:8px; border-radius:50%; }
.statut-son.brouillon { color:var(--dim); }
.statut-son.brouillon::before { box-shadow:inset 0 0 0 1.5px var(--faint); }
.statut-son.valide::before { background:var(--st-ok); box-shadow:0 0 8px color-mix(in srgb, var(--st-ok) 60%, transparent); }
.statut-son.publie::before { background:radial-gradient(circle at 35% 30%, #fff, #a58cff 45%, #5b3bf0);
                             box-shadow:0 0 10px color-mix(in srgb, var(--accent) 70%, transparent); }
.suppr-son, .ranger-son { position:absolute; top:10px; right:10px; z-index:2; width:28px; height:28px; padding:0; border-radius:8px;
             border:1px solid transparent; background:var(--acier) padding-box, var(--bord-metal) border-box; box-shadow:var(--relief);
             color:var(--dim); cursor:pointer; opacity:0; transition:opacity .15s, color .15s; }
.carte-sortie-cadre:hover > button, .carte-sortie-cadre:focus-within > button { opacity:1; }
@media (hover:none) { .suppr-son, .ranger-son { opacity:1; } }
.suppr-son:hover { color:var(--st-err); }
/* Ranger / sortir du dossier : a gauche de la croix, ou a sa place sur un son publie. */
.ranger-son { display:grid; place-items:center; right:44px; }
.ranger-son:last-child { right:10px; }
.ranger-son:hover { color:var(--accent); }
.carte-sortie-cadre:has(.ranger-son + .suppr-son) .carte-sortie h2 { padding-right:62px; }
.carte-sortie-cadre[draggable="true"] { cursor:grab; }
/* Glisser un son vers un dossier : vignette sous le curseur, carte d'origine
   estompee, cibles qui appellent, bandeau d'aide, rebond du dossier qui recoit. */
.carte-sortie-cadre.glisse .carte-sortie { opacity:.35; border-style:dashed; border-color:var(--accent); transform:scale(.97); }
.carte-sortie-cadre.glisse > button { visibility:hidden; }
.fantome-son { position:fixed; top:-300px; left:-300px; z-index:100; display:flex; align-items:center; gap:10px; max-width:300px;
               padding:8px 16px 8px 8px; border:1px solid var(--accent); border-radius:12px; background:var(--surface-3);
               color:var(--fg); font:600 14px var(--sans); white-space:nowrap; box-shadow:0 14px 34px var(--ombre); }
.fantome-son b { overflow:hidden; text-overflow:ellipsis; }
.fantome-note { display:grid; place-items:center; width:32px; height:32px; flex:none; border-radius:9px; background:var(--grad); color:#0d0a22; }
.glisse-en-cours .carte-dossier, .glisse-en-cours [data-tous-sons] { outline:1.5px dashed var(--accent); outline-offset:-1px;
                                                                      animation:appel-depot 1.2s ease-in-out infinite; }
@keyframes appel-depot { 50% { box-shadow:0 0 0 5px var(--accent-soft); } }
.depose-ici { display:none; margin-left:auto; padding-left:8px; font:600 12px var(--sans); color:var(--accent); white-space:nowrap; }
.carte-dossier.survol .depose-ici { display:inline; }
.indice-glisser { position:fixed; left:50%; bottom:22px; z-index:60; transform:translateX(-50%); display:flex; align-items:center;
                  max-width:calc(100vw - 32px); margin:0; padding:10px 16px; border:1px solid var(--accent); border-radius:12px;
                  background:var(--surface-3); color:var(--fg); font-size:13.5px; box-shadow:0 12px 40px var(--ombre); pointer-events:none; }
.carte-dossier.vient-de-recevoir { animation:recu-dossier .7s ease-out; }
@keyframes recu-dossier { 35% { transform:scale(1.06); border-color:var(--st-ok);
                                box-shadow:0 0 0 5px color-mix(in srgb, var(--st-ok) 25%, transparent); } }
@media (prefers-reduced-motion: reduce) {
  .glisse-en-cours .carte-dossier, .glisse-en-cours [data-tous-sons], .carte-dossier.vient-de-recevoir { animation:none; }
}

/* Dossiers de sons (un seul niveau) */
.tes-sons-barre { display:flex; align-items:center; gap:8px 10px; flex-wrap:wrap; margin-bottom:12px; }
.tes-sons-actions { display:flex; align-items:center; gap:8px; flex-wrap:nowrap; }
.filtre-statut { display:flex; align-items:center; gap:6px; flex-wrap:wrap; }
.filtre-statut .puce { --teinte:var(--accent); padding:5px 11px; cursor:pointer; }
.filtre-statut .puce[data-statut="brouillon"] { --teinte:var(--h-bleu); }
.filtre-statut .puce[data-statut="valide"] { --teinte:var(--st-ok); }
.filtre-statut .puce[data-statut="publie"] { --teinte:var(--h-rose); }
.filtre-statut .puce:hover { color:var(--teinte); border-color:color-mix(in srgb, var(--teinte) 50%, transparent); }
/* Filtre actif : la couleur pleine. Un fond teinte sous un texte de la meme
   couleur perdrait le contraste, et se verrait moins. */
.filtre-statut .puce[aria-pressed="true"] { color:#fff; border-color:transparent;   /* choisi : metal violet */
  background:var(--metal-violet) padding-box, var(--bord-violet) border-box; box-shadow:var(--relief-violet); }
.filtre-statut .puce[aria-pressed="true"] .nb { color:inherit; opacity:.75; }
.filtre-statut .nb { font:600 12px var(--sans); color:var(--faint); margin-left:6px; font-variant-numeric:tabular-nums; }
.fil-dossier { display:flex; align-items:center; gap:8px; min-width:0; font-size:15px; margin-bottom:12px; }
.fil-dossier b { white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
[data-tous-sons].survol { outline:2px dashed var(--accent); outline-offset:2px; background:var(--accent-soft); color:var(--fg); }
.cartes-dossiers { display:grid; gap:12px; grid-template-columns:repeat(auto-fill, minmax(220px, 1fr)); margin-bottom:14px; }
.carte-dossier { position:relative; isolation:isolate; display:flex; align-items:center; gap:12px; min-width:0; padding:12px 14px; border:1px solid var(--line);
                 border-radius:14px; background:var(--matiere), var(--surface); color:var(--fg); font:inherit; text-align:left; cursor:pointer;
                 box-shadow:var(--biseau);
                 transition:border-color .15s, background .15s, transform .15s; }
.carte-dossier:hover { border-color:color-mix(in srgb, var(--accent) 50%, transparent);
                       background:color-mix(in srgb, var(--accent) 7%, var(--surface)); }
.carte-dossier.survol, .glisse-en-cours .carte-dossier.survol { border-color:var(--accent); background:var(--accent-soft); transform:scale(1.05);
                        outline:2px solid var(--accent); box-shadow:0 0 0 6px var(--accent-soft); animation:none; }
.carte-dossier[aria-pressed="true"] { border-color:var(--accent); background:var(--accent-soft); box-shadow:inset 0 0 0 1px var(--accent); }
.carte-dossier-cadre { position:relative; display:grid; min-width:0; }
.carte-dossier-cadre .carte-dossier { padding-right:52px; }
.suppr-dossier { top:50%; right:12px; transform:translateY(-50%); }
.glisse-en-cours .suppr-dossier { visibility:hidden; }
.carte-dossier-texte { display:grid; gap:2px; min-width:0; }
.carte-dossier-texte b { white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.dossier-icone { display:grid; place-items:center; width:42px; height:42px; flex:none; border-radius:11px;
                 background:linear-gradient(160deg, color-mix(in srgb, var(--accent) 22%, var(--surface-3)), var(--surface-3) 60%);
                 color:var(--accent); box-shadow:var(--biseau), inset 0 0 0 1px color-mix(in srgb, var(--accent) 25%, transparent); }
.dossier-icone.mini { width:28px; height:28px; border-radius:8px; }
.dossier-icone.mini svg { width:16px; height:16px; }
.choix-dossiers { display:grid; gap:8px; margin-top:10px; }
label.recherche-sons { display:block; position:relative; flex:1 1 240px; max-width:380px; }
.recherche-sons svg { position:absolute; left:12px; top:50%; transform:translateY(-50%); color:var(--faint); pointer-events:none; }
.recherche-sons input { width:100%; padding-left:36px; }
.resultats-sons { margin:0 0 10px; }
.etiquette-dossier { display:inline-flex; align-items:center; gap:5px; justify-self:start; font-size:12px; color:var(--accent); }
.chiffres { display:flex; flex-wrap:wrap; gap:6px 16px; font-size:13px; color:var(--dim); }
.chiffres b { color:var(--fg); font-weight:600; font-variant-numeric:tabular-nums; }

.depot { border:1.5px dashed var(--line-2); border-radius:14px; padding:26px 20px; text-align:center; cursor:pointer;
         transition:border-color .15s, background .15s; background:var(--surface); }
.depot:hover, .depot.survol { border-color:var(--accent); background:var(--accent-soft); }
.depot b { display:block; font-size:15.5px; margin-bottom:4px; }
.depot span { color:var(--dim); font-size:13px; }
/* Etapes de la page d'un son : une ouverte a la fois, les validees repliees
   en une ligne, les suivantes grisees tant que la precedente n'est pas faite. */
.etapes-son { list-style:none; margin:0; padding:0; display:grid; gap:12px; }
.etape { border:1px solid var(--line); border-radius:14px; background:var(--matiere), var(--surface); box-shadow:var(--biseau), 0 2px 8px var(--ombre); }
/* Etapes et modules : une seule teinte, le metal violet (--teinte vaut
   --accent par defaut). Une couleur par module faisait un arc-en-ciel ; la
   couleur reste aux etats (fait, modifie, a appliquer). */
/* Etape ouverte : son bord de metal s'allume en violet (plus de bande sur le cote). */
.etape.ouverte { border-color:transparent;
                 background:var(--matiere) padding-box, linear-gradient(var(--surface), var(--surface)) padding-box, var(--bord-violet) border-box;
                 box-shadow:var(--biseau), 0 12px 40px var(--ombre), 0 0 30px color-mix(in srgb, var(--accent) 10%, transparent); }
/* Etape pas encore accessible : bordure pointillee et numero estompe, mais
   un texte qui reste lisible (plus d'opacite qui ferait tomber le contraste). */
.etape.verrouillee { border-style:dashed; background:transparent; }
.etape.verrouillee .etape-num { border-style:dashed; }
.etape.verrouillee .etape-tete h2 { color:var(--dim); font-weight:500; }
.etape-tete { display:flex; align-items:center; gap:14px; padding:16px 20px; }
.etape-tete h2 { font-size:16.5px; }
.etape-num { width:32px; height:32px; flex:none; border-radius:50%; display:grid; place-items:center;
             font:600 13px/1 var(--mono); border:1px solid var(--line-2); color:var(--dim); }
.etape.ouverte .etape-num { border-color:var(--teinte); color:var(--teinte);
                            background:radial-gradient(circle at 35% 25%, color-mix(in srgb, var(--teinte) 32%, transparent), color-mix(in srgb, var(--teinte) 10%, transparent) 70%);
                            box-shadow:inset 0 1px 0 rgba(255,255,255,.18), 0 0 14px color-mix(in srgb, var(--teinte) 30%, transparent); }
.etape.faite .etape-num { background:var(--st-ok); border-color:var(--st-ok); color:var(--sur-plein); }
.etape-resume { margin:3px 0 0; color:var(--dim); font-size:13px; }
/* Campagne : chaque etape porte son logo (plateformes) ou son icone, a cote
   du numero ; on voit de loin quelle appli on regle. */
.etape-badge { width:40px; height:40px; flex:none; border-radius:11px; display:grid; place-items:center;
               color:var(--accent); border:1px solid transparent; box-shadow:var(--relief);
               background:var(--acier) padding-box, var(--bord-metal) border-box; }
.etape-badge .svg-ic { width:20px; height:20px; }
.etape.verrouillee .logo, .etape.verrouillee .etape-badge { opacity:.45; filter:grayscale(.6); }
.aide.repris { display:flex; align-items:center; gap:6px; margin:0; color:var(--accent); }
.aide.repris .svg-ic { width:14px; height:14px; flex:none; }
.compte-ligne { display:flex; align-items:center; gap:10px; flex-wrap:wrap; padding:10px 12px; border-radius:12px;
                border:1px solid var(--line); background:var(--surface-2); }
@media (max-width:560px) { .etapes-campagne .etape-tete .logo, .etapes-campagne .etape-badge { width:32px; height:32px; } }
.etape-corps { display:grid; gap:16px; padding:0 20px 20px; }
.etape-pied { display:flex; align-items:center; gap:12px; flex-wrap:wrap; border-top:1px solid var(--line); padding-top:14px; }
.blocages:empty { display:none; }
.question { margin:0; padding:16px 18px; border:1px solid var(--line-2); border-radius:12px; display:grid; gap:10px; }
.question legend { padding:0 6px; font-size:15.5px; font-weight:600; color:var(--fg); }
.question .aide { margin:0; }
.bouton.choix { min-height:44px; }
.bouton.choix[aria-pressed="true"] { color:#fff; border-color:transparent;   /* choisi : metal violet */
  background:var(--metal-violet) padding-box, var(--bord-violet) border-box; box-shadow:var(--relief-violet); }
.etape-corps h3 { font-size:14px; margin-top:6px; }
/* Details : le titre du son en grand */

/* Depot : zones de depot avec icone, carte du son */
.depots .depot { display:grid; justify-items:center; align-content:center; gap:4px; min-height:170px; background:var(--bg); }
.depots .depot svg { color:var(--accent); margin-bottom:6px; }
.depots .depot.occupe { opacity:.5; pointer-events:none; }
.depot .formats { display:block; margin-top:6px; font:500 12px var(--mono); color:var(--faint); letter-spacing:.02em; }
.son-carte { display:grid; gap:12px; }
.son-entete { display:grid; grid-template-columns:auto minmax(0,1fr) auto; align-items:center; gap:14px; padding:12px;
              border:1px solid var(--line-2); border-radius:12px; background:var(--surface-2); }
.son-icone { display:grid; place-items:center; width:54px; height:54px; border-radius:12px; background:var(--grad); color:#0d0a22; }
.son-infos { display:grid; gap:7px; min-width:0; }
.son-nom { font-size:15.5px; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.puces { display:flex; flex-wrap:wrap; align-items:center; gap:8px; }
.puce { --teinte:var(--h-cyan); display:inline-flex; align-items:center; gap:5px; padding:3px 10px; border-radius:999px;
        background:linear-gradient(180deg, color-mix(in srgb, var(--teinte) 10%, var(--acier-haut)), color-mix(in srgb, var(--teinte) 4%, var(--acier-bas)));
        border:1px solid color-mix(in srgb, var(--teinte) 30%, var(--line-2)); box-shadow:var(--relief);
        color:var(--dim); font:500 12px/1.4 var(--sans); white-space:nowrap; font-variant-numeric:tabular-nums; }
.puce.ia { --teinte:var(--accent); color:var(--accent); font-family:var(--sans); }
.puce.manuel { --teinte:var(--st-ok); color:var(--st-ok); font-family:var(--sans); }
.sous-bloc { display:grid; gap:10px; padding:14px; border:1px solid var(--line); border-radius:12px; background:var(--bg); }
.sous-bloc-tete { display:flex; align-items:flex-start; justify-content:space-between; gap:12px; }
.sous-bloc-tete b, .paroles-ferme b { font-size:14px; }
.liste-parties { list-style:none; margin:0; padding:0; display:grid; gap:8px; }
.liste-parties li { display:grid; gap:10px; padding:8px 10px; border:1px solid var(--line-2); border-radius:10px;
                    background:var(--surface); font-size:13.5px; transition:border-color .15s; }
.liste-parties li.ouverte { border-color:var(--accent); }
.ligne-partie { display:flex; align-items:center; gap:8px 10px; flex-wrap:wrap; }
.partie-num { display:grid; place-items:center; width:26px; height:26px; flex:none; border-radius:8px;
              background:color-mix(in srgb, var(--h-cyan) 16%, transparent); border:1px solid color-mix(in srgb, var(--h-cyan) 32%, transparent);
              font:600 12px var(--mono); color:var(--h-cyan); }
.bouton.plus { width:32px; min-height:32px; padding:0; font-size:18px; line-height:1; flex:none; }
.reglage-partie { display:grid; gap:8px; }
/* Action mise en avant : le geste que l'artiste doit (ou peut) faire ensuite.
   Fond clair et texte fonce (--grad-clair est fait pour ca), toute la largeur,
   titre et precision sur une seule ligne. Vaut pour un <button> comme un <a>. */
/* Chrome, comme le bouton principal : reflet au repos, lumiere au curseur
   (.action-forte partage les --mx, --my de core.js), onde au clic. */
.action-forte { position:relative; isolation:isolate; overflow:hidden;
  display:flex; flex-wrap:wrap; align-items:baseline; justify-content:center; gap:3px 9px;
  width:100%; padding:10px 16px; border:0; border-radius:10px; background:var(--grad-clair);
  color:#0d0a22; font:inherit; text-align:center; text-decoration:none; cursor:pointer;
  box-shadow:inset 0 1px 0 #fff, inset 0 -1px 0 rgba(40,20,120,.3), 0 6px 22px rgba(110,80,255,.26);
  transition:filter .15s, box-shadow .2s, transform .2s cubic-bezier(.2,.8,.2,1); }
.action-forte::before { content:""; position:absolute; inset:0; z-index:-1; pointer-events:none;
  background:linear-gradient(105deg, transparent 38%, rgba(255,255,255,.95) 50%, rgba(170,150,255,.5) 54%, transparent 64%);
  transform:translateX(-130%); animation:reflet-bouton 6s cubic-bezier(.5,0,.3,1) infinite; }
.action-forte::after { content:""; position:absolute; inset:0; z-index:-1; opacity:0; pointer-events:none; transition:opacity .2s;
  background:radial-gradient(100px circle at var(--mx, 50%) var(--my, 50%), rgba(110,80,255,.35), transparent 70%); }
.action-forte:hover:not(:disabled)::after { opacity:1; }
.action-forte:disabled::before, .action-forte:disabled::after { display:none; }
.action-forte b { font-size:15px; font-weight:700; letter-spacing:-.01em; }
.action-forte small { color:#2b2540; }
.action-forte:hover:not(:disabled) { transform:translateY(-1px);
  box-shadow:inset 0 1px 0 #fff, inset 0 -1px 0 rgba(40,20,120,.3), 0 0 0 3px rgba(150,120,255,.25), 0 12px 34px rgba(110,80,255,.42); }
.action-forte:active:not(:disabled) { transform:scale(.98); }
.action-forte:disabled { background:none; border:1px dashed var(--line-2); color:var(--dim);
  box-shadow:none; cursor:not-allowed; }
.action-forte:disabled small { color:var(--faint); }
.ajouter-clip { margin-top:12px; }
.vide .action-forte { max-width:440px; margin-inline:auto; }
.reglage-partie .onde { height:110px; }
.paroles-son .paroles-liste { max-height:360px; }
.paroles-ferme { display:flex; align-items:center; gap:12px; }
.petite-icone { display:grid; place-items:center; width:36px; height:36px; flex:none; border-radius:9px;
               color:var(--accent); border:1px solid transparent; box-shadow:var(--relief);
               background:var(--acier) padding-box, var(--bord-metal) border-box; }
.petite-icone svg { width:20px; height:20px; }
.travail { display:grid; gap:6px; font-size:13px; color:var(--dim); width:100%; }
.envois { display:grid; gap:8px; }
.envois:empty { display:none; }
.envoi { display:grid; grid-template-columns:minmax(0,1fr) auto; gap:6px 12px; align-items:center; font-size:13px;
         padding:10px 12px; border:1px solid var(--line); border-radius:10px; background:var(--surface-2); }
.envoi .progres { grid-column:1 / -1; }
[data-transcription]:empty { display:none; }

/* Generer : le nombre de clips en grand */
.generer { display:flex; align-items:center; justify-content:space-between; gap:20px; flex-wrap:wrap; padding:18px 20px;
           border:1px solid transparent; border-radius:14px; box-shadow:var(--biseau);
           background:var(--matiere) padding-box, linear-gradient(var(--surface), var(--surface)) padding-box, var(--bord-metal) border-box; }
.generer-resume { display:flex; align-items:center; gap:20px; min-width:0; }
.generer-nombre { min-width:56px; text-align:center; font:600 64px/1 var(--serif); letter-spacing:-.05em; background:var(--grad-texte);
                  -webkit-background-clip:text; background-clip:text; color:transparent; }
.generer-titre { font-size:17px; }


.rushes { display:grid; gap:12px; grid-template-columns:repeat(auto-fill, minmax(170px, 1fr)); }
.rush { position:relative; border:1px solid var(--line); border-radius:11px; overflow:hidden; background:var(--surface); }
.rush img, .rush .sans-vignette { width:100%; aspect-ratio:16/10; object-fit:cover; display:block; background:#05050a; }
.rush .meta { padding:8px 10px; font-size:12px; }
.rush .nom { white-space:nowrap; overflow:hidden; text-overflow:ellipsis; margin-bottom:5px; }
.rush .etiquettes { display:flex; flex-wrap:wrap; gap:4px; }
.rush .outils { position:absolute; top:6px; right:6px; display:flex; gap:5px; }
.rush .outils button { background:rgba(0,0,0,.72); border:1px solid rgba(255,255,255,.18); color:#fff; border-radius:7px;
                       padding:3px 8px; font-size:12px; cursor:pointer; }
.rush .outils button[aria-pressed="true"] { color:var(--st-ok); border-color:var(--st-ok); }
.rush.selectionnable { cursor:pointer; }
.rush.ecarte img { opacity:.3; filter:grayscale(1); }
.rush .coche-rush { position:absolute; top:6px; left:6px; width:22px; height:22px; border-radius:6px; display:grid;
                    place-items:center; font-size:12px; font-weight:700; background:rgba(0,0,0,.65);
                    border:1px solid rgba(255,255,255,.3); color:transparent; }
.rush.retenu .coche-rush { background:var(--st-ok); border-color:var(--st-ok); color:var(--sur-plein); }
/* Rushes d'un son : la carte entiere coche/decoche ; en "Mon ordre", un rang,
   des fleches (clavier) et le glisser-deposer pour ranger. */
.rush-choix { display:block; width:100%; padding:0; border:0; background:none; text-align:left; color:inherit; font:inherit; cursor:pointer; }
.rush-choix:focus-visible { outline:2px solid var(--accent); outline-offset:-2px; }
.rush .outils button { min-width:28px; min-height:28px; display:grid; place-items:center; padding:3px; }
.rush .outils button:disabled { opacity:.35; cursor:default; }
.rush-rang { position:absolute; top:6px; left:34px; min-width:22px; height:22px; padding:0 6px; border-radius:6px; display:grid;
             place-items:center; background:var(--accent); color:var(--sur-plein); font:700 12px/1 var(--sans); }
.rushes.ordonnes .rush { cursor:grab; }
.rush.tire { opacity:.45; }
.rush.survol { outline:2px dashed var(--accent); outline-offset:2px; }
.ordre-rushes { display:grid; gap:8px; margin-bottom:14px; padding:12px; border:1px solid var(--line-2); border-radius:12px; background:var(--surface); }
.ordre-rushes-titre { font:600 13px var(--sans); color:var(--fg); }
.ordre-rushes-choix { display:flex; gap:6px; flex-wrap:wrap; }
.ordre-rushes .aide { margin:0; }

.clips-son { display:grid; gap:10px; grid-template-columns:repeat(auto-fill, minmax(150px, 1fr)); margin-top:10px; }
/* minmax(0,1fr) : sans lui, la colonne interieure prend la largeur du plus
   large contenu INSECABLE — la pastille d'etape (« Étape 1 sur 4 · Analyse des
   rushes », en nowrap) faisait 228 px dans une colonne de 169, et le cadre,
   etire d'autant, debordait sur la vignette voisine pendant un rendu. La
   pastille s'enroule ici : c'est une legende, pas une ligne de tableau. */
.vignette-clip { display:grid; grid-template-columns:minmax(0,1fr); gap:6px; color:inherit; text-decoration:none; }
.vignette-clip .st { white-space:normal; }
.vignette-clip .cadre { aspect-ratio:9/16; border-radius:10px; background:#05050a center/cover; border:1px solid var(--line);
                        display:grid; place-items:center; overflow:hidden; position:relative; }
.vignette-clip:hover .cadre { border-color:var(--accent); box-shadow:0 0 0 3px var(--accent-soft); }
.vignette-clip .cadre .progres { position:absolute; left:10px; right:10px; bottom:12px; }
.vignette-clip .t { font-size:13px; font-weight:500; }

/* --------------------------------------------------- validation */
.actions-clip { display:grid; grid-template-columns:repeat(2, minmax(0,1fr)); gap:10px; }
/* Une pastille coloree, son titre, sa phrase : on repere le module a sa
   couleur. La teinte vient du module (data-outil), tout le reste en decoule. */
.action-clip { display:grid; grid-template-columns:auto minmax(0,1fr); column-gap:12px; gap:4px 12px;
               align-content:start; text-align:left; padding:13px 15px; border-radius:12px;
               border:1px solid var(--line-2); background:var(--matiere), var(--surface); color:var(--fg); cursor:pointer; font:inherit; text-decoration:none;
               position:relative; isolation:isolate; box-shadow:var(--biseau);
               transition:border-color .15s, background .15s, transform .2s cubic-bezier(.2,.8,.2,1), box-shadow .15s; }
.jeton-module { grid-row:1 / span 2; display:grid; place-items:center; width:38px; height:38px; border-radius:11px;
                color:var(--accent); border:1px solid transparent; box-shadow:var(--relief);
                background:var(--acier) padding-box, var(--bord-metal) border-box; }
.jeton-module svg { width:19px; height:19px; }
.action-clip:hover:not(:disabled):not([aria-disabled="true"]) {
  border-color:color-mix(in srgb, var(--teinte) 60%, transparent);
  background:color-mix(in srgb, var(--teinte) 8%, var(--surface));
  transform:translateY(-2px); box-shadow:0 10px 26px var(--ombre); }
.action-clip:disabled, .action-clip[aria-disabled="true"] { opacity:.45; cursor:not-allowed; }
.action-clip b { display:flex; flex-wrap:wrap; justify-content:space-between; align-items:center; gap:8px; font-size:14px; }
/* Module retouche depuis la derniere validation. */
.action-clip.modifie { border-color:color-mix(in srgb, var(--st-warn) 45%, var(--line-2)); }
.action-clip.en-attente { border-color:color-mix(in srgb, var(--st-plan) 40%, var(--line-2)); }
/* Bibliotheque de videos, depliee sous la zone de depot. */
.ouvrir-biblio { margin-top:10px; }
.biblio { display:grid; gap:12px; margin-top:10px; padding:14px; border:1px solid var(--line-2); border-radius:12px;
          background:var(--surface-2); }
.biblio-grille { display:grid; gap:10px; grid-template-columns:repeat(auto-fill, minmax(150px, 1fr)); }
.biblio-rush { position:relative; display:grid; gap:3px; padding:8px; border:1px solid var(--line); border-radius:10px;
               background:var(--surface); cursor:pointer; min-width:0; }
.biblio-rush img, .biblio-rush .sans-vignette { width:100%; aspect-ratio:16/10; object-fit:cover; border-radius:6px;
                                               background:#05050a; display:block; }
.biblio-rush input { position:absolute; top:14px; left:14px; z-index:1; }
.biblio-rush .nom { font-size:13px; font-weight:500; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.biblio-rush .sons { white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.biblio-rush:hover { border-color:color-mix(in srgb, var(--accent) 50%, transparent); }
.biblio-rush.choisi { border-color:var(--accent); box-shadow:inset 0 0 0 1px var(--accent); }

/* Garder les reglages en profil, juste avant de generer. */
.garder-profil { display:flex; align-items:center; gap:12px; flex-wrap:wrap; margin-top:12px; padding:12px 14px;
                 border:1px dashed var(--line-2); border-radius:12px; }
.garder-profil .espace { display:grid; gap:2px; flex:1; min-width:200px; }
.garder-profil small { color:var(--dim); }
.garder-profil input[type=text] { width:min(220px, 100%); }
.profil-ligne { display:flex; align-items:center; gap:12px; flex-wrap:wrap; padding:10px 12px;
                border:1px solid var(--line-2); border-radius:11px; background:var(--surface-2); }
.profil-ligne > div:first-child { display:grid; gap:4px; flex:1; min-width:180px; }
.profil-ligne small { font-size:12.5px; }

/* Barre d'action entre les images et la suite : applique les retouches, ou valide. */
.bloc-validation { display:grid; gap:10px; padding:15px 17px; border-radius:14px; border:1px solid transparent;
                   background:linear-gradient(160deg, var(--accent-soft), transparent 70%) padding-box, var(--matiere) padding-box,
                              linear-gradient(var(--surface), var(--surface)) padding-box, var(--bord-metal) border-box;
                   box-shadow:var(--biseau), 0 10px 30px var(--ombre); }
/* Refabriquer le clip : action attachee a la video, pas une retouche du montage. */
.refaire-images { display:flex; align-items:center; gap:12px; flex-wrap:wrap; margin-top:10px; }
.refaire-images .dim { flex:1; min-width:180px; line-height:1.4; }
/* Validation, publication : le fichier exact envoye a chaque plateforme. */
.qualite-reelle { display:grid; gap:8px; margin-top:10px; }
.qualite-reelle p { margin:0; }
.qr-fiche { display:grid; gap:2px; }
.qr-fiche .mono { font-size:13px; color:var(--dim); font-variant-numeric:tabular-nums; }
.action-clip span { font-size:12.5px; color:var(--dim); line-height:1.45; }
.action-clip[aria-expanded="true"] { border-color:var(--teinte);
                                    background:color-mix(in srgb, var(--teinte) 12%, var(--surface));
                                    box-shadow:inset 0 0 0 1px color-mix(in srgb, var(--teinte) 30%, transparent); }
/* Arrive sous la barre du haut (collee, ~57 px), pas dessous. */
.outil-clip { scroll-margin-top:76px; display:grid; gap:10px; min-width:0; padding:14px; border-radius:12px; border:1px solid transparent;
              background:var(--matiere) padding-box, linear-gradient(var(--surface-2), var(--surface-2)) padding-box, var(--bord-metal) border-box;
              box-shadow:var(--biseau), 0 12px 36px var(--ombre); }
.outil-clip .onde { height:110px; }
.couverture-choix { display:flex; gap:14px; align-items:center; }
.couverture-choix img { width:96px; aspect-ratio:9/16; object-fit:cover; border-radius:8px; background:#05050a; flex:none; }
@media (max-width:760px) { .actions-clip { grid-template-columns:minmax(0,1fr); } }
.validation { display:grid; grid-template-columns:minmax(260px, 380px) minmax(0,1fr); gap:28px; align-items:start; }
.etapes-bas { margin-top:24px; }       /* montage, couverture et validation : pleine largeur, sous la video */
/* Le clip est la piece maitresse de la page : un halo de marque le pose, au
   lieu de le laisser flotter dans le fond. */
/* Cadre de metal : un liseré chrome, puis un anneau violet. */
.lecteur { position:relative; aspect-ratio:9/16; background:#000; border-radius:16px; overflow:hidden;
           border:1px solid color-mix(in srgb, var(--accent) 50%, transparent);
           box-shadow:0 18px 50px var(--ombre), 0 0 0 1px rgba(255,255,255,.08), 0 0 0 5px var(--accent-soft),
                      0 0 40px color-mix(in srgb, var(--accent) 14%, transparent); }
.lecteur video { width:100%; height:100%; object-fit:contain; display:block; }
.lecteur .attente { position:absolute; inset:0; display:grid; place-items:center; align-content:center; gap:14px; padding:30px;
                    text-align:center; color:var(--dim); }
/* La bande defile : assez de marge autour pour que le cadre du clip choisi
   (contour + 2 px d'ecart) ne soit pas rogne, sans decaler l'alignement. */
.bande-clips { display:flex; gap:8px; overflow-x:auto; padding:6px 6px 10px; margin:0 -6px; }
.bande-clips button { flex:none; width:64px; aspect-ratio:9/16; border-radius:8px; border:1px solid var(--line);
                      background:#05050a center/cover; cursor:pointer; position:relative; padding:0; }
.bande-clips button[aria-current="true"] { outline:2px solid var(--accent); outline-offset:2px; }
/* Clip sans image encore (en file, en rendu, en echec) : une plaque sombre et
   un clap au centre, plutot qu'un rectangle noir vide. */
.bande-clips button.sans-image { display:grid; place-items:center; color:var(--dim);
  background:linear-gradient(160deg, color-mix(in srgb, var(--accent) 10%, var(--surface-2)), var(--surface)); }
.bande-clips button.sans-image > .svg-ic { width:20px; height:20px; opacity:.55; }
.bande-clips button i { position:absolute; left:3px; top:3px; font:600 10px/16px var(--mono); width:16px; height:16px; border-radius:5px;
                        font-style:normal; color:var(--sur-plein); background:var(--c, var(--st-off)); }

/* Reglage de volume des ecoutes : une forme d'onde n'a pas les commandes
   natives d'une video, il lui faut les siennes. */
.volume { display:inline-flex; align-items:center; gap:8px; padding:3px 10px 3px 4px; border-radius:99px; box-shadow:var(--relief);
          border:1px solid transparent; background:var(--acier) padding-box, var(--bord-metal) border-box; }
.volume-muet { display:grid; place-items:center; width:28px; height:28px; padding:0; flex:none; border:0;
               border-radius:50%; background:transparent; color:var(--dim); cursor:pointer; }
.volume-muet:hover { color:var(--accent); background:var(--accent-soft); }
.volume-muet:focus-visible { outline:2px solid var(--accent); outline-offset:1px; }
.volume-muet svg { width:16px; height:16px; fill:none; stroke:currentColor; stroke-width:1.8;
                   stroke-linecap:round; stroke-linejoin:round; }
.volume input[type=range] { width:84px; min-height:24px; }
.volume.muet input[type=range] { opacity:.5; }
@media (max-width:760px) { .volume input[type=range] { width:64px; } }

/* ------------------------------------------------------ onde */
/* Les surfaces de media restent sombres dans les deux themes : une image et
   une forme d onde se lisent sur du noir, et leurs traces sont dessinees au
   canvas, hors des tokens. */
/* Les formes d'onde sont creusees dans le metal : un puits, son bord chrome,
   une ombre interne en haut et un reflet en bas. Sombre en theme sombre,
   argente en theme clair ; les barres de metal sont peintes par
   onde-metal.js, avec les couleurs du theme. */
.onde, .tl-onde { display:block; width:100%; border-radius:12px; border:1px solid transparent;
        background:radial-gradient(120% 90% at 50% 50%, #17142a 0%, #0c0b16 70%) padding-box,
                   linear-gradient(150deg, rgba(255,255,255,.28), rgba(150,120,255,.32) 28%, rgba(255,255,255,.05) 60%, rgba(150,120,255,.24)) border-box;
        box-shadow:inset 0 2px 6px rgba(0,0,0,.6), inset 0 -1px 0 rgba(205,184,255,.1), 0 1px 0 rgba(255,255,255,.04); }
.onde { height:150px; cursor:grab; touch-action:none; }
:root[data-theme="clair"] :is(.onde, .tl-onde) {
  background:radial-gradient(120% 90% at 50% 50%, #ffffff 0%, #ebeaf3 75%) padding-box, var(--bord-metal) border-box;
  box-shadow:inset 0 2px 5px rgba(22,26,56,.14), inset 0 -1px 0 #fff, 0 1px 0 rgba(255,255,255,.8); }
/* Bouton-puce (candidats du refrain, variables de legende). Limite aux
   boutons : les etiquettes .puce gardent leur fond teinte. */
button.puce { background:var(--acier) padding-box, var(--bord-metal) border-box; border:1px solid transparent; border-radius:99px;
              padding:6px 13px; font-size:12.5px; box-shadow:var(--relief);
              cursor:pointer; color:var(--dim); font-variant-numeric:tabular-nums; }
button.puce:hover { color:var(--fg); background:var(--acier-survol) padding-box, var(--bord-violet) border-box; }
button.puce[aria-pressed="true"] { color:#fff; border-color:transparent;
                                    background:var(--metal-violet) padding-box, var(--bord-violet) border-box; box-shadow:var(--relief-violet); }
.lecture-sel { font:500 19px var(--mono); font-variant-numeric:tabular-nums; }
.stats-son { display:flex; gap:26px; flex-wrap:wrap; }
.stats-son b { display:block; font-size:20px; font-variant-numeric:tabular-nums; }
.stats-son span { font:500 12px var(--mono); letter-spacing:.07em; text-transform:uppercase; color:var(--faint); }

/* ----------------------------------------------------- paroles */
.paroles-liste { max-height:520px; overflow-y:auto; display:grid; gap:2px; }
.phrase { display:flex; align-items:flex-start; gap:10px; padding:7px 10px; border-radius:9px; cursor:pointer; border:1px solid transparent; }
.phrase:hover { background:var(--surface-2); }
.phrase.ouverte { background:var(--surface-2); border-color:var(--accent); flex-wrap:wrap; align-items:center; }
.phrase.modifiee { border-color:color-mix(in srgb, var(--st-ok) 55%, transparent); box-shadow:inset 3px 0 0 var(--st-ok); }
/* Une ligne retouchee se repere sans la rouvrir. */
.phrase-modifiee { flex:none; display:inline-flex; align-items:center; gap:4px; align-self:center;
                   font:500 12px var(--mono); color:var(--st-ok); }
.phrase .temps { font:400 12px/1.9 var(--mono); color:var(--faint); width:46px; flex:none; }
.phrase .texte { flex:1; }
.phrase.modifiee .texte { color:var(--st-ok); }
.ecoute { width:26px; height:26px; flex:none; border-radius:7px; border:1px solid var(--line-2); background:transparent;
          color:var(--dim); cursor:pointer; font-size:10px; padding:0; }
.ecoute:hover { color:var(--accent); border-color:var(--accent); }
.mots { flex:1; display:flex; flex-wrap:wrap; gap:6px; min-width:0; }
.mot { position:relative; display:flex; align-items:center; gap:4px; background:var(--surface); border:1px solid var(--line-2); border-radius:8px;
       padding:2px 4px 2px 2px; transition:opacity .15s; }
.mot input { background:transparent; border:0; padding:2px 0; min-height:0; width:auto; box-shadow:none; }
.mot input:focus { box-shadow:none; color:var(--accent); }
.mot.change { border-color:var(--st-ok); }
.mot.change input { background:color-mix(in srgb, var(--st-ok) 14%, var(--surface)); }
.mot button { background:none; border:0; color:var(--faint); cursor:pointer; padding:0 3px; }
.mot button:hover { color:var(--st-err); }
/* Reordonner les mots : poignee a gauche, trait accent la ou le mot tombera. */
.poignee-mot { display:grid; place-items:center; width:18px; align-self:stretch; color:var(--faint); cursor:grab; user-select:none; font-size:14px; }
.poignee-mot:hover { color:var(--accent); }
.poignee-mot:active { cursor:grabbing; }
.mot.glisse { opacity:.35; border-style:dashed; border-color:var(--accent); }
.mot.cible-avant { box-shadow:-4px 0 0 -1px var(--accent); }
.mot.cible-apres { box-shadow:4px 0 0 -1px var(--accent); }
.ajouter-mot { align-self:center; padding:6px 12px; border:1px dashed var(--line-2); border-radius:8px; background:transparent;
               color:var(--dim); font:500 13px var(--sans); cursor:pointer; }
.ajouter-mot:hover { border-color:var(--accent); color:var(--fg); }

/* ------------------------------------------------------- style */
.style-panneau { --p-actif:#FF6B35; --p-texte:#FFFFFF; --p-contour:#000000;
                 display:grid; grid-template-columns:minmax(0,1fr) 250px; gap:24px; align-items:start; }
/* Blocs : sections en carte avec un petit titre en capitales. Partages par
   toute la page du son (details, depot, identite, style des paroles). */
.blocs { display:grid; grid-template-columns:repeat(auto-fit, minmax(260px, 1fr)); gap:12px; align-items:start; }
.bloc { margin:0; min-width:0; display:grid; gap:10px; padding:14px 16px 16px; border:1px solid var(--line);
        border-radius:14px; background:var(--matiere), var(--surface); box-shadow:var(--biseau); }
.bloc.large { grid-column:1 / -1; }
.bloc legend, .bloc-titre { padding:0; margin:0 0 2px; font:600 12px/1.2 var(--sans);
                            letter-spacing:.09em; text-transform:uppercase; color:var(--faint); }
.bloc legend { float:left; width:100%; }
.bloc legend + * { clear:both; }
.bloc small { display:block; margin-top:2px; color:var(--dim); font-size:12px; line-height:1.4; }
/* Reglages avances (style des paroles, textes fixes) : replies sous un bandeau
   de metal qui dit ce qu'il cache, ouverts d'un clic. */
.reglages-avances { grid-column:1 / -1; min-width:0; }
.reglages-avances[open] { display:grid; gap:12px; }
.reglages-avances > summary { list-style:none; display:flex; align-items:center; justify-content:space-between; gap:12px;
  padding:10px 14px; border-radius:12px; cursor:pointer; border:1px solid transparent;
  background:var(--acier) padding-box, var(--bord-metal) border-box; box-shadow:var(--relief); }
.reglages-avances > summary::-webkit-details-marker { display:none; }
.reglages-avances > summary::after { content:""; flex:none; width:8px; height:8px; margin:0 4px 4px 0;
  border-right:2px solid var(--dim); border-bottom:2px solid var(--dim); transform:rotate(45deg); transition:transform .2s; }
.reglages-avances[open] > summary::after { margin:4px 4px 0 0; transform:rotate(-135deg); }
.reglages-avances > summary b { font-weight:600; font-size:13.5px; }
.reglages-avances > summary small { display:block; margin-top:2px; color:var(--dim); font-size:12px; line-height:1.4; }
.reglages-avances > summary:hover { background:var(--acier-survol) padding-box, var(--bord-violet) border-box; }
.reglages-avances > summary:focus-visible { outline:2px solid var(--accent); outline-offset:2px; }
.hab-texte-reglage .reglages-avances > summary { padding:8px 12px; }
@media (prefers-reduced-motion: reduce) { .reglages-avances > summary::after { transition:none; } }
.empile { display:grid; gap:16px; }

/* Cartes de choix : un radio dans un label, ou un bouton aria-pressed */
.choix-cartes { display:grid; grid-template-columns:repeat(auto-fit, minmax(240px, 1fr)); gap:10px; }
.carte-choix { position:relative; display:grid; grid-template-columns:auto minmax(0,1fr); align-items:center; gap:12px;
               padding:10px 14px 10px 10px; border:1px solid var(--line-2); border-radius:12px; background:var(--surface-2);
               color:var(--fg); font:inherit; text-align:left; cursor:pointer; transition:border-color .15s, background .15s; }
.carte-choix:hover { border-color:var(--accent); }
.carte-choix:has(input:checked), .carte-choix[aria-pressed="true"] { border-color:var(--accent); background:var(--accent-soft);
                                                                    box-shadow:inset 0 0 0 1px var(--accent); }
.carte-choix:has(input:focus-visible) { outline:2px solid var(--accent); outline-offset:2px; }
.carte-choix > input { position:absolute; opacity:0; pointer-events:none; }
.choix-icone { display:grid; place-items:center; width:48px; height:48px; border-radius:11px; background:var(--surface-3);
               color:var(--accent); font:700 17px var(--sans); }
.carte-choix[aria-pressed="true"] .choix-icone { background:var(--grad-clair); color:#0d0a22; }
.question-titre { margin:0; font-size:15.5px; font-weight:600; color:var(--fg); }

/* Controle segmente : une valeur parmi deux ou trois */
.reglages-clips { display:grid; grid-template-columns:repeat(auto-fit, minmax(240px, 1fr)); gap:16px 20px; }
.groupe { display:grid; gap:8px; align-content:start; }
.groupe-nom { font-size:13px; font-weight:500; color:var(--fg); }
.segments { display:flex; gap:3px; padding:3px; border:1px solid var(--line-2); border-radius:11px; background:var(--bg); box-shadow:var(--gravure); }
label.segment { display:block; flex:1; position:relative; min-width:0; }
.segment input { position:absolute; opacity:0; pointer-events:none; }
.segment span { display:grid; place-items:center; min-height:34px; padding:4px 8px; border-radius:8px; font-size:13px;
                color:var(--dim); text-align:center; cursor:pointer; transition:background .15s, color .15s; }
.segment:hover span { color:var(--fg); }
/* Valeur choisie : une touche de metal violet qui ressort de la gorge. */
.segment input:checked + span { color:var(--fg);
  background:linear-gradient(180deg, color-mix(in srgb, var(--accent) 26%, var(--surface-3)), color-mix(in srgb, var(--accent) 10%, var(--surface-2)));
  box-shadow:inset 0 1px 0 rgba(255,255,255,.16), inset 0 0 0 1px color-mix(in srgb, var(--accent) 45%, transparent), 0 2px 8px rgba(0,0,0,.25); }
.segment input:focus-visible + span { outline:2px solid var(--accent); outline-offset:1px; }
.segment.desactive span { opacity:.4; cursor:not-allowed; }
.exemple-mode { display:grid; place-items:center; width:78px; height:58px; padding:4px 6px; border-radius:9px;
                background:#101620 linear-gradient(160deg,#2a3550,#101620 70%); text-align:center; color:var(--p-texte);
                font:900 11px/1.15 "Arial Black", Impact, sans-serif;
                text-shadow:-1px -1px 0 var(--p-contour), 1px -1px 0 var(--p-contour), -1px 1px 0 var(--p-contour), 1px 1px 0 var(--p-contour); }
.exemple-mode b { color:var(--p-actif); font-weight:inherit; }

/* Couleurs : pastilles rondes et code hexadecimal */
.teintes { display:grid; gap:8px; }
.teinte { display:grid; grid-template-columns:auto minmax(0,1fr) auto; align-items:center; gap:10px; padding:6px 12px 6px 6px;
          border:1px solid var(--line-2); border-radius:10px; background:var(--surface-2); cursor:pointer; }
.teinte:hover { border-color:var(--accent); }
.teinte code { color:var(--faint); font-size:12px; }
.teinte input[type=color] { width:30px; height:30px; border-radius:50%; overflow:hidden; box-shadow:0 0 0 1px var(--line-2); }
.teinte input[type=color]::-webkit-color-swatch-wrapper { padding:0; }
.teinte input[type=color]::-webkit-color-swatch { border:0; border-radius:50%; }
.teinte input[type=color]::-moz-color-swatch { border:0; border-radius:50%; }
.accent-auto { display:grid; gap:8px; justify-items:start; }
.accent-auto .aide { margin:0; }
.accent-auto [data-auto][aria-pressed="true"] { color:#fff; border-color:transparent;   /* choisi : metal violet */
  background:var(--metal-violet) padding-box, var(--bord-violet) border-box; box-shadow:var(--relief-violet); }

/* Texte : curseurs avec leur valeur */
.curseur { display:grid; grid-template-columns:minmax(0,1fr) auto; align-items:center; gap:6px 12px; }
.curseur .v { font:500 12px var(--mono); color:var(--fg); background:var(--surface-3); border-radius:6px;
                  padding:2px 7px; min-width:36px; text-align:center; }
.curseur input[type=range] { grid-column:1 / -1; width:100%; margin:0; }

/* Options : interrupteurs */
.bascules { display:grid; grid-template-columns:repeat(auto-fit, minmax(220px, 1fr)); gap:10px; }
.bascule-ligne { display:flex; align-items:center; justify-content:space-between; gap:12px; padding:10px 12px;
                 border:1px solid var(--line-2); border-radius:12px; background:var(--surface-2); cursor:pointer; }
/* Interrupteur : une gorge, une bille chrome ; allume, la gorge se remplit de
   metal violet et la bille glisse avec un leger rebond. */
input.bascule { appearance:none; -webkit-appearance:none; flex:none; position:relative; width:40px; height:24px; margin:0;
                border-radius:24px; background:var(--surface-3); border:1px solid var(--line-2); cursor:pointer;
                box-shadow:var(--gravure); transition:background .2s, border-color .2s; }
input.bascule::before { content:""; position:absolute; top:3px; left:3px; width:16px; height:16px; border-radius:50%;
                        background:radial-gradient(circle at 35% 30%, #ffffff, #d8d3e8 45%, #8d86a8 100%);
                        box-shadow:0 1px 3px rgba(0,0,0,.45); transition:transform .28s cubic-bezier(.3,1.5,.5,1); }
input.bascule:checked { background:linear-gradient(180deg, #9a7dff, #4b2ad6 55%, #7a5cff); border-color:transparent;
                        box-shadow:inset 0 1px 0 rgba(255,255,255,.3), 0 0 12px rgba(122,92,255,.35); }
input.bascule:checked::before { transform:translateX(16px); }

/* L'apercu reste a l'ecran pendant les reglages, sous l'en-tete de l'app (58 px). */
.style-apercu { position:sticky; top:70px; margin:0; display:grid; gap:8px; justify-items:center; }
.style-apercu figcaption { margin:0; text-align:center; }
/* Le cadre de l'apercu suit le format du clip, comme celui de l'habillage. */
.apercu-texte.paysage { width:420px; aspect-ratio:16/9; }
.apercu-texte .apercu-ligne, .apercu-texte em { z-index:1; }
.apercu-texte { position:relative; width:250px; aspect-ratio:9/16; border-radius:16px; overflow:hidden; border:1px solid var(--line-2);
                box-shadow:0 24px 60px var(--ombre);
                background:#101620 linear-gradient(160deg,#2a3550,#101620 60%,#241a12) center/cover; cursor:ns-resize;
                touch-action:none; user-select:none; }
/* Ligne d'apercu des paroles. Pas de transform sur la ligne ni sur ses parents :
   il isolerait mix-blend-mode, et les couleurs inversees ne se verraient plus. */
.apercu-ligne { position:absolute; left:0; right:0; padding:0 10px; text-align:center; line-height:1.2; pointer-events:none; }
.apercu-boite { display:inline-block; max-width:100%; word-break:break-word; }
.apercu-boite i { display:inline-block; font-style:inherit; }
.apercu-boite i.pop { animation:ap-pop .16s ease-out; }
.apercu-boite.entree-fondu { animation:ap-fondu .22s ease-out; }
.apercu-boite.entree-glisse { animation:ap-glisse .22s ease-out; }
.apercu-boite.entree-zoom { animation:ap-zoom .2s ease-out; }
.apercu-boite.entree-flou { animation:ap-flou .24s ease-out; }
@keyframes ap-pop { from { transform:scale(1.12); } }
@keyframes ap-fondu { from { opacity:0; } }
@keyframes ap-glisse { from { opacity:0; transform:translateY(60%); } }
@keyframes ap-zoom { from { opacity:0; transform:scale(.6); } }
@keyframes ap-flou { from { filter:blur(6px); opacity:.5; } }
@media (prefers-reduced-motion: reduce) { .apercu-boite, .apercu-boite i { animation:none !important; } }

/* Modeles de style : vignettes figees sur l'image des rushes */
.modeles { display:grid; grid-template-columns:repeat(auto-fill, minmax(108px, 1fr)); gap:8px; }
.modele-carte { display:grid; gap:6px; padding:5px 5px 8px; border:1px solid var(--line-2); border-radius:12px; background:var(--surface-2);
                color:var(--fg); font:500 13px var(--sans); text-align:center; cursor:pointer; transition:border-color .15s, background .15s; }
.modele-carte:hover { border-color:var(--accent); }
.modele-carte[aria-pressed="true"] { border-color:var(--accent); background:var(--accent-soft); box-shadow:inset 0 0 0 1px var(--accent); }
.modele-carte:focus-visible { outline:2px solid var(--accent); outline-offset:2px; }
.modele-vignette { position:relative; display:block; height:68px; border-radius:8px; overflow:hidden;
                   background:#101620 linear-gradient(160deg,#2a3550,#101620 60%,#241a12) center/cover; }
.modele-vignette .apercu-ligne { top:0; bottom:0; display:grid; place-items:center; padding:0 4px; }
.segments-serres span { padding:4px 4px; font-size:12.5px; }
.bascules-serrees { grid-template-columns:1fr; gap:8px; }
.style-clip:not(:empty) { display:grid; gap:10px; margin-top:22px; padding-top:18px; border-top:1px solid var(--line); }
.style-clip h3 { margin:0; }
.style-clip-etat { gap:12px; }
.style-clip-etat p { margin:0; }
.champ-police { display:grid; gap:6px; min-width:0; font-size:13px; color:var(--fg); }
/* Choix de police. Ferme : la police choisie en grand ("aA1"), son nom et son
   style. Ouvert : recherche, filtres par style, cartes "aA1" ; les populaires
   d'abord, le reste derriere "Voir plus". */
.choix-police { min-width:0; }
.choix-police > summary { list-style:none; display:flex; align-items:center; gap:12px; padding:8px 12px; min-height:60px;
                          border:1px solid var(--line-2); border-radius:12px; background:var(--surface-2); cursor:pointer; }
.choix-police > summary::-webkit-details-marker { display:none; }
.choix-police > summary:hover, .choix-police[open] > summary { border-color:var(--accent); }
.choix-police > summary:focus-visible { outline:2px solid var(--accent); outline-offset:2px; }
.choix-police > summary .police-glyphes { flex:none; display:grid; place-items:center; width:56px; height:44px; font-size:24px;
                                          border-radius:8px; background:var(--surface-3); }
.police-actuelle { display:grid; gap:1px; min-width:0; flex:1; }
.police-actuelle .police-nom { font:600 14px/1.3 var(--sans); color:var(--fg); }
.police-famille { font:500 12px/1.3 var(--sans); color:var(--faint); }
.police-changer { flex:none; display:inline-flex; align-items:center; gap:4px; font:500 12.5px var(--sans); color:var(--dim); }
.choix-police[open] .police-changer svg { transform:rotate(180deg); }
.polices-panneau { display:grid; gap:10px; margin-top:8px; padding:12px; border:1px solid var(--line-2); border-radius:12px;
                   background:var(--surface); }
.polices-recherche { display:flex; align-items:center; gap:8px; padding:0 10px; min-height:40px; border:1px solid var(--line-2);
                     border-radius:10px; background:var(--surface-2); color:var(--dim); }
.polices-recherche:focus-within { border-color:var(--accent); }
.polices-recherche input { flex:1; min-width:0; border:0; background:none; color:var(--fg); font:400 14px var(--sans); outline:none; }
.polices-filtres { display:flex; gap:6px; overflow-x:auto; padding-bottom:2px; scrollbar-width:thin; }
.police-filtre { flex:none; min-height:30px; padding:4px 12px; border:1px solid transparent; border-radius:999px; box-shadow:var(--relief);
                 background:var(--acier) padding-box, var(--bord-metal) border-box; color:var(--dim); font:500 12.5px var(--sans); cursor:pointer; }
.police-filtre:hover { color:var(--fg); background:var(--acier-survol) padding-box, var(--bord-violet) border-box; }
.police-filtre[aria-pressed="true"] { color:#fff; background:var(--metal-violet) padding-box, var(--bord-violet) border-box; box-shadow:var(--relief-violet); }
.police-filtre:focus-visible { outline:2px solid var(--accent); outline-offset:2px; }
.polices-cartes { display:grid; grid-template-columns:repeat(auto-fill, minmax(104px, 1fr)); gap:8px; max-height:360px; overscroll-behavior:contain;
                  overflow:auto; padding:2px; }
.police-carte { position:relative; display:grid; justify-items:center; gap:6px; min-width:0; padding:12px 8px 9px;
                border:1px solid var(--line-2); border-radius:12px; background:var(--surface-2); cursor:pointer;
                transition:border-color .15s, background .15s, transform .15s; }
.police-carte:hover { border-color:var(--accent); transform:translateY(-1px); }
.police-carte:has(input:checked) { border-color:var(--accent); background:var(--accent-soft); box-shadow:inset 0 0 0 1px var(--accent); }
.police-carte:has(input:focus-visible) { outline:2px solid var(--accent); outline-offset:2px; }
.police-carte > input { position:absolute; opacity:0; pointer-events:none; }
.police-carte .police-glyphes { display:block; font-size:30px; line-height:1.15; color:var(--fg); white-space:nowrap; }
.police-nom { max-width:100%; font:500 11.5px/1.3 var(--sans); color:var(--dim); white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.police-coche { position:absolute; top:6px; right:6px; display:none; width:18px; height:18px; place-items:center; border-radius:50%;
                background:var(--accent); color:var(--sur-plein); }
.police-coche svg { width:12px; height:12px; }
.police-carte:has(input:checked) .police-coche { display:grid; }
.polices-vide { margin:0; text-align:center; }
.polices-plus { justify-self:center; }
@media (prefers-reduced-motion: reduce) { .police-carte { transition:none; } .police-carte:hover { transform:none; } }
.apercu-texte em { position:absolute; left:0; right:0; height:0; border-top:1px dashed rgba(255,255,255,.3); opacity:0; pointer-events:none; }
.apercu-texte:hover em { opacity:1; }

/* --------------------------------------------------- timeline */
.tl-piste { position:relative; display:flex; height:74px; margin-top:10px; background:#05050a; border:1px solid var(--line);
            border-radius:10px; overflow:hidden; touch-action:none; user-select:none; }
.tl-plan { position:relative; min-width:0; overflow:hidden; cursor:pointer; border-right:1px solid #05050a; background-size:cover; background-position:center; }
.tl-plan::after { content:""; position:absolute; inset:0; background:rgba(5,5,10,.45); }
.tl-plan:hover::after { background:rgba(5,5,10,.15); }
.tl-plan.sel { outline:2px solid var(--accent); outline-offset:-2px; }
.tl-plan.sel::after { background:rgba(205,184,255,.18); }
.tl-plan.court { outline:2px solid var(--st-err); outline-offset:-2px; }
/* Numero et duree poses sur l'image du plan : un fond sombre garantit la lecture quelle que soit l'image. */
.tl-plan .n, .tl-plan .d { position:absolute; left:4px; z-index:2; padding:1px 5px; border-radius:5px; background:rgba(5,5,10,.8); color:#fff; }
.tl-plan .n { top:4px; font:600 12px var(--mono); }
.tl-plan .d { bottom:4px; font:500 11px var(--mono); }
.tl-plan .suppr { position:absolute; top:3px; right:3px; z-index:3; width:20px; height:20px; padding:0; border-radius:6px;
                  background:rgba(5,5,10,.8); border:1px solid var(--line-2); color:#f5f3ff; cursor:pointer; opacity:0; }
.tl-plan:hover .suppr { opacity:1; }
.tl-coupe { position:absolute; top:0; bottom:0; width:17px; margin-left:-8px; cursor:ew-resize; touch-action:none; z-index:3; }
.tl-coupe i { position:absolute; left:7px; top:0; bottom:0; width:3px; background:var(--accent); border-radius:2px; opacity:.6; }
.tl-coupe:hover i, .tl-coupe.act i { opacity:1; width:5px; left:6px; box-shadow:0 0 10px rgba(205,184,255,.85); }
.tl-coupe.act i { background:var(--st-ok); }
.tl-coupe b { position:absolute; left:50%; bottom:3px; transform:translateX(-50%); font:600 10px/14px var(--sans); color:#05050a;
              background:var(--accent); border-radius:5px; padding:0 3px; pointer-events:none; }
.tl-coupe.tr-flash b { background:#fff; } .tl-coupe.tr-fondu b { background:#8fb7ff; }
.tl-coupe.risque b { background:var(--st-err); color:var(--sur-plein); }
.tl-zone { position:relative; min-width:100%; }
/* Piste Textes : un bloc par texte affiche (mot ou ligne), sur le meme temps
   que les plans. Les bords se glissent (debut, fin), le bloc entier se decale.
   Fond toujours sombre comme la piste des plans : couleurs fixes, lisibles. */
.tl-textes-piste { position:relative; height:34px; margin-top:6px; background:#05050a; border:1px solid var(--line);
                   border-radius:8px; overflow:hidden; touch-action:none; user-select:none; }
.tl-texte { position:absolute; top:4px; bottom:4px; display:flex; align-items:stretch; min-width:8px; overflow:hidden;
            border-radius:6px; background:#2a2140; border:1px solid #6b55b8; color:#f5f3ff; cursor:grab; }
.tl-texte:active { cursor:grabbing; }
.tl-texte .mot { flex:1; min-width:0; display:flex; align-items:center; gap:4px; padding:0 6px; pointer-events:none;
                 font:500 11px/1 var(--sans); white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.tl-texte .mot svg { flex:none; width:12px; height:12px; fill:none; stroke:currentColor; stroke-width:2; }
.tl-texte .bord { flex:none; width:7px; cursor:ew-resize; background:#4a3a80; }
.tl-texte:hover .bord { background:#cdb8ff; }
.tl-texte.cale { border-color:#4ade80; }
.tl-texte.cale .bord { background:#1f6b3d; }
.tl-texte.valse { background:#3b1d4f; }
.tl-texte.sel { outline:2px solid #cdb8ff; outline-offset:-1px; z-index:2; }
.tl-texte:focus-visible { outline:2px solid #cdb8ff; outline-offset:1px; }
.tl-texte-reglages { display:grid; gap:10px; margin-top:10px; padding:12px 14px; border:1px solid var(--line);
                     border-radius:12px; background:var(--surface); }
.tl-tx-tete { display:grid; gap:2px; }
.tl-tx-ligne, .tl-tx-valse { display:flex; flex-wrap:wrap; align-items:center; gap:8px 14px; }
.tl-tx-champ { display:inline-flex; align-items:center; gap:6px; }
.tl-tx-champ input { width:86px; }
.tl-tx-valse .puce { cursor:pointer; }
/* Fenetre du zoom : une image du plan rejoue le mouvement, les reglages a cote. */
.zoom-fenetre { display:grid; grid-template-columns:180px minmax(0, 1fr); gap:18px; align-items:start; }
.zoom-apercu { width:180px; height:320px; border-radius:12px; background:#000; border:1px solid var(--line); }
.zoom-reglages { display:grid; gap:12px; min-width:0; }
.zoom-resume { display:flex; flex-wrap:wrap; align-items:center; gap:8px 12px; }
@media (max-width:560px) { .zoom-fenetre { grid-template-columns:minmax(0, 1fr); justify-items:center; } .zoom-reglages { width:100%; } }
.tl-tx-valse .puce.active { --teinte:var(--accent); background:var(--accent); color:var(--sur-plein); border-color:var(--accent); }
.tl-barre { display:flex; align-items:flex-start; justify-content:space-between; gap:12px; flex-wrap:wrap; }
.tl-barre [data-indice] { flex:1; min-width:0; }
.tl-zoom { display:inline-flex; align-items:center; gap:2px; flex:none; padding:2px; border:1px solid transparent;
           border-radius:9px; background:var(--acier) padding-box, var(--bord-metal) border-box; box-shadow:var(--relief); }
.tl-zoom button { min-width:30px; height:28px; padding:0 8px; border:0; border-radius:7px; background:transparent;
                  color:var(--fg); cursor:pointer; font:600 15px/1 var(--sans); }
.tl-zoom button:hover:not(:disabled) { background:color-mix(in srgb, var(--accent) 16%, transparent); }
.tl-zoom button:disabled { opacity:.35; cursor:default; }
.tl-zoom [data-zoom="ajuster"] { font-size:12px; font-weight:500; color:var(--dim); }
.tl-zoom output { min-width:50px; text-align:center; font:500 12px var(--mono); color:var(--dim); }
/* Conteneur qui defile quand la timeline est zoomee ; la marge garde la tete de lecture attrapable aux bords. */
.tl-defile { overflow-x:auto; overflow-y:hidden; padding:0 8px 8px; margin:0 -8px; scrollbar-color:var(--line-2) transparent; }
.tl-tete { position:absolute; top:0; bottom:0; width:15px; margin-left:-7px; cursor:col-resize; touch-action:none; z-index:4; }
.tl-tete i { position:absolute; left:6px; top:0; bottom:0; width:2px; background:#fff; box-shadow:0 0 6px rgba(0,0,0,.9); }
.tl-tete::after { content:""; position:absolute; left:1px; top:0; width:12px; height:9px; background:#fff; border-radius:3px; }
.tl-onde { height:56px; margin-top:6px; border-radius:10px; }
.tl-cadrage { display:grid; grid-template-columns:repeat(5, 1fr); gap:8px; margin:12px 0 4px; }
.tl-vue { position:relative; cursor:ew-resize; touch-action:none; background:#000; border-radius:8px; overflow:hidden; }
.tl-vue img { width:100%; display:block; opacity:.5; }
.tl-fenetre { position:absolute; top:0; bottom:0; border:2px solid var(--accent); box-shadow:0 0 0 999px rgba(0,0,0,.45) inset; pointer-events:none; }
.tl-fenetre.manuel { border-color:var(--st-ok); }
.tl-ecran { position:relative; flex:none; background:#000; border:1px solid var(--line-2); border-radius:11px; overflow:hidden; cursor:pointer;
             /* Les commandes de l'apercu suivent sa largeur (140 px sur telephone,
                ~210 sur ordinateur) : marge, bouton de lecture, hauteur du volume.
                Les cqw se resolvent chez les enfants, dans ce conteneur. */
             container-type:inline-size;
             --tl-bord:clamp(5px, 4.6cqw, 10px); --tl-go:clamp(28px, 19.5cqw, 42px); --tl-vol:clamp(26px, 15.5cqw, 34px); }
.tl-ecran canvas { display:block; width:100%; height:100%; }
.tl-ecran .go { position:absolute; inset:0; display:grid; place-items:center; font-size:34px; background:rgba(5,5,10,.45); transition:opacity .15s; }
.tl-ecran.joue .go { opacity:0; }
.choix-tr { display:flex; gap:6px; flex-wrap:wrap; margin-top:8px; align-items:center; }
.choix-tr .bouton[aria-pressed="true"] { color:#fff; border-color:transparent;   /* choisi : metal violet */
  background:var(--metal-violet) padding-box, var(--bord-violet) border-box; box-shadow:var(--relief-violet); }
.tl-plan.glisse { opacity:.4; }
.tl-plan.cible { box-shadow:inset 3px 0 0 var(--st-ok); }
/* Habillage par-dessus l'apercu : memes classes que les apercus du style et de l'habillage. */
.tl-textes { position:absolute; inset:0; pointer-events:none; }
.tl-ecran .apercu-ligne { z-index:1; }
.tl-remplacer { margin:12px 0 4px; padding:12px; border:1px solid var(--line-2); border-radius:12px; background:var(--surface); display:grid; gap:8px; }
.tl-choix-titre { font:600 12px var(--mono); color:var(--dim); margin-top:4px; }
.tl-bande { display:flex; gap:8px; overflow-x:auto; padding-bottom:4px; scrollbar-color:var(--line-2) transparent; }
.tl-source { flex:none; width:120px; display:grid; gap:4px; padding:4px; border:1px solid var(--line); border-radius:9px; background:var(--bg);
             color:var(--fg); font:500 12px var(--mono); text-align:left; cursor:pointer; }
.tl-source img { width:100%; aspect-ratio:16/9; object-fit:cover; border-radius:6px; background:#05050a; display:block; }
.tl-source span { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.tl-source[aria-pressed="true"] { border-color:var(--accent); background:var(--accent-soft); }
.tl-source:disabled { opacity:.45; cursor:not-allowed; }
/* Moment du rush : le rush entier en bande d'images, la fenetre du creneau
   posee dessus. Hachures = la ou la fenetre ne peut pas aller. */
.tl-rush { position:relative; height:56px; border-radius:9px; overflow:hidden; cursor:pointer; touch-action:none;
           border:1px solid var(--line-2); background:#05050a; }
.tl-rush:focus-visible { outline:3px solid var(--accent); outline-offset:2px; }
.tl-rush-film { position:absolute; inset:0; display:flex; }
.tl-rush-film img { flex:1 1 0; min-width:0; height:100%; object-fit:cover; display:block; }
/* Zones inutilisables assombries, coupes en filets discrets : un rush plein de
   coupes ne doit pas devenir un code-barres. */
.tl-rush-hors { position:absolute; top:0; bottom:0; pointer-events:none; background:rgba(5,5,10,.72); }
.tl-rush-coupe { position:absolute; top:0; bottom:0; width:1px; background:rgba(255,255,255,.28); pointer-events:none; }
.tl-rush-fenetre { position:absolute; top:0; bottom:0; min-width:6px; margin-left:0; pointer-events:none; border-radius:4px;
                   border:3px solid var(--accent); background:color-mix(in srgb, var(--accent) 22%, transparent);
                   box-shadow:0 0 0 2px #05050a, 0 0 0 9999px rgba(5,5,10,.35); }
.tl-rush-temps { display:flex; justify-content:space-between; font-family:var(--mono); margin-top:-2px; }
.tl-moment { display:grid; grid-template-columns:minmax(0,300px) minmax(0,1fr); gap:14px; align-items:start; }
.tl-moment-vue img, .tl-moment-vue video { width:100%; aspect-ratio:16/9; object-fit:contain; border-radius:8px; background:#05050a; display:block; }
.tl-moment-reglage { display:grid; gap:8px; align-content:start; }
.tl-moment-reglage .choix-tr { margin:0; }
/* Pas d'une image ou d'une seconde : quatre boutons sur une ligne, meme sur telephone. */
.tl-pas { display:grid; grid-template-columns:repeat(4, minmax(0,1fr)); gap:6px; }
.tl-pas .bouton { justify-content:center; padding-inline:6px; white-space:nowrap; min-width:0; }
/* Raccourcis clavier : inutiles sur un ecran tactile. */
@media (hover:none) { .tl-clavier { display:none; } }
/* Cadre de la video dans une case de l'ecran partage : la partie visible
   ressort, le reste s'assombrit ; on le glisse en largeur. */
.tl-moment-vue.cadrable { position:relative; overflow:hidden; border-radius:8px; background:#05050a; }
.tl-moment-vue.cadrable[role="slider"] { cursor:ew-resize; touch-action:none; }
.tl-moment-vue.cadrable:focus-visible { outline:3px solid var(--accent); outline-offset:2px; }
.tl-moment-vue.cadrable img, .tl-moment-vue.cadrable video { width:100%; height:100%; aspect-ratio:auto; object-fit:fill; border-radius:0; }
.tl-moment-cadre { position:absolute; border:2px solid var(--accent); border-radius:4px; pointer-events:none;
                   box-shadow:0 0 0 9999px rgba(5,5,10,.55); }
/* Fenetre du choix d'une case : plein ecran sur telephone, et le bouton pour
   valider reste visible en bas pendant qu'on defile. */
.modale-partage .tl-moment-actes { position:sticky; bottom:0; z-index:2; padding:10px 0; background:var(--surface); }
@media (max-width:560px) {
  .voile:has(.modale-partage) { padding:0; align-items:stretch; }
  .modale-partage { width:100%; max-height:100dvh; border-radius:0; padding:16px 16px 12px; }
  .modale-partage .tl-moment-actes .action-forte { flex:1 1 100%; }
}
@media (max-width:700px) { .tl-moment { grid-template-columns:1fr; } }

/* ----------------------------------------------------- calendrier */
.cal-semaine { display:grid; grid-template-columns:repeat(7, minmax(140px, 1fr)); min-width:980px; border:1px solid var(--line); box-shadow:var(--biseau), 0 2px 8px var(--ombre);
               border-radius:14px; overflow:hidden; background:var(--line); gap:1px; }
.cal-defil { overflow-x:auto; }
.cal-jour { background:var(--matiere), var(--surface); min-height:260px; padding:10px; display:flex; flex-direction:column; gap:8px; }
.cal-semaine.compacte .cal-jour { min-height:130px; }
.cal-jour.aujourdhui { background:color-mix(in srgb, var(--accent) 7%, var(--surface)); }
.cal-jour.j0 { box-shadow:inset 0 3px 0 var(--accent); }
.cal-jour.hors { background:repeating-linear-gradient(135deg, var(--surface) 0 10px, var(--surface-2) 10px 20px); }
.cal-jour.survol { outline:2px dashed var(--accent); outline-offset:-4px; }
/* Jour du mois voisin : fond neutre et date en retrait, mais lisible (plus d'opacite). */
.cal-jour.autre-mois { background:var(--bg); }
.cal-jour.autre-mois header { font-weight:400; }
.cal-jour header { display:flex; flex-wrap:wrap; gap:2px 6px; justify-content:space-between; align-items:baseline; font:500 12px/1.3 var(--sans);
                  color:var(--faint); font-variant-numeric:tabular-nums; }
.cal-num { margin-left:2px; font:600 15px/1 var(--sans); letter-spacing:-.02em; color:var(--fg); }
.cal-jour header b { color:var(--accent); font-weight:500; }
.cal-jour header .plein { color:var(--st-warn); }
.pub { display:grid; gap:6px; min-width:0; padding:8px; border-radius:10px; border:1px solid var(--line);
       background:var(--matiere), var(--surface-2); box-shadow:var(--relief);
       color:inherit; text-decoration:none; cursor:grab; transition:border-color .15s, transform .15s; }
.pub:hover { border-color:color-mix(in srgb, var(--accent) 45%, var(--line)); transform:translateY(-1px); }
.pub.glisse { opacity:.4; }
.pub .h { display:flex; flex-wrap:wrap; justify-content:space-between; gap:4px 6px; align-items:center; min-width:0;
          font:600 12.5px/1.2 var(--sans); color:var(--fg); font-variant-numeric:tabular-nums; }
/* Le statut passe a la ligne : une colonne de jour est plus etroite que
   « Action requise », qui debordait de la carte. */
.pub .st { white-space:normal; line-height:1.25; min-width:0; }
.pub .t { font-size:13px; font-weight:600; line-height:1.3; }
.pub .pl { display:flex; flex-wrap:wrap; gap:4px; }
.pub:has(.v) { grid-template-columns:30px minmax(0,1fr); column-gap:8px; }
.pub .v { grid-row:1 / span 3; width:30px; aspect-ratio:9/16; border-radius:5px; background:#05050a center/cover; }
.pub:has(.v) > :not(.v) { grid-column:2; }
.pub select { min-height:28px; padding:2px 6px; font-size:12px; }
.cal-mois { display:grid; grid-template-columns:repeat(7, minmax(0,1fr)); gap:1px; background:var(--line); border:1px solid var(--line); border-radius:14px; overflow:hidden; }
.cal-mois .cal-jour { min-height:110px; }
.cal-mois .pub { padding:5px 6px; }
.jauge { display:flex; align-items:center; gap:10px; }
/* Parametres : lien de parrainage, "pourquoi ce prix". */
.lien-parrain input { flex:1; min-width:0; }
/* Aucun montage : choisir l'instant de la video qui part avec le son. */
.debut-video { display:grid; place-items:center; margin:4px 0 12px; border-radius:12px; background:#05050a; overflow:hidden; }
.debut-video video { display:block; max-width:100%; max-height:46vh; }
.debut-video-actes { margin:8px 0; }
.paliers { list-style:none; margin:4px 0 12px; padding:0; display:grid; gap:8px; }
.paliers li { display:flex; align-items:center; gap:10px; color:var(--dim); }
.paliers li i { display:grid; place-items:center; flex:none; width:26px; height:26px; border-radius:50%; font:600 12px var(--mono);
                font-style:normal; border:1px solid var(--line-2); color:var(--fg); }
.paliers li i svg { width:14px; height:14px; }
.paliers li.atteint { color:var(--fg); }
.paliers li.atteint i { background:var(--st-ok); border-color:transparent; color:var(--bg); }
.pourquoi-prix { margin-top:12px; max-width:70ch; }
.prix-offre { display:flex; flex-wrap:wrap; align-items:baseline; gap:2px 10px; }
.prix-barre { color:var(--dim); font-size:15px; text-decoration:line-through; text-decoration-color:var(--accent);
              text-decoration-thickness:2px; }
.pourquoi-prix summary { cursor:pointer; font-weight:500; padding:4px 0; }
.pourquoi-prix p { margin:6px 0 0; }
.jauge .progres { flex:1; height:8px; }

/* Campagne : la date de sortie de chaque clip, choisie dans un calendrier
   qui grise les jours impossibles (passes, apres l'essai, plafond atteint). */
.dates-clips { list-style:none; margin:0; padding:0; display:grid; gap:8px; }
.date-clip { display:grid; grid-template-columns:34px minmax(0,1fr) auto 112px 34px; align-items:center; gap:10px 14px;
             padding:8px 10px 8px 8px; border:1px solid var(--line-2); border-radius:12px; background:var(--surface-2); }
.date-clip.sans-date { border-style:dashed; background:transparent; }
.date-clip.fixe { background:transparent; border-style:dashed; }   /* deja programme : lecture seule, texte lisible */
.date-clip .v { width:34px; aspect-ratio:9/16; border-radius:6px; background:#05050a center/cover; }
.date-clip-titre { display:flex; align-items:center; gap:6px 8px; flex-wrap:wrap; min-width:0; }
.date-clip input[type=time] { min-height:32px; padding:2px 8px; }
.bouton-date { min-width:200px; justify-content:flex-start; text-transform:capitalize; }
.selecteur-date { position:absolute; z-index:40; width:304px; display:grid; gap:8px; padding:12px; border:1px solid var(--line-2);
                  border-radius:14px; background:var(--surface); box-shadow:0 24px 60px var(--ombre-forte); }
.sd-tete { display:flex; align-items:center; justify-content:space-between; gap:8px; text-transform:capitalize; }
.sd-grille { display:grid; grid-template-columns:repeat(7, minmax(0,1fr)); gap:3px; }
.sd-jsem { padding:2px 0; text-align:center; font:500 12px var(--mono); color:var(--faint); }
.sd-jour { position:relative; display:grid; place-items:center; height:38px; padding:0 0 6px; border:1px solid transparent; border-radius:8px;
           background:transparent; color:var(--fg); font:500 13px var(--sans); cursor:pointer; }
.sd-jour:hover:not(:disabled) { background:var(--surface-3); border-color:var(--line-2); }
.sd-jour i { position:absolute; bottom:2px; left:0; right:0; font:500 11px var(--mono); font-style:normal; color:var(--faint); }
.sd-jour.j0 { box-shadow:inset 0 -2px 0 var(--accent); }
.sd-jour.choisi { background:var(--fg); color:var(--bg); }
.sd-jour.choisi i { color:var(--bg); }
.sd-jour:disabled { color:var(--faint); opacity:.4; text-decoration:line-through; cursor:not-allowed; }
.sd-legende { margin:0; }

/* Heure : la liste du navigateur est remplacee par la fenetre de heure.js. */
input[type=time] { min-width:118px; padding-right:34px; cursor:pointer; font-variant-numeric:tabular-nums;
  background:var(--surface) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%239a94b8' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='10'/%3E%3Cpath d='M12 6v6l4 2'/%3E%3C/svg%3E") no-repeat right 11px center / 16px; }
input[type=time]::-webkit-calendar-picker-indicator { display:none; }
input[type=time]:disabled { cursor:not-allowed; }
.choix-heure { position:absolute; z-index:40; width:272px; display:grid; gap:6px; padding:12px; border:1px solid var(--line-2);
               border-radius:14px; background:var(--surface); box-shadow:0 24px 60px var(--ombre-forte); }
.ch-titre { font:500 11.5px var(--sans); letter-spacing:.08em; text-transform:uppercase; color:var(--faint); }
.ch-titre + .ch-grille { margin-bottom:4px; }
.ch-grille { display:grid; grid-template-columns:repeat(6, minmax(0,1fr)); gap:3px; }
.ch-grille button { height:34px; border:1px solid transparent; border-radius:8px; background:transparent; color:var(--fg);
                    font:500 13px var(--mono); cursor:pointer; }
.ch-grille button:hover { background:var(--surface-3); border-color:var(--line-2); }
.ch-grille button:focus-visible { outline:2px solid var(--accent); outline-offset:1px; }
.ch-grille button.choisi { background:var(--fg); color:var(--bg); }

/* Habillage d'un clip : reglages a gauche, apercu CSS immediat a droite. */
.lecteur.paysage { aspect-ratio:16/9; }
.hab-panneau { display:grid; grid-template-columns:minmax(0,1fr) auto; gap:24px; align-items:start; }
.hab-looks { grid-template-columns:repeat(auto-fill, minmax(100px, 1fr)); }
.look-vignette { height:86px; background-size:cover; background-position:center; }
.hab-curseurs { display:grid; grid-template-columns:repeat(auto-fit, minmax(220px, 1fr)); gap:12px 20px; }
.hab-textes { display:grid; gap:10px; }
.hab-texte-reglage { display:grid; gap:10px; padding:12px; border:1px solid var(--line-2); border-radius:12px; background:var(--surface-2); }
.hab-ligne-reglages { display:grid; grid-template-columns:repeat(auto-fit, minmax(180px, 1fr)); gap:10px; align-items:end; }
.hab-fonds-texte { flex-wrap:wrap; }
.hab-forme { display:block; border:2px solid currentColor; border-radius:4px; }
.hab-forme.vertical { width:14px; height:24px; }
.hab-forme.paysage { width:26px; height:15px; }
/* L'apercu reste a l'ecran pendant les reglages, sous l'en-tete de l'app (58 px). */
.hab-apercu { position:sticky; top:70px; margin:0; display:grid; gap:8px; justify-items:center; }
.hab-apercu figcaption { margin:0; max-width:270px; text-align:center; }
.hab-cadre { position:relative; width:270px; aspect-ratio:9/16; overflow:hidden; border-radius:14px; border:1px solid var(--line-2);
             background:#000; touch-action:none; user-select:none; cursor:move; box-shadow:0 24px 60px var(--ombre); }
.hab-cadre.paysage { width:420px; aspect-ratio:16/9; }
.hab-fond { position:absolute; inset:-8%; }
.hab-milieu { position:absolute; left:50%; top:50%; transform:translate(-50%,-50%); pointer-events:none; }
.hab-sans-image { background:var(--surface-3); }
.hab-bloc { position:absolute; left:4%; right:4%; transform:translateY(50%); text-align:center; font-weight:700; line-height:1.15;
            word-break:break-word; cursor:ns-resize; }
.hab-bloc span { padding:.12em .3em; border-radius:.12em; -webkit-box-decoration-break:clone; box-decoration-break:clone; }
.hab-bloc.fond-aucun span { text-shadow:-1px -1px 0 #000, 1px -1px 0 #000, -1px 1px 0 #000, 1px 1px 0 #000; }
.hab-bloc.fond-boite_blanche span { background:#fff; }
.hab-bloc.fond-boite_noire span { background:#000; }
.hab-bloc.fond-bande_noire { left:0; right:0; padding:.35em 4%; background:#000; }
@media (max-width:900px) {
  /* Une colonne : l'apercu passe en tete, plus petit, et reste en haut. */
  .hab-panneau { grid-template-columns:minmax(0,1fr); }
  .hab-apercu { order:-1; top:58px; z-index:3; padding:8px 0; background:var(--bg); }
  .hab-cadre { width:150px; }
  .hab-cadre.paysage { width:min(300px, 100%); }
  .hab-apercu figcaption { display:none; }
}
@media (max-width:700px) {
  .date-clip { grid-template-columns:34px minmax(0,1fr) 34px; }
  .date-clip .bouton-date, .date-clip input[type=time] { grid-column:2; min-width:0; }
}

/* -------------------------------------------------------- comptes */
.plateformes { display:grid; gap:14px; grid-template-columns:repeat(auto-fill, minmax(300px, 1fr)); }
.plateforme { display:grid; gap:12px; padding:20px; border-radius:14px; background:var(--surface); border:1px solid var(--line); align-content:start; }
.logo { width:40px; height:40px; flex:none; border-radius:11px; display:grid; place-items:center;
        font:700 15px var(--sans); color:#fff; }
.logo.mini { width:22px; height:22px; border-radius:6px; }
.logo.tiktok { background:linear-gradient(135deg,#25f4ee,#000 55%,#fe2c55); }
.logo.instagram { background:radial-gradient(circle at 30% 107%,#fdf497 0%,#fd5949 45%,#d6249f 60%,#285aeb 90%); }
.logo.youtube { background:#ff0033; }

/* -------------------------------------------------------- tarifs */
.offres { display:grid; gap:14px; grid-template-columns:repeat(auto-fill, minmax(220px, 1fr)); }
/* Colonne : le bouton (ou "Offre actuelle") tombe en bas de chaque carte,
   a la meme hauteur partout quelle que soit la longueur de la liste. */
.offre { padding:18px; border-radius:14px; border:1px solid transparent; display:flex; flex-direction:column; gap:8px;
         background:var(--matiere) padding-box, linear-gradient(var(--surface), var(--surface)) padding-box, var(--bord-metal) border-box;
         box-shadow:var(--biseau); }
/* Offre actuelle : son bord de metal s'allume en violet. */
.offre.actuelle { border-color:var(--accent);
                  background:linear-gradient(160deg, var(--accent-soft), transparent 60%), var(--matiere), var(--surface);
                  box-shadow:var(--biseau), 0 0 0 1px var(--accent) inset, 0 12px 36px color-mix(in srgb, var(--accent) 16%, transparent); }
.offre h3 { font:600 24px/1.1 var(--serif); letter-spacing:-.035em; }
.offre > ul { margin-bottom:6px !important; }
.offre > .bouton, .offre > .st { margin-top:auto; }
.offre > .st { align-self:flex-start; }

@media (max-width:900px) {
  .validation { grid-template-columns:minmax(0,1fr); }
  .lecteur { max-width:360px; margin:0 auto; width:100%; }
  .style-panneau { grid-template-columns:minmax(0,1fr); }
  .apercu-texte { margin:0 auto; }
  /* Une colonne : l'apercu passe en tete, plus petit, et reste en haut. */
  .style-apercu { order:-1; top:58px; z-index:3; padding:8px 0; background:var(--bg); }
  .style-apercu .apercu-texte { width:150px; }
  .style-apercu .apercu-texte.paysage { width:min(300px, 100%); }
  .style-apercu figcaption { display:none; }
  .grille.deux, .champs.deux { grid-template-columns:minmax(0,1fr); }
}
@media (max-width:760px) {
  .haut { padding:0 12px; gap:8px; -webkit-backdrop-filter:none; backdrop-filter:none; background:var(--bg); }
  .marque span { display:none; }
  /* La barre de navigation passe en bas de l'ecran. Elle vit dans .haut, et un
     backdrop-filter fait de son porteur le bloc conteneur des positions fixes :
     avec le flou, elle se serait posee EN HAUT, sur l'en-tete. On retire donc le
     flou a cette largeur et l'en-tete devient opaque. */
  .nav { position:fixed; left:0; right:0; bottom:0; margin:0; z-index:35; justify-content:space-around;
         background:var(--bg); border-top:1px solid var(--line-2); padding:6px 4px calc(6px + env(safe-area-inset-bottom)); }
  .nav a { flex-direction:column; gap:2px; font-size:12px; padding:6px 8px; min-width:64px; }
  .nav a svg { width:20px; height:20px; }
  main { padding:18px 14px 110px; }
  .actions-validation .bouton { min-height:52px; }
  .toasts { bottom:84px; }
}
@media (prefers-reduced-motion:reduce) {
  * { animation:none !important; transition:none !important; scroll-behavior:auto !important; }
}

/* ------------------------------------------------------------ compte
   Connexion, inscription, mot de passe : une carte centree, hors de l'app. */
.page-compte { min-height:100vh; }
.compte { min-height:100vh; display:grid; place-content:center; justify-items:center; gap:22px;
          padding:40px 16px; }
.compte-marque { font-size:17px; }
.compte-marque.marque span { display:inline; }   /* l'app le masque sur mobile, pas ici */
.compte-carte { width:min(440px, calc(100vw - 32px)); padding:28px 28px 24px; display:grid; gap:16px; }
.compte-titre { font:600 32px/1.1 var(--serif); letter-spacing:-.04em; }
.compte-carte p { margin:0; }
.compte-carte .bouton.grand { width:100%; }
.compte-lien-droite { text-align:right; font-size:13px; margin-top:-6px !important; }
.compte-bascule { font-size:13.5px; color:var(--dim); text-align:center; }
.compte-pied { margin:0; }
.mdp { position:relative; }
.mdp input { padding-right:46px; }
.mdp .bouton { position:absolute; right:4px; top:50%; transform:translateY(-50%); min-height:30px; width:36px; padding:0; }
@media (max-width:480px) { .compte-carte { padding:22px 18px 20px; } .compte-titre { font-size:29px; } }
.appareils { list-style:none; margin:0 0 14px; padding:0; display:grid; gap:12px; }
.appareils li { display:flex; flex-wrap:wrap; align-items:center; gap:4px 10px; }
.appareils li .dim { flex-basis:100%; }
/* Double authentification : QR code toujours sur fond blanc (les applis
   lisent mal un code clair sur fond sombre), cle et codes en chasse fixe. */
.qr-a2f { width:max-content; background:#fff; border-radius:12px; padding:6px; margin:4px 0 2px; line-height:0; }
.qr-a2f svg { display:block; width:200px; height:200px; }
.cle-a2f, .codes-secours code { font:500 14px/1.6 var(--mono); letter-spacing:.04em; color:var(--fg); }
.cle-a2f { user-select:all; overflow-wrap:anywhere; }
input.code-a2f { font:500 20px/1 var(--mono); letter-spacing:.18em; text-align:center; }
.codes-secours { display:grid; grid-template-columns:repeat(2, max-content); gap:8px 36px; margin:6px 0 16px; padding-left:22px; }
@media (max-width:420px) { .codes-secours { grid-template-columns:max-content; } }
/* Geste sans retour : la carte le dit avant le bouton. */
.zone-danger { border-color:color-mix(in srgb, var(--st-err) 35%, var(--line)); }
/* Factures Stripe : date, montant, statut, lien. */
.factures { list-style:none; margin:0 0 14px; padding:0; display:grid; gap:8px; }
.factures li { display:flex; flex-wrap:wrap; align-items:baseline; gap:6px 12px; }
/* Filtre : variation au fil du clip et couleur des flashs, sous les looks. */
.hab-variation { display:grid; gap:6px; margin-top:12px; }
.hab-sous-titre { font:600 13px var(--sans); color:var(--fg); }
.hab-variation .segment span { text-align:center; line-height:1.25; }
/* Apercu du viseur de camera (le rendu le dessine avec libass, lyrics._viseur). */
.hab-viseur { position:absolute; inset:5%; pointer-events:none; color:#fff; font:700 9px/1 "Courier Prime Bold", monospace; }
.hab-viseur i { position:absolute; width:14%; aspect-ratio:1; border:2px solid rgba(255,255,255,.85); }
.hab-viseur i:nth-child(1) { top:0; left:0; border-right:0; border-bottom:0; }
.hab-viseur i:nth-child(2) { top:0; right:0; border-left:0; border-bottom:0; }
.hab-viseur i:nth-child(3) { bottom:0; left:0; border-right:0; border-top:0; }
.hab-viseur i:nth-child(4) { bottom:0; right:0; border-left:0; border-top:0; }
.hab-viseur .rec { position:absolute; top:5%; left:6%; }
.hab-viseur .rec::before { content:""; display:inline-block; width:7px; height:7px; margin-right:4px; border-radius:50%; background:#ff3b3b;
                           animation:rec-clignote 1s steps(1) infinite; }
.hab-viseur .tc { position:absolute; top:5%; right:6%; }
@keyframes rec-clignote { 50% { opacity:0; } }
@media (prefers-reduced-motion: reduce) { .hab-viseur .rec::before { animation:none; } }
/* Effet couleur d'un plan, dans l'edition du montage. */
.reglages-couleur { display:grid; gap:8px; margin-top:6px; padding:10px 12px; border:1px solid var(--line-2); border-radius:10px;
                    background:var(--surface); }
/* Detourage d'un plan : texte derriere la personne, image exacte calculee. */
.champ-texte { display:grid; gap:4px; }
.champ-texte input { width:100%; }
.det-apercu { display:flex; flex-wrap:wrap; align-items:center; gap:8px 12px; }
.det-apercu img { flex-basis:100%; max-width:216px; border-radius:8px; border:1px solid var(--line-2); }
/* Cadrage d'un plan, sous la piste : seulement quand il y a un choix. */
.tl-cadrage-bloc { margin-top:14px; }
/* Panneau d'un plan (edition du montage) : en-tete, onglets, choix en vignettes. */
.inspecteur { display:grid; gap:12px; margin-top:8px; padding:14px 16px 16px; border:1px solid var(--line-2); border-radius:14px;
              background:var(--matiere), var(--surface); box-shadow:var(--biseau); }
.insp-tete { display:flex; flex-wrap:wrap; align-items:center; gap:10px 14px; }
.insp-titre { display:flex; align-items:center; gap:8px; color:var(--fg); font-size:15px; }
.insp-actions { display:flex; gap:6px; margin-left:auto; }
.bouton.icone { min-width:36px; padding-inline:8px; }
.seg-boutons { display:inline-flex; flex-wrap:wrap; align-items:center; gap:3px; padding:3px; border:1px solid var(--line-2);
               border-radius:10px; background:var(--bg); justify-self:start; box-shadow:var(--gravure); }
.seg-boutons button { min-height:30px; padding:4px 12px; border:0; border-radius:7px; background:transparent; color:var(--dim);
                      font:500 13px/1 var(--sans); cursor:pointer; }
.seg-boutons button:hover { color:var(--fg); }
.seg-boutons button[aria-pressed="true"] { color:var(--fg);   /* la touche de metal des .segments */
  background:linear-gradient(180deg, color-mix(in srgb, var(--accent) 26%, var(--surface-3)), color-mix(in srgb, var(--accent) 10%, var(--surface-2)));
  box-shadow:inset 0 1px 0 rgba(255,255,255,.16), inset 0 0 0 1px color-mix(in srgb, var(--accent) 45%, transparent), 0 2px 8px rgba(0,0,0,.25); }
.seg-boutons button:focus-visible { outline:2px solid var(--accent); outline-offset:1px; }
.seg-nom { padding:0 6px; color:var(--faint); font-size:12.5px; }
.insp-onglets { display:flex; flex-wrap:wrap; gap:2px; border-bottom:1px solid var(--line-2); }
.insp-onglets button { display:grid; justify-items:start; align-content:center; gap:2px; min-height:44px; margin-bottom:-1px;
                       padding:6px 14px; border:0; border-bottom:2px solid transparent; background:none; color:var(--dim);
                       font:600 14px/1.2 var(--sans); cursor:pointer; white-space:nowrap; }
.insp-onglets button small { color:var(--accent); font:500 11.5px/1.2 var(--sans); }
.insp-onglets button:hover { color:var(--fg); }
.insp-onglets button[aria-selected="true"] { color:var(--fg); border-bottom-color:var(--accent); border-image:var(--grad) 1; }
.insp-onglets button:focus-visible { outline:2px solid var(--accent); outline-offset:-2px; border-radius:6px; }
.insp-panneau { display:grid; gap:12px; }
.insp-quota { display:flex; flex-wrap:wrap; align-items:center; gap:8px; }
.tuiles { display:grid; grid-template-columns:repeat(auto-fill, minmax(84px, 104px)); gap:10px; }
.tuile { display:grid; gap:6px; padding:0; border:0; background:none; color:var(--dim); text-align:center;
         font:500 12.5px/1.25 var(--sans); cursor:pointer; }
.tuile-image { position:relative; display:block; aspect-ratio:3 / 4; overflow:hidden; border-radius:10px; background:var(--bg);
               box-shadow:0 0 0 1px var(--line-2); transition:box-shadow .15s; }
.tuile-image > img, .tuile-bandes, .tuile-rond { position:absolute; inset:0; width:100%; height:100%; }
.tuile-image img { object-fit:cover; }
.tuile-bandes { display:grid; grid-template-columns:repeat(3, 1fr); gap:2px; background:#000; }
.tuile-bandes img, .tuile-rond img { width:100%; height:100%; }
.tuile-rond { clip-path:circle(30% at 50% 45%); }
.tuile-icone { position:absolute; inset:0; display:grid; place-items:center; color:#fff; filter:drop-shadow(0 1px 3px rgb(0 0 0 / .85)); }
.tuile-icone svg { width:26px; height:26px; }
.tuile-coche { position:absolute; top:6px; right:6px; display:grid; place-items:center; width:20px; height:20px; border-radius:50%;
               background:var(--accent); color:var(--bg); }
.tuile-coche svg { width:13px; height:13px; }
.tuile:hover .tuile-image { box-shadow:0 0 0 1px var(--fg); }
.tuile[aria-pressed="true"] { color:var(--fg); }
.tuile[aria-pressed="true"] .tuile-image { box-shadow:0 0 0 2px var(--accent); }
/* Ecran partage : schema des cases au format du clip ; chaque case est un
   bouton avec l'image de sa video, le fond (couleur des traits) passe entre. */
.partage-aide p { margin:0; }
.partage-aide ol { margin:4px 0 0; padding:0; list-style:none; display:grid; gap:2px; }
.partage-corps { display:grid; grid-template-columns:150px minmax(0,1fr); gap:16px; align-items:start; }
.partage-schema { display:grid; position:relative; width:150px; border-radius:10px; overflow:hidden; box-shadow:0 0 0 1px var(--line-2); }
.partage-case-titre { margin:0; display:flex; align-items:center; gap:6px; font-size:13px; }
.partage-case-titre .svg-ic { width:15px; height:15px; color:var(--accent); }
.partage-schema.diagonale { display:block; }
.partage-rang { display:grid; min-height:0; }
.partage-case { position:relative; min-width:0; min-height:0; padding:0; border:0; cursor:pointer; color:#fff;
  background:#14121f center/cover; display:grid; place-items:end center; font:600 10.5px/1.2 var(--sans); }
.partage-schema.diagonale .partage-case { position:absolute; inset:0; }
.partage-case span { margin-bottom:4px; padding:1px 5px; border-radius:99px; background:rgb(5 5 10 / .7); }
.partage-case.auto { background:repeating-linear-gradient(135deg, #1b1830 0 6px, #232038 6px 12px); }
.partage-case.soi span { background:var(--accent); color:var(--sur-plein, #0b0b12); }
.partage-case[aria-pressed="true"] { outline:2px solid var(--accent); outline-offset:-2px; z-index:1; }
.partage-case:focus-visible { outline:2px solid var(--fg); outline-offset:-3px; z-index:2; }
.partage-case-reglage { display:grid; gap:10px; min-width:0; }
/* Fenetre du choix de la video d'une case : le selecteur de rush et de moment
   de "Changer les images", en grand. */
.modale-partage .corps { display:grid; gap:12px; color:var(--fg); }
/* Fenetre de l'ecran partage : les reglages, l'apercu du plan a droite. */
.partage-fenetre { display:grid; grid-template-columns:minmax(0,1fr) 180px; gap:20px; align-items:start; }
.partage-reglages { display:grid; gap:12px; min-width:0; }
.partage-apercu { margin:0; display:grid; gap:6px; position:sticky; top:0; }
.partage-apercu video, .partage-apercu-attente { width:100%; border-radius:10px; background:#000; box-shadow:0 0 0 1px var(--line-2); }
.partage-apercu-attente { aspect-ratio:9/16; display:grid; place-items:center; text-align:center; padding:10px; }
.partage-apercu .tourne { animation:tourne-anneau 1.1s linear infinite; vertical-align:-3px; }
@media (max-width:640px) {
  .partage-fenetre { grid-template-columns:minmax(0,1fr); }
  .partage-apercu { position:static; order:-1; width:130px; justify-self:center; }
}
/* Resume dans l'onglet Effet : le schema, la disposition, le bouton. */
.partage-resume { display:flex; gap:14px; align-items:center; }
.partage-resume .partage-schema { width:64px; flex:none; }
.partage-resume .partage-case span { display:none; }
.partage-resume-texte { display:grid; gap:4px; justify-items:start; }
@media (max-width:520px) { .partage-corps { grid-template-columns:minmax(0,1fr); } }
/* Mini-rendu d'un plan : la video, et sa vitesse de lecture. */
.rendu-plan { display:grid; gap:8px; justify-items:start; }
.rendu-plan video { width:min(100%, 220px); border-radius:10px; background:#000; box-shadow:0 0 0 1px var(--line-2); }
.rendu-plan .tourne { animation:tourne-anneau 1.1s linear infinite; vertical-align:-3px; }
@media (prefers-reduced-motion: reduce) { .rendu-plan .tourne { animation:none; } }
/* Partiel : une partie seulement des plans selectionnes a ce choix. */
.tuile[aria-pressed="mixed"] { color:var(--fg); }
.tuile[aria-pressed="mixed"] .tuile-image { box-shadow:0 0 0 2px color-mix(in srgb, var(--accent) 45%, transparent); }
.tuile-coche.partiel { background:color-mix(in srgb, var(--accent) 55%, var(--bg)); }
.tuile:focus-visible { outline:none; }
.tuile:focus-visible .tuile-image { box-shadow:0 0 0 2px var(--bg), 0 0 0 4px var(--accent); }
.tuile:disabled { color:var(--faint); cursor:not-allowed; }
.tuile:disabled .tuile-image img { filter:grayscale(1) brightness(.35) !important; }
@media (prefers-reduced-motion: reduce) { .tuile-image { transition:none; } }
/* Le panneau du plan prend toute la largeur ; le zoom, qui commande la piste,
   passe sur sa ligne juste au-dessus d'elle. Une grille ne descend pas sous la
   largeur de son contenu sans minmax(0, 1fr). */
.tl-barre [data-indice] { flex:1 1 100%; }
.tl-barre .tl-zoom { margin-left:auto; }
.inspecteur, .insp-panneau { grid-template-columns:minmax(0, 1fr); }
/* Edition du montage : l'apercu a gauche reste visible pendant les reglages du
   plan, a droite. A l'arret il montre l'image du plan, effet compris ; le
   bouton lecture est une pastille dans le coin, plus un voile sur l'image. */
.tl-haut { display:grid; grid-template-columns:auto minmax(0, 1fr); align-items:start; gap:18px; margin:14px 0 10px; }
.tl-colonne-ecran { position:sticky; top:84px; display:grid; gap:10px; justify-items:start; }
.tl-colonne-ecran [data-cote] { max-width:240px; }
/* Volume de l'apercu, dans l'image : en bas, a droite du bouton de lecture,
   sur le meme verre sombre (l'image est sombre dans les deux themes). */
.tl-ecran .volume { position:absolute; left:calc(var(--tl-go) + var(--tl-bord) * 2); right:var(--tl-bord);
                    bottom:calc(var(--tl-bord) + (var(--tl-go) - var(--tl-vol)) / 2); height:var(--tl-vol); z-index:2;
                    gap:clamp(3px, 3cqw, 8px); padding:2px clamp(6px, 5cqw, 10px) 2px 2px;
                    background:rgb(5 5 10 / .62); box-shadow:0 0 0 1px rgb(255 255 255 / .18); border:0;
                    backdrop-filter:blur(6px); cursor:default; }
.tl-ecran .volume-muet { color:#fff; width:calc(var(--tl-vol) - 4px); height:calc(var(--tl-vol) - 4px); }
.tl-ecran .volume-muet svg { width:calc(var(--tl-vol) * .47); height:calc(var(--tl-vol) * .47); }
.tl-ecran .volume input[type=range] { flex:1; width:auto; min-width:0; min-height:0; }
.tl-reglages { display:grid; gap:12px; min-width:0; }
.tl-reglages .inspecteur { margin-top:0; }
.tl-ecran .go { inset:auto; left:var(--tl-bord); bottom:var(--tl-bord); width:var(--tl-go); height:var(--tl-go); border-radius:50%; font-size:18px;
                background:rgb(5 5 10 / .62); box-shadow:0 0 0 1px rgb(255 255 255 / .18); }
.tl-ecran .go svg { width:calc(var(--tl-go) * .43); height:calc(var(--tl-go) * .43); }
@media (max-width:760px) {
  .tl-haut { grid-template-columns:minmax(0, 1fr); }
  .tl-colonne-ecran { top:64px; z-index:3; justify-items:center; padding:6px 0; background:var(--bg); }
  .tl-colonne-ecran [data-cote] { display:none; }
}
/* Reglages fins d'un effet : jauges compactes, nom, jauge et valeur sur une
   ligne, deux colonnes quand la place le permet. */
.reglages-couleur { grid-template-columns:repeat(auto-fit, minmax(260px, 1fr)); gap:6px 18px; padding:10px 12px; }
.reglages-couleur > :not(.curseur) { grid-column:1 / -1; }
.reglages-couleur .curseur { grid-template-columns:minmax(0, 6em) minmax(0, 1fr) 4.6em; gap:10px; min-height:32px; font-size:13px; }
.reglages-couleur .curseur input[type=range] { grid-column:auto; grid-row:1; grid-column-start:2; height:20px; }
.reglages-couleur .curseur > span:first-child { color:var(--dim); white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.reglages-couleur .curseur .v { grid-row:1; grid-column-start:3; text-align:right; }
.insp-famille { margin-top:4px; color:var(--faint); font:600 11.5px/1 var(--sans); letter-spacing:.06em; text-transform:uppercase; }
.tuile-planche { position:absolute; inset:0; background-repeat:no-repeat; }
/* Plein ecran des apercus : le bouton, et le repli agrandi a toute la fenetre. */
.lecteur-agrandir { position:absolute; top:10px; right:10px; z-index:2; display:grid; place-items:center; width:38px; height:38px;
                    border:0; border-radius:50%; background:rgb(5 5 10 / .6); color:#fff; cursor:pointer;
                    box-shadow:0 0 0 1px rgb(255 255 255 / .2); }
.lecteur-agrandir:hover { background:rgb(5 5 10 / .85); }
.lecteur-agrandir:focus-visible { outline:2px solid var(--accent); outline-offset:2px; }
.lecteur.agrandi { position:fixed; inset:0; z-index:200; width:auto; max-width:none; height:auto; margin:0; aspect-ratio:auto;
                   border-radius:0; }
.reglages-clips .groupe-large { grid-column:span 2; }
@media (max-width:640px) { .reglages-clips .groupe-large { grid-column:auto; } }

/* ------------------------------------------------------ reflets au curseur */
/* Cartes cliquables (sons, dossiers, modules d'un clip) : au survol, leur bord
   de metal s'allume la ou passe le curseur (--mx, --my poses par core.js).
   Seul le bord s'eclaire (masque) : le texte garde son contraste. */
.carte-sortie::after, .carte-dossier::after, .action-clip::after {
  content:""; position:absolute; inset:-1px; z-index:1; padding:1.5px; border-radius:inherit; pointer-events:none;
  opacity:0; transition:opacity .25s;
  background:radial-gradient(170px circle at var(--mx, 50%) var(--my, 50%), rgba(241,236,255,.95),
                             color-mix(in srgb, var(--accent) 75%, transparent) 30%, transparent 72%);
  -webkit-mask:linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite:xor; mask-composite:exclude; }
.carte-sortie:hover::after, .carte-dossier:hover::after,
.action-clip:hover:not(:disabled):not([aria-disabled="true"])::after { opacity:1; }
@media (prefers-reduced-motion: reduce) {
  .action-forte::before { animation:none; }
  .modale, .toast, .panneau-cloche { animation:none; }
  input.bascule::before { transition:none; }
}

/* Resilier : en bas de la page Abonnement, un lien discret plutot qu'un bouton,
   mais toujours la, lisible et au clavier (resiliation en trois clics). */
.resiliation { margin:36px 0 8px; }
.lien-discret { padding:2px 0; border:0; background:none; color:var(--dim); font:400 13px var(--sans);
                text-decoration:underline; text-underline-offset:3px; cursor:pointer; }
.lien-discret:hover { color:var(--fg); }
.lien-discret:focus-visible { outline:2px solid var(--accent); outline-offset:3px; border-radius:4px; }
