/*
Theme Name: BrainOps
Theme URI: https://brainops.tech
Author: BrainOps
Description: Site de BrainOps, le jumeau numérique du SI. Page d'accueil fixe, pages simples (mentions légales) dans la même identité. Polices servies par le thème, sans appel à un service tiers.
Version: 1.1.0
Requires at least: 6.0
Tested up to: 6.8
Requires PHP: 7.4
Text Domain: brainops
*/

@font-face {
  font-family: 'Archivo';
  font-style: normal;
  font-weight: 600;
  font-stretch: 112%;
  font-display: swap;
  src: url(assets/fonts/archivo-600-latin-ext.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Archivo';
  font-style: normal;
  font-weight: 600;
  font-stretch: 112%;
  font-display: swap;
  src: url(assets/fonts/archivo-600-latin.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Archivo';
  font-style: normal;
  font-weight: 800;
  font-stretch: 112%;
  font-display: swap;
  src: url(assets/fonts/archivo-800-latin-ext.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Archivo';
  font-style: normal;
  font-weight: 800;
  font-stretch: 112%;
  font-display: swap;
  src: url(assets/fonts/archivo-800-latin.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'IBM Plex Mono';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url(assets/fonts/ibm-plex-mono-400-latin-ext.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'IBM Plex Mono';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url(assets/fonts/ibm-plex-mono-400-latin.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'IBM Plex Mono';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url(assets/fonts/ibm-plex-mono-500-latin-ext.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'IBM Plex Mono';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url(assets/fonts/ibm-plex-mono-500-latin.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'IBM Plex Sans';
  font-style: normal;
  font-weight: 400;
  font-stretch: 100%;
  font-display: swap;
  src: url(assets/fonts/ibm-plex-sans-400-latin-ext.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'IBM Plex Sans';
  font-style: normal;
  font-weight: 400;
  font-stretch: 100%;
  font-display: swap;
  src: url(assets/fonts/ibm-plex-sans-400-latin.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'IBM Plex Sans';
  font-style: normal;
  font-weight: 500;
  font-stretch: 100%;
  font-display: swap;
  src: url(assets/fonts/ibm-plex-sans-500-latin-ext.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'IBM Plex Sans';
  font-style: normal;
  font-weight: 500;
  font-stretch: 100%;
  font-display: swap;
  src: url(assets/fonts/ibm-plex-sans-500-latin.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'IBM Plex Sans';
  font-style: normal;
  font-weight: 600;
  font-stretch: 100%;
  font-display: swap;
  src: url(assets/fonts/ibm-plex-sans-600-latin-ext.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'IBM Plex Sans';
  font-style: normal;
  font-weight: 600;
  font-stretch: 100%;
  font-display: swap;
  src: url(assets/fonts/ibm-plex-sans-600-latin.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* Mise en page : une colonne éditoriale, chaque section part d'une question d'exploitation
   et y répond par une preuve (le chemin d'une panne, les couches, les écrans). */
:root {
  --bg: #0B1218;
  --surface: #121C24;
  --surface-2: #18252F;
  --ink: #E4EBF0;
  --muted: #94A3AF;
  --line: #22313C;
  --accent: #6DB6D1;
  --accent-ink: #0B1218;
  --crit: #EE7D7D;
  --warn: #E0A84E;
  --l1: #9AA8B5; --l2: #74B7C6; --l3: #7AB0E6; --l4: #A99BEA; --l5: #DE95B8; --l6: #D2B072;
  --f-display: "Archivo", "Arial Narrow", system-ui, sans-serif;
  --f-body: "IBM Plex Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --f-mono: "IBM Plex Mono", ui-monospace, Consolas, monospace;
  color-scheme: dark;
}
@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) {
    --bg: #F3F5F7; --surface: #FFFFFF; --surface-2: #E9EEF2; --ink: #14202A; --muted: #55636F;
    --line: #D3DBE2; --accent: #1B6582; --accent-ink: #FFFFFF; --crit: #B23A3A; --warn: #A86A12;
    --l1: #5B6B7A; --l2: #3F7F8F; --l3: #2D6FAE; --l4: #6A5BB0; --l5: #A2577C; --l6: #8A6A2E;
    color-scheme: light;
  }
}
:root[data-theme="light"] {
  --bg: #F3F5F7; --surface: #FFFFFF; --surface-2: #E9EEF2; --ink: #14202A; --muted: #55636F;
  --line: #D3DBE2; --accent: #1B6582; --accent-ink: #FFFFFF; --crit: #B23A3A; --warn: #A86A12;
  --l1: #5B6B7A; --l2: #3F7F8F; --l3: #2D6FAE; --l4: #6A5BB0; --l5: #A2577C; --l6: #8A6A2E;
  color-scheme: light;
}

* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 17px/1.6 var(--f-body); }
.wrap { max-width: 1120px; margin: 0 auto; padding-inline: 24px; }
@media (max-width: 600px) { .wrap { padding-inline: 16px; } body { font-size: 16px; } }

h1, h2, h3 { font-family: var(--f-display); font-stretch: 112%; text-wrap: balance; margin: 0; letter-spacing: -0.01em; }
h1 { font-size: clamp(2.2rem, 5.4vw, 4rem); line-height: 1.04; font-weight: 800; }
h2 { font-size: clamp(1.6rem, 3.4vw, 2.4rem); line-height: 1.1; font-weight: 800; }
h3 { font-size: 1.15rem; font-weight: 600; line-height: 1.25; }
p { margin: 0; }
.lede { color: var(--muted); font-size: 1.1rem; max-width: 62ch; }
.eyebrow { font-family: var(--f-mono); font-size: .78rem; letter-spacing: .12em; text-transform: uppercase; color: var(--accent); }
a { color: var(--accent); }
a:focus-visible, button:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 4px; }
img { display: block; max-width: 100%; height: auto; }
.red { color: var(--crit); }

/* En-tête */
header.top { position: sticky; top: env(safe-area-inset-top, 0px); z-index: 10; background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
.top .wrap { display: flex; align-items: center; gap: 24px; padding-block: 14px; }
.logo { height: 30px; width: auto; }
.logo-light { display: none; }
@media (prefers-color-scheme: light) { :root:not([data-theme="dark"]) .logo-light { display: block; } :root:not([data-theme="dark"]) .logo-dark { display: none; } }
:root[data-theme="light"] .logo-light { display: block; } :root[data-theme="light"] .logo-dark { display: none; }
nav.links { display: flex; gap: 22px; margin-left: auto; font-size: .95rem; }
nav.links a { color: var(--muted); text-decoration: none; }
nav.links a:hover { color: var(--ink); }
.btn { display: inline-flex; align-items: center; gap: 8px; padding: 11px 18px; border-radius: 6px; font: 600 .95rem/1 var(--f-body);
  text-decoration: none; border: 1px solid var(--accent); cursor: pointer; }
.btn.primary { background: var(--accent); color: var(--accent-ink); }
.btn.ghost { background: transparent; color: var(--ink); border-color: var(--line); }
.btn.primary:hover { filter: brightness(1.08); }
@media (max-width: 760px) { nav.links { display: none; } .top .btn { margin-left: auto; } }

section { padding-block: clamp(56px, 9vw, 104px); border-bottom: 1px solid var(--line); }
.section-head { display: grid; gap: 14px; margin-bottom: 40px; max-width: 760px; }

/* Héros : la question d'abord, l'image du jumeau ensuite */
.hero { padding-block: clamp(48px, 8vw, 88px) clamp(40px, 6vw, 72px); }
.hero-grid { display: grid; gap: 40px; }
.hero h1 .red { white-space: nowrap; }
.hero .lede { margin-top: 20px; }
.hero .actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 30px; }
.hero figure { margin: 0; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
.proof { display: flex; flex-wrap: wrap; gap: 10px 28px; margin-top: 28px; font-family: var(--f-mono); font-size: .82rem; color: var(--muted); }
.proof b { color: var(--ink); font-weight: 500; }

/* Problème : quatre outils, quatre angles morts */
.silos { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
.silo { background: var(--surface); padding: 22px; display: grid; gap: 8px; align-content: start; }
.silo .knows { font-family: var(--f-mono); font-size: .8rem; color: var(--muted); }
.silo p { color: var(--muted); font-size: .95rem; }
.silo .gap { color: var(--ink); }

/* Exemple : la panne racontée étape par étape */
.case { display: grid; gap: 36px; }
.case figure { margin: 0; border-radius: 10px; overflow: hidden; border: 1px solid var(--line); }
.steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 0; counter-reset: step; }
.steps li { display: grid; grid-template-columns: 2.4rem minmax(0, 1fr); gap: 14px; padding: 14px 0; border-top: 1px solid var(--line); counter-increment: step; }
.steps li::before { content: counter(step); font-family: var(--f-mono); color: var(--crit); font-size: .9rem; padding-top: 2px; }
.steps li.degraded::before { color: var(--warn); }
.steps b { font-weight: 600; }
.steps span { color: var(--muted); }
.footnote { margin-top: 18px; font-size: .9rem; color: var(--muted); }

/* Six couches : la signature visuelle, de L1 à L6 */
.layers { display: grid; gap: 8px; }
.layer { display: grid; grid-template-columns: 4.2rem minmax(0, 13rem) minmax(0, 1fr); gap: 18px; align-items: baseline;
  padding: 14px 18px; background: var(--surface); border-radius: 8px; border-left: 4px solid var(--c); }
.layer .code { font-family: var(--f-mono); font-weight: 500; color: var(--c); }
.layer h3 { font-size: 1rem; }
.layer p { color: var(--muted); font-size: .95rem; }
@media (max-width: 720px) { .layer { grid-template-columns: 3.2rem minmax(0, 1fr); } .layer p { grid-column: 2; } }

/* Écrans */
.screens { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 28px 40px; }
.screen { display: grid; gap: 8px; align-content: start; padding-top: 18px; border-top: 2px solid var(--line); }
.screen p { color: var(--muted); font-size: .97rem; }

/* SAP */
.split { display: grid; gap: 40px; align-items: start; }
@media (min-width: 900px) { .split { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); } }
.jobs { border: 1px solid var(--line); border-radius: 10px; overflow: hidden; background: var(--surface); }
.jobs .row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 6px 14px; padding: 14px 18px; border-top: 1px solid var(--line); }
.jobs .row:first-child { border-top: 0; }
.jobs .name { font-family: var(--f-mono); font-size: .88rem; overflow-wrap: anywhere; }
.jobs .detail { grid-column: 1 / -1; color: var(--muted); font-size: .9rem; }
.pill { font-family: var(--f-mono); font-size: .72rem; padding: 2px 9px; border-radius: 99px; border: 1px solid currentColor; white-space: nowrap; align-self: center; }
.pill.crit { color: var(--crit); } .pill.warn { color: var(--warn); } .pill.ok { color: var(--accent); }
.jobs-caption { font-family: var(--f-mono); font-size: .76rem; color: var(--muted); padding: 10px 18px; background: var(--surface-2); }
.checks { list-style: none; padding: 0; margin: 22px 0 0; display: grid; gap: 12px; }
.checks li { padding-left: 22px; position: relative; color: var(--muted); }
.checks li::before { content: ""; position: absolute; left: 0; top: .62em; width: 10px; height: 2px; background: var(--accent); }
.checks b { color: var(--ink); font-weight: 600; }

/* Confiance */
.trust { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 24px 36px; margin-top: 40px; }
.trust div { display: grid; gap: 6px; }
.trust p { color: var(--muted); font-size: .95rem; }
.wide-figure { margin: 0; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }

/* Vigil */
.ranking { border: 1px solid var(--line); border-radius: 10px; background: var(--surface); overflow-x: auto; }
.ranking table { width: 100%; border-collapse: collapse; font-size: .92rem; min-width: 560px; }
.ranking th, .ranking td { text-align: left; padding: 12px 16px; border-top: 1px solid var(--line); vertical-align: top; }
.ranking th { font-family: var(--f-mono); font-weight: 500; font-size: .74rem; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); border-top: 0; }
.ranking td.num { font-family: var(--f-mono); font-variant-numeric: tabular-nums; white-space: nowrap; }
.ranking tr.top td { color: var(--ink); }
.ranking td span { color: var(--muted); }

/* Pour qui */
.audiences { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 24px 32px; }
.audiences div { display: grid; gap: 6px; }
.audiences p { color: var(--muted); font-size: .95rem; }

/* Pilote */
.pilot { border-bottom: 0; }
.pilot-box { display: grid; gap: 22px; padding: clamp(28px, 5vw, 48px); border-radius: 12px; background: var(--surface); border: 1px solid var(--line); }
.pilot-box ul { margin: 0; padding-left: 20px; color: var(--muted); display: grid; gap: 6px; }
.pilot-box .contact { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 18px; color: var(--muted); }
.pilot-box .email { color: var(--ink); font-family: var(--f-mono); font-weight: 500; user-select: all; }
.status { font-size: .95rem; color: var(--muted); max-width: 70ch; }

footer { padding-block: 32px; color: var(--muted); font-size: .85rem; }
footer .wrap { display: flex; flex-wrap: wrap; gap: 12px 24px; justify-content: space-between; }

@media (prefers-reduced-motion: no-preference) {
  .hero h1, .hero .lede, .hero .actions { animation: rise .6s ease-out both; }
  .hero .lede { animation-delay: .08s; } .hero .actions { animation-delay: .16s; }
  @keyframes rise { from { transform: translateY(8px); } to { transform: none; } }
}

/* Pages ordinaires : mentions légales et autres pages écrites dans WordPress */
.page-content { max-width: 760px; margin: 0 auto; padding-block: 56px 88px; display: grid; gap: 22px; }
.page-content h1 { font-size: clamp(2rem, 4vw, 2.6rem); }
.page-content h2 { font-size: 1.3rem; margin-top: 18px; }
.page-content p, .page-content li { color: var(--muted); }
.page-content strong, .page-content b { color: var(--ink); }
.page-content .entry > * + * { margin-top: 14px; }
footer a { color: var(--muted); }
/* Barre d'administration, visible quand on est connecté */
.admin-bar header.top { top: 32px; }
@media (max-width: 782px) { .admin-bar header.top { top: 46px; } }
