/* Portail de la Gendarmerie | Corsia RP. Bleu France, blanc, rouge, Roboto. */
:root { --blue: #000091; --blue-2: #1212ff; --red: #e1000f; --bg: #e8ecf2; --card: #fff; --line: #dfe3ea; --text: #1e1e1e; --muted: #5f6b7a; --faint: #8a94a3; --yellow: #fff7dc; --yellow-b: #f1c40f; --mono: 'Roboto Mono', monospace; }
* { margin: 0; padding: 0; box-sizing: border-box; }
body { background: var(--bg); color: var(--text); font: 400 15px/1.5 'Roboto', Arial, sans-serif; min-height: 100vh; }
button { font: inherit; cursor: pointer; border: 0; background: none; color: inherit; }
input, select, textarea { font: inherit; color: inherit; }
a { color: var(--blue); }
svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.hidden { display: none !important; }
.mono { font-family: var(--mono); }

/* barre d'état + bandeau */
.sysbar { height: 26px; background: #dcdfe4; display: flex; justify-content: flex-end; align-items: center; gap: 18px; padding: 0 16px; font-size: 12px; color: #333; }
.sysbar span { display: flex; align-items: center; gap: 6px; } .sysbar svg { width: 15px; height: 15px; }
.gh { height: 66px; background: #fff; border-bottom: 4px solid var(--blue); display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; padding: 0 26px; }
.bloc { display: flex; align-items: center; gap: 12px; }
.mar { display: flex; width: 34px; height: 24px; } .mar i, .mini i, .flag i { flex: 1; } .mar i:nth-child(1), .mini i:nth-child(1) { background: var(--blue); } .mar i:nth-child(2), .mini i:nth-child(2) { background: #fff; box-shadow: inset 0 0 0 1px #eee; } .mar i:nth-child(3), .mini i:nth-child(3) { background: var(--red); }
.min { line-height: 1.05; } .min small { display: block; font-size: 10.5px; font-weight: 700; letter-spacing: .02em; } .min b { font-size: 13.5px; }
.gn { font-weight: 700; font-size: 19px; color: var(--blue); letter-spacing: .01em; }
.who { justify-self: end; display: flex; align-items: center; gap: 10px; }
.pill { padding: 5px 12px; border-radius: 999px; background: #eef0f5; color: var(--blue); font-weight: 700; font-size: 14px; } .pill.ghost { color: var(--faint); font-weight: 500; }
.off { width: 38px; height: 28px; border-radius: 4px; background: var(--red); color: #fff; display: grid; place-items: center; } .off:hover { background: #b60000; } .off svg { width: 16px; height: 16px; }

/* page de connexion */
.page { width: min(1020px, calc(100% - 32px)); margin: 0 auto; padding: 22px 0 30px; }
.ttl { display: flex; align-items: center; gap: 16px; margin-bottom: 20px; }
.flag { display: flex; width: 54px; height: 46px; transform: skewX(-14deg); gap: 3px; } .flag i:nth-child(1) { background: var(--blue); } .flag i:nth-child(2) { background: #fff; } .flag i:nth-child(3) { background: var(--red); }
.ttl h1 { font-size: 30px; font-weight: 400; color: var(--blue); line-height: 1.15; }
.ttl p { font-size: 12px; letter-spacing: .08em; color: var(--muted); margin-top: 2px; }
.alert { display: flex; align-items: center; gap: 12px; padding: 12px 18px; border-left: 4px solid var(--yellow-b); background: var(--yellow); border-radius: 4px; color: #7a5b00; font-size: 16px; margin-bottom: 14px; box-shadow: 0 0 0 1px #f3e2a6 inset; }
.alert svg { color: #a37b00; }
.box { background: var(--card); border-radius: 4px; box-shadow: 0 1px 3px rgba(0,0,0,.12); padding: 26px 30px 16px; display: grid; grid-template-columns: 1fr 1px 1fr; gap: 0 30px; }
.box .col { display: flex; flex-direction: column; align-items: center; padding-bottom: 12px; }
.box h2 { font-size: 17px; font-weight: 400; color: var(--blue); margin-bottom: 18px; }
.sep { background: var(--line); margin-bottom: 12px; }
.hint { font-size: 13px; color: var(--muted); margin-top: 8px; }

/* carte professionnelle */
.card { width: 360px; max-width: 100%; aspect-ratio: 1.6; border-radius: 12px; position: relative; overflow: hidden; text-align: left; color: #222;
    background: repeating-linear-gradient(45deg, rgba(0,0,145,.035) 0 1px, transparent 1px 9px), repeating-linear-gradient(-45deg, rgba(0,0,145,.035) 0 1px, transparent 1px 9px), linear-gradient(135deg, #f5f6fb, #e7e9f3);
    box-shadow: 0 6px 18px rgba(0,0,40,.18), inset 0 0 0 1px rgba(0,0,0,.06); transition: transform .2s, box-shadow .2s; }
.card:hover { transform: translateY(-3px) rotate(-.4deg); box-shadow: 0 12px 26px rgba(0,0,40,.24), inset 0 0 0 1px rgba(0,0,0,.06); }
.c-top { position: absolute; left: 0; top: 0; width: 30%; height: 34px; display: flex; transform: skewX(-22deg); transform-origin: top left; margin-left: -6px; }
.c-top i { flex: 1; } .c-top i:nth-child(1) { background: var(--blue); } .c-top i:nth-child(2) { background: #fff; } .c-top i:nth-child(3) { background: var(--red); }
.c-t { position: absolute; right: 14px; top: 9px; text-align: right; } .c-t b { display: block; font-size: 13.5px; color: #3a3a8c; letter-spacing: .01em; } .c-t small { font-size: 8.5px; letter-spacing: .14em; color: #555; }
.c-body { position: absolute; left: 18px; right: 16px; top: 62px; display: flex; gap: 14px; align-items: flex-start; }
.c-logo { width: 78px; height: 58px; background: #fff; border-radius: 2px; box-shadow: 0 1px 2px rgba(0,0,0,.15); padding: 8px 7px; flex: none; }
.mini { display: flex; width: 16px; height: 10px; margin-bottom: 4px; } .c-logo b { font-size: 7px; line-height: 1.15; display: block; }
.c-id { flex: 1; min-width: 0; } .c-id b { display: block; font-size: 13.5px; margin-bottom: 3px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.c-id small { display: block; font-size: 7.5px; letter-spacing: .1em; color: #777; margin-top: 3px; } .c-id span { display: block; font-size: 11.5px; font-weight: 700; }
.c-ph { width: 66px; height: 82px; border-radius: 4px; background: #cfd4df; border: 2px solid #fff; box-shadow: 0 1px 3px rgba(0,0,0,.2); display: grid; place-items: end center; overflow: hidden; color: #8e96a6; flex: none; }
.c-ph svg { width: 58px; height: 58px; stroke-width: 0; fill: currentColor; margin-bottom: -6px; }
.c-foot { position: absolute; left: 20px; right: 18px; bottom: 26px; display: flex; align-items: center; } .c-foot .mono { font-size: 12px; letter-spacing: .25em; }
.holo { width: 26px; height: 26px; border-radius: 50%; margin-left: auto; margin-right: 34px; background: conic-gradient(from 30deg, #f9a8d4, #a5b4fc, #67e8f9, #86efac, #fde68a, #f9a8d4); opacity: .65; }
.c-foot b { font-size: 18px; color: #6b4ba1; }
.c-legal { position: absolute; left: 0; right: 0; bottom: 0; padding: 3px 10px; background: rgba(0,0,145,.06); font-size: 6.5px; text-align: center; color: #555; }
.card.read { animation: read 1s ease; } @keyframes read { 50% { box-shadow: 0 0 0 4px rgba(0,0,145,.25), 0 12px 26px rgba(0,0,40,.24); } }

/* formulaire */
.inp { display: flex; width: 340px; max-width: 100%; height: 42px; border: 1px solid #c9ced8; border-radius: 3px; overflow: hidden; margin-bottom: 12px; background: #fff; }
.inp span { width: 40px; display: grid; place-items: center; background: #eef0f4; border-right: 1px solid #c9ced8; color: #555; font-size: 12px; font-weight: 700; }
.inp span svg { width: 16px; height: 16px; }
.inp input { flex: 1; min-width: 0; border: 0; outline: 0; padding: 0 12px; font-size: 15px; }
.inp:focus-within { border-color: var(--blue); box-shadow: 0 0 0 2px rgba(0,0,145,.15); }
.go { align-self: flex-end; margin-right: max(0px, calc(50% - 170px)); display: inline-flex; align-items: center; gap: 8px; height: 38px; padding: 0 18px; background: var(--blue); color: #fff; font-weight: 500; font-size: 16px; border-radius: 3px; }
.go:hover { background: var(--blue-2); } .go:disabled { opacity: .6; cursor: wait; } .go.sm { height: 34px; font-size: 14px; margin: 0; }
.err { min-height: 18px; color: var(--red); font-size: 13px; margin: -4px 0 6px; width: 340px; max-width: 100%; }
.small { font-size: 12px; color: var(--faint); width: 340px; max-width: 100%; margin-top: 12px; }
.chk { grid-column: 1 / -1; justify-self: center; display: inline-flex; align-items: center; gap: 10px; padding: 8px 14px; border: 1px solid #c9ced8; border-radius: 3px; color: var(--blue); margin: 6px 0 14px; cursor: pointer; }
.chk input { width: 16px; height: 16px; accent-color: var(--blue); }
.cnil { grid-column: 1 / -1; font-size: 12px; font-style: italic; color: #555; text-align: center; max-width: 820px; justify-self: center; }
.pf { display: flex; justify-content: center; align-items: center; gap: 18px; margin-top: 18px; font-size: 13px; color: #444; }
.pf span { display: flex; align-items: center; gap: 5px; } .pf svg { width: 14px; height: 14px; } .pf .rp { color: var(--faint); }

/* fenêtre carte */
.modal { position: fixed; inset: 0; background: rgba(10,14,40,.45); display: grid; place-items: center; z-index: 50; padding: 16px; }
.mbox { width: 380px; max-width: 100%; background: #fff; border-radius: 6px; padding: 22px; box-shadow: 0 20px 50px rgba(0,0,0,.3); border-top: 4px solid var(--blue); }
.mbox h3 { font-size: 18px; font-weight: 500; color: var(--blue); } .mdesc { font-size: 13.5px; color: var(--muted); margin: 4px 0 14px; }
.mbox .inp, .mbox .err { width: 100%; }
.dots { display: flex; justify-content: center; gap: 10px; margin: 6px 0 14px; } .dots i { width: 13px; height: 13px; border-radius: 50%; border: 2px solid var(--blue); } .dots i.on { background: var(--blue); }
.pad { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; } .pad button { height: 44px; border-radius: 4px; background: #eef0f5; font-size: 18px; font-weight: 500; } .pad button:hover { background: #e1e5ee; } .pad button.t { font-size: 13px; color: var(--muted); }
.mact { display: flex; justify-content: space-between; align-items: center; margin-top: 12px; } .lnk { color: var(--muted); font-size: 14px; }

/* ===== panneau (après connexion) ===== */
.app { display: grid; grid-template-columns: 230px 1fr; min-height: calc(100vh - 96px); }
.side { background: #fff; border-right: 1px solid var(--line); padding: 14px 0; }
.side .me { padding: 6px 18px 14px; border-bottom: 1px solid var(--line); margin-bottom: 8px; } .side .me b { display: block; font-size: 14.5px; } .side .me small { color: var(--muted); font-size: 12.5px; }
.side .me .mono { color: var(--blue); font-size: 12px; }
.side a { display: flex; align-items: center; gap: 12px; padding: 10px 18px; color: #2b2b2b; text-decoration: none; font-size: 14.5px; border-left: 3px solid transparent; }
.side a:hover { background: #f3f5f9; } .side a.on { background: #eef0fb; color: var(--blue); border-left-color: var(--blue); font-weight: 500; }
.side a .n { margin-left: auto; font-size: 11.5px; background: var(--red); color: #fff; border-radius: 999px; padding: 0 7px; font-weight: 700; }
.side .grp { padding: 14px 18px 4px; font-size: 11px; letter-spacing: .1em; color: var(--faint); font-weight: 700; }
.main { padding: 24px 28px 40px; min-width: 0; }
.main h1 { font-size: 24px; font-weight: 400; color: var(--blue); margin-bottom: 4px; } .main .sub { color: var(--muted); font-size: 13.5px; margin-bottom: 18px; }
.grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-bottom: 18px; }
.kpi { background: #fff; border-radius: 4px; padding: 14px 16px; box-shadow: 0 1px 2px rgba(0,0,0,.08); border-top: 3px solid var(--blue); } .kpi.r { border-top-color: var(--red); }
.kpi b { display: block; font-size: 26px; font-weight: 500; } .kpi span { font-size: 13px; color: var(--muted); }
.panel { background: #fff; border-radius: 4px; box-shadow: 0 1px 2px rgba(0,0,0,.08); margin-bottom: 16px; overflow: hidden; }
.panel > h2 { font-size: 15px; font-weight: 500; padding: 12px 16px; border-bottom: 1px solid var(--line); display: flex; align-items: center; gap: 10px; } .panel > h2 .r { margin-left: auto; font-size: 12.5px; color: var(--muted); font-weight: 400; }
.cols { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th { text-align: left; font-weight: 500; font-size: 12px; letter-spacing: .04em; text-transform: uppercase; color: var(--muted); background: #f6f7fa; padding: 9px 14px; border-bottom: 1px solid var(--line); }
td { padding: 10px 14px; border-bottom: 1px solid #eef0f4; vertical-align: top; }
tr.go-row { cursor: pointer; } tr.go-row:hover td { background: #f6f8fd; }
.tag { display: inline-block; padding: 1px 8px; border-radius: 3px; font-size: 12px; font-weight: 500; background: #eef0f5; color: #333; white-space: nowrap; }
.tag.r { background: #fde8e9; color: #b60000; } .tag.o { background: #fff1de; color: #9a4b00; } .tag.g { background: #e3f6ea; color: #13702f; } .tag.b { background: #e8eaff; color: var(--blue); }
.search { display: flex; gap: 8px; margin-bottom: 14px; } .search input, .search select { height: 40px; border: 1px solid #c9ced8; border-radius: 3px; padding: 0 12px; background: #fff; } .search input { flex: 1; max-width: 420px; }
.search input:focus { outline: 2px solid rgba(0,0,145,.2); border-color: var(--blue); }
.btn { height: 40px; padding: 0 16px; border-radius: 3px; background: var(--blue); color: #fff; font-weight: 500; } .btn:hover { background: var(--blue-2); } .btn.l { background: #eef0f5; color: var(--blue); }
.empty { padding: 26px; text-align: center; color: var(--faint); font-size: 14px; }
.kv { display: grid; grid-template-columns: 170px 1fr; } .kv div { padding: 8px 16px; border-bottom: 1px solid #eef0f4; font-size: 14px; } .kv div:nth-child(odd) { color: var(--muted); }
.fpr { background: #fde8e9; border-left: 4px solid var(--red); padding: 12px 16px; border-radius: 4px; margin-bottom: 14px; color: #7a0000; } .fpr b { display: block; }
.ident { display: flex; gap: 18px; padding: 16px; } .ident .ph { width: 110px; height: 136px; border-radius: 4px; background: #e1e5ee center/cover; flex: none; display: grid; place-items: center; color: #9aa3b2; font-size: 30px; font-weight: 700; }
.ident h2 { font-size: 22px; font-weight: 500; } .ident p { color: var(--muted); }
.doc { padding: 18px 20px; white-space: pre-wrap; font-size: 14px; line-height: 1.6; font-family: var(--mono); background: #fcfcfd; }
.back { display: inline-flex; align-items: center; gap: 6px; color: var(--blue); font-size: 14px; margin-bottom: 12px; cursor: pointer; } .back svg { width: 15px; height: 15px; }
.note { display: flex; gap: 8px; padding: 12px 16px; border-top: 1px solid var(--line); } .note input { flex: 1; height: 38px; border: 1px solid #c9ced8; border-radius: 3px; padding: 0 10px; }
.logins { margin-bottom: 16px; }
.toast { position: fixed; right: 20px; bottom: 20px; background: #1e1e1e; color: #fff; padding: 12px 16px; border-radius: 4px; font-size: 14px; z-index: 60; }
.load { padding: 26px; text-align: center; color: var(--faint); }

@media (max-width: 860px) {
    .gh { grid-template-columns: auto 1fr; } .gn { display: none; }
    .box { grid-template-columns: 1fr; } .sep { height: 1px; margin: 10px 0 20px; } .go { margin-right: 0; }
    .app { grid-template-columns: 1fr; } .side { display: flex; overflow-x: auto; padding: 0; border-right: 0; border-bottom: 1px solid var(--line); } .side .me, .side .grp { display: none; } .side a { white-space: nowrap; border-left: 0; border-bottom: 3px solid transparent; } .side a.on { border-bottom-color: var(--blue); }
    .grid { grid-template-columns: 1fr 1fr; } .cols { grid-template-columns: 1fr; } .kv { grid-template-columns: 120px 1fr; } .main { padding: 18px 14px; }
}
