/* ============================================================
   JARVIS : pages fonctionnelles en HUD premium lisible.
   Même langage que l'accueil (verre, accents cyan et orange, coins techniques),
   avec moins de décor. Tout est scopé hors accueil.
   Tailles minimales : texte 14px, secondaire 12px, micro-label 10px.
   ============================================================ */

body:not(.cinematic-home-active) {
  --pg-glass: rgba(3, 14, 21, 0.62);
  --pg-glass-strong: rgba(3, 14, 21, 0.8);
  --pg-line: rgba(100, 225, 255, 0.24);
  --pg-line-strong: rgba(100, 225, 255, 0.45);
  --pg-cut: 12px;
}

/* ---------- Fond : paysage visible, contenu lisible ---------- */
body:not(.cinematic-home-active) .env__shade {
  background:
    linear-gradient(90deg, rgba(1, 6, 10, 0.5) 0%, rgba(1, 6, 10, 0.78) 22%, rgba(1, 6, 10, 0.78) 72%, rgba(1, 6, 10, 0.55) 100%),
    linear-gradient(180deg, rgba(1, 6, 10, 0.2), transparent 35%, rgba(1, 6, 10, 0.4));
}

/* ---------- Coque : barre, rail, panneau contextuel en verre ---------- */
body:not(.cinematic-home-active) .sysbar { background: rgba(2, 10, 16, 0.72); }
body:not(.cinematic-home-active) .rail { background: rgba(2, 10, 16, 0.55); }
body:not(.cinematic-home-active) .rail__item { font-size: 13px; }
body:not(.cinematic-home-active) .context { background: rgba(2, 10, 16, 0.6); }
body:not(.cinematic-home-active) .context::before { font-size: 10px; }
body:not(.cinematic-home-active) .ctx { padding: 12px 14px; margin-bottom: 8px; border: 1px solid rgba(100, 225, 255, 0.12); background: rgba(3, 14, 21, 0.5); }
body:not(.cinematic-home-active) .ctx__eyebrow { font-size: 10px; color: var(--cin-cyan-light); opacity: 0.8; }
body:not(.cinematic-home-active) .ctx__title { font-size: 14px; }
body:not(.cinematic-home-active) .ctx__sub, body:not(.cinematic-home-active) .ctx__next { font-size: 13px; }
body:not(.cinematic-home-active) .ctx__list { font-size: 12px; }
body:not(.cinematic-home-active) .ctx .step__title { font-size: 13px; }
body:not(.cinematic-home-active) .badge { font-size: 10px; }

/* ---------- Console compacte en haut des pages ---------- */
@media (min-width: 981px) {
  body:not(.cinematic-home-active) .stage { padding-top: 22px; }
  body:not(.cinematic-home-active) .stage .core { padding: 0 0 22px; column-gap: 14px; }
  body:not(.cinematic-home-active) .stage .core::before { display: none; }
  body:not(.cinematic-home-active) .stage .core__state { font-size: 11px; letter-spacing: 0.24em; color: var(--cin-cyan-light); }
  body:not(.cinematic-home-active) .stage .command { background: rgba(3, 14, 21, 0.66); border-color: var(--pg-line); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); }
}

