/* ==========================================================================
   AS JJB — Backoffice (charte reprise du front : noir / jaune #F8F812)
   ========================================================================== */

/* Polices hébergées en local (revue juridique B2) : mêmes fichiers que
   assets/css/style.css, voir ce fichier pour le détail. */
@font-face {
  font-family: 'Archivo';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url('../../assets/fonts/archivo-variable-latin.woff2') format('woff2');
}
@font-face {
  font-family: 'Archivo';
  font-style: normal;
  font-weight: 800;
  font-display: swap;
  src: url('../../assets/fonts/archivo-variable-latin.woff2') format('woff2');
}
@font-face {
  font-family: 'Archivo';
  font-style: normal;
  font-weight: 900;
  font-display: swap;
  src: url('../../assets/fonts/archivo-variable-latin.woff2') format('woff2');
}
@font-face {
  font-family: 'Montserrat';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('../../assets/fonts/montserrat-variable-latin.woff2') format('woff2');
}
@font-face {
  font-family: 'Montserrat';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url('../../assets/fonts/montserrat-variable-latin.woff2') format('woff2');
}
@font-face {
  font-family: 'Montserrat';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url('../../assets/fonts/montserrat-variable-latin.woff2') format('woff2');
}
@font-face {
  font-family: 'Montserrat';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url('../../assets/fonts/montserrat-variable-latin.woff2') format('woff2');
}

:root {
  --bg: #000000;
  --panel: #0d0d0d;
  --panel-2: #131313;
  --yellow: #F8F812;
  --white: #FBFBFB;
  --navy: #1B252F;
  --gray: #CFCFCF;
  --line: var(--ink-10);
  --font-title: 'Archivo', sans-serif;
  --font-body: 'Montserrat', sans-serif;
  --jjb: #22D3A6;
  --nogi: #3E8EEA;
  --grappling: #D6A431;
  --boxe: #E8567F;

  /* Halos de texte/bordure à opacité variable (ex-rgba(255,255,255,X) en
     dur) : tokenisés pour pouvoir s'inverser en mode clair ci-dessous. */
  --ink-02: rgba(255,255,255,.02);
  --ink-03: rgba(255,255,255,.03);
  --ink-04: rgba(255,255,255,.04);
  --ink-05: rgba(255,255,255,.05);
  --ink-06: rgba(255,255,255,.06);
  --ink-08: rgba(255,255,255,.08);
  --ink-10: rgba(255,255,255,.1);
  --ink-12: rgba(255,255,255,.12);
  --ink-15: rgba(255,255,255,.15);
  --ink-25: rgba(255,255,255,.25);
  --ink-30: rgba(255,255,255,.3);
  --ink-35: rgba(255,255,255,.35);
  --ink-40: rgba(255,255,255,.4);
  --ink-45: rgba(255,255,255,.45);
  --ink-50: rgba(255,255,255,.5);
  --ink-60: rgba(255,255,255,.6);
  --ink-70: rgba(255,255,255,.7);
}

/* ---------- Mode clair ----------
   Activé via [data-theme="light"] sur <html> (voir includes/layout.php,
   bouton de bascule + script anti-flash). Un seul point de vérité : le
   reste du fichier consomme les var(--...) ci-dessus, donc rebasculer ces
   valeurs suffit à retourner toute l'UI, y compris le style inline des
   pages (color:var(--ink-40) etc.) qui partage les mêmes tokens. */
[data-theme="light"] {
  --bg: #F7F7F4;
  --panel: #FFFFFF;
  --panel-2: #F1F1EC;
  --yellow: #8A6D00;
  --white: #16181B;
  --gray: #4A4A46;
  --line: rgba(0,0,0,.12);
  --jjb: #0E7A5C;
  --nogi: #1A5FB4;
  --grappling: #8A6A10;
  --boxe: #A52753;

  --ink-02: rgba(0,0,0,.03);
  --ink-03: rgba(0,0,0,.04);
  --ink-04: rgba(0,0,0,.05);
  --ink-05: rgba(0,0,0,.06);
  --ink-06: rgba(0,0,0,.07);
  --ink-08: rgba(0,0,0,.09);
  --ink-10: rgba(0,0,0,.12);
  --ink-12: rgba(0,0,0,.14);
  --ink-15: rgba(0,0,0,.18);
  --ink-25: rgba(0,0,0,.28);
  --ink-30: rgba(0,0,0,.35);
  --ink-35: rgba(0,0,0,.4);
  --ink-40: rgba(0,0,0,.5);
  --ink-45: rgba(0,0,0,.55);
  --ink-50: rgba(0,0,0,.6);
  --ink-60: rgba(0,0,0,.68);
  --ink-70: rgba(0,0,0,.75);
}

