/* SASP Panel — DA du logo SASP : étoile argentée, anneau bleu marine */
:root {
  --bg: #060a14;
  --bg2: #0a1020;
  --panel: #0f1628;
  --panel2: #151e35;
  --panel3: #1c2742;
  --line: #1e2a45;
  --line2: #2c3b5e;
  --text: #f1f4fa;
  --text2: #ccd4e4;
  --muted: #8794ae;
  --metal: #d5dbe6;       /* argent de l'étoile : textes et filets, jamais en fond sous du texte */
  --metal2: #ffffff;
  --bleu: #2563eb;        /* boutons principaux (texte blanc) */
  --bleu2: #1d4fb8;
  --danger: #ff6b78;
  --ok: #3ddc97;
  --warn: #ffb547;
  --side: 268px;
  --r: 14px;
  --shadow: 0 24px 60px rgba(0, 0, 0, .55);
  --mono: 'JetBrains Mono', ui-monospace, monospace;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; } /* un élément caché le reste, même avec un display dans son style */
html, body { margin: 0; background: var(--bg); color: var(--text); font-family: Manrope, system-ui, sans-serif; font-size: 14px; -webkit-font-smoothing: antialiased; }
body { min-height: 100vh; background:
  radial-gradient(1000px 520px at 105% -10%, rgba(37, 99, 235, .16), transparent 60%),
  radial-gradient(800px 560px at -5% 110%, rgba(213, 219, 230, .07), transparent 60%),
  var(--bg); background-attachment: fixed; }
