@import url('polices.css');
/* Mon espace Thousand Heals : feuille de style, interface 0.3.1. Assemblée par build.sh :
 * contrats/espace.css (kit), styles/espace-v2.css (ajouts V2), styles/espace-v3.css et styles/v3-*.css (refonte V3). Ne pas modifier ici. */

.esp-page { min-height: 100vh; display: flex; flex-direction: column; background-color: #ffffff; color: #1F1F1F; font-family: 'Open Sans', Arial, sans-serif; font-size: 16px; line-height: 1.5; }
.esp-header { display: flex; align-items: center; justify-content: space-between; gap: 24px; padding: 16px 32px; border-bottom: 1px solid #D8D6D4; background-color: #ffffff; }
.esp-logo { height: 40px; width: auto; display: block; }
.esp-nav { display: flex; align-items: center; gap: 4px; flex-wrap: wrap; }
.esp-nav-link { color: #6B6B6B; text-decoration: none; padding: 8px 12px; border-radius: 999px; font-size: 16px; line-height: 1.4; }
.esp-nav-link-active { color: #1E5A3C; background-color: #DCEFE3; font-weight: 600; }
.esp-user { display: flex; align-items: center; gap: 12px; color: #6B6B6B; font-size: 14px; }
.esp-main { flex: 1; width: 100%; max-width: 1120px; margin: 0 auto; padding: 32px; display: flex; flex-direction: column; gap: 24px; }
.esp-main-narrow { max-width: 560px; }
.esp-title { font-family: 'Coolvetica Condensed', Arial, sans-serif; font-size: 40px; line-height: 1.05; font-weight: 400; text-transform: uppercase; color: #1F1F1F; margin: 0; }
.esp-subtitle { font-family: 'Coolvetica Condensed', Arial, sans-serif; font-size: 24px; line-height: 1.1; font-weight: 400; text-transform: uppercase; color: #1F1F1F; margin: 0; }
.esp-lead { color: #6B6B6B; margin: 0; font-size: 16px; }
.esp-text { margin: 0; font-size: 16px; color: #1F1F1F; }
.esp-muted { color: #6B6B6B; font-size: 14px; margin: 0; }
.esp-card { border: 1px solid #D8D6D4; border-radius: 16px; padding: 24px; background-color: #ffffff; display: flex; flex-direction: column; gap: 16px; }
.esp-card-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.esp-grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.esp-grid-3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 24px; }
.esp-grid-4 { display: grid; grid-template-columns: 1fr 1fr 1fr 1fr; gap: 24px; }
.esp-kpi { border: 1px solid #D8D6D4; border-radius: 16px; padding: 20px; display: flex; flex-direction: column; gap: 4px; }
.esp-kpi-value { font-family: 'Coolvetica Condensed', Arial, sans-serif; font-size: 36px; line-height: 1; color: #1F1F1F; }
.esp-kpi-label { color: #6B6B6B; font-size: 14px; }
.esp-btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 14px 28px; border-radius: 999px; background-color: #1F1F1F; color: #ffffff; font-family: 'Open Sans', Arial, sans-serif; font-size: 16px; font-weight: 600; line-height: 1.2; text-decoration: none; border: 1px solid #1F1F1F; cursor: pointer; text-align: center; }
.esp-btn-outline { background-color: #ffffff; color: #1F1F1F; }
.esp-btn-rose { background-color: #F2B8C8; border-color: #F2B8C8; color: #1F1F1F; }
.esp-btn-rose:hover { background-color: #EBA3B8; border-color: #EBA3B8; }
.esp-btn-small { padding: 8px 16px; font-size: 14px; }
.esp-btn-block { width: 100%; display: flex; }
.esp-btn-disabled { background-color: #D8D6D4; border-color: #D8D6D4; color: #6B6B6B; cursor: default; }
.esp-actions { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; }
.esp-field { display: flex; flex-direction: column; gap: 6px; }
.esp-label { font-size: 14px; font-weight: 600; color: #1F1F1F; }
.esp-input { box-sizing: border-box; height: 46px; min-height: 46px; line-height: 44px; padding: 0 14px; border: 1px solid #8C8A8A; border-radius: 10px; font-size: 16px; font-family: 'Open Sans', Arial, sans-serif; color: #1F1F1F; background-color: #ffffff; width: 100%; }
.esp-input.esp-textarea { height: auto; min-height: 96px; line-height: 22px; padding-top: 12px; padding-bottom: 12px; }
.esp-help { font-size: 14px; color: #6B6B6B; margin: 0; }
.esp-check { display: flex; align-items: flex-start; gap: 10px; font-size: 16px; color: #1F1F1F; }
.esp-table { width: 100%; border-collapse: collapse; font-size: 15px; }
.esp-th { text-align: left; padding: 12px 10px; border-bottom: 1px solid #D8D6D4; color: #6B6B6B; font-weight: 600; font-size: 13px; text-transform: uppercase; letter-spacing: 0.04em; }
.esp-td { padding: 14px 10px; border-bottom: 1px solid #D8D6D4; vertical-align: middle; }
.esp-badge { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: 999px; font-size: 13px; font-weight: 600; background-color: #F3F2F1; color: #1F1F1F; white-space: nowrap; }
.esp-dot { width: 8px; height: 8px; border-radius: 999px; background-color: #8C8A8A; display: inline-block; }
.esp-dot-ok { background-color: #2E7D4F; }
.esp-dot-wait { background-color: #C98A1B; }
.esp-dot-ko { background-color: #B3261E; }
.esp-dot-done { background-color: #1F1F1F; }
.esp-alert { border-left: 3px solid #1F1F1F; padding: 12px 16px; background-color: #F7F6F5; border-radius: 0 10px 10px 0; font-size: 15px; }
.esp-list { display: flex; flex-direction: column; gap: 0; }
.esp-item { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 14px 0; border-bottom: 1px solid #D8D6D4; flex-wrap: wrap; }
.esp-item-main { display: flex; flex-direction: column; gap: 2px; }
.esp-item-title { font-weight: 600; font-size: 16px; }
.esp-avatar { width: 64px; height: 64px; border-radius: 999px; background-color: #D8D6D4; object-fit: cover; flex-shrink: 0; }
.esp-avatar-small { width: 40px; height: 40px; }
.esp-chips { display: flex; gap: 8px; flex-wrap: wrap; }
.esp-chip { padding: 10px 16px; border: 1px solid #8C8A8A; border-radius: 999px; font-size: 15px; color: #1F1F1F; background-color: #ffffff; cursor: pointer; }
.esp-chip-selected { background-color: #1F1F1F; color: #ffffff; border-color: #1F1F1F; }
.esp-chip-off { color: #8C8A8A; border-color: #D8D6D4; cursor: default; }
.esp-footer { padding: 16px 32px; border-top: 1px solid #D8D6D4; color: #6B6B6B; font-size: 14px; text-align: center; }
.esp-urgence { position: sticky; bottom: 0; padding: 12px 16px; background-color: #1F1F1F; color: #ffffff; font-size: 16px; text-align: center; }
.esp-filters { display: flex; gap: 12px; flex-wrap: wrap; align-items: flex-end; }
.esp-filters .esp-field { min-width: 180px; }
.esp-progress { width: 100%; height: 10px; background-color: #EDECEB; border-radius: 999px; overflow: hidden; }
.esp-progress-bar { height: 10px; background-color: #1F1F1F; border-radius: 999px; }
.esp-tabs { display: flex; gap: 4px; border-bottom: 1px solid #D8D6D4; }
.esp-tab { padding: 10px 16px; color: #6B6B6B; text-decoration: none; border-bottom: 2px solid transparent; font-size: 15px; }
.esp-tab-active { color: #1F1F1F; border-bottom-color: #1F1F1F; font-weight: 600; }
.esp-cal { display: grid; grid-template-columns: 72px repeat(5, 1fr); border: 1px solid #D8D6D4; border-radius: 12px; overflow: hidden; }
.esp-cal-head { padding: 10px 8px; font-size: 13px; font-weight: 600; color: #6B6B6B; text-transform: uppercase; letter-spacing: 0.04em; border-bottom: 1px solid #D8D6D4; background-color: #FAF9F8; text-align: center; }
.esp-cal-hour { padding: 10px 8px; font-size: 13px; color: #6B6B6B; border-bottom: 1px solid #EDECEB; border-right: 1px solid #D8D6D4; }
.esp-cal-cell { padding: 6px; border-bottom: 1px solid #EDECEB; border-right: 1px solid #EDECEB; min-height: 48px; }
.esp-cal-event { background-color: #F3F2F1; border-left: 3px solid #1F1F1F; border-radius: 0 6px 6px 0; padding: 6px 8px; font-size: 13px; line-height: 1.3; }
.esp-cal-event-wait { border-left-color: #C98A1B; }
.esp-cal-event-free { border-left-color: #D8D6D4; background-color: #ffffff; border: 1px dashed #D8D6D4; color: #6B6B6B; }
.esp-qr { width: 160px; height: 160px; border: 1px solid #D8D6D4; border-radius: 12px; background-color: #F3F2F1; display: flex; align-items: center; justify-content: center; color: #6B6B6B; font-size: 13px; text-align: center; }
.esp-chart { display: flex; align-items: flex-end; gap: 12px; height: 160px; padding-top: 12px; border-bottom: 1px solid #D8D6D4; }
.esp-bar { flex: 1; background-color: #1F1F1F; border-radius: 6px 6px 0 0; min-width: 20px; }
.esp-bar-light { background-color: #8C8A8A; }
.esp-chart-labels { display: flex; gap: 12px; }
.esp-chart-label { flex: 1; text-align: center; font-size: 12px; color: #6B6B6B; }
.esp-divider { height: 1px; background-color: #D8D6D4; width: 100%; }
.esp-sidebar-layout { display: grid; grid-template-columns: 2fr 1fr; gap: 24px; align-items: start; }
.esp-center { text-align: center; }
@media screen and (max-width: 991px) { .esp-grid-4 { grid-template-columns: 1fr 1fr; } .esp-grid-3 { grid-template-columns: 1fr 1fr; } .esp-sidebar-layout { grid-template-columns: 1fr; } .esp-main { padding: 24px; } }
@media screen and (max-width: 767px) { .esp-grid-2 { grid-template-columns: 1fr; } .esp-grid-3 { grid-template-columns: 1fr; } .esp-header { padding: 12px 16px; flex-wrap: wrap; } .esp-main { padding: 16px; gap: 16px; } .esp-title { font-size: 32px; } .esp-cal { grid-template-columns: 56px repeat(2, 1fr); } .esp-table { font-size: 14px; } .esp-footer { padding: 16px; } }
@media screen and (max-width: 479px) { .esp-grid-4 { grid-template-columns: 1fr; } .esp-btn { width: 100%; display: flex; } .esp-nav { gap: 0; } .esp-nav-link { padding: 8px 10px; font-size: 15px; } }

/* Hauteurs de barre (esp-bar) et largeurs de barre de progression (esp-progress-bar), par dizaine. Remplacent tout style inline. */
.esp-h-10 { height: 10%; }
.esp-h-20 { height: 20%; }
.esp-h-30 { height: 30%; }
.esp-h-40 { height: 40%; }
.esp-h-50 { height: 50%; }
.esp-h-60 { height: 60%; }
.esp-h-70 { height: 70%; }
.esp-h-80 { height: 80%; }
.esp-h-90 { height: 90%; }
.esp-h-100 { height: 100%; }
.esp-w-10 { width: 10%; }
.esp-w-20 { width: 20%; }
.esp-w-30 { width: 30%; }
.esp-w-40 { width: 40%; }
.esp-w-50 { width: 50%; }
.esp-w-60 { width: 60%; }
.esp-w-70 { width: 70%; }
.esp-w-80 { width: 80%; }
.esp-w-90 { width: 90%; }
.esp-w-100 { width: 100%; }

/* ---------------------------------------------------------------------------
 * Ajouts V2 (contrat V2, section 6) et classes du kit absentes de contrats/espace.css.
 * Source : socle/interface/styles/espace-v2.css ; build.sh assemble site/espace.css.
 * ------------------------------------------------------------------------- */

/* Boîte et base de la page */
*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; background-color: #ffffff; }
body { -webkit-text-size-adjust: 100%; }
[hidden] { display: none !important; }
.esp-page img { max-width: 100%; }
.esp-page p { margin: 0; }
.esp-page a:focus-visible, .esp-page button:focus-visible, .esp-page input:focus-visible, .esp-page select:focus-visible, .esp-page textarea:focus-visible { outline: 2px solid #2E7D4F; outline-offset: 2px; }
.esp-page button { font-family: inherit; }

/* Classes du kit (contrat d'identité visuelle) absentes de la feuille d'origine */
.esp-main-wide { max-width: 1400px; }
.esp-main > *, .esp-sidebar-layout > *, .esp-grid-2 > *, .esp-grid-3 > *, .esp-grid-4 > * { min-width: 0; }
.esp-stack { display: flex; flex-direction: column; gap: 8px; }
.esp-row { display: flex; flex-wrap: wrap; align-items: center; gap: 16px; }
.esp-right { display: flex; justify-content: flex-end; }
.esp-scroll-x { width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch; }
.esp-caption { font-size: 13px; font-weight: 600; text-transform: uppercase; letter-spacing: .04em; color: #6B6B6B; margin: 0; }
.esp-strong { font-weight: 600; margin: 0; }
.esp-text, .esp-muted, .esp-help, .esp-item-main, .esp-strong { overflow-wrap: anywhere; }
.esp-check input { margin-top: 4px; flex-shrink: 0; width: 18px; height: 18px; accent-color: #1F1F1F; }
.esp-chip { display: inline-flex; align-items: center; gap: 8px; text-decoration: none; font-family: inherit; line-height: 1.3; }
.esp-chip input { margin: 0; width: 16px; height: 16px; accent-color: #1F1F1F; }
.esp-chip:has(input:checked) { background-color: #1F1F1F; color: #ffffff; border-color: #1F1F1F; }
.esp-chip:has(input:disabled) { color: #8C8A8A; border-color: #D8D6D4; cursor: default; }
button.esp-btn, button.esp-chip { -webkit-appearance: none; appearance: none; }
.esp-btn-disabled { pointer-events: auto; }
fieldset.esp-field { border: 0; padding: 0; margin: 0; min-width: 0; }
fieldset.esp-field legend { padding: 0; margin-bottom: 6px; }

/* En-tête repliable sur mobile (bouton « Menu » ajouté par main.js) */
.esp-menu-bouton { display: none; padding: 8px 16px; border: 1px solid #1F1F1F; border-radius: 999px; background-color: #ffffff; color: #1F1F1F; font-size: 15px; font-weight: 600; cursor: pointer; }
@media screen and (max-width: 767px) {
  .esp-header { flex-wrap: wrap; gap: 12px; }
  .esp-header .esp-menu-bouton { display: inline-flex; margin-left: auto; }
  .esp-header.esp-header-repliable .esp-nav,
  .esp-header.esp-header-repliable .esp-user { display: none; }
  .esp-header.esp-header-repliable.esp-header-ouvert .esp-nav { display: flex; flex-direction: column; align-items: stretch; width: 100%; gap: 2px; }
  .esp-header.esp-header-repliable.esp-header-ouvert .esp-user { display: flex; width: 100%; justify-content: space-between; flex-wrap: wrap; }
  .esp-logo { height: 32px; }
  .esp-card { padding: 16px; }
  .esp-actions .esp-btn { flex: 1 1 auto; }
}

/* Bandeau d'aide patient, bouton rose et panneau d'aide immédiate */
.esp-help-bar { position: sticky; bottom: 0; z-index: 20; display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 8px 16px; padding: 10px 16px; background-color: #1F1F1F; color: #ffffff; font-size: 15px; text-align: center; }
.esp-help-bar p { margin: 0; }
.esp-btn-aide { display: inline-flex; align-items: center; justify-content: center; padding: 8px 18px; border-radius: 999px; background-color: #F2B8C8; border: 1px solid #F2B8C8; color: #1F1F1F; font-size: 15px; font-weight: 600; text-decoration: none; cursor: pointer; }
.esp-btn-aide:hover { background-color: #EBA3B8; border-color: #EBA3B8; }
.esp-panneau-aide { width: 100%; display: flex; flex-direction: column; gap: 8px; padding: 12px; border-radius: 12px; background-color: #ffffff; color: #1F1F1F; text-align: left; }
.esp-panneau-aide a { display: flex; justify-content: space-between; gap: 12px; padding: 12px 16px; border: 1px solid #D8D6D4; border-radius: 10px; color: #1F1F1F; text-decoration: none; font-weight: 600; }

/* Burn-out : cartes de situation, carte verte */
.esp-sit { border: 1px solid #D8D6D4; border-radius: 16px; padding: 20px; display: flex; flex-direction: column; gap: 12px; background-color: #ffffff; }
.esp-carte-verte { background-color: #DCEFE3; border-color: #DCEFE3; }

/* Catalogue et devis (espace client) */
.esp-nouveau { display: inline-flex; align-items: center; padding: 2px 10px; border-radius: 999px; background-color: #DCEFE3; color: #1E5A3C; font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; }
.esp-prix { font-family: 'Coolvetica Condensed', Arial, sans-serif; font-size: 30px; line-height: 1; color: #1F1F1F; }
.esp-svc { border: 1px solid #D8D6D4; border-radius: 16px; padding: 20px; display: flex; flex-direction: column; gap: 12px; background-color: #ffffff; }
.esp-svc-sel { border: 2px solid #1F1F1F; }
.esp-crise { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; padding: 16px 20px; border-radius: 16px; background-color: #FBE3EA; color: #1F1F1F; }
.esp-ligne-montant { display: flex; justify-content: space-between; gap: 16px; padding: 8px 0; border-bottom: 1px solid #EDECEB; }
.esp-total { display: flex; justify-content: space-between; gap: 16px; padding: 12px 0; font-weight: 700; font-size: 18px; }
.esp-mail { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: 999px; background-color: #F3F2F1; font-size: 14px; }

/* Séance écrite : bulles */
.esp-msgs { display: flex; flex-direction: column; gap: 10px; min-height: 240px; max-height: 60vh; overflow-y: auto; padding: 4px; }
.esp-msg { max-width: 82%; padding: 10px 14px; border-radius: 16px; font-size: 16px; line-height: 1.45; overflow-wrap: anywhere; white-space: pre-wrap; display: flex; flex-direction: column; gap: 4px; }
.esp-msg-moi { align-self: flex-end; background-color: #1F1F1F; color: #ffffff; border-bottom-right-radius: 4px; }
.esp-msg-autre { align-self: flex-start; background-color: #F3F2F1; color: #1F1F1F; border-bottom-left-radius: 4px; }
.esp-msg-orig { font-size: 13px; opacity: .75; }
.esp-msg-heure { font-size: 12px; opacity: .7; }

/* « Vu en tant que » */
.esp-vu { position: sticky; top: 0; z-index: 30; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 16px; padding: 10px 16px; background-color: #FFF4D6; border-bottom: 1px solid #E8D9A8; color: #1F1F1F; font-size: 15px; font-weight: 600; }

/* Score d'attribution */
.esp-score { display: flex; align-items: center; gap: 10px; font-weight: 600; }
.esp-score-barre { flex: 1; min-width: 80px; height: 8px; border-radius: 999px; background-color: #EDECEB; overflow: hidden; }
.esp-score-barre > span { display: block; height: 100%; background-color: #2E7D4F; border-radius: 999px; }

/* Choix indisponible : chip désactivée avec mention */
.esp-bientot { color: #8C8A8A; border-color: #D8D6D4; cursor: default; }
.esp-bientot .esp-bientot-mention { font-size: 12px; font-weight: 600; padding: 2px 8px; border-radius: 999px; background-color: #F3F2F1; color: #6B6B6B; }

/* Document imprimable A4 */
.esp-imprimer { max-width: 210mm; margin: 0 auto; padding: 16mm; background-color: #ffffff; color: #1F1F1F; }
@media screen and (max-width: 600px) { .esp-imprimer { padding: 16px; max-width: 100%; } }
@media print {
  @page { size: A4; margin: 12mm; }
  .esp-header, .esp-footer, .esp-help-bar, .esp-vu, .esp-menu-bouton, [data-esp-action="imprimer"], .esp-pas-imprimer { display: none !important; }
  .esp-main { padding: 0; max-width: none; }
  .esp-imprimer { padding: 0; max-width: none; }
  body { background-color: #ffffff; }
}

/* Liste de sélection (Mes patients) */
a.esp-item { color: inherit; text-decoration: none; }
.esp-item[aria-current="true"] { background-color: #DCEFE3; border-radius: 10px; padding-left: 10px; padding-right: 10px; }
.esp-item-main .esp-badge, .esp-stack > .esp-badge, .esp-kpi .esp-badge { align-self: flex-start; }
.esp-panneau-aide a span:last-child { text-align: right; }
/* ---------------------------------------------------------------------------
 * V3 (22/10/2026) : refonte du design, variante « Éditorial couleur » retenue par Nicolas.
 * Fond crème, menu latéral clair à pastilles de couleur, tuiles colorées, angles arrondis,
 * titres en Instrument Serif, texte en Geist, chiffres en Geist Mono.
 * Source : socle/interface/styles/espace-v3.css (généré par le script de refonte) ; les classes
 * propres à un espace vont dans styles/v3-<espace>.css, assemblées après ce fichier.
 * ------------------------------------------------------------------------- */

:root {
  --esp-fond: #F6F3EE;
  --esp-surface: #FFFFFF;
  --esp-surface-2: #FAF8F4;
  --esp-encre: #1C1B19;
  --esp-gris: #6E6A63;
  --esp-gris-fonce: #57534D;
  --esp-filet: #ECE8E1;
  --esp-filet-fort: #DDD7CE;
  --esp-rose: #F2B8C8;
  --esp-rose-survol: #EBA3B8;
  --esp-vert: #4E7A5A; --esp-vert-t: #DCE8DD; --esp-vert-d: #1F3A33;
  --esp-bleu: #33598F; --esp-bleu-t: #DCE5F2; --esp-bleu-d: #1B3358;
  --esp-terra: #B4533A; --esp-terra-t: #F4DDD3; --esp-terra-d: #6B2A1B;
  --esp-violet: #6A5AA8; --esp-violet-t: #E4E0F3; --esp-violet-d: #3A2F6B;
  --esp-safran: #E9B54F; --esp-safran-t: #F6E6C2; --esp-safran-d: #3A2A08;
  --esp-prune: #9C4F7A; --esp-prune-t: #F1DDE8; --esp-prune-d: #5C2647;
  --esp-rouge: #B5402F;
  --esp-rayon: 28px;
  --esp-rayon-moyen: 20px;
  --esp-rayon-petit: 14px;
  --esp-serif: 'Instrument Serif', Georgia, 'Times New Roman', serif;
  --esp-sans: 'Geist', 'Open Sans', Arial, sans-serif;
  --esp-mono: 'Geist Mono', ui-monospace, Menlo, monospace;
  --esp-ombre: 0 1px 2px rgba(60, 50, 30, 0.04), 0 12px 32px rgba(60, 50, 30, 0.06);
}

html, body { background-color: var(--esp-fond); }
.esp-page { background-color: var(--esp-fond); color: var(--esp-encre); font-family: var(--esp-sans); font-size: 15px; line-height: 1.55; -webkit-font-smoothing: antialiased; }
.esp-page button, .esp-page input, .esp-page select, .esp-page textarea { font-family: var(--esp-sans); }
.esp-page a:focus-visible, .esp-page button:focus-visible, .esp-page input:focus-visible, .esp-page select:focus-visible, .esp-page textarea:focus-visible, .esp-page summary:focus-visible { outline: 2px solid var(--esp-bleu); outline-offset: 2px; }
:where(.esp-page) a:where(:not([class*="esp-btn"])) { color: var(--esp-encre); }

/* ---- Mise en page avec menu latéral (pages qui portent une navigation) ---- */
.esp-page:has(> .esp-header .esp-nav) { display: grid; grid-template-columns: 264px minmax(0, 1fr); grid-template-rows: auto 1fr auto; column-gap: 24px; padding: 16px 16px 0; min-height: 100vh; align-items: start; }
.esp-page:has(> .esp-header .esp-nav) > .esp-vu { grid-column: 1 / -1; margin: -16px -16px 16px; }
.esp-page:has(> .esp-header .esp-nav) > .esp-header { grid-column: 1; grid-row: 1 / span 3; position: sticky; top: 16px; min-height: calc(100vh - 32px); max-height: calc(100vh - 32px); overflow-y: auto; }
.esp-page:has(> .esp-header .esp-nav) > .esp-vu ~ .esp-header { grid-row: 2 / span 3; }
.esp-page:has(> .esp-header .esp-nav) > .esp-main,
.esp-page:has(> .esp-header .esp-nav) > .esp-footer,
.esp-page:has(> .esp-header .esp-nav) > .esp-help-bar,
.esp-page:has(> .esp-header .esp-nav) > :not(.esp-header):not(.esp-vu) { grid-column: 2; }
.esp-page:has(> .esp-header .esp-nav) > .esp-main { margin: 0; max-width: 1180px; padding: 20px 12px 40px; }
.esp-page:has(> .esp-header .esp-nav) > .esp-main.esp-main-wide { max-width: 1400px; }
.esp-page:has(> .esp-header .esp-nav) > .esp-main.esp-main-narrow { max-width: 760px; }

.esp-header { flex-direction: column; align-items: stretch; justify-content: flex-start; gap: 22px; padding: 24px 14px 16px; border: 0; border-radius: var(--esp-rayon); background-color: var(--esp-surface); box-shadow: var(--esp-ombre); }
.esp-logo { height: auto; width: 40px; margin: 0 10px; }
.esp-espace { display: flex; flex-direction: column; gap: 0; margin: -10px 10px 0; line-height: 1.2; }
.esp-espace-nom { font-family: var(--esp-serif); font-size: 24px; color: var(--esp-encre); }
.esp-espace-role { font-size: 12px; color: var(--esp-gris); }
.esp-nav { flex-direction: column; align-items: stretch; gap: 4px; flex-wrap: nowrap; }
.esp-nav-link { --esp-c: #57534D; --esp-t: #ECE8E1; --esp-d: #1C1B19; display: flex; align-items: center; gap: 10px; min-height: 44px; padding: 4px 12px 4px 4px; border-radius: 999px; color: #3B3833; font-size: 14px; line-height: 1.3; font-weight: 400; background-color: transparent; transition: background-color .15s ease; }
.esp-nav-link::before { content: ""; flex: none; width: 36px; height: 36px; border-radius: 999px; background-color: var(--esp-t); background-image: var(--esp-ico, none); background-repeat: no-repeat; background-position: center; background-size: 17px 17px; }
.esp-nav-link:hover { background-color: var(--esp-surface-2); color: var(--esp-encre); }
.esp-nav-link-active, .esp-nav-link-active:hover { background-color: var(--esp-t); color: var(--esp-d); font-weight: 600; }
.esp-nav-link-active::before { background-color: var(--esp-c); background-image: var(--esp-ico-on, var(--esp-ico, none)); }
.esp-nav-compteur { margin-left: auto; min-width: 22px; padding: 0 7px; border-radius: 999px; background-color: var(--esp-terra); color: #FFFFFF; font-size: 12px; font-weight: 600; line-height: 20px; text-align: center; }
.esp-nav-compteur:empty { display: none; }
.esp-nav-separateur { height: 1px; margin: 8px 12px; background-color: var(--esp-filet); }
.esp-side-action { display: flex; align-items: center; justify-content: center; gap: 8px; min-height: 46px; padding: 0 16px; border-radius: 999px; background-color: var(--esp-rose); color: var(--esp-encre); font-weight: 600; font-size: 14px; text-decoration: none; border: 0; cursor: pointer; }
.esp-side-action:hover { background-color: var(--esp-rose-survol); }
.esp-side-crise { display: flex; align-items: center; gap: 12px; padding: 12px; border-radius: 24px; background-color: var(--esp-terra-t); color: var(--esp-terra-d); text-decoration: none; }
.esp-side-crise::before { content: ""; flex: none; width: 36px; height: 36px; border-radius: 999px; background: var(--esp-rouge) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23FFFFFF' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 3l10 18H2z'/%3E%3Cpath d='M12 10v5M12 18v.5'/%3E%3C/svg%3E") center / 16px 16px no-repeat; }
.esp-side-crise-texte { display: flex; flex-direction: column; line-height: 1.35; font-size: 12px; }
.esp-side-crise-texte strong { font-size: 14px; font-weight: 600; }
.esp-user { margin-top: auto; flex-direction: row; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 8px; padding: 10px 12px; border-radius: 22px; background-color: var(--esp-fond); color: var(--esp-encre); font-size: 13px; font-weight: 500; }
.esp-user .esp-btn { padding: 6px 12px; font-size: 12px; min-height: 0; background-color: transparent; border-color: transparent; color: var(--esp-gris); text-decoration: underline; text-underline-offset: 3px; }
.esp-user .esp-btn:hover { color: var(--esp-encre); }

/* Pages sans navigation (connexion, inscription, documents) : barre fine, contenu centré */
.esp-page:not(:has(> .esp-header .esp-nav)) > .esp-header { flex-direction: row; align-items: center; justify-content: flex-start; gap: 12px; margin: 16px auto 0; width: calc(100% - 32px); max-width: 760px; padding: 12px 18px; border-radius: 999px; }
.esp-page:not(:has(> .esp-header .esp-nav)) > .esp-header .esp-logo { width: 32px; margin: 0; }
.esp-page:not(:has(> .esp-header .esp-nav)) > .esp-header .esp-muted { font-family: var(--esp-serif); font-size: 20px; color: var(--esp-encre); }

/* ---- Typographie ---- */
.esp-title { font-family: var(--esp-serif); font-weight: 400; font-size: 56px; line-height: 1.02; letter-spacing: -0.02em; text-transform: none; color: var(--esp-encre); }
.esp-title em, .esp-title i { font-style: italic; color: var(--esp-vert); }
.esp-subtitle { font-family: var(--esp-serif); font-weight: 400; font-size: 30px; line-height: 1.1; letter-spacing: -0.01em; text-transform: none; color: var(--esp-encre); }
.esp-lead { color: var(--esp-gris-fonce); font-size: 16px; max-width: 720px; }
.esp-text { font-size: 15px; color: var(--esp-encre); }
.esp-muted { color: var(--esp-gris); font-size: 13px; }
.esp-help { color: var(--esp-gris); font-size: 13px; }
.esp-caption { font-family: var(--esp-mono); font-weight: 400; font-size: 11px; letter-spacing: 0.06em; color: var(--esp-gris); }
.esp-strong { font-weight: 600; }
.esp-chiffre, .esp-mono { font-family: var(--esp-mono); font-variant-numeric: tabular-nums; }
.esp-main { gap: 22px; }
.esp-main > .esp-title + .esp-lead { margin-top: -10px; }
.esp-etiquette { align-self: flex-start; display: inline-flex; align-items: center; gap: 6px; padding: 4px 12px; border-radius: 999px; background-color: var(--esp-surface); color: var(--esp-gris-fonce); font-family: var(--esp-mono); font-size: 12px; }

/* ---- Blocs ---- */
.esp-card, .esp-sit, .esp-svc { border: 0; border-radius: var(--esp-rayon); background-color: var(--esp-surface); padding: 24px; gap: 14px; }
.esp-card-row { gap: 12px; }
.esp-card .esp-card, .esp-card .esp-sit { background-color: var(--esp-surface-2); border-radius: var(--esp-rayon-moyen); padding: 16px; }
.esp-carte-verte { background-color: var(--esp-vert-t); color: var(--esp-vert-d); }
.esp-svc-sel { box-shadow: inset 0 0 0 2px var(--esp-encre); }
.esp-grid-2, .esp-grid-3, .esp-grid-4 { gap: 14px; }

/* Tuiles de chiffres : une couleur par position dans la rangée */
.esp-kpi { position: relative; overflow: hidden; border: 0; border-radius: var(--esp-rayon); padding: 22px 22px 20px; gap: 6px; min-height: 150px; background-color: var(--esp-bleu); color: #F4F1EA; isolation: isolate; }
.esp-kpi::after { content: ""; position: absolute; z-index: -1; width: 150px; height: 150px; right: -48px; bottom: -64px; border-radius: 999px; background-color: rgba(255, 255, 255, 0.14); }
.esp-kpi:nth-child(4n+2) { background-color: var(--esp-vert); }
.esp-kpi:nth-child(4n+2)::after { width: 120px; height: 120px; right: 18px; bottom: -60px; border-radius: 999px 999px 0 0; }
.esp-kpi:nth-child(4n+3) { background-color: var(--esp-safran); color: var(--esp-safran-d); }
.esp-kpi:nth-child(4n+3)::after { background-color: rgba(255, 255, 255, 0.28); }
.esp-kpi:nth-child(4n+4) { background-color: var(--esp-prune); color: #F8EEF3; }
.esp-kpi:nth-child(4n+4)::after { width: 120px; height: 120px; right: 18px; bottom: -60px; border-radius: 999px 999px 0 0; }
.esp-kpi-value { font-family: var(--esp-serif); font-size: 60px; line-height: 0.95; letter-spacing: -0.02em; color: inherit; order: 2; }
.esp-kpi-label { color: inherit; font-size: 14px; font-weight: 500; opacity: 0.95; order: 1; }
.esp-kpi > :not(.esp-kpi-value):not(.esp-kpi-label) { order: 3; color: inherit; }
.esp-kpi .esp-muted, .esp-kpi .esp-help { color: inherit; opacity: 0.9; }
.esp-kpi .esp-badge { background-color: rgba(255, 255, 255, 0.22); color: inherit; }
.esp-kpi a { color: inherit; }
.esp-kpi-alerte { background-color: var(--esp-rouge) !important; color: #FBEDE8 !important; }

/* Alertes et bandeaux */
.esp-alert { border: 0; border-radius: var(--esp-rayon-moyen); padding: 14px 18px; background-color: var(--esp-safran-t); color: var(--esp-safran-d); font-size: 14px; }
.esp-alert .esp-text, .esp-alert .esp-muted { color: inherit; }
.esp-alert-ok { background-color: var(--esp-vert-t); color: var(--esp-vert-d); }
.esp-alert-ko, .esp-alert-erreur { background-color: var(--esp-terra-t); color: var(--esp-terra-d); }
.esp-alert-info { background-color: var(--esp-bleu-t); color: var(--esp-bleu-d); }
.esp-crise { border-radius: 999px; padding: 10px 10px 10px 22px; background-color: var(--esp-rouge); color: #FBEDE8; }
.esp-crise .esp-text, .esp-crise .esp-muted, .esp-crise .esp-strong { color: inherit; }
.esp-crise .esp-btn { background-color: #FBEDE8; border-color: #FBEDE8; color: var(--esp-rouge); }
.esp-vu { background-color: var(--esp-safran-t); border-bottom: 0; color: var(--esp-safran-d); font-weight: 500; }

/* Listes */
.esp-list { gap: 8px; }
.esp-item { border-bottom: 0; padding: 12px 14px; border-radius: var(--esp-rayon-moyen); background-color: var(--esp-surface-2); }
.esp-card > .esp-list .esp-item, .esp-list .esp-item { background-color: var(--esp-surface-2); }
.esp-item-title { font-weight: 500; font-size: 15px; }
.esp-item[aria-current="true"] { background-color: var(--esp-bleu-t); color: var(--esp-bleu-d); padding-left: 14px; padding-right: 14px; box-shadow: inset 0 0 0 1.5px var(--esp-bleu); }
.esp-avatar { background-color: var(--esp-vert-t); }
.esp-divider { background-color: var(--esp-filet); }

/* Boutons */
.esp-btn { min-height: 44px; padding: 11px 22px; border-radius: 999px; background-color: var(--esp-encre); border: 1px solid var(--esp-encre); color: #FFFFFF; font-family: var(--esp-sans); font-size: 14px; font-weight: 600; transition: background-color .15s ease, border-color .15s ease; }
.esp-btn:hover { background-color: #000000; }
.esp-btn-outline { background-color: var(--esp-surface); border-color: var(--esp-filet-fort); color: var(--esp-encre); font-weight: 500; }
.esp-btn-outline:hover { background-color: var(--esp-surface-2); border-color: var(--esp-gris); }
.esp-card .esp-btn-outline, .esp-svc .esp-btn-outline { background-color: var(--esp-fond); border-color: var(--esp-fond); }
.esp-card .esp-btn-outline:hover { border-color: var(--esp-filet-fort); }
.esp-btn-rose { background-color: var(--esp-rose); border-color: var(--esp-rose); color: var(--esp-encre); }
.esp-btn-rose:hover { background-color: var(--esp-rose-survol); border-color: var(--esp-rose-survol); }
.esp-btn-small { min-height: 34px; padding: 6px 14px; font-size: 13px; }
.esp-btn-disabled, .esp-btn[aria-disabled="true"], .esp-btn:disabled { background-color: var(--esp-filet); border-color: var(--esp-filet); color: var(--esp-gris); cursor: not-allowed; }
.esp-btn-danger { background-color: var(--esp-terra-t); border-color: var(--esp-terra-t); color: var(--esp-terra-d); }
.esp-actions { gap: 8px; }

/* Formulaires */
.esp-label { font-size: 13px; font-weight: 600; color: var(--esp-encre); }
.esp-input { height: 46px; min-height: 46px; line-height: 44px; border: 1px solid var(--esp-filet-fort); border-radius: var(--esp-rayon-petit); background-color: var(--esp-surface); font-size: 15px; color: var(--esp-encre); }
.esp-input:focus { border-color: var(--esp-bleu); outline: 3px solid var(--esp-bleu-t); outline-offset: 0; }
.esp-input.esp-textarea { border-radius: var(--esp-rayon-moyen); line-height: 22px; }
.esp-input[aria-invalid="true"], .esp-field-erreur .esp-input, .esp-input.esp-invalide { border-color: var(--esp-rouge); outline: 3px solid var(--esp-terra-t); }
.esp-erreur-champ { color: var(--esp-terra-d); font-size: 13px; font-weight: 500; }
.esp-check { font-size: 15px; }
.esp-check input, .esp-chip input { accent-color: var(--esp-vert); }
.esp-requis::after { content: " *"; color: var(--esp-rouge); }

/* Puces de choix, onglets */
.esp-chip { min-height: 40px; padding: 8px 16px; border: 0; border-radius: 999px; background-color: var(--esp-surface); color: var(--esp-encre); font-size: 14px; box-shadow: inset 0 0 0 1px var(--esp-filet-fort); }
.esp-chip:hover { box-shadow: inset 0 0 0 1px var(--esp-gris); }
.esp-chip-selected, .esp-chip:has(input:checked) { background-color: var(--esp-encre); color: #FFFFFF; box-shadow: none; }
.esp-chip-off, .esp-chip:has(input:disabled) { background-color: var(--esp-surface-2); color: #A39E95; box-shadow: none; }
.esp-tabs { display: inline-flex; flex-wrap: wrap; gap: 4px; padding: 4px; border: 0; border-radius: 999px; background-color: var(--esp-surface); align-self: flex-start; max-width: 100%; }
.esp-tab { padding: 8px 16px; border: 0; border-radius: 999px; color: var(--esp-gris-fonce); font-size: 14px; }
.esp-tab-active { background-color: var(--esp-encre); color: #FFFFFF; font-weight: 500; }

/* Pastilles de statut : le fond suit la couleur du point */
.esp-badge { padding: 4px 12px; font-size: 12px; font-weight: 600; background-color: var(--esp-filet); color: var(--esp-encre); }
.esp-badge:has(.esp-dot-ok) { background-color: var(--esp-vert-t); color: var(--esp-vert-d); }
.esp-badge:has(.esp-dot-wait) { background-color: var(--esp-safran-t); color: var(--esp-safran-d); }
.esp-badge:has(.esp-dot-ko) { background-color: var(--esp-terra-t); color: var(--esp-terra-d); }
.esp-badge:has(.esp-dot-done) { background-color: var(--esp-bleu-t); color: var(--esp-bleu-d); }
.esp-dot-ok { background-color: var(--esp-vert); }
.esp-dot-wait { background-color: #C98A1E; }
.esp-dot-ko { background-color: var(--esp-rouge); }
.esp-dot-done { background-color: var(--esp-bleu); }
.esp-nouveau { background-color: var(--esp-rose); color: var(--esp-encre); }

/* Tableaux */
.esp-table { font-size: 14px; border-collapse: separate; border-spacing: 0; }
.esp-th { padding: 10px 12px; border-bottom: 1px solid var(--esp-filet); font-family: var(--esp-mono); font-weight: 400; font-size: 11px; letter-spacing: 0.06em; color: var(--esp-gris); }
.esp-td { padding: 13px 12px; border-bottom: 1px solid var(--esp-filet); }
.esp-table tbody tr:last-child .esp-td { border-bottom: 0; }
.esp-table tbody tr:hover .esp-td { background-color: var(--esp-surface-2); }
.esp-scroll-x { border-radius: var(--esp-rayon-moyen); }

/* Barres, graphiques, progression */
.esp-progress { height: 10px; background-color: var(--esp-filet); }
.esp-progress-bar { height: 10px; background-color: var(--esp-vert); }
.esp-chart { border-bottom: 1px solid var(--esp-filet); }
.esp-bar { background-color: var(--esp-bleu); border-radius: 10px 10px 4px 4px; }
.esp-bar-light { background-color: var(--esp-bleu-t); }
.esp-chart-label { font-family: var(--esp-mono); font-size: 11px; color: var(--esp-gris); }
.esp-score-barre { background-color: var(--esp-filet); }
.esp-score-barre > span { background-color: var(--esp-vert); }

/* Agenda */
.esp-cal { border: 0; border-radius: var(--esp-rayon-moyen); background-color: var(--esp-surface); }
.esp-cal-head { background-color: var(--esp-surface-2); border-bottom: 1px solid var(--esp-filet); font-family: var(--esp-mono); font-weight: 400; font-size: 11px; color: var(--esp-gris); }
.esp-cal-hour { font-family: var(--esp-mono); font-size: 12px; color: var(--esp-gris); border-color: var(--esp-filet); }
.esp-cal-cell { border-color: var(--esp-filet); }
.esp-cal-event { border: 0; border-radius: 12px; padding: 6px 10px; background-color: var(--esp-vert-t); color: var(--esp-vert-d); font-weight: 500; }
.esp-cal-event-wait { background-color: var(--esp-safran-t); color: var(--esp-safran-d); }
.esp-cal-event-free { background-color: transparent; border: 1px dashed var(--esp-filet-fort); color: var(--esp-gris); }
a.esp-cal-event { display: block; text-decoration: none; }

/* Divers */
.esp-qr { border: 0; border-radius: var(--esp-rayon-moyen); background-color: var(--esp-surface-2); }
.esp-mail { background-color: var(--esp-surface-2); }
.esp-msg-moi { background-color: var(--esp-vert); }
.esp-msg-autre { background-color: var(--esp-surface); }
.esp-bientot .esp-bientot-mention { background-color: var(--esp-filet); color: var(--esp-gris-fonce); }
.esp-prix { font-family: var(--esp-serif); font-size: 30px; }
.esp-ligne-montant { border-bottom-color: var(--esp-filet); }
.esp-footer { border-top: 0; padding: 20px 12px 28px; color: var(--esp-gris); font-family: var(--esp-serif); font-style: italic; font-size: 16px; text-align: left; }
.esp-help-bar { border-radius: 999px 999px 0 0; background-color: var(--esp-encre); }
.esp-help-bar .esp-btn-aide { background-color: var(--esp-rose); border-color: var(--esp-rose); }
details.esp-card > summary, details.esp-deplier > summary { cursor: pointer; list-style: none; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
details.esp-card > summary::-webkit-details-marker, details.esp-deplier > summary::-webkit-details-marker { display: none; }
details.esp-card > summary::after, details.esp-deplier > summary::after { content: ""; flex: none; width: 28px; height: 28px; border-radius: 999px; background: var(--esp-fond) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%231C1B19' stroke-width='2' stroke-linecap='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E") center / 14px 14px no-repeat; transition: transform .15s ease; }
details[open].esp-card > summary::after, details[open].esp-deplier > summary::after { transform: rotate(180deg); }
.esp-infobulle { position: relative; }
.esp-retour { display: inline-flex; align-items: center; gap: 8px; align-self: flex-start; padding: 6px 14px 6px 8px; border-radius: 999px; background-color: var(--esp-surface); color: var(--esp-encre); text-decoration: none; font-size: 13px; font-weight: 500; }
.esp-retour::before { content: ""; width: 22px; height: 22px; border-radius: 999px; background: var(--esp-fond) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%231C1B19' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M19 12H5M11 6l-6 6 6 6'/%3E%3C/svg%3E") center / 13px 13px no-repeat; }
.esp-haut { position: fixed; right: 20px; bottom: 20px; z-index: 25; width: 44px; height: 44px; border-radius: 999px; border: 0; background: var(--esp-surface) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%231C1B19' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 19V5M6 11l6-6 6 6'/%3E%3C/svg%3E") center / 18px 18px no-repeat; box-shadow: var(--esp-ombre); cursor: pointer; }

/* Tuile pleine d'une catégorie ou d'une couleur nommée (classe esp-cat-<nom> sur l'élément ou un parent) */
.esp-tuile { position: relative; overflow: hidden; isolation: isolate; border-radius: var(--esp-rayon); padding: 22px; background-color: var(--esp-c, var(--esp-bleu)); color: var(--esp-sur-c, #FFFFFF); }
.esp-tuile::after { content: ""; position: absolute; z-index: -1; width: 160px; height: 160px; right: -50px; top: -60px; border-radius: 999px; background-color: rgba(255, 255, 255, 0.16); }
.esp-teinte { background-color: var(--esp-t, var(--esp-bleu-t)); color: var(--esp-d, var(--esp-bleu-d)); }
.esp-pastille { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border-radius: 999px; background-color: var(--esp-t, var(--esp-filet)); color: var(--esp-d, var(--esp-encre)); font-size: 12px; font-weight: 600; }
.esp-pastille::before { content: ""; width: 7px; height: 7px; border-radius: 999px; background-color: var(--esp-c, var(--esp-gris)); }

/* ---- Écrans étroits : le menu devient une barre en haut, repliable ---- */
@media screen and (max-width: 900px) {
  .esp-page:has(> .esp-header .esp-nav) { display: flex; flex-direction: column; align-items: stretch; padding: 10px 10px 0; gap: 10px; }
  .esp-header > .esp-logo { order: 1; }
  .esp-header > .esp-espace { order: 2; }
  .esp-header > .esp-menu-bouton { order: 3; }
  .esp-header > .esp-nav, .esp-header > .esp-side-action, .esp-header > .esp-side-crise, .esp-header > .esp-user { order: 4; }
  .esp-page:has(> .esp-header .esp-nav) > .esp-vu { margin: -10px -10px 0; }
  .esp-page:has(> .esp-header .esp-nav) > .esp-header { position: sticky; top: 10px; z-index: 20; min-height: 0; max-height: none; flex-direction: row; flex-wrap: wrap; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 24px; }
  .esp-page:has(> .esp-header .esp-nav) > .esp-header .esp-logo { width: 30px; margin: 0 4px; }
  .esp-espace { margin: 0; }
  .esp-espace-nom { font-size: 20px; }
  .esp-header .esp-menu-bouton { display: inline-flex; margin-left: auto; border-radius: 999px; border: 0; background-color: var(--esp-fond); color: var(--esp-encre); font-weight: 600; padding: 8px 16px; }
  .esp-header.esp-header-repliable .esp-nav, .esp-header.esp-header-repliable .esp-user, .esp-header.esp-header-repliable .esp-side-action, .esp-header.esp-header-repliable .esp-side-crise { display: none; }
  .esp-header.esp-header-repliable.esp-header-ouvert .esp-nav { display: flex; width: 100%; }
  .esp-header.esp-header-repliable.esp-header-ouvert .esp-user, .esp-header.esp-header-repliable.esp-header-ouvert .esp-side-action, .esp-header.esp-header-repliable.esp-header-ouvert .esp-side-crise { display: flex; width: 100%; }
  .esp-page:has(> .esp-header .esp-nav) > .esp-main { padding: 12px 4px 32px; }
  .esp-title { font-size: 40px; }
  .esp-subtitle { font-size: 26px; }
  .esp-kpi-value { font-size: 48px; }
  .esp-crise { border-radius: var(--esp-rayon-moyen); padding: 14px 16px; }
}
@media screen and (max-width: 479px) {
  .esp-title { font-size: 34px; }
  .esp-card, .esp-sit, .esp-svc { padding: 18px; border-radius: 22px; }
  .esp-kpi { min-height: 120px; }
}
@media print {
  .esp-page, html, body { background-color: #FFFFFF !important; }
  .esp-page:has(> .esp-header .esp-nav) { display: block; padding: 0; }
  .esp-haut, .esp-side-crise, .esp-side-action { display: none !important; }
  .esp-card, .esp-svc { box-shadow: none; border: 1px solid var(--esp-filet); }
}

/* Menu latéral : pastille de couleur et pictogramme par entrée (généré, une règle par adresse). */
.esp-nav a[href^="/espace-psy-accueil"] { --esp-c: #4E7A5A; --esp-t: #DCE8DD; --esp-d: #1F3A33; --esp-ico: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%231F3A33' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 4h6v7H4zM14 4h6v4h-6zM14 12h6v8h-6zM4 15h6v5H4z'/%3E%3C/svg%3E"); --esp-ico-on: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23FFFFFF' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 4h6v7H4zM14 4h6v4h-6zM14 12h6v8h-6zM4 15h6v5H4z'/%3E%3C/svg%3E"); }
.esp-nav a[href^="/espace-psy-collaborateurs"] { --esp-c: #33598F; --esp-t: #DCE5F2; --esp-d: #1B3358; --esp-ico: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%231B3358' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M9 11.5a3.5 3.5 0 1 0 0-7 3.5 3.5 0 0 0 0 7zM2.5 20c0-3.6 2.9-6 6.5-6s6.5 2.4 6.5 6M16 4.5a3.5 3.5 0 0 1 0 7M18 14.2c2.1.6 3.5 2.6 3.5 5.8'/%3E%3C/svg%3E"); --esp-ico-on: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23FFFFFF' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M9 11.5a3.5 3.5 0 1 0 0-7 3.5 3.5 0 0 0 0 7zM2.5 20c0-3.6 2.9-6 6.5-6s6.5 2.4 6.5 6M16 4.5a3.5 3.5 0 0 1 0 7M18 14.2c2.1.6 3.5 2.6 3.5 5.8'/%3E%3C/svg%3E"); }
.esp-nav a[href^="/espace-psy-demandes"] { --esp-c: #B4533A; --esp-t: #F4DDD3; --esp-d: #6B2A1B; --esp-ico: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%236B2A1B' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3 13l2.5-8h13L21 13v6H3zM3 13h5l1.5 2.5h5L16 13h5'/%3E%3C/svg%3E"); --esp-ico-on: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23FFFFFF' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3 13l2.5-8h13L21 13v6H3zM3 13h5l1.5 2.5h5L16 13h5'/%3E%3C/svg%3E"); }
.esp-nav a[href^="/espace-psy-disponibilites"] { --esp-c: #6A5AA8; --esp-t: #E4E0F3; --esp-d: #3A2F6B; --esp-ico: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%233A2F6B' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 5h16v15H4zM4 10h16M9 3v4M15 3v4'/%3E%3C/svg%3E"); --esp-ico-on: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23FFFFFF' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 5h16v15H4zM4 10h16M9 3v4M15 3v4'/%3E%3C/svg%3E"); }
.esp-nav a[href^="/espace-psy-heures"] { --esp-c: #E9B54F; --esp-t: #F6E6C2; --esp-d: #3A2A08; --esp-ico: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%233A2A08' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M17 6.5A6.5 6.5 0 1 0 17 17.5M4 10.5h9M4 13.5h9'/%3E%3C/svg%3E"); --esp-ico-on: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%233A2A08' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M17 6.5A6.5 6.5 0 1 0 17 17.5M4 10.5h9M4 13.5h9'/%3E%3C/svg%3E"); }
.esp-nav a[href^="/espace-psy-fiche"] { --esp-c: #9C4F7A; --esp-t: #F1DDE8; --esp-d: #5C2647; --esp-ico: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%235C2647' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 5h16v14H4zM9.5 13a2 2 0 1 0 0-4 2 2 0 0 0 0 4zM6.5 16.5c.5-1.4 1.7-2.2 3-2.2s2.5.8 3 2.2M15 10h2.5M15 14h2.5'/%3E%3C/svg%3E"); --esp-ico-on: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23FFFFFF' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 5h16v14H4zM9.5 13a2 2 0 1 0 0-4 2 2 0 0 0 0 4zM6.5 16.5c.5-1.4 1.7-2.2 3-2.2s2.5.8 3 2.2M15 10h2.5M15 14h2.5'/%3E%3C/svg%3E"); }
.esp-nav a[href^="/espace-admin-alertes"] { --esp-c: #B4533A; --esp-t: #F4DDD3; --esp-d: #6B2A1B; --esp-ico: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%236B2A1B' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 16V11a6 6 0 0 1 12 0v5l2 2H4zM10 20a2 2 0 0 0 4 0'/%3E%3C/svg%3E"); --esp-ico-on: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23FFFFFF' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 16V11a6 6 0 0 1 12 0v5l2 2H4zM10 20a2 2 0 0 0 4 0'/%3E%3C/svg%3E"); }
.esp-nav a[href^="/espace-admin-tableau-de-bord"] { --esp-c: #4E7A5A; --esp-t: #DCE8DD; --esp-d: #1F3A33; --esp-ico: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%231F3A33' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 4h6v7H4zM14 4h6v4h-6zM14 12h6v8h-6zM4 15h6v5H4z'/%3E%3C/svg%3E"); --esp-ico-on: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23FFFFFF' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 4h6v7H4zM14 4h6v4h-6zM14 12h6v8h-6zM4 15h6v5H4z'/%3E%3C/svg%3E"); }
.esp-nav a[href^="/espace-admin-clients"] { --esp-c: #33598F; --esp-t: #DCE5F2; --esp-d: #1B3358; --esp-ico: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%231B3358' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 21V5l8-2v18M12 8h8v13M8 8h.01M8 12h.01M8 16h.01M16 12h.01M16 16h.01M2 21h20'/%3E%3C/svg%3E"); --esp-ico-on: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23FFFFFF' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 21V5l8-2v18M12 8h8v13M8 8h.01M8 12h.01M8 16h.01M16 12h.01M16 16h.01M2 21h20'/%3E%3C/svg%3E"); }
.esp-nav a[href^="/espace-admin-collaborateurs"] { --esp-c: #9C4F7A; --esp-t: #F1DDE8; --esp-d: #5C2647; --esp-ico: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%235C2647' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M9 11.5a3.5 3.5 0 1 0 0-7 3.5 3.5 0 0 0 0 7zM2.5 20c0-3.6 2.9-6 6.5-6s6.5 2.4 6.5 6M16 4.5a3.5 3.5 0 0 1 0 7M18 14.2c2.1.6 3.5 2.6 3.5 5.8'/%3E%3C/svg%3E"); --esp-ico-on: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23FFFFFF' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M9 11.5a3.5 3.5 0 1 0 0-7 3.5 3.5 0 0 0 0 7zM2.5 20c0-3.6 2.9-6 6.5-6s6.5 2.4 6.5 6M16 4.5a3.5 3.5 0 0 1 0 7M18 14.2c2.1.6 3.5 2.6 3.5 5.8'/%3E%3C/svg%3E"); }
.esp-nav a[href^="/espace-admin-psychologues"] { --esp-c: #6A5AA8; --esp-t: #E4E0F3; --esp-d: #3A2F6B; --esp-ico: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%233A2F6B' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 20s-7-4.4-7-10a4 4 0 0 1 7-2.6A4 4 0 0 1 19 10c0 5.6-7 10-7 10z'/%3E%3C/svg%3E"); --esp-ico-on: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23FFFFFF' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 20s-7-4.4-7-10a4 4 0 0 1 7-2.6A4 4 0 0 1 19 10c0 5.6-7 10-7 10z'/%3E%3C/svg%3E"); }
.esp-nav a[href^="/espace-admin-agenda"] { --esp-c: #E9B54F; --esp-t: #F6E6C2; --esp-d: #3A2A08; --esp-ico: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%233A2A08' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 5h16v15H4zM4 10h16M9 3v4M15 3v4'/%3E%3C/svg%3E"); --esp-ico-on: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%233A2A08' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 5h16v15H4zM4 10h16M9 3v4M15 3v4'/%3E%3C/svg%3E"); }
.esp-nav a[href^="/espace-admin-devis"] { --esp-c: #33598F; --esp-t: #DCE5F2; --esp-d: #1B3358; --esp-ico: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%231B3358' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 3h8l4 4v14H6zM14 3v4h4M9 12h6M9 16h6'/%3E%3C/svg%3E"); --esp-ico-on: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23FFFFFF' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 3h8l4 4v14H6zM14 3v4h4M9 12h6M9 16h6'/%3E%3C/svg%3E"); }
.esp-nav a[href^="/espace-admin-heures"] { --esp-c: #4E7A5A; --esp-t: #DCE8DD; --esp-d: #1F3A33; --esp-ico: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%231F3A33' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 21a9 9 0 1 0 0-18 9 9 0 0 0 0 18zM12 7v5l3 2'/%3E%3C/svg%3E"); --esp-ico-on: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23FFFFFF' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 21a9 9 0 1 0 0-18 9 9 0 0 0 0 18zM12 7v5l3 2'/%3E%3C/svg%3E"); }
.esp-nav a[href^="/espace-admin-reglages"] { --esp-c: #57534D; --esp-t: #ECE8E1; --esp-d: #1C1B19; --esp-ico: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%231C1B19' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 15a3 3 0 1 0 0-6 3 3 0 0 0 0 6zM12 2v3M12 19v3M4.2 4.2l2.1 2.1M17.7 17.7l2.1 2.1M2 12h3M19 12h3M4.2 19.8l2.1-2.1M17.7 6.3l2.1-2.1'/%3E%3C/svg%3E"); --esp-ico-on: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23FFFFFF' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 15a3 3 0 1 0 0-6 3 3 0 0 0 0 6zM12 2v3M12 19v3M4.2 4.2l2.1 2.1M17.7 17.7l2.1 2.1M2 12h3M19 12h3M4.2 19.8l2.1-2.1M17.7 6.3l2.1-2.1'/%3E%3C/svg%3E"); }
.esp-nav a[href^="/espace-admin-journal"] { --esp-c: #57534D; --esp-t: #ECE8E1; --esp-d: #1C1B19; --esp-ico: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%231C1B19' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M8 6h12M8 12h12M8 18h12M4 6h.01M4 12h.01M4 18h.01'/%3E%3C/svg%3E"); --esp-ico-on: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23FFFFFF' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M8 6h12M8 12h12M8 18h12M4 6h.01M4 12h.01M4 18h.01'/%3E%3C/svg%3E"); }
.esp-nav a[href^="/espace-client-suivi"] { --esp-c: #4E7A5A; --esp-t: #DCE8DD; --esp-d: #1F3A33; --esp-ico: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%231F3A33' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 20V11M10 20V5M16 20v-6M21 20H3'/%3E%3C/svg%3E"); --esp-ico-on: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23FFFFFF' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 20V11M10 20V5M16 20v-6M21 20H3'/%3E%3C/svg%3E"); }
.esp-nav a[href^="/espace-client-services"] { --esp-c: #33598F; --esp-t: #DCE5F2; --esp-d: #1B3358; --esp-ico: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%231B3358' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 3l9 5-9 5-9-5zM3 13l9 5 9-5'/%3E%3C/svg%3E"); --esp-ico-on: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23FFFFFF' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 3l9 5-9 5-9-5zM3 13l9 5 9-5'/%3E%3C/svg%3E"); }
.esp-nav a[href^="/espace-client-devis"] { --esp-c: #E9B54F; --esp-t: #F6E6C2; --esp-d: #3A2A08; --esp-ico: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%233A2A08' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 3h8l4 4v14H6zM14 3v4h4M9 12h6M9 16h6'/%3E%3C/svg%3E"); --esp-ico-on: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%233A2A08' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 3h8l4 4v14H6zM14 3v4h4M9 12h6M9 16h6'/%3E%3C/svg%3E"); }
.esp-nav a[href^="/espace-client-diffuser"] { --esp-c: #9C4F7A; --esp-t: #F1DDE8; --esp-d: #5C2647; --esp-ico: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%235C2647' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3 10v4l11 5V5zM17.5 9a4 4 0 0 1 0 6'/%3E%3C/svg%3E"); --esp-ico-on: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23FFFFFF' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3 10v4l11 5V5zM17.5 9a4 4 0 0 1 0 6'/%3E%3C/svg%3E"); }
.esp-nav a[href^="/espace-collab-accueil"] { --esp-c: #4E7A5A; --esp-t: #DCE8DD; --esp-d: #1F3A33; --esp-ico: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%231F3A33' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 11l8-7 8 7v9H4zM10 20v-5h4v5'/%3E%3C/svg%3E"); --esp-ico-on: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23FFFFFF' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 11l8-7 8 7v9H4zM10 20v-5h4v5'/%3E%3C/svg%3E"); }
.esp-nav a[href^="/espace-collab-burnout"] { --esp-c: #E9B54F; --esp-t: #F6E6C2; --esp-d: #3A2A08; --esp-ico: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%233A2A08' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 16a4 4 0 1 0 0-8 4 4 0 0 0 0 8zM12 2v2M12 20v2M2 12h2M20 12h2M5 5l1.4 1.4M17.6 17.6L19 19M5 19l1.4-1.4M17.6 6.4L19 5'/%3E%3C/svg%3E"); --esp-ico-on: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%233A2A08' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 16a4 4 0 1 0 0-8 4 4 0 0 0 0 8zM12 2v2M12 20v2M2 12h2M20 12h2M5 5l1.4 1.4M17.6 17.6L19 19M5 19l1.4-1.4M17.6 6.4L19 5'/%3E%3C/svg%3E"); }
.esp-nav a[href^="/espace-collab-demande"] { --esp-c: #33598F; --esp-t: #DCE5F2; --esp-d: #1B3358; --esp-ico: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%231B3358' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 5h16v15H4zM4 10h16M9 3v4M15 3v4M12 13v4M10 15h4'/%3E%3C/svg%3E"); --esp-ico-on: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23FFFFFF' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 5h16v15H4zM4 10h16M9 3v4M15 3v4M12 13v4M10 15h4'/%3E%3C/svg%3E"); }
.esp-nav a[href^="/espace-collab-rendez-vous"] { --esp-c: #6A5AA8; --esp-t: #E4E0F3; --esp-d: #3A2F6B; --esp-ico: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%233A2F6B' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 5h16v15H4zM4 10h16M9 3v4M15 3v4'/%3E%3C/svg%3E"); --esp-ico-on: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23FFFFFF' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 5h16v15H4zM4 10h16M9 3v4M15 3v4'/%3E%3C/svg%3E"); }
.esp-nav a[href^="/espace-collab-compte"] { --esp-c: #9C4F7A; --esp-t: #F1DDE8; --esp-d: #5C2647; --esp-ico: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%235C2647' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 12a4 4 0 1 0 0-8 4 4 0 0 0 0 8zM4 21c0-4 3.6-7 8-7s8 3 8 7'/%3E%3C/svg%3E"); --esp-ico-on: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23FFFFFF' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 12a4 4 0 1 0 0-8 4 4 0 0 0 0 8zM4 21c0-4 3.6-7 8-7s8 3 8 7'/%3E%3C/svg%3E"); }
.esp-nav a[data-esp="lien-espace-admin"], .esp-nav a[data-esp="lien-espace-psychologue"] { --esp-c: #57534D; --esp-t: #ECE8E1; --esp-d: #1C1B19; --esp-ico: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%231C1B19' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M7 7h11l-3-3M17 17H6l3 3'/%3E%3C/svg%3E"); --esp-ico-on: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23FFFFFF' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M7 7h11l-3-3M17 17H6l3 3'/%3E%3C/svg%3E"); }

/* Catégories du catalogue (Prévenir, Préparer, Intervenir, Soutenir, Reconstruire, Conférences) et couleurs nommées. */
.esp-cat-prevenir { --esp-c: #4E7A5A; --esp-t: #DCE8DD; --esp-d: #1F3A33; --esp-sur-c: #FFFFFF; }
.esp-cat-preparer { --esp-c: #33598F; --esp-t: #DCE5F2; --esp-d: #1B3358; --esp-sur-c: #FFFFFF; }
.esp-cat-intervenir { --esp-c: #B4533A; --esp-t: #F4DDD3; --esp-d: #6B2A1B; --esp-sur-c: #FFFFFF; }
.esp-cat-soutenir { --esp-c: #9C4F7A; --esp-t: #F1DDE8; --esp-d: #5C2647; --esp-sur-c: #FFFFFF; }
.esp-cat-reconstruire { --esp-c: #E9B54F; --esp-t: #F6E6C2; --esp-d: #3A2A08; --esp-sur-c: #3A2A08; }
.esp-cat-conferences { --esp-c: #6A5AA8; --esp-t: #E4E0F3; --esp-d: #3A2F6B; --esp-sur-c: #FFFFFF; }
.esp-cat-vert { --esp-c: #4E7A5A; --esp-t: #DCE8DD; --esp-d: #1F3A33; --esp-sur-c: #FFFFFF; }
.esp-cat-bleu { --esp-c: #33598F; --esp-t: #DCE5F2; --esp-d: #1B3358; --esp-sur-c: #FFFFFF; }
.esp-cat-terra { --esp-c: #B4533A; --esp-t: #F4DDD3; --esp-d: #6B2A1B; --esp-sur-c: #FFFFFF; }
.esp-cat-violet { --esp-c: #6A5AA8; --esp-t: #E4E0F3; --esp-d: #3A2F6B; --esp-sur-c: #FFFFFF; }
.esp-cat-safran { --esp-c: #E9B54F; --esp-t: #F6E6C2; --esp-d: #3A2A08; --esp-sur-c: #3A2A08; }
.esp-cat-prune { --esp-c: #9C4F7A; --esp-t: #F1DDE8; --esp-d: #5C2647; --esp-sur-c: #FFFFFF; }
.esp-cat-gris { --esp-c: #57534D; --esp-t: #ECE8E1; --esp-d: #1C1B19; --esp-sur-c: #FFFFFF; }

/* V3, contrôle qualité : pages sans menu (pages communes, documents), le libellé « Mon espace » reste après le logo sur écran étroit. */
@media screen and (max-width: 900px) {
  .esp-header > .esp-logo + .esp-muted { order: 2; }
}
/* ---------------------------------------------------------------------------
 * V3, lot admin (22/10/2026) : composants propres à l'espace admin, assemblés après espace-v3.css.
 * Préfixe adm-. Couleurs et formes reprises de la maquette validée (tuiles colorées, blocs arrondis,
 * titres en serif, alertes en rouge brique).
 * ------------------------------------------------------------------------- */

/* En-tête de page : titre et phrase à gauche, actions de la page à droite (A-16, G-04) */
.adm-entete { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 16px 24px; }
.adm-entete-texte { display: flex; flex-direction: column; gap: 8px; min-width: 0; flex: 1 1 420px; }
.adm-entete-texte .esp-lead { margin: 0; }
.adm-entete-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.adm-mois { display: flex; flex-direction: column; gap: 6px; min-width: 200px; }
.adm-sous-titre { font-family: var(--esp-serif); font-weight: 400; font-size: 26px; line-height: 1.1; margin: 0; }

/* Noms selon le rôle (G-12) : personne suivie en bleu, psychologue en violet */
.adm-personne { color: var(--esp-bleu-d); font-weight: 600; }
.adm-psy { color: var(--esp-violet-d); font-weight: 500; }
.adm-psy::before { content: ""; display: inline-block; width: 7px; height: 7px; margin-right: 6px; border-radius: 999px; background-color: var(--esp-violet); vertical-align: middle; }
.adm-legende { display: flex; flex-wrap: wrap; gap: 14px; font-size: 12px; color: var(--esp-gris); }
.adm-legende .adm-personne::before { content: ""; display: inline-block; width: 7px; height: 7px; margin-right: 6px; border-radius: 999px; background-color: var(--esp-bleu); vertical-align: middle; }

/* Tuiles de chiffres */
.adm-kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 14px; }
.adm-kpis .esp-kpi { display: flex; flex-direction: column; min-height: 150px; text-decoration: none; }
.adm-kpis .esp-kpi-value { font-size: 56px; }
.adm-kpis .esp-kpi .esp-help { font-size: 13px; }
.adm-kpis .esp-kpi.adm-kpi-calme { background-color: var(--esp-surface) !important; color: var(--esp-encre) !important; }
.adm-kpis .esp-kpi.adm-kpi-calme::after { background-color: var(--esp-vert-t); }
.adm-kpis a.esp-kpi:hover { filter: brightness(0.97); }
.esp-crise.adm-bandeau-crise { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 16px; }
.esp-crise.adm-bandeau-crise p { margin: 0; flex: 1 1 320px; }

/* Colonnes et blocs */
.adm-colonnes { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); gap: 14px; align-items: start; }
.adm-colonnes-egales { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; align-items: start; }
.adm-bloc-titre { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 8px 12px; }
.adm-bloc-titre .esp-subtitle, .adm-bloc-titre h2 { margin: 0; }
.adm-lien { font-size: 14px; font-weight: 500; text-decoration: none; background-color: var(--esp-fond); border-radius: 999px; padding: 6px 14px; color: var(--esp-encre); white-space: nowrap; }
.adm-lien:hover { background-color: var(--esp-filet); }
.esp-card.esp-teinte .adm-lien { background-color: var(--esp-surface); }
.adm-vide { margin: 0; padding: 14px 16px; border-radius: var(--esp-rayon-moyen); background-color: var(--esp-surface-2); color: var(--esp-gris-fonce); font-size: 14px; }
.esp-teinte .adm-vide { background-color: rgba(255, 255, 255, 0.6); color: inherit; }
details.esp-card > summary h2, details.esp-card > summary .esp-subtitle { margin: 0; }
details.esp-card[open] > summary { margin-bottom: 6px; }
.adm-resume-plie { font-size: 13px; color: var(--esp-gris); margin-left: auto; margin-right: 8px; }

/* Agenda du jour (A-25) */
.adm-jour { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.adm-jour-ligne { display: flex; align-items: center; gap: 14px; padding: 8px; border-radius: 22px; background-color: var(--esp-surface-2); color: inherit; text-decoration: none; }
a.adm-jour-ligne:hover { background-color: var(--esp-fond); }
.adm-heure { width: 76px; height: 52px; border-radius: 18px; display: flex; align-items: center; justify-content: center; flex: none; font-family: var(--esp-mono); font-size: 14px; font-weight: 500; background-color: var(--esp-bleu-t); color: var(--esp-bleu-d); }
.adm-jour-ligne:nth-child(4n+2) .adm-heure { background-color: var(--esp-prune-t); color: var(--esp-prune-d); }
.adm-jour-ligne:nth-child(4n+3) .adm-heure { background-color: var(--esp-safran-t); color: var(--esp-safran-d); }
.adm-jour-ligne:nth-child(4n+4) .adm-heure { background-color: var(--esp-terra-t); color: var(--esp-terra-d); }
.adm-ligne-texte { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.adm-ligne-texte .esp-muted { font-size: 13px; }

/* Rendez-vous du mois par statut (A-04) */
.adm-statuts { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 10px; margin: 0; }
.adm-statut { display: flex; flex-direction: column; gap: 2px; padding: 14px 16px; border-radius: var(--esp-rayon-moyen); background-color: var(--esp-t); color: var(--esp-d); }
.adm-statut dt { font-size: 13px; font-weight: 500; order: 2; }
.adm-statut dd { margin: 0; font-family: var(--esp-serif); font-size: 40px; line-height: 1; order: 1; }

/* Alertes (A-07, A-08) */
.adm-alertes { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.adm-alerte { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px; padding: 14px 14px 14px 18px; border-radius: 22px; background-color: var(--esp-surface); box-shadow: inset 6px 0 0 var(--esp-c, var(--esp-terra)); }
.esp-teinte .adm-alerte { background-color: rgba(255, 255, 255, 0.75); }
.adm-alerte-texte { flex: 1 1 320px; display: flex; flex-direction: column; gap: 4px; min-width: 0; padding-left: 6px; }
.adm-alerte-texte .esp-pastille { align-self: flex-start; }
.adm-alerte-message { font-size: 15px; font-weight: 500; color: var(--esp-encre); }
.adm-alerte-actions { display: flex; flex-wrap: wrap; gap: 6px; }
.adm-alertes-court .adm-alerte { padding: 10px 10px 10px 14px; }
.adm-alertes-court .adm-alerte-message { font-size: 14px; }

/* Liste et détail (A-20) */
.adm-maitre-detail { display: grid; grid-template-columns: minmax(280px, 360px) minmax(0, 1fr); gap: 16px; align-items: start; }
.adm-maitre-detail-large { grid-template-columns: minmax(0, 1.55fr) minmax(340px, 1fr); }
.adm-liste-cartes { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.adm-carte { position: relative; display: flex; flex-direction: column; gap: 6px; padding: 14px 16px; border-radius: 22px; background-color: var(--esp-surface); cursor: pointer; transition: box-shadow .15s ease; }
.adm-carte:hover { box-shadow: inset 0 0 0 1px var(--esp-filet-fort); }
.adm-carte[aria-current="true"] { background-color: var(--esp-bleu-t); box-shadow: inset 0 0 0 2px var(--esp-bleu); }
.adm-carte[aria-current="true"]::after { content: "Affiché"; position: absolute; top: 14px; right: 14px; padding: 2px 10px; border-radius: 999px; background-color: var(--esp-bleu); color: #FFFFFF; font-size: 11px; font-weight: 600; }
.adm-carte-titre { font-family: var(--esp-serif); font-size: 22px; line-height: 1.15; color: var(--esp-encre); text-decoration: none; padding-right: 70px; }
.adm-carte-titre::after { content: ""; position: absolute; inset: 0; border-radius: 22px; }
.adm-carte-ligne { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; font-size: 13px; color: var(--esp-gris-fonce); }
.adm-carte .esp-progress { height: 8px; }
.adm-carte .esp-progress-bar { height: 8px; }
.adm-carte-avatar { display: flex; align-items: center; gap: 12px; }
.adm-carte-avatar .esp-avatar { width: 44px; height: 44px; flex: none; border-radius: 999px; object-fit: cover; }
.esp-table tbody tr[aria-current="true"] .esp-td { background-color: var(--esp-bleu-t); }
.esp-table tbody tr[aria-current="true"] .esp-td:first-child { box-shadow: inset 4px 0 0 var(--esp-bleu); }
.esp-table tbody tr[data-esp-action] { cursor: pointer; }
.adm-detail { position: sticky; top: 16px; display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.adm-detail-entete { display: flex; flex-wrap: wrap; align-items: flex-start; justify-content: space-between; gap: 12px; }
.adm-detail-entete .esp-subtitle { margin: 0; font-size: 34px; }
.adm-detail-titre { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.adm-donnees { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 14px 20px; margin: 0; }
.adm-donnees div { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.adm-donnees dt { font-family: var(--esp-mono); font-size: 11px; letter-spacing: 0.06em; color: var(--esp-gris); text-transform: uppercase; }
.adm-donnees dd { margin: 0; font-size: 15px; overflow-wrap: anywhere; }
.adm-sous-liste { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.adm-sous-ligne { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 12px; padding: 12px 14px; border-radius: var(--esp-rayon-moyen); background-color: var(--esp-surface-2); }
.adm-sous-ligne .adm-ligne-texte { flex: 1 1 220px; }

/* Bloc d'attribution (A-15) : trois suggestions en cartes */
.adm-attribuer { display: flex; flex-direction: column; gap: 12px; }
.adm-attribuer-personne { display: flex; flex-direction: column; gap: 12px; padding: 16px; border-radius: 24px; background-color: rgba(255, 255, 255, 0.7); }
.adm-suggestions { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 10px; }
.adm-suggestion { display: flex; flex-direction: column; gap: 6px; padding: 16px; border-radius: 20px; background-color: var(--esp-surface); box-shadow: inset 0 0 0 1px var(--esp-filet); }
.adm-suggestion:first-child { background-color: var(--esp-vert-t); color: var(--esp-vert-d); box-shadow: inset 0 0 0 2px var(--esp-vert); }
.adm-suggestion:first-child .adm-psy { color: var(--esp-vert-d); }
.adm-rang { align-self: flex-start; font-family: var(--esp-mono); font-size: 11px; letter-spacing: 0.06em; color: var(--esp-gris); }
.adm-suggestion:first-child .adm-rang { color: var(--esp-vert-d); }
.adm-score { font-family: var(--esp-serif); font-size: 44px; line-height: 1; }
.adm-score small { font-family: var(--esp-sans); font-size: 14px; }
.adm-suggestion .esp-muted { font-size: 12px; color: inherit; opacity: 0.8; }
.adm-suggestion .esp-btn { margin-top: auto; align-self: flex-start; }

/* Complétude de la fiche (A-21) */
.adm-completude { display: flex; flex-direction: column; gap: 4px; font-size: 12px; color: var(--esp-gris-fonce); }
.adm-completude .esp-progress { height: 6px; }
.adm-completude .esp-progress-bar { height: 6px; background-color: var(--esp-safran); }
.adm-completude-ok .esp-progress-bar { background-color: var(--esp-vert); }

/* Formulaires en sections, champs obligatoires (A-12) */
.adm-form { display: flex; flex-direction: column; gap: 22px; }
fieldset.adm-groupe { border: 0; padding: 0; margin: 0; min-width: 0; display: flex; flex-direction: column; gap: 12px; }
fieldset.adm-groupe > legend { padding: 0; margin-bottom: 10px; font-family: var(--esp-serif); font-size: 24px; }
.adm-grille { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 14px; }
.adm-cases { display: flex; flex-wrap: wrap; gap: 8px; }
.adm-cases .esp-chip input, .adm-puces .esp-chip input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.adm-cases .esp-chip, .adm-puces .esp-chip { position: relative; cursor: pointer; }
.adm-cases .esp-chip:has(input:focus-visible), .adm-puces .esp-chip:has(input:focus-visible) { outline: 2px solid var(--esp-bleu); outline-offset: 2px; }
.adm-aide-champs { margin: 0; padding: 12px 16px; border-radius: var(--esp-rayon-moyen); background-color: var(--esp-bleu-t); color: var(--esp-bleu-d); font-size: 14px; }
.adm-form-pied { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.adm-form-pied .esp-btn { min-width: 120px; }
.esp-field .esp-erreur-champ { margin: 0; }
.adm-cases[aria-invalid="true"] { padding: 6px; border-radius: 18px; box-shadow: 0 0 0 2px var(--esp-rouge); }

/* Filtres en puces (agenda A-22) */
.adm-puces { display: flex; flex-wrap: wrap; gap: 6px; border: 0; padding: 0; margin: 0; }
.adm-puces > legend { padding: 0; margin-bottom: 8px; font-size: 13px; font-weight: 600; }

/* Fenêtre de confirmation (O-17, A-24) */
.adm-voile { position: fixed; inset: 0; z-index: 60; display: flex; align-items: center; justify-content: center; padding: 16px; background-color: rgba(28, 27, 25, 0.38); }
.adm-dialogue { width: 100%; max-width: 480px; display: flex; flex-direction: column; gap: 14px; padding: 28px; border-radius: var(--esp-rayon); background-color: var(--esp-surface); box-shadow: 0 24px 64px rgba(28, 27, 25, 0.25); }
.adm-dialogue .esp-subtitle { margin: 0; }
.adm-dialogue p { margin: 0; }
.adm-dialogue-detail { padding: 12px 16px; border-radius: var(--esp-rayon-moyen); background-color: var(--esp-safran-t); color: var(--esp-safran-d); font-size: 14px; }

/* Agenda */
.adm-semaine { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.adm-semaine .esp-strong { padding: 0 8px; }
.esp-cal-event[data-esp-action] { cursor: pointer; }
.esp-cal-event[data-esp-action]:hover { filter: brightness(0.96); }
.esp-cal-event .adm-personne { color: inherit; }

/* Crises et devis (A-26, A-27) */
.adm-crises { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 12px; }
.adm-crise { display: flex; flex-direction: column; gap: 10px; padding: 20px; border-radius: var(--esp-rayon); background-color: var(--esp-surface); }
.adm-crise-nouvelle { background-color: var(--esp-rouge); color: #FBEDE8; }
.adm-crise-nouvelle .esp-muted, .adm-crise-nouvelle .esp-text, .adm-crise-nouvelle a { color: inherit; }
.adm-crise-nouvelle .esp-badge { background-color: rgba(255, 255, 255, 0.2); color: inherit; }
.adm-crise-nouvelle .esp-btn-outline { background-color: #FBEDE8; border-color: #FBEDE8; color: var(--esp-rouge); }
.adm-crise-titre { font-family: var(--esp-serif); font-size: 26px; line-height: 1.1; margin: 0; }
.adm-crise .adm-donnees dt { color: inherit; opacity: 0.75; }
.adm-actions-ligne { display: flex; flex-wrap: wrap; gap: 6px; }

/* Journal (A-32) */
.adm-explication { margin: 0; padding: 14px 18px; border-radius: var(--esp-rayon-moyen); background-color: var(--esp-surface); font-size: 15px; max-width: 860px; }

/* Fonctionnement de la plateforme (G-08) */
.adm-etapes { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 14px; counter-reset: etape; }
.adm-etape { counter-increment: etape; display: flex; flex-direction: column; gap: 8px; min-height: 190px; }
.adm-etape::before { content: counter(etape); font-family: var(--esp-serif); font-size: 44px; line-height: 1; }
.adm-etape h2 { margin: 0; font-family: var(--esp-serif); font-weight: 400; font-size: 24px; line-height: 1.1; }
.adm-etape p { margin: 0; font-size: 14px; }
.adm-etape a { color: inherit; font-weight: 600; }

/* Infobulles (G-08) : textes reliés par aria-describedby, masqués à l'écran */
.adm-aides { display: none; }

/* Import de fichier (A-17) */
.adm-import-resultats { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; font-size: 14px; }
.adm-import-resultats li { padding: 8px 12px; border-radius: 14px; background-color: var(--esp-surface-2); }

/* Menu : entrée « Fonctionnement » */
.esp-nav a[href^="/espace-admin-fonctionnement"] { --esp-c: #4E7A5A; --esp-t: #DCE8DD; --esp-d: #1F3A33; --esp-ico: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%231F3A33' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 21a9 9 0 1 0 0-18 9 9 0 0 0 0 18zM9.5 9.5a2.5 2.5 0 1 1 3.5 2.3c-.6.3-1 .9-1 1.6V14M12 17h.01'/%3E%3C/svg%3E"); --esp-ico-on: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23FFFFFF' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 21a9 9 0 1 0 0-18 9 9 0 0 0 0 18zM9.5 9.5a2.5 2.5 0 1 1 3.5 2.3c-.6.3-1 .9-1 1.6V14M12 17h.01'/%3E%3C/svg%3E"); }

@media screen and (max-width: 1180px) {
  .adm-maitre-detail, .adm-maitre-detail-large, .adm-colonnes { grid-template-columns: 1fr; }
  .adm-detail { position: static; }
}
@media screen and (max-width: 900px) {
  .adm-colonnes-egales { grid-template-columns: 1fr; }
  .adm-statuts { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media screen and (max-width: 479px) {
  .adm-statuts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .adm-heure { width: 62px; }
  .adm-detail-entete .esp-subtitle { font-size: 28px; }
}
.adm-carte .esp-btn, .adm-carte .esp-badge { position: relative; z-index: 1; }

/* Mode « Vu en tant que » (A-10, X-16) : bandeau visible sur toutes les pages regardées */
.esp-vu.esp-vu-v3 { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; padding: 10px 16px; border-radius: 0 0 22px 22px; background-color: var(--esp-safran); color: var(--esp-safran-d); }
.esp-vu.esp-vu-v3 p { margin: 0; flex: 1 1 260px; font-weight: 600; }
.esp-vu-espace { display: inline-flex; align-items: center; padding: 3px 12px; border-radius: 999px; background-color: rgba(255, 255, 255, 0.55); font-family: var(--esp-mono); font-size: 12px; }
.esp-vu.esp-vu-v3 .esp-btn { background-color: var(--esp-encre); border-color: var(--esp-encre); color: #FFFFFF; }
html[data-esp-vu] .esp-btn-disabled, html[data-esp-vu] .esp-btn[aria-disabled="true"] { opacity: 0.55; }
.adm-completude[data-completude="ok"] .esp-progress-bar { background-color: var(--esp-vert); }

/* Corrections relevées sur les captures à 1440 px */
.esp-page a.esp-btn:not(.esp-btn-outline):not(.esp-btn-rose):not(.esp-btn-danger):not(.esp-btn-disabled):not([aria-disabled="true"]) { color: #FFFFFF; }
.esp-crise a.esp-btn, .esp-crise a.esp-btn:not(.esp-btn-outline) { color: var(--esp-rouge); }
.adm-detail-titre .esp-badge, .adm-detail-entete .esp-badge { align-self: flex-start; }
.esp-table .esp-chiffre, .esp-table .esp-mono { white-space: nowrap; }
.esp-table td .adm-psy, .esp-table td .adm-personne, .esp-table td a.esp-strong { white-space: nowrap; }
.adm-detail .adm-donnees { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
@media screen and (min-width: 1181px) { .adm-maitre-detail-large { grid-template-columns: minmax(0, 1fr) minmax(320px, 400px); } }
.adm-statuts { grid-template-columns: repeat(auto-fill, minmax(92px, 1fr)); }
.esp-subtitle.adm-psy::before, .esp-subtitle.adm-personne::before { display: none; }
.adm-maitre-detail .esp-td { padding-left: 10px; padding-right: 10px; }
.esp-table .esp-badge { white-space: nowrap; }
details.esp-card > .esp-text, details.esp-card > p { margin: 8px 0 0; }
.adm-colonnes:has(> [data-esp-panneau="rdv"][hidden]) { grid-template-columns: minmax(0, 1fr); }
.adm-crise .adm-donnees { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.adm-crise-titre, .adm-sous-titre, details.esp-card > summary h2, details.esp-card > summary h3 { font-weight: 400; }
.esp-page a.esp-tab-active { color: #FFFFFF; }
.esp-page select.esp-input[multiple] { height: auto; min-height: 120px; line-height: 1.4; padding: 8px 10px; }
.adm-statuts { grid-template-columns: repeat(auto-fit, minmax(68px, 1fr)); gap: 8px; }
.adm-statut { padding: 12px 10px; }
.adm-statut dd { font-size: 34px; }
.adm-statut dt { font-size: 12px; }
.adm-colonnes > *, .adm-colonnes-egales > *, .adm-maitre-detail > *, details.esp-card { min-width: 0; max-width: 100%; }
details.esp-card .esp-scroll-x { max-width: 100%; overflow-x: auto; }
/* G-05 : retour à la liste sur les fiches, utile quand la fiche passe sous la liste (écran étroit) */
@media screen and (min-width: 1181px) { .adm-retour-mobile { display: none; } }
.adm-cases-titre { margin: 8px 0 0; }
/* ---------------------------------------------------------------------------
 * V3, lot client : espace entreprise (Suivi, Services, Devis, Diffuser le service, Cellule de crise)
 * et documents imprimables (devis, facture). Assemblée après espace-v3.css par build.sh.
 * Couleurs : variables --esp-c, --esp-t, --esp-d, --esp-sur-c posées par les classes esp-cat-<nom>.
 * ------------------------------------------------------------------------- */

.esp-cat-tout { --esp-c: #1C1B19; --esp-t: #FFFFFF; --esp-d: #1C1B19; --esp-sur-c: #FFFFFF; }

/* Menu : mode prospect (O-18, C-36) */
.esp-nav-link.esp-nav-link-off { opacity: 0.45; cursor: not-allowed; pointer-events: none; }
.esp-nav-prospect { margin: -10px 12px 0; color: var(--esp-gris); font-size: 12px; line-height: 1.4; }
.esp-side-crise.esp-side-crise-off { opacity: 0.45; pointer-events: none; }
.esp-side-crise-active { box-shadow: inset 0 0 0 2px var(--esp-rouge); }

/* Lien vers la page Fonctionnement de l'espace (G-08) */
.esp-lien-aide { display: flex; align-items: center; gap: 10px; padding: 4px 12px 4px 4px; border-radius: 999px; color: var(--esp-gris-fonce); font-size: 13px; text-decoration: none; }
.esp-lien-aide::before { content: "?"; flex: none; display: flex; align-items: center; justify-content: center; width: 36px; height: 36px; border-radius: 999px; background-color: var(--esp-fond); color: var(--esp-encre); font-family: var(--esp-serif); font-size: 20px; }
.esp-lien-aide:hover, .esp-lien-aide-actif { background-color: var(--esp-surface-2); color: var(--esp-encre); }
.esp-lien-aide-actif::before { background-color: var(--esp-encre); color: #FFFFFF; }
.esp-etapes { align-items: stretch; }
.esp-etape { gap: 10px; }
.esp-etape-tete { display: flex; align-items: center; gap: 12px; }
.esp-etape-points { margin: 0; padding-left: 18px; display: flex; flex-direction: column; gap: 4px; font-size: 14px; color: var(--esp-gris-fonce); }
.esp-etape .esp-lien-fleche { margin-top: auto; }

/* Liens à flèche et petites étiquettes */
.esp-lien-fleche { align-self: flex-start; font-size: 13px; font-weight: 600; color: var(--esp-encre); text-underline-offset: 3px; }
.esp-lien-fleche::after { content: " →"; }
.esp-input-court { max-width: 200px; }
.esp-fieldset { border: 0; margin: 0; padding: 0; min-width: 0; }
.esp-choix { flex-wrap: wrap; gap: 8px; }
details.esp-deplier-bloc > summary h2 { margin: 0; }
details.esp-deplier-bloc[open] > summary { margin-bottom: 8px; }

/* ---- Catalogue (maquette catalogue-client.html) ---- */
.esp-catalogue { gap: 26px; }
.esp-cat-entete { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-end; gap: 16px; }
.esp-cat-entete .esp-title { font-size: 66px; line-height: 1; }
.esp-cat-entete .esp-title em { color: var(--esp-terra); }
.esp-cat-rdv { display: inline-flex; align-items: center; gap: 10px; padding: 6px 18px 6px 6px; border-radius: 999px; background-color: var(--esp-surface); color: var(--esp-encre); font-weight: 600; font-size: 14px; text-decoration: none; }
.esp-cat-rdv:hover { background-color: var(--esp-surface-2); }
.esp-cat-rdv-ico { display: inline-flex; align-items: center; justify-content: center; width: 38px; height: 38px; border-radius: 999px; background-color: var(--esp-bleu); color: #FFFFFF; }
.esp-cat-bandeau { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; }
.esp-cat-bandeau .esp-stack { gap: 2px; }

.esp-cat-filtres { display: flex; flex-wrap: wrap; gap: 8px; }
.esp-filtre { display: inline-flex; align-items: center; gap: 8px; min-height: 46px; padding: 0 18px 0 6px; border: 0; border-radius: 999px; background-color: var(--esp-t); color: var(--esp-d); font-family: var(--esp-sans); font-size: 14px; font-weight: 500; cursor: pointer; }
.esp-filtre:hover { box-shadow: inset 0 0 0 1.5px var(--esp-c); }
.esp-filtre[aria-pressed="true"] { background-color: var(--esp-c); color: var(--esp-sur-c); font-weight: 600; }
.esp-filtre-num { display: inline-flex; align-items: center; justify-content: center; min-width: 34px; height: 34px; padding: 0 4px; box-sizing: border-box; border-radius: 999px; background-color: #FFFFFF; color: var(--esp-d); font-family: var(--esp-mono); font-size: 11px; }
.esp-filtre[aria-pressed="true"] .esp-filtre-num { background-color: rgba(255, 255, 255, 0.22); color: var(--esp-sur-c); }
.esp-cat-tout .esp-filtre-num { background-color: var(--esp-fond); }

/* Boutons pleins posés sur un lien : texte blanc malgré la couleur des liens de la page */
.esp-page a.esp-btn:not(.esp-btn-outline):not(.esp-btn-rose):not(.esp-btn-danger):not(.esp-btn-disabled):not([aria-disabled="true"]) { color: #FFFFFF; }

/* Formes rondes des affiches */
.esp-forme { position: absolute; pointer-events: none; }

/* Service mis en avant : affiche colorée et étapes */
.esp-vedette { display: flex; flex-wrap: wrap; gap: 10px; padding: 10px; border-radius: 34px; background-color: var(--esp-surface); overflow: hidden; }
.esp-vedette-affiche { position: relative; overflow: hidden; isolation: isolate; flex: 1 1 440px; min-height: 340px; box-sizing: border-box; padding: 28px; border-radius: 26px; background-color: var(--esp-c); color: #FBEDE8; display: flex; flex-direction: column; justify-content: space-between; }
.esp-vedette-affiche .esp-forme { z-index: -1; }
.esp-vedette-affiche .esp-forme-a { width: 300px; height: 300px; right: -80px; top: -90px; border-radius: 999px; background-color: rgba(255, 255, 255, 0.14); }
.esp-vedette-affiche .esp-forme-b { width: 180px; height: 90px; right: 60px; bottom: 0; border-radius: 999px 999px 0 0; background-color: rgba(255, 255, 255, 0.28); }
.esp-vedette-affiche .esp-forme-c { width: 46px; height: 46px; right: 250px; bottom: 120px; border-radius: 999px; background-color: var(--esp-rose); }
.esp-vedette-code { align-self: flex-start; padding: 4px 12px; border-radius: 999px; background-color: rgba(251, 237, 232, 0.18); font-family: var(--esp-mono); font-size: 12px; }
.esp-vedette-bas { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; }
.esp-vedette-titre { font-family: var(--esp-serif); font-style: italic; font-size: 64px; line-height: 0.95; letter-spacing: -0.02em; max-width: 6em; }
.esp-vedette-video { flex: none; display: flex; align-items: center; justify-content: center; width: 72px; height: 72px; border: 0; border-radius: 999px; background-color: #FBEDE8; color: var(--esp-c); cursor: pointer; }
.esp-vedette-video svg { width: 24px; height: 24px; }
.esp-vedette-corps { flex: 1 1 380px; display: flex; flex-direction: column; gap: 14px; padding: 18px 16px; }
.esp-vedette-etapes { display: flex; flex-direction: column; gap: 8px; margin: 0; padding: 0; list-style: none; }
.esp-vedette-etape { display: flex; align-items: center; gap: 12px; padding: 10px 14px 10px 10px; border-radius: 18px; background-color: var(--esp-surface-2); font-size: 14px; }
.esp-vedette-num { flex: none; display: flex; align-items: center; justify-content: center; width: 32px; height: 32px; border-radius: 999px; background-color: var(--esp-t); color: var(--esp-d); font-family: var(--esp-mono); font-size: 12px; }
.esp-vedette-prix { display: flex; flex-wrap: wrap; align-items: baseline; gap: 12px; padding: 0 4px; }
.esp-vedette-prix .esp-prix { font-size: 44px; line-height: 1; }
.esp-vedette-corps .esp-actions { margin-top: auto; }
.esp-vedette-corps .esp-btn svg { margin-right: 6px; vertical-align: -2px; }

/* Blocs du catalogue : contrat, complémentaires, catégories */
.esp-cat-bloc { display: flex; flex-direction: column; gap: 14px; }
.esp-cat-bloc-titre { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; padding: 0 4px; }
.esp-cat-bloc > .esp-text { padding: 0 4px; margin-top: -6px; color: var(--esp-gris-fonce); }
.esp-cat-groupes { gap: 30px; }
.esp-cat-groupe { display: flex; flex-direction: column; gap: 14px; scroll-margin-top: 20px; }
.esp-cat-groupe-titre { display: flex; flex-wrap: wrap; align-items: center; gap: 14px; padding: 0 4px; }
.esp-cat-num { flex: none; display: flex; align-items: center; justify-content: center; width: 44px; height: 44px; border-radius: 999px; background-color: var(--esp-c); color: var(--esp-sur-c); font-family: var(--esp-mono); font-size: 13px; }
.esp-cat-nom { margin: 0; font-family: var(--esp-serif); font-weight: 400; font-size: 38px; line-height: 1; letter-spacing: -0.01em; }

/* Vignette de service (S-03 : fiche compacte, S-06 : couleur de la catégorie) */
.esp-svc-grille.esp-vignettes { grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 14px; }
.esp-vignette { display: flex; flex-direction: column; padding: 8px; border-radius: 28px; background-color: var(--esp-surface); }
.esp-vignette-affiche { position: relative; overflow: hidden; isolation: isolate; height: 118px; border-radius: 22px; background-color: var(--esp-c); color: var(--esp-sur-c); }
.esp-vignette-affiche .esp-forme { z-index: -1; }
.esp-vignette .esp-forme-a { width: 140px; height: 140px; right: -40px; top: -50px; border-radius: 999px; background-color: rgba(255, 255, 255, 0.18); }
.esp-vignette .esp-forme-b { width: 34px; height: 34px; left: 110px; bottom: 26px; border-radius: 999px; background-color: rgba(255, 255, 255, 0.34); }
.esp-vignette:nth-child(3n+2) .esp-forme-a { width: 150px; height: 75px; left: 40px; right: auto; top: auto; bottom: 0; border-radius: 999px 999px 0 0; }
.esp-vignette:nth-child(3n+2) .esp-forme-b { width: 60px; height: 60px; left: auto; right: 20px; top: 14px; bottom: auto; }
.esp-vignette:nth-child(3n+3) .esp-forme-a { width: 110px; height: 110px; left: -30px; right: auto; top: auto; bottom: -50px; }
.esp-vignette:nth-child(3n+3) .esp-forme-b { width: 80px; height: 40px; left: auto; right: 40px; top: 0; bottom: auto; border-radius: 0 0 999px 999px; }
.esp-vignette-code { position: absolute; left: 14px; top: 12px; padding: 2px 9px; border-radius: 999px; background-color: rgba(255, 255, 255, 0.22); font-family: var(--esp-mono); font-size: 11px; }
.esp-vignette-souscrit { position: absolute; right: 12px; top: 10px; padding: 2px 10px; border-radius: 999px; background-color: #FFFFFF; color: var(--esp-d); font-size: 11px; font-weight: 600; }
.esp-vignette-video-texte { position: absolute; left: 14px; bottom: 14px; max-width: 60%; font-family: var(--esp-mono); font-size: 10.5px; line-height: 1.3; opacity: 0.92; }
.esp-vignette-video { position: absolute; right: 12px; bottom: 12px; display: flex; align-items: center; justify-content: center; width: 40px; height: 40px; border: 0; border-radius: 999px; background-color: #FFFFFF; color: var(--esp-d); cursor: pointer; }
.esp-vignette-video svg { width: 13px; height: 13px; }
.esp-vignette-corps { flex: 1; display: flex; flex-direction: column; gap: 5px; padding: 12px 8px 4px; }
.esp-vignette-titre { margin: 0; font-family: var(--esp-sans); font-size: 15.5px; line-height: 1.3; font-weight: 600; color: var(--esp-encre); }
.esp-vignette-texte { margin: 0; color: var(--esp-gris); font-size: 13px; line-height: 1.45; flex: 1; }
.esp-vignette-meta { display: flex; flex-direction: column; gap: 1px; margin: 4px 0 0; color: var(--esp-gris-fonce); font-size: 12px; line-height: 1.4; }
.esp-vignette-meta > span:empty { display: none; }
.esp-vignette-pied { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 8px; }
.esp-vignette-prix { font-family: var(--esp-serif); font-size: 24px; line-height: 1; white-space: nowrap; }
.esp-vignette-actions { display: flex; align-items: center; gap: 6px; }
.esp-rond { flex: none; display: flex; align-items: center; justify-content: center; width: 38px; height: 38px; border-radius: 999px; background-color: var(--esp-fond); color: var(--esp-encre); }
.esp-rond[aria-disabled="true"] { color: #A39E95; cursor: not-allowed; }
.esp-page .esp-vignette-cta { display: block; margin-top: 8px; padding: 10px 14px; border-radius: 999px; background-color: var(--esp-t); color: var(--esp-d); font-size: 13.5px; font-weight: 600; text-align: center; text-decoration: none; }
.esp-page .esp-vignette-cta:hover { background-color: var(--esp-c); color: var(--esp-sur-c); }
.esp-vignette-liens { display: flex; flex-wrap: wrap; gap: 2px 12px; margin: 6px 0 0; padding-top: 8px; border-top: 1px solid var(--esp-filet); font-size: 12.5px; }
.esp-vignette-liens a { color: var(--esp-gris-fonce); text-underline-offset: 3px; }
.esp-vignette-liens a:hover { color: var(--esp-encre); }
.esp-vignette-seule .esp-vignette-affiche { height: 150px; }
.esp-vignette-seule .esp-prix { margin: 6px 0 0; }

/* Formulaire de demande (C-30, X-05, X-08) */
.esp-demande { box-shadow: inset 0 0 0 2px var(--esp-encre); scroll-margin-top: 20px; }

/* Modalités d'intervention (X-07) */
.esp-modalites-grille { gap: 12px; }
.esp-modalite { display: flex; flex-direction: column; gap: 6px; padding: 18px; border-radius: 22px; background-color: var(--esp-t); color: var(--esp-d); }
.esp-modalite-titre { font-family: var(--esp-serif); font-size: 26px; line-height: 1; }
.esp-modalite-texte { font-size: 13.5px; line-height: 1.45; }

/* Découvrir les autres services (C-27) */
.esp-decouvrir { position: relative; overflow: hidden; isolation: isolate; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.3fr); gap: 24px; padding: 30px; border-radius: 34px; background-color: var(--esp-encre); color: #F4F1EA; }
.esp-decouvrir::before { content: ""; position: absolute; z-index: -1; width: 260px; height: 260px; left: -90px; bottom: -130px; border-radius: 999px; background-color: rgba(242, 184, 200, 0.22); }
.esp-decouvrir .esp-subtitle { color: #FFFFFF; font-size: 40px; }
.esp-decouvrir .esp-text { color: #E6E1D8; }
.esp-decouvrir-texte { display: flex; flex-direction: column; gap: 12px; }
.esp-decouvrir .esp-btn-outline { background-color: #FFFFFF; border-color: #FFFFFF; color: var(--esp-encre); }
.esp-decouvrir-liens { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; align-content: start; }
.esp-decouvrir-lien { display: flex; flex-direction: column; gap: 6px; padding: 12px; border-radius: 20px; background-color: var(--esp-c); color: var(--esp-sur-c); text-decoration: none; font-weight: 600; }
.esp-decouvrir-lien:hover { filter: brightness(1.08); }
.esp-decouvrir-lien .esp-filtre-num { align-self: flex-start; background-color: rgba(255, 255, 255, 0.22); color: var(--esp-sur-c); }
.esp-decouvrir-nb { font-size: 12px; font-weight: 400; opacity: 0.9; }

/* ---- Suivi (C-09 : vignettes colorées) ---- */
.esp-suivi-entete { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 16px; }
.esp-suivi-entete .esp-stack { gap: 8px; max-width: 760px; }
.esp-suivi-tuiles .esp-kpi { min-height: 140px; }
.esp-suivi-tuiles .esp-kpi .esp-kpi-value { font-size: 52px; }
.esp-suivi-tuiles .esp-help { order: 3; margin: 0; }
.esp-accorder-bandeau { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 12px 12px 24px; border-radius: 999px; background-color: var(--esp-t); color: var(--esp-d); }
.esp-accorder-bandeau .esp-text { color: inherit; margin: 0; }
.esp-suivi-bloc { gap: 10px; }
.esp-suivi-bloc .esp-progress-bar { background-color: var(--esp-c); }
.esp-suivi-bloc .esp-progress { background-color: var(--esp-t); }
.esp-suivi-grand { display: flex; flex-wrap: wrap; align-items: baseline; gap: 10px; margin: 0; }
.esp-suivi-grand > span:first-child { font-family: var(--esp-serif); font-size: 52px; line-height: 1; color: var(--esp-d); }
.esp-tuile { display: flex; flex-direction: column; justify-content: space-between; gap: 10px; min-height: 120px; }
.esp-tuile-libelle { font-size: 14px; font-weight: 500; }
.esp-tuile-valeur { font-family: var(--esp-serif); font-size: 56px; line-height: 0.95; }
.esp-accorder { gap: 16px; scroll-margin-top: 20px; }
.esp-devis-apercu { display: flex; flex-direction: column; gap: 12px; padding: 18px; border-radius: var(--esp-rayon-moyen); background-color: var(--esp-surface-2); }
.esp-graphe { display: flex; flex-direction: column; gap: 10px; }
.esp-graphe .esp-chart { border-bottom-color: var(--esp-filet); }
.esp-graphe .esp-chart-labels { flex-wrap: wrap; }
.esp-graphe[data-esp-graphe="personnes"] .esp-bar { background-color: var(--esp-vert); }
.esp-btn.esp-btn-crise, .esp-page a.esp-btn.esp-btn-crise { background-color: var(--esp-rouge); border-color: var(--esp-rouge); color: #FFFFFF; }
.esp-btn.esp-btn-crise:hover { background-color: #9A3426; }
.esp-thematiques { display: flex; flex-direction: column; gap: 10px; }
.esp-thematique { display: grid; grid-template-columns: minmax(140px, 1fr) minmax(0, 2fr) 96px; align-items: center; gap: 12px; font-size: 14px; }
.esp-thematique-barre { display: block; height: 12px; border-radius: 999px; background-color: var(--esp-prune-t); overflow: hidden; }
.esp-thematique > .esp-strong { text-align: right; }
.esp-thematiques + .esp-muted + .esp-help, .esp-thematiques ~ .esp-help { margin-top: 10px; }
.esp-thematique-remplie { display: block; height: 100%; border-radius: 999px; background-color: var(--esp-prune); }

/* ---- Devis et factures ---- */
.esp-devis-page { gap: 26px; }
.esp-devis-liste { display: flex; flex-direction: column; gap: 8px; }
.esp-devis-carte { display: grid; grid-template-columns: 130px minmax(0, 1fr) 150px 120px 130px; align-items: center; gap: 12px; padding: 14px 18px; border-radius: 20px; background-color: var(--esp-surface); color: var(--esp-encre); text-decoration: none; font-size: 14px; }
.esp-card .esp-devis-carte { background-color: var(--esp-surface-2); }
a.esp-devis-carte:hover { box-shadow: inset 0 0 0 1.5px var(--esp-filet-fort); }
.esp-devis-carte-num { font-size: 13px; color: var(--esp-gris-fonce); }
.esp-devis-carte-service { font-weight: 600; }
.esp-devis-carte-montant { font-family: var(--esp-serif); font-size: 20px; text-align: right; }
.esp-devis-carte .esp-badge { justify-self: end; }
.esp-devis-carte-demande { grid-template-columns: 200px minmax(0, 1fr) 150px 130px; }
.esp-devis-doc-tete { display: flex; flex-wrap: wrap; align-items: flex-start; justify-content: space-between; gap: 12px; }
.esp-devis-signe { display: flex; flex-direction: column; gap: 4px; padding: 16px 18px; border-radius: var(--esp-rayon-moyen); background-color: var(--esp-vert-t); color: var(--esp-vert-d); }
.esp-devis-signe-titre { font-family: var(--esp-serif); font-size: 26px; line-height: 1.1; }
.esp-configurateur { align-items: start; }

/* Catégories dépliables (G-07) */
details.esp-cat-groupe > summary { cursor: pointer; list-style: none; }
details.esp-cat-groupe > summary::-webkit-details-marker { display: none; }
details.esp-cat-groupe > summary::after { content: ""; flex: none; width: 28px; height: 28px; margin-left: auto; border-radius: 999px; background: var(--esp-surface) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%231C1B19' stroke-width='2' stroke-linecap='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E") center / 14px 14px no-repeat; transition: transform .15s ease; }
details[open].esp-cat-groupe > summary::after { transform: rotate(180deg); }
details.esp-cat-groupe[open] > summary { margin-bottom: 14px; }

/* ---- Cellule de crise ---- */
.esp-crise-temps { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin: 0; padding: 0; list-style: none; }
.esp-crise-temps-item { position: relative; overflow: hidden; isolation: isolate; display: flex; flex-direction: column; gap: 14px; min-height: 160px; padding: 20px; border-radius: 26px; background-color: var(--esp-t); color: var(--esp-d); }
.esp-crise-temps-item::after { content: ""; position: absolute; z-index: -1; width: 110px; height: 110px; right: -36px; bottom: -46px; border-radius: 999px; background-color: var(--esp-c); opacity: 0.22; }
.esp-crise-temps-num { display: flex; align-items: center; justify-content: center; width: 40px; height: 40px; border-radius: 999px; background-color: var(--esp-c); color: var(--esp-sur-c); font-family: var(--esp-mono); font-size: 13px; }
.esp-crise-temps-texte { font-size: 15px; line-height: 1.45; font-weight: 500; }
.esp-crise-liste { margin: 0; padding-left: 18px; display: flex; flex-direction: column; gap: 6px; font-size: 14px; }
.esp-crise-forfait { background-color: var(--esp-terra-t); color: var(--esp-terra-d); }
.esp-crise-forfait .esp-text, .esp-crise-forfait .esp-caption { color: inherit; }
.esp-crise-forfait .esp-prix { font-size: 48px; line-height: 1; margin: 0; }
.esp-crise-arrivee { box-shadow: inset 0 0 0 2px var(--esp-vert); }

/* ---- Diffuser le service ---- */
.esp-diffuser { align-items: stretch; }
.esp-diffuser-bloc { position: relative; }
.esp-diffuser-num { align-self: flex-start; display: flex; align-items: center; justify-content: center; width: 40px; height: 40px; border-radius: 999px; background-color: var(--esp-c); color: var(--esp-sur-c); font-family: var(--esp-mono); font-size: 12px; }
.esp-diffuser-qr { display: flex; flex-wrap: wrap; align-items: center; gap: 16px; }
.esp-diffuser-qr .esp-qr-image { border: 0; border-radius: 16px; background-color: #FFFFFF; box-shadow: inset 0 0 0 1px var(--esp-filet); }
.esp-mail-modele { padding: 16px 18px; border-radius: var(--esp-rayon-moyen); background-color: var(--esp-surface-2); font-size: 14px; }
.esp-diffuser-bloc .esp-actions { margin-top: auto; }

/* Affiche A4 (C-33) : aperçu à l'écran et version imprimée, mêmes proportions (unités cqw). */
.esp-affiche-cadre { display: flex; justify-content: center; padding: 14px; border-radius: var(--esp-rayon-moyen); background-color: var(--esp-surface-2); }
.esp-affiche-apercu, .esp-page .esp-affiche { container-type: inline-size; position: relative; overflow: hidden; isolation: isolate; box-sizing: border-box; aspect-ratio: 210 / 297; background-color: #F6F3EE; color: #1C1B19; font-family: var(--esp-sans); text-align: left; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
.esp-affiche-apercu { width: 100%; max-width: 300px; border-radius: 10px; box-shadow: var(--esp-ombre); }
.esp-affiche-apercu > *, .esp-page .esp-affiche > * { position: relative; }
.esp-affiche-apercu .esp-forme, .esp-page .esp-affiche .esp-forme { position: absolute; z-index: -1; }
.esp-affiche-forme-a { width: 62cqw; height: 62cqw; right: -18cqw; top: -20cqw; border-radius: 999px; background-color: #4E7A5A; }
.esp-affiche-forme-b { width: 46cqw; height: 23cqw; left: 6cqw; bottom: 0; border-radius: 999px 999px 0 0; background-color: #E9B54F; }
.esp-affiche-forme-c { width: 8cqw; height: 8cqw; right: 8cqw; bottom: 1.5cqw; border-radius: 999px; background-color: #F2B8C8; }
.esp-affiche-apercu, .esp-page .esp-affiche { flex-direction: column; justify-content: space-between; gap: 0; padding: 0; }
/* Les unités cqw d'un conteneur visent son propre parent : marges posées sur les enfants. */
.esp-page .esp-affiche-apercu > :not(.esp-forme), .esp-page .esp-affiche > :not(.esp-forme) { margin-left: 7cqw !important; margin-right: 7cqw !important; }
.esp-page .esp-affiche-apercu > .esp-affiche-haut, .esp-page .esp-affiche > .esp-affiche-haut { margin-top: 7cqw !important; }
.esp-page .esp-affiche-apercu > .esp-affiche-qr, .esp-page .esp-affiche > .esp-affiche-qr { margin-bottom: 7cqw !important; }
.esp-affiche-apercu { display: flex; }
.esp-page .esp-affiche-haut { display: flex; align-items: center; gap: 2.4cqw; margin: 0; }
.esp-page .esp-affiche-logo { width: 8cqw; height: auto; }
.esp-page .esp-affiche-marque { font-family: var(--esp-serif); font-size: 4.6cqw; }
.esp-page .esp-affiche-titre { margin-top: 4cqw; max-width: 62cqw; font-family: var(--esp-serif); font-size: 9.6cqw; line-height: 0.98; letter-spacing: -0.02em; }
.esp-page .esp-affiche-titre em { font-style: italic; color: #B4533A; }
.esp-page .esp-affiche-sous-titre { margin: 0; max-width: 70cqw; font-size: 3.4cqw; line-height: 1.4; color: #57534D; }
.esp-page .esp-affiche-points { display: flex; flex-direction: column; gap: 2cqw; margin: 0; padding: 0; list-style: none; font-size: 3cqw; line-height: 1.35; }
.esp-page .esp-affiche-points li { display: flex; align-items: center; gap: 2.6cqw; margin: 0; padding: 2cqw 3cqw 2cqw 2cqw; border-radius: 5cqw; background-color: #FFFFFF; }
.esp-page .esp-affiche-num { flex: none; display: flex; align-items: center; justify-content: center; width: 6.4cqw; height: 6.4cqw; border-radius: 999px; background-color: #DCE8DD; color: #1F3A33; font-family: var(--esp-mono); font-size: 2.4cqw; }
.esp-page .esp-affiche-qr { display: flex; align-items: center; gap: 4cqw; margin: 0; padding: 3.4cqw; border-radius: 6cqw; background-color: #FFFFFF; }
.esp-page .esp-affiche-qr .esp-qr-image { flex: none; width: 26cqw; height: 26cqw; border: 0; border-radius: 2cqw; }
.esp-page .esp-affiche-lien { display: flex; flex-direction: column; gap: 1.4cqw; min-width: 0; }
.esp-page .esp-affiche-scan { font-family: var(--esp-serif); font-size: 4.6cqw; line-height: 1.05; }
.esp-page .esp-affiche-url { font-family: var(--esp-mono); font-size: 2.2cqw; line-height: 1.35; overflow-wrap: anywhere; color: #57534D; }
.esp-page .esp-affiche-code { align-self: flex-start; padding: 0.8cqw 2.4cqw; border-radius: 999px; background-color: #1C1B19; color: #FFFFFF; font-family: var(--esp-mono); font-size: 2.6cqw; }
.esp-page .esp-affiche { display: none; }

/* ---- Documents imprimables (D-01, O-13) ---- */
.esp-page:has(.esp-doc) > .esp-main { max-width: 900px; margin: 0 auto; padding: 24px 16px 40px; }
.esp-doc-barre { justify-content: space-between; align-items: center; }
.esp-doc { gap: 18px; padding: 36px; }
.esp-doc .esp-doc-entete { align-items: flex-start; padding-bottom: 18px; border-bottom: 1px solid var(--esp-filet); }
.esp-doc-logo { width: 54px; height: auto; margin-bottom: 8px; }
.esp-doc .esp-doc-emetteur { font-family: var(--esp-serif); font-size: 30px; line-height: 1; text-transform: none; letter-spacing: 0; }
.esp-doc .esp-doc-client { min-width: 220px; padding: 14px 16px; border-radius: var(--esp-rayon-petit); background-color: var(--esp-surface-2); }
.esp-doc .esp-doc-titre { font-size: 44px; }
.esp-doc .esp-doc-signature { border-color: var(--esp-filet-fort); border-radius: var(--esp-rayon-moyen); }
.esp-doc-mentions { margin: 8px 0 0; padding-top: 14px; border-top: 1px solid var(--esp-filet); color: var(--esp-gris); font-family: var(--esp-mono); font-size: 11px; text-align: center; }

/* ---- Écrans étroits ---- */
@media screen and (max-width: 991px) {
  .esp-crise-temps { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .esp-decouvrir { grid-template-columns: 1fr; }
  .esp-devis-carte { grid-template-columns: minmax(0, 1fr) auto; gap: 4px 12px; }
  .esp-devis-carte > :nth-child(1) { grid-column: 1; }
  .esp-devis-carte > .esp-badge { grid-column: 2; grid-row: 1; }
  .esp-devis-carte > .esp-devis-carte-service { grid-column: 1 / -1; }
  .esp-devis-carte-montant { text-align: left; }
}
@media screen and (max-width: 900px) {
  .esp-header.esp-header-repliable .esp-lien-aide, .esp-header.esp-header-repliable .esp-nav-prospect { display: none; }
  .esp-header.esp-header-repliable.esp-header-ouvert .esp-lien-aide { display: flex; width: 100%; }
  .esp-header.esp-header-repliable.esp-header-ouvert .esp-nav-prospect:not([hidden]) { display: block; width: 100%; margin: 0; }
  .esp-cat-entete .esp-title { font-size: 48px; }
  .esp-vedette-affiche { min-height: 280px; padding: 22px; }
  .esp-vedette-titre { font-size: 48px; }
  .esp-cat-nom { font-size: 30px; }
  .esp-suivi-tuiles .esp-kpi .esp-kpi-value { font-size: 42px; }
  .esp-accorder-bandeau { border-radius: var(--esp-rayon-moyen); padding: 16px; }
  .esp-doc { padding: 22px; }
}
@media screen and (max-width: 479px) {
  .esp-cat-entete .esp-title { font-size: 42px; }
  .esp-cat-rdv { width: 100%; }
  .esp-filtre { min-height: 40px; padding-right: 14px; font-size: 13px; }
  .esp-filtre-num { min-width: 28px; height: 28px; }
  .esp-vedette { border-radius: 26px; }
  .esp-vedette-affiche { flex-basis: 100%; min-height: 240px; }
  .esp-vedette-titre { font-size: 42px; }
  .esp-vedette-video { width: 56px; height: 56px; }
  .esp-vedette-corps { flex-basis: 100%; padding: 12px 8px; }
  .esp-vedette-prix .esp-prix { font-size: 36px; }
  .esp-svc-grille.esp-vignettes { grid-template-columns: 1fr; }
  .esp-suivi-tuiles { grid-template-columns: 1fr 1fr; gap: 10px; }
  .esp-suivi-tuiles .esp-kpi { min-height: 120px; padding: 16px; }
  .esp-suivi-tuiles .esp-kpi .esp-kpi-value { font-size: 34px; }
  .esp-suivi-tuiles .esp-kpi .esp-kpi-label { font-size: 12.5px; }
  .esp-suivi-grand > span:first-child { font-size: 42px; }
  .esp-tuile-valeur { font-size: 44px; }
  .esp-thematique { grid-template-columns: 1fr auto; }
  .esp-thematique-barre { grid-column: 1 / -1; grid-row: 2; }
  .esp-crise-temps { grid-template-columns: 1fr; }
  .esp-crise-temps-item { min-height: 0; flex-direction: row; align-items: center; }
  .esp-crise-temps-num { flex: none; }
  .esp-decouvrir { padding: 22px; border-radius: 26px; }
  .esp-decouvrir .esp-subtitle { font-size: 32px; }
  .esp-decouvrir-liens { grid-template-columns: 1fr 1fr; }
  .esp-modalites-grille { grid-template-columns: 1fr 1fr; }
  .esp-doc .esp-doc-titre { font-size: 32px; }
  .esp-vignette-affiche { height: 92px; }
  .esp-table-pile thead { display: none; }
  .esp-table-pile, .esp-table-pile tbody, .esp-table-pile tr, .esp-table-pile td { display: block; width: auto; }
  .esp-table-pile tr { padding: 10px 0; border-bottom: 1px solid var(--esp-filet); }
  .esp-table-pile .esp-td { display: flex; justify-content: space-between; gap: 12px; padding: 3px 0; border: 0; }
  .esp-table-pile .esp-td::before { content: attr(data-titre); color: var(--esp-gris); font-size: 12px; }
  .esp-table-pile .esp-td:first-child { font-weight: 600; }
  .esp-table-pile .esp-td:first-child::before { content: none; }
}

/* ---- Impression ---- */
@media print {
  .esp-page:has(.esp-espace) > .esp-header, .esp-page:has(.esp-doc) > .esp-header, .esp-page:has(.esp-doc) > .esp-footer { display: none !important; }
  .esp-doc { border: 0 !important; padding: 0; }
  .esp-doc-mentions { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  details.esp-deplier-bloc > summary::after { display: none; }
  html.esp-impression-affiche, html.esp-impression-affiche body, html.esp-impression-affiche .esp-page { background-color: #F6F3EE !important; }
  html.esp-impression-affiche .esp-page > :not(.esp-main) { display: none !important; }
  html.esp-impression-affiche .esp-page .esp-main { display: block !important; max-width: none; padding: 0 !important; margin: 0 !important; }
  html.esp-impression-affiche body .esp-page .esp-main > .esp-affiche { display: flex !important; width: 190mm; min-height: 0; margin: 0 auto; gap: 0; text-align: left; align-items: stretch !important; justify-content: space-between !important; }
  html.esp-impression-affiche body .esp-page .esp-affiche .esp-affiche-qr .esp-qr-image { width: 26cqw; height: 26cqw; }
}

/* ---------------------------------------------------------------------------
 * V3, lot Patient et pages communes (22/10/2026).
 * Portée : .esp-patient (pages espace-collab-*), .esp-seance (séance écrite), .esp-commune
 * (connexion, inscription, première connexion, lien expiré). Les règles restent dans ces portées.
 * Préfixes : v3p- (patient), v3s- (séance), v3c- (pages communes). Téléphone d'abord (390 px).
 * ------------------------------------------------------------------------- */

/* ---- Commun aux trois portées ---- */
.esp-patient .esp-title em, .esp-seance .esp-title em, .esp-commune .esp-title em { font-style: italic; color: var(--esp-vert); }
.esp-patient .esp-alert[data-esp-type="erreur"], .esp-seance .esp-alert[data-esp-type="erreur"], .esp-commune .esp-alert[data-esp-type="erreur"] { background-color: var(--esp-terra-t); color: var(--esp-terra-d); }
.esp-patient .esp-alert[data-esp-type="info"], .esp-seance .esp-alert[data-esp-type="info"], .esp-commune .esp-alert[data-esp-type="info"] { background-color: var(--esp-vert-t); color: var(--esp-vert-d); }
.v3-descriptions { display: none; }
.esp-patient .esp-h2, .esp-seance .esp-h2, .esp-commune .esp-h2 { margin: 0; font-family: var(--esp-serif); font-weight: 400; font-size: 26px; line-height: 1.1; letter-spacing: -0.01em; color: inherit; }
.esp-patient .esp-retour, .esp-seance .esp-retour { margin-bottom: -6px; }

/* Bouton plein sombre : texte blanc (la règle « .esp-page a » du socle l'emportait). */
.esp-patient a.esp-btn:not(.esp-btn-outline):not(.esp-btn-rose):not(.esp-btn-disabled), .esp-seance a.esp-btn:not(.esp-btn-outline):not(.esp-btn-rose):not(.esp-btn-disabled), .esp-commune a.esp-btn:not(.esp-btn-outline):not(.esp-btn-rose):not(.esp-btn-disabled) { color: #FFFFFF; }

/* En-tête mobile : logo, nom de l'espace, puis bouton Menu à droite. */
.esp-patient > .esp-header .esp-logo, .esp-seance > .esp-header .esp-logo { order: 0; }
.esp-patient > .esp-header .esp-espace, .esp-seance > .esp-header .esp-espace { order: 1; }
.esp-patient > .esp-header .esp-menu-bouton, .esp-seance > .esp-header .esp-menu-bouton { order: 2; }
.esp-patient > .esp-header .esp-nav, .esp-seance > .esp-header .esp-nav { order: 3; }
.esp-patient > .esp-header .esp-user, .esp-seance > .esp-header .esp-user { order: 4; }

/* Portrait : rond teinté avec silhouette quand la photo manque ; le texte de remplacement reste lu, sans s'afficher. */
.esp-patient img.esp-avatar { color: transparent; font-size: 0; background: var(--esp-vert-t) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%231F3A33' stroke-width='1.5' stroke-linecap='round'%3E%3Cpath d='M12 12a4 4 0 1 0 0-8 4 4 0 0 0 0 8zM4 21c0-4 3.6-7 8-7s8 3 8 7'/%3E%3C/svg%3E") center / 55% no-repeat; }

/* ---- Bandeau d'aide (15, 112, 3114) : barre arrondie, collée en bas, lisible sur téléphone ---- */
.esp-patient .esp-help-bar { position: sticky; bottom: 10px; z-index: 22; margin: 0 0 10px; padding: 10px 10px 10px 18px; gap: 8px 14px; justify-content: space-between; border-radius: 26px; background-color: var(--esp-encre); color: #FFFFFF; font-size: 14px; line-height: 1.4; text-align: left; box-shadow: 0 10px 30px rgba(28, 27, 25, 0.18); }
.esp-patient .esp-help-bar > p { flex: 1 1 200px; margin: 0; }
.esp-patient .esp-help-bar .esp-btn-aide { flex: none; min-height: 40px; padding: 8px 16px; font-size: 14px; background-color: var(--esp-rose); border-color: var(--esp-rose); color: var(--esp-encre); }
.esp-patient .esp-panneau-aide { padding: 6px; gap: 6px; border-radius: 20px; background-color: var(--esp-surface); }
.esp-patient .esp-panneau-aide a { align-items: center; padding: 12px 16px; border: 0; border-radius: 16px; background-color: var(--esp-fond); color: var(--esp-encre); font-weight: 500; }
.esp-patient .esp-panneau-aide a span:first-child { font-family: var(--esp-mono); font-size: 18px; font-weight: 500; color: var(--esp-rouge); }
.esp-patient .esp-panneau-aide a span:last-child { font-size: 13px; color: var(--esp-gris-fonce); }
.esp-patient .esp-haut, .esp-seance .esp-haut { bottom: 92px; right: 16px; }
.esp-haut[hidden] { display: none; }

/* ---- En-tête de page ---- */
.v3p-entete { display: flex; flex-direction: column; gap: 10px; }
.v3p-entete .esp-title { margin: 0; }
.v3p-entete .esp-lead { margin: 0; }

/* ---- Tuiles et grilles de l'accueil ---- */
.v3p-grille { display: grid; grid-template-columns: minmax(0, 1fr); gap: 14px; }
.v3p-tuile-label { margin: 0; font-size: 14px; font-weight: 500; }
.v3p-tuile-tete { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.v3p-quand { margin: 0; font-family: var(--esp-serif); font-size: 36px; line-height: 1.02; letter-spacing: -0.015em; }
.esp-tuile.v3p-prochain, .esp-tuile.v3p-vide { display: flex; flex-direction: column; gap: 12px; min-height: 220px; }
.esp-tuile .esp-text, .esp-tuile .esp-muted, .esp-tuile .esp-help, .esp-tuile .esp-strong { color: inherit; margin: 0; }
.esp-tuile .esp-muted, .esp-tuile .esp-help { opacity: 0.88; }
.esp-tuile .esp-badge { background-color: rgba(255, 255, 255, 0.2); color: inherit; }
.esp-tuile .esp-badge .esp-dot { background-color: currentColor; }
.esp-tuile .esp-btn-outline { background-color: #FFFFFF; border-color: #FFFFFF; color: var(--esp-encre); }
.esp-tuile .esp-btn-outline:hover { background-color: var(--esp-fond); border-color: var(--esp-fond); }
.esp-tuile .esp-btn-disabled, .esp-tuile .esp-btn-outline.esp-btn-disabled { background-color: rgba(255, 255, 255, 0.18); border-color: transparent; color: inherit; opacity: 0.8; }
.esp-tuile .v3p-lien { align-self: flex-start; padding: 4px 0; color: inherit; font-size: 14px; font-weight: 500; text-decoration: underline; text-underline-offset: 3px; background: none; border: 0; }
.v3p-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px; margin-top: auto; }
.v3p-actions .esp-btn { flex: 1 1 200px; }

.esp-teinte.v3p-bloc { display: flex; flex-direction: column; gap: 12px; padding: 22px; border-radius: var(--esp-rayon); }
.esp-teinte .esp-text, .esp-teinte .esp-muted, .esp-teinte .esp-help, .esp-teinte .esp-caption { color: inherit; margin: 0; }
.esp-teinte .esp-muted, .esp-teinte .esp-help { opacity: 0.85; }
.esp-teinte .esp-btn-outline { background-color: #FFFFFF; border-color: #FFFFFF; }
.esp-teinte .esp-btn-outline:hover { border-color: var(--esp-d); }

.v3p-psy-tete { display: flex; align-items: center; gap: 14px; }
.v3p-psy-tete .esp-avatar { width: 72px; height: 72px; }
.v3p-psy-nom { margin: 0; font-family: var(--esp-serif); font-size: 28px; line-height: 1.05; }
.v3p-psy-tete .esp-muted { margin: 2px 0 0; }

.v3p-cta { display: flex; flex-direction: column; gap: 10px; }
.v3p-cta .esp-btn { width: 100%; }

/* Blocs blancs à titre serif */
.v3p-carte { display: flex; flex-direction: column; gap: 14px; }
.v3p-carte-tete { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; flex-wrap: wrap; }

/* Déroulé d'un rendez-vous (bloc dépliable) */
details.esp-deplier.v3p-deroule { padding: 18px 22px; border-radius: var(--esp-rayon); background-color: var(--esp-surface); }
details.esp-deplier.v3p-deroule > summary { font-family: var(--esp-serif); font-size: 24px; }
.v3p-etapes-liste { counter-reset: v3p; list-style: none; margin: 14px 0 4px; padding: 0; display: grid; gap: 8px; }
.v3p-etapes-liste li { counter-increment: v3p; display: grid; grid-template-columns: 34px 1fr; gap: 2px 12px; align-items: start; padding: 12px; border-radius: var(--esp-rayon-moyen); background-color: var(--esp-surface-2); font-size: 14px; color: var(--esp-gris-fonce); }
.v3p-etapes-liste li::before { content: counter(v3p); grid-row: 1 / span 2; width: 34px; height: 34px; border-radius: 999px; display: flex; align-items: center; justify-content: center; background-color: var(--esp-c, var(--esp-vert)); color: var(--esp-sur-c, #FFFFFF); font-family: var(--esp-mono); font-size: 13px; }
.v3p-etapes-liste li strong { color: var(--esp-encre); font-weight: 600; font-size: 15px; }
.v3p-etapes-liste li:nth-child(1) { --esp-c: var(--esp-bleu); }
.v3p-etapes-liste li:nth-child(2) { --esp-c: var(--esp-vert); }
.v3p-etapes-liste li:nth-child(3) { --esp-c: var(--esp-prune); }
.v3p-etapes-liste li:nth-child(4) { --esp-c: var(--esp-safran); --esp-sur-c: var(--esp-safran-d); }

/* ---- Rendez-vous en liste : pavé de date coloré, texte, actions ---- */
.esp-list .esp-item.v3p-rdv { display: grid; grid-template-columns: 64px minmax(0, 1fr); align-items: start; gap: 12px; padding: 10px; border-radius: 22px; background-color: var(--esp-surface-2); }
.v3p-date { --esp-t: var(--esp-bleu-t); --esp-d: var(--esp-bleu-d); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; min-height: 64px; padding: 6px 4px; border-radius: 18px; background-color: var(--esp-t); color: var(--esp-d); text-align: center; line-height: 1.1; }
.v3p-date span:first-child { font-family: var(--esp-mono); font-size: 11px; letter-spacing: 0.04em; }
.v3p-date span:last-child { font-family: var(--esp-serif); font-size: 21px; }
.v3p-rdv:nth-child(4n+2) .v3p-date { --esp-t: var(--esp-prune-t); --esp-d: var(--esp-prune-d); }
.v3p-rdv:nth-child(4n+3) .v3p-date { --esp-t: var(--esp-safran-t); --esp-d: var(--esp-safran-d); }
.v3p-rdv:nth-child(4n+4) .v3p-date { --esp-t: var(--esp-vert-t); --esp-d: var(--esp-vert-d); }
.esp-patient [data-esp-panneau] > .esp-list .esp-item.v3p-rdv { background-color: var(--esp-surface); }
.v3p-passes .v3p-date { --esp-t: var(--esp-filet); --esp-d: var(--esp-gris-fonce); }
.v3p-rdv .esp-item-main { gap: 4px; min-width: 0; }
.v3p-rdv .esp-item-main > * { margin: 0; }
.v3p-ligne { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 6px 10px; }
.v3p-rdv .esp-item-title { font-size: 15px; font-weight: 600; }
.v3p-rdv > .esp-actions { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 6px; }
.v3p-rdv > .esp-actions:not(:has(> :not([hidden]))) { display: none; }
.v3p-rdv .esp-chips { margin-top: 4px; }

/* ---- Page Épuisement professionnel : quatre situations en tuiles teintées ---- */
.v3p-situations { display: grid; grid-template-columns: minmax(0, 1fr); gap: 12px; }
.v3p-situations .esp-sit { display: flex; flex-direction: column; gap: 10px; border: 0; border-radius: var(--esp-rayon); padding: 22px; background-color: var(--esp-t); color: var(--esp-d); }
.v3p-situations .esp-sit .esp-text { color: inherit; margin: 0; }
.v3p-situations .esp-sit .esp-h2 { font-size: 26px; }
.v3p-situations .esp-sit .esp-btn { margin-top: auto; background-color: #FFFFFF; border-color: #FFFFFF; }
.v3p-situations .esp-sit .esp-btn:hover { border-color: var(--esp-d); }
.v3p-signe { width: 44px; height: 44px; border-radius: 999px; background-color: var(--esp-c); background-repeat: no-repeat; background-position: center; background-size: 20px 20px; }
.v3p-signe-corps { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23FFFFFF' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3 12h4l2-5 4 10 2-5h6'/%3E%3C/svg%3E"); }
.v3p-signe-emotions { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23FFFFFF' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 20s-7-4.4-7-10a4 4 0 0 1 7-2.6A4 4 0 0 1 19 10c0 5.6-7 10-7 10z'/%3E%3C/svg%3E"); }
.v3p-signe-entourage { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23FFFFFF' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M9 11.5a3.5 3.5 0 1 0 0-7 3.5 3.5 0 0 0 0 7zM2.5 20c0-3.6 2.9-6 6.5-6s6.5 2.4 6.5 6M16 4.5a3.5 3.5 0 0 1 0 7M18 14.2c2.1.6 3.5 2.6 3.5 5.8'/%3E%3C/svg%3E"); }
.v3p-signe-auto { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%233A2A08' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 21a9 9 0 1 0 0-18 9 9 0 0 0 0 18zM12 7v5l3 2'/%3E%3C/svg%3E"); }

/* ---- Demande de rendez-vous : étapes, puis récapitulatif en tuile ---- */
.v3p-demande { display: grid; grid-template-columns: minmax(0, 1fr); gap: 14px; align-items: start; }
.v3p-etapes { display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.v3p-etape .esp-h2 { display: flex; align-items: center; gap: 10px; font-size: 24px; }
.v3p-etape .esp-chips { gap: 8px; }
.v3p-etape .esp-chip { min-height: 44px; }
.v3p-recap { display: flex; flex-direction: column; gap: 12px; }
.v3p-recap .v3p-quand { font-size: 28px; }
.v3p-recap .esp-check { color: inherit; }
.v3p-recap .esp-btn-rose.esp-btn-disabled { background-color: rgba(255, 255, 255, 0.22); border-color: transparent; color: #FFFFFF; opacity: 0.85; }
.v3p-contexte { flex-direction: row; align-items: center; flex-wrap: wrap; }

/* ---- Mes rendez-vous ---- */
/* V4, visio Meet : question sur l'enregistrement avant « Rejoindre la séance », puis état sous le bouton. */
.v3p-consentement { display: flex; flex-direction: column; gap: 10px; }
.v3p-consentement .esp-actions { gap: 8px; }
.v3p-enregistrement { flex: 1 1 100%; margin: 0; }
.esp-patient .esp-tabs { box-shadow: inset 0 0 0 1px var(--esp-filet); }
.v3p-vide-ligne { margin: 0; padding: 18px; border-radius: 22px; background-color: var(--esp-surface); color: var(--esp-gris-fonce); text-align: center; }

/* ---- Mon compte ---- */
.v3p-identite { margin: 0; display: grid; gap: 6px; }
.v3p-identite > div { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 2px 12px; padding: 10px 14px; border-radius: 16px; background-color: var(--esp-surface-2); }
.v3p-identite dt { color: var(--esp-gris); font-size: 13px; }
.v3p-identite dd { margin: 0; font-weight: 500; overflow-wrap: anywhere; }
.v3p-compte { display: grid; grid-template-columns: minmax(0, 1fr); gap: 14px; }
.v3p-compte .esp-card { display: flex; flex-direction: column; gap: 12px; }
.v3p-compte .esp-card > * { margin: 0; }

/* ---- Séance écrite : bulles et zone de saisie ---- */
.esp-seance .esp-main { gap: 16px; }
.v3s-fil { display: flex; flex-direction: column; gap: 12px; padding: 14px; }
.esp-seance .esp-msgs { gap: 8px; min-height: 280px; padding: 8px 4px; }
.esp-seance .esp-msg { max-width: 84%; padding: 10px 14px 8px; border-radius: 22px; font-size: 15px; line-height: 1.5; }
.esp-seance .esp-msg-moi { background-color: var(--esp-vert); color: #FFFFFF; border-bottom-right-radius: 6px; }
.esp-seance .esp-msg-autre { background-color: var(--esp-fond); color: var(--esp-encre); border-bottom-left-radius: 6px; }
.esp-seance .esp-msg-orig { font-size: 12px; opacity: 0.75; font-style: italic; }
.esp-seance .esp-msg-heure { align-self: flex-end; font-family: var(--esp-mono); font-size: 11px; opacity: 0.75; }
.v3s-saisie { display: grid; grid-template-columns: minmax(0, 1fr); gap: 8px; padding: 10px; border-radius: 24px; background-color: var(--esp-surface-2); }
.v3s-saisie .esp-field { margin: 0; gap: 6px; }
.v3s-saisie .esp-textarea { min-height: 96px; border-radius: 18px; resize: vertical; }
.v3s-saisie .esp-btn { width: 100%; }
.esp-seance .esp-alert { margin: 0; }

/* ---- Pages communes : carte blanche centrée sur fond crème ---- */
.esp-page.esp-commune { position: relative; overflow: hidden; display: flex; flex-direction: column; align-items: stretch; min-height: 100vh; padding: 0 16px; }
.esp-page.esp-commune::before, .esp-page.esp-commune::after { content: ""; position: absolute; z-index: 0; border-radius: 999px; pointer-events: none; }
.esp-page.esp-commune::before { width: 340px; height: 340px; top: -170px; right: -120px; background-color: var(--esp-vert-t); }
.esp-page.esp-commune::after { width: 260px; height: 260px; bottom: -150px; left: -110px; background-color: var(--esp-prune-t); }
.esp-page.esp-commune > * { position: relative; z-index: 1; }
.esp-page.esp-commune:not(:has(> .esp-header .esp-nav)) > .esp-header { align-self: center; flex-direction: row; align-items: center; justify-content: center; gap: 10px; width: auto; max-width: none; margin: 28px auto 0; padding: 0; border-radius: 0; background-color: transparent; box-shadow: none; }
.esp-page.esp-commune:not(:has(> .esp-header .esp-nav)) > .esp-header .esp-logo { width: 40px; margin: 0; }
.esp-page.esp-commune:not(:has(> .esp-header .esp-nav)) > .esp-header .esp-muted { font-family: var(--esp-serif); font-size: 24px; color: var(--esp-encre); }
.esp-commune > .esp-main { width: 100%; max-width: 460px; margin: 28px auto 0; padding: 0 0 24px; gap: 18px; }
.esp-commune > .esp-main.v3c-large { max-width: 600px; }
.esp-commune .esp-title { margin: 0; text-align: center; font-size: 46px; }
.esp-commune .esp-main > .esp-title + .esp-lead { margin-top: -6px; }
.esp-commune .esp-lead { margin: 0 auto; text-align: center; font-size: 15px; }
.esp-commune .esp-card { display: flex; flex-direction: column; gap: 12px; padding: 26px 22px; border-radius: 28px; box-shadow: var(--esp-ombre); }
.esp-commune .esp-card > * { margin: 0; }
.esp-commune .esp-card .esp-btn { width: 100%; }
.esp-commune .esp-field { margin: 0; }
.v3c-ou { display: flex; align-items: center; gap: 12px; color: var(--esp-gris); font-size: 13px; }
.v3c-ou::before, .v3c-ou::after { content: ""; flex: 1; height: 1px; background-color: var(--esp-filet); }
.v3c-note { margin: 0; padding: 14px 18px; border-radius: 20px; background-color: rgba(255, 255, 255, 0.6); color: var(--esp-gris-fonce); font-size: 13px; line-height: 1.5; }
.v3c-note + .v3c-note { margin-top: -8px; }
.v3c-code { align-self: center; }
.esp-commune .esp-footer { margin-top: auto; padding: 24px 0 28px; text-align: center; }
.v3c-section { display: flex; flex-direction: column; gap: 12px; padding-top: 4px; }
.v3c-section + .v3c-section { padding-top: 18px; border-top: 1px solid var(--esp-filet); }
.v3c-section > .esp-h2 { font-size: 22px; }
.v3c-liens { display: flex; flex-wrap: wrap; gap: 8px; }
.v3c-liens a { font-size: 14px; color: var(--esp-bleu); text-underline-offset: 3px; }
.esp-commune .esp-check { align-items: flex-start; gap: 10px; line-height: 1.45; }
.esp-commune .esp-check input { margin-top: 3px; }

/* ---- Écrans larges ---- */
@media screen and (max-width: 900px) {
  .esp-patient > *, .esp-seance > * { align-self: stretch; }
}
@media screen and (min-width: 700px) {
  .v3p-grille-2 { grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); }
  .v3p-grille-2b { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .v3p-situations { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .v3p-compte { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .v3p-compte > .v3p-large { grid-column: 1 / -1; }
  .esp-list .esp-item.v3p-rdv { grid-template-columns: 76px minmax(0, 1fr) auto; align-items: center; padding: 10px 14px 10px 10px; }
  .v3p-rdv > .esp-actions { grid-column: 3; justify-content: flex-end; max-width: 280px; }
  .v3p-date { min-height: 70px; }
  .v3p-quand { font-size: 44px; }
  .esp-commune .esp-title { font-size: 56px; }
  .esp-commune .esp-card { padding: 32px; }
  .esp-patient .esp-help-bar { bottom: 14px; padding-left: 22px; }
  .esp-patient .esp-haut, .esp-seance .esp-haut { bottom: 90px; right: 24px; }
}
@media screen and (min-width: 1100px) {
  .v3p-demande { grid-template-columns: minmax(0, 1fr) 340px; }
  .v3p-recap { position: sticky; top: 16px; }
}
@media screen and (max-width: 479px) {
  .esp-patient .esp-haut { bottom: 124px; }
  .esp-patient .esp-help-bar { font-size: 13px; padding: 8px 8px 8px 14px; border-radius: 22px; }
  .esp-patient .esp-help-bar .esp-btn-aide { min-height: 38px; padding: 6px 14px; font-size: 13px; }
  .esp-commune .esp-title { font-size: 40px; }
  .v3p-quand { font-size: 32px; }
  .esp-patient .esp-title, .esp-seance .esp-title { font-size: 38px; }
}
@media print {
  .esp-page.esp-commune::before, .esp-page.esp-commune::after { display: none; }
}
/* ---------------------------------------------------------------------------
 * V3, lot psy (22/10/2026) : écrans de l'espace psychologue, sur la base de espace-v3.css.
 * Tableau de bord (maquette validée par Nicolas), clôture, demandes, Mes suivis, disponibilités,
 * Ma fiche, Mes honoraires. Classes préfixées esp-psy-. Téléphone d'abord (390 px), puis ordinateur.
 * ------------------------------------------------------------------------- */

/* Aides des infobulles (aria-describedby) et texte pour lecteur d'écran seulement */
.esp-psy-aides { display: none !important; }
.esp-psy-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.esp-psy-separateur:has(+ a[hidden]) { display: none; }
.esp-psy .esp-main p { margin: 0; }
/* Un lien en bouton plein garde son texte blanc (la règle .esp-page a l'emporte sinon). */
.esp-psy .esp-main a.esp-btn:not(.esp-btn-outline):not(.esp-btn-danger):not(.esp-btn-rose) { color: #FFFFFF; }
.esp-psy .esp-main .esp-crise a.esp-btn { color: var(--esp-rouge); }
.esp-psy .esp-lead { text-wrap: pretty; }

/* P-08 : horloge sur l'entrée Demandes quand une demande attend */
.esp-nav-compteur.esp-psy-horloge { display: inline-flex; align-items: center; gap: 4px; padding: 0 8px 0 6px; }
.esp-nav-compteur.esp-psy-horloge::before { content: ""; width: 12px; height: 12px; background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23FFFFFF' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='9'/%3E%3Cpath d='M12 7v5l3 2'/%3E%3C/svg%3E") center / 12px 12px no-repeat; }

/* G-12 : noms des personnes suivies en bleu, nom du psychologue en prune */
.esp-psy-personne { color: var(--esp-bleu-d); font-weight: 500; }
.esp-psy-nom-psy { color: var(--esp-prune-d); }
h2.esp-psy-personne, .esp-subtitle.esp-psy-personne { font-weight: 400; }

/* En-tête de page : titre à gauche, résumé ou action à droite */
.esp-psy-entete { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-end; gap: 16px; }
.esp-psy-entete .esp-lead { max-width: 360px; }
.esp-main-wide .esp-psy-entete .esp-title { font-size: 66px; line-height: 1; }

/* Tuiles de chiffres */
.esp-psy-kpis .esp-kpi { text-decoration: none; min-height: 176px; gap: 8px; }
.esp-psy-kpis .esp-kpi-value { font-size: 72px; }
.esp-psy-kpi-sous { font-size: 13px; opacity: 0.9; }
.esp-psy-kpis .esp-psy-kpi-statut { font-size: 40px; line-height: 1.05; }

/* Alerte de crise : barre arrondie rouge brique */
.esp-psy-crise { justify-content: flex-start; gap: 16px; padding: 10px 10px 10px 14px; }
.esp-psy-crise-icone { flex: none; width: 40px; height: 40px; border-radius: 999px; background: rgba(251, 237, 232, 0.16) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23FBEDE8' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 3l10 18H2z'/%3E%3Cpath d='M12 10v5M12 18v.5'/%3E%3C/svg%3E") center / 18px 18px no-repeat; }
.esp-psy-crise-texte { flex: 1 1 320px; }
.esp-psy-crise .esp-btn { min-height: 40px; }

/* Tableau de bord : deux colonnes, agenda à gauche */
.esp-psy-colonnes { display: grid; grid-template-columns: minmax(0, 1.45fr) minmax(320px, 1fr); gap: 14px; align-items: start; }
.esp-psy-cote { gap: 14px; }
.esp-psy-agenda { border-radius: 30px; padding: 26px 22px 18px; gap: 12px; }
.esp-psy-prochain { padding: 10px 14px; border-radius: 16px; background-color: var(--esp-bleu-t); color: var(--esp-bleu-d); font-weight: 500; font-size: 14px; }
.esp-psy-lignes { gap: 8px; }
.esp-psy-ligne { display: flex; align-items: center; gap: 14px; padding: 8px; border-radius: 22px; background-color: var(--esp-surface-2); flex-wrap: wrap; }
.esp-psy-heure { flex: none; display: flex; align-items: center; justify-content: center; width: 76px; height: 54px; border-radius: 18px; background-color: var(--esp-t); color: var(--esp-d); font-family: var(--esp-mono); font-size: 14px; font-weight: 500; }
.esp-psy-ligne-texte { flex: 1 1 160px; min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.esp-psy-ligne .esp-psy-personne { font-size: 16px; }
.esp-psy-outil { white-space: nowrap; }
.esp-psy-ligne-compacte { padding: 8px 12px; }
.esp-psy-quand { flex: none; min-width: 170px; font-family: var(--esp-mono); font-size: 12px; color: var(--esp-gris-fonce); }
.esp-psy-semaine { margin-top: 6px; padding: 12px 6px 0; border-top: 1px solid var(--esp-filet); display: flex; flex-direction: column; gap: 10px; }
.esp-psy-semaine[open] > summary { margin-bottom: 10px; }
.esp-psy-vide { padding: 12px 16px; border-radius: 18px; background-color: rgba(255, 255, 255, 0.65); font-size: 14px; }
.esp-psy-agenda .esp-psy-vide { background-color: var(--esp-surface-2); color: var(--esp-gris); }

/* Blocs teintés : demandes à valider (vert clair), séances à clôturer (safran clair), prolongations */
.esp-psy-bloc { display: flex; flex-direction: column; gap: 10px; padding: 24px 20px; border-radius: 30px; }
.esp-psy-bloc .esp-subtitle { color: inherit; }
.esp-psy-bloc .esp-help { color: inherit; opacity: 0.85; }
.esp-psy-bloc-valider { background-color: var(--esp-vert-t); color: var(--esp-vert-d); }
.esp-psy-bloc-cloturer { background-color: var(--esp-safran-t); color: var(--esp-safran-d); }
.esp-psy-bloc-prolongations { background-color: var(--esp-violet-t); color: var(--esp-violet-d); }
.esp-psy-bloc-prolongations .esp-subtitle { font-size: 24px; }
.esp-psy-bulle { flex: none; display: flex; align-items: center; justify-content: center; min-width: 34px; height: 34px; padding: 0 8px; border-radius: 999px; background-color: var(--esp-vert); color: #FFFFFF; font-weight: 600; }
.esp-psy-explication { font-weight: 500; }
details.esp-psy-demande { border-radius: 22px; padding: 12px 16px; background-color: var(--esp-surface); color: var(--esp-encre); }
details.esp-psy-demande > summary { display: flex; align-items: center; gap: 12px; min-height: 34px; cursor: pointer; list-style: none; }
details.esp-psy-demande > summary::-webkit-details-marker { display: none; }
.esp-psy-initiales { flex: none; display: flex; align-items: center; justify-content: center; width: 34px; height: 34px; border-radius: 999px; background-color: var(--esp-t); color: var(--esp-d); font-size: 12px; font-weight: 600; }
.esp-psy-demande-nom { flex: 1; min-width: 0; }
.esp-psy-quand-court { flex: none; font-size: 12px; }
.esp-psy-demande-corps { display: flex; flex-direction: column; gap: 10px; padding: 10px 0 4px 46px; }
.esp-psy-lien-refus { min-height: 34px; padding: 0 8px; border: 0; background: none; color: var(--esp-terra-d); font: inherit; font-size: 13px; font-weight: 600; cursor: pointer; text-decoration: underline; text-underline-offset: 3px; }
.esp-psy-a-cloturer { display: flex; align-items: center; gap: 12px; padding: 12px 12px 12px 16px; border-radius: 22px; background-color: var(--esp-surface); color: var(--esp-encre); }
.esp-psy-btn-cloturer { flex: none; display: inline-flex; align-items: center; min-height: 36px; padding: 0 16px; border-radius: 999px; background-color: #EBC274; color: var(--esp-safran-d); font-size: 13px; font-weight: 600; text-decoration: none; white-space: nowrap; }
.esp-psy-btn-cloturer:hover { background-color: var(--esp-safran); color: var(--esp-safran-d); }
.esp-psy-bandeau-fiche, .esp-psy-bandeau-fiche-injecte { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; }

/* Clôture (P-05, P-06) */
.esp-psy-statuts { display: flex; flex-direction: column; gap: 8px; margin: 0; padding: 0; border: 0; }
.esp-psy-choix { display: flex; align-items: flex-start; gap: 12px; padding: 14px 16px; border-radius: 18px; background-color: var(--esp-surface-2); cursor: pointer; }
.esp-psy-choix input { margin-top: 4px; accent-color: var(--esp-vert); }
.esp-psy-choix > span { display: flex; flex-direction: column; gap: 2px; }
.esp-psy-choix:has(input:checked) { background-color: var(--esp-vert-t); box-shadow: inset 0 0 0 1.5px var(--esp-vert); }
.esp-psy-recap .esp-psy-personne { font-size: 18px; }
/* V4, visio Meet : état de l'enregistrement sous « Rejoindre la séance » ; bloc « Enregistrement et transcript » après clôture. */
.esp-psy-enregistrement { flex: 1 1 100%; margin: 0; padding: 0 8px 2px; text-align: right; }
.esp-psy-artefacts { gap: 12px; }
.esp-psy-artefacts-liens { flex-basis: 100%; }

/* Demandes (P-07, X-13) */
.esp-psy-carte-demande { gap: 12px; }
.esp-psy-form-visio { display: grid; grid-template-columns: minmax(160px, 220px) minmax(0, 1fr); gap: 12px; align-items: end; }
.esp-psy-form-visio .esp-help { grid-column: 1 / -1; }
.esp-psy-refus { gap: 12px; }

/* Mes suivis (P-09 à P-18) : liste à gauche, fiche à droite */
.esp-psy-suivis { display: grid; grid-template-columns: minmax(300px, 400px) minmax(0, 1fr); gap: 16px; align-items: start; }
.esp-psy-liste { gap: 14px; }
.esp-psy-detail { position: sticky; top: 16px; gap: 14px; scroll-margin-top: 90px; }
.esp-psy-retour-mobile { display: none; border: 0; cursor: pointer; font: inherit; font-size: 13px; }
.esp-psy-groupe { gap: 10px; padding: 20px; }
.esp-psy-groupe .esp-subtitle { font-size: 26px; }
.esp-psy-personne-ligne { width: 100%; border: 0; text-align: left; font: inherit; color: inherit; cursor: pointer; transition: background-color .15s ease; }
.esp-psy-personne-ligne:hover { background-color: var(--esp-fond); }
.esp-psy-personne-ligne .esp-item-main { min-width: 0; }
.esp-psy-personne-ligne[aria-current="true"] { background-color: var(--esp-bleu-t); box-shadow: inset 5px 0 0 var(--esp-bleu), inset 0 0 0 1.5px var(--esp-bleu); }
.esp-psy-personne-ligne[aria-current="true"] .esp-item-title { font-weight: 700; }
.esp-psy-attente { display: flex; flex-direction: column; gap: 8px; padding: 14px 16px; border-radius: 22px; background-color: var(--esp-surface); color: var(--esp-encre); }
.esp-psy-attente .esp-psy-form-visio { grid-template-columns: 1fr; }
.esp-psy-resume { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; margin: 0; }
.esp-psy-resume > div { display: flex; flex-direction: column; gap: 4px; padding: 14px; border-radius: 18px; }
.esp-psy-resume dt { font-size: 12px; font-weight: 600; }
.esp-psy-resume dd { margin: 0; font-family: var(--esp-serif); font-size: 20px; line-height: 1.15; overflow-wrap: anywhere; }
.esp-psy-contacts .esp-item { padding: 10px 14px; }
.esp-psy-titre-bloc { margin: 6px 0 0; font-family: var(--esp-serif); font-weight: 400; font-size: 24px; }
.esp-psy-proposer { display: flex; flex-direction: column; gap: 12px; padding: 16px; border-radius: 22px; }
.esp-psy-annick { padding: 12px 16px; border-radius: 18px; background-color: var(--esp-surface-2); }
.esp-psy-passes { padding: 12px 0 0; border-top: 1px solid var(--esp-filet); }
.esp-psy-passes[open] > summary { margin-bottom: 10px; }
.esp-psy-ajout { gap: 14px; box-shadow: inset 0 0 0 2px var(--esp-rose); }
.esp-psy-form-grille { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 12px; }

/* Double confirmation (O-02, O-17) */
.esp-psy-modale { position: fixed; inset: 0; z-index: 60; display: flex; align-items: center; justify-content: center; padding: 16px; background-color: rgba(28, 27, 25, 0.45); }
.esp-psy-modale-boite { width: 100%; max-width: 480px; box-shadow: var(--esp-ombre); }

/* Disponibilités (P-19) */
.esp-psy-dispo { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr); gap: 14px; align-items: start; }
.esp-psy-semaine-plages { display: flex; flex-direction: column; gap: 6px; }
.esp-psy-jour { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; min-height: 52px; padding: 8px 12px; border-radius: 18px; background-color: var(--esp-surface-2); }
.esp-psy-jour-nom { flex: none; width: 92px; font-weight: 600; }
.esp-psy-plage, .esp-psy-plage:hover { display: inline-flex; align-items: center; gap: 8px; min-height: 34px; padding: 4px 8px 4px 14px; background-color: var(--esp-violet-t); color: var(--esp-violet-d); box-shadow: none; cursor: pointer; font-weight: 500; }
.esp-psy-retirer { width: 18px; height: 18px; border-radius: 999px; background: rgba(255, 255, 255, 0.7) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%233A2F6B' stroke-width='2.4' stroke-linecap='round'%3E%3Cpath d='M7 7l10 10M17 7L7 17'/%3E%3C/svg%3E") center / 10px 10px no-repeat; }
.esp-psy-form-ligne { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 12px; }
.esp-psy-form-ligne .esp-field { flex: 1 1 130px; }
.esp-psy-absence { padding: 12px 14px; background-color: var(--esp-terra-t) !important; color: var(--esp-terra-d); }
.esp-psy-absence .esp-muted { color: inherit; opacity: 0.85; }
.esp-psy-barre-enregistrer { display: flex; justify-content: flex-start; }

/* Ma fiche (P-20 à P-24) */
.esp-psy-photo { display: flex; flex-wrap: wrap; align-items: center; gap: 20px; }
.esp-psy-avatar { width: 112px; height: 112px; }
.esp-psy-fichier { max-width: 100%; font: inherit; font-size: 14px; color: var(--esp-gris-fonce); }
.esp-psy-fichier::file-selector-button { margin-right: 12px; min-height: 38px; padding: 0 16px; border: 1px solid var(--esp-filet-fort); border-radius: 999px; background-color: var(--esp-surface); color: var(--esp-encre); font: inherit; font-weight: 600; cursor: pointer; }
.esp-psy-fichier::file-selector-button:hover { background-color: var(--esp-surface-2); }
/* Sans photo : rond teinté avec une silhouette, sans le texte de remplacement du navigateur. */
.esp-psy-avatar:not([src]), .esp-psy-avatar[src=""] { font-size: 0; color: transparent; background: var(--esp-prune-t) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%235C2647' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 12a4 4 0 1 0 0-8 4 4 0 0 0 0 8zM4 21c0-4 3.6-7 8-7s8 3 8 7'/%3E%3C/svg%3E") center / 48px 48px no-repeat; }
.esp-psy-reglages { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 16px; }
.esp-psy-lecture { display: flex; flex-direction: column; gap: 2px; padding: 12px 14px; border-radius: 14px; background-color: var(--esp-surface-2); }
.esp-psy-facturation > summary { flex-wrap: wrap; }
.esp-psy-facturation[open] > summary { margin-bottom: 8px; }

/* Mes honoraires (P-25 à P-30) */
.esp-psy-recap-table tbody tr { cursor: pointer; }
.esp-psy-recap-table tbody tr[aria-current="true"] .esp-td { background-color: var(--esp-safran-t); }
.esp-psy-recap-table tbody tr[aria-current="true"] .esp-td:first-child { border-radius: 14px 0 0 14px; }
.esp-psy-recap-table tbody tr[aria-current="true"] .esp-td:last-child { border-radius: 0 14px 14px 0; }

/* ---- Écrans moyens ---- */
@media screen and (max-width: 1180px) {
  .esp-psy-colonnes { grid-template-columns: minmax(0, 1fr); }
  .esp-psy-resume { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media screen and (max-width: 1000px) {
  .esp-psy-dispo { grid-template-columns: minmax(0, 1fr); }
}
@media screen and (max-width: 900px) {
  /* Barre de menu repliée : pleine largeur (le parent garde align-items: start), titre puis bouton « Menu » à droite. */
  .esp-psy > .esp-header { align-self: stretch; }
  .esp-psy > .esp-header .esp-logo { order: 1; }
  .esp-psy > .esp-header .esp-espace { order: 2; }
  .esp-psy > .esp-header .esp-menu-bouton { order: 3; }
  .esp-psy > .esp-header > :not(.esp-logo):not(.esp-espace):not(.esp-menu-bouton) { order: 4; }
  .esp-psy-suivis { grid-template-columns: minmax(0, 1fr); }
  .esp-psy-detail { position: static; }
  .esp-psy-retour-mobile { display: inline-flex; }
  .esp-main-wide .esp-psy-entete .esp-title { font-size: 44px; }
  .esp-psy-kpis .esp-kpi-value { font-size: 52px; }
  .esp-psy-crise { border-radius: 24px; }
}
/* ---- Téléphone (390 px) ---- */
@media screen and (max-width: 600px) {
  .esp-psy-form-visio { grid-template-columns: minmax(0, 1fr); }
  .esp-psy-entete { align-items: flex-start; }
  .esp-psy-entete > .esp-btn { width: 100%; }
}
@media screen and (max-width: 600px) {
  /* Mes honoraires : les tableaux deviennent des cartes empilées sur téléphone. */
  .esp-psy-recap-table thead, .esp-psy-lignes-table thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .esp-psy-recap-table, .esp-psy-recap-table tbody, .esp-psy-lignes-table, .esp-psy-lignes-table tbody { display: block; width: 100%; }
  .esp-psy-recap-table tbody tr, .esp-psy-lignes-table tbody tr { display: grid; gap: 4px 12px; margin-bottom: 8px; padding: 12px 14px; border-radius: 16px; background-color: var(--esp-surface-2); }
  .esp-psy-recap-table .esp-td, .esp-psy-lignes-table .esp-td, .esp-table tbody tr:hover .esp-td { padding: 0; border: 0; background: none !important; border-radius: 0 !important; }
  .esp-psy-recap-table tbody tr { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .esp-psy-recap-table tbody tr[aria-current="true"] { background-color: var(--esp-safran-t); box-shadow: inset 0 0 0 1.5px var(--esp-safran); }
  .esp-psy-recap-table .esp-td:nth-child(1) { grid-column: 1 / 3; font-size: 16px; }
  .esp-psy-recap-table .esp-td:nth-child(5) { grid-column: 3; grid-row: 1; justify-self: end; }
  .esp-psy-recap-table .esp-td:nth-child(2)::before { content: "Séances"; }
  .esp-psy-recap-table .esp-td:nth-child(3)::before { content: "Heures"; }
  .esp-psy-recap-table .esp-td:nth-child(4)::before { content: "Montant"; }
  .esp-psy-recap-table .esp-td:nth-child(n+2):nth-child(-n+4)::before { display: block; font-family: var(--esp-sans); font-size: 11px; color: var(--esp-gris); }
  .esp-psy-lignes-table tbody tr { grid-template-columns: minmax(0, 1fr) auto; }
  .esp-psy-lignes-table .esp-td:nth-child(1) { grid-column: 1 / -1; font-weight: 600; }
  .esp-psy-lignes-table .esp-td:nth-child(2) { grid-column: 1; grid-row: 2; }
  .esp-psy-lignes-table .esp-td:nth-child(5) { grid-column: 2; grid-row: 2; justify-self: end; font-weight: 600; }
  .esp-psy-lignes-table .esp-td:nth-child(3) { grid-column: 1; grid-row: 3; color: var(--esp-gris-fonce); }
  .esp-psy-lignes-table .esp-td:nth-child(4) { grid-column: 2; grid-row: 3; justify-self: end; }
}
@media screen and (max-width: 479px) {
  .esp-main-wide .esp-psy-entete .esp-title { font-size: 38px; }
  .esp-psy-kpis { grid-template-columns: 1fr 1fr; gap: 10px; }
  .esp-psy-kpis .esp-kpi { min-height: 128px; padding: 16px; border-radius: 22px; }
  .esp-psy-kpis .esp-kpi-value { font-size: 44px; }
  .esp-psy-kpis .esp-kpi-label { font-size: 13px; }
  .esp-psy-kpi-sous { font-size: 12px; }
  .esp-psy-kpis .esp-psy-kpi-statut { font-size: 26px; }
  .esp-psy-agenda { padding: 18px 14px 14px; border-radius: 24px; }
  .esp-psy-heure { width: 62px; height: 46px; font-size: 13px; border-radius: 14px; }
  .esp-psy-ligne { gap: 10px; }
  .esp-psy-ligne-texte { flex-basis: calc(100% - 80px); }
  .esp-psy-outil { margin-left: 72px; }
  .esp-psy-quand { min-width: 0; width: 100%; }
  .esp-psy-bloc { padding: 18px 14px; border-radius: 24px; }
  .esp-psy-demande-corps { padding-left: 0; }
  .esp-psy-resume dd { font-size: 19px; }
  .esp-psy-jour-nom { width: 100%; }
  .esp-psy-crise-texte { flex-basis: calc(100% - 60px); }
  .esp-psy-crise .esp-btn { width: 100%; }
  .esp-psy-a-cloturer { flex-wrap: wrap; }
  .esp-psy-btn-cloturer { margin-left: auto; }
}