[data-theme="light"] .modal-box canvas { background: #fff; }
[data-theme="light"] .btn-admin { color: #FFFDF2; }

/* ---------- Bouton de bascule sombre / clair ---------- */
.theme-toggle { display: inline-flex; align-items: center; gap: 2px; padding: 3px; background: var(--panel-2); border: 1px solid var(--line); border-radius: 20px; cursor: pointer; }
.theme-toggle span { display: flex; align-items: center; justify-content: center; width: 24px; height: 24px; border-radius: 50%; color: var(--ink-40); }
.theme-toggle span.is-active { background: var(--yellow); color: var(--navy); }
.theme-toggle svg { width: 14px; height: 14px; }

* { box-sizing: border-box; margin: 0; padding: 0; }
body { background: var(--bg); color: var(--gray); font-family: var(--font-body); font-size: 15px; line-height: 1.5; }
a { color: inherit; text-decoration: none; }
h1, h2, h3, h4 { font-family: var(--font-title); text-transform: uppercase; color: var(--white); }

/* ---------- Pages d'authentification ---------- */
.auth-page { display: flex; align-items: center; justify-content: center; min-height: 100vh; padding: 20px; }
.auth-card { width: 100%; max-width: 420px; background: var(--panel); border: 1px solid var(--line); padding: 44px 40px; }
.auth-card h1 { font-size: 30px; font-weight: 900; color: var(--yellow); margin-bottom: 24px; line-height: 1.1; }
.auth-card label { display: block; font-size: 12px; text-transform: uppercase; letter-spacing: .6px; font-weight: 700; color: var(--ink-50); margin-bottom: 18px; }
.auth-card input { display: block; width: 100%; margin-top: 6px; padding: 12px 14px; background: var(--ink-05); border: 1px solid var(--line); color: var(--white); font-family: var(--font-body); font-size: 15px; }
.auth-card input:focus { outline: none; border-color: var(--yellow); }
.auth-note { font-size: 13px; margin-bottom: 18px; color: var(--ink-50); }
.auth-note code { color: var(--yellow); }

.btn-admin { display: inline-block; background: var(--yellow); color: var(--navy); font-family: var(--font-title); font-weight: 800; text-transform: uppercase; font-size: 14px; padding: 14px 30px; border: none; cursor: pointer; transition: opacity .2s ease; }
.btn-admin:hover { opacity: .85; }
.btn-admin--ghost { background: transparent; color: var(--yellow); border: 2px solid var(--yellow); padding: 12px 28px; }
.btn-admin--danger { background: #E8567F; color: var(--white); }
.btn-admin--sm { padding: 8px 16px; font-size: 12px; }

/* ---------- Structure ---------- */
.admin-shell { display: flex; min-height: 100vh; }
.admin-sidebar { width: 240px; flex-shrink: 0; background: var(--panel); border-right: 1px solid var(--line); display: flex; flex-direction: column; position: sticky; top: 0; height: 100vh; overflow-y: auto; }
.admin-logo { font-family: var(--font-title); font-weight: 900; font-size: 26px; color: var(--white); padding: 26px 24px 18px; }
.admin-logo span { color: var(--yellow); }
.admin-sidebar nav { flex: 1; padding: 6px 0 20px; }
.nav-group { display: block; font-family: var(--font-title); font-size: 10.5px; font-weight: 800; text-transform: uppercase; letter-spacing: 1.2px; color: var(--ink-30); padding: 18px 24px 8px; }
.admin-sidebar nav a { display: block; padding: 9px 24px; font-size: 14px; font-weight: 500; color: var(--gray); border-left: 3px solid transparent; transition: all .15s ease; }
.admin-sidebar nav a:hover { color: var(--white); background: var(--ink-03); }
.admin-sidebar nav a.active { color: var(--yellow); border-left-color: var(--yellow); background: rgba(248,248,18,.05); }
.sidebar-foot { padding: 16px 24px; border-top: 1px solid var(--line); font-size: 12px; color: var(--ink-40); display: flex; flex-direction: column; gap: 4px; }
.sidebar-foot a { color: var(--yellow); }

.admin-main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.admin-topbar { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 20px 34px; border-bottom: 1px solid var(--line); background: var(--bg); position: sticky; top: 0; z-index: 10; }
.admin-topbar h1 { font-size: 21px; font-weight: 800; }
.topbar-user { display: flex; align-items: center; gap: 16px; font-size: 13px; }
.topbar-user span { color: var(--white); font-weight: 600; }
.topbar-user a { color: var(--ink-45); }
.topbar-user a:hover { color: var(--yellow); }
.admin-content { padding: 30px 34px 60px; }

/* ---------- Messages flash ---------- */
.flash { padding: 12px 18px; margin-bottom: 20px; font-size: 14px; font-weight: 600; border: 1px solid; }
.flash--success { color: var(--jjb); border-color: rgba(34,211,166,.4); background: rgba(34,211,166,.06); }
.flash--error { color: var(--boxe); border-color: rgba(232,86,127,.4); background: rgba(232,86,127,.06); }
.flash--warn { color: var(--grappling); border-color: rgba(214,164,49,.4); background: rgba(214,164,49,.06); }

/* ---------- Cartes / stats ---------- */
.stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 16px; margin-bottom: 30px; }
.stat-card { background: var(--panel); border: 1px solid var(--line); padding: 22px 24px; }
.stat-card .num { display: block; font-family: var(--font-title); font-weight: 900; font-size: 34px; color: var(--yellow); line-height: 1; }
.stat-card .lbl { font-size: 12.5px; text-transform: uppercase; letter-spacing: .5px; color: var(--ink-50); font-weight: 700; }

/* Détail plus petit sous une box principale (ex. répartition de l'encaissé
   saison par discipline/type) — même logique que .stat-grid/.stat-card,
   en plus compact. */
.stat-grid--sm { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; margin: -18px 0 30px; }
.stat-card--sm { background: var(--panel); border: 1px solid var(--line); padding: 14px 16px; }
.stat-card--sm .num { display: block; font-family: var(--font-title); font-weight: 900; font-size: 21px; color: var(--yellow); line-height: 1.2; }
.stat-card--sm .lbl { font-size: 11px; text-transform: uppercase; letter-spacing: .4px; color: var(--ink-50); font-weight: 700; }

.panel { background: var(--panel); border: 1px solid var(--line); padding: 26px 28px; margin-bottom: 26px; }
.panel h2 { font-size: 16px; margin-bottom: 18px; color: var(--yellow); }
.panel-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 18px; }
.panel-head h2 { margin-bottom: 0; }

/* ---------- Tableau de bord : alertes « action requise » ---------- */
.alert-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 14px; margin-bottom: 30px; }
.alert-card { display: block; background: var(--panel); border: 1px solid var(--line); border-left: 3px solid var(--ink-15); padding: 18px 20px; text-decoration: none; transition: border-color .15s ease, background .15s ease; }
.alert-card:hover { border-left-color: var(--ink-40); }
.alert-card .num { display: block; font-family: var(--font-title); font-weight: 900; font-size: 28px; color: var(--ink-35); line-height: 1; }
.alert-card .lbl { font-size: 12.5px; color: var(--ink-50); font-weight: 600; margin-top: 4px; display: block; }
.alert-card--due { border-left-color: var(--boxe); background: rgba(232,86,127,.05); }
.alert-card--due .num { color: var(--boxe); }
.alert-card--due:hover { border-left-color: var(--boxe); background: rgba(232,86,127,.09); }
.alert-card--due .lbl { color: var(--ink-70); }
.dash-section-title { font-family: var(--font-title); font-size: 13px; font-weight: 800; text-transform: uppercase; letter-spacing: .8px; color: var(--ink-40); margin: 0 0 14px; }
.dash-grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 26px; align-items: start; }
@media (max-width: 900px) { .dash-grid-2 { grid-template-columns: 1fr; } }
.repartition-row { display: flex; align-items: center; justify-content: space-between; padding: 10px 0; border-bottom: 1px solid var(--ink-05); }
.repartition-row:last-child { border-bottom: none; }
.repartition-row .dot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; margin-right: 10px; }
.repartition-bar { height: 4px; background: var(--ink-08); margin-top: 6px; overflow: hidden; }
.repartition-bar span { display: block; height: 100%; background: var(--yellow); }
.event-mini { display: flex; gap: 14px; align-items: center; padding: 10px 0; border-bottom: 1px solid var(--ink-05); }
.event-mini:last-child { border-bottom: none; }
.event-mini .date-chip { flex-shrink: 0; width: 46px; text-align: center; background: var(--ink-05); padding: 6px 0; }
.event-mini .date-chip .d { display: block; font-family: var(--font-title); font-weight: 900; font-size: 16px; color: var(--yellow); line-height: 1; }
.event-mini .date-chip .m { display: block; font-size: 9.5px; text-transform: uppercase; color: var(--ink-45); }

