/* ============================================================
   SIGAL v2 — design system (charte « Journées de Lyon »)
   Bebas Neue + Montserrat, orange/cyan/jaune. CSS écrit main,
   aucun framework, aucune dépendance CDN.
   ============================================================ */
@font-face{
  font-family:'Bebas Neue'; font-style:normal; font-weight:400; font-display:swap;
  src:url('../fonts/bebas-neue-latin.woff2') format('woff2');
}
@font-face{
  font-family:'Montserrat'; font-style:normal; font-weight:400 700; font-display:swap;
  src:url('../fonts/montserrat-latin.woff2') format('woff2');
}

:root{
  --jl-orange:#eb1b80; --jl-orange-br:#ff3d9a; --jl-cyan:#36ddf9; --jl-cyan-dk:#0fb9d6;
  --jl-yellow:#f9dd13; --jl-ink:#211e1d; --jl-black:#0b0b0b; --jl-paper:#faf9f8;
  --jl-sand:#f2ecee; --jl-line:#e7ddd9; --jl-muted:#8a807c;
  --jl-green:#1a9850; --jl-red:#d73027;
  --jl-display:'Bebas Neue',Impact,'Arial Narrow',sans-serif;
  --jl-sans:'Montserrat',system-ui,-apple-system,'Segoe UI',Roboto,Arial,sans-serif;
  --radius:8px; --shadow:0 14px 34px -18px rgba(33,30,29,.35);
  --shadow-sm:0 4px 12px -6px rgba(33,30,29,.25);
}

*{ box-sizing:border-box; }
html,body{ margin:0; padding:0; }
body{
  background:var(--jl-paper); color:var(--jl-ink);
  font-family:var(--jl-sans); font-size:14px; line-height:1.5;
  -webkit-font-smoothing:antialiased;
}
h1,h2,h3,h4{ font-family:var(--jl-display); text-transform:uppercase;
  letter-spacing:.015em; font-weight:400; margin:0 0 .4em; }
a{ color:var(--jl-orange); text-decoration:none; }
a:hover{ text-decoration:underline; }

