/* Admin Degen Royale : feuille unique (CSP style-src 'self', aucun style en ligne). Clair et sombre. */
:root {
  --fond: #f6f7f9; --carte: #ffffff; --texte: #1c2230; --doux: #5d6678; --bord: #dde1e8; --accent: #4f46e5;
  --rouge: #c62828; --rouge-fond: #fdecea; --orange: #b45309; --orange-fond: #fff4e5; --vert: #2e7d32; --info: #1e5aa8;
}
@media (prefers-color-scheme: dark) {
  :root { --fond: #12151c; --carte: #1b2029; --texte: #e6e9ef; --doux: #9aa3b5; --bord: #2c3340; --accent: #8b85ff;
    --rouge: #ef6b6b; --rouge-fond: #3a1d1f; --orange: #f0a64a; --orange-fond: #3a2c17; --vert: #6cc070; --info: #7fb0f0; }
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--fond); color: var(--texte); font: 14px/1.45 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; }
code, .mono { font-family: ui-monospace, "Cascadia Mono", Consolas, monospace; font-size: 12.5px; }
.entete { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 10px 16px; background: var(--carte); border-bottom: 1px solid var(--bord); flex-wrap: wrap; }
.marque { font-weight: 700; font-size: 16px; }
.sous { color: var(--doux); font-weight: 500; }
.pastille { display: inline-block; padding: 1px 8px; border-radius: 10px; font-size: 12px; background: var(--orange-fond); color: var(--orange); }
.pastille.mainnet { background: var(--rouge-fond); color: var(--rouge); }
.moi { color: var(--doux); }
main { max-width: 1280px; margin: 0 auto; padding: 16px; }
.carte { background: var(--carte); border: 1px solid var(--bord); border-radius: 10px; padding: 14px 16px; margin-bottom: 14px; }
.etroite { max-width: 520px; margin: 32px auto; }
h1 { font-size: 20px; margin: 0 0 8px; } h2 { font-size: 15px; margin: 0 0 10px; }
.aide { color: var(--doux); font-size: 13px; }
.msg { min-height: 1.4em; }
.msg.erreur { color: var(--rouge); } .msg.ok { color: var(--vert); }
.etapes li { margin: 8px 0; }
button { font: inherit; padding: 6px 12px; border-radius: 7px; border: 1px solid var(--bord); background: var(--carte); color: var(--texte); cursor: pointer; }
button:hover:not(:disabled) { border-color: var(--accent); }
button:disabled { opacity: .5; cursor: default; }
button.principal { background: var(--accent); border-color: var(--accent); color: #fff; }
button.danger { border-color: var(--rouge); color: var(--rouge); }
button.discret { border-color: transparent; background: transparent; color: var(--doux); }
input, select, textarea { font: inherit; padding: 5px 8px; border-radius: 6px; border: 1px solid var(--bord); background: var(--fond); color: var(--texte); max-width: 100%; }
input[type=checkbox] { width: auto; }
textarea { width: 100%; min-height: 64px; }
.ligne-form { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin: 8px 0; }
.ligne-form input:not([type=checkbox]) { flex: 1 1 220px; }
.bascule { display: inline-flex; gap: 6px; align-items: center; }
.bandeau { background: var(--rouge); color: #fff; padding: 8px 16px; font-weight: 600; text-align: center; }
.onglets { display: flex; gap: 4px; flex-wrap: wrap; margin-bottom: 14px; }
.onglets button.actif { background: var(--accent); border-color: var(--accent); color: #fff; }
.grille { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 10px; margin-bottom: 14px; }
.tuile { background: var(--carte); border: 1px solid var(--bord); border-radius: 10px; padding: 10px 12px; }
.tuile .lib { color: var(--doux); font-size: 12px; }
.tuile .val { font-size: 18px; font-weight: 650; margin-top: 2px; word-break: break-all; }
.tuile.rouge { border-color: var(--rouge); } .tuile.rouge .val { color: var(--rouge); }
.alertes { list-style: none; padding: 0; margin: 0; }
.alertes li { padding: 6px 10px; border-radius: 6px; margin: 4px 0; background: var(--fond); }
.alertes li.rouge { background: var(--rouge-fond); color: var(--rouge); }
.alertes li.orange { background: var(--orange-fond); color: var(--orange); }
.alertes li.info { color: var(--info); }
.petit { font-size: 12.5px; color: var(--doux); padding-left: 18px; }
.defile { overflow-x: auto; }
table { border-collapse: collapse; width: 100%; font-size: 13px; }
th, td { text-align: left; padding: 5px 8px; border-bottom: 1px solid var(--bord); vertical-align: top; }
th { color: var(--doux); font-weight: 600; white-space: nowrap; }
td.num { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.etat { display: inline-block; padding: 0 7px; border-radius: 9px; font-size: 12px; background: var(--fond); }
.etat.blocked, .etat.orphelin, .etat.sans_fichier { background: var(--rouge-fond); color: var(--rouge); }
.etat.manual, .etat.residu, .etat.attente { background: var(--orange-fond); color: var(--orange); }
.etat.confirmed, .etat.vide { color: var(--vert); }
fieldset { border: 1px solid var(--bord); border-radius: 8px; margin: 0 0 12px; padding: 8px 12px 12px; }
legend { font-weight: 650; padding: 0 6px; }
.champ { display: grid; grid-template-columns: minmax(160px, 260px) 1fr; gap: 4px 12px; align-items: start; margin: 8px 0; }
.champ .borne { grid-column: 2; color: var(--doux); font-size: 12px; }
.champ .err { grid-column: 2; color: var(--rouge); font-size: 12.5px; }
.champ.modifie > label { color: var(--accent); font-weight: 600; }
.champ input:not([type=checkbox]), .champ select, .champ textarea { width: 100%; }
.diff li { font-family: ui-monospace, Consolas, monospace; font-size: 12.5px; }
.voile { position: fixed; inset: 0; background: rgba(0, 0, 0, .45); display: flex; align-items: center; justify-content: center; padding: 16px; z-index: 10; }
.voile[hidden] { display: none; }
.boite { max-width: 560px; width: 100%; max-height: 90vh; overflow: auto; }
.procedure li { margin: 6px 0; }
[hidden] { display: none !important; }
@media (max-width: 640px) { .champ { grid-template-columns: 1fr; } .champ .borne, .champ .err { grid-column: 1; } main { padding: 10px; } }
