/* Back-office des tablettes d'accueil. Variables reprises de la maquette (docs/maquette/index.html) : seule source
   des couleurs, polices et rayons ; les quatre couleurs de la charte sont remplacées par celles de l'événement courant. Lot L2 : socle et écrans de connexion ; le lot L3 complète la mise en page. */
@font-face { font-family: 'Bricolage Grotesque'; font-weight: 400; font-display: swap; src: url("../fonts/BG-Regular-hHmruH2.ttf") format('truetype'); }
@font-face { font-family: 'Bricolage Grotesque'; font-weight: 500; font-display: swap; src: url("../fonts/BG-Medium-Dbj6w4l.ttf") format('truetype'); }
@font-face { font-family: 'Bricolage Grotesque'; font-weight: 600; font-display: swap; src: url("../fonts/BG-SemiBold-0kB58Y3.ttf") format('truetype'); }
@font-face { font-family: 'Bricolage Grotesque'; font-weight: 700; font-display: swap; src: url("../fonts/BG-Bold-97ocI_Z.ttf") format('truetype'); }
@font-face { font-family: 'Bricolage Grotesque'; font-weight: 800; font-display: swap; src: url("../fonts/BG-ExtraBold-2nez09I.ttf") format('truetype'); }
@font-face { font-family: 'Cuaniex'; font-weight: 400; font-display: swap; src: url("../fonts/cuaniex-KExDGtR.woff") format('woff'); }

:root {
  --night: #061430; --indigo: #040461; --blue: #033884; --cyan: #00FFFF; --cyan-soft: #80FFFF;
  --paper: #F3F6FB; --paper-muted: rgba(243, 246, 251, .70); --paper-faint: rgba(243, 246, 251, .52); --hairline: rgba(243, 246, 251, .08);
  --ink: #0A1633; --ink-2: #47526B; --ink-3: #8590A6; --line: #E2E7F0; --bg: #F3F6FB; --bg-2: #EEF3FA; --bg-3: #E6ECF5; --night-25: rgba(6, 20, 48, .25);
  --ok: #17955F; --warn: #C98209; --ko: #D43B3B; --radius: 16px;
  --font-title: 'Bricolage Grotesque', system-ui, sans-serif; --font-body: 'Bricolage Grotesque', system-ui, sans-serif; --font-display: 'Cuaniex', 'Bricolage Grotesque', sans-serif;
}
*, *::before, *::after { box-sizing: border-box; }
/* L'attribut hidden l'emporte toujours sur les display des classes (.checklist, .btn, .seg…). */
[hidden] { display: none !important; }
html, body { height: 100%; margin: 0; }
body { font-family: var(--font-body); color: var(--ink); background: var(--bg); font-size: 14px; line-height: 1.45; font-optical-sizing: auto; }
h1, h2, h3 { font-family: var(--font-title); margin: 0; }
a { color: var(--blue); }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; border: 0; background: none; }