::selection { background: rgba(37, 99, 235, .45); }
a { color: var(--metal); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3, h4 { margin: 0; }
h1 { font-size: 24px; font-weight: 700; }
h2 { font-size: 17px; font-weight: 700; }
h3 { font-size: 15px; font-weight: 700; }
h4 { font-size: 13px; color: var(--muted); margin: 20px 0 10px; font-weight: 700; }
.muted { color: var(--muted); }
.small { font-size: 12.5px; }
.mono { font-family: var(--mono); }
.or { color: var(--metal); }
.nowrap { white-space: nowrap; }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb { background: var(--line2); border-radius: 10px; border: 2px solid var(--bg); }

/* Champs */
button, input, select, textarea { font: inherit; color: inherit; }
input, select, textarea { background: var(--bg2); border: 1px solid var(--line); border-radius: 10px; padding: 9px 12px; width: 100%; outline: none; transition: border-color .15s, box-shadow .15s; }
input:hover, select:hover, textarea:hover { border-color: var(--line2); }
input:focus, select:focus, textarea:focus { border-color: var(--bleu); box-shadow: 0 0 0 3px rgba(37, 99, 235, .22); }
input:disabled, select:disabled { opacity: .6; }
textarea { resize: vertical; line-height: 1.5; }
select { appearance: none; padding-right: 32px; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='none' stroke='%238794ae' stroke-width='2' viewBox='0 0 24 24'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 11px center; }
select option { background: var(--panel); }
input[type=checkbox] { width: 16px; height: 16px; accent-color: var(--bleu); padding: 0; cursor: pointer; flex: none; }
input[type=date] { color-scheme: dark; }
.field { display: grid; gap: 6px; align-content: start; }
.field > span { font-size: 12.5px; color: var(--muted); font-weight: 600; }
.field .aide { font-size: 12px; color: var(--muted); }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.grid3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.row.end { justify-content: flex-end; }
.spacer { flex: 1; }
.check { display: flex; gap: 9px; align-items: center; cursor: pointer; font-weight: 500; }

/* Boutons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 7px; background: var(--panel2); border: 1px solid var(--line2); border-radius: 10px; padding: 8px 14px; cursor: pointer; font-weight: 600; white-space: nowrap; transition: .15s; color: var(--text); text-decoration: none !important; }
.btn:hover { background: var(--panel3); border-color: #3b4f7d; }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: .45; pointer-events: none; }
.btn.primary { background: linear-gradient(180deg, var(--bleu), var(--bleu2)); border-color: #3b74f0; color: #fff; box-shadow: 0 6px 20px rgba(37, 99, 235, .3); }
.btn.primary:hover { filter: brightness(1.1); }
.btn.ghost { background: transparent; border-color: transparent; color: var(--muted); }
.btn.ghost:hover { color: var(--text); background: var(--panel2); }
.btn.small { padding: 5px 10px; font-size: 12.5px; border-radius: 8px; }
.btn.danger { color: var(--danger); }
.btn.danger:hover { border-color: var(--danger); background: rgba(255, 107, 120, .08); }
.btn.big { padding: 12px 18px; font-size: 15px; }
.icon-btn { width: 32px; height: 32px; display: inline-grid; place-items: center; border-radius: 9px; border: 1px solid var(--line); background: var(--bg2); cursor: pointer; color: var(--muted); flex: none; transition: .15s; }
.icon-btn:hover { color: var(--text); border-color: var(--line2); }
.icon-btn:disabled { opacity: .35; pointer-events: none; }
.icon-btn.up:hover { color: var(--ok); border-color: rgba(61, 220, 151, .5); }
.icon-btn.down:hover { color: var(--danger); border-color: rgba(255, 107, 120, .5); }
.seg { display: inline-flex; background: var(--bg2); border: 1px solid var(--line); border-radius: 10px; padding: 3px; gap: 2px; flex-wrap: wrap; }
.seg button { border: none; background: transparent; padding: 6px 12px; border-radius: 7px; cursor: pointer; color: var(--muted); font-weight: 600; }
.seg button:hover { color: var(--text); }
.seg button.on { background: var(--panel3); color: var(--text); }

/* Pastilles */
.chip { --c: #64748b; display: inline-flex; align-items: center; gap: 6px; padding: 2px 10px 2px 8px; border-radius: 999px; font-size: 12px; font-weight: 600; white-space: nowrap; line-height: 18px;
  background: color-mix(in srgb, var(--c) 16%, transparent); color: color-mix(in srgb, var(--c) 35%, #fff); border: 1px solid color-mix(in srgb, var(--c) 35%, transparent); }
.chip::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: var(--c); flex: none; }
.pill { display: inline-flex; align-items: center; gap: 4px; padding: 2px 9px; border-radius: 999px; font-size: 12px; font-weight: 600; background: var(--panel2); color: var(--muted); white-space: nowrap; line-height: 18px; }
.pill.ok { color: var(--ok); background: rgba(61, 220, 151, .1); }
.pill.warn { color: var(--warn); background: rgba(255, 181, 71, .1); }
.pill.ko { color: var(--danger); background: rgba(255, 107, 120, .1); }
.mat { font-variant-numeric: tabular-nums; font-weight: 700; color: var(--metal); background: rgba(213, 219, 230, .09); border: 1px solid rgba(213, 219, 230, .3); border-radius: 7px; padding: 1px 7px; font-size: 13px; }

/* Mise en page */
.shell { display: grid; grid-template-columns: var(--side) 1fr; min-height: 100vh; }
.side { position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; border-right: 1px solid var(--line); background: rgba(10, 16, 32, .82); backdrop-filter: blur(12px); padding: 18px 14px; gap: 6px; overflow-y: auto; }
.brand { display: flex; gap: 12px; align-items: center; padding: 4px 8px 16px; }
.brand img { width: 50px; height: 50px; object-fit: contain; filter: drop-shadow(0 4px 12px rgba(213, 219, 230, .25)); }
.brand b { font-size: 17px; display: block; }
.brand span { font-size: 12px; color: var(--muted); }
.nav { display: grid; gap: 2px; }
.nav .titre { font-size: 12px; color: var(--muted); font-weight: 600; padding: 14px 10px 6px; }
.nav a { display: flex; gap: 11px; align-items: center; padding: 9px 11px; border-radius: 10px; color: var(--text2); font-weight: 600; text-decoration: none; transition: .15s; }
.nav a svg { width: 18px; height: 18px; color: var(--muted); flex: none; }
.nav a:hover { background: var(--panel2); color: var(--text); }
.nav a.on { background: linear-gradient(90deg, rgba(37, 99, 235, .22), rgba(37, 99, 235, .06)); color: #fff; box-shadow: inset 2px 0 0 var(--metal); }
.nav a.on svg { color: var(--metal); }
.side .moi { margin-top: auto; border-top: 1px solid var(--line); padding: 14px 8px 2px; display: grid; gap: 10px; }
.side .moi .qui { display: flex; gap: 10px; align-items: center; }
.side .moi .qui div { min-width: 0; }
.side .moi b { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.codebar { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 12px; border: 1px solid var(--line); background: var(--panel); margin: 0 2px 6px; }
.codebar i { width: 12px; height: 12px; border-radius: 50%; background: var(--c); box-shadow: 0 0 0 4px color-mix(in srgb, var(--c) 22%, transparent), 0 0 14px var(--c); flex: none; }
.codebar b { font-size: 13px; }
.codebar span { font-size: 12px; color: var(--muted); display: block; }
.main { padding: 28px 34px 60px; min-width: 0; }
.head { display: flex; align-items: flex-end; gap: 16px; margin-bottom: 22px; flex-wrap: wrap; }
.head p { margin: 6px 0 0; color: var(--muted); }
.burger { display: none; }

.card { background: linear-gradient(180deg, rgba(21, 30, 53, .75), rgba(15, 22, 40, .75)); border: 1px solid var(--line); border-radius: var(--r); padding: 18px; }
.card + .card { margin-top: 16px; }
.cards { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); margin-bottom: 16px; }
.stat b { font-size: 28px; display: block; margin-top: 6px; font-weight: 700; }
.stat span { color: var(--muted); font-weight: 600; font-size: 13px; }
.cols { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }

/* Tableaux */
.tablewrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--r); background: rgba(15, 22, 40, .7); }
table { width: 100%; border-collapse: collapse; }
th { text-align: left; font-size: 12.5px; color: var(--muted); font-weight: 600; padding: 11px 12px; border-bottom: 1px solid var(--line); background: rgba(10, 16, 32, .6); white-space: nowrap; }
td { padding: 10px 12px; border-bottom: 1px solid var(--line); vertical-align: middle; }
tr:last-child td { border-bottom: none; }
tbody tr { transition: background .12s; }
tbody tr:hover { background: rgba(37, 99, 235, .06); }
tr.clic { cursor: pointer; }
tr.ancien td { opacity: .55; }
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; }
.vide { padding: 40px; text-align: center; color: var(--muted); }
.filtres { display: flex; gap: 10px; margin-bottom: 14px; flex-wrap: wrap; align-items: center; }
.filtres input[type=search] { max-width: 300px; }
.filtres select { width: auto; }