/* ---------- Tableaux ---------- */
.table-wrap { overflow-x: auto; }
table.admin-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.admin-table th { font-family: var(--font-title); font-size: 11px; text-transform: uppercase; letter-spacing: .8px; color: var(--ink-40); text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.admin-table td { padding: 12px; border-bottom: 1px solid var(--ink-05); vertical-align: middle; }
.admin-table tr:hover td { background: var(--ink-02); }
.admin-table .actions { white-space: nowrap; text-align: right; }
.admin-table .actions a, .admin-table .actions button { color: var(--yellow); font-size: 13px; font-weight: 600; margin-left: 12px; background: none; border: none; cursor: pointer; font-family: var(--font-body); }
.admin-table .actions .danger { color: var(--boxe); }

/* ---------- Pagination (20 lignes/page, ex: commandes à la carte) ---------- */
.alacarte-pager { display: flex; gap: 6px; flex-wrap: wrap; padding: 16px 12px 4px; }
.alacarte-pager a, .alacarte-pager-current { display: inline-flex; align-items: center; justify-content: center; min-width: 30px; height: 30px; padding: 0 8px; font-family: var(--font-title); font-size: 12.5px; font-weight: 700; }
.alacarte-pager a { color: var(--ink-60); background: var(--panel-2); border: 1px solid var(--line); text-decoration: none; }
.alacarte-pager a:hover { color: var(--yellow); border-color: var(--yellow); }
.alacarte-pager-current { color: var(--navy); background: var(--yellow); }

/* ---------- Badges ---------- */
.badge { display: inline-block; font-family: var(--font-title); font-size: 10.5px; font-weight: 800; text-transform: uppercase; letter-spacing: .5px; padding: 4px 10px; }
.badge--ok { background: rgba(34,211,166,.12); color: var(--jjb); }
.badge--warn { background: rgba(214,164,49,.12); color: var(--grappling); }
.badge--off { background: var(--ink-06); color: var(--ink-40); }
.badge--danger { background: rgba(232,86,127,.12); color: var(--boxe); }
.badge--info { background: rgba(62,142,234,.12); color: var(--nogi); }
.badge--yellow { background: rgba(248,248,18,.12); color: var(--yellow); }

.dot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; margin-right: 6px; vertical-align: baseline; }

