/* =====================================================================
   Milice de Cayo — Registre de service (nuit sur Cayo, olive / or)
   ===================================================================== */
:root {
  --bg: #15160f;
  --bg2: #1b1c14;
  --card: rgba(30, 32, 22, .9);
  --card2: rgba(40, 43, 29, .92);
  --field: #13140d;
  --line: rgba(120, 128, 82, .28);
  --line2: rgba(140, 148, 96, .45);
  --cream: #e9e3c9;
  --mute: #9c9a7e;
  --red: #c4532a;
  --red2: #e0663a;
  --green: #8fb36a;
  --teal: #9db08a;
  --gold: #d6a92c;
  --head: 'Oswald', 'Arial Narrow', sans-serif;
  --body: 'IBM Plex Mono', 'Courier New', monospace;
  --type: 'IBM Plex Mono', 'Courier New', monospace;
  --stencil: 'Oswald', 'Arial Narrow', sans-serif;
  --cut: polygon(10px 0, 100% 0, 100% calc(100% - 10px), calc(100% - 10px) 100%, 0 100%, 0 10px);
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; scroll-padding-top: 20px; }
body { min-height: 100vh; background: var(--bg); color: var(--cream); font-family: var(--body); font-size: 14.5px; line-height: 1.6; -webkit-font-smoothing: antialiased; }
button, input, textarea, select { font: inherit; color: inherit; }
a { color: inherit; text-decoration: none; }
h2 { font-family: var(--head); font-size: 20px; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; line-height: 1.2; }
[hidden] { display: none !important; }