/* Champs et boutons (maquette) */
.f { display: block; }
.f + .f { margin-top: 12px; }
.f label { display: block; font-size: 12.5px; font-weight: 600; color: var(--ink-2); margin-bottom: 6px; }
.field { width: 100%; padding: 9px 11px; border: 1px solid var(--line); border-radius: 10px; background: #fff; }
.field:focus { outline: 2px solid var(--blue); outline-offset: -1px; }
.field.invalid { background: #FDF3F3; }
.err { font-size: 12px; color: var(--ko); margin-top: 5px; min-height: 0; }
.hint { font-size: 11.5px; color: var(--ink-3); margin-top: 5px; }
.sub { color: var(--ink-2); font-size: 13px; margin-bottom: 14px; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 9px 14px; border-radius: 10px; font-weight: 600; background: var(--night); color: #fff; text-decoration: none; }
.btn:hover { background: var(--indigo); }
.btn:disabled { opacity: .55; cursor: default; }
.btn.full { width: 100%; margin-top: 6px; }
.btn.ghost { background: #fff; color: var(--ink); border: 1px solid var(--line); }
.linkbtn { display: block; margin: 12px auto 0; color: var(--blue); font-weight: 600; font-size: 13px; text-align: center; text-decoration: none; }
.card { background: #fff; border-radius: var(--radius); padding: 20px; box-shadow: inset 0 0 0 1px var(--line); }
.flash { padding: 10px 14px; border-radius: 10px; margin-bottom: 14px; font-size: 13px; font-weight: 600; }
.flash.success { background: #E5F5EE; color: #137A4E; }
.flash.error { background: #FCE9E9; color: #AE2E2E; }
.pill { display: inline-block; padding: 2px 9px; border-radius: 999px; font-size: 12px; font-weight: 600; }
.pill.ok { background: #E5F5EE; color: #137A4E; }
.pill.warn { background: #FCF1DD; color: #97620A; }

/* Connexion (maquette : pLogin) */
body.auth { background: linear-gradient(165deg, var(--indigo) 0%, var(--night) 70%); min-height: 100%; }
.login { position: relative; width: 400px; max-width: 100%; margin: 40px auto; padding: 0 16px; }
.login-logo { display: block; height: 64px; width: auto; margin: 0 auto 22px; }
.login-title { display: block; text-align: center; color: var(--paper); font-family: var(--font-title); font-weight: 800; font-size: 26px; margin: 0 auto 22px; }
.login .card { padding: 26px; }
.login h2 { font-size: 22px; font-weight: 800; }
.login .sub { margin: 6px 0 18px; }
.login-pw { display: flex; align-items: center; justify-content: center; gap: 8px; margin-top: 18px; font-size: 11.5px; color: var(--paper-faint); }
.login-pw img { height: 14px; width: auto; opacity: .8; }
.otp-single { text-align: center; font-family: var(--font-display); font-size: 26px; letter-spacing: .35em; padding: 10px 0; }
.qr { display: flex; justify-content: center; margin: 6px 0 14px; }
.qr svg { width: 200px; height: 200px; border-radius: 10px; box-shadow: inset 0 0 0 1px var(--line); }
.secret { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 15px; letter-spacing: .08em; text-align: center; color: var(--ink-2); margin-bottom: 14px; user-select: all; }

/* Coquille du back-office (provisoire, lot L3) */
.topbar { display: flex; align-items: center; justify-content: space-between; height: 60px; padding: 0 22px; background: var(--night); color: var(--paper); }
.topbar .brand { display: flex; align-items: center; gap: 10px; font-weight: 700; color: var(--paper); text-decoration: none; }
.topbar .brand img { height: 30px; width: auto; }
.topbar .who { display: flex; align-items: center; gap: 14px; font-size: 13px; color: var(--paper-muted); }
.topbar .who a { color: var(--cyan-soft); text-decoration: none; font-weight: 600; }
.page { max-width: 880px; margin: 0 auto; padding: 24px 22px; }
.page h1 { font-size: 24px; font-weight: 800; margin-bottom: 4px; }
.page .lead { color: var(--ink-2); margin: 0 0 18px; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
@media (max-width: 720px) { .grid2 { grid-template-columns: 1fr; } }
.kv { display: grid; grid-template-columns: 160px 1fr; gap: 8px 14px; font-size: 13px; }
.kv dt { color: var(--ink-3); } .kv dd { margin: 0; }

/* ===== Back-office : coquille et composants (maquette, section BACK-OFFICE) ===== */
:root { --night-2: #0B1C3F; --night-3: #10244B; --night-4: #162D57; }
img { display: block; }
.bo { display: grid; grid-template-columns: 248px 1fr; min-height: 100vh; align-items: start; }
/* Menu fixe : collé en haut, hauteur de la fenêtre ; seul le contenu de la page défile, le pied du menu reste visible. */
.bo-side { position: sticky; top: 0; height: 100vh; height: 100dvh; background: var(--night); color: #fff; padding: 22px 14px; display: flex; flex-direction: column; gap: 3px; overflow: hidden auto; }
.bo-side::before { content: ""; position: absolute; top: 0; right: 0; bottom: 0; left: 0; pointer-events: none; background: radial-gradient(80% 30% at 0% 0%, rgba(0,255,255,.14), transparent 70%), radial-gradient(90% 30% at 100% 100%, rgba(3,56,132,.7), transparent 70%); }
.bo-side > * { position: relative; }
.bo-side .logo { padding: 2px 10px 20px; margin-bottom: 10px; box-shadow: 0 1px 0 var(--hairline); }
.bo-side .logo img { height: 50px; width: auto; }
.bo-side .logo small { display: block; font-size: 11px; color: var(--paper-faint); margin-top: 10px; letter-spacing: .04em; }
.bo-side .logo .txtlogo { display: inline-flex; align-items: center; font-family: var(--font-title); font-weight: 800; color: #fff; letter-spacing: -.01em; line-height: 1.05; font-size: 22px; height: 50px; }
.bo-side a.ev-switch { display: flex; align-items: center; gap: 8px; width: 100%; margin-top: 14px; padding: 10px 12px; border-radius: 12px; background: rgba(243,246,251,.07); color: #fff; text-align: left; font-weight: 500; }
.bo-side a.ev-switch:hover { background: rgba(243,246,251,.12); }
.ev-switch span { flex: 1; min-width: 0; }
.ev-switch b { display: block; font-size: 12.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ev-switch i { display: block; font-style: normal; font-size: 11px; color: var(--paper-faint); margin-top: 2px; }
.ev-dot { width: 30px; height: 30px; border-radius: 9px; flex: none; display: inline-block; }
.ev-dot.sm { width: 18px; height: 18px; border-radius: 6px; }
.ev-list { display: flex; flex-direction: column; gap: 8px; }
.ev-list form { margin: 0; }
.ev-item { display: flex; align-items: center; gap: 12px; width: 100%; padding: 12px 14px; border-radius: 12px; background: var(--bg); border: 0; cursor: pointer; font: inherit; color: inherit; text-align: left; }
.ev-item:hover { background: #E9EEF6; }
.ev-item.on { background: #E6EEF8; }
.ev-item small { display: block; color: var(--ink-3); font-size: 12px; margin-top: 2px; }
.bo-side a { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 10px; color: var(--paper-muted); text-decoration: none; font-weight: 500; cursor: pointer; }
.bo-side a:hover { background: rgba(243,246,251,.05); }
.bo-side a.on { background: var(--night-3); color: #fff; font-weight: 600; }
.bo-side a.on svg { color: var(--cyan); }
.bo-side a.dis { opacity: .45; }
.bo-side a .badge { margin-left: auto; font-size: 11px; font-weight: 700; background: var(--ko); color: #fff; border-radius: 999px; padding: 1px 7px; }
.bo-side a .badge.live { background: var(--cyan); color: var(--night); }
.bo-side .sep { font-size: 10.5px; text-transform: uppercase; letter-spacing: .14em; color: var(--paper-faint); padding: 16px 12px 4px; }
.bo-side .who { margin-top: auto; display: flex; align-items: center; gap: 6px; padding: 14px 10px 4px; box-shadow: 0 -1px 0 var(--hairline); }
.bo-side .who .av { width: 32px; height: 32px; border-radius: 50%; background: var(--cyan); color: var(--night); display: grid; place-items: center; font-weight: 800; font-size: 12px; flex-shrink: 0; }
.bo-side .who small { display: block; color: var(--paper-faint); font-size: 11px; }
.bo-side .who .who-btn { display: flex; align-items: center; gap: 10px; text-align: left; color: #fff; flex: 1; min-width: 0; padding: 0; background: none; }
.bo-side .who .who-btn:hover { background: none; }
.bo-side .pw { padding: 12px 10px 0; }
.pw-pill { display: inline-flex; align-items: center; gap: 8px; font-size: 11px; font-weight: 500; color: var(--paper-faint); }
.pw-pill img { height: 16px; width: auto; }
.bo-main { padding: 28px 32px 60px; min-width: 0; }
.bo-top { display: flex; align-items: flex-end; gap: 16px; margin-bottom: 22px; }
.bo-top h1 { font-size: 26px; font-weight: 800; }
.bo-top p { color: var(--ink-2); margin: 5px 0 0; }
.bo-top .act { margin-left: auto; display: flex; gap: 8px; align-items: center; }
.pubstate { font-size: 12.5px; color: var(--ink-2); display: flex; align-items: center; gap: 8px; background: #fff; box-shadow: inset 0 0 0 1px var(--line); padding: 8px 12px; border-radius: 10px; }
.pubstate b { font-family: var(--font-display); font-weight: 400; color: var(--blue); }
.dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; background: var(--ok); }
.dot.warn { background: var(--warn); } .dot.ko { background: var(--ko); } .dot.off { background: var(--ink-3); } .dot.maint { background: #5B7BA6; } .dot.sol { background: var(--blue); }
.card h3 { font-size: 16px; font-weight: 700; margin-bottom: 4px; }
.card .sub { color: var(--ink-2); font-size: 13px; margin-bottom: 14px; }
table.t { width: 100%; border-collapse: collapse; font-size: 13.5px; }
table.t th { text-align: left; font-size: 11.5px; text-transform: uppercase; letter-spacing: .06em; color: var(--ink-3); font-weight: 600; padding: 10px 12px; border-bottom: 1px solid var(--line); }
table.t td { padding: 12px; border-bottom: 1px solid var(--line); vertical-align: middle; }
table.t tr:last-child td { border-bottom: none; }
table.t tr.click { cursor: pointer; }
table.t tr.click:hover td { background: #F8FAFD; }
.pill { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 600; padding: 4px 10px; border-radius: 999px; background: var(--bg); color: var(--ink-2); white-space: nowrap; }
.pill.ko { background: #FCE9E9; color: #AE2E2E; } .pill.blue, .pill.sol { background: #E6EEF8; color: var(--blue); } .pill.maint { background: #EEF1F5; color: #4A5F80; }
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 12.5px; }
.muted { color: var(--ink-3); }
.row { display: flex; gap: 12px; align-items: center; }
.row .muted { white-space: nowrap; }
.grid2 { gap: 18px; }
.grid-edit { display: grid; grid-template-columns: minmax(0,1fr) 320px; gap: 22px; align-items: start; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.form-grid .f + .f { margin-top: 0; }
.form-grid .full { grid-column: 1/-1; }
.btn.sm { padding: 6px 10px; font-size: 12.5px; }
.btn.danger { background: #FDEEEE; color: var(--ko); }
.btn.danger-solid { background: var(--ko); color: #fff; }
.btn[disabled] { opacity: .45; cursor: not-allowed; }
.btnlist { display: flex; flex-direction: column; gap: 10px; }
.bitem { display: flex; align-items: center; gap: 12px; padding: 12px; border-radius: 12px; background: #fff; box-shadow: inset 0 0 0 1px var(--line); }
.bitem.off { opacity: .55; }
.bitem .lg { width: 42px; height: 42px; border-radius: 11px; display: grid; place-items: center; color: #fff; font-weight: 800; font-family: var(--font-title); flex-shrink: 0; overflow: hidden; background: var(--night-4); }
.bitem .lg img { width: 100%; height: 100%; object-fit: cover; }
.bitem .tx { flex: 1; min-width: 0; }
.bitem .tx b { display: block; }
.bitem .tx span { font-size: 12px; color: var(--ink-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; display: block; }
.bitem form { display: contents; }
.ord { display: flex; flex-direction: column; }
.ord button { width: 26px; height: 20px; color: var(--ink-3); display: grid; place-items: center; }
.ord button:hover { color: var(--ink); }
.ord button[disabled] { opacity: .3; }
.switch { position: relative; width: 38px; height: 22px; border-radius: 999px; background: #CBD3DF; flex-shrink: 0; transition: background .15s; display: inline-block; cursor: pointer; }
.switch::after { content: ""; position: absolute; top: 3px; left: 3px; width: 16px; height: 16px; border-radius: 50%; background: #fff; transition: left .15s; }
.switch.on { background: var(--blue); } .switch.on::after { left: 19px; }
.alert { display: flex; gap: 10px; padding: 12px 14px; border-radius: 12px; font-size: 13px; margin-bottom: 14px; align-items: flex-start; }
.alert svg { flex-shrink: 0; margin-top: 1px; }
.alert.warn { background: #FCF1DD; color: #7E5208; } .alert.ko { background: #FCE9E9; color: #972727; } .alert.info { background: #E6EEF8; color: #0E2F66; }
.visuals { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 14px; }
.vis { border-radius: 12px; overflow: hidden; background: #fff; box-shadow: inset 0 0 0 1px var(--line); }
.vis .pv { aspect-ratio: 3/4; display: flex; flex-direction: column; justify-content: flex-end; padding: 12px; color: #fff; font-family: var(--font-title); font-weight: 800; font-size: 15px; line-height: 1.15; background-size: cover; background-position: center; }
.vis .ft { display: flex; align-items: center; justify-content: space-between; padding: 10px 12px; font-size: 12.5px; }
.vis form { display: contents; }
.swatches { display: flex; gap: 12px; flex-wrap: wrap; }
.sw { display: flex; align-items: center; gap: 10px; border-radius: 12px; padding: 8px 12px 8px 8px; background: var(--bg); }
.sw b { display: block; font-size: 13px; color: var(--ink); } .sw span span { font-size: 11.5px; color: var(--ink-3); }
.fonts { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 14px; }
.fonts div { background: var(--bg); border-radius: 12px; padding: 14px; }
.fonts .s1 { font-family: var(--font-title); font-weight: 800; font-size: 24px; }
.fonts .s2 { font-family: var(--font-display); font-size: 22px; color: var(--blue); }
.log { padding: 0; margin: 0; }
.log li { list-style: none; display: flex; gap: 14px; padding: 12px 0; border-bottom: 1px solid var(--line); font-size: 13.5px; }
.log li:last-child { border-bottom: none; }
.log .tm { width: 120px; color: var(--ink-3); font-size: 12.5px; flex-shrink: 0; }
.preview-wrap { position: sticky; top: 24px; }
.preview-wrap .device { padding: 12px; border-radius: 26px; display: inline-block; }
.empty { padding: 30px; text-align: center; color: var(--ink-3); background: var(--bg); border-radius: 12px; }
.toolbar { display: flex; gap: 12px; align-items: center; margin-bottom: 14px; }
.icon-btn { width: 32px; height: 32px; border-radius: 9px; display: inline-grid; place-items: center; color: var(--ink-2); text-decoration: none; }
.icon-btn:hover { background: var(--bg); color: var(--ink); }
.icon-btn[disabled] { opacity: .3; cursor: default; }
.icon-btn.dark { color: var(--paper-muted); }
.icon-btn.dark:hover { background: rgba(243,246,251,.08); color: #fff; }
td.acts { text-align: right; white-space: nowrap; }
.err:empty { display: none; }
textarea.field { resize: vertical; }
.field[readonly] { background: var(--bg); color: var(--ink-2); }
.seg { display: flex; background: var(--bg); border-radius: 10px; padding: 3px; }
.seg button, .seg label { flex: 1; padding: 7px 6px; border-radius: 8px; font-size: 13px; font-weight: 600; color: var(--ink-2); text-align: center; cursor: pointer; margin: 0; }
.seg button.on, .seg label.on { background: #fff; color: var(--ink); box-shadow: 0 1px 2px rgba(6,20,48,.12); }
.note { font-size: 12.5px; color: var(--ink-2); }
.check { display: flex; gap: 10px; align-items: flex-start; font-size: 13.5px; color: var(--ink); cursor: pointer; margin-top: 10px; }
.check input { width: 16px; height: 16px; margin-top: 2px; accent-color: var(--blue); }
.checklist { display: flex; flex-direction: column; gap: 2px; }
.radio-cards { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.radio-cards label { background: var(--bg); border-radius: 12px; padding: 12px; cursor: pointer; display: flex; gap: 10px; align-items: flex-start; font-weight: 500; color: var(--ink); margin: 0; font-size: 14px; }
.radio-cards label.on { background: var(--night); color: #fff; }
.radio-cards label.on small { color: var(--paper-muted); }
.radio-cards label.dis { opacity: .5; cursor: not-allowed; }
.radio-cards small { display: block; color: var(--ink-3); font-size: 11.5px; font-weight: 400; }
.lg-prev { width: 48px; height: 48px; border-radius: 12px; display: grid; place-items: center; background: var(--night-4); color: #fff; font-weight: 800; overflow: hidden; }
.vis-form { display: grid; grid-template-columns: 250px 1fr; gap: 22px; }
.vis-prev > label { display: block; font-size: 12.5px; font-weight: 600; color: var(--ink-2); margin-bottom: 6px; }
.acc-prev { background: var(--night); color: #fff; border-radius: 12px; padding: 16px; font-family: var(--font-title); font-weight: 800; font-size: 20px; }
.danger-zone { display: flex; align-items: center; gap: 16px; margin-top: 18px; }
.danger-zone .btn { margin-left: auto; }
.savebar { position: sticky; bottom: 0; display: flex; align-items: center; gap: 12px; background: #fff; border-radius: var(--radius); padding: 12px 16px; box-shadow: inset 0 0 0 1px var(--line), 0 -6px 20px rgba(6,20,48,.06); }
.confirm { display: flex; gap: 16px; align-items: flex-start; }
.confirm .cicon { width: 44px; height: 44px; border-radius: 50%; background: #FCE9E9; color: var(--ko); display: grid; place-items: center; flex-shrink: 0; }
.confirm .cicon.info { background: #E6EEF8; color: var(--blue); }
.confirm p { font-size: 14.5px; color: var(--ink); margin: 0; }
.confirm ul { margin: 10px 0 0 18px; color: var(--ink-2); font-size: 13.5px; display: flex; flex-direction: column; gap: 5px; padding: 0; }
.kv { display: grid; grid-template-columns: 160px 1fr; gap: 8px 14px; font-size: 13px; }
/* Fenêtres */
.modal-bg { position: fixed; top: 0; right: 0; bottom: 0; left: 0; background: rgba(6,20,48,.5); display: none; align-items: center; justify-content: center; z-index: 100; padding: 20px; }
.modal-bg.on { display: flex; }
.modal { background: #fff; border-radius: 18px; width: 640px; max-width: 100%; max-height: 92vh; overflow: auto; box-shadow: 0 30px 80px rgba(6,20,48,.35); }
.modal .mh { display: flex; align-items: center; padding: 18px 22px; border-bottom: 1px solid var(--line); }
.modal .mh h3 { font-size: 18px; }
.modal .mh button { margin-left: auto; color: var(--ink-3); font-size: 22px; line-height: 1; }
.modal .mb { padding: 20px 22px; }
.modal .mf { display: flex; gap: 10px; justify-content: flex-end; padding: 14px 22px; border-top: 1px solid var(--line); background: #FAFBFD; align-items: center; }
.modal.wide { width: 760px; }
.modal h4 { font-size: 12px; text-transform: uppercase; letter-spacing: .05em; color: var(--ink-3); margin: 18px 0 8px; }
.audit-sum { display: flex; gap: 8px; align-items: flex-start; margin: 14px 0 0; padding: 10px 12px; background: var(--bg); border-radius: 10px; font-size: 13.5px; color: var(--ink); }
.audit-sum svg { color: var(--blue); flex: none; margin-top: 2px; }
.check.auto small { display: block; font-size: 11.5px; margin-top: 2px; }
.check.auto input[disabled] { opacity: .7; }
.t.diff td { vertical-align: top; word-break: break-word; }
.t.diff td.before { color: var(--ink-3); }
.t.diff td.after { color: var(--ink); font-weight: 600; }
.toast { position: fixed; right: 24px; bottom: 24px; background: var(--night); color: #fff; padding: 12px 16px; border-radius: 12px; box-shadow: 0 10px 30px rgba(6,20,48,.35); z-index: 200; display: flex; align-items: center; gap: 10px; font-size: 13.5px; max-width: 420px; animation: up .25s; }
.toast svg { color: var(--cyan); flex-shrink: 0; }
.toast.warning svg, .toast.error svg { color: #FFB84D; }
@keyframes up { from { transform: translateY(20px); opacity: 0; } to { transform: none; opacity: 1; } }
@media (max-width: 1240px) { .grid-edit { grid-template-columns: 1fr; } .preview-wrap { position: static; } }
@media (max-width: 900px) { .bo { grid-template-columns: 1fr; } .bo-side { position: static; height: auto; flex-direction: row; flex-wrap: wrap; } .bo-side .who, .bo-side .pw, .bo-side .sep { display: none; } .form-grid { grid-template-columns: 1fr; } }

/* ===== Aperçu de l'écran tablette (maquette, ÉCRANS DE LA TABLETTE) ===== */
.device { position: relative; padding: 22px; border-radius: 44px; background: #15171c; box-shadow: 0 30px 60px rgba(6,20,48,.28), inset 0 0 0 2px #2a2d34; }
.device.android { border-radius: 28px; }
.screen { position: relative; width: 540px; height: 780px; border-radius: 22px; overflow: hidden; background: var(--night); user-select: none; }
.device.android .screen { border-radius: 10px; }
.screen.mini { width: 270px; height: 390px; border-radius: 14px; }
.screen .scaler { position: absolute; top: 0; left: 0; width: 540px; height: 780px; transform-origin: 0 0; }
.screen.mini .scaler { transform: scale(.5); }
/* Simulateur d'une tablette (page admin/tablets/simulator) */
.sim { display: grid; grid-template-columns: 260px minmax(0, 1fr) 280px; gap: 22px; align-items: start; }
.sim .panel { background: #fff; border-radius: var(--radius); padding: 18px; box-shadow: inset 0 0 0 1px var(--line); }
.sim .panel h3 { font-size: 15px; margin-bottom: 12px; }
.sim .grp { margin-bottom: 16px; }
.sim .lbl { display: block; font-size: 12px; font-weight: 600; color: var(--ink-2); margin-bottom: 6px; }
.sim .stage { display: flex; justify-content: center; padding: 6px 0 30px; min-width: 0; }
.readout { display: grid; grid-template-columns: auto 1fr; gap: 6px 10px; font-size: 13px; background: var(--bg); border-radius: 10px; padding: 12px; }
.readout b { font-weight: 600; }
.device .cam { position: absolute; top: 9px; left: 50%; width: 7px; height: 7px; border-radius: 50%; background: #3a3d45; transform: translateX(-50%); }
.device.ipad { border-radius: 44px; }
.screen.sim { width: auto; height: auto; }
.screen.sim iframe { position: absolute; top: 0; left: 0; border: 0; transform-origin: 0 0; background: var(--night); }
@media (max-width: 1100px) { .sim { grid-template-columns: 1fr; } }
.k { position: absolute; top: 0; right: 0; bottom: 0; left: 0; display: flex; flex-direction: column; color: var(--paper); background: var(--night); overflow: hidden; text-align: left; }
.k .glow { position: absolute; top: 0; right: 0; bottom: 0; left: 0; pointer-events: none; background: radial-gradient(60% 40% at 0% 0%, rgba(0,255,255,.20), transparent 70%), radial-gradient(70% 50% at 100% 100%, rgba(0,255,255,.16), transparent 70%), linear-gradient(160deg, var(--indigo) 0%, var(--night) 45%, var(--blue) 120%); }
.k .net { position: absolute; top: 0; right: 0; bottom: 0; left: 0; width: 100%; height: 100%; pointer-events: none; opacity: .55; }
.k > .z { position: relative; z-index: 2; }
.k-head { display: flex; align-items: center; gap: 12px; padding: 24px 28px 8px; }
.k-head .logo { height: 46px; width: auto; }
.k-head .head-r { margin-left: auto; display: flex; align-items: center; gap: 8px; }
.k-head .lang { display: flex; background: rgba(243,246,251,.08); border-radius: 999px; padding: 3px; }
.k-head .lang button { padding: 6px 13px; font-size: 12px; font-weight: 700; color: var(--paper-muted); border-radius: 999px; }
.k-head .lang button.on { background: var(--cyan); color: var(--night); }
.ax-btn { width: 40px; height: 34px; border-radius: 999px; background: rgba(243,246,251,.08); color: var(--paper); font-weight: 800; font-size: 14px; display: grid; place-items: center; }
.k-intro { padding: 22px 28px 6px; }
.k-intro .chip { font-family: var(--font-display); font-size: 14px; color: var(--cyan); letter-spacing: .02em; }
.k-intro h2 { font-size: 32px; font-weight: 800; margin-top: 8px; letter-spacing: -.02em; }
.k-intro p { margin: 6px 0 0; color: var(--paper-muted); font-size: 15px; }
.k-body { flex: 1; padding: 18px 28px; display: grid; gap: 14px; min-height: 0; }
.k-body.g1 { grid-template-rows: minmax(0,1fr); }
.k-body.g2 { grid-template-rows: repeat(2, minmax(0,1fr)); }
.k-body.g4 { grid-template-columns: repeat(2, minmax(0,1fr)); grid-template-rows: repeat(2, minmax(0,1fr)); }
.k-card { position: relative; background: rgba(11,28,63,.82); border-radius: 22px; padding: 22px; display: flex; flex-direction: column; text-align: left; overflow: hidden; color: var(--paper); box-shadow: inset 0 0 0 1px var(--hairline); }
.k-card .logo { width: 64px; height: 64px; border-radius: 16px; display: grid; place-items: center; color: #fff; font-family: var(--font-title); font-weight: 800; font-size: 22px; background: var(--night-4); overflow: hidden; flex-shrink: 0; }
.k-card .logo img { width: 100%; height: 100%; object-fit: cover; }
.k-card .type { position: absolute; top: 20px; right: 20px; font-size: 11px; font-weight: 600; color: var(--paper-muted); background: rgba(243,246,251,.07); padding: 5px 9px; border-radius: 999px; display: flex; align-items: center; gap: 5px; }
.k-card h3 { font-size: 22px; font-weight: 800; margin-top: 16px; }
.k-card p { color: var(--paper-muted); font-size: 14.5px; margin: 6px 0 0; }
/* Même filet de sécurité que sur les tablettes : seule la description rétrécit, « Sur mon téléphone » et « Découvrir » restent entiers. */
.k-card > .txt { display: flex; flex-direction: column; flex: 1 1 auto; min-height: 0; }
.k-card .txt > h3, .k-card .txt > .qr-btn, .k-card > .logo, .k-card > .go { flex-shrink: 0; }
.k-card .txt > .qr-btn { align-self: flex-start; }
.k-card .txt > p { flex: 0 1 auto; min-height: 0; overflow: hidden; }
.k-card .go { margin-top: auto; display: flex; align-items: center; justify-content: space-between; padding-top: 14px; font-weight: 700; }
/* Pages de solutions (RG-03) : points et geste didactique sous les cartes, comme sur les tablettes. */
.k-pager { display: flex; align-items: center; justify-content: center; gap: 18px; padding: 4px 28px 0; }
.k-dots { display: flex; align-items: center; gap: 7px; }
.k-dots i { width: 9px; height: 9px; border-radius: 999px; background: var(--paper-faint); }
.k-dots i.on { width: 26px; background: var(--cyan); }
.k-swipe { display: flex; align-items: center; gap: 10px; padding: 6px 16px 6px 7px; border-radius: 999px; background: rgba(243,246,251,.08); color: var(--paper); }
.k-swipe .hand { width: 34px; height: 34px; border-radius: 50%; background: var(--cyan); color: var(--night); display: grid; place-items: center; flex-shrink: 0; }
.k-swipe .hand svg { animation: swipehint 2.2s ease-in-out infinite; }
.k-swipe b { display: block; font-size: 12.5px; font-weight: 700; line-height: 1.15; }
.k-swipe small { display: block; font-size: 11px; color: var(--paper-muted); margin-top: 2px; }
@keyframes swipehint { 0%, 12% { transform: translateX(30%); opacity: .6; } 48%, 62% { transform: translateX(-30%); opacity: 1; } 100% { transform: translateX(30%); opacity: .6; } }
.k-card .go .arr { width: 44px; height: 44px; border-radius: 50%; background: var(--cyan); color: var(--night); display: grid; place-items: center; }
.g1 .k-card { padding: 34px; }
.g1 .k-card .logo { width: 108px; height: 108px; border-radius: 26px; font-size: 36px; }
.g1 .k-card h3 { font-size: 38px; margin-top: 28px; }
.g1 .k-card p { font-size: 18px; margin-top: 12px; }
.g1 .k-card .go { font-size: 18px; }
.g1 .k-card .go .arr { width: 64px; height: 64px; }
.g2 .k-card { flex-direction: row; align-items: center; gap: 20px; }
.g2 .k-card .logo { width: 92px; height: 92px; font-size: 30px; border-radius: 24px; }
.g2 .k-card .txt { flex: 1; min-width: 0; }
.g2 .k-card h3 { margin-top: 0; font-size: 25px; }
.g2 .k-card .go { margin-top: 0; padding-top: 0; }
.g2 .k-card .go .lab { display: none; }
.g2 .k-card .go .arr { width: 52px; height: 52px; }
.g4 .k-card { padding: 16px; }
.g4 .k-card .type { top: 14px; right: 14px; }
.g4 .k-card .logo { width: 50px; height: 50px; font-size: 17px; border-radius: 13px; }
.g4 .k-card h3 { font-size: 17px; margin-top: 12px; }
.g4 .k-card p { font-size: 12.5px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.g4 .k-card .go { font-size: 13px; padding-top: 8px; }
.g4 .k-card .go .arr { width: 36px; height: 36px; }
.k-card .txt { display: flex; flex-direction: column; align-items: flex-start; }
.k-card .qr-btn { display: inline-flex; align-items: center; gap: 8px; margin-top: 16px; padding: 10px 16px 10px 12px; border-radius: 999px; background: rgba(0,255,255,.2); color: var(--paper); font-size: 14px; font-weight: 700; line-height: 1; white-space: nowrap; }
.k-card .qr-btn svg { width: 20px; height: 20px; color: var(--cyan); flex-shrink: 0; }
.g1 .k-card .qr-btn { margin-top: 23px; padding: 14px 22px 14px 16px; font-size: 18px; } .g1 .k-card .qr-btn svg { width: 26px; height: 26px; }
.g2 .k-card .qr-btn { margin-top: 14px; }
.g4 .k-card .qr-btn { margin-top: 12px; padding: 8px 12px 8px 9px; font-size: 12.5px; gap: 6px; } .g4 .k-card .qr-btn svg { width: 18px; height: 18px; }
.k-card.info { background: linear-gradient(150deg, var(--blue), var(--indigo)); box-shadow: none; }
.k-card.info .mk { width: 52px; height: 52px; }
.k-foot { display: flex; align-items: center; justify-content: space-between; padding: 10px 28px 20px; font-size: 11.5px; color: var(--paper-faint); }

/* ===== Supervision et parc (maquette : pDash, deviceMini, pTablettes) ===== */
.kpis { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-bottom: 18px; }
.kpis.k5 { grid-template-columns: repeat(5, 1fr); }
.kpi { background: #fff; border-radius: var(--radius); padding: 16px 18px; box-shadow: inset 0 0 0 1px var(--line); }
.kpi .l { font-size: 12.5px; color: var(--ink-2); display: flex; align-items: center; gap: 7px; }
.kpi .v { font-family: var(--font-display); font-size: 34px; margin-top: 6px; line-height: 1.1; }
.kpi .s { font-size: 12px; color: var(--ink-3); }
.sv-group { margin-bottom: 20px; }
.sv-group:last-child { margin-bottom: 0; }
.tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 12px; }
.tile { display: flex; gap: 16px; align-items: flex-start; border-radius: 12px; padding: 14px; background: var(--bg); }
.tile.ko { background: #FDF1F1; }
.tile.maint { background: var(--bg-2); }
.tile .info { flex: 1; min-width: 0; }
.tile .top { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.tile .code { font-family: var(--font-display); font-size: 18px; color: var(--night); }
.tile .meta { font-size: 12px; color: var(--ink-3); margin-top: 6px; display: flex; gap: 4px; align-items: center; flex-wrap: wrap; }
.tile .meta svg { flex-shrink: 0; }
.tile .last { margin-top: 10px; font-size: 13px; }
.dev { flex: none; width: 74px; position: relative; cursor: pointer; background: none; border: 0; padding: 0; font: inherit; text-decoration: none; display: block; color: inherit; }
.dev .fr { display: block; position: relative; background: #1C2230; border-radius: 11px; padding: 5px; box-shadow: 0 1px 2px rgba(6,20,48,.22), 0 6px 14px -8px rgba(6,20,48,.45); }
.dev .fr::before { content: ""; position: absolute; top: 2px; left: 50%; width: 3px; height: 3px; margin-left: -1.5px; border-radius: 50%; background: rgba(255,255,255,.28); }
.dev.ipad9 .fr { padding: 11px 5px 14px; border-radius: 9px; background: #2A303C; }
.dev.ipad9 .fr::before { top: 4px; }
.dev.ipad9 .fr::after { content: ""; position: absolute; bottom: 3px; left: 50%; width: 8px; height: 8px; margin-left: -4px; border-radius: 50%; box-shadow: inset 0 0 0 1px rgba(255,255,255,.3); }
.dev.android .fr { border-radius: 7px; padding: 4px 3px; background: #111418; }
.dev .scr-wrap { display: block; }
.dev .scr { position: relative; overflow: hidden; border-radius: 6px; display: flex; flex-direction: column; height: 100%; }
.dev.ipad9 .scr, .dev.android .scr { border-radius: 2px; }
.dev .bat { display: flex; align-items: center; justify-content: center; gap: 4px; margin-top: 4px; font-size: 10.5px; font-weight: 600; color: var(--ink-3); white-space: nowrap; }
.dev .bat svg { flex: none; }
.dev .bat.ok { color: #137A4E; } .dev .bat.unplug { color: var(--warn); } .dev .bat.low { color: var(--ko); } .dev .bat.na { font-weight: 500; }
.dev .bat.stale { opacity: .55; }
.dev .lbl { display: block; font-size: 10.5px; line-height: 1.2; color: var(--ink-3); text-align: center; margin-top: 7px; }
.dev .bdg { position: absolute; top: -6px; right: -6px; min-width: 17px; height: 17px; padding: 0 4px; border-radius: 9px; background: var(--ko); color: #fff; font-size: 10.5px; font-weight: 700; display: grid; place-items: center; box-shadow: 0 0 0 2px #fff; }
.dev .bdg.ver { right: auto; left: -6px; background: var(--warn); font-weight: 600; font-size: 9.5px; }
.scr.home { background: linear-gradient(165deg, #061430 0%, #040461 62%, #033884 100%); padding: 13% 11% 9%; gap: 7%; }
.scr.home .lg { height: 4px; width: 58%; border-radius: 2px; background: rgba(255,255,255,.88); flex: none; }
.scr.home .tt { height: 3px; width: 38%; border-radius: 2px; background: var(--cyan); flex: none; }
.scr.home .bt { flex: 1; display: grid; gap: 4px; grid-template-columns: 1fr; }
.scr.home .bt.g4 { grid-template-columns: 1fr 1fr; }
.scr.home .bt i { position: relative; border-radius: 3px; background: rgba(255,255,255,.14); }
.scr.home .bt i::before { content: ""; position: absolute; top: 4px; left: 4px; width: 7px; height: 7px; border-radius: 2px; background: rgba(0,255,255,.75); }
.scr.home .bt i.info { background: rgba(0,255,255,.10); } .scr.home .bt i.info::before { background: rgba(255,255,255,.5); }
.scr.home .ft { height: 2px; width: 30%; margin: 0 auto; border-radius: 2px; background: rgba(255,255,255,.35); flex: none; }
.scr.sleep { background: var(--night); justify-content: flex-end; align-items: center; padding-bottom: 12%; }
.scr.sleep .ph { position: absolute; top: 0; right: 0; bottom: 45%; left: 0; background: linear-gradient(150deg, var(--blue), var(--indigo)); }
.scr.sleep .ph::after { content: ""; position: absolute; top: 0; right: 0; bottom: 0; left: 0; background: linear-gradient(180deg, rgba(6,20,48,0) 40%, #061430 100%); }
.scr.sleep .dt { position: relative; height: 3px; width: 46%; border-radius: 2px; background: var(--cyan); margin-bottom: 9%; }
.scr.sleep .tx { position: relative; height: 3px; width: 62%; border-radius: 2px; background: rgba(255,255,255,.7); margin-bottom: 14%; }
.scr.sleep .to { position: relative; width: 16px; height: 16px; border-radius: 50%; box-shadow: 0 0 0 2px rgba(0,255,255,.75), 0 0 0 6px rgba(0,255,255,.18); }
.scr.sol { background: #F3F5F9; }
.scr.sol .tb { height: 9%; background: #DCE2EB; flex: none; display: flex; align-items: center; padding-left: 6%; }
.scr.sol .tb::before { content: ""; width: 6px; height: 6px; border-radius: 2px; background: #8A94A6; }
.scr.sol .hero { height: 30%; background: linear-gradient(135deg, #4C6A92, #7E97B8); flex: none; }
.scr.sol .ln { height: 3px; border-radius: 2px; background: #C9D1DD; margin: 8% 10% 0; }
.scr.sol .ln.s { width: 50%; }
.scr.off { background: #0D1016; align-items: center; justify-content: center; color: #5B6475; }
.scr.off svg { width: 24px; height: 24px; }
.scr.maint { background: linear-gradient(165deg, #061430, #040461); align-items: center; justify-content: center; color: var(--cyan); gap: 10%; }
.scr.maint svg { width: 22px; height: 22px; }
.scr.maint .ln { height: 3px; width: 56%; border-radius: 2px; background: rgba(255,255,255,.55); }
.scr .nav { position: absolute; left: 0; right: 0; bottom: 0; height: 7px; background: rgba(0,0,0,.28); display: flex; justify-content: center; align-items: center; gap: 12px; }
.scr .nav b { width: 3px; height: 3px; border-radius: 50%; background: rgba(255,255,255,.55); }
.scr.sol .nav { background: rgba(0,0,0,.12); } .scr.sol .nav b { background: rgba(0,0,0,.35); }
.tabs2 { display: flex; gap: 4px; background: #fff; box-shadow: inset 0 0 0 1px var(--line); padding: 4px; border-radius: 11px; margin-bottom: 18px; width: max-content; }
.tabs2 button { padding: 7px 14px; border-radius: 8px; font-weight: 600; font-size: 13px; color: var(--ink-2); }
.tabs2 button.on { background: var(--night); color: #fff; }
.code-s { font-family: var(--font-display); font-weight: 400; font-size: 15px; color: var(--night); }
.seg-radio input { position: absolute; opacity: 0; width: 0; height: 0; }
.seg-radio label { position: relative; }
.checklist .check { margin-top: 8px; }
@media (max-width: 1240px) { .kpis.k5 { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 900px) { .kpis, .kpis.k5 { grid-template-columns: 1fr 1fr; } }

/* ===== Annonces (maquette : pAnnonces, openAnnModal) ===== */
.checklist.cols2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 16px; }
.radio-cards input { position: absolute; opacity: 0; width: 0; height: 0; }
.radio-cards label { position: relative; }
.radio-cards label svg { flex-shrink: 0; margin-top: 2px; }
.dt-pair { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: 8px; }
.ann-prev { background: var(--night); border-radius: 14px; padding: 14px 0; }
.k-ann { display: flex; align-items: center; gap: 10px; margin: 6px 28px 0; padding: 11px 14px; border-radius: 14px; background: rgba(16,36,75,.92); color: var(--paper); font-size: 14px; font-weight: 600; }
.k-ann svg { color: var(--cyan); flex-shrink: 0; }
.k-ann.important { background: var(--cyan); color: var(--night); }
.k-ann.important svg { color: var(--night); }
.ann-prev .k-ann { margin-top: 0; }

/* ===== Statistiques (maquette : pStats, barsVertical, barsHorizontal) ===== */
.seg a { flex: 1; padding: 7px 6px; border-radius: 8px; font-size: 13px; font-weight: 600; color: var(--ink-2); text-align: center; text-decoration: none; }
.seg a.on { background: #fff; color: var(--ink); box-shadow: 0 1px 2px rgba(6,20,48,.12); }
.grid-stats { display: grid; grid-template-columns: 1.1fr 1fr; gap: 18px; }
.chart { width: 100%; height: auto; display: block; }
.chart .ax { font-size: 11px; fill: var(--ink-3); font-family: var(--font-body); }
.hit { cursor: default; }
.hit:hover path { opacity: .82; }
.hbars { display: flex; flex-direction: column; gap: 9px; }
.hbar { display: grid; grid-template-columns: 150px 1fr 48px; gap: 10px; align-items: center; }
.hbar .hl b { display: block; font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hbar .hl span { display: block; font-size: 11px; color: var(--ink-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hbar .ht { height: 14px; }
.hbar .ht i { display: block; height: 100%; background: var(--blue); border-radius: 0 4px 4px 0; }
.hbar:hover .ht i { opacity: .82; }
.hbar .hv { font-family: var(--font-display); font-size: 14px; color: var(--ink); text-align: right; }
td.num { font-variant-numeric: tabular-nums; }
@media (max-width: 1100px) { .grid-stats { grid-template-columns: 1fr; } }

/* Code de tablette attribué automatiquement (maquette : .code-auto) */
.code-auto { display: flex; align-items: center; gap: 10px; height: 42px; padding: 0 14px; border-radius: 10px; background: var(--bg); }
.code-auto .mono { font-size: 17px; font-weight: 700; }
.code-auto small { color: var(--ink-3); font-size: 12px; }
/* Tableaux : défilement horizontal, pied de tableau, pagination (RG-84, maquette) */
.tscroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.tscroll::-webkit-scrollbar { height: 8px; }
.tscroll::-webkit-scrollbar-thumb { background: #CBD3DF; border-radius: 8px; }
.tscroll > table.t { width: 100%; }
.tscroll.can-scroll:not(.at-end) { -webkit-mask-image: linear-gradient(to right, #000 calc(100% - 48px), transparent); mask-image: linear-gradient(to right, #000 calc(100% - 48px), transparent); }
.tscroll.can-scroll.at-end:not(.at-start) { -webkit-mask-image: linear-gradient(to left, #000 calc(100% - 48px), transparent); mask-image: linear-gradient(to left, #000 calc(100% - 48px), transparent); }
.tfoot { display: flex; align-items: center; gap: 14px; padding: 12px 10px 8px; border-top: 1px solid var(--line); font-size: 13px; }
.tfoot .tsize { display: flex; align-items: center; gap: 8px; white-space: nowrap; margin: 0; }
.tfoot .tsize .field { width: auto; padding: 5px 8px; }
.pager { display: flex; align-items: center; gap: 4px; }
.pager a, .pager button { display: inline-flex; align-items: center; justify-content: center; min-width: 32px; height: 32px; padding: 0 8px; border-radius: 8px; font-weight: 600; color: var(--ink-2); text-decoration: none; background: transparent; border: 0; font: inherit; }
.pager a[title], .pager button[title] { font-size: 20px; line-height: 1; }
.pager a:hover { background: var(--bg); }
.pager a.on { background: var(--night); color: #fff; }
.pager button[disabled] { opacity: .35; cursor: not-allowed; }
.pager .gap { color: var(--ink-3); padding: 0 4px; }
.btn.sm[disabled] { opacity: .45; cursor: not-allowed; }

/* Miniatures de modèle seules (maquette : .dev.bare, .dev.big) et onglets en liens */
.dev.bare { width: 34px; cursor: default; } .dev.bare .fr { padding: 3px; border-radius: 6px; } .dev.bare .fr::before { display: none; } .dev.bare.ipad9 .fr::after { width: 4px; height: 4px; margin-left: -2px; bottom: 1.5px; } .dev.bare .scr { border-radius: 3px; }
.dev.bare.ipad9 .fr { padding: 5px 3px 7px; } .dev.bare.android .fr { padding: 2px; }
.dev.big { width: 110px; cursor: default; } .dev.big .fr { padding: 7px; border-radius: 14px; } .dev.big.ipad9 .fr { padding: 15px 7px 19px; } .dev.big.android .fr { padding: 6px 4px; }
.tabs2.tabs2-links a { padding: 7px 14px; border-radius: 8px; font-weight: 600; font-size: 13px; color: var(--ink-2); text-decoration: none; }
.tabs2.tabs2-links a.on { background: var(--night); color: #fff; }

/* Statistiques : répartition des avis (maquette .distr) et titre de section */
.sec-t { font-size: 18px; font-weight: 800; margin: 28px 0 14px; }
.distr { display: flex; height: 8px; border-radius: 999px; overflow: hidden; background: var(--bg); min-width: 120px; }
.distr i { display: block; height: 100%; }
.distr .d1 { background: var(--ko); } .distr .d2 { background: #E3B341; } .distr .d3 { background: var(--ok); }

/* Fenêtre Événement : aperçu de l'accueil (maquette .evp) */
.evp { border-radius: 18px; padding: 16px 14px 12px; color: #fff; aspect-ratio: 10 / 15; display: flex; flex-direction: column; gap: 8px; box-shadow: 0 10px 30px var(--night-25); }
.evp-logo { height: 28px; width: auto; max-width: 100%; }
.evp .txtlogo { font-size: 15px; height: auto; font-weight: 800; color: #fff; }
.evp-chip { font-family: var(--font-display); font-size: 9px; letter-spacing: .08em; margin-top: 6px; }
.evp-t { font-size: 15px; font-weight: 800; }
.evp-g { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; flex: 1; }
.evp-g i { position: relative; border-radius: 8px; background: rgba(255,255,255,.1); }
.evp-g b { position: absolute; top: 8px; left: 8px; width: 14px; height: 14px; border-radius: 4px; opacity: .9; }
.evp-f { display: flex; align-items: center; justify-content: space-between; }
.evp-f img { height: 16px; }
.evp-pw { font-size: 8.5px; opacity: .6; }
/* Accès par événement (maquette .acc-*, .sp-*) */
.acc-list { display: flex; flex-direction: column; gap: 8px; }
.acc-ev { border-radius: 12px; background: var(--bg); padding: 12px 14px; }
.acc-ev.on { background: var(--bg-2); }
.acc-h, .f label.acc-h { display: flex; align-items: center; gap: 12px; cursor: pointer; margin: 0; font-weight: 400; color: var(--ink); font-size: 13.5px; }
.acc-h small { display: block; color: var(--ink-3); font-size: 12px; }
.acc-b { margin-top: 10px; padding-left: 30px; }
.acc-l { display: flex; align-items: center; gap: 8px; font-size: 12.5px; margin: 2px 0; white-space: nowrap; }
.acc-l .muted { font-size: 12px; }
.sp-pick { background: #fff; border-radius: 12px; padding: 12px; box-shadow: inset 0 0 0 1px var(--line); }
.sp-bar { display: flex; align-items: center; gap: 14px; margin-bottom: 10px; }
.sp-q { width: 100%; padding: 8px 11px; margin-bottom: 10px; }
.sp-count { font-size: 12.5px; color: var(--ink-3); white-space: nowrap; }
.linkbtn2 { font-size: 12.5px; font-weight: 600; color: var(--blue); padding: 4px 2px; background: none; border: 0; cursor: pointer; }
.linkbtn2:hover { text-decoration: underline; }
.sp-chips { display: flex; flex-wrap: wrap; gap: 8px; max-height: 168px; overflow-y: auto; padding: 2px; }
.sp-chip { display: inline-flex; align-items: center; gap: 6px; padding: 7px 12px; border-radius: 999px; background: var(--bg); color: var(--ink-2); font-size: 13px; font-weight: 600; cursor: pointer; }
.f label.sp-chip { display: inline-flex; margin: 0; font-size: 13px; font-weight: 600; color: var(--ink-2); }
.f label.sp-chip.on { color: #fff; }
.sp-chip svg { width: 14px; height: 14px; display: none; }
.sp-chip:hover { background: var(--bg-3); }
.sp-chip.on { background: var(--blue); color: #fff; }
.sp-chip.on svg { display: block; }
.sp-chip[hidden], .seg[hidden], .acc-b[hidden], .acc-list[hidden], .sp-pick[hidden] { display: none; }
.acc-h input { width: 16px; height: 16px; accent-color: var(--blue); }
.acc-h b { font-weight: 700; }
.seg label.dis { opacity: .55; cursor: not-allowed; }
.sp-none { font-size: 12.5px; padding: 6px 2px; }

/* Publication */
.kpis.k3 { grid-template-columns: repeat(3, 1fr); }
.pub-main { margin-bottom: 18px; }
.pub-head { display: flex; align-items: flex-start; gap: 14px; }
.pub-head h3 { margin-bottom: 2px; }
.pub-head .sub { margin-bottom: 0; max-width: 760px; }
.pub-ico { width: 40px; height: 40px; border-radius: 12px; display: inline-flex; align-items: center; justify-content: center; flex: none; background: var(--bg-2); color: var(--blue); }
.pub-ico.ok { background: #E3F4EC; color: var(--ok); }
.pub-ico.ko { background: #FCE9E9; color: #972727; }
.pub-main .alert { margin: 16px 0 0; }
.changes { list-style: none; margin: 16px 0 0; padding: 0; max-width: 860px; }
.changes li { position: relative; padding: 9px 0 9px 26px; font-size: 13.5px; box-shadow: 0 1px 0 var(--line); }
.changes li::before { content: ""; position: absolute; left: 7px; top: 15px; width: 8px; height: 8px; border-radius: 50%; background: var(--blue); }
.pub-details { margin-top: 14px; }
.pub-details summary { cursor: pointer; font-size: 13px; color: var(--ink-2); }
.pub-foot { display: flex; align-items: flex-start; gap: 22px; margin-top: 18px; flex-wrap: wrap; }
.pub-foot .btn { flex: none; }
.pub-notes { display: flex; flex-direction: column; gap: 6px; font-size: 12.5px; color: var(--ink-2); padding-top: 6px; }
.pub-notes span { display: flex; align-items: center; gap: 7px; }
.pub-notes svg { color: var(--ink-3); flex: none; }
.modal .changes { margin-top: 0; }
@media (max-width: 900px) { .kpis.k3 { grid-template-columns: 1fr; } }

/* Choix exclusifs (segments et cartes) : l'état coché pilote le style, sans JavaScript */
.seg-radio label:has(input:checked) { background: #fff; color: var(--ink); box-shadow: 0 1px 2px var(--night-25); }
.radio-cards label:has(input:checked) { background: var(--night); color: #fff; }
.radio-cards label:has(input:checked) small { color: var(--paper-muted); }
/* Statut d'un événement : parcours en quatre étapes (préparation, en cours, terminé, archivé) */
.wf { display: grid; grid-template-columns: repeat(4, 1fr); margin-top: 6px; }
.wf-step { position: relative; display: flex; flex-direction: column; align-items: center; text-align: center; padding: 0 10px; margin: 0; font-weight: 500; color: var(--ink); }
.wf-step::before, .wf-step::after { content: ""; position: absolute; top: 15px; height: 2px; background: var(--line); }
.wf-step::before { left: 0; right: 50%; } .wf-step::after { left: 50%; right: 0; }
.wf-step:first-child::before, .wf-step:last-child::after { display: none; }
.wf-dot { position: relative; z-index: 1; width: 32px; height: 32px; border-radius: 50%; background: #fff; box-shadow: inset 0 0 0 2px var(--line); display: inline-flex; align-items: center; justify-content: center; font-family: var(--font-display); font-size: 14px; color: var(--ink-3); }
.wf-dot i { font-style: normal; }
.wf-txt { margin-top: 10px; }
.wf-txt b { display: block; font-size: 13.5px; font-weight: 700; color: var(--ink-3); }
.wf-txt small { display: block; font-size: 11.5px; line-height: 1.35; color: var(--ink-3); margin-top: 3px; font-weight: 400; }
/* Étapes passées : bleu plein et coche ; étape en cours : vert ; étapes à venir : blanc cerclé */
.wf-step.done .wf-dot { background: var(--blue); box-shadow: none; color: #fff; }
.wf-step.done::before, .wf-step.done::after, .wf-step.now::before { background: var(--blue); }
.wf-step.done .wf-txt b { color: var(--blue); }
.wf-step.now .wf-dot { background: var(--ok); color: #fff; box-shadow: 0 0 0 5px rgba(23,149,95,.16); }
.wf-step.now .wf-txt b { color: var(--ok); }
.wf-step.now .wf-txt small { color: var(--ink-2); }
.wf-help { display: flex; align-items: center; gap: 8px; margin-top: 14px; font-size: 12.5px; color: var(--ink-2); background: var(--bg); border-radius: 10px; padding: 9px 12px; }
.wf-help > svg { color: var(--blue); flex: none; }
.wf-help > span { flex: 1; }
.wf-help .btn { flex: none; }
@media (max-width: 760px) { .wf { grid-template-columns: 1fr 1fr; row-gap: 18px; } .wf-step::before, .wf-step::after { display: none; } .wf-help { position: static; grid-column: 1 / -1; } }

/* Statistiques : choix du jour */
.daynav { gap: 12px; flex-wrap: wrap; }
.daysel { flex: 1; max-width: 760px; }
.daysel a { display: flex; flex-direction: column; align-items: center; line-height: 1.15; padding: 6px 8px; }
.daysel a b { font-weight: 700; }
.daysel a small { font-size: 11px; font-weight: 500; color: var(--ink-3); margin-top: 2px; }
.daysel a.on small { color: var(--ink-2); }
.daynav .icon-btn.dis { opacity: .35; pointer-events: none; }
.daynav .icon-btn:first-of-type svg { -webkit-transform: rotate(180deg); transform: rotate(180deg); }

/* Sélecteur de couleur de la charte : pastille carrée au lieu d'un champ texte aplati */
.sw input[type="color"], .sw input[type="color"].field { width: 46px; height: 34px; padding: 2px; border: 1px solid var(--line); border-radius: 10px; background: #fff; cursor: pointer; flex: none; }
.sw input[type="color"]::-webkit-color-swatch-wrapper { padding: 0; }
.sw input[type="color"]::-webkit-color-swatch { border: 0; border-radius: 7px; }
.sw input[type="color"]::-moz-color-swatch { border: 0; border-radius: 7px; }

/* Glisser-déposer des lignes (natures d'incident) */
.grip { display: inline-grid; place-items: center; width: 26px; height: 32px; color: var(--ink-3); cursor: grab; vertical-align: middle; margin-right: 2px; }
.grip:active { cursor: grabbing; }
tr.dragging { opacity: .45; }
tr.drop-before td { box-shadow: inset 0 2px 0 var(--blue); }
tr.drop-after td { box-shadow: inset 0 -2px 0 var(--blue); }
/* Cartes de visuels : poignée sur l'image, indicateur de dépose à gauche ou à droite */
.vis .pv { cursor: grab; position: relative; }
.vis .pv:active { cursor: grabbing; }
.vis-grip { position: absolute; top: 8px; left: 8px; display: inline-grid; place-items: center; width: 24px; height: 24px; border-radius: 7px; background: rgba(6,20,48,.55); color: #fff; opacity: 0; transition: opacity .15s; }
.vis:hover .vis-grip { opacity: 1; }
.vis.dragging { opacity: .45; }
.vis.drop-before { box-shadow: inset 3px 0 0 var(--blue), inset 0 0 0 1px var(--line); }
.vis.drop-after { box-shadow: inset -3px 0 0 var(--blue), inset 0 0 0 1px var(--line); }

/* Pages de formulaire (création et modification des objets principaux) */
.back-link { display: inline-flex; align-items: center; gap: 6px; color: var(--ink-2); text-decoration: none; font-size: 13px; }
.back-link svg { -webkit-transform: rotate(180deg); transform: rotate(180deg); }
.back-link:hover { color: var(--blue); }
.form-page { max-width: 920px; }
.form-page.wide { max-width: 1180px; }
.form-foot { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-top: 22px; padding-top: 16px; box-shadow: 0 -1px 0 var(--line); }

.btn { white-space: nowrap; }
.pubstate .dot { flex: none; }
.form-foot .continue-first { order: 1; }
.form-foot .primary-last { order: 2; }
/* Parcours de statut : libellés seuls sous les étapes, explication de l'étape courante en dessous, bulle d'aide au survol */

/* Listes déroulantes filtrables (Tom Select) habillées comme les champs. La feuille de Tom Select est chargée après
   app.css : les sélecteurs portent la classe .field du wrapper pour primer. */
.ts-wrapper.field { padding: 0; border: 0; background: none; width: 100%; }
.ts-wrapper.field .ts-control { border: 1px solid var(--line); border-radius: 10px; padding: 9px 34px 9px 11px; background: #fff; background-image: none; font: inherit; color: var(--ink); min-height: 40px; box-shadow: none; }
.ts-wrapper.field.single .ts-control::after, .ts-wrapper.field.single.dropdown-active .ts-control::after { content: ""; position: absolute; right: 14px; top: 50%; width: 7px; height: 7px; margin: 0; border-style: solid; border-color: var(--ink-3); border-width: 0 2px 2px 0; -webkit-transform: translateY(-65%) rotate(45deg); transform: translateY(-65%) rotate(45deg); }
.ts-wrapper.field.single .ts-control .item { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
.ts-wrapper.field.focus .ts-control { border-color: var(--blue); box-shadow: 0 0 0 3px var(--bg-3); }
.ts-wrapper.field.disabled .ts-control { opacity: .6; }
.ts-wrapper.field .ts-dropdown { border: 1px solid var(--line); border-radius: 12px; box-shadow: 0 12px 30px rgba(6, 20, 48, .12); margin-top: 4px; font: inherit; overflow: hidden; }
.ts-wrapper.field .ts-dropdown .option { padding: 9px 12px; font-size: 13.5px; }
.ts-wrapper.field .ts-dropdown .option.active { background: var(--bg-2); color: var(--ink); }
.ts-wrapper.field .ts-dropdown .option.selected { font-weight: 600; color: var(--blue); }
.ts-wrapper.field .ts-dropdown .no-results { padding: 10px 12px; color: var(--ink-3); font-size: 13px; }
.ts-wrapper.field .ts-dropdown .dropdown-input-wrap { padding: 8px; }
.ts-wrapper.field .ts-dropdown .dropdown-input { border: 1px solid var(--line); border-radius: 8px; padding: 8px 10px; font: inherit; width: 100%; }
.ts-wrapper.field.multi .ts-control > .item { background: var(--bg-2); color: var(--ink); border-radius: 999px; padding: 3px 8px 3px 10px; }
.ts-wrapper.field.multi .ts-control > .item .remove { border: 0; padding: 0 6px; }
.toolbar .ts-wrapper.field { flex: 0 0 auto; width: 260px; }
.tsize .ts-wrapper.field { min-width: 90px; display: inline-block; width: auto; }

/* Champ image (templates/admin/_image_field.html.twig, contrôleur image-field) : dépôt, aperçu, recadrage, retrait. */
.imgf { display: flex; flex-direction: column; gap: 8px; }
.imgf-zone { display: flex; gap: 14px; align-items: center; padding: 10px; border: 1.5px dashed var(--line); border-radius: 14px; background: #fff; cursor: pointer; text-align: left; transition: border-color .15s, background .15s, box-shadow .15s; }
.imgf-zone:hover, .imgf-zone:focus-visible { border-color: var(--blue); background: var(--bg); outline: none; }
.imgf.over .imgf-zone { border-style: solid; border-color: var(--blue); background: #E6EEF8; box-shadow: 0 0 0 4px rgba(3, 56, 132, .12); }
.imgf.fresh .imgf-zone { border-style: solid; border-color: var(--ok); }
.imgf-frame { position: relative; flex: none; display: grid; place-items: center; width: 84px; height: 84px; border-radius: 14px; background: var(--night); color: var(--paper-faint); overflow: hidden; }
.imgf.logo .imgf-frame { width: 128px; height: 76px; }
.imgf.icon .imgf-frame { border-radius: 22px; }
.imgf.visual .imgf-frame { width: 72px; height: 128px; border-radius: 10px; }
.imgf.photo .imgf-frame { width: 128px; height: 80px; border-radius: 10px; }
.imgf-frame img { width: 100%; height: 100%; object-fit: cover; }
.imgf.logo .imgf-frame img { object-fit: contain; padding: 8px; }
.imgf-empty { display: grid; place-items: center; }
.imgf.removed .imgf-frame { background: var(--bg-3); color: var(--ink-3); }
.imgf.removed .imgf-frame img { opacity: .18; filter: grayscale(1); }
.imgf-txt { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.imgf-txt b { font-size: 13.5px; color: var(--ink); }
.imgf-txt small { font-size: 12px; color: var(--ink-2); overflow-wrap: anywhere; }
.imgf-txt .imgf-hint { color: var(--ink-3); font-size: 11.5px; margin-top: 2px; }
.imgf.fresh .imgf-txt b { color: var(--ok); }
.imgf.removed .imgf-txt b { color: var(--ko); }
.imgf-bar { display: flex; flex-wrap: wrap; gap: 6px; }
.imgf-bar .btn.soft-danger { color: var(--ko); }
.imgf-bar .btn.soft-danger:hover { background: #FDEEEE; }
.imgf-status { font-size: 12.5px; border-radius: 10px; padding: 8px 10px; line-height: 1.4; }
.imgf-status.ok { background: #E8F6EF; color: #116B45; }
.imgf-status.warn { background: #FCF1DD; color: #7E5208; }
.imgf-status.ko { background: #FCE9E9; color: #972727; }
.imgf .err:empty { display: none; }
/* Fenêtre de recadrage */
.imgf-dialog { border: 0; padding: 0; border-radius: 20px; width: min(960px, 94vw); max-height: 92vh; background: #fff; color: var(--ink); box-shadow: 0 30px 80px var(--night-25); overflow: hidden; }
.imgf-dialog::backdrop { background: rgba(6, 20, 48, .62); backdrop-filter: blur(3px); }
.imgf-dh { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; padding: 16px 18px 12px; }
.imgf-dh h3 { font-size: 17px; font-weight: 800; }
.imgf-dh .hint { margin: 2px 0 0; display: block; }
.imgf-dh > button { font-size: 24px; line-height: 1; width: 34px; height: 34px; border-radius: 10px; color: var(--ink-3); }
.imgf-dh > button:hover { background: var(--bg); color: var(--ink); }
.imgf-dbody { display: grid; grid-template-columns: 1fr 200px; gap: 18px; padding: 0 18px; }
.imgf-stage { height: min(62vh, 560px); border-radius: 14px; overflow: hidden; background: var(--night); }
.imgf-stage.visual, .imgf-stage.photo { background: #1B2233; }
.imgf-stage img { display: block; max-width: 100%; }
.imgf-side { display: flex; flex-direction: column; }
.imgf-cp { display: grid; place-items: center; padding: 14px; border-radius: 14px; background: var(--night); }
.imgf-cp > div { overflow: hidden; width: 160px; height: 90px; border-radius: 6px; }
.imgf-cp.icon > div { width: 96px; height: 96px; border-radius: 24px; }
.imgf-cp.visual > div { width: 90px; height: 160px; border-radius: 10px; }
.imgf-cp.photo > div { width: 160px; height: 100px; border-radius: 8px; }
.imgf-df { display: flex; align-items: center; gap: 10px; padding: 14px 18px 18px; }
.imgf-tools { display: inline-flex; align-items: center; gap: 4px; }
.imgf-tools .btn { margin-left: 6px; }
.cropper-view-box, .cropper-face { border-radius: 0; }
.imgf-stage.icon .cropper-view-box { outline-color: var(--cyan); }
.cropper-view-box { outline: 1px solid var(--cyan); outline-color: rgba(0, 255, 255, .85); }
.cropper-line, .cropper-point { background-color: var(--cyan); }
@media (max-width: 760px) { .imgf-dbody { grid-template-columns: 1fr; } .imgf-side { display: none; } }

/* Fenêtre ouverte directement (admin/_modal_page.html.twig) : page autonome derrière la fenêtre. */
.modal-standalone { min-height: 100vh; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px; color: var(--ink-2); background: var(--bg); }

/* Documentation de l'API des statistiques (page à transmettre, imprimable) */
.api-doc { max-width: 920px; }
.api-doc .card { margin-bottom: 18px; }
.api-doc p { margin: 0 0 10px; line-height: 1.55; }
.api-doc ul { margin: 0 0 10px; padding-left: 20px; line-height: 1.55; }
.api-doc pre { background: var(--bg); border-radius: 10px; padding: 12px 14px; overflow-x: auto; font-size: 12.5px; line-height: 1.5; margin: 0 0 10px; white-space: pre; }
.api-doc code, .api-doc .mono { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 12.5px; }
.api-doc table.t td, .api-doc table.t th { vertical-align: top; }
/* Bac à sable de l'API des statistiques */
.sbx pre { white-space: pre-wrap; word-break: break-all; }
/* Détail d'un appel à l'API (page d'activité) */
.call-detail h4 { margin: 16px 0 8px; }
.call-detail pre { white-space: pre-wrap; word-break: break-all; }
.call-detail .call-body { flex: 1; max-height: 340px; overflow: auto; }
.call-detail .kvt th { width: 220px; font-weight: 500; color: var(--ink-3); font-size: 12px; text-transform: none; letter-spacing: 0; }
.call-detail .kvt td { font-size: 12px; word-break: break-all; }
.sbx .sbx-body { max-height: 520px; overflow: auto; white-space: pre; word-break: normal; }
.sbx .seg input { position: absolute; opacity: 0; width: 0; height: 0; }
@media print {
  .bo-side, .bo-top .act, .no-print { display: none !important; }
  .bo-main { margin: 0 !important; padding: 0 !important; }
  .api-doc .card { break-inside: avoid; box-shadow: none; border: 1px solid #ddd; }
  .api-doc pre { white-space: pre-wrap; }
}