/* ---------- Formulaires ---------- */
.form-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px 22px; }
.form-grid .full { grid-column: 1 / -1; }
.field label { display: block; font-size: 11.5px; text-transform: uppercase; letter-spacing: .6px; font-weight: 700; color: var(--ink-50); margin-bottom: 6px; }
.field input, .field select, .field textarea { width: 100%; padding: 11px 13px; background: var(--ink-05); border: 1px solid var(--line); color: var(--white); font-family: var(--font-body); font-size: 14.5px; }
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--yellow); }
.field textarea { min-height: 110px; resize: vertical; }
.form-actions { margin-top: 24px; display: flex; gap: 14px; align-items: center; flex-wrap: wrap; }

/* Formulaire tarifs par discipline (backoffice/tarifs.php) : tout sur une
   seule ligne (nom, prix par audience, couleur, bouton) plutôt que la grille
   2 colonnes empilée sur plusieurs lignes. */
.form-row { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 16px 20px; }
.form-row .field--name { flex: 1 1 180px; min-width: 140px; }
.form-row .field--price { flex: 0 0 100px; width: 100px; }
.form-row .field--color { flex: 0 0 auto; }
.form-row .form-actions { margin-top: 0; }

.filters-bar { display: flex; gap: 12px; flex-wrap: wrap; margin-bottom: 20px; align-items: center; }
.filters-bar input, .filters-bar select { padding: 10px 13px; background: var(--panel); border: 1px solid var(--line); color: var(--white); font-family: var(--font-body); font-size: 14px; }
.filters-bar input:focus, .filters-bar select:focus { outline: none; border-color: var(--yellow); }