/* ================= Decor de nuit ================= */
.scene { position: fixed; inset: 0; z-index: -1; overflow: hidden; pointer-events: none;
  background: radial-gradient(1200px 700px at 50% 120%, #262a17 0%, transparent 60%), linear-gradient(180deg, #121309 0%, #191b11 55%, #1f2115 100%); }
.stars { position: absolute; inset: 0; opacity: .55;
  background-image:
    radial-gradient(1px 1px at 20px 30px, #fff 50%, transparent 51%),
    radial-gradient(1px 1px at 140px 80px, #e8e2c0 50%, transparent 51%),
    radial-gradient(1.5px 1.5px at 260px 40px, #fff 50%, transparent 51%),
    radial-gradient(1px 1px at 330px 150px, #d8d2b0 50%, transparent 51%),
    radial-gradient(1px 1px at 90px 190px, #fff 50%, transparent 51%),
    radial-gradient(1.5px 1.5px at 200px 230px, #e8e2c0 50%, transparent 51%),
    radial-gradient(1px 1px at 380px 260px, #fff 50%, transparent 51%);
  background-size: 400px 300px; mask-image: linear-gradient(180deg, #000 30%, transparent 75%); -webkit-mask-image: linear-gradient(180deg, #000 30%, transparent 75%); }
.moon { position: absolute; top: 120px; right: 3%; width: 54px; height: 54px; border-radius: 50%;
  background: radial-gradient(circle at 30% 35%, #a9a99d 0 4px, transparent 5px), radial-gradient(circle at 62% 60%, #a3a397 0 6px, transparent 7px), radial-gradient(circle at 55% 28%, #b4b4a8 0 3px, transparent 4px), radial-gradient(circle at 40% 40%, #f2f1e6, #cfcfc2);
  box-shadow: 0 0 40px 14px rgba(240, 236, 210, .12), 0 0 120px 40px rgba(240, 236, 210, .06); }
.beam { position: absolute; bottom: 120px; width: 160px; height: 120vh; transform-origin: 50% 100%; opacity: .5;
  background: linear-gradient(0deg, rgba(220, 200, 120, .16), rgba(220, 200, 120, 0) 85%); clip-path: polygon(46% 100%, 54% 100%, 100% 0, 0 0); }
.beam.b1 { left: 7%; animation: sweep 18s ease-in-out infinite alternate; }
.beam.b2 { right: 6%; background: linear-gradient(0deg, rgba(210, 90, 50, .2), rgba(210, 90, 50, 0) 85%); animation: sweep 23s ease-in-out infinite alternate-reverse; }
@keyframes sweep { from { transform: rotate(-14deg); } to { transform: rotate(12deg); } }
.heli { position: absolute; top: 54px; left: -180px; width: 150px; opacity: .8; animation: fly 70s linear infinite; }
@keyframes fly { from { transform: translateX(0); } to { transform: translateX(calc(100vw + 360px)); } }
.skyline { position: absolute; left: 0; right: 0; bottom: 0; width: 100%; height: 260px; }
@media (prefers-reduced-motion: reduce) { .beam, .heli { animation: none; } }

/* ================= En-tete + onglets ================= */
.top { width: min(1100px, 100% - 40px); margin: 0 auto; padding-top: 22px; }
.top-in { display: flex; align-items: center; gap: 16px; }
.brand { display: flex; align-items: center; gap: 16px; }
.brand img { width: 64px; height: 64px; filter: drop-shadow(0 6px 16px rgba(0, 0, 0, .7)); }
.brand span { display: grid; line-height: 1.1; }
.brand b { font-family: var(--head); font-size: 34px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; }
.brand small { margin-top: 4px; font-size: 12.5px; letter-spacing: .3em; text-transform: uppercase; color: var(--mute); }
.me { display: flex; align-items: center; gap: 10px; margin-left: auto; padding: 5px 14px 5px 5px; border: 1px solid var(--line); border-radius: 40px; background: rgba(20, 21, 14, .7); transition: border-color .15s; }
.me:hover { border-color: var(--gold); }
.me-av { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 50%; overflow: hidden; border: 2px solid var(--red); background: var(--card2); font-size: 17px; }
.me-av img { width: 100%; height: 100%; object-fit: cover; }
.me-n { display: grid; line-height: 1.2; }
.me-n b { font-family: var(--head); font-size: 14px; font-weight: 600; letter-spacing: .05em; }
.me-n small { font-size: 11px; letter-spacing: .1em; text-transform: uppercase; color: var(--gold); }
#me-out { margin-left: auto; }
.tabs { display: flex; gap: 4px; margin-top: 24px; border-bottom: 1px solid var(--line2); overflow-x: auto; scrollbar-width: none; }
.tabs::-webkit-scrollbar { display: none; }
.tabs a { position: relative; flex: none; display: flex; align-items: center; gap: 6px; padding: 12px 15px; font-family: var(--head); font-size: 14px; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: var(--mute); transition: color .15s; }
.tabs a:hover { color: var(--cream); }
.tabs a.on { color: var(--red2); }
.tabs a.on::after { content: ''; position: absolute; left: 0; right: 0; bottom: -1px; height: 2px; background: var(--red2); }
.subtabs { display: flex; gap: 6px; padding: 12px 0 0; overflow-x: auto; scrollbar-width: none; }
.subtabs a { flex: none; padding: 6px 14px; border: 1px solid var(--line); font-size: 12.5px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--mute); }
.subtabs a:hover { color: var(--cream); border-color: var(--line2); }
.subtabs a.on { color: var(--gold); border-color: var(--gold); background: rgba(214, 169, 44, .08); }
.count { min-width: 20px; padding: 0 6px; border-radius: 10px; background: var(--gold); color: #17180f; font-family: var(--body); font-size: 11px; font-weight: 700; letter-spacing: 0; text-align: center; }

/* ================= Mise en page ================= */
.page, .layout, .hero-in { width: min(1100px, 100% - 40px); margin: 0 auto; }
.page { padding: 34px 0 90px; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; margin-bottom: 24px; }
.page-head h1 { margin-top: 6px; font-family: var(--head); font-size: clamp(28px, 4vw, 40px); font-weight: 700; letter-spacing: .08em; text-transform: uppercase; line-height: 1.1; }
.stamp { display: inline-block; font-size: 12px; font-weight: 600; letter-spacing: .28em; text-transform: uppercase; color: var(--gold); }
.page-head input[type=search] { max-width: 380px; }
.stack { display: grid; gap: 20px; }
.two { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; align-items: start; }
/* Cadres avec coins "viseur" dores (touche propre au site) */
.card { position: relative; padding: 24px; border: 1px solid var(--line2); background: var(--card); box-shadow: 0 10px 30px rgba(0, 0, 0, .25); }
.card::before { content: ''; position: absolute; inset: -1px; pointer-events: none;
  background:
    linear-gradient(var(--gold), var(--gold)) top left / 14px 2px no-repeat, linear-gradient(var(--gold), var(--gold)) top left / 2px 14px no-repeat,
    linear-gradient(var(--gold), var(--gold)) top right / 14px 2px no-repeat, linear-gradient(var(--gold), var(--gold)) top right / 2px 14px no-repeat,
    linear-gradient(var(--gold), var(--gold)) bottom left / 14px 2px no-repeat, linear-gradient(var(--gold), var(--gold)) bottom left / 2px 14px no-repeat,
    linear-gradient(var(--gold), var(--gold)) bottom right / 14px 2px no-repeat, linear-gradient(var(--gold), var(--gold)) bottom right / 2px 14px no-repeat; }
.card > h2 { margin-bottom: 16px; color: var(--gold); }
.boxed { text-align: center; }
.boxed .inline-form, .boxed .docs, .boxed .hint { text-align: left; }
.box-k { font-family: var(--head); font-size: 15px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: var(--gold); }
.box-t { margin: 4px 0 14px; font-family: var(--head); font-size: 14px; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; }
.box-t:not(:nth-child(2)) { margin-top: 26px; }
.sub { margin: 22px 0 10px; font-family: var(--head); font-size: 13px; font-weight: 600; letter-spacing: .16em; text-transform: uppercase; color: var(--gold); }
.hint { margin: -2px 0 12px; color: var(--mute); font-size: 12.5px; }
.hint a, .prose a, .steps a, .locked a:not(.btn) { color: var(--gold); text-decoration: underline; }
.center { text-align: center; }
.muted { color: var(--mute); }
.gold { color: var(--gold); }
.mono, .mono-b { font-family: var(--type); }
.empty { padding: 34px 20px; text-align: center; color: var(--mute); }

/* ================= Boutons et champs ================= */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 10px 18px; border: 1px solid var(--red); border-radius: 2px; background: var(--red); color: #fff; font-family: var(--head); font-size: 13.5px; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; cursor: pointer; white-space: nowrap; transition: background .15s, border-color .15s, color .15s; }
.btn:hover { background: var(--red2); border-color: var(--red2); }
.btn:disabled { opacity: .4; cursor: not-allowed; }
.btn-ghost { background: rgba(20, 21, 14, .5); border-color: var(--line2); color: var(--cream); }
.btn-ghost:hover { background: rgba(233, 227, 201, .06); border-color: var(--cream); }
.btn-sm { padding: 7px 13px; font-size: 12px; }
.btn-big { padding: 13px 26px; font-size: 15px; }
.btn-danger { background: transparent; border-color: rgba(224, 102, 58, .5); color: var(--red2); }
.btn-danger:hover { background: var(--red); border-color: var(--red); color: #fff; }
.btn-ok { background: transparent; border-color: rgba(143, 179, 106, .6); color: var(--green); }
.btn-ok:hover { background: var(--green); border-color: var(--green); color: #141509; }
.btn-stop { background: transparent; border-color: var(--red2); color: var(--red2); }
.btn-stop:hover { background: var(--red); color: #fff; }
.linkbtn { border: 0; background: none; color: var(--gold); font-weight: 600; cursor: pointer; text-decoration: underline; }
.row-btns { display: flex; flex-wrap: wrap; gap: 8px; }
.field { display: grid; gap: 6px; }
.field > span { font-size: 11.5px; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: var(--mute); }
.field.grow { flex: 1; min-width: 240px; }
input[type=text], input[type=number], input[type=search], input[type=date], input[type=password], textarea, select {
  width: 100%; padding: 10px 12px; border: 1px solid var(--line2); border-radius: 2px; background: var(--field); color: var(--cream); outline: none; color-scheme: dark; transition: border-color .15s; }
input:focus, textarea:focus, select:focus { border-color: var(--gold); }
textarea { resize: vertical; }
input[type=number]::-webkit-inner-spin-button { opacity: .4; }
.fields { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.suffix { display: flex; align-items: center; gap: 10px; }
.suffix input { width: 120px; font-size: 18px; font-weight: 700; text-align: center; }
.suffix em { font-style: normal; color: var(--mute); }
.inline-form { display: flex; align-items: flex-end; gap: 12px; flex-wrap: wrap; margin-bottom: 18px; }
.inline-form .field { flex: 1; min-width: 220px; }
.settings { display: flex; align-items: flex-end; gap: 14px; flex-wrap: wrap; }
.choice { display: flex; flex-wrap: wrap; gap: 8px; }
.choice button { min-width: 60px; padding: 10px 18px; border: 1px solid var(--line2); border-radius: 2px; background: var(--field); color: var(--mute); font-weight: 600; cursor: pointer; transition: all .15s; }
.choice button:hover { border-color: var(--gold); color: var(--cream); }
.choice button.on { background: var(--gold); border-color: var(--gold); color: #17180f; }

/* Etiquettes de statut */
.pill { flex: none; display: inline-block; padding: 4px 10px; border: 1px solid var(--line2); border-radius: 2px; font-family: var(--head); font-size: 11px; font-weight: 600; letter-spacing: .12em; color: var(--mute); white-space: nowrap; }
.pill.ok { color: #a6bf7f; border-color: rgba(143, 179, 106, .5); background: rgba(100, 120, 60, .22); }
.pill.paid { color: #c9c49a; border-color: rgba(200, 196, 150, .45); background: rgba(110, 108, 70, .25); }
.pill.ko { color: #ff7f55; border-color: rgba(224, 102, 58, .6); background: rgba(196, 83, 42, .16); }
.pill.wait { color: var(--gold); border-color: rgba(214, 169, 44, .5); background: rgba(214, 169, 44, .08); }
.pill.live { color: var(--green); border-color: rgba(143, 179, 106, .55); background: rgba(143, 179, 106, .1); }
.rank { display: inline-block; padding: 3px 10px; background: #5a4a14; border: 1px solid #7c6619; color: var(--gold); font-family: var(--head); font-size: 12px; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; }
.tag { display: inline-block; margin-left: 4px; padding: 1px 7px; border: 1px solid var(--line2); border-radius: 2px; font-style: normal; font-size: 10.5px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; vertical-align: middle; color: var(--mute); }
.tag.req { color: var(--red2); border-color: var(--red2); }
.docs-rule { color: var(--gold); }

/* Tableaux */
.tbl-wrap { overflow-x: auto; }
.tbl, .eq { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.tbl th, .eq th { padding: 8px 10px; border-bottom: 1px solid var(--line2); color: var(--mute); font-size: 11px; font-weight: 600; letter-spacing: .14em; text-align: left; text-transform: uppercase; white-space: nowrap; }
.tbl td, .eq td { padding: 11px 10px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.tbl tfoot td { border: 0; font-weight: 700; }
.tbl .empty { padding: 30px 10px; }
.eq { margin: 0 auto; max-width: 820px; }
.eq th, .eq td { text-align: center; }
.eq td { font-size: 14px; }
.sn { color: var(--gold); font-weight: 600; letter-spacing: .04em; }
.eq-none { color: var(--mute); }

/* Statistiques */
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.stat { padding: 18px 14px; border: 1px solid var(--line2); border-radius: 2px; background: var(--card); text-align: center; }
.stat small { display: block; margin-bottom: 6px; color: var(--mute); font-size: 11px; letter-spacing: .16em; text-transform: uppercase; }
.stat b { font-size: 26px; font-weight: 700; color: var(--gold); letter-spacing: .02em; }
.stat b span { font-size: 15px; color: var(--mute); }
.stat.ok b { color: var(--green); }
.stat.ko b { color: var(--red2); }
.stats-sm { margin: 14px 0; }
.stats-sm .stat b { font-size: 20px; }

/* Cases photo */
.docs { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.docs-6 { grid-template-columns: repeat(3, 1fr); }
.docs-2 { grid-template-columns: 1fr 1fr; }
.drop { position: relative; display: grid; place-content: center; gap: 4px; min-height: 140px; padding: 14px; border: 1px dashed var(--line2); border-radius: 2px; background: rgba(15, 16, 10, .7); text-align: center; cursor: pointer; overflow: hidden; outline: none; transition: border-color .15s, background .15s; }
.drop:hover, .drop:focus, .drop.over { border-color: var(--gold); background: rgba(214, 169, 44, .05); }
.drop-t { font-weight: 600; }
.drop-h { color: var(--mute); font-size: 12.5px; }
.drop.has { display: block; min-height: 0; padding: 0; border-style: solid; }
.drop.has .drop-t, .drop.has .drop-h { display: none; }
.drop img { display: block; width: 100%; height: auto; max-height: 280px; object-fit: contain; background: #000; }
.drop-x { position: absolute; top: 8px; right: 8px; width: 28px; height: 28px; border: 0; border-radius: 50%; background: rgba(0, 0, 0, .75); color: #fff; cursor: pointer; }

/* ================= Espace membre ================= */
.m-head { display: flex; align-items: center; gap: 18px; margin-bottom: 22px; }
.m-av { position: relative; display: grid; place-items: center; flex: none; width: 84px; height: 84px; border: 3px solid var(--red); border-radius: 50%; background: var(--card2); overflow: hidden; cursor: pointer; font-size: 34px; }
.m-av img { width: 100%; height: 100%; object-fit: cover; }
.m-av::after { content: '📷'; position: absolute; inset: auto 0 0; padding: 2px 0 4px; background: rgba(0, 0, 0, .65); font-size: 12px; text-align: center; opacity: 0; transition: opacity .15s; }
.m-av:hover::after, .m-av.over::after { opacity: 1; }
.m-id { flex: 1; display: grid; justify-items: start; gap: 6px; }
.m-id h1 { font-family: var(--head); font-size: clamp(24px, 4vw, 32px); font-weight: 700; letter-spacing: .08em; text-transform: uppercase; line-height: 1.1; }
.clock { display: grid; grid-template-columns: 1fr auto auto; align-items: center; gap: 24px; }
.clock h2 { margin-bottom: 4px; color: var(--gold); }
.clock-time { font-size: clamp(34px, 5vw, 50px); font-weight: 600; letter-spacing: .06em; color: var(--mute); }
.clock.on { border-color: rgba(143, 179, 106, .55); }
.clock.on .clock-time { color: var(--cream); }
.abs-form { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.abs-form .full { grid-column: 1 / -1; }
.abs-row, .v-row { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.abs-row > div, .v-who { display: grid; min-width: 0; }
.abs-row small, .v-who small { color: var(--mute); font-size: 12.5px; }
.v-who { flex: 1; }
.v-reason { margin-top: 4px; font-size: 13.5px; color: #d6d0b4; white-space: pre-wrap; }
.v-done { display: grid; justify-items: end; gap: 4px; }
.send-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-top: 20px; padding-top: 18px; border-top: 1px solid var(--line); }
.send-row b { color: var(--gold); }
.runs { display: grid; }
.run-row { display: flex; align-items: center; gap: 16px; padding: 14px 4px; border-bottom: 1px solid var(--line); }
.run-row:last-child { border-bottom: 0; }
.run-main { flex: 1; display: grid; justify-items: center; text-align: center; min-width: 0; }
.run-main b { font-family: var(--head); font-size: 16px; font-weight: 600; letter-spacing: .04em; }
.run-main small { color: var(--mute); font-size: 13px; letter-spacing: .06em; }
.run-amount { flex: none; font-family: var(--head); font-size: 17px; font-weight: 600; color: var(--gold); }
.runs-t { margin-bottom: 6px; text-align: center; font-family: var(--head); font-size: 15px; font-weight: 600; letter-spacing: .14em; color: var(--gold); text-transform: uppercase; }

/* ================= Organigramme ================= */
.tree { display: grid; justify-items: center; padding: 10px 0 20px; }
.tree-row { display: flex; flex-wrap: wrap; justify-content: center; gap: 16px; }
.tree-link { width: 1px; height: 30px; background: var(--line2); }
.node { display: grid; justify-items: center; align-content: start; width: 140px; padding: 14px 10px; border: 1px solid var(--line2); background: var(--card); text-align: center; }
.node.top { width: 160px; border-color: var(--gold); }
.node-av { display: grid; place-items: center; width: 74px; height: 74px; margin-bottom: 10px; border: 2px solid var(--red); border-radius: 50%; background: var(--card2); overflow: hidden; font-size: 30px; }
.node.top .node-av { width: 84px; height: 84px; border-color: var(--gold); }
.node-av img { width: 100%; height: 100%; object-fit: cover; }
.node b { font-family: var(--head); font-size: 14.5px; font-weight: 600; line-height: 1.25; }
.node small { margin-top: 2px; font-size: 10.5px; letter-spacing: .14em; text-transform: uppercase; color: var(--mute); }
.node.top small { color: var(--gold); }
.tree-k { margin: 26px 0 4px; text-align: center; font-family: var(--head); font-size: 15px; font-weight: 600; letter-spacing: .16em; color: var(--gold); text-transform: uppercase; }
.grades-info { margin-top: 30px; }
.grades-info summary { display: flex; align-items: center; justify-content: space-between; cursor: pointer; list-style: none; }
.grades-info summary::-webkit-details-marker { display: none; }
.grades-info[open] summary { margin-bottom: 18px; }
.chev { color: var(--mute); transition: transform .2s; }
details:not([open]) > summary .chev { transform: rotate(-90deg); }
.hier-g + .hier-g { margin-top: 26px; }
.hier-gt { margin-bottom: 12px; padding-bottom: 6px; border-bottom: 1px solid var(--red); font-size: 16px; }
.hier-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 12px; }
.grade { padding: 14px 16px; border: 1px solid var(--line); background: rgba(15, 16, 10, .55); }
.grade-h { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.grade-e { font-size: 20px; }
.grade h3 { flex: 1; font-family: var(--head); font-size: 16px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; }
.grade-n { padding: 0 8px; border: 1px solid var(--line2); font-size: 11px; color: var(--gold); }
.grade ul { padding-left: 12px; border-left: 2px solid var(--line2); list-style: none; color: #cbc6a9; font-size: 13px; }
.grade-p { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 10px; }
.grade-p span { padding: 1px 8px; border: 1px solid var(--line2); font-size: 11.5px; }

/* ================= Code penal / pages ================= */
.cp th { color: var(--gold); }
.cp td { font-size: 13.5px; }
.cp td:first-child { font-weight: 600; }
.cp-cat td { padding-top: 22px; font-family: var(--head); font-size: 16px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: var(--gold); text-align: center; border-bottom: 1px solid var(--red); }
.steps { display: grid; gap: 6px; margin: 6px 0 10px; padding-left: 20px; text-align: left; color: #d6d0b4; }
.prose { font-size: 14.5px; color: #ddd7bb; }
.prose h3 { margin: 18px 0 8px; font-family: var(--head); font-size: 22px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--cream); }
.prose h3:first-child { margin-top: 0; }
.prose h4 { margin: 14px 0 6px; font-family: var(--head); font-size: 14px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: var(--gold); }
.prose p + p { margin-top: 8px; }
.prose ul { margin: 6px 0 10px; padding-left: 22px; }
.upd { margin-top: 18px; color: var(--mute); font-size: 12px; }
.gal { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 14px; margin: 14px 0; }
.gal figure { position: relative; }
.gal img { display: block; width: 100%; border: 1px solid var(--line2); cursor: zoom-in; }
.gal figcaption { margin-top: 6px; color: var(--mute); font-size: 12.5px; text-align: center; }
.pg-gal { margin-top: 20px; }
.pg-add { display: grid; grid-template-columns: 260px 1fr; gap: 18px; align-items: end; }
.pg-add-f { display: grid; gap: 12px; }
#pg-text { margin-bottom: 12px; }

/* ================= Entretien ================= */
.hero { padding: 34px 0 6px; }
.hero-in { position: relative; display: flex; align-items: center; gap: 30px; padding: 26px; border: 1px solid var(--line2); background: var(--card); }
.hero-logo { width: 130px; height: 130px; flex: none; filter: drop-shadow(0 10px 24px rgba(0, 0, 0, .6)); }
.hero h1 { margin: 8px 0 4px; font-family: var(--head); font-size: clamp(30px, 4.4vw, 46px); font-weight: 700; line-height: 1.05; letter-spacing: .06em; text-transform: uppercase; }
.hero-sub { color: var(--gold); font-size: 14px; }
.hero-date { margin-top: 4px; color: var(--mute); font-size: 13px; text-transform: capitalize; }
.hero-actions { display: flex; flex-direction: column; gap: 8px; margin-left: auto; }
.layout { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 20px; align-items: start; margin-top: 20px; padding-bottom: 90px; }
.content { display: grid; gap: 20px; min-width: 0; }
.rules summary { display: flex; align-items: center; justify-content: space-between; cursor: pointer; list-style: none; }
.rules summary::-webkit-details-marker { display: none; }
.rules h2 { color: var(--gold); }
.rules-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin-top: 16px; }
.rules-grid > div { padding: 14px 16px; border-left: 2px solid var(--red); background: rgba(15, 16, 10, .55); }
.rules-grid h3 { margin-bottom: 6px; font-family: var(--head); font-size: 14px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--gold); }
.rules-grid ul { padding-left: 16px; color: #d0caad; font-size: 13px; }
.permis { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.pm { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 9px 10px 9px 14px; border: 1px solid var(--line); background: rgba(15, 16, 10, .55); }
.pm > span { font-weight: 600; }
.seg { display: flex; padding: 3px; border: 1px solid var(--line); background: var(--field); }
.seg button { padding: 5px 13px; border: 0; background: transparent; color: var(--mute); font-size: 12.5px; font-weight: 700; cursor: pointer; }
.seg button.on.yes { background: var(--green); color: #141509; }
.seg button.on.no { background: var(--red); color: #fff; }
.sec-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 16px; padding-bottom: 12px; border-bottom: 1px solid var(--line); }
.sec-head h2 { color: var(--gold); }
.sec-score { flex: none; padding: 4px 12px; border: 1px solid var(--line2); color: var(--gold); font-size: 13.5px; font-weight: 600; }
.qs { display: grid; gap: 10px; list-style: none; }
.q { display: flex; gap: 14px; padding: 14px; border: 1px solid var(--line); border-left: 3px solid var(--line2); background: rgba(15, 16, 10, .55); transition: border-color .15s, background .15s; }
.q.juste { border-left-color: var(--green); background: linear-gradient(90deg, rgba(143, 179, 106, .1), rgba(15, 16, 10, .55) 40%); }
.q.faux { border-left-color: var(--red2); background: linear-gradient(90deg, rgba(196, 83, 42, .12), rgba(15, 16, 10, .55) 40%); }
.q-n { display: grid; place-items: center; flex: none; width: 32px; height: 32px; border: 1px solid var(--line2); border-radius: 50%; font-family: var(--head); font-size: 15px; color: var(--gold); }
.q-b { flex: 1; min-width: 0; }
.q-t { font-weight: 600; font-size: 15px; }
.q-exp { margin: 10px 0 12px; padding: 10px 13px; border: 1px solid rgba(157, 176, 138, .25); background: rgba(157, 176, 138, .06); }
.exp-t { margin-bottom: 4px; font-size: 10.5px; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; color: var(--teal); }
.exp { color: #d6d0b4; font-size: 13.5px; }
.pts { display: grid; gap: 4px; list-style: none; }
.pts label { display: flex; align-items: flex-start; gap: 9px; color: #d6d0b4; font-size: 13.5px; cursor: pointer; }
.pts input { flex: none; width: 15px; height: 15px; margin-top: 3px; accent-color: var(--green); }
.q-act { display: flex; gap: 8px; }
.jf { flex: 1; max-width: 150px; padding: 8px 12px; border: 1px solid var(--line2); background: var(--field); font-weight: 700; font-size: 13px; color: var(--mute); cursor: pointer; transition: all .15s; }
.jf.j:hover { border-color: var(--green); color: var(--green); }
.jf.f:hover { border-color: var(--red2); color: var(--red2); }
.jf.j.on { background: var(--green); border-color: var(--green); color: #141509; }
.jf.f.on { background: var(--red); border-color: var(--red); color: #fff; }
.score { position: sticky; top: 16px; text-align: center; }
.score-k { font-family: var(--head); font-size: 15px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: var(--gold); }
.ring { position: relative; width: 160px; height: 160px; margin: 12px auto 6px; }
.ring svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.ring circle { fill: none; stroke-width: 9; }
.ring-bg { stroke: var(--field); }
.ring-fg { stroke: var(--gold); stroke-linecap: butt; transition: stroke-dashoffset .4s ease; }
.ring-v { position: absolute; inset: 0; display: grid; place-content: center; }
.ring-v b { font-family: var(--head); font-size: 50px; font-weight: 700; line-height: 1; }
.ring-v span { color: var(--mute); font-size: 13px; }
.answered { color: var(--mute); font-size: 12.5px; }
.parts { display: grid; gap: 10px; margin: 18px 0; padding: 16px 0; border-block: 1px solid var(--line); list-style: none; text-align: left; font-size: 12.5px; }
.parts li { display: grid; grid-template-columns: 1fr auto; gap: 5px 10px; }
.parts b { color: var(--gold); }
.parts i { grid-column: 1 / -1; height: 4px; background: linear-gradient(90deg, var(--gold) var(--w), var(--field) var(--w)); }
.seuil-ro { font-size: 12.5px; color: var(--mute); }
.seuil-ro b { color: var(--cream); }
.verdict { margin-top: 14px; padding: 12px; border: 1px dashed var(--line2); color: var(--mute); font-size: 12.5px; }
.verdict b { display: block; font-family: var(--head); font-size: 32px; font-weight: 700; letter-spacing: .1em; line-height: 1.1; }
.verdict.admis { border: 2px solid var(--green); color: #d3e3c0; background: rgba(143, 179, 106, .1); }
.verdict.admis b { color: var(--green); }
.verdict.refuse { border: 2px solid var(--red2); color: #f1c7b5; background: rgba(196, 83, 42, .1); }
.verdict.refuse b { color: var(--red2); }
.send { display: flex; align-items: center; justify-content: space-between; gap: 20px; border-color: rgba(224, 102, 58, .5); }
.send h2 { margin-bottom: 4px; color: var(--gold); }
.send p { color: var(--mute); font-size: 13.5px; }
.send p b { color: var(--cream); }

/* ================= Candidats ================= */
.filters { display: flex; flex-wrap: wrap; gap: 8px; margin: 18px 0 14px; }
.filters button { padding: 6px 14px; border: 1px solid var(--line2); border-radius: 2px; background: transparent; color: var(--mute); font-size: 12.5px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; cursor: pointer; }
.filters button.on { background: var(--gold); border-color: var(--gold); color: #17180f; }
.list { display: grid; gap: 10px; }
.cand { border: 1px solid var(--line2); background: var(--card); overflow: hidden; }
.cand summary { display: flex; align-items: center; gap: 16px; padding: 13px 16px; cursor: pointer; list-style: none; }
.cand summary::-webkit-details-marker { display: none; }
.cand summary:hover { background: rgba(233, 227, 201, .03); }
.mini-ring { display: grid; place-content: center; flex: none; width: 54px; height: 54px; border-radius: 50%; text-align: center; line-height: 1; background: radial-gradient(closest-side, #1e2016 76%, transparent 78%), conic-gradient(var(--gold) calc(var(--p) * 1%), var(--field) 0); }
.mini-ring b { font-family: var(--head); font-size: 19px; }
.mini-ring small { font-size: 10px; color: var(--mute); }
.cand-main { display: grid; flex: 1; min-width: 0; }
.cand-main b { font-family: var(--head); font-size: 16px; font-weight: 600; letter-spacing: .04em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cand-main small { color: var(--mute); font-size: 12.5px; }
.cand-permis { display: flex; gap: 5px; }
.cand-permis span { padding: 2px 7px; border: 1px solid var(--line2); font-size: 11px; font-weight: 600; color: var(--mute); }
.cand-permis span.y { border-color: rgba(143, 179, 106, .55); color: var(--green); }
.cand-permis span.n { border-color: rgba(224, 102, 58, .5); color: var(--red2); text-decoration: line-through; }
.badge { flex: none; min-width: 110px; padding: 5px 12px; border: 1px dashed var(--line2); text-align: center; font-family: var(--head); font-size: 15px; font-weight: 600; letter-spacing: .1em; color: var(--mute); }
.badge.ok { border: 2px solid var(--green); color: var(--green); }
.badge.ko { border: 2px solid var(--red2); color: var(--red2); }
.cand-body { padding: 4px 16px 18px; border-top: 1px solid var(--line); }
.cand-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 26px; }
.cand-body h3 { margin: 16px 0 10px; font-family: var(--head); font-size: 13px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: var(--gold); }
.cand-body .parts { margin: 0; padding: 0; border: 0; }
.kv { display: grid; gap: 6px; list-style: none; font-size: 13.5px; }
.kv li { display: flex; justify-content: space-between; gap: 10px; padding-bottom: 6px; border-bottom: 1px solid var(--line); }
.kv span { color: var(--mute); }
.ratees { display: grid; gap: 6px; padding-left: 18px; font-size: 13.5px; color: #f1c7b5; }
.obs { white-space: pre-wrap; font-size: 13.5px; color: #d6d0b4; }
.cand-docs { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 12px; margin-top: 16px; }
.cand-docs:empty { display: none; }
.cand-docs img { width: 100%; border: 1px solid var(--line2); }
.cand-docs figcaption { margin-top: 4px; color: var(--mute); font-size: 12.5px; text-align: center; }
.cand-act { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 18px; }

/* ================= Gestion ================= */
.mb-av { display: grid; place-items: center; flex: none; width: 44px; height: 44px; border: 2px solid var(--red); border-radius: 50%; background: var(--card2); font-size: 20px; }
.mb-due { flex: none; display: grid; justify-items: end; font-family: var(--head); font-size: 17px; font-weight: 600; color: var(--gold); line-height: 1.15; }
.mb-due small { font-family: var(--body); font-size: 10.5px; color: var(--mute); }
.paper-list { display: flex; flex-wrap: wrap; gap: 6px; }
.paper { padding: 5px 10px; border: 1px solid var(--line2); background: transparent; color: var(--mute); font-size: 12.5px; font-weight: 600; }
.paper.y { border-color: rgba(143, 179, 106, .55); color: var(--green); cursor: pointer; }
.paper.y:hover { background: rgba(143, 179, 106, .1); }
.veh-form, .arm-form { display: grid; gap: 10px; }
.veh-rows { display: grid; gap: 8px; }
.veh-row { display: grid; grid-template-columns: 1.4fr 1fr auto; gap: 8px; }
.arm-form .btn, .veh-form .row-btns { justify-self: start; }

/* ================= Acces / reglages ================= */
.locked, .perm-login { max-width: 520px; margin: 30px auto; display: grid; justify-items: center; gap: 10px; text-align: center; }
.locked p, .perm-login > p { color: var(--mute); }
.locked h2, .perm-login h2 { color: var(--gold); }
.login-form { display: grid; gap: 10px; width: 100%; margin-top: 8px; }
.login-form input { text-align: center; font-size: 16px; }
.login-err { min-height: 1.2em; color: var(--red2); font-weight: 600; font-size: 13px; }
.login-err:empty { display: none; }
.perm-me { display: flex; align-items: center; justify-content: space-between; gap: 20px; flex-wrap: wrap; }
.perm-me h2 { margin: 4px 0; }
.pm-role { margin-bottom: 10px; color: var(--gold); }
.pm-list { display: grid; gap: 4px; list-style: none; font-size: 13.5px; }
#perm-levels, .perm-me { margin-bottom: 20px; }
#perm-admin { display: grid; gap: 20px; }
.add-user { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; align-items: end; }
.add-user .btn { grid-column: 1 / -1; }
.users { display: grid; }
.u-row { display: grid; grid-template-columns: 1.2fr 1.3fr 1.4fr 1.3fr 1.1fr auto; gap: 12px; align-items: center; padding: 11px 4px; border-bottom: 1px solid var(--line); font-size: 13.5px; }
.u-head { padding-top: 0; color: var(--mute); font-size: 11px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; }
.u-name small { color: var(--gold); }
.u-id { color: var(--mute); }
.u-act { display: flex; gap: 6px; justify-content: flex-end; }
.run-prices { display: grid; gap: 12px; }
.run-prices .suffix input { width: 170px; }
.run-prices .btn { justify-self: start; }
.qe-s { margin-bottom: 16px; padding: 14px; border: 1px solid var(--line2); background: rgba(15, 16, 10, .5); }
.qe-sh { display: flex; gap: 10px; margin-bottom: 12px; }
.qe-sh input[type=text] { font-weight: 700; }
.qe-ic { width: 64px !important; flex: none; text-align: center; }
.qe-list { display: grid; gap: 10px; margin-bottom: 10px; }
.qe-q { display: flex; gap: 10px; align-items: flex-start; padding: 12px; border: 1px solid var(--line); background: var(--field); }
.qe-cols { flex: 1; display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.qe-q > .btn { margin-top: 24px; }

/* ================= Fenetre, notification, pied ================= */
.modal { position: fixed; inset: 0; z-index: 70; display: grid; place-items: center; padding: 20px; background: rgba(5, 6, 3, .75); }
.modal-in { width: min(420px, 100%); max-height: 90vh; overflow: auto; padding: 28px; border: 1px solid var(--gold); background: #1c1e14; text-align: center; }
.modal-in.wide { width: min(900px, 100%); }
.modal-in img { margin: 0 auto 8px; }
.modal-in h2 { margin-bottom: 8px; color: var(--gold); }
.modal-in p { color: var(--mute); }
.modal-in p b { color: var(--cream); }
.modal-in .verdict { margin: 16px 0 20px; }
.modal-in .btn { width: 100%; margin-top: 6px; }
.toast { position: fixed; left: 50%; bottom: 24px; z-index: 90; padding: 11px 20px; border: 1px solid var(--gold); background: #1c1e14; color: var(--cream); font-weight: 600; transform: translate(-50%, 20px); opacity: 0; pointer-events: none; transition: all .25s; }
.toast.show { transform: translate(-50%, 0); opacity: 1; }
.toast.bad { border-color: var(--red2); color: #ffb79c; }
.foot { position: relative; display: flex; align-items: center; justify-content: center; gap: 12px; padding: 20px 20px 30px; color: var(--mute); font-size: 12px; letter-spacing: .1em; text-transform: uppercase; }

/* ================= Touches propres au site ================= */
/* Grade : etiquette en fleche */
.rank { display: inline-flex; align-items: center; padding: 4px 16px 4px 10px; clip-path: polygon(0 0, calc(100% - 10px) 0, 100% 50%, calc(100% - 10px) 100%, 0 100%); background: var(--gold); border: 0; color: #17180f; font-size: 12.5px; font-weight: 700; letter-spacing: .1em; }

/* Salaire : barre de couleur a gauche */
.stat { position: relative; padding-left: 20px; }
.stat::before { content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 3px; background: var(--red2); }

/* Photos hexagonales (fiche + organigramme) */
.m-av { border: 0; border-radius: 0; clip-path: polygon(25% 0, 75% 0, 100% 50%, 75% 100%, 25% 100%, 0 50%); background: var(--red); }
.m-av img { clip-path: polygon(25% 3%, 75% 3%, 97% 50%, 75% 97%, 25% 97%, 3% 50%); }
.node-av { border: 0; border-radius: 0; clip-path: polygon(25% 0, 75% 0, 100% 50%, 75% 100%, 25% 100%, 0 50%); background: var(--red); }
.node.top .node-av { background: var(--gold); }
.node-av img { clip-path: polygon(25% 3%, 75% 3%, 97% 50%, 75% 97%, 25% 97%, 3% 50%); }

/* ================= Code penal (compact) ================= */
.cp-filters { margin-top: 0; }
.cp-filters small { margin-left: 4px; opacity: .7; }
.cp-filters .f-contravention.on { background: #6f9150; border-color: #6f9150; color: #10110a; }
.cp-filters .f-mineur.on { background: var(--gold); border-color: var(--gold); }
.cp-filters .f-majeur.on { background: var(--red2); border-color: var(--red2); color: #10110a; }
.cp-filters .f-crime.on { background: #d93a2e; border-color: #d93a2e; color: #fff; }
.cp-head { margin: 4px 0 10px; }
.cp-badge { display: inline-block; padding: 4px 12px; border: 1px solid currentColor; font-family: var(--head); font-size: 15px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; }
.cp-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 8px; }
.cp-item { display: grid; align-content: start; gap: 4px; padding: 10px 14px; border: 1px solid var(--line); border-left: 3px solid var(--cpc, var(--line2)); background: var(--card); }
.cp-item b { font-size: 13.5px; font-weight: 600; line-height: 1.35; }
.cp-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 14px; font-size: 13px; }
.cp-fine { color: var(--gold); font-weight: 700; white-space: nowrap; }
.cp-time { white-space: nowrap; color: var(--cream); }
.cp-death { color: #ff6b5a; font-weight: 700; white-space: nowrap; }
.cp-supp { color: var(--mute); font-size: 12px; line-height: 1.35; }
.cp-item.death { background: linear-gradient(90deg, rgba(217, 58, 46, .12), var(--card) 60%); }
.cp-contravention { --cpc: #6f9150; } .cp-contravention .cp-badge { color: #8fb36a; }
.cp-mineur { --cpc: var(--gold); } .cp-mineur .cp-badge { color: var(--gold); }
.cp-majeur { --cpc: var(--red2); } .cp-majeur .cp-badge { color: var(--red2); }
.cp-crime { --cpc: #d93a2e; } .cp-crime .cp-badge { color: #ff5a4a; }
.cp-src { margin-top: 16px; text-align: center; }

/* Photo de profil : appareil photo toujours visible */
.m-av-wrap { position: relative; flex: none; }
.m-av-cam { position: absolute; right: -4px; bottom: 2px; display: grid; place-items: center; width: 28px; height: 28px; border: 2px solid var(--bg); border-radius: 50%; background: var(--gold); font-size: 13px; pointer-events: none; }
.m-av::after { display: none; }
/* ================= Casier judiciaire ================= */
.cz-tools { display: flex; gap: 10px; flex: 1; max-width: 560px; }
.cz-tools input { flex: 1; }
.cz-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 10px; }
.cz-card { display: flex; align-items: center; gap: 14px; padding: 12px 14px; border: 1px solid var(--line2); border-left: 3px solid var(--gold); background: var(--card); color: inherit; text-align: left; cursor: pointer; transition: border-color .15s, background .15s; }
.cz-card:hover { border-color: var(--gold); background: var(--card2); }
.cz-card.death { border-left-color: #d93a2e; }
.cz-av { display: grid; place-items: center; flex: none; width: 58px; height: 58px; clip-path: polygon(25% 0, 75% 0, 100% 50%, 75% 100%, 25% 100%, 0 50%); background: var(--red); font-size: 24px; overflow: hidden; }
.cz-av img { width: 100%; height: 100%; object-fit: cover; }
.cz-main { flex: 1; display: grid; min-width: 0; }
.cz-main b { font-family: var(--head); font-size: 17px; font-weight: 600; letter-spacing: .03em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cz-main small { color: var(--mute); font-size: 12.5px; }
.cz-flag { font-size: 20px; color: #ff6b5a; }
.cz-back { margin-bottom: 14px; }
.cz-head { display: flex; align-items: center; gap: 22px; }
.cz-head.death { border-color: rgba(217, 58, 46, .55); }
.cz-photo { position: relative; flex: none; cursor: pointer; }
.cz-photo .cz-av { width: 110px; height: 110px; font-size: 44px; }
.cz-id { flex: 1; min-width: 0; }
.cz-id h1 { margin: 4px 0 2px; font-family: var(--head); font-size: clamp(26px, 4vw, 36px); font-weight: 700; letter-spacing: .06em; text-transform: uppercase; line-height: 1.1; }
.cz-notes { margin-top: 8px; padding: 8px 12px; border-left: 2px solid var(--line2); color: #d6d0b4; font-size: 13.5px; white-space: pre-wrap; }
.cz-acts { align-self: flex-start; }
.cz-stats { margin: 16px 0 20px; }
.cz-red { color: #ff6b5a !important; }
.cz-add { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); gap: 20px; align-items: start; }
.cz-pick-tools { display: grid; gap: 10px; margin-bottom: 10px; }
.cz-pick-tools .filters { margin: 0; }
.cz-pick { display: grid; gap: 6px; max-height: 430px; overflow-y: auto; padding-right: 4px; }
.cz-opt { display: grid; gap: 2px; padding: 8px 12px; border: 1px solid var(--line); border-left: 3px solid var(--line2); background: rgba(15, 16, 10, .6); color: inherit; text-align: left; cursor: pointer; font-size: 13.5px; }
.cz-opt small { color: var(--mute); font-size: 12px; }
.cz-opt:hover { border-color: var(--line2); }
.cz-opt.on { background: rgba(214, 169, 44, .12); border-color: var(--gold); }
.c-contravention { border-left-color: #6f9150 !important; }
.c-mineur { border-left-color: var(--gold) !important; }
.c-majeur { border-left-color: var(--red2) !important; }
.c-crime { border-left-color: #d93a2e !important; }
.cz-recap { position: sticky; top: 16px; display: grid; gap: 12px; padding: 16px; border: 1px solid var(--line2); background: rgba(15, 16, 10, .6); }
.cz-recap .btn:disabled { opacity: .4; }
.cz-tot { display: grid; gap: 4px; font-size: 14px; }
.cz-tot:empty { display: none; }
.cz-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.cz-chip { display: inline-flex; align-items: center; gap: 6px; padding: 3px 9px; border: 1px solid var(--line2); border-left: 3px solid var(--line2); background: var(--field); font-size: 12.5px; }
.cz-chip button { border: 0; background: none; color: var(--mute); cursor: pointer; }
.cz-chip button:hover { color: var(--red2); }
.cz-faits { display: grid; gap: 10px; }
.cz-fait { display: grid; gap: 8px; padding: 12px 14px; border: 1px solid var(--line); border-left: 3px solid var(--gold); background: rgba(15, 16, 10, .5); }
.cz-fait.death { border-left-color: #d93a2e; }
.cz-fait-h { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 14px; }
.cz-fait-tot { margin-left: auto; font-weight: 600; }
.cz-form { display: grid; gap: 12px; margin: 14px 0 6px; text-align: left; }
.cz-form .drop { min-height: 110px; }
input[type=datetime-local] { width: 100%; padding: 10px 12px; border: 1px solid var(--line2); background: var(--field); color: var(--cream); color-scheme: dark; outline: none; }
.docs-3 { grid-template-columns: repeat(3, 1fr); }
@media (max-width: 1020px) { .cz-add { grid-template-columns: 1fr; } .cz-recap { position: static; } }
@media (max-width: 680px) {
  .cz-tools { flex-direction: column; max-width: none; }
  .cz-head { flex-wrap: wrap; }
  .cz-photo .cz-av { width: 80px; height: 80px; }
  .cz-fait-tot { margin-left: 0; width: 100%; }
  .docs-3 { grid-template-columns: 1fr; }
}
/* ================= Acces (detaille) ================= */
.roles-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.role-card { padding: 12px 14px; border: 1px solid var(--line); border-top: 3px solid var(--rc, var(--line2)); background: rgba(15, 16, 10, .55); }
.role-card b { font-family: var(--head); font-size: 16px; letter-spacing: .08em; text-transform: uppercase; color: var(--rc, var(--cream)); }
.role-card p { margin: 4px 0 8px; color: var(--mute); font-size: 12.5px; }
.role-card ul { display: grid; gap: 2px; list-style: none; font-size: 12px; }
.role-card li.y { color: var(--cream); }
.role-card li.n { color: var(--mute); opacity: .55; }
.r-membre { --rc: #9c9a7e; } .r-recruteur { --rc: #8fb36a; } .r-responsable { --rc: var(--gold); } .r-admin { --rc: var(--red2); }
.acc-stats { margin-bottom: 20px; }
#perm-admin .two { margin-bottom: 20px; }
.imp-btns { align-items: center; margin: 10px 0; }
.imp-ign { margin: 10px 0 16px; padding-left: 18px; text-align: left; color: var(--mute); font-size: 13px; }
.acc-tools { display: flex; gap: 8px; }
.acc-tools input { width: 220px; }
.acc-tools select { width: 170px; }
.acc-list { display: grid; gap: 8px; }
.acc-u { border: 1px solid var(--line); border-left: 3px solid var(--rc); background: rgba(15, 16, 10, .55); }
.acc-u[open] { border-color: var(--line2); border-left-color: var(--rc); }
.acc-u summary { display: flex; align-items: center; gap: 14px; padding: 10px 14px; cursor: pointer; list-style: none; }
.acc-u summary::-webkit-details-marker { display: none; }
.acc-u summary:hover { background: rgba(233, 227, 201, .03); }
.acc-av { display: grid; place-items: center; flex: none; width: 44px; height: 44px; clip-path: polygon(25% 0, 75% 0, 100% 50%, 75% 100%, 25% 100%, 0 50%); background: var(--rc); font-size: 19px; overflow: hidden; }
.acc-av img { width: 100%; height: 100%; object-fit: cover; }
.acc-main { flex: 1; display: grid; min-width: 0; }
.acc-main b { font-family: var(--head); font-size: 16px; font-weight: 600; letter-spacing: .03em; }
.acc-main small { color: var(--mute); font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.acc-grade { flex: none; width: 170px; font-size: 13px; }
.role-badge { flex: none; min-width: 118px; padding: 3px 10px; border: 1px solid var(--rc); color: var(--rc); font-family: var(--head); font-size: 12.5px; font-weight: 700; letter-spacing: .1em; text-align: center; text-transform: uppercase; }
.acc-seen { flex: none; width: 150px; font-size: 12px; text-align: right; }
.acc-body { padding: 6px 16px 16px; border-top: 1px solid var(--line); }
.acc-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 26px; margin-top: 12px; }
.acc-fields { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; align-content: start; }
.acc-fields .row-btns { grid-column: 1 / -1; margin-top: 4px; }
.perm-list { display: grid; gap: 4px; margin: 8px 0; }
.perm { display: flex; align-items: center; gap: 10px; padding: 7px 10px; border: 1px solid var(--line); background: var(--field); cursor: pointer; font-size: 13.5px; color: var(--mute); }
.perm.on { border-color: rgba(143, 179, 106, .5); color: var(--cream); background: rgba(143, 179, 106, .08); }
.perm input { width: 16px; height: 16px; accent-color: var(--green); }
.perm input:disabled { opacity: .6; }
.acc-kv { margin-top: 14px; }
@media (max-width: 1020px) {
  .roles-grid { grid-template-columns: 1fr 1fr; }
  .acc-cols { grid-template-columns: 1fr; }
  .acc-seen { display: none; }
}
@media (max-width: 680px) {
  .roles-grid, .acc-fields { grid-template-columns: 1fr; }
  .acc-u summary { flex-wrap: wrap; gap: 8px 12px; }
  .acc-grade { width: auto; }
  .acc-tools { flex-direction: column; width: 100%; }
  .acc-tools input, .acc-tools select { width: 100%; }
  #perm-admin .sec-head { flex-direction: column; align-items: stretch; }
}
/* ================= Ecrans moyens ================= */
@media (max-width: 1020px) {
  .layout { grid-template-columns: 1fr; }
  .score { position: static; order: -1; }
  .two, .rules-grid, .cand-cols { grid-template-columns: 1fr; }
  .stats { grid-template-columns: repeat(2, 1fr); }
  .u-row { grid-template-columns: 1fr 1fr; }
  .u-head { display: none; }
  .u-act { grid-column: 1 / -1; justify-content: flex-start; }
  .clock { grid-template-columns: 1fr; justify-items: center; text-align: center; }
  .pg-add { grid-template-columns: 1fr; }
  .beam { display: none; }
}

/* ================= Telephone ================= */
@media (max-width: 680px) {
  body { font-size: 14px; }
  input, select, textarea { font-size: 16px !important; } /* evite le zoom auto sur iPhone */
  .top, .page, .layout, .hero-in { width: calc(100% - 24px); }
  .brand { gap: 10px; }
  .brand small { font-size: 10px; letter-spacing: .2em; }
  .me-n { display: none; }
  .me { padding: 3px; }
  .tabs a { padding: 11px 10px; font-size: 13px; }
  .page { padding-top: 22px; }
  .card { padding: 16px; }
  .hero-in { flex-direction: column; text-align: center; gap: 12px; padding: 18px; }
  .hero-actions { width: 100%; margin: 0; }
  .hero-logo { width: 100px; height: 100px; }
  .fields, .permis, .docs, .add-user, .abs-form, .qe-cols, .docs-2 { grid-template-columns: 1fr; }
  .docs-6 { grid-template-columns: 1fr 1fr; }
  .stat b { font-size: 20px; }
  .m-av { width: 66px; height: 66px; }
  .m-head { flex-wrap: wrap; }
  .q { padding: 12px 10px; gap: 10px; }
  .q-n { width: 26px; height: 26px; font-size: 13px; }
  .jf { max-width: none; }
  .send { flex-direction: column; align-items: stretch; }
  .page-head { flex-direction: column; align-items: stretch; }
  .page-head input[type=search] { max-width: none; }
  .cand summary { flex-wrap: wrap; gap: 10px; }
  .cand-permis { order: 4; width: 100%; }
  .badge { min-width: 0; }
  .kv li { flex-direction: column; gap: 2px; }
  .perm-me { flex-direction: column; align-items: stretch; }
  .run-row { flex-wrap: wrap; justify-content: space-between; gap: 8px 12px; }
  .run-main { flex-basis: 100%; }
  .abs-row, .v-row { flex-direction: column; align-items: stretch; }
  .abs-row .pill, .v-row > .pill { align-self: flex-start; }
  .v-done { justify-items: start; }
  .tbl, .eq { font-size: 12.5px; }
  .tbl td, .tbl th { padding: 8px 6px; }
  .node { width: 118px; padding: 10px 6px; }
  .node.top { width: 130px; }
  .node-av { width: 60px; height: 60px; }
  .tree-row { gap: 10px; }
  .qe-sh { flex-wrap: wrap; }
  .cp thead { display: none; }
  .cp tr { display: block; padding: 10px 0; border-bottom: 1px solid var(--line); }
  .cp td { display: block; padding: 2px 4px; border: 0; }
  .cp td[data-l]:not(:first-child)::before { content: attr(data-l) ' : '; color: var(--mute); font-size: 11.5px; }
  .top { padding-top: 14px; }
  .brand img { width: 46px; height: 46px; }
  .brand b { font-size: 21px; }
  .tabs { margin-top: 14px; }
  .skyline { height: 170px; }
  .moon { display: none; }
  .heli { width: 100px; }
}
