:root { --bg:#0e0e0f; --card:#18181a; --line:#2a2a2d; --txt:#f2f2f2; --mut:#9a9a9f; --red:#b3121f; --ok:#3fb950; }
* { box-sizing:border-box; }
body { margin:0; background:var(--bg); color:var(--txt); font:16px/1.5 system-ui, -apple-system, "Segoe UI", sans-serif; }
.wrap { max-width:960px; margin:0 auto; padding:24px 16px 64px; }
h1 { font-size:clamp(28px, 6vw, 44px); line-height:1.05; margin:0 0 6px; letter-spacing:-.5px; text-transform:uppercase; }
h1 span { color:var(--red); }
.sub { color:var(--mut); margin:0 0 24px; }
.bar { display:none; }
input[type=search] { width:100%; padding:14px 16px; font-size:17px; border-radius:10px; border:1px solid var(--line); background:var(--card); color:var(--txt); }
input[type=search]:focus { outline:2px solid var(--red); border-color:transparent; }
.opts { display:flex; flex-wrap:wrap; gap:8px; margin-top:10px; align-items:center; }
.tab { padding:6px 14px; border-radius:999px; border:1px solid var(--line); background:none; color:var(--txt); cursor:pointer; font:inherit; font-size:14px; }
.tab[aria-pressed=true] { background:var(--red); border-color:var(--red); }
label.chk { margin-left:auto; color:var(--mut); font-size:14px; display:flex; gap:6px; align-items:center; cursor:pointer; }
.az { display:flex; flex-wrap:wrap; gap:4px; margin:16px 0 8px; }
.az a { color:var(--mut); text-decoration:none; padding:2px 7px; border-radius:4px; font-size:14px; }
.az a:hover { color:var(--txt); background:var(--card); }
.letter { color:var(--red); font-weight:700; margin:24px 0 8px; font-size:20px; }
.card { background:var(--card); border:1px solid var(--line); border-radius:12px; padding:14px 16px; margin-bottom:10px; }
.card h2 { margin:0 0 8px; font-size:18px; }
.card h2 small { color:var(--mut); font-weight:400; font-size:14px; }
/* Accordéon de la vue Par artiste : bouton « n passages », replié par défaut. */
.deplier { background:none; border:0; padding:0; font:inherit; color:inherit; cursor:pointer; }
.deplier::after { content:' ▸'; }
.deplier[aria-expanded=true]::after { content:' ▾'; }
.deplier:hover { color:var(--txt); }
.chips[hidden] { display:none; }
.card:has(> .chips[hidden]) h2, .card h2:only-child { margin-bottom:0; }
.chips { display:flex; flex-wrap:wrap; gap:6px; }
.chip { display:inline-flex; gap:6px; align-items:center; padding:5px 10px; border-radius:8px; background:#222226; color:var(--txt); text-decoration:none; font-size:14px; font-variant-numeric:tabular-nums; }
.chip:hover { background:var(--red); }
button.chip { border:0; font-family:inherit; cursor:pointer; }
.dot { width:7px; height:7px; border-radius:50%; background:var(--mut); flex:none; }
.dot.ok { background:var(--ok); }
table { width:100%; border-collapse:collapse; font-variant-numeric:tabular-nums; }
td, th { text-align:left; padding:9px 8px; border-bottom:1px solid var(--line); font-size:15px; }
th { color:var(--mut); font-weight:500; font-size:13px; }
td a { color:var(--txt); }
.leg { color:var(--mut); font-size:13px; display:flex; gap:14px; margin-top:8px; }
.leg span { display:inline-flex; gap:6px; align-items:center; }
.empty { color:var(--mut); padding:32px 0; text-align:center; }
footer { color:var(--mut); font-size:13px; margin-top:40px; }
footer a { color:var(--mut); }
.inherit { color:inherit; }
.edit { cursor:text; border-bottom:1px dashed transparent; }
.edit:hover { border-bottom-color:var(--mut); }
.edit input { width:7.5em; background:var(--bg); color:var(--txt); border:1px solid var(--red); border-radius:6px; padding:3px 6px; font:inherit; }
.act { background:none; border:0; color:var(--mut); cursor:pointer; font-size:15px; padding:4px 6px; border-radius:6px; }
.act .icone { width:1em; height:1em; vertical-align:-2px; fill:none; stroke:currentColor; stroke-width:2; stroke-linecap:round; stroke-linejoin:round; }
.act:hover { color:var(--txt); background:#222226; }
.act:disabled { opacity:.25; cursor:default; background:none; }
.btn { padding:8px 14px; border-radius:8px; border:0; background:var(--red); color:#fff; font:inherit; cursor:pointer; }
.qui { color:var(--mut); font-size:13px; margin-top:6px; }
.qui button { background:none; border:0; color:var(--txt); text-decoration:underline; cursor:pointer; font:inherit; }
#toast { position:fixed; left:50%; bottom:20px; transform:translateX(-50%); background:#222226; border:1px solid var(--line); padding:10px 16px; border-radius:10px; opacity:0; transition:opacity .2s; pointer-events:none; max-width:calc(100% - 32px); }
#toast.on { opacity:1; }
#toast.err { border-color:var(--red); }
dialog { background:var(--card); color:var(--txt); border:1px solid var(--line); border-radius:12px; max-width:420px; width:calc(100% - 32px); }
dialog label { display:block; margin:10px 0 4px; color:var(--mut); font-size:14px; }
dialog input, dialog select { width:100%; padding:8px 10px; background:var(--bg); color:var(--txt); border:1px solid var(--line); border-radius:8px; font:inherit; }
dialog .pied { display:flex; gap:8px; justify-content:flex-end; margin-top:16px; }
dialog .pied .pied-gauche { margin-right:auto; }
/* Page Vidéos en cartes */
.grille-videos { display:grid; grid-template-columns:repeat(auto-fill, minmax(280px, 1fr)); gap:16px; }
.carte-video { background:var(--card); border:1px solid var(--line); border-radius:12px; overflow:hidden; display:flex; flex-direction:column; }
.carte-video-haut { position:relative; display:flex; align-items:center; min-height:6.5em; padding:0 18px; background:var(--bg); border-bottom:1px solid var(--line); }
.carte-video-num { font-size:3.5em; font-weight:800; line-height:1; letter-spacing:-.04em; color:var(--red); }
.carte-video-badge { position:absolute; right:10px; bottom:10px; padding:3px 8px; border-radius:6px; background:var(--card); border:1px solid var(--line); color:var(--txt); font-size:13px; }
.carte-video-badge.vide { background:var(--red); border-color:var(--red); }
.carte-video-modif { position:absolute; top:8px; right:8px; }
.carte-video-corps { display:flex; flex-direction:column; gap:8px; padding:12px 14px 14px; flex:1; }
.carte-video-corps h2 { margin:0; font-size:18px; }
.carte-video-corps .qui { margin:0; }
.carte-video-barre { height:4px; border-radius:2px; background:var(--line); overflow:hidden; }
.carte-video-barre span { display:block; height:100%; background:var(--ok); }
.carte-video-boutons { display:flex; flex-wrap:wrap; align-items:center; gap:8px; margin-top:auto; }
.carte-video-yt { margin-left:auto; color:var(--mut); font-size:13px; }
.dlg-titre { margin-top:0; font-size:18px; }
.nowrap { white-space:nowrap; }
.mode { display:inline-flex; border:1.5px solid var(--red); border-radius:10px; overflow:hidden; margin:0 0 16px; }
.mode[hidden] { display:none; }
.mode button { display:inline-flex; align-items:center; gap:8px; padding:9px 18px; border:0; background:transparent; color:var(--red); font:inherit; font-size:14px; font-weight:700; letter-spacing:.06em; text-transform:uppercase; cursor:pointer; }
.mode button + button { border-left:1.5px solid var(--red); }
.mode button[aria-pressed=true] { background:var(--red); color:#fff; }
.mode button:not([aria-pressed=true]):hover { background:#221416; }
.mode button:focus-visible { outline:2px solid var(--txt); outline-offset:-4px; }
.mode svg { width:17px; height:17px; fill:none; stroke:currentColor; stroke-width:2; stroke-linecap:round; stroke-linejoin:round; }
.btn-connexion { display:inline-flex; align-items:center; padding:8px 13px; border:0; border-radius:8px; background:var(--red); color:#fff; font:inherit; font-size:12px; font-weight:700; letter-spacing:.06em; text-transform:uppercase; cursor:pointer; }
.btn-connexion[hidden] { display:none; }
/* Icône de profil et son menu */
.titre-page { margin:0 0 14px; font-size:20px; }
body.vue-videos .leg, body.vue-videos #filtres { visibility:hidden; }
.profil { position:relative; }
.profil[hidden] { display:none; }
.btn-profil { display:inline-flex; align-items:center; justify-content:center; width:36px; height:36px; padding:0; border:1px solid var(--line); border-radius:50%; background:var(--card); color:var(--txt); cursor:pointer; }
.btn-profil:hover, .btn-profil[aria-expanded=true] { border-color:var(--red); color:var(--red); }
.btn-profil:focus-visible { outline:2px solid var(--txt); outline-offset:2px; }
.btn-profil svg { width:18px; height:18px; fill:none; stroke:currentColor; stroke-width:2; stroke-linecap:round; stroke-linejoin:round; }
.menu-profil { position:absolute; right:0; top:calc(100% + 6px); z-index:20; min-width:220px; padding:6px; background:var(--card); border:1px solid var(--line); border-radius:10px; box-shadow:0 8px 24px rgba(0,0,0,.4); }
.menu-profil[hidden] { display:none; }
.menu-profil-tete { display:flex; flex-direction:column; gap:2px; padding:8px 10px 10px; margin-bottom:4px; border-bottom:1px solid var(--line); }
.menu-profil-tete span { color:var(--mut); font-size:12px; }
.menu-profil button { display:block; width:100%; padding:9px 10px; border:0; border-radius:6px; background:none; color:var(--txt); font:inherit; font-size:14px; text-align:left; cursor:pointer; }
.menu-profil button:hover, .menu-profil button:focus-visible { background:var(--bg); outline:none; }
.lien-fiche { color:inherit; text-decoration:none; border-bottom:1px solid var(--line); }
.lien-fiche:hover { color:var(--red); border-bottom-color:var(--red); }
.retour { color:var(--mut); text-decoration:none; font-size:14px; }
.retour:hover { color:var(--txt); }
.fiche-nom { font-size:clamp(24px, 5vw, 34px); margin:4px 0 6px; }
.fiche-infos { color:var(--mut); margin:0 0 20px; }
.card h3 { margin:0 0 8px; font-size:16px; }
.poignee { cursor:grab; color:var(--mut); user-select:none; width:1.5em; text-align:center; }
.poignee:hover { color:var(--txt); }
tr.glisse { opacity:.4; }
tr.cible td { background:#221416; box-shadow:inset 0 2px 0 var(--red), inset 0 -2px 0 var(--red); }
.badge { display:inline-block; font-size:11px; font-weight:700; letter-spacing:.04em; padding:1px 6px; border-radius:5px; margin-right:6px; vertical-align:1px; font-style:normal; }
.badge.verifie { background:rgba(63,185,80,.15); color:var(--ok); border:1px solid rgba(63,185,80,.45); }
.badge.ia { background:transparent; color:var(--mut); border:1px dashed var(--mut); }
tr.src-ia td { color:var(--mut); }
tr.src-ia td:nth-child(n+2):not(:last-child) { font-style:italic; }
tr.src-ia a, tr.src-ia .lien-fiche { color:var(--mut); }
.chip.src-ia { background:transparent; border:1px dashed var(--line); color:var(--mut); font-style:italic; }
.chip.src-humain { border:1px solid rgba(63,185,80,.35); }
.leg .badge { margin-right:4px; }
/* En-tête */
.entete { position:sticky; top:0; z-index:3; background:rgba(14,14,15,.94); backdrop-filter:blur(8px); border-bottom:1px solid var(--line); }
.entete-in { max-width:1100px; margin:0 auto; padding:20px 20px 0; display:flex; flex-wrap:wrap; align-items:center; gap:0 28px; }
.logo { flex:none; display:inline-flex; align-items:center; flex-wrap:wrap; gap:4px 10px; color:var(--txt); text-decoration:none; line-height:1; }
/* Titre « INDEX » en gros, l'événement cité en sous-titre (renommage du 29-09-2026 :
   le nom de l'événement désigne ce qu'on indexe, il n'est pas présenté comme notre titre). */
.logo-titre { font-weight:800; font-size:24px; letter-spacing:-.3px; }
.logo-sous { font-weight:600; font-size:14px; color:var(--mut); white-space:nowrap; }
.logo-badge { color:#fff; background:var(--red); font-size:11px; font-weight:800; letter-spacing:.1em; text-transform:uppercase; padding:3px 7px; border-radius:4px; white-space:nowrap; }
.officiel { display:inline-flex; align-items:center; gap:4px; color:var(--mut); text-decoration:none; font-size:13px; white-space:nowrap; }
.officiel:hover { color:var(--txt); }
.officiel svg { width:13px; height:13px; fill:none; stroke:currentColor; stroke-width:2; }
.menu-ligne { order:3; flex-basis:100%; display:grid; grid-template-columns:1fr auto 1fr; align-items:center; gap:16px; margin-top:16px; }
.menu { display:flex; gap:28px; min-width:0; overflow-x:auto; scrollbar-width:none; }
.actions { justify-self:end; }
.actions .btn { padding:7px 14px; font-size:13px; white-space:nowrap; }
.menu::-webkit-scrollbar { display:none; }
/* Degrade sur le bord droit tant qu'il reste des onglets a faire defiler
   (classe posee par app.js, retiree une fois le bout atteint). */
.menu.deborde { -webkit-mask-image:linear-gradient(to right, black calc(100% - 40px), transparent); mask-image:linear-gradient(to right, black calc(100% - 40px), transparent); }
.menu .tab { flex:none; background:none; border:0; border-radius:0; padding:10px 0 12px; color:var(--mut); font:inherit; font-size:13px; font-weight:600; letter-spacing:.08em; text-transform:uppercase; cursor:pointer; border-bottom:2px solid transparent; }
.menu .tab:hover { color:var(--txt); }
.menu .tab[aria-pressed=true] { background:none; color:var(--txt); border-bottom-color:var(--red); }
.outils { display:flex; align-items:center; gap:12px; flex:none; margin-left:auto; }
.entete input[type=search] { width:220px; padding:9px 12px; font-size:14px; border-radius:8px; transition:width .2s; }
.entete input[type=search]:focus { width:300px; }
.entete .mode { margin:0; border-width:1px; border-radius:8px; }
.entete .mode button { padding:8px 13px; font-size:12px; gap:6px; }
.entete .mode button + button { border-left-width:1px; }
.entete .mode svg { width:15px; height:15px; }
.entete .qui { max-width:1100px; margin:0 auto; padding:0 20px 8px; }
.entete .qui:empty { display:none; }
.wrap { max-width:1100px; padding:20px 20px 64px; }
.intro { display:flex; flex-wrap:wrap; justify-content:space-between; gap:6px 16px; align-items:baseline; margin-bottom:8px; }
.intro .sub { margin:0; font-size:14px; }
.intro .leg { margin:0; font-size:12px; flex-wrap:wrap; }
.intro .chk { margin:0 6px 0 0; }
@media (max-width:560px) {
  .logo-titre { font-size:19px; }
  .logo-sous { font-size:12px; }
  .logo-badge { letter-spacing:.04em; }
  .entete-in { padding:14px 16px 0; gap:12px 16px; }
  .outils { flex-basis:100%; order:2; margin-left:0; }
  /* minmax(0,1fr) et non 1fr : sinon la colonne refuse de retrecir sous la
     largeur des onglets et le menu passe sous le bouton « + Ajouter un passage ».
     Le menu defile alors horizontalement (il a deja overflow-x:auto). */
  .menu-ligne { grid-template-columns:minmax(0,1fr) auto; margin-top:4px; }
  .menu-ligne > span { display:none; }
  /* stretch et non start : avec start, le menu prend la largeur de ses onglets
     et passe sous le bouton « + Ajouter un passage » (mesure : 323 px contre 208).
     Les onglets restent alignes a gauche, le menu defile horizontalement. */
  .menu { justify-self:stretch; }
  .entete input[type=search], .entete input[type=search]:focus { width:0; flex:1; min-width:0; }
  .entete .mode button { padding:8px 10px; }
  .menu { gap:18px; }
}
.table-passages { table-layout:fixed; }
.table-passages td { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.table-passages .c-poignee { width:2.2em; }
.table-passages .c-video { width:7.5em; }
.table-passages .c-tc { width:6.5em; }
.table-passages .c-cypher { width:5.5em; }
.table-passages .video-et-cypher { display:none; }
.table-passages .cypher-mobile { display:none; }
.menu-cypher { width:100%; font:inherit; background:var(--bg); color:var(--txt); border:1px solid var(--line); border-radius:6px; }
.table-passages .c-actions { width:10em; }
.table-passages td.edit { position:relative; }
.table-passages td.edit input { display:block; width:100%; height:1.5em; margin:0; padding:0; border:0; border-radius:0; background:transparent; color:var(--txt); font:inherit; line-height:inherit; outline:none; box-shadow:inset 0 -2px 0 var(--red); }
@media (max-width:560px) { .table-passages .c-video { width:5.5em; } }
.card { position:relative; }
.card > h2 > .act { position:absolute; top:10px; right:10px; }
/* Deux boutons (carte vidéo : Modifier + Supprimer) : le premier se décale, sinon ils se superposent. */
.card > h2 > .act:not(:last-child) { right:44px; }
.filtres { display:flex; align-items:center; gap:10px; margin:4px 0 12px; }
.filtres label { color:var(--mut); font-size:12px; font-weight:600; letter-spacing:.08em; text-transform:uppercase; }
.filtres select { background:var(--card); color:var(--txt); border:1px solid var(--line); border-radius:8px; padding:7px 10px; font:inherit; font-size:14px; }
.filtres select:focus { outline:2px solid var(--red); border-color:transparent; }
.filtres select:disabled { opacity:.5; cursor:not-allowed; }
/* Ligne de filtres sous le menu (vues Par artiste et Ordre de passage) */
.filtres-ligne { order:4; flex-basis:100%; display:flex; flex-wrap:wrap; align-items:center; gap:10px 24px; padding:10px 0 12px; border-top:1px solid var(--line); }
/* Sans cette regle, display:flex l'emporte sur l'attribut hidden : la ligne resterait visible. */
.filtres-ligne[hidden] { display:none; }
.filtres-ligne label.chk { margin-left:0; }
.filtres-menus { display:flex; flex-wrap:wrap; gap:10px 24px; min-width:0; }
.filtres-ligne .filtres { margin:0; min-width:0; }
.filtres-ligne select { max-width:100%; min-width:0; }
/* Mobile : les trois filtres sur UNE seule ligne (demande d'Alice, 24-09-2026).
   La case se reduit a « Vérifiés », les deux menus se partagent le reste. */
@media (max-width:560px) {
  .hors-mobile { display:none; }
  .filtres-ligne { flex-wrap:nowrap; gap:8px; padding:8px 0 10px; }
  .filtres-ligne label.chk { flex:none; white-space:nowrap; }
  .filtres-menus { flex:1 1 0; flex-wrap:nowrap; gap:8px; }
  .filtres-ligne .filtres { flex:1 1 0; }
  .filtres-ligne select { width:100%; padding-left:6px; padding-right:6px; }
}
.table-passages .c-actions { width:11em; }
.table-passages td.actions-ligne { overflow:visible; text-overflow:clip; white-space:nowrap; text-align:right; }
.table-passages td.poignee.vide { cursor:default; }
.defil-x { overflow-x:auto; }

/* Page Contributeurs (admins, tâche 5) */
.mut { color:var(--mut); }
.table-contributeurs { min-width:600px; }
.table-contributeurs td.actions-ligne { display:flex; flex-wrap:wrap; gap:6px; justify-content:flex-end; text-align:right; }
.table-contributeurs select { background:var(--bg); color:var(--txt); border:1px solid var(--line); border-radius:6px; padding:4px 6px; font:inherit; font-size:14px; }

.table-passages td { height:44px; padding-top:0; padding-bottom:0; line-height:20px; vertical-align:middle; }
.table-passages td.actions-ligne .act { display:inline-block; height:20px; line-height:20px; padding:0 5px; font-size:14px; vertical-align:middle; }
.table-passages .badge { line-height:16px; }
.etiquette { display:inline-block; font-size:11px; font-weight:700; letter-spacing:.05em; text-transform:uppercase; padding:2px 7px; border-radius:5px; margin-right:8px; vertical-align:1px; }
.etiquette.ajout { background:rgba(63,185,80,.15); color:var(--ok); }
.etiquette.modification { background:rgba(88,166,255,.15); color:#58a6ff; }
.etiquette.suppression { background:rgba(179,18,31,.2); color:#ff6b6b; }
.etiquette.restauration { background:rgba(210,153,34,.18); color:#e3b341; }
.etiquette.annulation { background:rgba(154,154,159,.18); color:var(--mut); }
.qui a { color:var(--mut); }
.qui a:hover { color:var(--txt); }
.qui time { cursor:help; }
/* Le lien vers le site officiel est dans l'en-tete en desktop. Sous 900 px il
   n'y tient plus sans ajouter une ligne a l'en-tete colle : il passe alors sur
   la ligne des legendes, juste dessous (choix d'Alice, 26-09-2026). */
.officiel-bas { display:none; }
@media (max-width:900px) {
  .officiel-haut { display:none; }
  .officiel-bas { display:inline-flex; }
}
@media (min-width:561px) and (max-width:900px) {
  .logo-badge { letter-spacing:.04em; }
  .logo-sous { font-size:13px; }
  .entete input[type=search], .entete input[type=search]:focus { width:150px; }
}
/* Page 404 */
.page-erreur { padding-top:48px; }
.page-erreur h1 { margin-top:40px; }
.page-erreur .btn { display:inline-block; text-decoration:none; }
/* Page « À propos » : texte courant lisible */
.page-texte { padding-top:32px; padding-bottom:48px; max-width:760px; }
.page-texte h1 { margin-top:36px; }
.page-texte h2 { margin-top:28px; font-size:18px; }
.page-texte p { line-height:1.6; }
.page-texte a:not(.btn):not(.logo) { color:var(--txt); }
.page-texte .btn { display:inline-block; text-decoration:none; margin-top:12px; }
/* Ecrans etroits (700 px et moins) : chaque passage devient une grille, les actions
   (fleches, lecture, statut, suppression) passent sur une seconde rangee au lieu
   d'etre hors de l'ecran. Avant le 26-09-2026, le tableau faisait 620 px de large
   et il fallait le faire glisser sur le cote pour les atteindre (choix d'Alice). */
@media (max-width:700px) {
  .table-passages, .table-passages tbody { display:block; width:100%; }
  .table-passages thead { display:none; }
  .table-passages tr { display:grid; grid-template-columns:2.2em 5.5em minmax(0,1fr) auto; align-items:center; border-bottom:1px solid var(--line); }
  .table-passages .c-cypher, .table-passages td.c-cypher-cellule { display:none; }
  .table-passages .video-seule { display:none; }
  .table-passages .video-et-cypher { display:inline; }
  .table-passages td { border-bottom:0; height:36px; }
  .table-passages td.poignee { padding:0; text-align:center; text-overflow:clip; }
  .table-passages td.actions-ligne { grid-column:1 / -1; height:auto; padding:0 0 6px; text-align:right; }
  .table-passages td.actions-ligne:empty { display:none; }
  .table-passages td.actions-ligne .act { height:36px; line-height:36px; min-width:36px; padding:0 8px; }
  .table-passages td.actions-ligne .cypher-mobile { display:inline-block; float:left; width:8em; vertical-align:middle; }
  .table-passages td.actions-ligne .cypher-mobile .menu-cypher { height:36px; }
}
/* Ecrans tactiles : la poignee de glisser-deposer est masquee, le glisser-deposer du
   navigateur ne marche pas au doigt. Les fleches font le meme travail (26-09-2026). */
@media (pointer:coarse) {
  .table-passages .c-poignee, .table-passages td.poignee { display:none; }
}
@media (pointer:coarse) and (max-width:700px) {
  .table-passages tr { grid-template-columns:5.5em minmax(0,1fr) auto; }
}
/* Lecteur intégré (fenêtre par-dessus la page, 26-09-2026) */
dialog.lecteur { max-width:760px; width:calc(100% - 32px); padding:0; overflow:hidden; }
dialog.lecteur::backdrop { background:color-mix(in srgb, var(--bg) 80%, transparent); }
.lecteur-haut { display:flex; align-items:center; gap:8px; padding:10px 12px; border-bottom:1px solid var(--line); }
.lecteur-titre { flex:1; min-width:0; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.lecteur-cadre { aspect-ratio:16/9; background:var(--bg); }
.lecteur-cadre iframe, .lecteur-cadre > div { width:100%; height:100%; border:0; display:block; }
.lecteur-erreur { margin:0; padding:10px 12px; color:var(--txt); border-top:1px solid var(--red); }
.lecteur-suivi { display:flex; align-items:baseline; flex-wrap:wrap; gap:4px 12px; padding:10px 12px 0; }
.lecteur-encours { flex:1; min-width:0; overflow-wrap:anywhere; }
/* Navigation dans la vidéo (29-09-2026) : deux boutons de même largeur, nom tronqué. */
.lecteur-nav { display:flex; gap:8px; padding:10px 12px; }
.lecteur-nav .tab { flex:1 1 0; min-width:0; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.lecteur-nav .tab:disabled { opacity:.4; cursor:default; }
.lecteur-bas { display:flex; align-items:center; flex-wrap:wrap; gap:8px; padding:0 12px 10px; }
/* En Lecture depuis l'onglet Vidéos, tout y est caché : pas de rangée vide. */
.lecteur-bas:not(:has(> :not([hidden]))) { display:none; }
.lecteur-bas .tab:disabled { opacity:.4; cursor:default; }
.lecteur-bas #lecteur-ajouter { margin-left:auto; }
.lecteur-bas #lecteur-ajouter[hidden] + #lecteur-caler { margin-left:auto; }
.lecteur-ajout { padding:0 12px 12px; }
.lecteur-ajout[hidden] { display:none; }
.lecteur-reglage { display:flex; flex-wrap:wrap; gap:6px; padding:0 12px 10px; }
.lecteur-reglage[hidden] { display:none; }
.lecteur-reglage .tab { font-variant-numeric:tabular-nums; }
.lecteur-reglage .tab:disabled { opacity:.4; cursor:default; }
.lecteur-reglage .tab[hidden] { display:none; }
/* Téléphone : sauts par rangées de quatre (une en Lecture, deux en Édition), boutons de
   liste côte à côte, sans nom d'artiste (voir lecteur.js). */
@media (max-width:700px) {
  .lecteur-reglage .tab { flex:1 1 calc(25% - 6px); min-width:0; padding:10px 0; }
  .lecteur-nav .tab, .lecteur-bas #lecteur-prec, .lecteur-bas #lecteur-suiv { padding:10px 8px; }
  .lecteur-bas #lecteur-prec, .lecteur-bas #lecteur-suiv { flex:1 1 calc(50% - 4px); min-width:0; }
}
.lecteur-ajout label { margin-top:0; }
.lecteur-ajout .ligne { display:flex; gap:8px; align-items:center; }
.lecteur-ajout .ligne input { flex:1; min-width:0; }
/* Menu Cypher de « + Passage ici » (#46) : à côté du nom ; sur téléphone, rangée à part. */
.lecteur-ajout .choix-cypher { display:flex; align-items:center; gap:6px; min-width:0; }
.lecteur-ajout .choix-cypher[hidden] { display:none; }
.lecteur-ajout .choix-cypher label { margin:0; white-space:nowrap; }
.lecteur-ajout .choix-cypher select { width:auto; max-width:14em; min-width:0; }
@media (max-width:700px) {
  .lecteur-ajout .ligne { flex-wrap:wrap; }
  .lecteur-ajout .choix-cypher { order:5; flex:1 1 100%; }
  .lecteur-ajout .choix-cypher select { flex:1; max-width:none; }
}
@media (max-width:700px) {
  dialog.lecteur { width:100%; max-width:none; height:100%; max-height:none; margin:0; border:0; border-radius:0; display:flex; flex-direction:column; justify-content:center; justify-content:safe center; overflow-y:auto; }
  dialog.lecteur:not([open]) { display:none; }
  dialog.lecteur > * { flex-shrink:0; }
  .lecteur-bas #lecteur-caler, .lecteur-bas #lecteur-ajouter, .lecteur-bas #lecteur-solo, .lecteur-bas #lecteur-meme { margin-left:0; width:100%; order:9; padding:12px; }
  /* « + Passage ici » et « + Solo » côte à côte : une rangée de moins sur téléphone. */
  .lecteur-bas #lecteur-ajouter, .lecteur-bas #lecteur-solo { width:calc(50% - 4px); }
}
/* Vidéo record (#51) : relais sans cyphers. */
dialog label[hidden], dialog select[hidden] { display:none; }
dialog label.case-a-cocher { display:flex; align-items:center; gap:8px; margin-top:14px; color:var(--txt); }
dialog label.case-a-cocher input { width:auto; height:auto; margin:0; padding:0; }
/* Téléphone, « + Record » masqué (pas de Record en base) : « + Passage ici » prend toute la largeur. */
@media (max-width:700px) {
  .lecteur-bas:has(> #lecteur-solo[hidden]) #lecteur-ajouter { width:100%; }
}

/* Lecteur : corbeille seule en fin de rangée (29-09) */
.lecteur-bas .lecteur-corbeille { display:inline-flex; align-items:center; justify-content:center; min-width:44px; padding:0 10px; }
.lecteur-bas .lecteur-corbeille .icone { width:20px; height:20px; }
@media (max-width:700px) { .lecteur-bas .lecteur-corbeille { order:10; margin-left:auto; min-height:44px; } }

/* Sommaire des cyphers d'une partie, dans la carte de la vue Vidéos (29-09). */
.sommaire-cyphers { margin:10px 0 0; font-size:14px; }
.sommaire-cyphers summary { cursor:pointer; color:var(--txt); font-weight:600; }
.sommaire-cyphers ol { list-style:none; margin:8px 0 0; padding:0; display:grid; gap:6px; }
.sommaire-cyphers li { display:flex; flex-wrap:wrap; gap:2px 10px; align-items:baseline; }
.sommaire-noms { flex:1 1 100%; }
.sommaire-cypher { font-weight:700; }
.sommaire-heure { color:var(--mut); font-variant-numeric:tabular-nums; }
.sommaire-noms a { color:var(--txt); }
.grille-videos { align-items:start; }
/* Sommaire en panneau flottant (29-09, demande d'Alice : la consultation ne doit pas déformer la
   page). La carte laisse déborder le panneau ; son en-tête garde les coins arrondis. */
.carte-video { overflow:visible; }
.carte-video-haut { border-radius:11px 11px 0 0; }
.carte-video:has(.sommaire-cyphers[open]) { position:relative; z-index:20; }
.sommaire-cyphers { position:relative; }
.sommaire-cyphers[open] > ol { position:absolute; left:-18px; right:-18px; top:calc(100% + 6px); z-index:20; max-height:min(60vh, 420px); overflow:auto; margin:0; padding:8px 14px; background:var(--card); border:1px solid var(--line); border-radius:10px; box-shadow:0 10px 30px rgba(0,0,0,.35); }
/* Lecteur sur un écran peu haut (29-09, retour d'Alice : boutons sous la vidéo inaccessibles).
   La vidéo rétrécit (16/9 gardé) pour que tout tienne ; en Édition, il y a plus de boutons
   dessous. En dernier recours, la fenêtre défile au lieu de couper. */
@media (min-width:701px) {
  dialog.lecteur { overflow-y:auto; }
  .lecteur-cadre { width:min(100%, max(320px, calc((100vh - 250px) * 16 / 9))); margin-inline:auto; }
  body.mode-edition .lecteur-cadre { width:min(100%, max(320px, calc((100vh - 370px) * 16 / 9))); }
}
/* La corbeille du lecteur reste masquée hors Édition : la règle display ci-dessus l'emportait sur [hidden] (29-09). */
.lecteur-bas .lecteur-corbeille[hidden] { display:none; }
/* Navigation « de la liste » dans la rangée du haut (29-09) : style secondaire, repliée à la ligne si besoin. */
.lecteur-nav { flex-wrap:wrap; }
.lecteur-nav .lecteur-liste { font-weight:500; border-style:dashed; }
.lecteur-nav .lecteur-liste[hidden] { display:none; }
@media (max-width:700px) { .lecteur-nav .lecteur-liste { order:3; flex:1 1 calc(50% - 4px); } }
/* Carte ciblée par un clic sur un nom d'artiste (29-09) : surlignée 2,5 s. */
.card.carte-ciblee { outline:3px solid var(--red); outline-offset:3px; }
/* Sommaire des cyphers : le libellé mène à l'Ordre de passage (29-09). */
.sommaire-aller { display:inline-flex; gap:10px; align-items:baseline; padding:0; border:0; background:none; color:inherit; font:inherit; cursor:pointer; text-decoration:underline; text-underline-offset:3px; }
/* Page d'essai réservée aux admins : rien d'affiché tant que le compte n'est pas vérifié. */
html[data-reserve-admin]:not(.admin-ok) body { visibility:hidden; }
/* Filtres de l'historique (29-09) */
.filtres-histo { display:flex; flex-wrap:wrap; gap:8px; align-items:center; margin:0 0 14px; }
.filtres-histo select { max-width:100%; }
.pseudo-histo { padding:0; border:0; background:none; color:inherit; font:inherit; font-weight:700; cursor:pointer; text-decoration:underline dotted; text-underline-offset:3px; }