/* Le <select> hérite bien du fond sombre, mais le menu déroulant natif
   (élément <option>) l'ignore et retombe sur le blanc du navigateur — d'où
   du texte blanc sur fond blanc tant que l'option n'est pas survolée. Règle
   globale plutôt que par conteneur (.field/.filters-bar/.inline-form...) :
   plusieurs pages stylent leur <select> en inline (adhesions.php,
   commandes.php, licences.php) sans passer par ces classes. Même correctif
   que membre/assets/membre.css. */
select option { background: var(--panel); color: var(--white); }

/* Liste déroulante d'adhérents rendue filtrable au clavier (voir
   enhanceAdherentSelects() dans includes/layout.php) : le <select> d'origine
   reste dans le DOM (masqué) pour porter la valeur soumise et le `required`
   natif, un champ texte + une liste de résultats se posent par-dessus. */
.select-search { position: relative; }
.select-search__native { display: none; }
.select-search__list { position: absolute; top: calc(100% + 4px); left: 0; right: 0; z-index: 30; margin: 0; padding: 4px; list-style: none; background: var(--panel-2); border: 1px solid var(--line); max-height: 240px; overflow-y: auto; box-shadow: 0 12px 28px var(--ink-25); }
.select-search__item { padding: 8px 10px; font-size: 14px; cursor: pointer; color: var(--white); }
.select-search__item:hover, .select-search__item.is-active { background: var(--ink-08); color: var(--yellow); }
.select-search__empty { padding: 8px 10px; font-size: 13px; color: var(--ink-45); }

/* ---------- Suivi cotisations par discipline ---------- */
.cotis-row { display: flex; gap: 8px; flex-wrap: wrap; }
.cotis-chip { font-size: 11px; font-weight: 700; padding: 3px 9px; border: 1px solid var(--line); color: var(--ink-35); }
.cotis-chip--ajour { border-color: rgba(34,211,166,.5); color: var(--jjb); }
.cotis-chip--impaye { border-color: rgba(232,86,127,.5); color: var(--boxe); }
.cotis-chip--3x { border-color: rgba(248,248,18,.5); color: var(--yellow); }

/* ---------- Divers ---------- */
.copy-field { display: flex; gap: 8px; align-items: center; margin-bottom: 10px; }
.copy-field input { flex: 1; padding: 9px 12px; background: var(--ink-05); border: 1px solid var(--line); color: var(--white); font-family: var(--font-body); font-size: 14px; cursor: pointer; }
.copy-field__label { min-width: 140px; font-size: 12px; text-transform: uppercase; font-weight: 700; color: var(--ink-45); }
.copy-flag { min-width: 90px; font-size: 12px; font-weight: 700; color: var(--jjb); opacity: 0; transition: opacity .2s ease; }
.copy-flag--visible { opacity: 1; }
.help-text { font-size: 13px; color: var(--ink-45); margin-bottom: 16px; }
.inline-form { display: inline; }

/* ---------- Licences CFJJB : ligne dépliable ---------- */
.lic-toggle { background: none; border: none; cursor: pointer; color: var(--yellow); font-size: 13px; padding: 4px 10px; line-height: 1; }
.lic-detail td { background: var(--ink-02); padding-top: 20px; padding-bottom: 20px; }

/* ---------- Boîte de dialogue de confirmation (remplace confirm()) ---------- */
/* Le reset global (`* { margin: 0 }` ci-dessus) écrase le `margin: auto` que
   le navigateur utilise pour centrer `dialog:modal` par défaut — on le
   rétablit explicitement, sinon la boîte colle en haut de l'écran. */
.confirm-dialog { border: none; padding: 0; background: transparent; }
.confirm-dialog[open] { position: fixed; inset: 0; margin: auto; }
.confirm-dialog::backdrop { background: rgba(0,0,0,.65); }
.confirm-dialog-box { background: var(--panel); border: 1px solid var(--line); padding: 28px 30px; max-width: 420px; width: min(420px, calc(100vw - 40px)); }
.confirm-dialog-box p { font-size: 15px; line-height: 1.5; color: var(--white); margin-bottom: 24px; }
.confirm-dialog-actions { display: flex; justify-content: flex-end; gap: 12px; }

