/* Vigie · feuille commune : back office, espace partenaires, Mon espace, pages publiques.
   Identité : l'écran d'appel du téléphone. Encre pour le texte, vert « décrocher » pour ce qui est sûr,
   rouge « raccrocher » pour l'alerte, ambre pour le doute. Police Atkinson Hyperlegible Next
   (Braille Institute), dessinée pour les lecteurs malvoyants : le public de Vigie. */
@font-face { font-family: "Atkinson Next"; src: url("/assets/fonts/atkinson-hyperlegible-next-latin-wght-normal.woff2") format("woff2"); font-weight: 200 800; font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD }
@font-face { font-family: "Atkinson Next"; src: url("/assets/fonts/atkinson-hyperlegible-next-latin-ext-wght-normal.woff2") format("woff2"); font-weight: 200 800; font-display: swap;
  unicode-range: U+0100-02AF, U+0304, U+0308, U+0329, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF }
:root {
  color-scheme: light;
  --ink: #0F2236; --ink-2: #3B4E63; --muted: #5B6C7E; --line: #D9E1E8; --line-2: #E8EDF2;
  --paper: #F4F6F8; --card: #FFFFFF;
  --green: #0B7A5A; --green-ink: #08573F; --green-soft: #E3F2EC;
  --danger: #C0392B; --danger-soft: #FBEAE8; --warn: #8A5A0E; --warn-soft: #FBF1DE;
  --on-green: #FFFFFF; --side-bg: #0F2236; --side-ink: #C9D5E1; --side-dim: #8195AA;
  /* compatibilité avec les anciens noms */
  --navy: var(--ink); --shell: var(--paper);
  --r-ctl: 8px; --r-panel: 10px; --side: 248px; --radius: 10px; --shadow: none;
  --font: "Atkinson Next", "Atkinson Hyperlegible", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}