/* --- Boutons --- */
.btn{
  display:inline-flex; align-items:center; gap:6px; cursor:pointer;
  font-family:var(--jl-sans); font-size:.85rem; font-weight:600;
  padding:9px 16px; border-radius:var(--radius); border:2px solid var(--jl-ink);
  background:#fff; color:var(--jl-ink); transition:transform .05s, background .15s, color .15s;
}
.btn:hover{ text-decoration:none; }
.btn:active{ transform:translateY(1px); }
.btn-primary{ background:var(--jl-orange); border-color:var(--jl-orange); color:#fff; }
.btn-primary:hover{ background:var(--jl-orange-br); border-color:var(--jl-orange-br); }
.btn-cyan{ background:var(--jl-cyan-dk); border-color:var(--jl-cyan-dk); color:#fff; }
.btn-cyan:hover{ background:var(--jl-cyan); color:var(--jl-ink); }
.btn-ghost{ background:transparent; border-color:var(--jl-line); color:var(--jl-ink); }
.btn-ghost:hover{ border-color:var(--jl-ink); }
.btn-danger{ background:var(--jl-red); border-color:var(--jl-red); color:#fff; }
.btn-danger:hover{ background:#b81f18; border-color:#b81f18; }
.btn-block{ width:100%; justify-content:center; }
.btn-sm{ padding:5px 10px; font-size:.78rem; }
.btn[disabled]{ opacity:.5; cursor:not-allowed; }

/* --- Formulaires --- */
input,select,textarea{
  font-family:var(--jl-sans); font-size:.9rem; color:var(--jl-ink);
  padding:9px 11px; border:1.5px solid var(--jl-line); border-radius:var(--radius);
  background:#fff; width:100%;
}
input:focus,select:focus,textarea:focus{
  outline:none; border-color:var(--jl-orange);
  box-shadow:0 0 0 3px rgba(242,119,0,.15);
}
label{ display:block; font-weight:600; font-size:.8rem; margin-bottom:14px; }
label input,label select,label textarea{ margin-top:5px; }

/* --- Flash / alertes --- */
.flash{ padding:10px 14px; border-radius:var(--radius); margin-bottom:14px;
  border-left:4px solid var(--jl-orange); background:#fff; box-shadow:var(--shadow-sm); }
.flash-error{ border-color:var(--jl-red); }
.flash-success{ border-color:var(--jl-green); }

/* --- Page de connexion --- */
.login-page{ min-height:100vh; display:grid; place-items:center;
  background:linear-gradient(135deg,#fff,var(--jl-sand)); padding:20px; }
.login-card{
  width:100%; max-width:380px; background:#fff; border:2px solid var(--jl-ink);
  border-radius:12px; box-shadow:var(--shadow); overflow:hidden; padding:34px 30px 30px;
  position:relative;
}
.login-card::before{ content:""; position:absolute; top:0; left:0; right:0; height:6px;
  background:linear-gradient(90deg,var(--jl-orange),var(--jl-cyan)); }
.login-brand{ text-align:center; margin-bottom:22px; }
.login-logo{ display:inline-grid; place-items:center; width:56px; height:56px;
  border-radius:50%; background:var(--jl-orange); color:#fff;
  font-family:var(--jl-display); font-size:1.1rem; margin-bottom:10px; }
.login-logo-img{ display:block; height:143px; width:auto; margin:0 auto 10px; }
.login-brand h1{ font-size:2rem; color:var(--jl-orange); margin:0; }
.login-brand p{ color:var(--jl-muted); font-size:.8rem; margin:2px 0 0; }

/* ============================================================
   Chrome applicatif (SPA)
   ============================================================ */
.app-shell{ min-height:100vh; display:flex; flex-direction:column; }

/* Barre de navigation — STRICTEMENT identique à l'en-tête du site (vitrine) :
   fond crème translucide + flou, bordure basse 2px, gros logo en disque blanc
   débordant sous le trait (contour arrondi), menu Bebas Neue capitales,
   accent orange à l'état actif/survol. Valeurs reprises de site.css. */
.navbar{ position:sticky; top:0; z-index:50;
  background:rgba(250,249,248,.94);
  backdrop-filter:saturate(150%) blur(8px);
  border-bottom:2px solid var(--jl-ink);
  color:var(--jl-ink);
  display:flex; align-items:center; justify-content:flex-start; gap:22px;
  padding:0 24px; min-height:88px; overflow:visible; }
.navbar-brand{ display:flex; align-items:center; line-height:1; flex:0 0 auto; }
.navbar-brand:hover{ text-decoration:none; }
.navbar-logo{ display:block; width:140px; height:143px; flex:0 0 auto;
  align-self:flex-start; margin-top:5px; margin-bottom:-45px;
  border-radius:50%; background:#fff url(../img/logo.png) center/contain no-repeat;
  position:relative; z-index:2; font-size:0; color:transparent; }
.nav-link{ font-family:var(--jl-display); text-transform:uppercase; letter-spacing:.02em;
  font-size:1.08rem; color:var(--jl-ink); padding:7px 9px; border-radius:var(--radius);
  font-weight:400; line-height:1; white-space:nowrap; cursor:pointer; transition:color .15s; }
.nav-link:hover{ color:var(--jl-orange); background:transparent; text-decoration:none; }
.nav-link.active{ color:var(--jl-orange); background:transparent; }
.navbar-spacer{ flex:1; }
.navbar-user{ display:flex; align-items:center; gap:10px; font-size:.82rem; color:var(--jl-muted); }
.navbar-user a{ color:var(--jl-orange); }

/* padding-top généreux : dégage le contenu sous le logo qui déborde du bandeau
   (comme le hero du site laisse de la place sous le logo débordant). */
.container{ width:100%; max-width:1240px; margin:0 auto; padding:48px 20px 60px; }
.page-title{ font-size:1.9rem; color:var(--jl-ink); margin-bottom:2px; }
.page-sub{ color:var(--jl-muted); font-size:.82rem; margin-bottom:20px; }
.selection-banner{ background:linear-gradient(90deg,var(--jl-orange),var(--jl-cyan));
  color:#fff; padding:9px 16px; border-radius:var(--radius); font-weight:600;
  font-size:.82rem; margin-bottom:18px; display:flex; align-items:center; gap:10px; }

/* Panneau de filtres */
.filters{ background:#fff; border:1.5px solid var(--jl-line); border-radius:var(--radius);
  padding:16px; margin-bottom:20px; display:grid;
  grid-template-columns:repeat(auto-fit,minmax(190px,1fr)); gap:14px; box-shadow:var(--shadow-sm); }
.filter-field label{ margin-bottom:6px; }
.filter-inline{ display:flex; align-items:center; gap:8px; }

/* Blocs statistiques */
.stat-grid{ display:grid; grid-template-columns:repeat(auto-fit,minmax(150px,1fr));
  gap:12px; margin-bottom:22px; }
.stat{ background:#fff; border:1.5px solid var(--jl-line); border-left:4px solid var(--jl-orange);
  border-radius:var(--radius); padding:13px 15px; cursor:pointer;
  transition:transform .12s, box-shadow .12s; }
.stat:hover{ transform:translateY(-3px); box-shadow:var(--shadow); }
.stat-value{ font-family:var(--jl-display); font-size:2rem; line-height:1; color:var(--jl-ink); }
.stat-label{ font-size:.72rem; text-transform:uppercase; letter-spacing:.04em;
  color:var(--jl-muted); margin-top:5px; font-weight:600; }
.stat.cyan{ border-left-color:var(--jl-cyan-dk); }
.stat.green{ border-left-color:var(--jl-green); }
.stat.red{ border-left-color:var(--jl-red); }

/* Tableaux */
.table-wrap{ background:#fff; border:1.5px solid var(--jl-line); border-radius:var(--radius);
  overflow-x:auto; box-shadow:var(--shadow-sm); }
table.data{ width:100%; border-collapse:collapse; font-size:.83rem; }
table.data th{ text-align:left; padding:11px 12px; background:var(--jl-sand);
  border-bottom:2px solid var(--jl-line); font-weight:700; white-space:nowrap;
  cursor:pointer; user-select:none; position:sticky; top:0; }
table.data th:hover{ color:var(--jl-orange); }
table.data th .arrow{ opacity:.4; font-size:.7rem; }
table.data th.sorted .arrow{ opacity:1; color:var(--jl-orange); }
table.data td{ padding:9px 12px; border-bottom:1px solid var(--jl-sand); vertical-align:middle; }
table.data tbody tr{ cursor:pointer; }
table.data tbody tr:hover{ background:#fff7ef; }
.row-pinned{ background:#fffaf2; }
.pin-badge{ display:inline-block; background:var(--jl-orange); color:#fff; font-size:.62rem;
  font-weight:700; padding:2px 6px; border-radius:10px; margin-right:6px; vertical-align:middle; }

.badge{ display:inline-block; padding:2px 9px; border-radius:12px; font-size:.72rem;
  font-weight:700; }
.badge-on{ background:#e3f6ea; color:var(--jl-green); }
.badge-off{ background:#fde7e6; color:var(--jl-red); }
.badge-final{ background:var(--jl-yellow); color:var(--jl-ink); }
/* Palmarès : lauréat (or) / texte remarqué (cyan doux) */
.badge-laureat{ background:#e6a700; color:#211e1d; }
.badge-remarque{ background:#d7eef5; color:var(--jl-cyan-dk); }
/* Qualifications de texte : traduction, théâtre jeunesse */
.badge-trad{ background:#ede4f7; color:#6b3fa0; }
.badge-jeunesse{ background:var(--jl-yellow); color:var(--jl-ink); }
/* Commentaires : « non lu » (vif) et compteur au repos */
.badge-unread{ background:var(--jl-orange); color:#fff; }
.badge-quiet{ background:var(--jl-sand); color:var(--jl-muted); }
.badge-moy{ color:#fff; }
tr.row-laureat td{ background:#fff8e6; }
.note-pill{ display:inline-grid; place-items:center; min-width:42px; padding:3px 8px;
  border-radius:8px; font-weight:700; background:var(--jl-ink); color:#fff; }

/* Comité : file partagée, tête de liste = texte en cours pour tous */
.comite-bar{ display:flex; align-items:center; gap:14px; margin-bottom:20px; }
.comite-sync{ font-size:.76rem; color:var(--jl-muted); font-weight:600; }
tr.row-current td{ background:#fff4e0; }
tr.row-current:hover td{ background:#ffefd3; }
.now-badge{ display:inline-block; background:var(--jl-cyan-dk); color:#fff; font-size:.62rem;
  font-weight:700; padding:2px 8px; border-radius:10px; vertical-align:middle;
  text-transform:uppercase; letter-spacing:.03em; }
.new-count{ display:inline-grid; place-items:center; min-width:26px; padding:2px 8px;
  border-radius:11px; background:var(--jl-orange); color:#fff; font-weight:700; font-size:.75rem; }

/* Comité — en-tête de page + interrupteur de mode (Texte / Linéaire) */
/* L'interrupteur reste ancré en haut à droite : le bloc de texte absorbe toute
   la largeur restante, sinon sa longueur (qui change d'un mode à l'autre)
   déplacerait l'interrupteur d'un clic sur l'autre. */
.comite-head{ display:flex; align-items:flex-start; gap:18px; justify-content:space-between; }
.comite-head-txt{ flex:1 1 auto; min-width:0; }
.mode-switch{ display:inline-flex; align-items:center; gap:10px; background:#fff;
  border:1.5px solid var(--jl-line); border-radius:999px; padding:7px 14px;
  box-shadow:var(--shadow-sm); flex:none; }
.mode-lab{ font-family:var(--jl-display); text-transform:uppercase; letter-spacing:.03em;
  font-size:1rem; color:var(--jl-muted); cursor:pointer; line-height:1; }
.mode-lab.active{ color:var(--jl-orange); }
.mode-switch .switch .track.on{ background:var(--jl-orange); }

/* Comité — mode LINÉAIRE : une ligne dépliable par texte */
.lin-list{ display:flex; flex-direction:column; gap:10px; }
.lin-item{ background:#fff; border:1.5px solid var(--jl-line); border-left:4px solid var(--jl-line);
  border-radius:var(--radius); overflow:hidden; }
/* Un texte porteur de nouveaux commentaires se repère au premier coup d'œil. */
.lin-item.unread{ border-left-color:var(--jl-orange); box-shadow:var(--shadow-sm); }
/* En-tête teinté : c'est lui qui sépare visuellement le TEXTE de ses
   commentaires (fond blanc). Teinte rosée quand le texte porte des non-lus. */
.lin-head{ display:flex; align-items:center; gap:10px;
  padding:12px 16px; cursor:pointer; background:var(--jl-sand); }
.lin-head:hover{ background:#e8dee1; }
.lin-item.unread .lin-head{ background:#fde4f0; }
.lin-item.unread .lin-head:hover{ background:#fbd5e8; }
/* Identité du texte : c'est la SEULE zone élastique de l'en-tête. Les titres
   longs se tronquent (titre complet en infobulle) plutôt que de renvoyer les
   badges et les boutons à la ligne — sinon la hauteur des en-têtes varierait
   d'un texte à l'autre et la liste perdrait son alignement. */
.lin-main{ display:flex; align-items:center; gap:10px; flex:1 1 200px; min-width:0; }
.lin-caret{ color:var(--jl-muted); font-size:.9rem; transition:transform .15s;
  transform:rotate(-90deg); flex:none; }
.lin-caret.open{ transform:rotate(0); }
.lin-ref{ font-weight:700; color:var(--jl-muted); font-size:.82rem; flex:none; }
/* Quand la place manque, c'est l'AUTEUR qui cède en premier (shrink 6 contre 1) :
   le titre reste lisible le plus longtemps possible. */
.lin-title{ font-weight:700; font-size:.98rem; flex:0 1 auto; min-width:0;
  white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.lin-author{ color:var(--jl-muted); font-size:.85rem; flex:0 6 auto; min-width:0;
  white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.lin-badges{ display:inline-flex; align-items:center; gap:6px; flex:none; }
.lin-actions{ display:inline-flex; align-items:center; gap:6px; flex:none; }
.lin-head .btn-sm{ padding:5px 9px; }
/* Les boutons « fantôme » sont transparents : sur l'en-tête teinté ils se
   fondraient dans le fond, on leur redonne un fond blanc pour qu'ils se lisent. */
.lin-head .btn-ghost{ background:#fff; }
.lin-head .btn-ghost:hover{ background:#fff; }
.lin-body{ border-top:1px solid var(--jl-line); padding:6px 16px 14px; background:#fff; }
.lin-nocomment{ color:var(--jl-muted); font-size:.85rem; padding:10px 0; }
.lin-comment{ border-left:3px solid var(--jl-line); padding:8px 0 8px 14px; margin-top:12px; }
.lin-comment.unread{ border-left-color:var(--jl-orange); }
.lin-comment-head{ display:flex; align-items:center; gap:8px; flex-wrap:wrap; margin-bottom:4px; }
.lin-who{ font-weight:700; font-size:.88rem; }
.cmt-note{ display:inline-block; padding:2px 9px; border-radius:8px; font-size:.72rem;
  font-weight:700; background:var(--jl-ink); color:#fff; }
.lin-comment-body{ white-space:pre-wrap; font-size:.9rem; }
.lin-comment.unread .lin-comment-body{ font-weight:700; }

/* Multi-select */
.ms{ position:relative; }
.ms-control{ min-height:38px; border:1.5px solid var(--jl-line); border-radius:var(--radius);
  background:#fff; padding:4px 6px; display:flex; flex-wrap:wrap; gap:4px; cursor:pointer;
  align-items:center; }
.ms-control:focus-within{ border-color:var(--jl-orange); box-shadow:0 0 0 3px rgba(242,119,0,.15); }
.ms-chip{ background:var(--jl-orange); color:#fff; font-size:.72rem; font-weight:600;
  padding:2px 6px; border-radius:6px; display:inline-flex; gap:5px; align-items:center; }
.ms-chip b{ cursor:pointer; }
.ms-placeholder{ color:var(--jl-muted); font-size:.82rem; padding:2px 4px; }
.ms-menu{ position:absolute; z-index:30; top:calc(100% + 4px); left:0; right:0;
  background:#fff; border:1.5px solid var(--jl-line); border-radius:var(--radius);
  box-shadow:var(--shadow); max-height:260px; overflow:auto; }
.ms-search{ width:100%; border:0; border-bottom:1px solid var(--jl-line); border-radius:0;
  padding:8px 10px; }
.ms-search:focus{ box-shadow:none; }
.ms-opt{ padding:7px 10px; font-size:.82rem; cursor:pointer; display:flex; gap:8px; align-items:center; }
.ms-opt:hover{ background:var(--jl-sand); }
.ms-opt.sel{ font-weight:700; color:var(--jl-orange); }
.ms-opt-all{ border-bottom:1px solid var(--jl-line); font-weight:700; text-transform:uppercase; letter-spacing:.03em; }
.palmares-pick{ display:inline-flex; align-items:center; gap:6px; font-weight:600; font-size:.82rem; color:var(--jl-ink); }
.palmares-pick select{ width:auto; padding:6px 9px; font-size:.82rem; }

/* Barre dégradée jugement majoritaire */
.gradient-bar{ position:relative; height:16px; border-radius:8px;
  background:linear-gradient(90deg,#1a9850,#66bd63,#a6d96a,#fdae61,#f46d43,#d73027); }
.gradient-cursor{ position:absolute; top:-4px; width:6px; height:24px; border-radius:3px;
  background:#211e1d; border:2px solid #fff; box-shadow:0 1px 4px rgba(0,0,0,.4);
  transform:translateX(-50%); transition:left .4s ease; }
.gradient-wrap{ display:flex; align-items:center; gap:12px; }
.gradient-wrap .glabel{ font-size:.78rem; font-weight:700; white-space:nowrap; }
/* Rang au jugement majoritaire (#1 = grand gagnant) — vue admin uniquement */
.mj-rank{ flex:none; display:inline-grid; place-items:center; min-width:26px; height:22px;
  padding:0 6px; border-radius:11px; background:var(--jl-ink); color:#fff;
  font-family:var(--jl-sans); font-weight:700; font-size:.74rem; }

/* Boutons de vote (jugement majoritaire) */
.vote-row{ display:flex; flex-wrap:wrap; gap:8px; }
.vote-btn{ flex:1; min-width:120px; border:2px solid transparent; border-radius:var(--radius);
  padding:10px 8px; color:#fff; font-weight:700; font-size:.8rem; cursor:pointer;
  text-align:center; opacity:.55; transition:opacity .12s, transform .05s; }
.vote-btn:hover{ opacity:.85; }
.vote-btn.sel{ opacity:1; outline:3px solid var(--jl-ink); outline-offset:2px; }
.vote-btn.neutral{ background:#9aa0a6; }

/* Onglets */
.tabs{ display:flex; gap:4px; border-bottom:2px solid var(--jl-line); margin:22px 0 0; }
.tab{ padding:10px 18px; font-weight:700; font-size:.85rem; cursor:pointer;
  border-bottom:3px solid transparent; margin-bottom:-2px; color:var(--jl-muted); }
.tab.active{ color:var(--jl-orange); border-color:var(--jl-orange); }
.tab-pane{ background:#fff; border:1.5px solid var(--jl-line); border-top:0;
  padding:20px; border-radius:0 0 var(--radius) var(--radius); }
.pdf-viewer{ width:100%; height:80vh; border:1px solid var(--jl-line); border-radius:var(--radius);
  display:block; }

/* Détail texte */
.detail-head{ display:flex; align-items:flex-start; gap:18px; flex-wrap:wrap;
  justify-content:space-between; margin-bottom:6px; }
.detail-head h1{ font-size:2.1rem; margin:0; }
.detail-note{ font-family:var(--jl-display); font-size:2.6rem; color:var(--jl-orange); line-height:1; }
.field-grid{ display:grid; grid-template-columns:repeat(auto-fit,minmax(240px,1fr)); gap:14px 22px; }
/* sous-titres de l'onglet Informations (Texte / Traduction) */
.infos-sub{ font-family:var(--jl-sans); font-size:.78rem; font-weight:700;
  text-transform:uppercase; letter-spacing:.05em; color:var(--jl-orange);
  margin:6px 0 12px; padding-bottom:6px; border-bottom:1px solid var(--jl-line); }
.infos-sub + .field-grid{ margin-bottom:22px; }
.field label{ font-size:.72rem; text-transform:uppercase; letter-spacing:.03em;
  color:var(--jl-muted); font-weight:700; }
.field .val{ font-size:.92rem; }
.file-icons{ display:flex; gap:10px; margin-top:8px; }
.file-icon{ display:inline-flex; align-items:center; gap:6px; padding:8px 12px;
  border:2px solid var(--jl-line); border-radius:var(--radius); font-weight:700; font-size:.8rem; }
.file-icon:hover{ border-color:var(--jl-orange); text-decoration:none; }
.file-icon.disabled{ opacity:.4; pointer-events:none; }
.note-block{ border-left:3px solid var(--jl-orange); padding:6px 14px; margin-bottom:16px; }
.note-block .who{ font-weight:700; margin-bottom:3px; display:flex; align-items:center; gap:8px; }
.note-desc.bold{ font-weight:700; }
/* Édition des notes (admin) */
.note-block-edit textarea{ width:100%; margin-top:6px; }
.note-grade-select{ width:auto; padding:5px 8px; font-size:.85rem; font-weight:700; }
/* Outils par commentaire (admin) : crayon = modifier, croix rouge = supprimer */
.note-tools{ margin-left:auto; display:inline-flex; gap:4px; }
.note-tool{ cursor:pointer; font-size:.9rem; line-height:1; padding:3px 6px; border-radius:6px;
  border:1.5px solid var(--jl-line); color:var(--jl-muted); font-weight:700; }
.note-tool:hover{ border-color:var(--jl-ink); color:var(--jl-ink); }
.note-tool-del{ color:var(--jl-red); border-color:#f0c9c4; }
.note-tool-del:hover{ background:var(--jl-red); border-color:var(--jl-red); color:#fff; }
/* Provenance d'une note saisie/corrigée par l'admin pour le compte d'un lecteur */
.note-origin{ font-size:.7rem; color:var(--jl-muted); font-style:italic; margin-top:4px; }
/* Formulaire « Ajouter un commentaire lecteur » */
.note-add{ background:var(--jl-sand); border-radius:var(--radius); padding:12px 14px; }
.note-add-title{ font-weight:700; margin-bottom:8px; }
.note-add-row{ display:flex; gap:14px; flex-wrap:wrap; }
.note-add-row label{ display:flex; flex-direction:column; gap:4px; font-size:.78rem; font-weight:600; }
.note-add-desc{ display:block; margin-top:10px; font-size:.78rem; font-weight:600; }
.note-add-actions{ display:flex; gap:10px; justify-content:flex-end; margin-top:10px; }
/* Campagne close : la note du lecteur n'est plus modifiable */
.hint-closed{ font-size:.8rem; color:var(--jl-muted); font-style:italic; }
/* Barre d'actions en tête d'onglet (Modifier / Annuler / Enregistrer…) */
.tab-actions{ display:flex; gap:10px; align-items:center; flex-wrap:wrap; margin-bottom:16px; }

/* Interrupteur on/off */
.switch{ display:inline-flex; align-items:center; gap:8px; cursor:pointer; font-weight:600; font-size:.82rem; }
.switch .track{ width:44px; height:24px; border-radius:12px; background:var(--jl-line);
  position:relative; transition:background .15s; }
.switch .track.on{ background:var(--jl-green); }
.switch .knob{ position:absolute; top:2px; left:2px; width:20px; height:20px; border-radius:50%;
  background:#fff; box-shadow:0 1px 3px rgba(0,0,0,.3); transition:left .15s; }
.switch .track.on .knob{ left:22px; }

/* Divers */
.loading{ text-align:center; color:var(--jl-muted); padding:40px; }
.empty{ text-align:center; color:var(--jl-muted); padding:34px; }
.toolbar{ display:flex; gap:10px; align-items:center; flex-wrap:wrap; margin-bottom:16px; }
.modal-back{ position:fixed; inset:0; background:rgba(11,11,11,.45); display:grid;
  place-items:center; z-index:100; padding:20px; }
.modal{ background:#fff; border-radius:12px; max-width:560px; width:100%; padding:24px;
  box-shadow:var(--shadow); max-height:88vh; overflow:auto; }
.modal h3{ color:var(--jl-orange); }
.right{ text-align:right; } .mono{ font-variant-numeric:tabular-nums; }
@media(max-width:640px){
  /* Mobile : logo réduit qui tient dans la barre (pas de débordement, sinon
     overflow-x:auto le rognerait), menu défilable horizontalement. */
  .navbar{ min-height:62px; gap:10px; padding:0 14px; overflow-x:auto; overflow-y:visible; }
  .navbar-logo{ width:58px; height:58px; margin:0; align-self:center; }
  .nav-link{ font-size:.98rem; padding:6px 7px; }
  .container{ padding:18px 12px 50px; }
  /* Trop étroit pour tenir côte à côte : l'interrupteur passe sous le titre. */
  .comite-head{ flex-wrap:wrap; }
  .comite-head-txt{ flex:1 1 100%; }
  /* Idem pour l'en-tête d'un texte : identité, badges puis actions empilés. */
  .lin-head{ flex-wrap:wrap; }
  .lin-main{ flex:1 1 100%; }
  .lin-actions{ margin-left:auto; }
}

/* ============================ Réglages (admin) ============================ */
.set-card{ background:#fff; border:1.5px solid var(--jl-line); border-radius:12px;
  box-shadow:var(--shadow-sm); padding:18px 22px 6px; margin-bottom:22px; }
.set-card h3{ font-size:1.05rem; color:var(--jl-orange); margin:0 0 4px; }
.set-sub{ color:var(--jl-muted); font-size:.8rem; margin-bottom:16px; max-width:70ch; }
.set-grid{ display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:0 18px; }
.set-grid .wide{ grid-column:1/-1; }
.set-note{ color:var(--jl-muted); font-size:.76rem; margin:0 0 14px; max-width:75ch; }
/* Le changement d'année engage toute l'application : il s'annonce avant d'être
   enregistré, sans quoi on le découvre à ses effets. */
.set-warn{ border-left:4px solid var(--jl-yellow); background:#fffdf0;
  padding:10px 14px; border-radius:var(--radius); font-size:.83rem;
  margin:2px 0 16px; }
.set-state{ display:inline-flex; align-items:center; gap:7px;
  font-size:.85rem; font-weight:600; }
.set-dot{ width:9px; height:9px; border-radius:50%; background:var(--jl-muted); }
.set-dot.on{ background:var(--jl-green); }
.set-test{ display:flex; gap:10px; align-items:center; flex-wrap:wrap;
  border-top:1.5px dashed var(--jl-line); padding:14px 0; margin-top:4px; }
.set-test input{ width:auto; min-width:270px; flex:0 1 auto; }
/* Un seul bouton d'enregistrement, en fin de page : il n'y a pas de sauvegarde
   automatique, et une barre flottante se serait superposée aux champs. */
.set-bar{ display:flex; justify-content:flex-end; padding:2px 0 26px; }
@media(max-width:760px){ .set-grid{ grid-template-columns:1fr; } }

/* ============ Inscriptions en attente (arbitrage anti-doublon) ============ */
.att-card{ background:#fff; border:1.5px solid var(--jl-line); border-radius:12px;
  box-shadow:var(--shadow-sm); margin-bottom:26px; overflow:hidden; }
.att-head{ display:flex; align-items:flex-start; gap:14px; padding:16px 20px;
  background:var(--jl-sand); border-bottom:1.5px solid var(--jl-line); }
.att-head h3{ margin:0; font-size:1.15rem; }
.att-meta{ color:var(--jl-muted); font-size:.78rem; margin-top:3px; }
.att-score{ margin-left:auto; text-align:right; white-space:nowrap; }
/* Le commentaire de ce qui est suspect : en tête du bloc, pas dans un repli.
   C'est la première chose que l'administrateur doit lire. */
.att-why{ display:flex; gap:10px; padding:12px 20px; background:#fff6fa;
  border-left:4px solid var(--jl-orange); font-size:.88rem; }
.att-why.done{ background:#f1f8f3; border-left-color:var(--jl-green); }
.att-panes{ display:grid; grid-template-columns:1fr 1fr; gap:0; }
.att-pane{ padding:16px 20px; }
.att-pane + .att-pane{ border-left:1.5px dashed var(--jl-line); }
.att-pane h4{ font-size:.95rem; margin:0 0 12px; letter-spacing:.03em; }
.att-pane h4.left{ color:var(--jl-orange); }
.att-pane h4.right{ color:var(--jl-cyan-dk); }
.att-fields dt{ color:var(--jl-muted); font-size:.7rem; text-transform:uppercase;
  letter-spacing:.05em; margin-top:8px; }
.att-fields dd{ margin:1px 0 0; font-size:.9rem; word-break:break-word; }
/* Le champ qui DIFFÈRE d'un volet à l'autre est surligné : c'est là que se
   joue l'arbitrage, l'œil doit y aller sans chercher. */
.att-fields dd.diff{ background:#fff2c9; border-radius:3px; padding:0 4px; }
.att-pdf{ width:100%; height:420px; border:1.5px solid var(--jl-line);
  border-radius:var(--radius); margin-top:12px; background:var(--jl-sand); }
.att-nopdf{ margin-top:12px; padding:14px; border:1.5px dashed var(--jl-line);
  border-radius:var(--radius); color:var(--jl-muted); font-size:.85rem;
  text-align:center; }
.att-actions{ display:flex; gap:10px; justify-content:flex-end; align-items:center;
  padding:12px 20px; border-top:1.5px solid var(--jl-line); background:#fff; }
.att-sep{ border-top:1.5px solid var(--jl-line); }
@media(max-width:900px){
  .att-panes{ grid-template-columns:1fr; }
  .att-pane + .att-pane{ border-left:0; border-top:1.5px dashed var(--jl-line); }
  .att-pdf{ height:300px; }
}
