/* =====================================================================
   Site de logs FiveM — thème sombre (par défaut) et clair
   Les couleurs des catégories viennent de /categories.css (générée).
   ===================================================================== */
:root {
  --fond: #0a0c11;
  --fond-2: #10131a;
  --carte: #141820;
  --carte-2: #1a1f2b;
  --survol: #1f2533;
  --bord: #242a38;
  --bord-doux: #1d2230;
  --texte: #e7eaf1;
  --texte-2: #9ba4b6;
  --texte-3: #687187;
  --accent: #6366f1;
  --accent-2: #818cf8;
  --accent-fond: rgba(99, 102, 241, .14);
  --danger: #ef4444;
  --ok: #22c55e;
  --attention: #f59e0b;
  --ombre: 0 1px 2px rgba(0,0,0,.3), 0 8px 24px rgba(0,0,0,.18);
  --rayon: 14px;
  --police: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  color-scheme: dark;
}
:root[data-theme="clair"] {
  --fond: #f4f6fa;
  --fond-2: #ffffff;
  --carte: #ffffff;
  --carte-2: #f1f3f8;
  --survol: #eef1f7;
  --bord: #dfe3ec;
  --bord-doux: #eaedf3;
  --texte: #141824;
  --texte-2: #4f586b;
  --texte-3: #7d8598;
  --accent: #4f46e5;
  --accent-2: #4338ca;
  --accent-fond: rgba(79, 70, 229, .1);
  --ombre: 0 1px 2px rgba(16,24,40,.05), 0 4px 16px rgba(16,24,40,.06);
  color-scheme: light;
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  background: var(--fond);
  color: var(--texte);
  font: 14px/1.5 var(--police);
  -webkit-font-smoothing: antialiased;
}
a { color: var(--accent-2); text-decoration: none; }
a:hover { text-decoration: underline; }
h1 { font-size: 24px; margin: 0; letter-spacing: -0.015em; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
h2 { font-size: 15px; margin: 0; font-weight: 600; display: flex; align-items: center; gap: 8px; }
h2 a { color: inherit; }
.sous { color: var(--texte-2); margin: 4px 0 0; }
.discret { color: var(--texte-3); font-size: 12px; }
.mono { font-family: var(--mono); font-size: 12.5px; }
code { font-family: var(--mono); font-size: 12px; background: var(--carte-2); border: 1px solid var(--bord); padding: 1px 5px; border-radius: 5px; }

/* --- Icônes --- */
.ico { width: 16px; height: 16px; flex-shrink: 0; vertical-align: -3px; }
.ico-cat { display: inline-grid; place-items: center; width: 22px; height: 22px; border-radius: 6px; color: var(--c); background: color-mix(in srgb, var(--c) 16%, transparent); flex-shrink: 0; }
.ico-cat .ico { width: 13px; height: 13px; }
.ico-cat.grand { width: 34px; height: 34px; border-radius: 9px; }
.ico-cat.grand .ico { width: 18px; height: 18px; }

/* --- Badges de catégories --- */
.badge {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 2px 9px; border-radius: 999px;
  font-size: 12px; font-weight: 600; white-space: nowrap;
  color: var(--c, var(--texte-2));
  background: color-mix(in srgb, var(--c, #64748b) 13%, transparent);
  border: 1px solid color-mix(in srgb, var(--c, #64748b) 28%, transparent);
}
.badge .ico { width: 12px; height: 12px; vertical-align: 0; }
:root[data-theme="clair"] .badge { color: color-mix(in srgb, var(--c, #64748b) 75%, #000); }
a.badge:hover { text-decoration: none; background: color-mix(in srgb, var(--c) 24%, transparent); }
.action { display: block; color: var(--texte-3); font-size: 11.5px; font-family: var(--mono); margin-top: 3px; }
.drapeau-alerte { display: inline-flex; align-items: center; gap: 4px; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .03em; color: var(--attention); background: color-mix(in srgb, var(--attention) 14%, transparent); border-radius: 6px; padding: 1px 6px; margin-right: 4px; white-space: nowrap; }
.drapeau-alerte .ico { width: 12px; height: 12px; vertical-align: 0; }

/* --- Mise en page --- */
.appli { display: flex; min-height: 100vh; }
.barre {
  width: 252px; flex-shrink: 0;
  background: var(--fond-2); border-right: 1px solid var(--bord);
  display: flex; flex-direction: column;
  position: sticky; top: 0; height: 100vh;
}
.marque { display: flex; align-items: center; gap: 10px; padding: 18px 20px; font-weight: 700; font-size: 16px; }
.logo { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 9px; color: #fff; background: linear-gradient(135deg, var(--accent), #a855f7); font-size: 14px; box-shadow: 0 4px 14px rgba(99,102,241,.35); }
.menu-mobile { display: none; margin-left: auto; background: none; border: 0; color: var(--texte); font-size: 22px; cursor: pointer; }
.nav { display: flex; flex-direction: column; gap: 1px; padding: 6px 12px; flex: 1; overflow-y: auto; }
.nav a, .nav summary { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 8px; color: var(--texte-2); font-weight: 500; cursor: pointer; }
.nav a:hover, .nav summary:hover { background: var(--survol); color: var(--texte); text-decoration: none; }
.nav a.actif { background: var(--accent-fond); color: var(--texte); }
.nav a .ico { color: var(--texte-3); }
.nav a.actif .ico { color: var(--accent-2); }
.nav-titre, .nav .nav-titre-lien { margin: 14px 0 2px; padding: 4px 10px; font-size: 11px; text-transform: uppercase; letter-spacing: .07em; color: var(--texte-3); font-weight: 600; }
.nav .nav-titre-lien:hover { background: none; color: var(--accent-2); }
.nav-groupe summary { list-style: none; font-size: 13.5px; }
.nav-groupe summary::-webkit-details-marker { display: none; }
.nav-groupe summary .ico { width: 14px; height: 14px; transition: transform .15s; color: var(--texte-3); }
.nav-groupe[open] summary .ico { transform: rotate(90deg); }
.nav-groupe summary span:first-of-type { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nav-groupe .nb { font-size: 11px; color: var(--texte-3); background: var(--carte-2); border-radius: 999px; padding: 0 7px; }
.nav .sous-lien { padding: 6px 10px 6px 34px; font-size: 13px; gap: 8px; }
.nav .sous-lien .ico-cat { width: 18px; height: 18px; border-radius: 5px; }
.nav .sous-lien .ico-cat .ico { width: 11px; height: 11px; color: var(--c); }
.pastille { margin-left: auto; background: var(--danger); color: #fff; font-size: 11px; font-weight: 700; border-radius: 999px; padding: 0 7px; line-height: 18px; }
.point-direct { width: 7px; height: 7px; border-radius: 50%; background: var(--ok); margin-left: auto; animation: pulsation 2s infinite; }
@keyframes pulsation { 0% { box-shadow: 0 0 0 0 rgba(34,197,94,.5); } 70% { box-shadow: 0 0 0 7px rgba(34,197,94,0); } 100% { box-shadow: 0 0 0 0 rgba(34,197,94,0); } }
@media (prefers-reduced-motion: reduce) { .point-direct, .ligne-log.nouveau td { animation: none; } }
.compte { display: flex; align-items: center; gap: 8px; padding: 12px 14px; border-top: 1px solid var(--bord); }
.compte img { border-radius: 50%; }
.compte-infos { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.compte-infos strong { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-size: 13px; }
.niveau { font-size: 11.5px; color: var(--accent-2); font-weight: 500; }
.niveau-fondateur { color: #f472b6; }
.btn-icone { display: grid; place-items: center; background: none; border: 1px solid var(--bord); color: var(--texte-2); width: 32px; height: 32px; border-radius: 8px; cursor: pointer; flex-shrink: 0; }
.btn-icone:hover { color: var(--texte); border-color: var(--texte-3); }
.btn-icone.danger:hover { color: var(--danger); border-color: var(--danger); }

.contenu { flex: 1; min-width: 0; padding: 28px 32px 56px; max-width: 1560px; }
.contenu-seul { min-height: 100vh; display: grid; place-items: center; padding: 16px; background: radial-gradient(ellipse at top, rgba(99,102,241,.14), transparent 60%); }

.entete { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 22px; flex-wrap: wrap; }
.fil { margin: 0 0 4px; color: var(--texte-3); font-size: 12.5px; }

/* --- Cartes --- */
.panneau { background: var(--carte); border: 1px solid var(--bord); border-radius: var(--rayon); padding: 18px; margin-bottom: 18px; box-shadow: var(--ombre); }
.panneau-titre { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; gap: 12px; flex-wrap: wrap; }
.lien-discret { color: var(--texte-2); font-size: 13px; }
.liens-titre { display: flex; gap: 16px; }
.grille-3 { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 18px; }
.grille-3 .panneau { margin-bottom: 18px; }

.compteurs { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 12px; margin-bottom: 18px; }
.compteur { position: relative; background: var(--carte); border: 1px solid var(--bord); border-radius: var(--rayon); padding: 16px 18px; display: flex; flex-direction: column; gap: 6px; color: var(--texte); box-shadow: var(--ombre); overflow: hidden; transition: border-color .15s, transform .15s; }
.compteur.lien:hover { border-color: var(--accent); text-decoration: none; transform: translateY(-1px); }
.compteur .lib { color: var(--texte-2); font-size: 12.5px; display: flex; align-items: center; gap: 7px; }
.compteur .lib .ico { color: var(--texte-3); }
.compteur strong { font-size: 28px; font-weight: 700; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; line-height: 1.1; }
.compteur strong small { font-size: 15px; color: var(--texte-3); font-weight: 500; }
.compteur .detail { font-size: 12px; color: var(--texte-3); }
.compteur.accent { background: linear-gradient(135deg, color-mix(in srgb, var(--ok) 12%, var(--carte)), var(--carte) 60%); }
.compteur.en-alerte { border-color: color-mix(in srgb, var(--attention) 45%, var(--bord)); }
.compteur.en-alerte strong { color: var(--attention); }
.compteur-mini { display: inline-flex; align-items: center; gap: 6px; color: var(--texte-2); font-size: 13px; padding: 0 6px; }

.segments { display: inline-flex; background: var(--carte); border: 1px solid var(--bord); border-radius: 10px; padding: 3px; }
.segments a { padding: 6px 12px; border-radius: 7px; color: var(--texte-2); font-weight: 500; font-size: 13px; }
.segments a:hover { text-decoration: none; color: var(--texte); }
.segments a.actif { background: var(--accent); color: #fff; }

.graphique { position: relative; height: 290px; }

.mini-liste, .classement { list-style: none; margin: 0; padding: 0; }
.mini-liste li { display: flex; align-items: baseline; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--bord-doux); }
.mini-liste li:last-child { border: 0; }
.mini-liste .texte { flex: 1; min-width: 0; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.mini-liste li { flex-wrap: wrap; }
.classement { counter-reset: rang; }
.classement li { counter-increment: rang; display: flex; align-items: center; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--bord-doux); }
.classement li:last-child { border: 0; }
.classement li::before { content: counter(rang); display: grid; place-items: center; width: 22px; height: 22px; border-radius: 6px; background: var(--carte-2); color: var(--texte-2); font-size: 12px; font-weight: 700; }
.classement li:first-child::before { background: color-mix(in srgb, #eab308 22%, transparent); color: #eab308; }
.classement a { flex: 1; font-weight: 600; }
.classement strong { font-variant-numeric: tabular-nums; }

/* --- Tableaux --- */
.table-wrap { overflow-x: auto; margin: 0 -18px; padding: 0 18px; }
table { width: 100%; border-collapse: collapse; }
th { text-align: left; color: var(--texte-3); font-weight: 600; font-size: 11.5px; text-transform: uppercase; letter-spacing: 0.05em; padding: 8px 10px; border-bottom: 1px solid var(--bord); white-space: nowrap; }
td { padding: 10px; border-bottom: 1px solid var(--bord-doux); vertical-align: top; }
tbody tr:hover td { background: var(--survol); }
.col-date { white-space: nowrap; color: var(--texte-2); font-variant-numeric: tabular-nums; width: 1%; }
.col-message { word-break: break-word; min-width: 260px; }
.col-joueur { white-space: nowrap; }
.col-detail { width: 1%; text-align: right; }
.fleche { color: var(--texte-3); margin: 0 6px; }
.ligne-alerte td:first-child { box-shadow: inset 3px 0 0 var(--attention); }
.ligne-log.nouveau td { animation: arrivee 1.5s ease-out; }
@keyframes arrivee { from { background: var(--accent-fond); } to { background: transparent; } }
.btn-detail { display: grid; place-items: center; background: none; border: 1px solid var(--bord); color: var(--texte-2); border-radius: 6px; width: 26px; height: 26px; cursor: pointer; transition: transform .15s; }
.btn-detail .ico { width: 14px; height: 14px; }
.btn-detail[aria-expanded="true"] { transform: rotate(90deg); color: var(--texte); }
.ligne-detail td, .ligne-detail:hover td { background: var(--fond-2) !important; }
.details { display: grid; grid-template-columns: max-content 1fr; gap: 4px 18px; margin: 4px 0; font-size: 13px; }
.details dt { color: var(--texte-3); font-family: var(--mono); font-size: 12px; }
.details dd { margin: 0; font-family: var(--mono); font-size: 12px; word-break: break-all; }
.nom-joueur { font-weight: 600; }
.point-en-ligne { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--ok); margin-right: 6px; vertical-align: 1px; }
.tronque { max-width: 140px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.vide { color: var(--texte-3); text-align: center; padding: 36px 0; }
.vide .ico { width: 28px; height: 28px; opacity: .5; }
.vide p { margin: 8px 0 0; }
.vide.petit { padding: 8px 0; text-align: left; }

/* --- Puces (filtres rapides) --- */
.puces { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 16px; }
.puce { display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border-radius: 999px; border: 1px solid var(--bord); background: var(--carte); color: var(--texte-2); font-size: 13px; font-weight: 500; }
.puce .ico { width: 13px; height: 13px; color: var(--c, currentColor); }
.puce:hover { text-decoration: none; color: var(--texte); border-color: var(--texte-3); }
.puce.actif { background: var(--accent); border-color: var(--accent); color: #fff; }
.puce.actif .ico { color: #fff; }
.puce .nb { font-size: 11px; opacity: .75; }

/* --- Filtres et formulaires --- */
.filtres { display: flex; flex-wrap: wrap; gap: 12px; align-items: flex-end; background: var(--carte); border: 1px solid var(--bord); border-radius: var(--rayon); padding: 14px 16px; margin-bottom: 18px; box-shadow: var(--ombre); }
.filtres label { display: flex; flex-direction: column; gap: 5px; font-size: 12px; color: var(--texte-2); font-weight: 500; min-width: 150px; }
.filtres label.large { flex: 1; min-width: 220px; }
.filtres label.case-filtre { flex-direction: row; align-items: center; min-width: 0; min-height: 36px; gap: 8px; font-size: 13px; }
input, select {
  background: var(--fond-2); border: 1px solid var(--bord); color: var(--texte);
  border-radius: 8px; padding: 8px 10px; font: inherit; font-size: 13.5px; min-height: 36px;
}
input[type="color"] { padding: 3px; width: 48px; cursor: pointer; }
input:focus, select:focus, textarea:focus { outline: 2px solid color-mix(in srgb, var(--accent) 55%, transparent); outline-offset: 0; border-color: var(--accent); }
.boutons { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }

.btn-principal, .btn-secondaire, .btn-discord {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  border-radius: 8px; padding: 8px 14px; font: inherit; font-weight: 600; font-size: 13.5px;
  cursor: pointer; min-height: 36px; border: 1px solid transparent; white-space: nowrap;
}
.btn-principal { background: var(--accent); color: #fff; }
.btn-principal:hover { background: var(--accent-2); text-decoration: none; }
.btn-secondaire { background: var(--carte-2); color: var(--texte); border-color: var(--bord); }
.btn-secondaire:hover { border-color: var(--texte-3); text-decoration: none; }
.btn-secondaire[aria-pressed="true"] { border-color: var(--attention); color: var(--attention); }
.btn-secondaire.btn-alerte { color: var(--attention); border-color: color-mix(in srgb, var(--attention) 45%, var(--bord)); }

.pagination { display: flex; align-items: center; justify-content: center; gap: 16px; margin-top: 16px; }
.pagination a, .pagination .off { padding: 6px 12px; border-radius: 8px; border: 1px solid var(--bord); }
.pagination .off { color: var(--texte-3); opacity: .5; }
.pagination .pos { color: var(--texte-2); font-variant-numeric: tabular-nums; }

/* --- Direct --- */
.etat-direct { font-size: 12px; font-weight: 600; padding: 3px 10px; border-radius: 999px; background: var(--carte-2); color: var(--texte-3); letter-spacing: 0; }
.etat-direct.ok { color: var(--ok); background: color-mix(in srgb, var(--ok) 13%, transparent); }
.etat-webhook { font-size: 12.5px; color: var(--texte-3); }
.etat-webhook.ok { color: var(--ok); }

/* --- Scripts --- */
.grille-scripts { display: grid; grid-template-columns: repeat(auto-fill, minmax(380px, 1fr)); gap: 18px; }
.grille-scripts .panneau { margin: 0; }
.liste-cats { list-style: none; margin: 0; padding: 0; }
.cat-ligne { display: flex; align-items: center; gap: 12px; padding: 10px; margin: 0 -10px; border-radius: 10px; color: var(--texte); }
.cat-ligne:hover { background: var(--survol); text-decoration: none; }
.cat-texte { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.cat-texte .discret { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cat-chiffres { display: flex; flex-direction: column; align-items: flex-end; }
.cat-chiffres strong { font-variant-numeric: tabular-nums; }

/* --- Fiche joueur --- */
.titre-joueur { display: flex; align-items: center; gap: 14px; }
.avatar-lettre { display: grid; place-items: center; width: 52px; height: 52px; border-radius: 14px; font-size: 22px; font-weight: 700; color: #fff; background: linear-gradient(135deg, var(--accent), #ec4899); flex-shrink: 0; }
.grille-fiche { display: grid; grid-template-columns: 1.3fr 1fr 0.8fr; gap: 18px; }
.grille-fiche .panneau { margin-bottom: 18px; }
.identifiants { display: grid; grid-template-columns: max-content 1fr; gap: 8px 16px; margin: 0; }
.identifiants dt { color: var(--texte-3); font-size: 12.5px; }
.identifiants dd { margin: 0; word-break: break-all; }
.mini-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 14px; }
.mini-stats div { display: flex; flex-direction: column; background: var(--carte-2); border-radius: 10px; padding: 10px 12px; }
.mini-stats .lib { color: var(--texte-3); font-size: 12px; }
.mini-stats strong { font-size: 18px; font-variant-numeric: tabular-nums; }
.repartition { display: flex; flex-wrap: wrap; gap: 6px; }
.pseudos { list-style: none; margin: 0; padding: 0; }
.pseudos li { display: flex; justify-content: space-between; gap: 8px; padding: 6px 0; border-bottom: 1px solid var(--bord-doux); }
.pseudos li:last-child { border: 0; }

/* --- Connexion --- */
.carte-login { width: 100%; max-width: 400px; background: var(--carte); border: 1px solid var(--bord); border-radius: 18px; padding: 36px 28px; text-align: center; box-shadow: var(--ombre); }
.logo-grand { display: inline-grid; place-items: center; width: 56px; height: 56px; border-radius: 16px; font-size: 24px; color: #fff; background: linear-gradient(135deg, var(--accent), #a855f7); margin-bottom: 14px; box-shadow: 0 8px 24px rgba(99,102,241,.4); }
.carte-login h1 { justify-content: center; }
.carte-login .sous { margin-bottom: 22px; }
.btn-discord { background: #5865f2; color: #fff; width: 100%; padding: 12px; font-size: 15px; }
.btn-discord:hover { background: #4752c4; text-decoration: none; }
.alerte { background: color-mix(in srgb, var(--danger) 12%, transparent); border: 1px solid color-mix(in srgb, var(--danger) 35%, transparent); color: #f87171; padding: 10px 12px; border-radius: 8px; margin-bottom: 16px; font-size: 13.5px; }
.demo { margin-top: 22px; padding-top: 18px; border-top: 1px dashed var(--bord); display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; }
.demo p { width: 100%; margin: 0 0 4px; color: var(--texte-3); font-size: 12.5px; }

/* --- Administration --- */
.alerte.ok { background: color-mix(in srgb, var(--ok) 12%, transparent); border-color: color-mix(in srgb, var(--ok) 35%, transparent); color: var(--ok); }
.table-admin td { vertical-align: middle; }
.ligne-fixe td { background: var(--accent-fond); }
.badge.herite { opacity: .45; }
.avertissement { color: var(--attention); font-size: 12.5px; }
.aide { margin: 10px 0 0; }
.aide-bloc { color: var(--texte-2); line-height: 1.6; }
.aide-bloc summary { cursor: pointer; color: var(--texte); }
.form-ligne { display: flex; gap: 8px; flex-wrap: wrap; }
.form-ligne input { min-width: 200px; }
.staff { display: flex; align-items: center; gap: 10px; }
.staff img { border-radius: 50%; }
.formulaire { display: flex; flex-direction: column; gap: 18px; }
.champs { display: flex; flex-wrap: wrap; gap: 14px; }
.champs label, label.bloc { display: flex; flex-direction: column; gap: 6px; font-size: 12.5px; color: var(--texte-2); font-weight: 500; flex: 1 1 200px; }
.champs label.petit { flex: 0 0 auto; }
.formulaire > label.bloc { flex: none; }
textarea { background: var(--fond-2); border: 1px solid var(--bord); color: var(--texte); border-radius: 8px; padding: 8px 10px; font: 13px var(--mono); resize: vertical; }
fieldset { border: 1px solid var(--bord); border-radius: 10px; padding: 12px 16px 16px; margin: 0; display: flex; flex-direction: column; gap: 10px; }
legend { padding: 0 6px; color: var(--texte-2); font-size: 12.5px; font-weight: 600; }
.case { display: flex; align-items: center; gap: 10px; cursor: pointer; flex-wrap: wrap; }
.case input, input[type="radio"], input[type="checkbox"] { min-height: 0; width: 16px; height: 16px; accent-color: var(--accent); }
.case-toutes { padding-bottom: 10px; border-bottom: 1px dashed var(--bord); }
.grille-cases { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 10px 16px; }
.zone-danger { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; border: 1px solid color-mix(in srgb, var(--danger) 35%, transparent); border-radius: var(--rayon); padding: 14px 18px; color: var(--texte-2); }
.btn-danger { background: transparent; color: #f87171; border: 1px solid color-mix(in srgb, var(--danger) 50%, transparent); border-radius: 8px; padding: 8px 12px; font: inherit; font-weight: 600; cursor: pointer; min-height: 36px; }
.btn-danger:hover { background: color-mix(in srgb, var(--danger) 15%, transparent); }
.resume-ajout { cursor: pointer; }
.ajout-cat { margin-top: 16px; }
.liste-edition { display: flex; flex-direction: column; gap: 8px; }
.ligne-cat { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 10px; border: 1px solid var(--bord-doux); border-radius: 10px; background: var(--carte-2); }
.ligne-cat .code-cat { display: flex; flex-direction: column; width: 120px; }
.ligne-cat label.sr { display: contents; font-size: 0; }
.ligne-cat input[type="text"] { width: 150px; }
.ligne-cat label.large input { flex: 1; min-width: 180px; width: auto; }

/* --- Mobile --- */
@media (max-width: 1100px) {
  .grille-fiche { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 820px) {
  .appli { flex-direction: column; }
  .barre { width: 100%; height: auto; position: sticky; z-index: 5; border-right: 0; border-bottom: 1px solid var(--bord); }
  .marque { padding: 12px 16px; }
  .menu-mobile { display: block; }
  .barre .nav, .barre .compte { display: none; }
  .barre.ouvert .nav, .barre.ouvert .compte { display: flex; }
  .barre.ouvert .nav { max-height: 70vh; }
  .contenu { padding: 20px 16px 40px; }
  .grille-fiche { grid-template-columns: 1fr; }
  .grille-scripts { grid-template-columns: 1fr; }
  .filtres label, .filtres label.large { min-width: 0; flex: 1 1 140px; }
  .compteurs { grid-template-columns: repeat(2, 1fr); }
  .compteur strong { font-size: 22px; }
}

/* --- Webhooks des scripts --- */
.carte-webhook { border: 1px solid var(--bord-doux); border-radius: 12px; background: var(--carte-2); padding: 14px; display: flex; flex-direction: column; gap: 12px; }
.carte-webhook.surligne { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-fond); }
.carte-webhook.inactif { opacity: .65; }
.wh-entete { display: flex; align-items: center; gap: 12px; }
.wh-titre { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.wh-adresse { display: flex; gap: 8px; }
.wh-adresse input { flex: 1; min-width: 0; font-size: 12.5px; }
.wh-reglages { display: flex; flex-wrap: wrap; gap: 10px; align-items: flex-end; }
.wh-reglages label { display: flex; flex-direction: column; gap: 5px; font-size: 12px; color: var(--texte-2); font-weight: 500; }
.wh-reglages label.large { flex: 1; min-width: 240px; }
.wh-reglages label.case-filtre { flex-direction: row; align-items: center; min-height: 36px; }
.champs label.large { flex: 2 1 320px; }
