/* Atelier cyber · charte « Carnet » (maquette 3 choisie le 26/11/2026), mode clair « Bandeau vert-bleu » (27/11/2026).
   Fond vert d'eau, cartes blanches, gris neutres, accent vert-bleu, police Inter (embarquée : fonctionne sans réseau).
   Conçue d'abord pour l'iPhone (barre d'onglets en bas), puis élargie pour l'ordinateur (barre de navigation en haut). */

@font-face {
  font-family: "Inter";
  src: url("/static/inter.woff2") format("woff2");
  font-weight: 100 900; font-style: normal; font-display: swap;
}

:root {
  --bg: #F1F6F6;
  --surface: #FFFFFF;
  --surface-2: #E5EFEE;
  --fill: #E5EFEE;
  --fill-strong: #CBDCDA;
  --text: #0B1F1E;
  --muted: #3F5654;
  --faint: #8AA3A0;
  --border: #CFE0DE;
  --accent: #0F766E;
  --accent-strong: #115E59;
  --accent-soft: #D7EFEB;
  --accent-line: #5EBFB2;
  --link: #0F766E;
  --on-accent: #FFFFFF;
  --ok: #15803D;
  --ok-soft: #F0FDF4;
  --warn: #B45309;
  --warn-soft: #FFFBEB;
  --danger: #B91C1C;
  --danger-soft: #FEF2F2;
  --danger-line: #FECACA;
  --dot-ok: #16A34A;
  --dot-warn: #F59E0B;
  --dot-danger: #DC2626;
  --dot-info: #0F766E;
  --dot-teal: #0891B2;
  --dot-purple: #7C3AED;
  --dot-gray: #A1A1AA;
  --bar-bg: rgba(255, 255, 255, .92);
  --side-bg: #E4EFEE;
  --seg-on: #FFFFFF;
  --bubble: #F4F4F5;
  --sheet-bg: #F1F6F6;
  --sheet-card: #FFFFFF;
  --shadow: 0 0 0 1px var(--border), 0 2px 6px -3px rgba(15, 94, 89, .18);
  --shadow-lg: 0 8px 20px -8px rgba(15, 118, 110, .6);
  --radius: 12px;
  --radius-sm: 8px;
  --font: "Inter", -apple-system, BlinkMacSystemFont, "Helvetica Neue", "Segoe UI", Roboto, sans-serif;
  --font-display: var(--font);
  --mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  --tabbar-h: 76px; /* barre flottante (62 px) et sa marge */
  color-scheme: light;
}
/* Thème sombre : suit l'appareil (« Système », par défaut) ou est imposé depuis les Réglages
   (attribut data-theme sur <html>, posé avant l'affichage par le script de base.html). */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0B1420;
    --surface: #13202F;
    --surface-2: #1B2B3D;
    --fill: #1B2B3D;
    --fill-strong: #26394F;
    --text: #E6EEF6;
    --muted: #93A6BB;
    --faint: #5E738B;
    --border: #22344A;
    --accent: #0D9488;
    --accent-strong: #2DD4BF;
    --accent-soft: rgba(45, 212, 191, .14);
    --accent-line: rgba(45, 212, 191, .4);
    --link: #5EEAD4;
    --ok: #4ADE80;
    --ok-soft: rgba(74, 222, 128, .14);
    --warn: #FBBF24;
    --warn-soft: rgba(251, 191, 36, .14);
    --danger: #FB7185;
    --danger-soft: rgba(248, 113, 113, .14);
    --danger-line: rgba(248, 113, 113, .4);
    --dot-ok: #4ADE80;
    --dot-warn: #FBBF24;
    --dot-danger: #FB7185;
    --dot-info: #2DD4BF;
    --dot-teal: #22D3EE;
    --dot-purple: #A78BFA;
    --dot-gray: #71717A;
    --bar-bg: rgba(19, 32, 47, .94);
    --side-bg: #0F1A28;
    --seg-on: #26394F;
    --bubble: #1B2B3D;
    --sheet-bg: #0F1A28;
    --sheet-card: #13202F;
    --shadow: 0 0 0 1px var(--border), 0 8px 24px -12px rgba(0, 0, 0, .6);
    --shadow-lg: 0 12px 32px -12px rgba(0, 0, 0, .7);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #0B1420;
  --surface: #13202F;
  --surface-2: #1B2B3D;
  --fill: #1B2B3D;
  --fill-strong: #26394F;
  --text: #E6EEF6;
  --muted: #93A6BB;
  --faint: #5E738B;
  --border: #22344A;
  --accent: #0D9488;
  --accent-strong: #2DD4BF;
  --accent-soft: rgba(45, 212, 191, .14);
  --accent-line: rgba(45, 212, 191, .4);
  --link: #5EEAD4;
  --ok: #4ADE80;
  --ok-soft: rgba(74, 222, 128, .14);
  --warn: #FBBF24;
  --warn-soft: rgba(251, 191, 36, .14);
  --danger: #FB7185;
  --danger-soft: rgba(248, 113, 113, .14);
  --danger-line: rgba(248, 113, 113, .4);
  --dot-ok: #4ADE80;
  --dot-warn: #FBBF24;
  --dot-danger: #FB7185;
  --dot-info: #2DD4BF;
  --dot-teal: #22D3EE;
  --dot-purple: #A78BFA;
  --dot-gray: #71717A;
  --bar-bg: rgba(19, 32, 47, .94);
  --side-bg: #0F1A28;
  --seg-on: #26394F;
  --bubble: #1B2B3D;
  --sheet-bg: #0F1A28;
  --sheet-card: #13202F;
  --shadow: 0 0 0 1px var(--border), 0 8px 24px -12px rgba(0, 0, 0, .6);
  --shadow-lg: 0 12px 32px -12px rgba(0, 0, 0, .7);
  color-scheme: dark;
}

/* ---------- Base ---------- */
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
html, body { margin: 0; padding: 0; }
body {
  background: var(--bg);
  color: var(--text);
  font: 16px/1.5 var(--font);
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
}
a { color: var(--link); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3, h4 { line-height: 1.2; margin: 0 0 .5em; text-wrap: balance; }
h1 { font-family: var(--font-display); font-size: 2rem; font-weight: 700; letter-spacing: -.022em; }
h2 { font-size: 1.25rem; font-weight: 600; letter-spacing: -.012em; margin-top: 1.6em; }
h3 { font-size: 1.0625rem; font-weight: 600; letter-spacing: -.01em; }
p { margin: 0 0 .7em; }
small, .muted { color: var(--muted); }
.small { font-size: .875rem; }
ul { padding-left: 1.2em; margin: .3em 0 .8em; }
li { margin: .25em 0; }
kbd { font-family: var(--mono); font-size: .75rem; padding: 0 5px; border-radius: 5px; border: 1px solid var(--border); color: var(--muted); }
.ic { width: 1.2em; height: 1.2em; flex: none; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; vertical-align: -.22em; }
.num { font-variant-numeric: tabular-nums; }
.eyebrow { font-size: .8125rem; font-weight: 600; letter-spacing: .01em; text-transform: uppercase; color: var(--muted); }
@media (max-width: 899px) { .only-desktop { display: none !important; } }

/* ---------- Mise en page : iPhone d'abord ---------- */
.shell { min-height: 100vh; min-height: 100dvh; }
.side { display: none; }
.main {
  min-width: 0; overflow-wrap: anywhere;
  /* Sur iPhone (iOS 26), Safari floute une bande sous la barre d'état : le titre doit commencer en dessous. */
  padding-top: calc(env(safe-area-inset-top, 0px) + 32px);
  padding-bottom: calc(var(--tabbar-h) + env(safe-area-inset-bottom, 0px) + 32px);
  padding-left: max(16px, env(safe-area-inset-left, 0px));
  padding-right: max(16px, env(safe-area-inset-right, 0px));
}
.tabbar {
  position: fixed; z-index: 40; left: 0; right: 0; bottom: 0;
  display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); align-items: start;
  height: calc(var(--tabbar-h) + env(safe-area-inset-bottom, 0px));
  padding: 5px max(6px, env(safe-area-inset-right, 0px)) env(safe-area-inset-bottom, 0px) max(6px, env(safe-area-inset-left, 0px));
  background: var(--bar-bg);
  -webkit-backdrop-filter: saturate(180%) blur(20px); backdrop-filter: saturate(180%) blur(20px);
  border-top: .5px solid var(--border);
}
.tabbar a { position: relative; display: flex; flex-direction: column; align-items: center; gap: 2px; padding-top: 1px; font-size: .656rem; font-weight: 500; color: var(--muted); text-decoration: none; }
.tabbar a.active { color: var(--link); }
.tabbar .ic { width: 26px; height: 26px; stroke-width: 1.8; }
.tab-badge { position: absolute; top: -3px; left: calc(50% + 5px); min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: var(--dot-danger); color: #FFFFFF; font-size: .6875rem; font-weight: 600; line-height: 18px; text-align: center; }

.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px 16px; margin: 4px 0 18px; flex-wrap: wrap; }
.page-head h1 { margin: 0; }
.page-head p { color: var(--muted); margin: 4px 0 0; }