/* ---------- Éditeur de texte (module Actus) ---------- */
.editor-toolbar { display: flex; flex-wrap: wrap; gap: 4px; align-items: center; padding: 8px; background: var(--panel-2); border: 1px solid var(--line); border-bottom: none; }
.editor-toolbar button { background: transparent; border: 1px solid transparent; color: var(--gray); font-family: var(--font-body); font-size: 13px; padding: 6px 10px; cursor: pointer; transition: all .15s ease; }
.editor-toolbar button:hover { border-color: var(--line); color: var(--white); background: var(--ink-04); }
.editor-toolbar .tb-yellow { color: var(--yellow); font-weight: 700; }
.editor-toolbar .tb-sep { width: 1px; height: 20px; background: var(--line); margin: 0 4px; }
.editor-area { min-height: 260px; padding: 16px 18px; background: var(--ink-05); border: 1px solid var(--line); color: var(--white); font-family: var(--font-body); font-size: 15px; line-height: 1.6; overflow-y: auto; max-height: 520px; }
.editor-area:focus { outline: none; border-color: var(--yellow); }
.editor-area h2 { font-size: 20px; margin: 18px 0 8px; color: var(--yellow); }
.editor-area h3 { font-size: 16px; margin: 14px 0 6px; }
.editor-area p { margin: 0 0 10px; color: var(--gray); font-size: 14.5px; }
.editor-area ul, .editor-area ol { margin: 0 0 10px 22px; }
.editor-area ul { list-style: disc; }
.editor-area ol { list-style: decimal; }
.editor-area blockquote { border-left: 3px solid var(--yellow); padding-left: 14px; font-style: italic; margin: 0 0 10px; }
.editor-area a { color: var(--yellow); text-decoration: underline; }
.editor-area img { max-width: 100%; }
.editor-area .article-callout { border: 1px solid rgba(248,248,18,.4); background: rgba(248,248,18,.05); padding: 14px 16px; margin: 0 0 12px; }
.editor-area .article-callout .callout-label { display: block; font-family: var(--font-title); font-weight: 800; text-transform: uppercase; font-size: 11.5px; color: var(--yellow); margin-bottom: 6px; }
.editor-area .article-source-box { border: 1px dashed var(--line); padding: 12px 14px; font-size: 12.5px; color: var(--ink-50); margin: 0 0 12px; }

/* ---------- Popup (modale) ---------- */
.modal-overlay { position: fixed; inset: 0; z-index: 500; background: rgba(0,0,0,.8); display: none; align-items: center; justify-content: center; padding: 20px; }
.modal-overlay.open { display: flex; }
.modal-box { width: 100%; max-width: 560px; max-height: 92vh; overflow-y: auto; background: var(--panel); border: 1px solid var(--line); padding: 26px 28px; }

/* Spinner générique — traitements longs déclenchés par un bouton (ex. scraping
   palmarès) où il faut signaler "en cours" pendant plusieurs minutes, pour ne
   pas laisser croire que rien ne se passe. */
.spinner { width: 42px; height: 42px; border: 4px solid var(--ink-15); border-top-color: var(--yellow); border-radius: 50%; margin: 0 auto 18px; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.modal-box h2 { font-size: 16px; color: var(--yellow); margin-bottom: 16px; }
.modal-box canvas { width: 100%; border: 1px solid var(--line); background: #000; cursor: grab; touch-action: none; display: block; }
.modal-box canvas:active { cursor: grabbing; }
.modal-controls { display: flex; gap: 18px; flex-wrap: wrap; margin-top: 12px; }
.modal-controls label { font-size: 11.5px; text-transform: uppercase; letter-spacing: .5px; font-weight: 700; color: var(--ink-50); display: flex; flex-direction: column; gap: 5px; flex: 1; min-width: 120px; }
.modal-controls select, .modal-controls input[type="range"] { accent-color: var(--yellow); }
.modal-controls select { padding: 7px 10px; background: var(--ink-05); border: 1px solid var(--line); color: var(--white); }

/* ---------- Résultats de recherche d'actus ---------- */
.news-item { display: flex; align-items: center; gap: 14px; padding: 12px 14px; border: 1px solid var(--line); margin-top: 8px; background: var(--panel-2); }
.news-item-body { flex: 1; min-width: 0; }
.news-item-body strong { display: block; color: var(--white); font-size: 14px; margin-bottom: 2px; }
.news-item-body span { font-size: 12px; color: var(--ink-40); }

@media (max-width: 900px) {
  .admin-sidebar { width: 200px; }
  .form-grid { grid-template-columns: 1fr; }
  .admin-content { padding: 20px; }
}