/* Matricules 01-99 */
.mats { display: grid; grid-template-columns: repeat(auto-fill, minmax(92px, 1fr)); gap: 8px; }
.mats div { border: 1px solid var(--line); border-radius: 10px; padding: 8px 10px; background: var(--bg2); min-height: 58px; }
.mats div b { font-family: var(--mono); font-size: 15px; color: var(--muted); }
.mats div span { display: block; font-size: 12px; margin-top: 3px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mats div.pris { border-color: color-mix(in srgb, var(--c) 45%, transparent); background: color-mix(in srgb, var(--c) 9%, var(--bg2)); cursor: pointer; }
.mats div.pris b { color: var(--metal); }
.mats div.libre span { color: var(--ok); }

/* Grades */
.grades { display: grid; gap: 10px; }
.grade { display: grid; grid-template-columns: auto auto 1fr auto; gap: 14px; align-items: center; padding: 14px 16px; border: 1px solid var(--line); border-radius: var(--r); background: var(--panel); border-left: 4px solid var(--c); }
.grade.drag { opacity: .4; }
.grade.cible { box-shadow: 0 -3px 0 var(--metal); }
.grade .poignee { cursor: grab; color: var(--muted); padding: 4px; }
.grade .rang { font-family: var(--mono); color: var(--muted); font-size: 12px; }
.grade .roles { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 6px; }
.perms { display: grid; gap: 14px; }
.perms fieldset { border: 1px solid var(--line); border-radius: 12px; padding: 10px 14px 12px; margin: 0; }
.perms legend { font-weight: 700; padding: 0 6px; color: var(--metal); }
.perms label { display: flex; gap: 9px; align-items: center; padding: 4px 0; cursor: pointer; }
.roleliste { max-height: 260px; overflow-y: auto; border: 1px solid var(--line); border-radius: 10px; padding: 6px 10px; background: var(--bg2); }
.roleliste label { display: flex; gap: 9px; align-items: center; padding: 5px 0; cursor: pointer; }
.roleliste .pt { width: 10px; height: 10px; border-radius: 50%; background: var(--c, #99a); flex: none; }
.roleliste label.bloque { opacity: .5; }

/* Calculateur */
.calc { display: grid; grid-template-columns: minmax(0, 1fr) 380px; gap: 18px; align-items: start; }
.recherche { position: relative; }
.lignes { display: grid; gap: 8px; margin-top: 14px; }
.ligne { display: grid; grid-template-columns: minmax(0, 1fr) 84px auto auto; gap: 12px; align-items: center; padding: 12px 14px; border: 1px solid var(--line); border-radius: 12px; background: var(--bg2); }
.ligne .t { font-weight: 600; line-height: 1.35; }
.ligne .d { font-size: 12px; color: var(--muted); margin-top: 4px; display: flex; gap: 8px; flex-wrap: wrap; }
.ligne input[type=number] { padding: 6px 8px; text-align: center; }
.resume { position: sticky; top: 20px; display: grid; gap: 14px; }
.total { text-align: center; padding: 22px 18px; border-radius: var(--r); border: 1px solid rgba(213, 219, 230, .35); background: radial-gradient(400px 160px at 50% 0, rgba(213, 219, 230, .14), transparent 70%), var(--panel); }
.total span { color: var(--muted); font-weight: 600; }
.total b { display: block; font-size: 34px; color: var(--metal2); margin: 6px 0 2px; font-variant-numeric: tabular-nums; }
.peines { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.peines div { background: var(--bg2); border: 1px solid var(--line); border-radius: 12px; padding: 12px 8px; text-align: center; }
.peines b { display: block; font-size: 19px; font-variant-numeric: tabular-nums; }
.peines span { font-size: 12px; color: var(--muted); }
.detail { display: grid; gap: 7px; font-size: 13px; }
.detail div { display: flex; justify-content: space-between; gap: 10px; }
.detail div span:first-child { color: var(--muted); }
.rapport { font-family: var(--mono); font-size: 12.5px; background: var(--bg2); border: 1px dashed var(--line2); border-radius: 10px; padding: 10px 12px; line-height: 1.55; white-space: pre-wrap; word-break: break-word; }
.alerte { padding: 10px 12px; border-radius: 10px; font-size: 13px; background: rgba(255, 181, 71, .1); border: 1px solid rgba(255, 181, 71, .3); color: #ffd79a; }

/* Code pénal */
.code-cat { margin-top: 18px; }
.code-cat h3 { display: flex; gap: 10px; align-items: center; margin-bottom: 10px; }
.notes { display: grid; gap: 8px; }
.notes li { line-height: 1.5; }

/* Panneau latéral */
.voile { position: fixed; inset: 0; background: rgba(3, 6, 14, .6); backdrop-filter: blur(3px); z-index: 50; animation: fade .18s; }
.tiroir { position: fixed; top: 0; right: 0; bottom: 0; width: min(560px, 100vw); background: var(--panel); border-left: 1px solid var(--line2); z-index: 51; display: flex; flex-direction: column; box-shadow: var(--shadow); animation: glisse .22s cubic-bezier(.2, .8, .2, 1); }
.tiroir header { display: flex; align-items: center; gap: 12px; padding: 18px 20px; border-bottom: 1px solid var(--line); }
.tiroir .corps { padding: 20px; overflow-y: auto; display: grid; gap: 14px; align-content: start; flex: 1; }
.tiroir footer { padding: 14px 20px; border-top: 1px solid var(--line); display: flex; gap: 10px; justify-content: flex-end; flex-wrap: wrap; }
.modale { position: fixed; z-index: 60; left: 50%; top: 50%; transform: translate(-50%, -50%); width: min(480px, calc(100vw - 32px)); background: var(--panel); border: 1px solid var(--line2); border-radius: 16px; box-shadow: var(--shadow); padding: 20px; display: grid; gap: 14px; animation: pop .18s; }
@keyframes fade { from { opacity: 0; } }
@keyframes glisse { from { transform: translateX(40px); opacity: 0; } }
@keyframes pop { from { transform: translate(-50%, -46%); opacity: 0; } }
.lien { display: flex; gap: 8px; }
.lien input { font-family: var(--mono); font-size: 12px; }
.histo { display: grid; gap: 8px; }
.histo div { display: grid; grid-template-columns: auto 1fr; gap: 10px; font-size: 13px; padding: 9px 12px; background: var(--bg2); border-radius: 10px; border: 1px solid var(--line); }

/* Connexion */
.login { min-height: 100vh; display: grid; place-items: center; padding: 20px; }
.login .boite { width: min(400px, 100%); display: grid; gap: 16px; padding: 30px; background: rgba(15, 22, 40, .85); border: 1px solid var(--line); border-radius: 20px; box-shadow: var(--shadow); }
.login .boite img { width: 120px; margin: 0 auto; filter: drop-shadow(0 8px 24px rgba(213, 219, 230, .3)); }
.login h1 { text-align: center; }
.login p { margin: 0; text-align: center; color: var(--muted); }
.erreur { color: var(--danger); font-size: 13px; min-height: 18px; }

/* Notifications */
#toasts { position: fixed; bottom: 18px; right: 18px; z-index: 90; display: grid; gap: 8px; }
.toast { background: var(--panel3); border: 1px solid var(--line2); border-left: 3px solid var(--ok); padding: 11px 16px; border-radius: 10px; box-shadow: var(--shadow); max-width: 380px; animation: pop2 .2s; }
.toast.ko { border-left-color: var(--danger); }
@keyframes pop2 { from { transform: translateY(10px); opacity: 0; } }
.spin { width: 22px; height: 22px; border: 3px solid var(--line2); border-top-color: var(--metal); border-radius: 50%; animation: tourne .8s linear infinite; display: inline-block; }
.chargement { display: grid; place-items: center; padding: 60px; }
@keyframes tourne { to { transform: rotate(360deg); } }

/* Écran de chargement */
#intro { position: fixed; inset: 0; z-index: 100; display: grid; place-items: center; align-content: center; gap: 10px; background: radial-gradient(700px 500px at 50% 45%, #0e1d44, var(--bg) 70%); transition: opacity .5s; overflow: hidden; }
#intro.fin { opacity: 0; pointer-events: none; }
.in-halo { position: absolute; width: 520px; height: 520px; border-radius: 50%; background: radial-gradient(circle, rgba(213, 219, 230, .22), transparent 65%); animation: halo 2.4s ease-in-out infinite; }
.in-rays { position: absolute; width: 900px; height: 900px; background: repeating-conic-gradient(from 0deg, rgba(213, 219, 230, .06) 0 6deg, transparent 6deg 22deg); border-radius: 50%; animation: rays 18s linear infinite; mask: radial-gradient(circle, #000 20%, transparent 62%); }
.in-badge { width: 190px; position: relative; animation: badge 1.1s cubic-bezier(.2, 1.4, .3, 1) both; filter: drop-shadow(0 18px 40px rgba(0, 0, 0, .6)); }
.in-titre { font-size: 26px; font-weight: 700; position: relative; animation: monte .7s .35s both; }
.in-titre b { color: var(--metal); }
.in-sous { color: var(--muted); position: relative; animation: monte .7s .5s both; }
.in-barre { width: 180px; height: 3px; background: var(--line); border-radius: 3px; overflow: hidden; margin-top: 12px; position: relative; animation: monte .6s .6s both; }
.in-barre i { display: block; height: 100%; width: 40%; background: linear-gradient(90deg, transparent, var(--metal), transparent); animation: barre 1.1s ease-in-out infinite; }
@keyframes halo { 50% { transform: scale(1.12); opacity: .7; } }
@keyframes rays { to { transform: rotate(360deg); } }
@keyframes badge { from { transform: scale(.4) rotate(-40deg); opacity: 0; } }
@keyframes monte { from { transform: translateY(12px); opacity: 0; } }
@keyframes barre { from { transform: translateX(-100%); } to { transform: translateX(250%); } }

/* Téléphone */
@media (max-width: 1100px) {
  .calc { grid-template-columns: 1fr; }
  .resume { position: static; }
  .cols { grid-template-columns: 1fr; }
}
@media (max-width: 820px) {
  .shell { grid-template-columns: 1fr; }
  .side { position: fixed; z-index: 70; width: min(290px, 86vw); transform: translateX(-100%); transition: transform .25s; }
  .side.ouvert { transform: none; box-shadow: var(--shadow); }
  .main { padding: 18px 16px 50px; }
  .burger { display: inline-grid; }
  .grid2, .grid3 { grid-template-columns: 1fr; }
  .ligne { grid-template-columns: 1fr 70px; }
  .ligne > :nth-child(3), .ligne > :nth-child(4) { justify-self: start; }
  .grade { grid-template-columns: auto 1fr; }
  .grade > :last-child { grid-column: 1 / -1; }
  h1 { font-size: 20px; }
}

/* Effectif par grade (même principe que les Équipes d'Alynia Staff) */
.av { width: 26px; height: 26px; border-radius: 50%; flex: none; object-fit: cover; display: inline-grid; place-items: center; background: var(--panel3); color: var(--text2); font-size: 11px; font-weight: 700; border: 1px solid var(--line2); }
.tiroir header .av { width: 32px; height: 32px; }
.eq-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(400px, 1fr)); gap: 14px; }
.eq-card { background: linear-gradient(180deg, rgba(21, 30, 53, .75), rgba(15, 22, 40, .75)); border: 1px solid var(--line); border-radius: var(--r); padding: 16px; display: flex; flex-direction: column; gap: 12px; transition: border-color .15s, background .15s; }
.eq-card.over { border-color: var(--c); background: color-mix(in srgb, var(--c) 10%, var(--panel)); }
.eq-card.eq-libre { opacity: .7; border-style: dashed; }
.eq-card.eq-libre:hover, .eq-card.eq-libre.over { opacity: 1; }
.eq-head { display: flex; align-items: center; gap: 10px; }
.eq-dot { width: 12px; height: 12px; border-radius: 50%; background: var(--c); margin: 0 6px; flex: none; box-shadow: 0 0 10px color-mix(in srgb, var(--c) 60%, transparent); }
.eq-who { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 4px; align-items: flex-start; }
.eq-who b { font-size: 15px; }
.eq-cpt { display: flex; flex-direction: column; align-items: flex-end; gap: 3px; }
.eq-cpt b { font-size: 22px; line-height: 1; }
.eq-rd { display: inline-flex; align-items: center; gap: 5px; max-width: 100%; padding: 2px 9px; border-radius: 999px; font: inherit; font-size: 11.5px; font-weight: 600; cursor: pointer; color: var(--muted); background: transparent; border: 1px dashed var(--line2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.eq-rd svg { width: 12px; height: 12px; flex: none; }
.eq-rd:disabled { cursor: default; }
.eq-rd.lie { color: #fff; background: rgba(88, 101, 242, .22); border: 1px solid rgba(88, 101, 242, .6); }
.eq-rd:not(:disabled):hover { border-color: #5865f2; color: #fff; }
.eq-ents { display: flex; flex-wrap: wrap; gap: 8px; border-left: 2px solid var(--line2); margin-left: 13px; padding: 2px 0 2px 14px; }
.eq-ent { display: inline-flex; align-items: center; gap: 7px; background: var(--bg2); border: 1px solid var(--line); border-radius: 99px; padding: 4px 6px 4px 4px; cursor: pointer; font-weight: 600; font-size: 13.5px; user-select: none; transition: border-color .15s; }
.eq-ent:hover { border-color: var(--line2); }
.eq-ent.fixe { padding-right: 12px; }
.eq-ent[draggable="true"] { cursor: grab; }
.eq-ent.drag { opacity: .4; }
.eq-ent .mat { font-size: 11.5px; padding: 0 5px; }
.eq-pt { width: 7px; height: 7px; border-radius: 50%; flex: none; }
.eq-pt.warn { background: var(--warn); }
.eq-pt.ko { background: var(--danger); }
.eq-mv { border: none; background: transparent; color: var(--muted); cursor: pointer; padding: 2px; border-radius: 6px; display: inline-flex; }
.eq-mv svg { width: 14px; height: 14px; }
.eq-mv:hover { color: var(--text); background: var(--panel3); }
.eq-act { display: flex; flex-wrap: wrap; gap: 6px; }
.eq-act svg { width: 13px; height: 13px; }
.menu-grade { position: fixed; z-index: 80; background: var(--panel); border: 1px solid var(--line2); border-radius: 12px; box-shadow: var(--shadow); padding: 6px; min-width: 220px; max-height: 70vh; overflow-y: auto; animation: pop2 .15s; }
.menu-grade button { display: flex; align-items: center; gap: 9px; width: 100%; text-align: left; background: none; border: none; padding: 8px 10px; border-radius: 8px; cursor: pointer; font-weight: 600; }
.menu-grade button:hover:not(:disabled) { background: var(--panel3); }
.menu-grade button:disabled { opacity: .5; cursor: default; }
.menu-grade i { width: 9px; height: 9px; border-radius: 50%; background: var(--c); flex: none; }
@media (max-width: 820px) { .eq-grid { grid-template-columns: 1fr; } }

/* Menu déroulant des infractions du calculateur, rangé par catégorie */
.champ-menu { position: relative; }
.champ-menu input { padding-right: 44px; }
.champ-menu button { position: absolute; right: 5px; top: 50%; transform: translateY(-50%); width: 32px; height: 32px; display: grid; place-items: center; border: none; border-radius: 8px; background: transparent; color: var(--muted); cursor: pointer; }
.champ-menu button:hover { background: var(--panel3); color: var(--text); }
.champ-menu button svg { width: 18px; height: 18px; }
.resultats { position: absolute; z-index: 30; left: 0; right: 0; top: calc(100% + 6px); background: var(--panel); border: 1px solid var(--line2); border-radius: 14px; box-shadow: var(--shadow); display: flex; flex-direction: column; overflow: hidden; animation: pop2 .14s; }
.res-tabs { display: flex; flex-wrap: wrap; gap: 4px; padding: 8px; border-bottom: 1px solid var(--line); flex: none; background: var(--bg2); }
.res-tabs button { display: inline-flex; align-items: center; gap: 7px; border: 1px solid transparent; background: transparent; color: var(--muted); padding: 6px 11px; border-radius: 9px; cursor: pointer; font-weight: 600; white-space: nowrap; }
.res-tabs button i { width: 8px; height: 8px; border-radius: 50%; background: var(--c); }
.res-tabs button span { font-size: 11.5px; color: var(--muted); background: var(--panel2); border-radius: 99px; padding: 0 7px; }
.res-tabs button:hover { color: var(--text); background: var(--panel2); }
.res-tabs button.on { color: #fff; background: var(--panel3); border-color: var(--line2); }
.res-liste { max-height: 440px; overflow-y: auto; padding: 0 6px 6px; }
.res-cat { position: sticky; top: 0; z-index: 1; display: flex; align-items: center; gap: 9px; padding: 11px 10px 7px; background: var(--panel); font-weight: 700; font-size: 13px; color: color-mix(in srgb, var(--c) 45%, #fff); border-bottom: 1px solid var(--line); margin-bottom: 4px; }
.res-cat i { width: 10px; height: 10px; border-radius: 50%; background: var(--c); box-shadow: 0 0 10px color-mix(in srgb, var(--c) 60%, transparent); }
.res-cat span { margin-left: auto; font-size: 12px; color: var(--muted); font-weight: 600; }
.res-liste button { display: grid; grid-template-columns: 50px minmax(0, 1fr) auto auto; gap: 12px; width: 100%; text-align: left; background: none; border: none; border-left: 3px solid transparent; padding: 8px 10px; border-radius: 9px; cursor: pointer; align-items: center; }
.res-liste button.sel { background: var(--panel3); border-left-color: var(--c); }
.res-liste .art { font-variant-numeric: tabular-nums; font-size: 12.5px; font-weight: 700; color: color-mix(in srgb, var(--c) 40%, #fff); }
.res-liste .t { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.res-liste .n { font-weight: 600; line-height: 1.35; }
.res-liste .d { font-size: 12px; color: var(--muted); }
.res-liste .prix { font-variant-numeric: tabular-nums; color: var(--text2); font-weight: 600; font-size: 13px; white-space: nowrap; }
.res-liste mark { background: rgba(37, 99, 235, .35); color: #fff; border-radius: 3px; padding: 0 1px; }
.res-pied { padding: 7px 12px; border-top: 1px solid var(--line); background: var(--bg2); flex: none; }
@media (max-width: 820px) { .res-liste button { grid-template-columns: 40px minmax(0, 1fr) auto; } .res-liste .pill { display: none; } .res-pied { display: none; } }
.res-liste button.ajoute { animation: ajoute .6s ease-out; }
@keyframes ajoute { 0% { background: rgba(61, 220, 151, .32); } 100% { background: var(--panel3); } }
.res-pied { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
#recap { font-size: 13px; white-space: nowrap; }
.lignes { margin-top: 16px; }
.lignes .vide.petit { padding: 14px; border: 1px dashed var(--line2); border-radius: 12px; font-size: 13px; }

/* Menu : catégorie repliable (Rookie) */
.nav .titre.repli { display: flex; align-items: center; gap: 6px; width: 100%; background: none; border: none; cursor: pointer; text-align: left; font: inherit; font-size: 12px; font-weight: 600; color: var(--muted); padding: 14px 10px 6px; }
.nav .titre.repli:hover { color: var(--text); }
.nav .titre.repli svg { width: 14px !important; height: 14px; transform: rotate(-90deg); transition: transform .15s; }
.nav .titre.repli.ouvert svg { transform: none; }
.nav .sous { display: grid; gap: 2px; }
.nav .sous.ferme { display: none; }
.nav .sous a { padding: 7px 11px; font-size: 13.5px; }

/* Carnet du Rookie */
.rk-banniere { position: relative; display: flex; align-items: flex-end; gap: 16px; flex-wrap: wrap; min-height: 150px; padding: 24px 26px; margin-bottom: 22px; border-radius: 18px; border: 1px solid var(--line); overflow: hidden;
  background: linear-gradient(90deg, rgba(6, 10, 20, .94) 30%, rgba(6, 10, 20, .55)), var(--img, linear-gradient(135deg, #16285a, #0a1433)) center / cover; }
.rk-banniere h1 { font-size: 28px; margin: 4px 0 6px; }
.rk-banniere .small { color: var(--text2); }
.rk-sur { color: var(--metal); font-weight: 600; font-size: 13px; }
.rk-page { display: grid; grid-template-columns: minmax(0, 1fr) 240px; gap: 24px; align-items: start; }
.rk-page:not(:has(.rk-cote)) { grid-template-columns: minmax(0, 1fr); }
.rk-texte { background: linear-gradient(180deg, rgba(21, 30, 53, .75), rgba(15, 22, 40, .75)); border: 1px solid var(--line); border-radius: var(--r); padding: 26px 30px; line-height: 1.7; font-size: 15px; color: var(--text2); min-width: 0; }
.rk-texte h2 { color: var(--text); font-size: 19px; margin: 30px 0 10px; padding-top: 6px; scroll-margin-top: 20px; }
.rk-texte h2:first-child { margin-top: 0; }
.rk-texte h3 { color: var(--text); font-size: 16px; margin: 20px 0 8px; }
.rk-texte p { margin: 0 0 12px; }
.rk-texte ul, .rk-texte ol { margin: 0 0 14px; padding-left: 24px; }
.rk-texte li { margin: 3px 0; }
.rk-texte li::marker { color: var(--metal); }
.rk-texte b { color: var(--text); }
.rk-texte a { color: #8fb4ff; text-decoration: underline; }
.rk-texte blockquote { margin: 8px 0 12px; padding: 10px 14px; border-left: 3px solid var(--bleu); background: rgba(37, 99, 235, .1); border-radius: 0 10px 10px 0; color: var(--text); font-family: var(--mono); font-size: 13.5px; }
.rk-texte figure { margin: 16px 0; }
.rk-texte img { max-width: 100%; border-radius: 12px; border: 1px solid var(--line2); cursor: zoom-in; display: block; }
.rk-texte figcaption { font-size: 12.5px; color: var(--muted); margin-top: 6px; }
.rk-cote { position: sticky; top: 20px; }
.rk-som { display: grid; gap: 2px; background: var(--panel); border: 1px solid var(--line); border-radius: var(--r); padding: 14px; max-height: calc(100vh - 40px); overflow-y: auto; }
.rk-som b { font-size: 13px; margin-bottom: 6px; }
.rk-som a { color: var(--text2); font-size: 13px; padding: 5px 8px; border-radius: 8px; text-decoration: none; line-height: 1.35; }
.rk-som a:hover { background: var(--panel3); color: #fff; }
.rk-cartes { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 14px; margin-top: 20px; }
.rk-carte { display: flex; flex-direction: column; gap: 10px; padding: 10px 10px 14px; background: var(--panel); border: 1px solid var(--line); border-radius: var(--r); color: var(--text); text-decoration: none !important; transition: border-color .15s, transform .15s; }
.rk-carte:hover { border-color: var(--line2); transform: translateY(-2px); }
.rk-carte img, .rk-sans { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; border-radius: 10px; background: var(--panel3); display: grid; place-items: center; color: var(--muted); }
.rk-sans svg { width: 30px; height: 30px; }
.rk-carte b { padding: 0 4px; }
.rk-nav { display: flex; gap: 10px; margin-top: 18px; flex-wrap: wrap; }
.rk-zoom { position: fixed; inset: 0; z-index: 95; background: rgba(3, 6, 14, .88); display: grid; place-items: center; padding: 20px; cursor: zoom-out; animation: fade .15s; }
.rk-zoom img { max-width: 100%; max-height: 100%; border-radius: 12px; }
.rk-outils { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.rk-outils svg { width: 13px; height: 13px; }
#rkC { font-family: var(--mono); font-size: 13px; line-height: 1.55; min-height: 420px; }
.rk-apercu { max-height: 60vh; overflow-y: auto; }
.rk-vmini { width: 64px; height: 36px; object-fit: cover; border-radius: 6px; border: 1px solid var(--line2); }
@media (max-width: 1100px) { .rk-page { grid-template-columns: 1fr; } .rk-cote { display: none; } }
@media (max-width: 820px) { .rk-texte { padding: 18px; } .rk-banniere h1 { font-size: 22px; } }
.rk-texte a.rk-lien { display: inline-flex; align-items: center; gap: 6px; margin: 4px 0; padding: 9px 16px; border-radius: 10px; background: linear-gradient(180deg, var(--bleu), var(--bleu2)); color: #fff; font-weight: 600; text-decoration: none; }
.rk-texte a.rk-lien:hover { filter: brightness(1.1); }