.grid { display: grid; gap: 12px; }
.grid-2 { grid-template-columns: minmax(0, 1fr); }
@media (min-width: 700px) {
  .grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

.card { background: var(--surface); border-radius: var(--radius); padding: 16px; box-shadow: var(--shadow); min-width: 0; }
.card > h2:first-child, .card > h3:first-child { margin-top: 0; }
.card > p:last-child, .card > ul:last-child { margin-bottom: 0; }
.kicker { font-size: .78rem; font-weight: 600; letter-spacing: .02em; text-transform: uppercase; color: var(--muted); margin-bottom: 6px; }
.stat { font-family: var(--font-display); font-size: 1.875rem; font-weight: 700; letter-spacing: -.02em; line-height: 1.1; font-variant-numeric: tabular-nums; }
.lead { font-size: 1.0625rem; }
.stack-sm > * + * { margin-top: 8px; }
.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.row-between { display: flex; gap: 10px; align-items: center; justify-content: space-between; flex-wrap: wrap; }

/* En-têtes de section façon liste groupée iOS */
.section-label { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; padding: 8px 4px 0; font-size: .8125rem; font-weight: 500; letter-spacing: .02em; text-transform: uppercase; color: var(--muted); }
.section-label a { text-transform: none; letter-spacing: 0; font-size: .9375rem; font-weight: 500; }
.footnote { font-size: .8125rem; color: var(--muted); padding: 0 4px; margin: 0; }

/* ---------- Boutons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  min-height: 40px; padding: 8px 16px; border: 0; border-radius: var(--radius-sm);
  background: var(--fill); color: var(--link);
  font: inherit; font-size: .9375rem; font-weight: 600; line-height: 1.2;
  cursor: pointer; white-space: nowrap; text-decoration: none;
  transition: background-color .15s ease, opacity .15s ease;
}
.btn:hover { background: var(--fill-strong); text-decoration: none; }
.btn:active { opacity: .7; }
.btn-primary { background: var(--accent); color: var(--on-accent); }
.btn-primary:hover { background: var(--accent-strong); }
.btn-sm { min-height: 32px; padding: 5px 12px; font-size: .875rem; border-radius: 8px; }
.btn-ghost { background: transparent; }
.btn-ghost:hover { background: var(--fill); }
.btn-danger { color: var(--danger); }
.btn-block { width: 100%; }
.btn-icon { position: relative; width: 36px; min-height: 36px; height: 36px; padding: 0; border-radius: 50%; }
.btn-icon .ic { width: 18px; height: 18px; }
.btn-icon::after, .fav::after { content: ""; position: absolute; inset: -4px; border-radius: 50%; }
.btn-alert { position: absolute; top: 3px; right: 3px; width: 9px; height: 9px; border-radius: 50%; background: var(--dot-warn); box-shadow: 0 0 0 2px var(--bg); }
.btn-alert.danger { background: var(--dot-danger); }
.btn[disabled] { opacity: .55; cursor: progress; }
.btn:focus-visible, .chip:focus-visible, a:focus-visible, button:focus-visible, summary:focus-visible { outline: 2px solid var(--link); outline-offset: 2px; border-radius: 6px; }

/* ---------- Étiquettes, pastilles ---------- */
.badge { display: inline-flex; align-items: center; gap: 4px; padding: 2px 9px; border-radius: 99px; font-size: .78rem; font-weight: 600; line-height: 1.5; background: var(--fill); color: var(--muted); white-space: nowrap; }
.badge-accent { background: var(--accent-soft); color: var(--link); }
.badge-ok { background: var(--ok-soft); color: var(--ok); }
.badge-warn { background: var(--warn-soft); color: var(--warn); }
.badge-danger { background: var(--danger-soft); color: var(--danger); }
.nat { display: inline-flex; align-items: center; gap: 6px; font-size: .8125rem; font-weight: 500; color: var(--muted); }
.nat::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--nat, var(--dot-gray)); flex: none; }
.nat-incidents { --nat: var(--dot-danger); }
.nat-vulnerabilites { --nat: var(--dot-warn); }
.nat-reglementation { --nat: var(--dot-info); }
.nat-local { --nat: var(--dot-teal); }
.nat-tendances { --nat: var(--dot-purple); }
.nat-marche { --nat: var(--dot-gray); }
.chips { display: flex; gap: 8px; flex-wrap: wrap; }
.chip { display: inline-flex; align-items: center; padding: 6px 12px; border: 0; border-radius: 99px; background: var(--fill); color: var(--text); font: inherit; font-size: .875rem; font-weight: 500; cursor: pointer; }
.chip:hover { background: var(--fill-strong); text-decoration: none; }
.chip.on { background: var(--accent-soft); color: var(--link); font-weight: 600; }
.ico-tile { width: 30px; height: 30px; flex: none; display: grid; place-items: center; border-radius: 8px; background: var(--accent); color: #FFFFFF; }
.ico-tile .ic { width: 17px; height: 17px; vertical-align: 0; }
.ico-teal { background: var(--dot-teal); }
.ico-orange { background: var(--dot-warn); }
.ico-gray { background: var(--dot-gray); }

/* ---------- Formulaires ---------- */
label { display: block; font-weight: 600; font-size: .875rem; margin-bottom: 6px; }
.hint { font-weight: 400; color: var(--muted); font-size: .8125rem; }
input[type=text], input[type=date], input[type=time], input[type=number], input[type=tel], input[type=search], input[type=url], input[type=email], select, textarea {
  width: 100%; font: inherit; font-size: 1rem; color: var(--text);
  background: var(--fill); border: 1px solid transparent; border-radius: var(--radius-sm);
  padding: 10px 12px; -webkit-appearance: none; appearance: none;
}
input::placeholder, textarea::placeholder { color: var(--muted); opacity: .8; }
select {
  padding-right: 34px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%238E8E93' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m7 10 5 5 5-5'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 10px center; background-size: 16px;
}
textarea { min-height: 90px; resize: vertical; }
input[type=checkbox], input[type=radio] { accent-color: var(--accent); width: 18px; height: 18px; margin: 0; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.field { margin-bottom: 14px; }
.searchfield { position: relative; display: block; }
.searchfield .ic { position: absolute; left: 10px; top: 50%; transform: translateY(-50%); width: 17px; height: 17px; color: var(--muted); pointer-events: none; }
.searchfield input { padding: 8px 12px 8px 34px; min-height: 38px; border-radius: 11px; }
.searchfield kbd { position: absolute; right: 9px; top: 50%; transform: translateY(-50%); pointer-events: none; }

/* ---------- Progression, messages ---------- */
.progress { height: 6px; background: var(--fill); border-radius: 99px; overflow: hidden; }
.progress > span { display: block; height: 100%; background: var(--accent); border-radius: 99px; }
.progress.ok > span { background: var(--dot-ok); }
.progress.warn > span { background: var(--dot-warn); }
.progress.danger > span { background: var(--dot-danger); }
.notice { border-radius: 12px; padding: 12px 14px; background: var(--accent-soft); color: var(--text); font-size: .9375rem; }
.notice.warn { background: var(--warn-soft); }
.notice.danger { background: var(--danger-soft); }
.notice strong { color: inherit; }
.empty { text-align: center; color: var(--muted); padding: 28px 12px; }
.ring { width: 64px; height: 64px; flex: none; }
.ring-track, .ring-val { fill: none; stroke-width: 7; }
.ring-track { stroke: var(--fill); }
.ring-val { stroke: var(--accent); stroke-linecap: round; transform: rotate(-90deg); transform-origin: 32px 32px; }

/* ---------- Listes ---------- */
/* Liste groupée iOS : lignes avec séparateurs décalés et chevron */
.rows { background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; }
.rows > a, .rows > div, .rows > label, .rows > button { position: relative; display: flex; align-items: center; gap: 12px; min-height: 48px; padding: 10px 14px 10px 16px; color: var(--text); text-decoration: none; }
.rows > a:hover { background: var(--fill); text-decoration: none; }
.rows > * + *::before { content: ""; position: absolute; top: 0; left: 16px; right: 0; border-top: .5px solid var(--border); }
.rows > .with-tile + *::before, .rows > * + .with-tile::before { left: 58px; }
.row-main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.row-title { font-weight: 500; }
.row-sub { font-size: .8125rem; color: var(--muted); }
.chev { width: 16px; height: 16px; color: var(--faint); stroke-width: 2.6; }

/* ---------- Composants partagés ---------- */
/* Élément sélectionné d'un contrôle segmenté (onglets, choix exclusif) */
.seg a.on, .seg > button.on, .notion-tabs button.on, .seg-radio input:checked + span { background: var(--seg-on); box-shadow: 0 1px 3px rgba(0, 0, 0, .14); }
/* Bande qui défile horizontalement, sans barre de défilement visible */
.chips.scroll, .actions-row, .sommaire, .notion-tabs { overflow-x: auto; scrollbar-width: none; }
.chips.scroll::-webkit-scrollbar, .actions-row::-webkit-scrollbar, .sommaire::-webkit-scrollbar, .notion-tabs::-webkit-scrollbar { display: none; }
/* Carte repliable (<details>) : titre sur une ligne, chevron qui pivote à l'ouverture */
.fsec, .domaine { background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; }
.fsec > summary, .domaine > summary { display: flex; align-items: center; cursor: pointer; color: var(--text); font-weight: 400; }
.fsec > summary, .domaine > summary, .reveal > summary { list-style: none; }
.fsec > summary::-webkit-details-marker, .domaine > summary::-webkit-details-marker, .reveal > summary::-webkit-details-marker { display: none; }
.fsec > summary:hover, .domaine > summary:hover { background: var(--fill); }
.fsec[open] .disclosure, .domaine[open] .disclosure { transform: rotate(90deg); }

/* ---------- Veille ---------- */
.veille-layout { display: grid; gap: 20px; align-items: start; }
.veille-main { display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.searchrow { display: flex; gap: 8px; align-items: center; }
.searchrow .searchfield { flex: 1; min-width: 0; }
.btn-tinted { background: var(--accent-soft); color: var(--link); }
.btn-tinted:hover { background: color-mix(in srgb, var(--accent) 30%, transparent); }
.btn-filtres { flex: none; min-height: 38px; padding: 0 12px; border-radius: 11px; }
.btn-filtres .ic { width: 17px; height: 17px; }
.count-inline { min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: var(--accent); color: #FFFFFF; font-size: .6875rem; font-weight: 700; line-height: 18px; text-align: center; }
.count-label { text-transform: none; letter-spacing: 0; }
/* Contrôle segmenté iOS */
.seg { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); padding: 2px; border-radius: 9px; background: var(--fill); }
.seg a { display: flex; align-items: center; justify-content: center; gap: 6px; padding: 6px 10px; border-radius: 7px; font-size: .875rem; font-weight: 600; color: var(--text); text-decoration: none; white-space: nowrap; }
.seg .ic { width: 15px; height: 15px; }
.chips.scroll { flex-wrap: nowrap; margin: 0 -16px; padding: 2px 16px; }
.chips.scroll .chip { flex: none; }
.chip .ic { width: 14px; height: 14px; margin-left: 5px; }
.chip-static { cursor: default; }
.chip-static:hover { background: var(--fill); }
/* Carte d'un sujet : toute la carte s'ouvre, l'étoile reste à part */
.sujet-list { display: flex; flex-direction: column; gap: 10px; }
.sujet-card { position: relative; background: var(--surface); border-radius: var(--radius); padding: 13px 16px 15px; box-shadow: var(--shadow); scroll-margin-top: 16px; transition: background-color .15s ease; }
.sujet-card:has(.sujet-open:active) { background: var(--surface-2); }
.sujet-card:target { box-shadow: 0 0 0 2px var(--accent); }
.sujet-meta { display: flex; align-items: center; flex-wrap: wrap; gap: 4px 8px; padding-right: 34px; font-size: .8125rem; color: var(--muted); }
.sujet-meta .badge .ic { width: 12px; height: 12px; }
.sujet-sect::before { content: "·"; margin-right: 8px; }
.sujet-card h3 { margin: 6px 0 4px; font-size: 1.0625rem; line-height: 1.3; }
.sujet-open { all: unset; cursor: pointer; }
.sujet-open::after { content: ""; position: absolute; inset: 0; border-radius: inherit; }
.sujet-open:focus-visible::after { outline: 2px solid var(--link); outline-offset: 2px; }
.clamp { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; margin: 0; color: var(--muted); font-size: .9375rem; line-height: 1.45; }
.clamp-2 { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.fav { position: absolute; z-index: 2; top: 6px; right: 6px; width: 38px; height: 38px; display: grid; place-items: center; padding: 0; border: 0; border-radius: 50%; background: none; color: var(--faint); cursor: pointer; }
.fav:hover { background: var(--fill); }
.fav .ic { width: 20px; height: 20px; }
.fav.on { color: var(--dot-warn); }
.fav.on .ic, .fav-btn.on .ic { fill: currentColor; }
/* Lecture d'un sujet (dans une feuille) */
.sujet-full h2 { margin: 8px 0 10px; font-size: 1.375rem; letter-spacing: -.015em; }
.sujet-full > p { font-size: 1.0625rem; line-height: 1.5; }
.sujet-full .chips { margin: 10px 0 4px; }
.sujet-full .section-label { margin-top: 8px; margin-bottom: 8px; }
.bloc { margin: 10px 0; padding: 12px 14px; border-radius: 12px; background: var(--sheet-card); }
.bloc p:last-child { margin-bottom: 0; }
.bloc .kicker { margin-bottom: 4px; }
.bloc-angle { background: var(--accent-soft); }
.bloc-angle .kicker { color: var(--link); }
.sheet-actions { display: flex; flex-direction: column; gap: 8px; margin-top: 14px; }
.sujet-chargement { display: grid; place-items: center; min-height: 160px; }
.fav-btn .fav-on { display: none; }
.fav-btn.on { color: var(--dot-warn); }
.fav-btn.on .fav-on { display: inline; }
.fav-btn.on .fav-off { display: none; }
/* Choix en pastilles (boutons radio) et interrupteur façon iOS */
.choice-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.choice-chips label { position: relative; margin: 0; font-weight: 500; font-size: .875rem; }
.choice-chips input { position: absolute; opacity: 0; width: 1px; height: 1px; pointer-events: none; }
.choice-chips span { display: inline-flex; padding: 7px 13px; border-radius: 99px; background: var(--fill); color: var(--text); cursor: pointer; }
.sheet .choice-chips span { background: var(--sheet-card); }
.choice-chips input:checked + span { background: var(--accent); color: #FFFFFF; font-weight: 600; }
.choice-chips input:focus-visible + span { outline: 2px solid var(--link); outline-offset: 2px; }
.switch-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 0; font-size: 1rem; font-weight: 400; cursor: pointer; }
input.switch { -webkit-appearance: none; appearance: none; position: relative; flex: none; width: 51px; height: 31px; margin: 0; border-radius: 99px; background: var(--fill-strong); cursor: pointer; transition: background-color .2s ease; }
input.switch::before { content: ""; position: absolute; top: 2px; left: 2px; width: 27px; height: 27px; border-radius: 50%; background: #FFFFFF; box-shadow: 0 2px 5px rgba(0, 0, 0, .25); transition: transform .2s ease; }
input.switch:checked { background: var(--dot-ok); }
input.switch:checked::before { transform: translateX(20px); }
input.switch:focus-visible { outline: 2px solid var(--link); outline-offset: 2px; }
/* Page d'un digest */
.backbar { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin: 0 0 4px; font-size: 1.0625rem; }
.backbar a { display: inline-flex; align-items: center; gap: 4px; }
.backbar a:first-child { margin-left: -6px; }
.backbar .ic { width: 22px; height: 22px; }
.backbar a + a .ic { width: 16px; height: 16px; }
.digest-meta { font-size: .875rem; }
.digest-page { display: flex; flex-direction: column; gap: 12px; }
.ess-link { display: flex; flex-direction: column; gap: 4px; color: inherit; text-decoration: none; }
.ess-link:hover { text-decoration: none; color: inherit; }
.ess-link:hover span:last-child { text-decoration: underline; text-decoration-color: var(--faint); }

/* ---------- Fiche client ---------- */
.rdv-page { display: flex; flex-direction: column; gap: 12px; max-width: 760px; }
.rdv-cta { margin-top: 6px; }
.form-group { display: flex; flex-direction: column; gap: 0; padding: 0; overflow: hidden; }
.form-group > input, .form-group > .inline-field { border-radius: 0; background: transparent; border: 0; padding: 13px 16px; }
.form-group > * + * { border-top: .5px solid var(--border) !important; }
.form-group > input:focus { box-shadow: inset 0 0 0 2px var(--accent-soft); }
.inline-field { display: flex; align-items: center; gap: 12px; margin: 0; font-weight: 400; font-size: 1rem; }
.inline-field > span { flex: none; width: 64px; color: var(--muted); }
.inline-field input, .inline-field select { flex: 1; min-width: 0; padding: 0 28px 0 0; background-color: transparent; border: 0; border-radius: 0; min-height: 22px; }
.inline-field input:focus, .inline-field select:focus { box-shadow: none; }
.sheet .form-group { background: var(--sheet-card); }
.sheet textarea { background: var(--sheet-card); }
.sheet .rows { background: var(--sheet-card); }
.fiche-head { margin: 2px 0 12px; }
.fiche-head h1 { margin: 2px 0 4px; }
.fiche-head p { margin: 0; }
.actions-row { display: flex; gap: 8px; margin: 0 -16px 12px; padding: 0 16px; }
.actions-row .btn { flex: none; }
.seg > button { display: flex; align-items: center; justify-content: center; padding: 7px 8px; border: 0; border-radius: 7px; background: none; font: inherit; font-size: .875rem; font-weight: 600; color: var(--text); cursor: pointer; white-space: nowrap; }
.fiche-tabs { margin-bottom: 14px; }
.tab-panel.fiche-panel.on { display: flex; flex-direction: column; gap: 8px; }
.notes-preview { background: color-mix(in srgb, var(--dot-warn) 10%, var(--surface)); }
.dotlist { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 12px; }
.dotlist li { position: relative; margin: 0; padding-left: 22px; line-height: 1.45; }
.dotlist li::before { content: ""; position: absolute; left: 4px; top: .55em; width: 7px; height: 7px; border-radius: 50%; background: var(--accent); }
.dotlist.q li { padding-left: 30px; }
.dotlist.q li::before { content: "?"; left: 0; top: 1px; width: 20px; height: 20px; display: grid; place-items: center; font-size: .75rem; font-weight: 700; color: var(--link); background: var(--accent-soft); }
.dotlist.warn li::before { background: var(--dot-warn); }
.dotlist .obj { display: block; margin-top: 2px; }
.warnbox { padding: 14px 16px; border-radius: var(--radius); background: color-mix(in srgb, var(--dot-warn) 13%, var(--surface)); border: 1px solid color-mix(in srgb, var(--dot-warn) 35%, transparent); line-height: 1.45; margin-top: 4px; }
.warnbox b { display: block; margin-bottom: 3px; font-size: .75rem; letter-spacing: .06em; text-transform: uppercase; color: var(--warn); }
.axes { display: flex; flex-direction: column; gap: 14px; }
.axe { display: grid; grid-template-columns: 26px minmax(0, 1fr); gap: 10px; align-items: start; }
.axe p { margin: 3px 0 0; }
.axe-num { width: 26px; height: 26px; display: grid; place-items: center; border-radius: 50%; background: var(--accent); color: #FFFFFF; font-size: .8125rem; font-weight: 700; }
.fsec .axe + .axe { margin-top: 14px; }
/* Sommaire collant de la fiche complète */
.sommaire { position: sticky; top: 0; z-index: 5; flex-wrap: nowrap; margin: 0 -16px; padding: 8px 16px; background: var(--bg); }
.sommaire .chip { flex: none; }
.bloc-fiche { display: flex; flex-direction: column; gap: 8px; scroll-margin-top: 56px; margin-top: 8px; }
.bloc-titre { margin: 12px 4px 2px; font-size: 1.375rem; letter-spacing: -.015em; }
/* Section repliable */
.fsec > summary { gap: 10px; padding: 13px 14px 13px 16px; }
.fsec[open] > summary { border-bottom: .5px solid var(--border); }
.fsec .count { font-size: .8125rem; color: var(--muted); font-variant-numeric: tabular-nums; }
.fsec-body { padding: 14px 16px 16px; }
.fsec-body > p:last-child { margin-bottom: 0; }
.kv { display: grid; grid-template-columns: minmax(84px, 32%) minmax(0, 1fr); gap: 10px 14px; margin: 0; }
.kv dt { color: var(--muted); font-size: .875rem; }
.kv dd { margin: 0; }
.item + .item { margin-top: 14px; padding-top: 14px; border-top: .5px solid var(--border); }
.item p { margin: 4px 0 0; }
.accent-text { color: var(--link); }
.besoin-item { padding-left: 12px; }
.prio { font-size: .8125rem; color: var(--muted); }
.prio-haute .prio { color: var(--danger); font-weight: 600; }
.prio-moyenne .prio { color: var(--warn); font-weight: 600; }
.objection-item + .objection-item { margin-top: 10px; }
.objection-item > summary { white-space: normal; font-weight: 500; color: var(--text); }
.rows > .row-btn { width: 100%; border: 0; background: none; font: inherit; color: var(--link); cursor: pointer; text-align: left; }
.rows > .row-btn:hover { background: var(--fill); }
.rows > .row-btn.danger { color: var(--danger); }
.row-btn .ic { width: 18px; height: 18px; }

/* Chiffres du jour */
.chiffres-page { display: flex; flex-direction: column; gap: 10px; max-width: 760px; }
.chiffre-card { display: flex; flex-direction: column; gap: 6px; }
.chiffre-card p { margin: 0; }
.chiffre-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 6px; }
.chiffre-foot a { display: inline-flex; align-items: center; gap: 2px; }
.chiffre-foot .chev { color: inherit; }
.head-actions { gap: 8px; flex-wrap: nowrap; }

/* Préparation longue (fiche client, fiche notion) */
.prep-head { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; }
.etapes { list-style: none; margin: 4px 0; padding: 0; display: flex; flex-direction: column; gap: 12px; }
.etapes li { display: flex; align-items: center; gap: 12px; margin: 0; color: var(--muted); }
.etapes .puce { flex: none; width: 22px; height: 22px; display: grid; place-items: center; border-radius: 50%; border: 1.5px solid var(--fill-strong); }
.etapes li.done { color: var(--text); }
.etapes li.done .puce { background: var(--dot-ok); border-color: var(--dot-ok); color: #FFFFFF; }
.etapes li.done .puce .ic { width: 13px; height: 13px; stroke-width: 3; vertical-align: 0; }
.etapes li.now { color: var(--text); font-weight: 600; }
.etapes li.now .puce { border: 0; }
.etapes li.stop { color: var(--text); font-weight: 600; }
.etapes li.stop .puce { background: var(--dot-danger); border-color: var(--dot-danger); color: #FFFFFF; }
.etapes li.stop .puce .ic { width: 12px; height: 12px; stroke-width: 3; vertical-align: 0; }
/* Préparation interrompue : ce qui est conservé, l'étape à reprendre */
.echec-msg { margin-bottom: 0; font-weight: 500; line-height: 1.45; }
.etapes-bilan { gap: 10px; font-size: .9375rem; }
.echec-card p.small { margin-bottom: 0; }
.detail-tech > summary { font-size: .8125rem; font-weight: 500; color: var(--muted); }
.detail-tech p { margin: 6px 0 0; overflow-wrap: anywhere; }
.fiche-alerte { margin: 0 0 12px; font-size: .875rem; }

/* Éléments communs conservés */
.src { font-size: .72rem; vertical-align: super; margin-left: 2px; }
.src a { color: var(--muted); }
.prio-haute { box-shadow: inset 3px 0 0 var(--dot-danger); }
.prio-moyenne { box-shadow: inset 3px 0 0 var(--dot-warn); }
.prio-basse { box-shadow: inset 3px 0 0 var(--faint); }
details > summary { cursor: pointer; font-weight: 600; color: var(--link); }
.spinner { width: 16px; height: 16px; border: 2px solid var(--fill-strong); border-top-color: var(--accent); border-radius: 50%; animation: spin .8s linear infinite; flex: none; }
.btn-primary .spinner { border-color: rgba(255, 255, 255, .35); border-top-color: #FFFFFF; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- Progresser ---------- */
.prog-layout { display: grid; gap: 16px; align-items: start; }
.prog-main, .prog-side { display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.today { display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: center; gap: 12px 16px; }
.today-text .kicker { margin-bottom: 2px; }
.today-text p { margin: 0; }
.today-cta { grid-column: 1 / -1; margin: 0; }
.today-ring { position: relative; width: 64px; height: 64px; flex: none; }
.today-ring.big { width: 96px; height: 96px; margin: 0 auto; }
.today-ring.big .ring { width: 96px; height: 96px; }
.ring-label { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; font-family: var(--font-display); font-size: 1.125rem; font-weight: 700; font-variant-numeric: tabular-nums; letter-spacing: -.02em; }
.today-ring.big .ring-label { font-size: 1.625rem; }
.ring-label small { font-size: .6em; font-weight: 600; color: var(--muted); margin-left: 1px; }
.mini-bar { width: 54px; flex: none; }
.badge-teal { background: color-mix(in srgb, var(--dot-teal) 18%, transparent); color: var(--dot-teal); }
/* Référentiel : un domaine par bloc repliable */
.domaines { display: flex; flex-direction: column; gap: 10px; margin-top: 4px; }
.domaine > summary { gap: 12px; padding: 12px 14px 12px 16px; }
.disclosure { transition: transform .2s ease; }
.rows-flat { border-radius: 0; box-shadow: none; background: transparent; border-top: .5px solid var(--border); }
.rows-flat > a { min-height: 44px; font-size: .9375rem; }
[hidden] { display: none !important; }
/* Fiche d'une notion */
.notion-top { display: flex; flex-direction: column; gap: 12px; margin-bottom: 14px; }
.keycard { background: color-mix(in srgb, var(--accent) 12%, var(--surface)); }
.key { font-size: 1.125rem; font-weight: 600; line-height: 1.4; margin: 0; }
.maitrise-line { display: flex; align-items: center; gap: 10px; }
.maitrise-line .progress { flex: 1; }
.notion-actions { display: grid; grid-template-columns: minmax(0, 1fr); gap: 8px; }
.prose p, .prose li, .prose dd { max-width: 72ch; }
.prose h3 { margin: 1.4em 0 .5em; }
.prose h3:first-child { margin-top: 0; }
.prose ul { padding-left: 1.1em; }
.prose li { margin: .4em 0; }
.figures { display: grid; gap: 10px; }
.figure { padding: 12px 14px; border-radius: 12px; background: var(--surface-2); }
.figure p { margin: 2px 0 0; font-size: .9375rem; }
.figure-val { font-family: var(--font-display); font-size: 1.5rem; font-weight: 700; color: var(--link); letter-spacing: -.01em; }
.deflist { margin: 0; }
.deflist dt { font-weight: 600; margin-top: 12px; }
.deflist dt:first-child { margin-top: 0; }
.deflist dd { margin: 2px 0 0; color: var(--muted); }
.pieges { display: flex; flex-direction: column; gap: 10px; }
.piege { display: flex; flex-direction: column; align-items: flex-start; gap: 8px; }
.piege .quote { margin: 0; }
.reveal { width: 100%; }
.reveal > summary { display: inline-flex; align-items: center; gap: 6px; padding: 7px 12px; border-radius: 8px; background: var(--fill); font-size: .875rem; }
.reveal[open] > summary { background: var(--accent-soft); }
.reveal > p { margin: 10px 0 0; }
.quotes { list-style: none; padding: 0 !important; }
.quotes li { padding: 8px 0; border-top: .5px solid var(--border); font-weight: 500; }
.quotes li:first-child { border-top: 0; }
.notion-more { margin-top: 14px; }
.notion-foot { margin-top: 16px; }
.sources-list { font-size: .875rem; margin-top: 10px; }
.sources-list li { margin: 0; padding: 4px 0; }
.sources-list a { display: inline-block; padding: 4px 0; }
.notion-tabs { display: flex; gap: 2px; padding: 2px; margin: 0 0 12px; background: var(--fill); border-radius: 10px; }
.notion-tabs button { flex: 1 0 auto; border: 0; background: none; font: inherit; font-size: .875rem; font-weight: 600; color: var(--text); padding: 7px 12px; border-radius: 8px; cursor: pointer; white-space: nowrap; }
.tab-panel { display: none; }
.tab-panel.on { display: block; }
/* Révisions : une carte à la fois */
.revision { display: flex; flex-direction: column; gap: 10px; max-width: 680px; }
.rev-progress { height: 4px; border-radius: 99px; background: var(--fill); overflow: hidden; }
.rev-progress span { display: block; height: 100%; width: 0; background: var(--accent); border-radius: 99px; transition: width .3s ease; }
.rev-notion { text-align: right; max-width: 60%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.flashcard { display: flex; flex-direction: column; gap: 12px; padding: 20px 18px; }
.flashcard .badge { align-self: flex-start; }
.flash-q { font-family: var(--font-display); font-size: 1.25rem; font-weight: 600; line-height: 1.35; letter-spacing: -.01em; margin: 0; }
.qcm { display: flex; flex-direction: column; gap: 8px; }
.qcm .choice {
  display: flex; align-items: flex-start; gap: 12px; width: 100%; margin: 0; padding: 13px 14px; text-align: left;
  border-radius: 12px; border: 1.5px solid transparent; background: var(--fill); color: var(--text);
  font: inherit; font-size: 1rem; line-height: 1.4; cursor: pointer; transition: background-color .15s ease, border-color .15s ease;
}
.qcm .choice:hover:not(:disabled) { background: var(--fill-strong); }
.qcm .choice:disabled { cursor: default; opacity: 1; }
.qcm .choice:disabled:not(.good):not(.bad) { opacity: .55; }
.qcm .choice.good { border-color: var(--dot-ok); background: var(--ok-soft); }
.qcm .choice.bad { border-color: var(--dot-danger); background: var(--danger-soft); }
.choice-key { flex: none; width: 24px; height: 24px; display: grid; place-items: center; border-radius: 50%; background: var(--surface); color: var(--muted); font-size: .75rem; font-weight: 700; }
.choice.good .choice-key { background: var(--dot-ok); color: #FFFFFF; }
.choice.bad .choice-key { background: var(--dot-danger); color: #FFFFFF; }
.flash-back { padding: 12px 14px; border-radius: 12px; background: var(--surface-2); }
.flash-back p { margin: 4px 0 0; }
.verdict { font-weight: 700; }
.verdict.ok { color: var(--ok); }
.verdict.ko { color: var(--warn); }
.rev-next { position: sticky; bottom: calc(var(--tabbar-h) + env(safe-area-inset-bottom, 0px) + 8px); display: flex; flex-direction: column; gap: 6px; }
.center { text-align: center; }
.revision-fin { max-width: 680px; text-align: center; display: flex; flex-direction: column; gap: 6px; padding: 24px 18px; }
.revision-fin h2 { margin: 10px 0 0; }
.revision-fin .sheet-actions { text-align: left; }
@keyframes carte-entre { from { opacity: 0; transform: translateX(24px); } }
@media (prefers-reduced-motion: no-preference) { .flashcard.entre { animation: carte-entre .28s cubic-bezier(.2, .8, .2, 1); } }
/* Formulaires d'entraînement */
.form-layout { display: grid; gap: 16px; align-items: start; }
.stack-form { display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.stack-form .card label { margin: 6px 0 -2px; }
.stack-form .card label:first-child { margin-top: 0; }
textarea.tall { min-height: 220px; }
.footnote .ic { width: 14px; height: 14px; }
.seg-radio label, .stack-form .card .seg-radio label { position: relative; display: flex; margin: 0; font-weight: 600; }
.seg-radio input { position: absolute; opacity: 0; width: 1px; height: 1px; pointer-events: none; }
.seg-radio span { flex: 1; display: flex; align-items: center; justify-content: center; padding: 7px 8px; border-radius: 7px; font-size: .875rem; color: var(--text); cursor: pointer; text-align: center; }
.seg-radio input:focus-visible + span { outline: 2px solid var(--link); outline-offset: 1px; }
.checklist { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 10px; }
.checklist li { position: relative; margin: 0; padding-left: 26px; }
.checklist li::before { content: ""; position: absolute; left: 0; top: 4px; width: 16px; height: 16px; border-radius: 50%; background: var(--fill-strong); }
.checklist li.ok::before { background: var(--dot-ok); box-shadow: inset 0 0 0 4px var(--ok-soft); }
.checklist li.manque::before { background: var(--dot-warn); box-shadow: inset 0 0 0 4px var(--warn-soft); }
.checklist li.ko::before { background: var(--dot-danger); box-shadow: inset 0 0 0 4px var(--danger-soft); }
.resultat { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.resultat:empty { display: none; }
.score-card { display: flex; flex-direction: column; align-items: center; gap: 10px; text-align: center; padding: 22px 18px; }
.score-card .lead { margin: 0; }
/* Choix de l'interlocuteur simulé */
.persona-list { display: flex; flex-direction: column; gap: 8px; }
.persona { position: relative; display: block; margin: 0; font-weight: 400; }
.persona input { position: absolute; opacity: 0; width: 1px; height: 1px; pointer-events: none; }
.persona-card { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: var(--radius); background: var(--surface); box-shadow: var(--shadow); border: 1.5px solid transparent; cursor: pointer; }
.persona-check { flex: none; width: 24px; height: 24px; display: grid; place-items: center; border-radius: 50%; border: 1.5px solid var(--faint); color: transparent; }
.persona-check .ic { width: 14px; height: 14px; stroke-width: 3; }
.persona input:checked + .persona-card { border-color: var(--accent); }
.persona input:checked + .persona-card .persona-check { background: var(--accent); border-color: var(--accent); color: #FFFFFF; }
.persona input:focus-visible + .persona-card { outline: 2px solid var(--link); outline-offset: 2px; }

/* ---------- Simulation (bulles façon Messages) ---------- */
.chat-head { display: flex; align-items: center; gap: 12px; margin: 4px 0 16px; }
.avatar { flex: none; width: 44px; height: 44px; display: grid; place-items: center; border-radius: 50%; background: linear-gradient(160deg, var(--dot-gray), color-mix(in srgb, var(--dot-gray) 60%, #000000)); color: #FFFFFF; }
.avatar .ic { width: 22px; height: 22px; }
.chat-title { font-size: 1.25rem; margin: 0; letter-spacing: -.01em; }
.chat-head .row-sub { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.chat-wrap { max-width: 760px; }
.chat { display: flex; flex-direction: column; gap: 6px; padding-bottom: 10px; }
.msg { max-width: 82%; padding: 8px 14px; border-radius: 19px; font-size: 1rem; line-height: 1.4; }
.msg p { margin: 0 0 .5em; }
.msg p:last-child { margin-bottom: 0; }
.msg.client { background: var(--bubble); align-self: flex-start; border-bottom-left-radius: 6px; }
.msg.avant_vente { background: var(--accent); color: #FFFFFF; align-self: flex-end; border-bottom-right-radius: 6px; }
.msg.coach { align-self: stretch; max-width: none; margin: 6px 0; background: var(--warn-soft); color: var(--text); font-size: .9375rem; border-radius: 12px; }
.msg .who { font-size: .72rem; font-weight: 600; color: var(--muted); margin-bottom: 2px; }
.msg.coach .who { color: var(--warn); text-transform: uppercase; letter-spacing: .04em; }
.msg + .msg.avant_vente, .msg.avant_vente + .msg.client { margin-top: 6px; }
.dots { display: inline-flex; gap: 4px; padding: 6px 2px; }
.dots i { width: 8px; height: 8px; border-radius: 50%; background: var(--muted); animation: point 1.2s infinite ease-in-out; }
.dots i:nth-child(2) { animation-delay: .15s; }
.dots i:nth-child(3) { animation-delay: .3s; }
@keyframes point { 0%, 60%, 100% { opacity: .3; transform: translateY(0); } 30% { opacity: 1; transform: translateY(-3px); } }
.composer { position: sticky; bottom: calc(var(--tabbar-h) + env(safe-area-inset-bottom, 0px)); display: flex; flex-direction: column; gap: 8px; padding: 10px 0 8px; background: var(--bg); }
.composer-tools { display: flex; gap: 8px; flex-wrap: wrap; }
.composer-field { display: flex; align-items: flex-end; gap: 8px; padding: 4px 4px 4px 14px; border-radius: 22px; background: var(--surface); border: 1px solid var(--border); }
.composer-field textarea { flex: 1; min-height: 36px; max-height: 160px; padding: 7px 0; border: 0; border-radius: 0; background: transparent; resize: none; line-height: 1.4; box-shadow: none; }
.composer-field textarea:focus { box-shadow: none; }
.composer-field:focus-within { border-color: var(--accent); }
.send { flex: none; width: 34px; height: 34px; display: grid; place-items: center; border: 0; border-radius: 50%; background: var(--accent); color: #FFFFFF; cursor: pointer; }
.send .ic { width: 18px; height: 18px; stroke-width: 2.6; }
.send:disabled { opacity: .5; }
.debrief { display: flex; flex-direction: column; gap: 8px; margin-top: 12px; }
.debrief .grid { gap: 8px 12px; }
.objection .quote { margin: 0; }
.objection p { margin: 2px 0 0; }
.debrief-cta { margin-top: 14px; }

/* ---------- Notification éphémère ---------- */
.toast {
  position: fixed; z-index: 60; left: 50%; transform: translateX(-50%);
  bottom: calc(var(--tabbar-h) + env(safe-area-inset-bottom, 0px) + 14px);
  width: max-content; max-width: min(440px, calc(100vw - 32px)); padding: 11px 18px; border-radius: 14px;
  background: var(--text); color: var(--bg); font-size: .9375rem; box-shadow: var(--shadow-lg);
}

/* ---------- Erreurs : page d'erreur, bandeau de synchronisation, attente d'une tâche ---------- */
.erreur-page { display: flex; flex-direction: column; align-items: center; gap: 10px; max-width: 440px; margin: 10vh auto 0; text-align: center; }
.erreur-ico { width: 64px; height: 64px; display: grid; place-items: center; border-radius: 18px; background: var(--fill); color: var(--muted); }
.erreur-ico .ic { width: 30px; height: 30px; vertical-align: 0; }
.erreur-page h1 { margin: 6px 0 0; font-size: 1.625rem; }
.erreur-page p { margin: 0; color: var(--muted); }
.erreur-actions { display: flex; flex-direction: column; gap: 8px; width: 100%; margin-top: 14px; }
.sync-alerte { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin: 0 0 12px; font-size: .875rem; }
.sync-alerte .btn { flex: none; }
.attente-card { display: flex; align-items: center; gap: 14px; }
.attente-card p { margin: 2px 0 0; }

/* ---------- Accueil ---------- */
.home-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; margin: 4px 0 12px; }
.home-head h1 { margin: 2px 0 0; }
.home-search { margin-bottom: 4px; }
.home { display: flex; flex-direction: column; gap: 12px; }
.home-col { display: contents; }
.blk { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.blk-rdv { order: 1; } .blk-kpi { order: 2; } .blk-digest { order: 3; } .blk-concept { order: 4; }
.blk-question { order: 5; } .blk-chiffre { order: 6; } .blk-fiches { order: 7; } .blk-sims { order: 8; }
.rdv-next { display: flex; flex-direction: column; gap: 10px; }
.rdv-name { font-family: var(--font-display); font-size: 1.375rem; font-weight: 600; line-height: 1.2; letter-spacing: -.01em; }
.rdv-actions { display: flex; flex-direction: column; gap: 8px; margin-top: 2px; }
.kpis { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.kpi { display: flex; flex-direction: column; gap: 2px; padding: 14px; color: var(--text); text-decoration: none; }
a.kpi:hover { text-decoration: none; }
.kpi-label { display: flex; align-items: center; gap: 6px; font-size: .8125rem; font-weight: 500; color: var(--muted); }
.kpi-label .ic { width: 15px; height: 15px; color: var(--link); }
.kpi-value { font-family: var(--font-display); font-size: 1.875rem; font-weight: 700; letter-spacing: -.02em; line-height: 38px; height: 38px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.kpi-sub { font-size: .8125rem; color: var(--muted); }
.kpi .progress { margin: 4px 0 2px; }
.accroche { font-size: 1.0625rem; line-height: 1.5; margin: 0; }
.essentiels { list-style: none; margin: 4px 0 0; padding: 0; }
.essentiels li { display: flex; flex-direction: column; gap: 4px; margin: 0; padding: 11px 0 0; border-top: .5px solid var(--border); margin-top: 11px; font-size: .9375rem; }
.tile-head { display: flex; align-items: center; gap: 10px; }
.tile-head h3 { margin: 0; }
.quote { font-size: 1.0625rem; font-weight: 500; line-height: 1.45; margin: 0; }
.chiffre-val { font-family: var(--font-display); font-size: 2.25rem; font-weight: 700; letter-spacing: -.02em; line-height: 1.1; color: var(--link); font-variant-numeric: tabular-nums; }

/* ---------- Feuille : fenêtre qui monte du bas, façon iOS (élément <dialog>) ---------- */
.sheet {
  width: 100%; max-width: none; max-height: 88vh; max-height: 88dvh;
  margin: auto 0 0; padding: 0; border: 0; border-radius: 14px 14px 0 0;
  background: var(--sheet-bg); color: var(--text); box-shadow: var(--shadow-lg); overflow-y: auto;
}
.sheet .card, .sheet .rows { background: var(--sheet-card); }
.sheet .progress { background: var(--fill-strong); }
.sheet::backdrop { background: rgba(0, 0, 0, .45); }
.sheet-inner {
  display: flex; flex-direction: column; gap: 10px;
  padding: 8px max(16px, env(safe-area-inset-right, 0px)) calc(20px + env(safe-area-inset-bottom, 0px)) max(16px, env(safe-area-inset-left, 0px));
}
.sheet-inner::before { content: ""; align-self: center; width: 36px; height: 5px; border-radius: 3px; background: var(--fill-strong); margin-bottom: 4px; }
.sheet-head { position: sticky; top: 0; z-index: 3; display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 0 -16px; padding: 6px 16px; background: var(--sheet-bg); }
.sheet-head h2 { margin: 0; font-size: 1.25rem; }
.sheet-head-end { justify-content: flex-end; }
.sheet-tall { max-height: 92vh; max-height: 92dvh; }
.sheet .section-label { padding-top: 10px; }
.sheet .chip-static { background: var(--sheet-card); }
html:has(dialog[open]) { overflow: hidden; }
@keyframes sheet-in { from { transform: translateY(100%); } }
@keyframes pop-in { from { opacity: 0; transform: translateY(12px) scale(.98); } }
@keyframes fade-in { from { opacity: 0; } }
@media (prefers-reduced-motion: no-preference) {
  .sheet[open] { animation: sheet-in .3s cubic-bezier(.2, .8, .2, 1); }
  .sheet[open]::backdrop { animation: fade-in .3s ease; }
}

/* ---------- Ordinateur : barre de navigation en haut (maquette 3) ---------- */
.topbar { display: none; }
@media (min-width: 900px) {
  .only-mobile { display: none !important; }
  body { background: var(--surface); }
  .shell { display: flex; flex-direction: column; }
  .tabbar { display: none; }
  .topbar {
    position: sticky; top: 0; z-index: 30;
    display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px;
    padding: 10px 28px; background: var(--bar-bg); border-bottom: 1px solid var(--border);
    -webkit-backdrop-filter: saturate(180%) blur(16px); backdrop-filter: saturate(180%) blur(16px);
  }
  .brand { display: flex; align-items: center; gap: 8px; font-weight: 700; font-size: 1rem; color: var(--text); margin-right: 8px; }
  .brand:hover { text-decoration: none; }
  .brand .ic { width: 20px; height: 20px; color: var(--accent); }
  .nav { display: flex; flex-wrap: wrap; gap: 2px; }
  .nav a { display: flex; align-items: center; gap: 6px; padding: 6px 12px; border-radius: 6px; color: #3F3F46; font-weight: 500; font-size: .875rem; }
  .nav a:hover { background: var(--fill); text-decoration: none; }
  .nav a.active { background: var(--accent-soft); color: var(--link); font-weight: 600; }
  .nav .count { font-size: .6875rem; font-weight: 600; padding: 0 6px; border-radius: 99px; background: var(--dot-danger); color: #FFFFFF; font-variant-numeric: tabular-nums; line-height: 17px; }
  .topbar-right { margin-left: auto; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
  .topsearch input { width: 200px; min-height: 36px; border-radius: 8px; font-size: .875rem; }
  .top-etat { display: inline-flex; align-items: center; gap: 6px; font-size: .8125rem; color: var(--muted); padding: 6px 4px; }
  .top-etat .ic { width: 15px; height: 15px; color: var(--accent); }
  .top-etat:hover { color: var(--text); text-decoration: none; }
  .topbar .btn-primary { min-height: 36px; padding: 0 14px; font-size: .875rem; }
  .sync-dot { display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: var(--dot-ok); }
  .sync-dot.ko { background: var(--dot-danger); }
  .main { padding: 28px 36px 64px; max-width: 1240px; width: 100%; margin: 0 auto; }
  .main.main-plein { max-width: none; padding: 0; margin: 0; }
  h1 { font-size: 2.125rem; }
  .card { padding: 18px 20px; }
  .composer { bottom: 0; }
  .toast { bottom: 24px; }
  .home { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr); gap: 20px; align-items: start; }
  .home-col { display: flex; flex-direction: column; gap: 14px; min-width: 0; }
  .rdv-actions { flex-direction: row; }
  .rdv-actions .btn-block { width: auto; }
  .sheet { margin: auto; width: min(440px, calc(100vw - 48px)); border-radius: 16px; }
  .sheet-tall { width: min(620px, calc(100vw - 48px)); max-height: 86vh; }
  .veille-layout { grid-template-columns: minmax(0, 1fr) 300px; gap: 28px; }
  .veille-side { position: sticky; top: 24px; display: flex; flex-direction: column; gap: 8px; }
  .chips.scroll { flex-wrap: wrap; overflow: visible; margin: 0; padding: 0; }
  .digest-page { max-width: 760px; }
  .prog-layout { grid-template-columns: minmax(0, 1fr) 320px; gap: 28px; }
  .prog-side { position: sticky; top: 24px; }
  .today { grid-template-columns: auto minmax(0, 1fr) auto; }
  .today-cta { grid-column: auto; }
  .today-cta.btn-block { width: auto; }
  .notion-top { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: start; }
  .notion-actions { grid-template-columns: minmax(0, 1fr); min-width: 260px; }
  .figures { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .form-layout { grid-template-columns: minmax(0, 1fr) 320px; gap: 28px; }
  .form-layout .resultat:not(:empty) { grid-column: 1 / -1; }
  #form-expl ~ .resultat { grid-column: 1 / -1; }
  .rev-next { position: static; }
  .actions-row { margin: 0 0 12px; padding: 0; flex-wrap: wrap; }
  .fiche-tabs { max-width: 520px; }
  .fiche-panel { max-width: 860px; }
  .sommaire { margin: 0; padding: 8px 0; }
  .sheet[open] { animation-name: pop-in; }
  .sheet-inner { padding: 12px 20px 22px; }
  .sheet-head { margin: 0 -20px; padding: 6px 20px; }
  .sheet-inner::before { display: none; }
}

/* ---------- Suivi commercial : comptes, actions, comptes rendus ---------- */
.warn-text { color: var(--warn); font-weight: 600; }
.link-btn { all: unset; color: var(--link); font-size: .9375rem; font-weight: 500; text-transform: none; letter-spacing: 0; cursor: pointer; }
.link-btn:hover { text-decoration: underline; }
.link-btn:focus-visible { outline: 2px solid var(--link); outline-offset: 2px; border-radius: 4px; }
.rows > button { width: 100%; border: 0; background: none; font: inherit; text-align: left; cursor: pointer; }
.rows > button:hover { background: var(--fill); }
.vague { flex: none; display: grid; place-items: center; width: 38px; height: 38px; border-radius: 10px; font-weight: 700; font-size: .9375rem; background: var(--fill); color: var(--muted); }
.vague-a { background: var(--accent); color: var(--on-accent); }
.vague-b { background: var(--accent-soft); color: var(--link); }
.pilot { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin-bottom: 12px; }
.pilot .kpi-value { font-size: 1.625rem; }
.kpi-total { font-size: 1rem; font-weight: 500; color: var(--muted); }
.pilot-vide { margin-bottom: 12px; }
@media (max-width: 699px) {
  .pilot { gap: 8px; }
  .pilot .kpi { padding: 10px 12px; }
  .pilot .kpi-value { font-size: 1.375rem; line-height: 30px; height: 30px; }
  .pilot .kpi-sub { font-size: .75rem; }
}
.blk-jour { order: 0; } .blk-prio { order: 1; } .blk-signaux { order: 2; }
.acts > .act-row { gap: 10px; padding-left: 12px; }
.act-check { display: grid; place-items: center; width: 32px; height: 32px; margin: -6px 0; flex: none; cursor: pointer; }
.act-check input { width: 22px; height: 22px; border-radius: 50%; }
.act-when { flex: none; width: 58px; font-weight: 600; font-size: .875rem; line-height: 1.25; }
.act-when-txt { font-size: .75rem; }
.act-when-vide { color: var(--muted); font-weight: 500; }
.act-ouvrir { flex: 1; min-width: 0; display: flex; align-items: center; gap: 10px; padding: 0; border: 0; background: none; font: inherit; color: inherit; text-align: left; cursor: pointer; border-radius: 6px; }
.act-ouvrir:hover .row-title { color: var(--link); }
.act-ouvrir:focus-visible { outline: 2px solid var(--link); outline-offset: 2px; }
.act-row.late .act-when { color: var(--danger); }
.act-row.fait .row-title { text-decoration: line-through; color: var(--muted); }
.act-row .row-sub a { color: inherit; }
.act-row .btn { flex: none; }
@media (max-width: 899px) { .act-row .btn { width: 36px; padding: 0; justify-content: center; border-radius: 50%; } }
.comptes-page, .pipe-page { display: flex; flex-direction: column; gap: 12px; }
.compte-etat { display: flex; flex-direction: column; align-items: flex-end; text-align: right; max-width: 42%; }
.compte-etat .small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 100%; }
.compte-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; margin: 4px 0 14px; }
.compte-head h1 { margin: 2px 0 4px; font-size: 1.75rem; line-height: 1.15; }
.compte-head p { margin: 0; }
.compte-titre { min-width: 0; }
.score-badge { flex: none; display: flex; flex-direction: column; align-items: center; justify-content: center; width: 72px; height: 72px; border: 0; border-radius: 18px; background: var(--fill); color: var(--text); font: inherit; cursor: pointer; }
.score-badge.vague-bg-a { background: var(--accent); color: var(--on-accent); }
.score-badge.vague-bg-b { background: var(--accent-soft); color: var(--link); }
.score-val { font-size: 1.75rem; font-weight: 700; line-height: 1; }
.score-sub { font-size: .75rem; font-weight: 600; margin-top: 3px; }
.compte-actions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin-bottom: 14px; }
.compte-actions .btn-primary { grid-column: 1 / -1; }
.compte-grid { display: flex; flex-direction: column; gap: 12px; }
.compte-col { display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.compte-col section .rows > .muted, .acts > .muted { min-height: 0; padding: 14px 16px; }
.timeline { background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; }
.tl-item { position: relative; display: flex; gap: 14px; padding: 12px 16px; color: var(--text); text-decoration: none; }
.tl-item + .tl-item::before { content: ""; position: absolute; top: 0; left: 16px; right: 0; border-top: .5px solid var(--border); }
a.tl-item:hover { background: var(--fill); text-decoration: none; }
.tl-date { flex: none; width: 58px; font-size: .8125rem; color: var(--muted); padding-top: 2px; }
.tl-body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.tl-cr p { margin: 2px 0; }
.tl-annule { opacity: .6; }
.score-detail { display: flex; flex-direction: column; gap: 6px; }
.score-line { display: flex; justify-content: space-between; font-size: .9375rem; }
.score-detail .progress { margin-bottom: 4px; }
.cr-compte { margin: 4px 0 0; font-size: 1.0625rem; font-weight: 600; }
.kpis-3 { margin-bottom: 14px; }
.pipe-bar { margin: 2px 4px 2px; }
input[type=number] { -moz-appearance: textfield; }
@media (min-width: 700px) {
  .pilot { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .compte-actions { display: flex; flex-wrap: wrap; }
}
@media (min-width: 900px) {
  .compte-grid { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 20px; align-items: start; }
  .compte-head h1 { font-size: 2.125rem; }
}


/* ---------- Sans réseau (iPhone) : bandeau, mise en route, saisies en attente ---------- */
.bandeau-reseau { display: block; margin: 0 0 12px; padding: 8px 12px; border-radius: 10px; background: var(--accent-soft);
  color: var(--text); font-size: .8125rem; font-weight: 600; text-decoration: none; text-align: center; }
.bandeau-reseau.warn { background: var(--warn-soft); }
.hl-invite { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; text-decoration: none; }
.hl-invite > .ic:first-child { flex: none; color: var(--accent); }
.hl-invite span { flex: 1; }
.hl-invite .chev { flex: none; }
.hl-page { max-width: 680px; }
.hl-etapes { margin: 0; padding: 0 0 0 22px; display: flex; flex-direction: column; gap: 14px; }
.hl-etapes li { padding-left: 4px; line-height: 1.45; }
.hl-action { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 8px; }
.hl-action .btn { max-width: 100%; overflow-wrap: anywhere; }
.hl-empreinte { font-size: .75rem; word-break: break-word; background: var(--fill); padding: 8px 10px; border-radius: 8px; }
.attente-row { display: flex; align-items: flex-start; gap: 10px; }
.attente-row .row { flex: none; }
.attente-texte { display: block; margin-top: 4px; white-space: pre-wrap; color: var(--text); }

@media (prefers-reduced-motion: reduce) {
  .spinner { animation-duration: 2.4s; }
  .btn { transition: none; }
}

@media print {
  .tab-panel.fiche-panel { display: flex !important; }
  #tab-notes, .sommaire, .actions-row, .fiche-tabs, .backbar { display: none !important; }
  .fsec { box-shadow: none; border: 1px solid #DDDDDD; break-inside: avoid; }
  .fsec .disclosure { display: none; }
  .keycard, .warnbox, .notes-preview { background: none !important; border: 1px solid #CCCCCC; }
  .topbar, .tabbar, .no-print, .composer { display: none !important; }
  .shell { display: block; }
  .main { padding: 0; max-width: none; }
  .card, .rows { border: 0; box-shadow: none; padding: 0; background: none; }
  body { background: #FFFFFF; color: #000000; font-size: 11pt; }
}

/* ---------- Maquette 3 : typographie et éléments communs ---------- */
body { font-feature-settings: "cv11", "ss01"; }
h1 { font-size: 1.875rem; letter-spacing: -.02em; }
.lbl, .section-label { font-size: .75rem; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; }
.section-label a, .lbl a { text-transform: none; letter-spacing: 0; font-size: .875rem; font-weight: 500; }
.btn { color: var(--text); border-radius: 8px; }
.btn-primary { color: var(--on-accent); }
.btn-tinted { background: var(--accent-soft); color: var(--link); }
.btn-tinted:hover { background: color-mix(in srgb, var(--accent) 14%, transparent); }
.vague-a { background: var(--accent); color: var(--on-accent); }
.vague-b { background: var(--accent-soft); color: var(--link); box-shadow: inset 0 0 0 1px var(--accent-line); }
.vague-txt-a { color: var(--accent); }
.vague-txt-b { color: var(--link); }
.vague-txt-c { color: var(--muted); }
.clamp-4 { display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden; }
.tab-badge { background: var(--dot-danger); }
.tabbar { background: var(--surface); border-top: 1px solid var(--border); -webkit-backdrop-filter: none; backdrop-filter: none; }
.tabbar a { font-size: .625rem; padding-top: 5px; color: #71717A; }
.tabbar a.active { color: var(--accent); }
.tabbar .ic { width: 24px; height: 24px; stroke-width: 2; }

/* ---------- Maquette 3 : accueil « Votre journée » ---------- */
.jour-layout { display: flex; flex-direction: column; gap: 18px; }
.jour { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.jour-head h1 { margin: 4px 0 0; }
.jour-head .btn-icon { width: 32px; height: 32px; min-height: 32px; }
.pill-reseau { display: inline-flex; align-items: center; gap: 5px; font-size: .75rem; color: var(--muted); background: var(--fill); padding: 4px 9px; border-radius: 999px; white-space: nowrap; }
.pill-reseau[hidden] { display: none; }
.pill-dot { width: 6px; height: 6px; border-radius: 3px; background: var(--faint); }
.chiffres { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); background: var(--surface); border: 1px solid var(--border); border-radius: 12px; }
.chiffre { display: flex; flex-direction: column; padding: 10px 12px; color: var(--text); min-width: 0; }
.chiffre + .chiffre { border-left: 1px solid var(--border); }
.chiffre:hover { text-decoration: none; background: var(--fill); }
.chiffre-v { font-size: 1.25rem; font-weight: 700; letter-spacing: -.01em; white-space: nowrap; }
.chiffre-tot { font-size: .75rem; font-weight: 500; color: #71717A; }
.chiffre-l { font-size: .6875rem; color: var(--muted); }
.jour-sec { display: flex; flex-direction: column; gap: 8px; }
.evs { display: flex; flex-direction: column; gap: 8px; }
.ev { position: relative; display: flex; align-items: flex-start; gap: 10px; padding: 12px 14px; border: 1px solid var(--border); border-radius: 12px; background: var(--surface); color: var(--text); }
.ev-lien:hover { text-decoration: none; background: var(--fill); }
.ev-vedette { border-color: var(--accent-line); background: var(--accent-soft); }
.ev.late { border-color: var(--danger-line); }
.ev-t { flex: none; width: 42px; font-weight: 600; font-size: .875rem; padding-top: 1px; }
.ev.late .ev-t { color: var(--danger); }
.ev-check { width: 22px; height: 22px; margin: 0; padding-top: 1px; }
.ev-check input { width: 18px; height: 18px; border-radius: 50%; }
.ev-body { flex: 1; min-width: 0; display: flex; flex-direction: column; color: var(--text); }
.ev-body:hover { text-decoration: none; }
.ev-body .row-title { font-weight: 600; font-size: .9375rem; }
.ev-vedette .ev-body .row-title { font-size: 1rem; }
.ev-body .row-sub { font-size: .8125rem; color: var(--muted); }
.ev.fait .row-title { text-decoration: line-through; color: var(--muted); }
.ev-chips { display: flex; gap: 6px; margin-top: 8px; }
.ev-chip { font-size: .75rem; font-weight: 600; color: var(--link); background: var(--surface); border: 1px solid var(--accent-line); padding: 3px 8px; border-radius: 6px; }
.ev-cr { flex: none; align-self: center; }
.ev .vague { width: 34px; height: 34px; font-size: .875rem; border-radius: 8px; }
.ev-vide { padding: 12px 14px; border: 1px dashed var(--border); border-radius: 12px; }
.jour-main { display: flex; flex-direction: column; gap: 22px; min-width: 0; }
.jour-main > .lbl { margin-bottom: -10px; }

/* ---------- Maquette 3 : compte ouvert (accueil et fiche compte) ---------- */
.pc { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.pc-head { display: flex; flex-wrap: wrap; gap: 12px 16px; align-items: flex-start; justify-content: space-between; }
.pc-titre { min-width: 0; }
.pc-meta { font-size: .8125rem; color: var(--muted); }
.pc-titre h1, .pc-titre h2 { margin: 4px 0 0; font-size: 1.875rem; font-weight: 700; letter-spacing: -.02em; line-height: 1.15; }
.pc-titre h2 a { color: var(--text); }
.pc-sous { font-size: .8125rem; color: var(--muted); margin-top: 4px; }
.pc-btns { display: flex; gap: 8px; flex-wrap: wrap; }
.pc-btns .btn { min-height: 36px; padding: 0 14px; font-size: .875rem; }
.pc-cartes { display: flex; flex-wrap: wrap; gap: 14px; }
.pc-score { flex: 1 1 200px; display: flex; gap: 14px; align-items: center; padding: 14px 16px; border: 1px solid var(--border); border-radius: 10px; background: var(--surface); color: var(--text); font: inherit; text-align: left; }
button.pc-score { cursor: pointer; }
button.pc-score:hover { background: var(--fill); }
.pc-score-val { font-size: 2.125rem; font-weight: 700; letter-spacing: -.02em; line-height: 1; }
.pc-score-txt { font-size: .8125rem; color: var(--muted); line-height: 1.4; }
.pc-score-txt strong { color: var(--text); }
.pc-angle { flex: 2 1 320px; padding: 14px 16px; border: 1px solid var(--border); border-radius: 10px; background: var(--surface); font-size: .875rem; line-height: 1.5; min-width: 0; }
.pc-angle .lbl { margin-bottom: 4px; }
.pc-angle-txt { white-space: pre-line; overflow-wrap: anywhere; }
.pc-angle-txt.replie { display: -webkit-box; -webkit-line-clamp: 6; -webkit-box-orient: vertical; overflow: hidden; }
.pc-angle-plus { display: inline-flex; align-items: center; gap: 4px; margin-top: 8px; font-size: .875rem; font-weight: 600; }
.pc-angle-plus[hidden] { display: none; }
.pc-angle-plus .ic { width: 15px; height: 15px; transform: rotate(90deg); transition: transform .2s; }
.pc-angle-plus[aria-expanded="true"] .ic { transform: rotate(-90deg); }
@media print { .pc-angle-txt.replie { display: block; } .pc-angle-plus { display: none !important; } }
.pc-tabs { display: flex; border-bottom: 1px solid var(--border); overflow-x: auto; scrollbar-width: none; }
.pc-tabs::-webkit-scrollbar { display: none; }
.pc-tabs button { flex: none; padding: 10px 0; margin-right: 22px; border: 0; border-bottom: 2px solid transparent; background: none; font: inherit; font-size: .875rem; color: var(--muted); cursor: pointer; white-space: nowrap; }
.pc-tabs button.on { color: var(--text); font-weight: 600; border-color: var(--accent); }
.pc-panel { display: flex; flex-direction: column; gap: 10px; }
.pc-panel[hidden] { display: none; }
.hist { display: flex; gap: 14px; padding: 12px 0; border-top: 1px solid var(--fill); font-size: .875rem; line-height: 1.45; color: var(--text); }
.hist:first-child { border-top: 0; padding-top: 4px; }
a.hist:hover { text-decoration: none; background: var(--fill); }
.hist-d { flex: none; width: 80px; color: #71717A; font-size: .8125rem; padding-top: 1px; }
.hist-b { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.hist-b > strong + .badge { align-self: flex-start; }
.hist-cr { white-space: pre-line; }
.pc-list { display: flex; flex-direction: column; }
.pc-item { display: flex; align-items: center; gap: 12px; padding: 12px 0; border: 0; border-top: 1px solid var(--fill); background: none; font: inherit; color: var(--text); text-align: left; width: 100%; }
.pc-item:first-child { border-top: 0; }
button.pc-item, a.pc-item { cursor: pointer; }
button.pc-item:hover, a.pc-item:hover { background: var(--fill); text-decoration: none; }
.pc-list.acts > .act-row { display: flex; align-items: center; gap: 10px; padding: 10px 0; border-top: 1px solid var(--fill); }
.pc-list.acts > .act-row:first-child { border-top: 0; }
.pc-panel > .btn { align-self: flex-start; }
.pc-infos { display: grid; gap: 14px; }
.pc-bloc { border: 1px solid var(--border); border-radius: 10px; padding: 14px 16px; display: flex; flex-direction: column; gap: 8px; }
.info-l { display: flex; flex-direction: column; gap: 2px; padding-top: 6px; border-top: 1px solid var(--fill); }
.info-l p { margin: 0 0 4px; }
@media (min-width: 900px) { .pc-infos { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 899px) {
  .pc-titre h1 { font-size: 1.625rem; }
  .pc-btns { width: 100%; }
  .pc-btns .btn { flex: 1; }
  .pc-score-val { font-size: 1.875rem; }
}

/* ---------- Maquette 3 : grand écran ---------- */
@media (min-width: 900px) {
  .jour-layout { flex-direction: row; align-items: stretch; gap: 0; min-height: calc(100vh - 57px); }
  .jour { flex: 0 0 380px; padding: 24px 28px 40px; border-right: 1px solid var(--border); background: var(--side-bg); gap: 20px; }
  .jour-head h1 { font-size: 1.625rem; }
  .chiffres { gap: 10px; background: none; border: 0; }
  .chiffre { border: 1px solid var(--border); border-radius: 10px; background: var(--surface); }
  .chiffre + .chiffre { border-left: 1px solid var(--border); }
  .chiffre-v { font-size: 1.375rem; }
  .chiffre-l { font-size: .75rem; }
  .evs { gap: 0; }
  .ev { border: 0; border-top: 1px solid var(--border); border-radius: 0; background: none; padding: 12px 0; }
  .evs > .ev:first-child { border-top: 0; }
  .ev-vedette { background: var(--accent-soft); margin: 0 -10px; padding: 12px 10px; border-radius: 8px; border-top: 0; }
  .ev-vedette + .ev { border-top: 0; }
  .ev.late { border-color: var(--border); }
  .ev-cr .ic { display: none; }
  .ev-vide { border: 0; padding: 4px 0; }
  .jour-main { flex: 1; padding: 24px 36px 56px; max-width: 1060px; }
  .jour-plus { border-top: 1px solid var(--border); padding-top: 20px; }
  .jour-plus-titre { margin-bottom: 12px; }
  .jour-plus .home { grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); }
  .compte-page .pc { max-width: 1060px; }
}
/* Case ronde des actions (maquette 3) */
.act-check input { -webkit-appearance: none; appearance: none; width: 20px; height: 20px; border: 2px solid var(--faint); border-radius: 50%; background: var(--surface); cursor: pointer; display: grid; place-items: center; margin: 0; }
.act-check input:checked { background: var(--accent); border-color: var(--accent); }
.act-check input:checked::after { content: ""; width: 5px; height: 9px; border: solid #FFFFFF; border-width: 0 2px 2px 0; transform: translateY(-1px) rotate(45deg); }
.ev-check input { width: 18px; height: 18px; }
.chiffre-l { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
@media (min-width: 900px) {
  .ev-cr { display: none; }
  .jour-plus { font-size: .9375rem; }
  .jour-plus .card, .jour-plus .rows { font-size: .9375rem; }
  .jour { flex-basis: 400px; }
}
@media (min-width: 900px) {
  .nav a { color: var(--muted); }
  .nav a:hover { color: var(--text); }
  .chiffre { padding: 10px; }
  .chiffre-l { font-size: .6875rem; }
}

/* ---------- Dictée d'un compte rendu ---------- */
.sheet-head-vide { width: 72px; }
.dictee .sheet-inner { display: flex; flex-direction: column; }
.dictee-ecoute { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 12px; padding: 16px 0 4px; text-align: center; }
.dictee-micro { position: relative; width: 96px; height: 96px; display: grid; place-items: center; border-radius: 50%; background: var(--accent); color: var(--on-accent); }
.dictee-micro .ic { position: relative; width: 38px; height: 38px; }
.dictee-halo { position: absolute; inset: 0; border-radius: 50%; background: var(--accent); opacity: .25; }
.dictee.en-ecoute .dictee-halo { animation: halo 1.8s ease-out infinite; }
@keyframes halo { from { transform: scale(1); opacity: .35; } to { transform: scale(1.55); opacity: 0; } }
.dictee-chrono { font-size: 2.25rem; font-weight: 600; letter-spacing: -.01em; line-height: 1; margin-top: 6px; }
.dictee-niveau { width: 160px; height: 6px; border-radius: 99px; background: var(--fill); overflow: hidden; }
.dictee-niveau span { display: block; height: 100%; background: var(--accent); border-radius: 99px; transform: scaleX(.04); transform-origin: center; transition: transform 80ms linear; }
.dictee-statut { margin: 0; color: var(--muted); }
.dictee-aide { width: 100%; text-align: left; margin-top: 4px; }
.dictee-aide ul { margin: 8px 0 0; padding-left: 18px; display: flex; flex-direction: column; gap: 4px; font-size: .9375rem; }
.dictee-analyse { flex: 1; display: flex; flex-direction: column; gap: 14px; padding: 24px 0 8px; }
.dictee-actions { position: sticky; bottom: 0; z-index: 3; margin: 14px -16px 0; padding: 10px 16px calc(10px + env(safe-area-inset-bottom, 0px)); background: var(--sheet-bg); }
.dictee-actions .btn-lg { min-height: 52px; font-size: 1.0625rem; border-radius: 26px; }
.dictee-actions .carre { width: 14px; height: 14px; border-radius: 3px; background: currentColor; }

/* Dictées à relire (accueil) */
.ev-dictee { align-items: center; }
.ev-ico { flex: none; width: 34px; height: 34px; display: grid; place-items: center; border-radius: 8px; background: var(--accent-soft); color: var(--link); }
.ev-ico.danger { background: var(--danger-soft); color: var(--danger); }
.ev-ico .ic { width: 18px; height: 18px; }
.ev-dictee .row-sub { overflow: hidden; text-overflow: ellipsis; }

/* Relecture d'une dictée dans la fiche de compte rendu */
.ia-notice { display: flex; gap: 10px; align-items: flex-start; margin-bottom: 12px; }
.ia-notice .ic { flex: none; width: 18px; height: 18px; margin-top: 2px; color: var(--link); }
[data-dictee-doutes] { margin-bottom: 12px; }
[data-dictee-doutes] ul { margin: 6px 0 0; padding-left: 18px; }
.nc-ligne { display: grid; grid-template-columns: auto 1fr 1fr; gap: 10px; align-items: center; padding: 10px 16px; }
.nc-ligne input[type=text] { min-width: 0; padding: 6px 0; border: 0; border-radius: 0; background: transparent; }
.nc-ligne input[type=text]:focus { box-shadow: none; }
.nc-ligne input[name^=nc_fonction] { color: var(--muted); }
.form-group > .nc-liste { padding: 0; }
.nc-liste > * + * { border-top: .5px solid var(--border); }
.toggle-field { justify-content: space-between; }
.toggle-field > span { width: auto; color: var(--text); }
.toggle-field input { flex: none; }
.opp-champs { display: flex; flex-direction: column; }
.opp-champs > * { padding: 13px 16px; border-top: .5px solid var(--border); }
.form-group > .opp-champs { border-top: 0 !important; }
.btn-supprimer { background: transparent; color: var(--danger); }
.btn-supprimer:hover { background: var(--danger-soft); }
.opp-champs > input { border: 0; border-top: .5px solid var(--border); border-radius: 0; background: transparent; }
.transcription { margin-top: 14px; }
.transcription summary { cursor: pointer; font-weight: 500; color: var(--link); }
.transcription p { margin: 10px 0 0; color: var(--muted); white-space: pre-wrap; }

/* ---------- iPhone : barre flottante, tout visible, micro de dictée au centre ---------- */
.tabbar {
  left: max(10px, env(safe-area-inset-left, 0px)); right: max(10px, env(safe-area-inset-right, 0px));
  bottom: max(10px, calc(env(safe-area-inset-bottom, 0px) - 6px));
  height: 62px; padding: 5px; gap: 2px; align-items: stretch;
  /* Micro exactement au centre : deux onglets à gauche, trois à droite (largeurs selon les libellés : RDV, Veille, Progresser). */
  --demi: calc((100% - 74px) / 2);
  grid-template-columns: calc(var(--demi) / 2) calc(var(--demi) / 2) 64px calc(var(--demi) * .28) calc(var(--demi) * .32) calc(var(--demi) * .40);
  border: 1px solid var(--border); border-radius: 31px;
  background: var(--bar-bg); -webkit-backdrop-filter: saturate(180%) blur(20px); backdrop-filter: saturate(180%) blur(20px);
  box-shadow: 0 10px 30px -12px rgba(9, 9, 11, .35);
}
.tabbar a { justify-content: center; padding-top: 0; border-radius: 26px; font-size: .6rem; letter-spacing: -.01em; white-space: nowrap; }
.tabbar a.active { background: var(--accent-soft); box-shadow: inset 0 0 0 1px var(--accent-line); }
.tabbar .ic { width: 23px; height: 23px; }
.tab-badge { top: 2px; }
.tab-dicter { display: grid; place-items: center; padding: 0; border: 0; background: none; cursor: pointer; }
.tab-dicter-rond { display: grid; place-items: center; width: 54px; height: 54px; margin-top: -18px; border-radius: 50%;
  background: var(--accent); color: var(--on-accent); box-shadow: 0 6px 16px -6px rgba(15, 118, 110, .7), 0 0 0 4px var(--surface); }
.tab-dicter-rond .ic { width: 26px; height: 26px; stroke-width: 2; }
.tab-dicter:active .tab-dicter-rond { transform: scale(.95); }
.tab-dicter:focus-visible { outline: none; }
.tab-dicter:focus-visible .tab-dicter-rond { outline: 2px solid var(--accent); outline-offset: 3px; }
.head-pipe { min-height: 30px; padding: 4px 10px; gap: 5px; border-radius: 15px; font-size: .8125rem; }
.head-pipe .ic { width: 16px; height: 16px; }

/* ---------- Réglages ---------- */
.reglages { display: flex; flex-direction: column; gap: 24px; max-width: 680px; }
.rows-titre { margin: 0 0 6px 16px; font-size: .8125rem; font-weight: 600; letter-spacing: .01em; text-transform: uppercase; color: var(--muted); }
.rows > .theme-row { flex-wrap: wrap; row-gap: 10px; padding-top: 12px; padding-bottom: 12px; }
.theme-seg { flex: 1 1 100%; }
.theme-seg > button { gap: 6px; }
.theme-seg .ic { width: 15px; height: 15px; vertical-align: 0; }
@media (min-width: 600px) { .theme-seg { flex: 0 0 auto; min-width: 320px; } }
.btn-ghost.on { background: var(--fill); }

/* ---------- Mode clair « Bandeau vert-bleu » (choisi le 27/11/2026) ----------
   La couleur de marque structure l'écran : barre du haut (Mac) et chiffres du jour en vert-bleu plein,
   titres de section verts, cartes blanches détachées du fond. Ne s'applique qu'en clair : l'attribut
   data-ton (clair | sombre) est posé sur <html> par le script de base.html. Le mode sombre ne change pas. */
[data-ton="clair"] .lbl, [data-ton="clair"] .section-label, [data-ton="clair"] .eyebrow, [data-ton="clair"] .rows-titre { color: var(--accent); }
[data-ton="clair"] .chiffres { background: var(--accent); border: 0; }
[data-ton="clair"] .chiffre, [data-ton="clair"] .chiffre-v { color: #FFFFFF; }
[data-ton="clair"] .chiffre-l, [data-ton="clair"] .chiffre-tot { color: rgba(255, 255, 255, .85); }
[data-ton="clair"] .chiffre + .chiffre { border-left-color: rgba(255, 255, 255, .22); }
[data-ton="clair"] .chiffre:hover { background: rgba(255, 255, 255, .1); }
[data-ton="clair"] .ev { border-color: transparent; box-shadow: var(--shadow); }
[data-ton="clair"] .ev.late { box-shadow: 0 0 0 1px var(--danger-line), 0 2px 6px -3px rgba(15, 94, 89, .18); }
[data-ton="clair"] .ev-vedette { background: var(--surface); box-shadow: inset 4px 0 0 var(--accent), var(--shadow); }
[data-ton="clair"] .ev-vide { background: var(--surface); }
[data-ton="clair"] .pc-score { background: var(--accent-soft); border-color: #9ED8CF; }
[data-ton="clair"] button.pc-score:hover { background: #C6E8E2; }
[data-ton="clair"] .pc-score-val { color: var(--accent-strong); }
[data-ton="clair"] .pc-angle { border: 0; box-shadow: inset 4px 0 0 var(--accent), var(--shadow); }
[data-ton="clair"] .pc-panel { background: var(--surface); border-radius: 12px; padding: 6px 18px; box-shadow: var(--shadow); }
[data-ton="clair"] .pc-bloc { background: var(--surface); border: 0; box-shadow: var(--shadow); }
[data-ton="clair"] .pc-btns .btn { background: var(--surface); box-shadow: var(--shadow); color: var(--accent-strong); }
[data-ton="clair"] .pc-btns .btn .ic { color: var(--accent); }
@media (min-width: 900px) {
  [data-ton="clair"] body { background: var(--bg); }
  [data-ton="clair"] .topbar { background: var(--accent); border-bottom-color: var(--accent); }
  [data-ton="clair"] .topbar .brand, [data-ton="clair"] .topbar .brand .ic { color: #FFFFFF; }
  [data-ton="clair"] .topbar .nav a { color: rgba(255, 255, 255, .85); }
  [data-ton="clair"] .topbar .nav a:hover { background: rgba(255, 255, 255, .12); color: #FFFFFF; }
  [data-ton="clair"] .topbar .nav a.active { background: rgba(255, 255, 255, .2); color: #FFFFFF; }
  [data-ton="clair"] .topbar .count { background: #FFFFFF; color: var(--accent); }
  [data-ton="clair"] .topsearch input { background: rgba(255, 255, 255, .14); border-color: transparent; color: #FFFFFF; }
  [data-ton="clair"] .topsearch input::placeholder { color: rgba(255, 255, 255, .75); }
  [data-ton="clair"] .topsearch .ic, [data-ton="clair"] .topsearch kbd { color: rgba(255, 255, 255, .75); border-color: rgba(255, 255, 255, .3); }
  [data-ton="clair"] .top-etat, [data-ton="clair"] .top-etat .ic, [data-ton="clair"] .topbar .btn-ghost { color: #FFFFFF; }
  [data-ton="clair"] .top-etat:hover { color: #FFFFFF; }
  [data-ton="clair"] .topbar .btn-ghost:hover, [data-ton="clair"] .topbar .btn-ghost.on { background: rgba(255, 255, 255, .16); }
  [data-ton="clair"] .topbar .btn-primary { background: #FFFFFF; color: var(--accent); }
  [data-ton="clair"] .chiffres { background: none; gap: 10px; }
  [data-ton="clair"] .chiffre { background: var(--accent); border: 0; }
  [data-ton="clair"] .chiffre:hover { background: var(--accent-strong); }
  [data-ton="clair"] .ev { background: var(--surface); border-radius: 10px; padding: 12px 14px; margin: 0 0 8px; border-top: 0; }
  [data-ton="clair"] .ev-vedette { margin: 0 0 8px; }
  [data-ton="clair"] .ev-vide { background: none; box-shadow: none; }
}

/* ---------- Mode sombre « Nuit marine » (choisi le 27/11/2026) ----------
   Bleu nuit profond au lieu du noir, cartes étagées, chiffres et score en dégradé vert-bleu, titres
   de section cyan, angle d'attaque marqué en ambre. Ne s'applique qu'en sombre (data-ton = sombre). */
[data-ton="sombre"] .lbl, [data-ton="sombre"] .section-label, [data-ton="sombre"] .eyebrow, [data-ton="sombre"] .rows-titre { color: var(--link); }
[data-ton="sombre"] .chiffres { background: none; border: 0; gap: 8px; }
[data-ton="sombre"] .chiffre { background: linear-gradient(160deg, #134E4A, #0F3B47); border: 1px solid rgba(45, 212, 191, .35); border-radius: 12px; }
[data-ton="sombre"] .chiffre + .chiffre { border-left: 1px solid rgba(45, 212, 191, .35); }
[data-ton="sombre"] .chiffre:hover { background: linear-gradient(160deg, #176059, #124657); }
[data-ton="sombre"] .chiffre-v { color: #FFFFFF; }
[data-ton="sombre"] .chiffre-l, [data-ton="sombre"] .chiffre-tot { color: #99F6E4; }
[data-ton="sombre"] .ev { background: var(--surface); border: 0; border-radius: 12px; box-shadow: var(--shadow); }
[data-ton="sombre"] .ev.late { box-shadow: 0 0 0 1px rgba(251, 113, 133, .35), 0 8px 24px -12px rgba(0, 0, 0, .6); }
[data-ton="sombre"] .ev-vedette { background: linear-gradient(90deg, rgba(45, 212, 191, .12), var(--surface) 60%); box-shadow: inset 4px 0 0 var(--accent-strong), var(--shadow); }
[data-ton="sombre"] .ev-vide { background: transparent; box-shadow: none; border: 1px dashed var(--border); }
[data-ton="sombre"] .pc-score { background: linear-gradient(135deg, #115E59, #0E4A63); border: 0; }
[data-ton="sombre"] button.pc-score:hover { background: linear-gradient(135deg, #14706A, #115873); }
[data-ton="sombre"] .pc-score-val, [data-ton="sombre"] .pc-score-txt strong { color: #FFFFFF; }
[data-ton="sombre"] .pc-score-txt { color: #CCFBF1; }
[data-ton="sombre"] .pc-angle { background: var(--surface); border: 0; box-shadow: inset 4px 0 0 #FBBF24, var(--shadow); }
[data-ton="sombre"] .pc-angle .lbl { color: #FBBF24; }
[data-ton="sombre"] .pc-panel { background: var(--surface); border-radius: 12px; padding: 6px 18px; box-shadow: var(--shadow); }
[data-ton="sombre"] .pc-bloc { background: var(--surface); border: 0; box-shadow: var(--shadow); }
[data-ton="sombre"] .pc-btns .btn { background: var(--surface-2); color: var(--text); }
[data-ton="sombre"] .pc-btns .btn .ic { color: var(--link); }
[data-ton="sombre"] .vague-a, [data-ton="sombre"] .score-badge.vague-bg-a { background: linear-gradient(135deg, #14B8A6, #0891B2); color: #042F2E; }
[data-ton="sombre"] .tabbar { box-shadow: 0 0 0 1px var(--border), 0 12px 30px -8px rgba(0, 0, 0, .7); }
[data-ton="sombre"] .tabbar a.active { color: var(--link); }
[data-ton="sombre"] .tab-dicter-rond { background: linear-gradient(135deg, #14B8A6, #0891B2); }
@media (min-width: 900px) {
  [data-ton="sombre"] body { background: var(--bg); }
  [data-ton="sombre"] .topbar { background: var(--side-bg); border-bottom-color: var(--border); }
  [data-ton="sombre"] .topbar .nav a.active { background: var(--accent-soft); color: var(--link); }
  [data-ton="sombre"] .ev { padding: 12px 14px; margin: 0 0 8px; border-top: 0; }
  [data-ton="sombre"] .ev-vedette { margin: 0 0 8px; }
}

/* Connexion à l'Atelier hébergé (clé d'accès) et Réglages > Accès */
.main.connexion { display: flex; align-items: center; justify-content: center; min-height: 100vh; min-height: 100dvh; padding: 24px 16px; }
.connexion-carte { width: 100%; max-width: 420px; }
.connexion-tete { display: flex; align-items: center; gap: 14px; }
.connexion-tete h1 { margin: 0; font-size: 1.5rem; }
.connexion-tete p { margin: 2px 0 0; }
.connexion-carte .btn { width: 100%; justify-content: center; }
.connexion-carte label { display: block; }
.connexion-carte input { width: 100%; }
.connexion-message.erreur { color: var(--danger, #B42318); }
.connexion-carte > * + * { margin-top: 16px; }
.connexion-carte .connexion-tete + * { margin-top: 20px; }
.rows > .acces-invitation { display: block; padding: 12px 16px; }
.rows > .acces-invitation[hidden] { display: none; }
.acces-invitation > * { display: block; width: 100%; }
.acces-invitation > * + * { margin-top: 8px; }
.acces-invitation p { margin: 0; }
.acces-invitation input { font-size: .85rem; }