/* ---------- En-tête de page HUD ---------- */
body:not(.cinematic-home-active) .vhead {
  position: relative; display: flex; align-items: flex-end; flex-wrap: wrap; gap: 18px 28px;
  padding: 4px 0 20px; margin-bottom: 22px;
  border-bottom: 1px solid rgba(100, 225, 255, 0.14);
}
body:not(.cinematic-home-active) .vhead::after { content: ""; position: absolute; left: 0; bottom: -1px; width: 120px; height: 2px; background: linear-gradient(90deg, var(--cin-cyan), var(--cin-orange)); box-shadow: 0 0 12px rgba(99, 231, 255, 0.5); }
body:not(.cinematic-home-active) .vhead__text { flex: 1 1 320px; min-width: 0; padding-left: 0; border-left: 0; }
body:not(.cinematic-home-active) .vhead__kicker { font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.32em; text-transform: uppercase; color: var(--cin-orange); margin-bottom: 6px; }
body:not(.cinematic-home-active) .vhead__title { font-family: var(--font-mono); font-size: clamp(30px, 2.6vw, 40px); font-weight: 500; letter-spacing: 0.2em; text-transform: uppercase; line-height: 1.1; color: #effdff; text-shadow: 0 0 24px rgba(99, 231, 255, 0.28); }
body:not(.cinematic-home-active) .vhead__sub { margin-top: 8px; font-family: var(--font-ui); font-size: 15px; letter-spacing: 0; line-height: 1.45; color: #a9c6d2; }
.vhead__stats { display: flex; gap: 10px; margin: 0; }
.vstat { position: relative; min-width: 104px; padding: 10px 14px 9px; background: var(--pg-glass); border: 1px solid var(--pg-line); clip-path: polygon(8px 0, 100% 0, 100% calc(100% - 8px), calc(100% - 8px) 100%, 0 100%, 0 8px); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); }
.vstat::before { content: ""; position: absolute; top: 0; left: 10px; width: 26px; height: 2px; background: var(--cin-cyan); box-shadow: 0 0 8px rgba(99, 231, 255, 0.6); }
.vstat dt { font-family: var(--font-mono); font-size: 10px; letter-spacing: 0.16em; text-transform: uppercase; color: #8fb6c4; }
.vstat dd { margin: 2px 0 0; font-family: var(--font-mono); font-size: 24px; font-weight: 500; line-height: 1.1; color: #f2fdff; }
.vstat--primary dd { color: var(--cin-cyan-light); }
.vstat--success dd { color: #8ff0c4; }
.vstat--warning::before { background: var(--cin-orange); box-shadow: 0 0 8px rgba(255, 106, 44, 0.6); } .vstat--warning dd { color: #ffc2a4; }
.vstat--danger::before { background: #ff5c6c; box-shadow: 0 0 8px rgba(255, 92, 108, 0.6); } .vstat--danger dd { color: #ff9aa5; }
.vhead__ctrl { align-self: flex-end; }
body:not(.cinematic-home-active) .section-title { font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.22em; color: var(--cin-cyan-light); margin: 26px 0 12px; }
body:not(.cinematic-home-active) .section-title::before { content: ""; display: inline-block; width: 14px; height: 1px; margin-right: 10px; vertical-align: middle; background: var(--cin-orange); }
body:not(.cinematic-home-active) .section-title .mono { font-size: 11px; }

/* ---------- Surface commune : verre, coins coupés, accents ---------- */
body:not(.cinematic-home-active) :is(.panel, .mcard, .tool, .mem, .pnode, .approval, .row, .empty) {
  position: relative;
  background: linear-gradient(150deg, rgba(99, 231, 255, 0.06), transparent 40%), var(--pg-glass);
  border: 1px solid var(--pg-line);
  border-radius: 0;
  clip-path: polygon(var(--pg-cut) 0, 100% 0, 100% calc(100% - var(--pg-cut)), calc(100% - var(--pg-cut)) 100%, 0 100%, 0 var(--pg-cut));
  backdrop-filter: blur(12px) saturate(130%); -webkit-backdrop-filter: blur(12px) saturate(130%);
  box-shadow: inset 0 0 30px rgba(40, 170, 230, 0.04), 0 16px 36px rgba(0, 0, 0, 0.22);
}
body:not(.cinematic-home-active) :is(.panel, .mcard, .tool, .mem, .pnode, .approval, .row)::after {
  content: ""; position: absolute; right: 0; bottom: 0; top: auto; left: auto; width: 22px; height: 2px; opacity: 1;
  background: var(--cin-orange); box-shadow: 0 0 8px rgba(255, 106, 44, 0.55); pointer-events: none;
}
body:not(.cinematic-home-active) .panel::before { content: ""; position: absolute; inset: 0 auto auto 16px; width: 56px; height: 2px; background: var(--cin-cyan); box-shadow: 0 0 10px rgba(99, 231, 255, 0.6); opacity: 1; }
body:not(.cinematic-home-active) .panel__head { border-bottom: 1px solid rgba(100, 225, 255, 0.1); padding-bottom: 10px; }
body:not(.cinematic-home-active) .panel__title { font-size: 16px; }
body:not(.cinematic-home-active) .panel__eyebrow { font-size: 11px; }
body:not(.cinematic-home-active) .empty { border-style: solid; color: #a9c6d2; font-size: 14px; }
body:not(.cinematic-home-active) :is(.mcard, .tool, .mem, .pnode):hover { border-color: var(--pg-line-strong); background: linear-gradient(150deg, rgba(99, 231, 255, 0.1), transparent 45%), var(--pg-glass-strong); }

/* ---------- Missions : dossiers holographiques ---------- */
body:not(.cinematic-home-active) .mgrid { grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 14px; }
body:not(.cinematic-home-active) .mcard { gap: 12px; padding: 16px 18px 14px; }
.mcard__body { display: flex; align-items: center; gap: 14px; }
.mcard__ring { --p: 0; --arc: var(--cin-cyan); position: relative; flex: none; width: 58px; height: 58px; border-radius: 50%; display: grid; place-items: center; background: conic-gradient(var(--arc) calc(var(--p) * 1turn), rgba(99, 231, 255, 0.1) 0); }
.mcard__ring::before { content: ""; position: absolute; inset: 4px; border-radius: 50%; background: rgba(2, 10, 16, 0.92); box-shadow: inset 0 0 12px rgba(99, 231, 255, 0.12); }
.mcard__ring::after { content: ""; position: absolute; inset: -5px; border-radius: 50%; background: repeating-conic-gradient(rgba(99, 231, 255, 0.45) 0 1deg, transparent 1deg 15deg); -webkit-mask: radial-gradient(circle, transparent 60%, #000 61% 64%, transparent 65%); mask: radial-gradient(circle, transparent 60%, #000 61% 64%, transparent 65%); }
.mcard__ring b { position: relative; font-family: var(--font-mono); font-size: 14px; font-weight: 500; color: #effdff; }
.mcard__ring small { font-size: 10px; color: var(--jarvis-text-muted); }
.mcard--success .mcard__ring { --arc: #3ddc97; }
.mcard--warning .mcard__ring { --arc: var(--cin-orange); }
.mcard--danger .mcard__ring { --arc: #ff5c6c; }
body:not(.cinematic-home-active) .mcard__title { font-size: 15px; line-height: 1.35; color: #f2fdff; }
body:not(.cinematic-home-active) .mcard__meta, body:not(.cinematic-home-active) .mcard__foot { font-size: 11px; color: #8fb6c4; }
body:not(.cinematic-home-active) .mcard .progress { display: none; }
body:not(.cinematic-home-active) .mcard--danger { border-color: rgba(255, 92, 108, 0.38); }
body:not(.cinematic-home-active) .mcard--warning { border-color: rgba(255, 106, 44, 0.42); }

/* Dossier ouvert : étapes en frise verticale */
body:not(.cinematic-home-active) .dossier__title { font-size: 20px; }
body:not(.cinematic-home-active) .dossier__objective { font-size: 15px; color: #a9c6d2; }
body:not(.cinematic-home-active) .dossier__meta, body:not(.cinematic-home-active) .label, body:not(.cinematic-home-active) .dossier__progress-row { font-size: 11px; }
body:not(.cinematic-home-active) .steps { position: relative; gap: 6px; padding-left: 14px; }
body:not(.cinematic-home-active) .steps::before { content: ""; position: absolute; left: 3px; top: 8px; bottom: 8px; width: 1px; background: linear-gradient(180deg, var(--cin-cyan), rgba(99, 231, 255, 0.1)); }
body:not(.cinematic-home-active) .step { position: relative; background: rgba(99, 231, 255, 0.03); }
body:not(.cinematic-home-active) .step::before { content: ""; position: absolute; left: -15px; top: 50%; width: 7px; height: 7px; margin-top: -3.5px; border-radius: 50%; background: #0b1a22; border: 1px solid rgba(99, 231, 255, 0.5); }
body:not(.cinematic-home-active) .step--success::before { background: #3ddc97; border-color: #3ddc97; box-shadow: 0 0 8px rgba(61, 220, 151, 0.6); }
body:not(.cinematic-home-active) .step--current::before { background: var(--cin-cyan); border-color: var(--cin-cyan); box-shadow: 0 0 10px var(--cin-cyan); }
body:not(.cinematic-home-active) .step--danger::before { background: #ff5c6c; border-color: #ff5c6c; }
body:not(.cinematic-home-active) .step--warning.step--current::before { background: var(--cin-orange); border-color: var(--cin-orange); box-shadow: 0 0 10px var(--cin-orange); }
body:not(.cinematic-home-active) .step__title { font-size: 14px; }
body:not(.cinematic-home-active) .step__action, body:not(.cinematic-home-active) .step__n { font-size: 11px; }

/* ---------- Validations : panneaux d'action nets ---------- */
body:not(.cinematic-home-active) .approval { padding: 0 0 18px; gap: 14px; border-color: rgba(255, 106, 44, 0.45); }
body:not(.cinematic-home-active) .approval::before { content: ""; position: absolute; inset: 0 0 auto 0; height: 3px; background: linear-gradient(90deg, var(--cin-orange), rgba(255, 106, 44, 0.15)); box-shadow: 0 0 14px rgba(255, 106, 44, 0.5); opacity: 1; }
body:not(.cinematic-home-active) .approval--high { border-color: rgba(255, 92, 108, 0.5); }
body:not(.cinematic-home-active) .approval--high::before { background: linear-gradient(90deg, #ff5c6c, rgba(255, 92, 108, 0.15)); box-shadow: 0 0 14px rgba(255, 92, 108, 0.5); }
body:not(.cinematic-home-active) .approval--low { border-color: var(--pg-line); }
body:not(.cinematic-home-active) .approval--low::before { background: linear-gradient(90deg, var(--cin-cyan), rgba(99, 231, 255, 0.15)); }
body:not(.cinematic-home-active) .approval > * { margin-left: 20px; margin-right: 20px; }
body:not(.cinematic-home-active) .approval__head { padding-top: 16px; }
body:not(.cinematic-home-active) .approval__risk { font-size: 12px; letter-spacing: 0.18em; }
body:not(.cinematic-home-active) .approval__when { font-size: 11px; }
body:not(.cinematic-home-active) .approval__title { font-size: 22px; color: #f2fdff; }
body:not(.cinematic-home-active) .approval__reason { font-size: 15px; color: #c7e3ec; }
body:not(.cinematic-home-active) .approval__facts { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
body:not(.cinematic-home-active) .approval__facts > div { padding: 10px 12px; background: rgba(99, 231, 255, 0.04); border-left: 2px solid rgba(99, 231, 255, 0.35); }
body:not(.cinematic-home-active) .approval__facts dt { font-size: 10px; }
body:not(.cinematic-home-active) .approval__facts dd { font-size: 14px; }
body:not(.cinematic-home-active) .approval__payload { font-size: 12px; background: rgba(1, 6, 10, 0.55); }
body:not(.cinematic-home-active) .approval__actions { gap: 12px; }
body:not(.cinematic-home-active) .approval__actions .btn { min-height: 44px; padding: 10px 20px; font-size: 13px; }

/* ---------- Outils : modules techniques ---------- */
body:not(.cinematic-home-active) .tgrid { grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 12px; }
body:not(.cinematic-home-active) .tool { padding: 14px 16px; gap: 14px; }
body:not(.cinematic-home-active) .tool__icon { position: relative; width: 44px; height: 44px; border-radius: 50%; font-size: 20px; background: rgba(99, 231, 255, 0.06); border: 1px solid rgba(99, 231, 255, 0.25); }
body:not(.cinematic-home-active) .tool__icon::after { content: ""; position: absolute; right: -1px; top: -1px; width: 9px; height: 9px; border-radius: 50%; background: var(--jarvis-text-dim); border: 2px solid #03101a; }
body:not(.cinematic-home-active) .tool--success .tool__icon::after { background: #3ddc97; box-shadow: 0 0 8px rgba(61, 220, 151, 0.7); }
body:not(.cinematic-home-active) .tool--warning .tool__icon::after { background: var(--cin-orange); box-shadow: 0 0 8px rgba(255, 106, 44, 0.7); }
body:not(.cinematic-home-active) .tool--danger .tool__icon::after { background: #ff5c6c; box-shadow: 0 0 8px rgba(255, 92, 108, 0.7); }
body:not(.cinematic-home-active) .tool__name { font-size: 15px; }
body:not(.cinematic-home-active) .tool__detail { font-size: 12px; color: #8fb6c4; }

/* ---------- Mémoire : fragments reliés ---------- */
body:not(.cinematic-home-active) .memgrid { grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 14px; }
body:not(.cinematic-home-active) .mem { padding: 14px 16px 14px 20px; border-left-width: 1px; }
body:not(.cinematic-home-active) .mem::before { content: ""; position: absolute; left: 0; top: 14px; bottom: 14px; width: 3px; background: var(--kind, rgba(99, 231, 255, 0.4)); box-shadow: 0 0 10px var(--kind, rgba(99, 231, 255, 0.4)); opacity: 1; }
body:not(.cinematic-home-active) .mem--primary { --kind: var(--cin-cyan); }
body:not(.cinematic-home-active) .mem--mind { --kind: #9d8cff; }
body:not(.cinematic-home-active) .mem--success { --kind: #3ddc97; }
body:not(.cinematic-home-active) .mem--warning { --kind: var(--cin-orange); }
body:not(.cinematic-home-active) .mem__kind { font-size: 10px; letter-spacing: 0.18em; text-transform: uppercase; color: var(--kind, var(--cin-cyan-light)); }
body:not(.cinematic-home-active) .mem__when { font-size: 11px; }
body:not(.cinematic-home-active) .mem__title { font-size: 15px; color: #f2fdff; }
body:not(.cinematic-home-active) .mem__text { font-size: 14px; line-height: 1.5; color: #a9c6d2; }
body:not(.cinematic-home-active) .memfilters .chip { font-size: 12px; }

/* ---------- Projets : secteurs ---------- */
body:not(.cinematic-home-active) .pgrid { grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 14px; }
body:not(.cinematic-home-active) .pnode { padding: 16px 18px; }
body:not(.cinematic-home-active) .pnode::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 2px; background: linear-gradient(90deg, var(--sector, rgba(99, 231, 255, 0.35)), transparent 70%); opacity: 1; }
body:not(.cinematic-home-active) .pnode--primary { --sector: var(--cin-cyan); }
body:not(.cinematic-home-active) .pnode--warning { --sector: var(--cin-orange); }
body:not(.cinematic-home-active) .pnode--danger { --sector: #ff5c6c; }
body:not(.cinematic-home-active) .pnode--success { --sector: #3ddc97; }
body:not(.cinematic-home-active) .pnode__name { font-size: 18px; color: #f2fdff; }
body:not(.cinematic-home-active) .pnode__focus { font-size: 14px; color: #a9c6d2; }
body:not(.cinematic-home-active) .pnode__facts dt { font-size: 10px; }
body:not(.cinematic-home-active) .pnode__facts dd { font-size: 14px; }

/* ---------- Sessions, Daily, Journal ---------- */
body:not(.cinematic-home-active) .row { padding: 14px 16px; }
body:not(.cinematic-home-active) .row__title { font-size: 16px; }
body:not(.cinematic-home-active) .row__text, body:not(.cinematic-home-active) .row__next { font-size: 14px; }
body:not(.cinematic-home-active) .row__meta { font-size: 11px; }
body:not(.cinematic-home-active) .daily__title { font-size: 24px; }
body:not(.cinematic-home-active) .daily__priority { font-size: 15px; color: #c7e3ec; }
body:not(.cinematic-home-active) .tl__row { padding: 9px 10px; }
body:not(.cinematic-home-active) .tl__row:hover { background: rgba(99, 231, 255, 0.05); }
body:not(.cinematic-home-active) .tl__time { font-size: 12px; color: #8fb6c4; }
body:not(.cinematic-home-active) .tl__label { font-size: 14px; color: #e6faff; }
body:not(.cinematic-home-active) .tl__sub { font-size: 12px; }

/* ---------- Réglages : console sobre ---------- */
body:not(.cinematic-home-active) .facts dt { font-size: 10px; }
body:not(.cinematic-home-active) .facts dd { font-size: 15px; font-family: var(--font-mono); }
body:not(.cinematic-home-active) .switch { font-size: 14px; }

/* ---------- Listes déroulantes ---------- */
body:not(.cinematic-home-active) .dd__btn { font-size: 13px; padding: 9px 14px; background: var(--pg-glass); border-color: var(--pg-line); border-radius: 0; }
body:not(.cinematic-home-active) .dd__opt { font-size: 14px; }

/* ---------- Mobile ---------- */
@media (max-width: 980px) {
  body:not(.cinematic-home-active) .vhead { gap: 14px; }
  .vhead__stats { width: 100%; }
  .vstat { flex: 1; min-width: 0; }
  body:not(.cinematic-home-active) .vhead__title { font-size: 26px; letter-spacing: 0.14em; }
  body:not(.cinematic-home-active) .approval__facts { grid-template-columns: 1fr 1fr; }
  body:not(.cinematic-home-active) :is(.mgrid, .pgrid, .memgrid, .tgrid) { grid-template-columns: 1fr; }
}

/* ---------- Correctifs relevés en revue ---------- */
/* Trait vertical hérité qui traversait le repère de section */
body:not(.cinematic-home-active) .vhead::before { display: none; }
/* Étapes compactes du panneau de droite : le badge passe sous le titre au lieu de l'écraser */
body:not(.cinematic-home-active) .steps--compact .step { grid-template-columns: 22px minmax(0, 1fr); row-gap: 4px; }
body:not(.cinematic-home-active) .steps--compact .step .badge { grid-column: 2; justify-self: start; }