* { box-sizing: border-box }
html { -webkit-text-size-adjust: 100% }
body { margin: 0; background: var(--paper); color: var(--ink); font: 15px/1.55 var(--font); font-variant-numeric: tabular-nums }
a { color: var(--green-ink); text-underline-offset: 3px; text-decoration-thickness: 1px }
a:hover { color: var(--ink) }
.ico { flex: none; vertical-align: middle }
[hidden] { display: none !important }
:focus-visible { outline: 3px solid #2F6FD6; outline-offset: 2px }

/* ---------- Structure du back office : menu sombre à gauche, barre de titre, contenu ---------- */
.shell { display: grid; grid-template-columns: var(--side) 1fr; min-height: 100vh }
.side { position: sticky; top: 0; height: 100vh; overflow-y: auto; background: var(--side-bg); color: var(--side-ink); padding: 18px 12px 16px; display: flex; flex-direction: column }
.side-top { display: flex; align-items: center; justify-content: space-between; padding: 2px 8px 22px }
.brand { display: flex; align-items: center; gap: 10px; color: inherit; text-decoration: none }
.brand b { display: block; font-size: 18px; font-weight: 800; letter-spacing: .02em; line-height: 1.1 }
.brand small { display: block; font-size: 12.5px; color: inherit }
.brand-mark { width: 34px; height: 34px; border-radius: 9px; display: grid; place-items: center; background: var(--green); color: #fff }
.side .brand { color: #fff }
.menu-btn, .menu-toggle { display: none }
.nav { display: flex; flex-direction: column; gap: 1px; flex: 1 }
.nav-group { margin-bottom: 14px }
.nav-group p { margin: 0 10px 4px; font-size: 12.5px; font-weight: 600; color: var(--side-dim) }
.nav a { display: flex; align-items: center; gap: 11px; padding: 7px 10px; border-radius: 7px; color: var(--side-ink); text-decoration: none; font-size: 14.5px }
.nav a .ico { color: var(--side-dim); width: 18px; height: 18px }
.nav a:hover { background: rgba(255,255,255,.06); color: #fff }
.nav a.active { background: rgba(255,255,255,.10); color: #fff; font-weight: 700; box-shadow: inset 3px 0 0 #3FC59A }
.nav a.active .ico { color: #3FC59A }
.main { min-width: 0; display: flex; flex-direction: column }
.topbar { position: sticky; top: 0; z-index: 5; display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 14px clamp(16px, 3vw, 36px); background: rgba(244,246,248,.94); backdrop-filter: blur(6px); border-bottom: 1px solid var(--line) }
.topbar .crumb { color: var(--muted); font-size: 14px }
.topbar .crumb b { color: var(--ink); font-weight: 700 }
.me { display: flex; align-items: center; gap: 10px }
.me form { margin: 0 }
.avatar { width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; background: var(--ink); color: #fff; font-weight: 700; font-size: 12.5px }
.me-text { display: flex; flex-direction: column; line-height: 1.25; text-align: right }
.me-text b { font-size: 14px } .me-text small { color: var(--muted); font-size: 12.5px }
.content { padding: 28px clamp(16px, 3vw, 36px) 72px; max-width: 1320px; width: 100% }
.page-head { margin-bottom: 22px; padding-bottom: 18px; border-bottom: 1px solid var(--line) }
h1 { font-size: 27px; line-height: 1.2; letter-spacing: -.01em; margin: 0; font-weight: 800 }
.lead { color: var(--ink-2); margin: 6px 0 0; max-width: 72ch; font-size: 15.5px }
h2 { font-size: 18px; margin: 34px 0 12px; font-weight: 700 }
h3 { font-size: 16px; margin: 0 0 8px }
.content > p, .card > p { max-width: 80ch }

/* ---------- Panneaux et chiffres clés ---------- */
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--r-panel); padding: 20px 22px; margin: 14px 0 }
.card > h2:first-child { margin-top: 0 }
.warn-card { background: var(--warn-soft); border-color: #EBD3A6; color: var(--warn) }
.warn-card h2 { display: flex; align-items: center; gap: 8px; color: var(--warn); font-size: 16px }
.warn-card code { background: rgba(0,0,0,.06) }
.narrow { max-width: 460px }
/* Chiffres clés : un relevé d'une seule pièce, séparé par des filets, comme un bilan. */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 0; background: var(--card); border: 1px solid var(--line); border-radius: var(--r-panel); overflow: hidden; margin: 4px 0 8px }
.stat { display: flex; flex-direction: column; gap: 2px; background: var(--card); padding: 16px 18px 15px; color: var(--ink); text-decoration: none; box-shadow: 1px 0 0 var(--line-2), 0 1px 0 var(--line-2) }
.stat .ico { display: none }
a.stat:hover { background: #FAFCFD; color: var(--ink) }
a.stat:hover span:last-child { color: var(--green-ink); text-decoration: underline }
.stat span:last-child { color: var(--muted); font-size: 13.5px; line-height: 1.35 }
.stat.alert { box-shadow: inset 0 3px 0 #D99A2B, 1px 0 0 var(--line-2), 0 1px 0 var(--line-2) }
.stat.alert .big { color: var(--warn) }
.big { font-size: 30px; font-weight: 800; line-height: 1.1; letter-spacing: -.015em }

/* ---------- Tableaux : denses, lisibles, sans décor ---------- */
table { width: 100%; border-collapse: separate; border-spacing: 0; background: var(--card); border: 1px solid var(--line); border-radius: var(--r-panel); overflow: hidden; font-size: 14.5px }
th, td { text-align: left; padding: 10px 14px; border-bottom: 1px solid var(--line-2); vertical-align: middle }
tbody tr:last-child td { border-bottom: 0 }
th { background: #F8FAFB; color: var(--muted); font-weight: 700; font-size: 13px; border-bottom: 1px solid var(--line) }
tbody tr:hover td { background: #F7FAF9 }
td.r, th.r { text-align: right } .nowrap { white-space: nowrap }
tr.off td { color: var(--muted) }
td form { margin: 0 }
td form:has(select) { display: flex; gap: 6px; align-items: center }
td form select { width: auto; min-width: 130px }

/* ---------- Formulaires et boutons ---------- */
label { display: flex; flex-direction: column; gap: 6px; font-weight: 700; font-size: 13.5px; color: var(--ink) }
.row-form > label { flex: 1 1 200px }
label.check { flex-direction: row; align-items: center; gap: 9px; flex: 0 0 auto; font-weight: 400; font-size: 14.5px }
input, select, textarea { font: inherit; font-weight: 400; color: var(--ink); padding: 9px 12px; border: 1px solid #C3CED9; border-radius: var(--r-ctl); background: var(--card); min-height: 42px; width: 100% }
input[type=checkbox] { width: 18px; height: 18px; min-height: 0; accent-color: var(--green) }
input:focus, select:focus, textarea:focus { border-color: var(--green); outline: 3px solid rgba(11,122,90,.18); outline-offset: 0 }
button { font: inherit; font-weight: 700; font-size: 14px; padding: 8px 15px; border-radius: var(--r-ctl); border: 1px solid #C3CED9; background: var(--card); color: var(--ink); cursor: pointer; min-height: 40px }
button:hover { background: var(--paper) }
button.primary { background: var(--green); border-color: var(--green); color: var(--on-green) }
button.primary:hover { background: var(--green-ink); border-color: var(--green-ink) }
button.ghost, button.link { border: 0; background: none; color: var(--muted); padding: 6px 8px; min-height: 0; font-weight: 600 }
button.ghost:hover, button.link:hover { color: var(--danger); background: none }
.row-form { display: flex; flex-wrap: wrap; gap: 14px; align-items: flex-end }
.row-form > button { flex: 0 0 auto }
.stacked { display: flex; flex-direction: column; gap: 14px; margin-top: 8px }
.stacked > button { align-self: flex-start }
.actions { display: flex; flex-wrap: wrap; gap: 6px; align-items: center }
.actions form { margin: 0 } .inline { display: inline }
details { margin-top: 6px }
details summary { cursor: pointer; color: var(--green-ink); font-weight: 700; padding: 6px 0 }
fieldset { border: 1px solid var(--line); border-radius: var(--r-panel); padding: 12px 14px }

/* ---------- Statuts : un point de couleur et un mot, comme sur un tableau de contrôle ---------- */
.pill { display: inline-flex; align-items: center; gap: 7px; padding: 0; border: 0; background: none; font-size: 13.5px; font-weight: 700; white-space: nowrap; color: var(--ink-2) }
.pill::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: #9AA9B8; flex: none }
.pill.ok { color: var(--green-ink) } .pill.ok::before { background: var(--green) }
.pill.warn { color: var(--warn) } .pill.warn::before { background: #D99A2B }
.pill.mid { color: var(--danger) } .pill.mid::before { background: var(--danger) }
.flash { display: flex; align-items: center; gap: 10px; background: var(--green-soft); color: var(--green-ink); padding: 11px 16px; border-radius: var(--r-panel); font-weight: 700; margin: 0 0 18px; overflow-wrap: anywhere; border: 1px solid #BFE0D3 }
.error { background: var(--danger-soft); color: var(--danger); padding: 11px 16px; border-radius: var(--r-panel); font-weight: 700; border: 1px solid #F0C3BD }
.hint { color: var(--muted); font-size: 13.5px; font-weight: 400 }
code { font: 12.5px/1.4 ui-monospace, "SF Mono", Menlo, Consolas, monospace; background: var(--line-2); padding: 2px 6px; border-radius: 5px; overflow-wrap: anywhere }
.qr { display: flex; justify-content: center; margin: 16px 0; padding: 16px; background: #fff; border-radius: var(--r-panel); border: 1px solid var(--line) } .qr svg { max-width: 100%; height: auto }
.codes { columns: 2; font: 16px/1.6 ui-monospace, Menlo, Consolas, monospace; padding-left: 20px } .codes li { margin: 4px 0 }
.bar { display: inline-block; height: 10px; border-radius: 3px; background: var(--green); margin-right: 8px; vertical-align: middle }

/* ---------- Connexion : panneau d'identité à gauche, formulaire à droite ---------- */
body.auth { min-height: 100vh; background: var(--paper) }
.auth-main { min-height: 100vh; display: grid; grid-template-columns: minmax(320px, 5fr) 7fr }
.auth-side { background: var(--side-bg); color: #DCE5EE; padding: 40px clamp(28px, 4vw, 56px); display: flex; flex-direction: column; justify-content: space-between }
.auth-side .brand { color: #fff }
.auth-side h2 { color: #fff; font-size: 26px; line-height: 1.25; margin: 0 0 12px; max-width: 18ch }
.auth-side p { margin: 0; max-width: 40ch; color: #B8C7D6 }
.auth-side small { color: var(--side-dim) }
.auth-form { display: flex; align-items: center; justify-content: center; padding: 40px 20px }
.auth-card { width: 100%; max-width: 400px }
.auth-card h1 { font-size: 26px; margin-bottom: 4px }
.auth-card .card { border: 0; padding: 0; margin: 18px 0 0; max-width: none; background: none }
.auth-card form { display: flex; flex-direction: column; gap: 14px; margin-top: 22px }
.auth-card form button.primary { min-height: 46px; margin-top: 4px; font-size: 15px }
.auth-foot { color: var(--muted); font-size: 13px; margin-top: 24px }

/* ---------- Petits écrans : menu repliable sans script ---------- */
@media (max-width: 920px) {
  .shell { grid-template-columns: 1fr }
  .side { position: sticky; z-index: 10; height: auto; padding: 10px 14px }
  .side-top { padding: 0 }
  .menu-btn { display: inline-flex; flex-direction: column; gap: 4px; padding: 10px; cursor: pointer; border-radius: 8px }
  .menu-btn span { width: 20px; height: 2px; background: #fff; border-radius: 2px }
  .nav { display: none; padding-top: 12px }
  .menu-toggle:checked + .nav { display: flex }
  .topbar { position: static }
  .me-text { display: none }
  table { display: block; overflow-x: auto }
  .auth-main { grid-template-columns: 1fr } .auth-side { padding: 22px; gap: 14px } .auth-side h2 { font-size: 20px }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important } }

/* ---------- Page d'état des services ---------- */
body.status { background: var(--shell) }
.st-top { max-width: 920px; margin: 0 auto; padding: 28px 20px 8px }
.st-main { max-width: 920px; margin: 0 auto; padding: 8px 20px 64px; display: flex; flex-direction: column; gap: 18px }
.st-banner { display: flex; gap: 16px; align-items: center; padding: 22px 24px; border-radius: 20px; background: var(--green-soft); color: var(--green-ink) }
.st-banner h1 { font-size: 22px; color: inherit }
.st-banner p { margin: 4px 0 0; font-size: 14px }
.st-banner.st-perturbe, .st-banner.st-maintenance, .st-banner.st-inconnu { background: var(--warn-soft); color: var(--warn) }
.st-banner.st-panne { background: var(--danger-soft); color: var(--danger) }
.st-card { background: var(--card); border: 1px solid var(--line); border-radius: 20px; padding: 22px 24px; box-shadow: var(--shadow) }
.st-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; margin-bottom: 6px }
.st-head h2 { margin: 0 }
.st-comp { padding: 18px 0; border-top: 1px solid var(--line) }
.st-comp:first-of-type { border-top: 0 }
.st-row { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px }
.st-row h3 { margin: 0; font-size: 16px }
.st-row .hint { margin: 2px 0 0 }
.st-pill { padding: 4px 12px; border-radius: 999px; font-size: 13px; font-weight: 700; white-space: nowrap; background: var(--green-soft); color: var(--green-ink) }
.st-pill.st-perturbe, .st-pill.st-maintenance, .st-pill.st-inconnu { background: var(--warn-soft); color: var(--warn) }
.st-pill.st-panne { background: var(--danger-soft); color: var(--danger) }
.st-bars { display: flex; gap: 2px; height: 34px; margin-top: 14px }
.st-bars i { flex: 1; border-radius: 3px; background: var(--line) }
.st-bars .b-up { background: var(--green) } .st-bars .b-mid { background: #E0A43A } .st-bars .b-down { background: var(--danger) }
.st-legend { display: flex; justify-content: space-between; margin-top: 8px; font-size: 12px; color: var(--muted) }
.st-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 14px }
.st-metric .hint { margin: 0 } .st-metric p { margin: 6px 0 0 } .st-small { font-size: 26px }
.st-incident { padding: 20px 24px; border-radius: 20px; border: 1px solid var(--line); background: var(--card) }
.st-incident.st-majeur { border-color: var(--danger) } .st-incident.st-mineur, .st-incident.st-maintenance { border-color: #E0A43A }
.st-incident h2, .st-past h3 { margin: 4px 0 6px; font-size: 17px }
.st-kicker { margin: 0; font-size: 12px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--muted) }
.st-past { padding: 14px 0; border-top: 1px solid var(--line) } .st-past:first-of-type { border-top: 0 }
.st-foot { color: var(--muted); font-size: 13px; text-align: center }
@media (max-width: 600px) { .st-bars i:nth-child(-n+60) { display: none } }

/* ---------- Documentation de l'API ---------- */
.doc { display: flex; gap: 24px; align-items: flex-start }
.doc-nav { position: sticky; top: 16px; flex: 0 0 250px; display: flex; flex-direction: column; gap: 2px; max-height: calc(100vh - 32px); overflow-y: auto }
.doc-nav a { display: flex; gap: 8px; align-items: center; padding: 7px 8px; border-radius: 10px; color: var(--navy); text-decoration: none; font-size: 13px }
.doc-nav a:hover { background: var(--card) }
.doc-body { flex: 1; min-width: 0 }
.doc-body > h2:first-child { margin-top: 0 }
.doc-op h3 { font-size: 17px; margin: 8px 0 }
.doc-op table { margin: 10px 0 }
.doc-line { display: flex; gap: 10px; align-items: center; margin: 0 }
.doc-line code { font-size: 14px; background: none; padding: 0; font-weight: 600 }
.m { display: inline-block; min-width: 52px; text-align: center; padding: 2px 6px; border-radius: 6px; font: 700 11px/1.6 ui-monospace, Menlo, Consolas, monospace; background: var(--green-soft); color: var(--green-ink) }
.m-post, .m-patch { background: var(--warn-soft); color: var(--warn) } .m-delete { background: var(--danger-soft); color: var(--danger) }
pre { background: #0F2231; color: #D8E6F0; padding: 14px 16px; border-radius: 12px; overflow-x: auto; font: 12.5px/1.55 ui-monospace, "SF Mono", Menlo, Consolas, monospace }
textarea { font: inherit; font-weight: 400; color: var(--navy); padding: 10px 12px; border: 1px solid var(--line); border-radius: 12px; background: var(--card); width: 100% }
@media (max-width: 920px) { .doc { flex-direction: column } .doc-nav { position: static; flex-basis: auto; max-height: none } }

/* ---------- Site public et Mon espace ---------- */
body.pub { background: var(--shell) }
.pub-wrap { max-width: 1200px; margin: 0 auto; padding: 0 24px; box-sizing: border-box }
.pub-top { background: var(--card); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 5 }
.pub-bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 24px; padding-top: 12px; padding-bottom: 12px }
.pub-links { display: flex; flex-wrap: wrap; gap: 24px; font-weight: 500; font-size: 15px }
.pub-links a { color: var(--navy); text-decoration: none } .pub-links a:hover { color: var(--green) }
.pub-actions { display: flex; flex-wrap: wrap; gap: 10px }
.pub-btn { display: inline-flex; align-items: center; justify-content: center; min-height: 46px; padding: 0 20px; border-radius: 14px; font-weight: 650; font-size: 15px; text-decoration: none; border: 1px solid transparent }
.pub-btn-p { background: var(--green); color: var(--on-green) } .pub-btn-p:hover { background: var(--green-ink); color: var(--on-green) }
.pub-btn-s { background: var(--card); color: var(--navy); border-color: var(--line) } .pub-btn-s:hover { border-color: var(--green); color: var(--green-ink) }
.pub-btn-w { background: #fff; color: #19354B } .pub-btn-w:hover { color: #08765F }
.pub-btn-l { min-height: 54px; padding: 0 26px; font-size: 16px }
.pub-hero { display: flex; flex-wrap: wrap; align-items: center; gap: 48px; padding-top: 64px; padding-bottom: 64px }
.pub-hero-text { flex: 1 1 480px; min-width: 0 }
.pub-hero h1 { font-size: clamp(34px, 5.4vw, 56px); line-height: 1.05; letter-spacing: -.025em; font-weight: 800 }
.pub-kicker { display: inline-block; margin: 0 0 18px; padding: 6px 14px; border-radius: 999px; background: var(--green-soft); color: var(--green-ink); font-size: 14px; font-weight: 600 }
.pub-lead { color: var(--muted); font-size: 17px; line-height: 1.65; max-width: 62ch }
.pub-hero .pub-lead { font-size: 19px; margin-top: 20px }
.pub-cta { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px }
.pub-checks { list-style: none; padding: 0; margin: 22px 0 0; display: flex; flex-wrap: wrap; gap: 8px 20px; color: var(--muted); font-size: 14px }
.pub-checks li::before { content: "✓ "; color: var(--green); font-weight: 700 }
.pub-phone { flex: 0 1 320px; margin: 0 auto; width: 300px; background: #19354B; border-radius: 42px; padding: 12px; box-shadow: 0 30px 60px rgba(25,53,75,.25) }
.pub-phone-screen { background: #FDECEA; border-radius: 32px; padding: 30px 20px; display: flex; flex-direction: column; gap: 12px; min-height: 520px; color: #7A1A12 }
.pub-alert-k { margin: 0; font-size: 12px; font-weight: 700; letter-spacing: .12em; color: #B42318 }
.pub-alert-t { margin: 0; font-size: 25px; font-weight: 800; line-height: 1.15 }
.pub-alert-d { margin: 0 0 auto; font-size: 14px; line-height: 1.5 }
.pub-alert-b { display: block; text-align: center; padding: 13px; border-radius: 14px; background: #fff; font-weight: 650; font-size: 15px }
.pub-alert-b.red { background: #B42318; color: #fff } .pub-alert-b.line { background: none; border: 1px solid #E8B4AE }
.pub-band { background: var(--card); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); padding: 64px 0 }
.pub-band h2, .pub-split h2, #entreprises h2 { font-size: clamp(26px, 3.4vw, 36px); letter-spacing: -.02em; margin: 0 0 8px }
.pub-lazy { content-visibility: auto; contain-intrinsic-size: auto 640px }
.pub-grid2, .pub-grid3, .pub-grid4 { display: grid; gap: 16px; margin-top: 28px }
.pub-grid2 { grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)) }
.pub-grid3 { grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)) }
.pub-grid4 { grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); margin-top: 0 }
.pub-card { background: var(--card); border: 1px solid var(--line); border-radius: 20px; padding: 22px; box-shadow: var(--shadow) }
.pub-card h2 { margin-top: 0; font-size: 19px } .pub-card h3 { margin: 12px 0 6px; font-size: 18px } .pub-card p { color: var(--muted); line-height: 1.6; margin: 0 }
.pub-step { font-size: 40px !important; font-weight: 800; color: var(--green) !important }
.pub-ic { width: 44px; height: 44px; border-radius: 14px; background: var(--green-soft); color: var(--green); display: inline-flex; align-items: center; justify-content: center; flex: none }
.pub-ic.red { background: var(--danger-soft); color: var(--danger) } .pub-ic.warn { background: var(--warn-soft); color: var(--warn) }
.pub-split { display: flex; flex-wrap: wrap; gap: 40px; align-items: center; padding-top: 64px; padding-bottom: 64px }
.pub-split > div { flex: 1 1 420px; min-width: 0 } .pub-split .pub-grid2 { margin-top: 0 }
.pub-split .pub-btn { margin-top: 20px }
.pub-offer { display: flex; flex-direction: column; gap: 12px } .pub-offer.feat { border: 2px solid var(--green) }
.pub-offer-head { display: flex; justify-content: space-between; align-items: center } .pub-offer h3 { margin: 0 }
.pub-price { font-size: 38px !important; font-weight: 800; color: var(--navy) !important } .pub-price small { font-size: 15px; font-weight: 500; color: var(--muted) }
.pub-offer .pub-btn { margin-top: auto }
#entreprises { padding-top: 64px; padding-bottom: 64px }
.pub-dark { background: #19354B; color: #fff; border-radius: 28px; padding: 44px; display: flex; flex-wrap: wrap; gap: 24px; align-items: center; justify-content: space-between }
.pub-dark > div { flex: 1 1 480px } .pub-dark h2 { color: #fff } .pub-dark p { color: #C9D6E1; line-height: 1.7; margin: 0 }
.pub-foot { border-top: 1px solid var(--line); background: var(--card); padding: 28px 0 40px; color: var(--muted); font-size: 14px; line-height: 1.6 }
.pub-narrow { max-width: 520px; margin: 48px auto; padding: 0 20px }
.pub-auth { padding: 32px 28px } .pub-auth h1 { font-size: 26px; margin: 14px 0 6px } .pub-auth form { margin-top: 18px }
.pub-auth form button.primary { min-height: 50px; width: 100% }
.pub-space { display: flex; flex-wrap: wrap; gap: 28px; padding-top: 28px; padding-bottom: 56px; align-items: flex-start }
[hidden] { display: none !important }
.pub-side { flex: 1 1 230px; max-width: 100%; display: flex; flex-direction: column; gap: 4px; background: var(--card); border: 1px solid var(--line); border-radius: 20px; padding: 12px }
.pub-side a { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 12px; color: var(--navy); text-decoration: none; font-weight: 500 }
.pub-side a .ico { color: var(--muted) } .pub-side a:hover { background: var(--shell) }
.pub-side a.active { background: var(--green-soft); color: var(--green-ink); font-weight: 650 } .pub-side a.active .ico { color: var(--green) }
.pub-side form { margin: 8px 0 0; border-top: 1px solid var(--line); padding-top: 8px }
.pub-main { flex: 999 1 560px; min-width: 0; display: flex; flex-direction: column; gap: 18px }
.pub-head h1 { font-size: 30px } .pub-head .pub-lead { margin: 6px 0 0 }
.pub-status { display: flex; flex-wrap: wrap; gap: 16px; align-items: center; padding: 20px 22px; border-radius: 20px }
.pub-status > div { flex: 1 1 260px } .pub-status p { margin: 0 } .pub-status .t { font-weight: 700; font-size: 18px }
.pub-status.ok { background: var(--green-soft); color: var(--green-ink) } .pub-status.warn { background: var(--warn-soft); color: var(--warn) }
.pub-kpi .big { margin: 6px 0 4px } .big.red { color: var(--danger) }
.pub-evs { list-style: none; margin: 8px 0 14px; padding: 0 }
.pub-ev { display: flex; gap: 14px; align-items: center; padding: 12px 0; border-top: 1px solid var(--line) }
.pub-ev:first-child { border-top: 0 } .pub-ev > div { flex: 1; min-width: 0 } .pub-ev p { margin: 0 } .pub-ev .t { font-weight: 600; color: var(--navy) }
.pub-ev form { margin: 0 }
.pub-ol { color: var(--muted); line-height: 1.8; padding-left: 20px }
.pub-code { text-align: center; padding: 18px; border-radius: 16px; background: var(--shell) }
.pub-code-n { font-size: 40px !important; font-weight: 800; letter-spacing: .18em; color: var(--navy) !important; margin: 6px 0 !important; font-variant-numeric: tabular-nums }
@media (max-width: 720px) { .pub-links { display: none } .pub-hero { padding-top: 32px } .pub-phone { display: none } .pub-dark { padding: 28px } }
.is-offline body.pub::before { content: "Hors ligne : vous consultez la dernière version enregistrée."; display: block; text-align: center; padding: 8px 12px; background: var(--warn-soft); color: var(--warn); font-weight: 600; font-size: 14px }
.pub-main:focus { outline: none }

/* Fidélisation : code de parrainage, paliers, solde de points */
.pub-code { font-size: 34px; font-weight: 800; letter-spacing: .06em; color: var(--green-ink); margin: 6px 0 4px; font-variant-numeric: tabular-nums }
.pub-code small { font-size: 16px; font-weight: 600; letter-spacing: 0; color: var(--muted) }
.pub-code.neg { color: var(--danger) }
.pub-tiers { list-style: none; padding: 0; margin: 12px 0 0; display: grid; gap: 10px; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)) }
.pub-tiers li { display: flex; flex-direction: column; gap: 4px; padding: 14px; border: 1px solid var(--line); border-radius: 16px; background: var(--shell) }
.pub-tiers li small { color: var(--muted) }
.pub-tiers li.done { background: var(--green-soft); border-color: transparent; color: var(--green-ink) }
.pub-tier-n { width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; font-weight: 800; background: var(--card); color: var(--green); border: 1px solid var(--line) }
.pub-tiers li.done .pub-tier-n { background: var(--green); color: var(--on-green); border-color: transparent }
.pub-hp { position: absolute !important; left: -10000px; width: 1px; height: 1px; overflow: hidden }

/* ================= Mon espace (particuliers) : en-tête, onglets, colonne de lecture ================= */
body.myspace { background: var(--paper); font-size: 16.5px; line-height: 1.6 }
.me-wrap { max-width: 1040px; margin: 0 auto; padding: 0 24px }
.me-top { background: var(--card); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 10 }
.me-bar { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 68px }
.me-brand { display: flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none }
.me-brand b { display: block; font-size: 19px; font-weight: 800; line-height: 1.1 }
.me-brand small { display: block; color: var(--muted); font-size: 13px }
.me-actions { display: flex; align-items: center; gap: 10px; flex-wrap: wrap }
.me-hello:empty { display: none } .me-hello { color: var(--muted); font-size: 14.5px }
.me-tabs { border-top: 1px solid var(--line-2) }
.me-tabs-in { display: flex; align-items: stretch; gap: 4px; overflow-x: auto; scrollbar-width: none }
.me-tabs a { display: flex; align-items: center; gap: 8px; padding: 13px 12px 11px; color: var(--ink-2); text-decoration: none; font-weight: 700; font-size: 15px; white-space: nowrap; border-bottom: 3px solid transparent }
.me-tabs a .ico { color: var(--muted); width: 19px; height: 19px }
.me-tabs a:hover { color: var(--ink) }
.me-tabs a.active { color: var(--ink); border-bottom-color: var(--green) }
.me-tabs a.active .ico { color: var(--green) }
.me-tabs form { margin: 0 0 0 auto; display: flex; align-items: center }
.me-tabs form button.link { font-size: 14.5px; white-space: nowrap }
.me-body { padding-top: 28px; padding-bottom: 64px }
.myspace #flash:empty { display: none }
.myspace .pub-main { display: flex; flex-direction: column; gap: 18px; outline: none }
.myspace .pub-head h1 { font-size: 32px; font-weight: 800; letter-spacing: -.015em; margin: 0 }
.myspace .pub-head .pub-lead { margin: 6px 0 0; color: var(--ink-2); font-size: 17px; max-width: 62ch }
.myspace .me-h2 { margin: 10px 0 -6px; font-size: 18px }
.myspace .grid { margin: 0 } .myspace .stat span:last-child { font-size: 14px } .myspace .stat span b { color: var(--ink); font-weight: 700 }
.myspace .pub-card { background: var(--card); border: 1px solid var(--line); border-radius: var(--r-panel); padding: 22px 24px; box-shadow: none }
.myspace .pub-card h2 { margin: 0 0 12px; font-size: 19px }
.myspace .pub-grid3 { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 14px; margin: 0 }
.myspace .pub-offer { border-radius: var(--r-panel) } .myspace .pub-offer.feat { border: 2px solid var(--green); box-shadow: none }
.myspace .pub-price { font-size: 32px !important; color: var(--ink) !important }
.myspace .flash, .myspace .error { margin: 0 0 16px }
.me-foot { border-top: 1px solid var(--line); background: var(--card); padding: 26px 0; color: var(--ink-2); font-size: 14.5px }
.me-foot p { margin: 6px 0; max-width: 90ch }
/* Bandeau d'état de la protection */
.pub-status { display: flex; align-items: center; gap: 16px; padding: 20px 22px; border-radius: var(--r-panel); border: 1px solid #BFE0D3; background: var(--green-soft); color: var(--green-ink) }
.pub-status .ico { width: 30px; height: 30px; flex: none }
.pub-status div { flex: 1 } .pub-status p { margin: 0 } .pub-status .t { font-size: 19px; font-weight: 800; color: var(--ink) }
.pub-status.warn { background: var(--warn-soft); border-color: #EBD3A6; color: var(--warn) }
.pub-status a { font-weight: 700 }
/* Activité récente */
.pub-evs { list-style: none; padding: 0; margin: 0 0 10px }
.pub-ev { display: flex; align-items: center; gap: 14px; padding: 12px 0; border-bottom: 1px solid var(--line-2) }
.pub-ev:last-child { border-bottom: 0 } .pub-ev div { flex: 1 } .pub-ev p { margin: 0 } .pub-ev .t { font-weight: 700 }
.pub-ev .pill::before { display: none } .pub-ev .pill { color: var(--muted); font-weight: 400 }
/* Boutons du site public et de Mon espace */
.pub-btn { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; padding: 0 18px; border-radius: var(--r-ctl); font-weight: 700; font-size: 15px; text-decoration: none; border: 1px solid transparent; cursor: pointer }
.pub-btn-p { background: var(--green); color: #fff } .pub-btn-p:hover { background: var(--green-ink); color: #fff }
.pub-btn-s { background: var(--card); color: var(--ink); border-color: #C3CED9 } .pub-btn-s:hover { background: var(--paper); color: var(--ink) }
.myspace button { font-size: 15px; min-height: 44px }
/* Connexion et inscription */
.myspace .pub-narrow { max-width: 520px; margin: 8px auto 0 }
.myspace .pub-auth { padding: 30px 30px 26px } .myspace .pub-auth h1 { font-size: 28px; margin: 6px 0 6px }
.myspace .pub-auth .pub-lead { font-size: 16.5px; color: var(--ink-2) }
.myspace .pub-checks { list-style: none; padding: 0; margin: 18px 4px 0; display: flex; flex-direction: column; gap: 6px; color: var(--ink-2); font-size: 15px }
.myspace .pub-checks li::before { content: "✓ "; color: var(--green); font-weight: 800 }
.myspace .pub-code { color: var(--ink) }
@media (max-width: 720px) {
  .me-wrap { padding: 0 16px } .me-bar { min-height: 60px }
  .me-brand small { display: none } .me-hello { display: none }
  .myspace .pub-head h1 { font-size: 26px }
  .me-tabs a { padding: 12px 10px 10px; font-size: 14.5px } .me-tabs a .ico { display: none }
  .pub-status { flex-wrap: wrap }
}
/* Mon espace : résultat de « Qui m'appelle ? » */
.numres { margin-top: 16px; padding: 16px 18px; border-radius: var(--r-panel); border: 1px solid var(--line); border-left-width: 5px; background: var(--card) }
.numres .t { margin: 0 0 6px; font-weight: 800; font-size: 17px }
.numres ul { margin: 0 0 8px; padding-left: 20px; color: var(--ink-2) }
.numres.danger { border-left-color: var(--danger); background: var(--danger-soft) } .numres.danger .t { color: var(--danger) }
.numres.warn { border-left-color: #D99A2B; background: var(--warn-soft) } .numres.warn .t { color: var(--warn) }
.numres.ok { border-left-color: var(--green); background: var(--green-soft) } .numres.ok .t { color: var(--green-ink) }
.numres.info { border-left-color: #8DA2B6 }

/* ================= Mon espace : charte v3 (bleu Vigie, Inter, panneaux arrondis) ================= */
@font-face { font-family: "Inter"; src: url("/assets/fonts/inter-latin-wght-normal.woff2") format("woff2"); font-weight: 100 900; font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD }
@font-face { font-family: "Inter"; src: url("/assets/fonts/inter-latin-ext-wght-normal.woff2") format("woff2"); font-weight: 100 900; font-display: swap;
  unicode-range: U+0100-02AF, U+0304, U+0308, U+0329, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF }
body.myspace {
  --font: Inter, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --ink: #101828; --ink-2: #475467; --muted: #667085; --line: #E0E5EF; --line-2: #EEF1F6; --paper: #F6F7FA;
  --green: #3155F5; --green-ink: #2344D0; --green-soft: #EDF0FF; --on-green: #FFFFFF;
  --r-ctl: 12px; --r-panel: 24px;
  font-family: var(--font); background: var(--paper); color: var(--ink)
}
.myspace .brand-mark { background: #3155F5; border-radius: 12px }
.myspace .me-brand b { font-size: 24px; font-weight: 850; letter-spacing: -.06em; text-transform: lowercase }
.myspace .me-top { background: rgba(255,255,255,.96) }
.myspace .pub-head h1 { font-size: clamp(32px, 4vw, 48px); letter-spacing: -.045em; line-height: 1.08 }
.myspace .pub-card, .myspace .grid { box-shadow: 0 18px 60px rgba(37,61,128,.06) }
.myspace .pub-status { border-radius: 20px; border-color: #C7D2FE } .myspace .pub-status:not(.warn) .t { color: var(--ink) }
.myspace .pub-btn, .myspace button { border-radius: 12px }
.myspace .pub-btn-p, .myspace button.primary { background: #3155F5; border-color: #3155F5 }
.myspace .pub-btn-p:hover, .myspace button.primary:hover { background: #2344D0; border-color: #2344D0 }
.myspace .me-tabs a.active { border-bottom-color: #3155F5 } .myspace .me-tabs a.active .ico { color: #3155F5 }
.myspace .me-foot { background: #111B36; color: #C5D0E7; border-top: 0 } .myspace .me-foot a { color: #fff }
.myspace .flash { background: #EDF0FF; color: #2344D0; border-color: #C7D2FE }
.myspace .pub-tiers li.done { background: #EDF0FF; color: #2344D0 } .myspace .pub-tiers li.done .pub-tier-n { background: #3155F5 }
.brand-logo { width: 34px; height: 34px; border-radius: 9px; flex: none }

/* ================= Mon espace : finitions et mobile ================= */
/* Chiffres tabulaires seulement là où ils s'alignent : avec Inter, ils élargissent aussi le trait d'union (« e - mail »). */
body.myspace { font-variant-numeric: normal; min-height: 100vh; min-height: 100dvh; display: flex; flex-direction: column }
.myspace .me-body { flex: 1 0 auto; width: 100%; box-sizing: border-box }
.myspace .stat, .myspace .pub-code, .myspace .pub-code-n, .myspace .pub-price, .myspace table { font-variant-numeric: tabular-nums }
.myspace .me-actions { flex-wrap: nowrap }
.myspace .pub-auth h1 { font-size: 30px; letter-spacing: -.03em; line-height: 1.15 }
.myspace label.check { align-items: flex-start; gap: 10px; line-height: 1.45 }
.myspace label.check input { width: 20px; height: 20px; min-height: 0; flex: none; margin: 2px 0 0; accent-color: #3155F5 }
.myspace .pub-auth form + p, .myspace .auth-foot { margin-top: 16px }
.myspace .me-foot p:last-child a { white-space: nowrap }
@media (max-width: 720px) {
  .myspace .me-bar { min-height: 60px; gap: 10px }
  .myspace .me-brand img { width: 32px; height: 32px }
  .myspace .me-brand b { font-size: 22px }
  .myspace .me-actions .pub-btn { min-height: 40px; padding: 0 14px; font-size: 14px }
  /* Un seul bouton en haut : l'autre action est déjà dans la page */
  body.myspace:not([data-page="connexion"]) .me-actions .pub-btn-s[href="#/connexion"] { display: none }
  body.myspace[data-page="connexion"] .me-actions .pub-btn-s[href="#/connexion"] { display: none }
  body.myspace[data-page="inscription"] .me-actions .pub-btn-p { display: none }
  body.myspace[data-page="inscription"] .me-actions .pub-btn-s[href="#/connexion"] { display: inline-flex }
  .myspace .me-body { padding-top: 16px; padding-bottom: 32px }
  .myspace .pub-narrow { margin: 0; padding: 0 }
  .myspace .pub-auth { padding: 24px 20px 22px; border-radius: 20px }
  .myspace .pub-auth h1 { font-size: 25px }
  .myspace .pub-auth .pub-lead { font-size: 16px }
  .myspace .pub-checks { margin: 14px 2px 0; font-size: 14.5px }
  .myspace .me-foot { padding: 22px 0 26px; font-size: 14px; line-height: 1.55 }
  .myspace .me-foot p { margin: 4px 0 }
  .myspace .me-foot p:last-child { margin-top: 12px; display: flex; flex-wrap: wrap; gap: 4px 6px }
}

/* ================= Mon offre : offre actuelle, comparatif, passage à une offre supérieure ================= */
.myspace .plan-now { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap }
.myspace .plan-now p { margin: 0 }
.myspace .plan-now-k, .myspace .upsell-k { font-size: 14px; font-weight: 700; color: #3155F5; margin: 0 }
.myspace .plan-now-n { color: var(--ink); font-size: 28px; font-weight: 800; letter-spacing: -.03em; line-height: 1.2; margin: 2px 0 4px !important }
.myspace .plan-bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-top: 6px }
.myspace .plan-bar .me-h2 { margin: 0 }
.seg { display: inline-flex; padding: 4px; background: #E9EDF7; border-radius: 14px; gap: 4px }
.myspace .seg button { min-height: 38px; padding: 0 14px; border: 0; border-radius: 10px; background: transparent; color: var(--ink-2); font-weight: 700; font-size: 14.5px; cursor: pointer }
.myspace .seg button[aria-pressed="true"] { background: #fff; color: var(--ink); box-shadow: 0 1px 3px rgba(16,24,40,.12) }
.myspace .seg button span { color: #2344D0; font-weight: 700; margin-left: 4px }
.plan-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; align-items: stretch }
.plan-card { position: relative; display: flex; flex-direction: column; background: var(--card); border: 1px solid var(--line); border-radius: 24px; padding: 24px 22px 22px }
.plan-card.is-next { border: 2px solid #3155F5; box-shadow: 0 18px 50px rgba(49,85,245,.12) }
.plan-card.is-current { background: #F8F9FD }
.plan-badge { position: absolute; top: -12px; left: 20px; background: #3155F5; color: #fff; font-size: 12.5px; font-weight: 700; padding: 3px 10px; border-radius: 999px }
.plan-card h3 { margin: 0; font-size: 20px; letter-spacing: -.01em }
.plan-tag { margin: 4px 0 14px; color: var(--ink-2); font-size: 15px }
.myspace .plan-price { margin: 0; font-size: 34px; font-weight: 800; letter-spacing: -.03em; line-height: 1.1; color: var(--ink); font-variant-numeric: tabular-nums }
.myspace .plan-price small { font-size: 15px; font-weight: 600; color: var(--muted); letter-spacing: 0 }
.plan-sub { margin: 4px 0 16px; color: var(--muted); font-size: 14px }
.plan-feats { list-style: none; padding: 0; margin: 0 0 20px; display: flex; flex-direction: column; gap: 9px; font-size: 15px; color: var(--ink-2) }
.plan-feats li { position: relative; padding-left: 26px; line-height: 1.45 }
.plan-feats li::before { content: ""; position: absolute; left: 0; top: 3px; width: 17px; height: 17px; border-radius: 50%; background: #EDF0FF url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M4.5 8.3l2.2 2.2 4.8-5' fill='none' stroke='%233155F5' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center/13px no-repeat }
.plan-cta { margin-top: auto; display: flex; flex-direction: column; gap: 8px }
.plan-cta .pub-btn { width: 100%; min-height: 48px }
.plan-cta .pub-btn[disabled] { opacity: .45; cursor: not-allowed }
.plan-cta-now { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; border-radius: 12px; background: #EDF0FF; color: #2344D0; font-weight: 700; font-size: 15px }
.plan-cta-now .ico { width: 18px; height: 18px }
.plan-cta-note { margin: 0; color: var(--muted); font-size: 13.5px; text-align: center }
.plan-legal { margin: -4px 0 0; font-size: 13.5px }
.plan-free h2 { margin-bottom: 12px }
.plan-free-g { display: grid; grid-template-columns: 1fr 1fr; gap: 12px }
.plan-free-g a { display: flex; gap: 12px; align-items: flex-start; padding: 14px 16px; border: 1px solid var(--line); border-radius: 16px; color: var(--ink-2); text-decoration: none; font-size: 14.5px; line-height: 1.45 }
.plan-free-g a:hover { border-color: #3155F5 }
.plan-free-g a .ico { width: 22px; height: 22px; color: #3155F5; flex: none; margin-top: 2px }
.plan-free-g b { display: block; color: var(--ink); font-size: 15.5px }
.myspace .upsell { display: flex; justify-content: space-between; gap: 20px; align-items: center; background: linear-gradient(135deg, #FFFFFF 0%, #EEF1FF 100%); border-color: #C7D2FE }
.myspace .upsell h2 { margin: 2px 0 12px; font-size: 22px; letter-spacing: -.02em }
.myspace .upsell .plan-feats { margin: 0 }
.upsell-cta { display: flex; flex-direction: column; align-items: stretch; gap: 8px; min-width: 210px; text-align: center }
.upsell-alt { font-size: 14px; color: #2344D0 }
@media (max-width: 860px) {
  .plan-grid { grid-template-columns: 1fr; gap: 20px }
  .plan-card { order: 2 } .plan-card.is-current { order: 1 } .plan-card.is-next { order: 0 }
}
@media (max-width: 720px) {
  .myspace .plan-now-n { font-size: 24px }
  .myspace .plan-now .pub-btn { width: 100% }
  .plan-bar { flex-direction: column; align-items: stretch !important }
  .seg { display: flex } .myspace .seg button { flex: 1 }
  .plan-free-g { grid-template-columns: 1fr }
  .myspace .upsell { flex-direction: column; align-items: stretch }
  .upsell-cta { min-width: 0 }
}

/* ================= Mon espace : appli web (PWA) sur mobile — barre d'onglets en bas ================= */
.me-tabs a .s, .me-avatar, .me-menu, .me-sub, .me-tabs-out { display: none }
/* Menu du compte (ordinateur et mobile) */
.me-actions { position: relative }
body.myspace.signed .me-avatar { display: grid; place-items: center; width: 40px; height: 40px; min-height: 0; padding: 0; border: 0; border-radius: 50%; background: #EDF0FF; color: #2344D0; font-weight: 800; font-size: 16px; cursor: pointer }
body.myspace.signed .me-avatar[aria-expanded="true"] { box-shadow: 0 0 0 3px #C7D2FE }
.me-pop { position: absolute; right: 0; top: calc(100% + 8px); z-index: 40; min-width: 230px; padding: 6px; background: #fff; border: 1px solid var(--line); border-radius: 16px; box-shadow: 0 20px 50px rgba(16,24,40,.16) }
.me-pop[hidden] { display: none }
.me-pop-n { margin: 6px 12px 8px; font-weight: 800; color: var(--ink) }
.myspace .me-pop a, .myspace .me-pop button { display: flex; align-items: center; gap: 12px; width: 100%; min-height: 44px; padding: 0 12px; border: 0; border-radius: 10px; background: none; color: var(--ink); font: inherit; font-size: 15px; font-weight: 600; text-decoration: none; text-align: left; cursor: pointer }
.myspace .me-pop a:hover, .myspace .me-pop button:hover { background: #F2F4FA }
.myspace .me-pop .ico { width: 20px; height: 20px; color: #3155F5 }
.myspace .me-pop button { color: #B42318; border-top: 1px solid var(--line-2); border-radius: 0 0 10px 10px; margin-top: 4px }
.myspace .me-pop button .ico { color: #B42318 }
.myspace a, .myspace button { -webkit-tap-highlight-color: transparent }
@media (max-width: 720px) {
  /* Pas de flou sur l'en-tête : il ferait de lui le repère de la barre d'onglets « fixe » */
  .myspace .me-top { padding-top: env(safe-area-inset-top); background: #fff; backdrop-filter: none; -webkit-backdrop-filter: none }
  body.myspace.signed .me-site { display: none }
  /* Barre d'onglets fixée en bas, au-dessus de la zone de geste (connecté : #side ; déconnecté : #tabs-out) */
  body.myspace:not(.signed) .me-tabs-out { display: block }
  body.myspace:not(.signed) .me-actions { display: none }
  body.myspace:not(.signed) .me-body { padding-bottom: calc(96px + env(safe-area-inset-bottom)) }
  .myspace .me-tabs-out .me-tabs-in { display: grid; grid-template-columns: repeat(5, 1fr); padding: 0 4px }
  .myspace .me-tabs-out a { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; min-height: 58px; padding: 8px 2px 7px; position: relative;
    color: var(--muted); font-size: 11.5px; font-weight: 600; text-decoration: none; text-align: center; line-height: 1.1 }
  .myspace .me-tabs-out a .ico { width: 24px; height: 24px; color: var(--muted) }
  .myspace .me-tabs-out a.active, .myspace .me-tabs-out a.active .ico { color: #2344D0 }
  .myspace .me-tabs-out a.active::before { content: ""; position: absolute; top: 5px; width: 52px; height: 30px; border-radius: 15px; background: #EDF0FF; z-index: 0 }
  .myspace .me-tabs-out a > * { position: relative; z-index: 1 }
  body.myspace:not(.signed) .me-foot { padding-bottom: calc(80px + env(safe-area-inset-bottom)) }
  .myspace .me-tabs, .myspace .me-tabs-out { position: fixed; left: 0; right: 0; bottom: 0; z-index: 20; border-top: 1px solid var(--line); background: rgba(255,255,255,.94);
    backdrop-filter: saturate(1.4) blur(16px); -webkit-backdrop-filter: saturate(1.4) blur(16px); padding-bottom: env(safe-area-inset-bottom) }
  .myspace .me-tabs-in { display: grid; grid-template-columns: repeat(6, 1fr); gap: 0; padding: 0 2px; overflow: visible }
  .myspace .me-tabs a { flex-direction: column; justify-content: center; gap: 3px; padding: 8px 2px 7px; min-height: 58px; border: 0; font-size: 11.5px; font-weight: 600; color: var(--muted); position: relative }
  .myspace .me-tabs a .ico { display: block; width: 24px; height: 24px; color: var(--muted); transition: transform .15s }
  .myspace .me-tabs a .l { display: none } .myspace .me-tabs a .s { display: block; line-height: 1.1 }
  .myspace .me-tabs a[data-r="points"] { display: none }
  .myspace .me-tabs a.active { color: #2344D0; border: 0 }
  .myspace .me-tabs a.active .ico { color: #3155F5 }
  .myspace .me-tabs a.active::before { content: ""; position: absolute; top: 5px; width: 52px; height: 30px; border-radius: 15px; background: #EDF0FF; z-index: -1 }
  .myspace .me-tabs a:active .ico { transform: scale(.9) }
  body.myspace.signed .me-body { padding-bottom: calc(96px + env(safe-area-inset-bottom)) }
  body.myspace.signed .me-foot { display: none }
  /* Sous-onglets Parrainage / Mes points */
  .myspace .me-sub { display: flex; margin: 0 0 2px }
  .myspace .me-sub a { flex: 1; text-align: center; padding: 9px 0; border-radius: 10px; color: var(--ink-2); font-weight: 700; font-size: 14.5px; text-decoration: none }
  .myspace .me-sub a[aria-current="page"] { background: #fff; color: var(--ink); box-shadow: 0 1px 3px rgba(16,24,40,.12) }
  /* Raccourcis de Mon compte (ce qui n'a pas de place dans la barre) */
  .myspace .me-menu { display: flex; flex-direction: column; padding: 6px 0 !important }
  .myspace .me-menu a, .myspace .me-menu button { display: flex; align-items: center; gap: 14px; padding: 14px 20px; min-height: 52px; border: 0; border-radius: 0; background: none; color: var(--ink); font: inherit; font-weight: 600; text-decoration: none; text-align: left; cursor: pointer }
  .myspace .me-menu > * + * { border-top: 1px solid var(--line-2) }
  .myspace .me-menu .ico { width: 22px; height: 22px; color: #3155F5 }
  .myspace .me-menu button { color: #B42318 } .myspace .me-menu button .ico { color: #B42318 }
}
@media (max-width: 720px) and (display-mode: standalone) {
  .myspace .me-bar { min-height: 54px }
}

/* Lien de liaison (QR code + lien) et pages /lier, /cercle */
.link-box { display: flex; gap: 22px; align-items: center; margin-top: 14px; padding: 18px; border: 1px solid #C7D2FE; border-radius: 20px; background: #F7F8FF }
.link-qr svg { display: block; width: 190px; height: 190px; border-radius: 12px; background: #fff }
.link-how p { margin: 0 0 12px } .link-how p:last-child { margin: 0 }
.handoff .handoff-open { width: 100%; min-height: 50px; margin: 18px 0 10px }
@media (max-width: 720px) { .link-box { flex-direction: column; align-items: stretch } .link-qr { align-self: center } .link-how .pub-btn { width: 100% } }

/* Démonstration clients équipés : QR de liaison */
.demo-qr svg { width: 220px; height: 220px; display: block; margin: 10px 0; background: #fff; border-radius: 12px }

/* Démo clients équipés : parcours en 4 étapes */
.demo-step h2 { display: flex; align-items: center; gap: 12px; margin-top: 0 }
.demo-num { flex: none; width: 30px; height: 30px; border-radius: 50%; display: inline-grid; place-items: center; font-size: 15px; background: var(--line); color: var(--ink-2) }
.demo-step.done .demo-num { background: var(--green); color: #fff }
.demo-state { margin-left: auto; font-size: 13px; font-weight: 600; color: var(--muted) }
.demo-step.done .demo-state { color: var(--green-ink) }
.demo-step.locked { opacity: .6 }
.demo-numbers, .demo-events { list-style: none; padding: 0; margin: 10px 0 }
.demo-numbers li, .demo-events li { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--line) }
.demo-numbers form.inline { display: inline; margin: 0 }
.demo-numbers form.inline button { padding: 4px 10px; font-size: 13px }
.demo-scan { display: flex; flex-wrap: wrap; gap: 20px; align-items: center }
.demo-scan > div:last-child { flex: 1 1 240px }
.demo-howto { padding-left: 20px } .demo-howto li { margin: 6px 0 }
.demo-more { margin-top: 28px }
.grid2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 16px }
.grid2 .card h3 { margin-top: 0 }

/* Accessibilité : contrastes (RGAA 3.2), lien d'évitement (12.7), blocs défilants au clavier (7.3) */
.pub .error, .myspace .error { color: #A8291C }
.skip-link { position: absolute; left: -9999px; top: 8px; z-index: 50; padding: 10px 16px; border-radius: 10px; background: #fff; color: var(--ink); font-weight: 700 }
.skip-link:focus { left: 12px }
pre:focus-visible { outline: 3px solid #b45309; outline-offset: 2px }

/* Courbe simple en barres (appels bloqués par jour) */
.bars { display: flex; align-items: flex-end; gap: 3px; height: 120px; padding-top: 8px }
.bars span { flex: 1; min-height: 2px; background: var(--accent, #2344d0); border-radius: 3px 3px 0 0; opacity: .85 }
/* Hauteurs par classes (pas d'attribut style : la politique de sécurité les interdit) */
.bars .h0 { height: 0% } .bars .h1 { height: 5% } .bars .h2 { height: 10% } .bars .h3 { height: 15% } .bars .h4 { height: 20% } .bars .h5 { height: 25% } .bars .h6 { height: 30% } .bars .h7 { height: 35% } .bars .h8 { height: 40% } .bars .h9 { height: 45% } .bars .h10 { height: 50% } .bars .h11 { height: 55% } .bars .h12 { height: 60% } .bars .h13 { height: 65% } .bars .h14 { height: 70% } .bars .h15 { height: 75% } .bars .h16 { height: 80% } .bars .h17 { height: 85% } .bars .h18 { height: 90% } .bars .h19 { height: 95% } .bars .h20 { height: 100% }
.myspace .bars { height: 90px; margin: 10px 0 }
.me-src { margin: 6px 0; padding-left: 18px }
.stat.muted .big { color: var(--muted) } .kpi-note { grid-column: 1 / -1; margin: 0 }

/* Déconnexion : dans le menu du compte (initiale), plus dans la barre d'onglets */
.myspace .me-tabs form { display: none }
/* Ma famille : lien de cercle familial sous chaque proche */
.circle-ask { margin-top: 8px } .circle-ask summary { cursor: pointer; color: var(--green-ink); font-weight: 700; font-size: 14.5px }
.circle-ask .pub-cta, .circle-st .pub-cta { margin-top: 8px; flex-wrap: wrap }
.circle-st { margin: 8px 0 0 } .circle-st .pill { white-space: normal }
.circle-st.ask { padding: 12px 14px; border-radius: 12px; background: #FFF8E6 }
.circle-st button.link { background: none; border: 0; padding: 0; color: var(--ink-2); text-decoration: underline; cursor: pointer; font: inherit; font-size: 14px }
.pub-evs .circle-li { list-style: none; padding: 0 0 14px 58px; border-bottom: 1px solid var(--line-2) }
@media (max-width: 720px) { .pub-evs .circle-li { padding-left: 0 } }
.pub-evs .pub-ev:has(+ .circle-li) { border-bottom: 0; padding-bottom: 4px } .pub-evs .circle-li:last-child { border-bottom: 0 }

/* ---------- Paramètres d'affichage du site (/affichage, appliqués par /js/prefs.js) : pages publiques seulement ---------- */
html[data-text=grand] body.pub { zoom: 1.15 }
html[data-text=tres-grand] body.pub { zoom: 1.32 }
html[data-spacing=large] body.pub :is(p, li, dd, td, label, summary) { line-height: 1.95; letter-spacing: .03em; word-spacing: .14em }
html[data-links=souligne] body.pub a:not([class*=btn]):not(.me-brand) { text-decoration: underline !important; text-underline-offset: 3px }
html[data-contrast=eleve] body.pub { --ink-2: #101828; --muted: #1d2939; --line: #667085; --line-2: #98a2b3; --green: #1d3bb8 }
html[data-motion=off] body.pub *, html[data-motion=off] body.pub *::before, html[data-motion=off] body.pub *::after { animation: none !important; transition: none !important }
html[data-theme=sombre] body.pub {
  --ink: #EEF1F8; --ink-2: #C3CCDE; --muted: #A3AEC6; --line: #2C3856; --line-2: #222D48; --paper: #0D1426; --card: #141E38;
  --green: #7D93FF; --green-ink: #AEBCFF; --green-soft: #1F2C52; --on-green: #0D1426;
  --danger-soft: #3B1B1A; --warn-soft: #3A2A12; --side-bg: #0A1020;
}
html[data-theme=sombre][data-contrast=eleve] body.pub { --ink-2: #FFFFFF; --muted: #E3E8F2; --line: #6B7A9C }
html[data-theme=sombre] body.pub :is(.me-top, .me-tabs, .pub-card, .card, .panel, input, select, textarea, dialog) { background-color: var(--card); color: var(--ink); border-color: var(--line) }
.save-status { margin: 10px 0 0; font-weight: 700; font-size: 15px }
.save-status.ok { color: var(--green-ink, #08573F) }
.save-status.ko { color: var(--danger, #C0392B) }
/* Code de parrainage : toujours sur une ligne, taille adaptée à l'écran, sélection d'un seul geste */
.myspace #rc { white-space: nowrap; font-size: clamp(22px, 7.2vw, 34px) !important; letter-spacing: .06em !important; user-select: all; overflow-wrap: normal }

/* =================== Back office : interface dynamique (bo.js) =================== */
/* Menu : en-têtes de rubrique. Déplié : rubriques et pages en toutes lettres.
   Replié : une icône par rubrique ; survol, focus ou clic = panneau avec les pages de la rubrique. */
.nav-head { display: flex; align-items: center; gap: 10px; width: 100%; background: none; border: 0; min-height: 0; padding: 4px 10px; margin: 0 0 4px; color: var(--side-dim); font-size: 12.5px; font-weight: 700; cursor: default; text-align: left }
.nav-head .ico { display: none }
.nav-fly-title { display: none }
@media (min-width: 921px) {
  body.bo .shell { grid-template-columns: 76px 1fr; transition: grid-template-columns .18s }
  body.bo.side-open .shell { grid-template-columns: var(--side) 1fr }
  body.bo:not(.side-open) .side { padding: 14px 12px; overflow: visible; z-index: 20 }
  body.bo:not(.side-open) .side .brand span, body.bo:not(.side-open) .side-toggle span, body.bo:not(.side-open) .nav-head span { display: none }
  body.bo:not(.side-open) .side-top { justify-content: center; padding: 2px 0 18px }
  body.bo:not(.side-open) .nav { gap: 6px }
  body.bo:not(.side-open) .nav-group { position: relative; margin: 0 }
  body.bo:not(.side-open) .nav-head { justify-content: center; width: 52px; height: 48px; padding: 0; margin: 0; border-radius: 12px; color: var(--side-ink); cursor: pointer }
  body.bo:not(.side-open) .nav-head .ico { display: block; width: 22px; height: 22px }
  body.bo:not(.side-open) .nav-group:hover .nav-head, body.bo:not(.side-open) .nav-group.open .nav-head { background: rgba(255,255,255,.08); color: #fff }
  body.bo:not(.side-open) .nav-group.current .nav-head { background: rgba(63,197,154,.16); color: #3FC59A; box-shadow: inset 3px 0 0 #3FC59A }
  body.bo:not(.side-open) .nav-items { display: none; position: absolute; left: 52px; top: -8px; padding: 8px 8px 8px 22px; min-width: 260px }
  body.bo:not(.side-open) .nav-items::before { content: ""; position: absolute; inset: 0 0 0 14px; background: var(--side-bg); border: 1px solid rgba(255,255,255,.12); border-radius: 12px; box-shadow: 0 12px 32px rgba(8,20,34,.35); z-index: -1 }
  body.bo:not(.side-open) .nav-group:hover .nav-items, body.bo:not(.side-open) .nav-group.open .nav-items, body.bo:not(.side-open) .nav-group:focus-within .nav-items { display: block }
  body.bo:not(.side-open) .nav-fly-title { display: block; margin: 6px 10px 6px; color: #fff; font-weight: 700; font-size: 14px }
  body.bo:not(.side-open) .nav-items a { padding: 9px 10px }
}
.side-toggle { display: flex; align-items: center; gap: 10px; margin-top: 10px; background: transparent; border: 1px solid rgba(255,255,255,.14); color: var(--side-ink); font-weight: 600; justify-content: center }
.side-toggle:hover { background: rgba(255,255,255,.06); color: #fff }
body.bo.side-open .side-toggle { justify-content: flex-start }
@media (max-width: 920px) { .side-toggle { display: none } }

/* Fil d'Ariane et retour */
.topbar .crumb { display: flex; align-items: center; gap: 8px; flex-wrap: wrap }
.topbar .crumb a { color: var(--muted); text-decoration: none } .topbar .crumb a:hover { color: var(--ink); text-decoration: underline }
.topbar .crumb > span[aria-hidden] { color: #A9B4C2 }
.topbar .back { display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px 6px 9px; margin-right: 6px; border: 1px solid var(--line); border-radius: 999px; background: var(--card); color: var(--ink) !important; font-weight: 700; text-decoration: none !important }
.topbar .back .ico { transform: none }
.topbar .back:hover { border-color: #9AA8B8 }

/* Chargement */
.bo-loading { position: fixed; top: 0; left: 0; height: 3px; width: 0; background: #3FC59A; z-index: 100; transition: width .4s ease, opacity .3s; opacity: 0 }
body.is-loading .bo-loading { width: 70%; opacity: 1 }
body.is-loading .content { opacity: .55; transition: opacity .15s }

/* Toasts */
.toasts { position: fixed; right: 18px; bottom: 18px; z-index: 90; display: grid; gap: 10px; width: min(420px, calc(100vw - 36px)) }
.toast { display: flex; align-items: center; gap: 12px; padding: 13px 14px 13px 16px; border-radius: 14px; background: #0F2236; color: #fff; box-shadow: 0 18px 50px rgba(15,34,54,.28); font-weight: 600; transform: translateY(12px); opacity: 0; transition: transform .2s, opacity .2s }
.toast.in { transform: none; opacity: 1 }
.toast-dot { width: 10px; height: 10px; border-radius: 50%; background: #3FC59A; flex: none }
.toast.error .toast-dot { background: #F97066 }
.toast-msg { flex: 1 }
.toast-x { background: transparent; border: 0; color: #B9C6D3; font-size: 20px; padding: 0 4px; min-height: 0 }
.toast-x:hover { background: transparent; color: #fff }

/* Fenêtres : confirmation, recherche rapide */
.bo-dialog, .bo-palette { border: 0; border-radius: 18px; padding: 0; box-shadow: 0 30px 80px rgba(15,34,54,.35); max-width: min(520px, calc(100vw - 32px)); width: 100% }
.bo-dialog::backdrop, .bo-palette::backdrop { background: rgba(15,34,54,.45) }
.bo-dialog form { padding: 24px }
.bo-dialog h2 { margin: 0 0 8px; font-size: 20px }
.bo-dialog p { margin: 0 0 20px; color: var(--ink-2) }
.bo-dialog-acts { display: flex; justify-content: flex-end; gap: 10px }
button.danger { background: var(--danger); border-color: var(--danger); color: #fff }
button.danger:hover { background: #A2311F; border-color: #A2311F }
button.secondary { background: var(--card) }
.bo-palette { align-self: start; margin-top: 12vh }
.bo-palette input { width: 100%; border: 0; border-bottom: 1px solid var(--line); padding: 18px 20px; font: inherit; font-size: 17px; outline: none; border-radius: 18px 18px 0 0 }
.bo-palette ul { list-style: none; margin: 0; padding: 6px; max-height: 50vh; overflow: auto }
.bo-palette li { display: flex; justify-content: space-between; gap: 10px; padding: 10px 14px; border-radius: 10px; cursor: pointer }
.bo-palette li[aria-selected="true"], .bo-palette li:hover { background: var(--green-soft) }
.bo-palette li small { color: var(--muted) }
.bo-palette .hint { padding: 0 20px 14px; margin: 0; font-size: 12.5px }
.bo-search { display: inline-flex; align-items: center; gap: 10px; background: var(--card); border: 1px solid var(--line); color: var(--muted); font-weight: 600; border-radius: 999px; padding: 6px 12px; min-height: 0 }
.bo-search kbd { font: inherit; font-size: 12px; border: 1px solid var(--line); border-radius: 6px; padding: 1px 6px }

/* Tableau de bord */
.todo-strip { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px; margin: 4px 0 8px }
.todo-card { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 4px 12px; padding: 18px; border-radius: 16px; background: #FFF6E8; border: 1px solid #F1D3A0; color: var(--ink); text-decoration: none }
.todo-card .ico { grid-row: span 2; color: var(--warn) }
.todo-card .big { font-size: 28px; font-weight: 800; line-height: 1 }
.todo-card > span:nth-of-type(2) { grid-column: 2; color: var(--ink-2); font-size: 14px }
.todo-card .go { grid-row: 1 / span 2; grid-column: 3; font-weight: 700; color: var(--warn); font-size: 14px }
a.todo-card:hover { border-color: #D99A2B }
.todo-card.done { background: var(--green-soft); border-color: #BFE0D3 }
.todo-card.done .ico, .todo-card.done .big { color: var(--green-ink) }
.section-title { font-size: 17px; margin: 26px 0 10px }
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 10px }
.kpi { display: grid; gap: 2px; padding: 14px 16px; border-radius: 14px; background: var(--card); border: 1px solid var(--line); text-decoration: none; color: var(--ink) }
.kpi .big { font-size: 24px; font-weight: 800; font-variant-numeric: tabular-nums }
.kpi span:last-child { color: var(--muted); font-size: 13px }
a.kpi:hover { border-color: #9AA8B8 }
.setup { padding: 6px } .setup-row { display: grid; grid-template-columns: auto 1fr auto; gap: 12px; align-items: center; padding: 12px 14px; border-radius: 10px; color: var(--ink); text-decoration: none }
.setup-row small { display: block; color: var(--muted) } .setup-row .go { color: var(--green-ink); font-weight: 700 }
.setup-row:hover { background: var(--paper) }

/* Réglages */
.tabs-bar { position: sticky; top: 61px; z-index: 4; display: flex; gap: 6px; overflow-x: auto; padding: 8px 0; margin: -8px 0 6px; background: var(--paper) }
.tabs-bar a { white-space: nowrap; padding: 7px 13px; border-radius: 999px; border: 1px solid var(--line); background: var(--card); color: var(--ink-2); text-decoration: none; font-weight: 600; font-size: 14px }
.tabs-bar a:hover { border-color: #9AA8B8; color: var(--ink) }
.content section[id] { scroll-margin-top: 120px }
.grid-form { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 14px 18px; align-items: start }
.grid-form label { display: grid; gap: 6px; font-weight: 700; font-size: 14px }
.grid-form label small { font-weight: 500; color: var(--muted); font-size: 12.5px }
.grid-form .wide, .grid-form .form-foot { grid-column: 1 / -1 }
.grid-form .form-foot { display: flex; gap: 10px; justify-content: flex-end; border-top: 1px solid var(--line-2); padding-top: 14px }
.switch { display: flex !important; grid-template-columns: none; align-items: center; gap: 12px !important; cursor: pointer }
.switch input { appearance: none; width: 44px; height: 26px; border-radius: 999px; background: #C3CED9; position: relative; flex: none; cursor: pointer; transition: background .15s; margin: 0 }
.switch input::after { content: ""; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%; background: #fff; transition: transform .15s; box-shadow: 0 1px 2px rgba(0,0,0,.2) }
.switch input:checked { background: var(--green) } .switch input:checked::after { transform: translateX(18px) }
.state { display: flex; align-items: center; gap: 8px; font-weight: 700; margin: 0 0 10px }
.state.ok { color: var(--green-ink) } .state.todo { color: var(--warn) }
.copy code { display: block; padding: 10px 12px; border-radius: 10px; background: var(--paper); overflow-wrap: anywhere; user-select: all }

/* Filtre des tableaux */
.table-filter { display: flex; align-items: center; gap: 10px; margin: 4px 0 10px }
.table-filter input { max-width: 320px }
/* Ajustements après relecture visuelle */
.switch, .switch.wide { flex-direction: row !important; justify-content: flex-start !important; text-align: left !important; align-items: center }
.switch span { font-weight: 700 }
@media (max-width: 760px) {
  .topbar { gap: 8px; flex-wrap: nowrap }
  .bo-search span, .bo-search kbd { display: none }
  .bo-search { padding: 8px; flex: none }
  .me .avatar { display: none }
  .me button { white-space: nowrap; padding: 8px 12px; font-size: 14px }
  .topbar .crumb { min-width: 0; flex: 1 }
  .topbar .crumb > :not(.back):not(b) { display: none }
  .topbar .crumb { flex-wrap: nowrap }
  .topbar .crumb b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap }
  .topbar .back span { display: none }
  .topbar .back { padding: 7px }
}

/* =================== Contenu des pages =================== */
/* En-tête : titre à gauche, action principale à droite (le formulaire d'ajout s'ouvre dans un panneau). */
.page-head { display: grid; grid-template-columns: 1fr auto; column-gap: 20px; align-items: end }
.page-head > :not(.head-actions) { grid-column: 1 }
.page-head .head-actions { grid-column: 2; grid-row: 1 / span 2; display: flex; gap: 10px; align-self: center }
.head-actions button { background: var(--green); color: #fff; border: 0; font-weight: 700; display: inline-flex; align-items: center; gap: 8px; padding: 10px 16px; border-radius: 10px }
.head-actions button::before { content: "+"; font-size: 20px; line-height: 1; font-weight: 500 }
/* Formulaire d'ajout : déplié dans la page, sous le titre */
.add-panel { background: var(--card); border: 1px solid var(--line); border-left: 4px solid var(--green); border-radius: 12px; padding: 18px 22px 22px; margin: 0 0 22px }
.add-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px }
.add-head h2 { margin: 0; font-size: 19px }
.add-head .x { background: none; border: 1px solid var(--line); padding: 6px 12px; min-height: 0; font-weight: 600; color: var(--muted) }
.add-panel form.card { border: 0; padding: 0; margin: 0; background: transparent; box-shadow: none }
.head-actions button.on { background: var(--green-ink, #0B5C41) }
.head-actions button.on::before { content: "−" }
/* Tableaux : actions compactes sur une ligne, lignes cliquables quand elles mènent à une fiche */
table td form { display: inline-block; margin: 0 6px 0 0 }
table td form button, table td > button, table td .btn { padding: 6px 12px; min-height: 0; font-size: 13.5px; border-radius: 8px; white-space: nowrap }
table td:last-child { white-space: nowrap }
tr.row-link { cursor: pointer } tr.row-link:hover td { background: #EEF3F7 }
/* Une seule zone de recherche par page */
.table-filter { display: flex; align-items: center; gap: 10px; margin: 0 0 10px }
.table-filter input { max-width: 340px }
/* Bandeaux de chiffres : autant de colonnes que de chiffres, sans case vide */
.content > .grid, .kpis { display: grid !important; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)) !important }
.content > .grid > *:empty { display: none }
@media (max-width: 760px) { .page-head { grid-template-columns: 1fr } .page-head .head-actions { grid-column: 1; grid-row: auto; margin-top: 12px } }
body.bo.side-open .side-toggle .ico { transform: scaleX(-1) }
/* Mon espace : mise en garde sur la page du lien, connexions actives */
.warn-box { background: #FDECEA; color: #7A1A12; padding: 12px 14px; border-radius: 12px; text-align: left }
.sess-list { list-style: none; padding: 0; margin: 12px 0 0; display: flex; flex-direction: column; gap: 10px }
.sess-list li { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 12px }
.sess-list li span { display: flex; flex-direction: column; gap: 2px }
.sess-list small { color: var(--muted) }
.sess-list em.pill { font-style: normal; margin-left: 6px }
/* Mon espace : confirmation d'une action sensible sur le téléphone relié */
dialog.approve-box { max-width: 460px; width: calc(100vw - 32px); border: 0; border-radius: 18px; padding: 24px; box-shadow: 0 24px 60px rgba(15,34,54,.3) }
dialog.approve-box::backdrop { background: rgba(15,34,54,.45) }
dialog.approve-box h2 { margin: 0 0 10px }
.approve-wait { display: flex; gap: 10px; align-items: center; background: #EEF3FF; padding: 12px 14px; border-radius: 12px }
.approve-wait .spin { width: 16px; height: 16px; border: 2px solid #3155f5; border-right-color: transparent; border-radius: 50%; animation: spin .9s linear infinite; flex: none }
@keyframes spin { to { transform: rotate(360deg) } }
.approve-actions { display: flex; gap: 10px; flex-wrap: wrap }
/* =================== Mon espace : écrans d'une seule tâche (connexion, sécurité) =================== */
.task { max-width: 460px; margin: 28px auto 40px; padding: 0 16px }
.task-card { background: #fff; border: 1px solid #E0E5EF; border-radius: 24px; padding: 28px 24px 24px; box-shadow: 0 18px 50px rgba(37,61,128,.07) }
.task-ic { width: 56px; height: 56px; border-radius: 18px; display: grid; place-items: center; margin-bottom: 18px }
.task-ic svg { width: 28px; height: 28px }
.task-ic.blue { background: #EDF0FF; color: #3155F5 } .task-ic.red { background: #FDECEA; color: #B42318 }
.task-ic.green { background: #E5F7ED; color: #08765F } .task-ic.warn { background: #FFF1DF; color: #B45309 }
.task-card h1 { font-size: 27px; line-height: 1.15; letter-spacing: -.03em; margin: 0 0 10px; color: #101828 }
.task-lead { font-size: 17px; line-height: 1.5; color: #344054; margin: 0 0 14px }
.task-sub { font-weight: 700; color: #101828; margin: 18px 0 6px }
.mail-chip { display: block; background: #F4F6FB; border-radius: 12px; padding: 12px 14px; font-weight: 700; font-size: 15.5px; color: #101828; overflow-wrap: anywhere; margin: -4px 0 18px }
.task-steps { margin: 0 0 20px; padding: 0; list-style: none; counter-reset: s; display: flex; flex-direction: column; gap: 10px }
.task-steps li { counter-increment: s; display: grid; grid-template-columns: 28px 1fr; gap: 10px; align-items: start; color: #344054; line-height: 1.45 }
.task-steps li::before { content: counter(s); width: 26px; height: 26px; border-radius: 50%; background: #EDF0FF; color: #2344D0; font-weight: 800; font-size: 14px; display: grid; place-items: center }
.task-checks { margin: 0 0 22px; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 10px }
.task-checks li { position: relative; padding-left: 30px; color: #344054; line-height: 1.45 }
.task-checks li::before { content: ""; position: absolute; left: 4px; top: 4px; width: 14px; height: 8px; border-left: 2.5px solid #08765F; border-bottom: 2.5px solid #08765F; transform: rotate(-45deg) }
.task-btn { display: flex; align-items: center; justify-content: center; width: 100%; min-height: 54px; border: 0; border-radius: 14px; background: #3155F5; color: #fff !important; font: inherit; font-weight: 700; font-size: 17px; text-decoration: none !important; cursor: pointer; margin: 4px 0 0 }
.task-btn:hover { background: #2344D0 } .task-btn:disabled { opacity: .6 }
.task-btn.danger { background: #B42318 } .task-btn.danger:hover { background: #912018 }
.callout { border-radius: 14px; padding: 14px 16px; font-size: 15px; line-height: 1.5; margin: 18px 0 0 }
.callout.danger { background: #FEF3F2; color: #7A271A; border: 1px solid #FECDCA }
.task-more { margin: 18px 0 0; font-size: 15px; color: #667085; text-align: center }
.task-more a { color: #2344D0; font-weight: 600 }
/* Pied de page discret sur ces écrans : on garde les liens, sans le grand bandeau sombre */
body.task-page .me-foot { background: transparent !important; color: #667085 !important; padding: 8px 0 24px !important; font-size: 13px !important }
body.task-page .me-foot p:first-child { display: none }
body.task-page .me-foot a { color: #475467 !important }
body.task-page main, body.task-page #view { min-height: auto }
/* Longs tableaux, détails techniques, chiffres */
tr.paged-out { display: none }
.table-more { display: block; margin: 10px auto 0; background: var(--card); border: 1px solid var(--line); color: var(--ink); font-weight: 600; padding: 9px 16px; border-radius: 10px }
table td code, table td pre { display: inline-block; max-width: 420px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; vertical-align: bottom; cursor: zoom-in }
table td code.open, table td pre.open { white-space: pre-wrap; overflow: visible; max-width: 560px; cursor: zoom-out }
.content .stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 12px; margin: 16px 0 }
.content .stats .stat { display: flex; flex-direction: column-reverse; gap: 4px; background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px }
.content .stats .stat b { font-size: 26px; line-height: 1.1 } .content .stats .stat span { color: var(--muted); font-size: 13.5px }
/* Liens du site : une ligne par lien, champs côte à côte */
table.links td form.row-form { display: grid !important; grid-template-columns: 1fr 1fr auto auto auto; gap: 8px; align-items: center; margin: 0 }
table.links td form.row-form input:not([type=checkbox]) { min-width: 0 }
table.links td form.row-form label.check { white-space: nowrap }
@media (max-width: 900px) { table.links td form.row-form { grid-template-columns: 1fr } }
/* Démonstration (demo.backoffice., demo.partenaires.) */
.demo-bar { display: flex; align-items: center; gap: 10px; padding: 8px clamp(16px, 3vw, 36px); background: #FFF4DB; color: #7A4A00; font-size: 13.5px; border-bottom: 1px solid #F2D9A6 }
.demo-login { background: #FFF8E8; border: 1px solid #F2D9A6; border-radius: 14px; padding: 14px 16px; margin: 0 0 18px }
.demo-login p { margin: 0 0 10px } .demo-login .hint { margin: 10px 0 0 }
.demo-login form { margin: 0 0 8px }
.demo-login form button { display: flex; width: 100%; justify-content: space-between; align-items: center; gap: 10px; background: #fff; border: 1px solid #E6D3A8; color: #1A2B3C; padding: 10px 14px; border-radius: 10px; text-align: left }
.demo-login form button span { color: #6B7785; font-size: 13.5px; font-weight: 500 }
.demo-login form button:hover { border-color: #C9A85A }
