/* Espace client : AJOUTS du produit réel à la couche « es- » de la planche (espace.css, recopiée à l'identique).
   1. états que la planche ne dessine pas (chargement, bouton occupé, zone d'alerte vide, Google / Apple masqués par défaut) ;
   2. mode sombre (la planche est claire) : jetons sombres de pro.css (:root[data-theme="dark"]) + les couleurs codées en dur
      de vitrine.css / espace.css ramenées aux jetons. Aucune couleur hors charte. */

/* ---------- logos : version claire / sombre (logo-nav-sombre et calend-ia-sombre dérivés pour le sombre) */
body.public .es-sombre{display:none!important}
:root[data-theme="dark"] body.public .es-clair{display:none!important}
:root[data-theme="dark"] body.public .es-sombre{display:block!important}

/* ---------- états */
body.public .es-alerte-zone:empty{display:none}
body.public .es-alerte-zone > .note{margin:0}
body.public .es-charge{display:grid;gap:12px}
body.public .es-charge-barre{display:block;height:96px;border-radius:var(--r-xl);background:var(--surface);border:1px solid var(--ligne);position:relative;overflow:hidden}
body.public .es-charge-barre::after{content:"";position:absolute;inset:0;background:linear-gradient(90deg,transparent,var(--surface-2),transparent);transform:translateX(-100%);animation:es-luit 1.2s ease-in-out infinite}
@keyframes es-luit{to{transform:translateX(100%)}}
@media (prefers-reduced-motion:reduce){body.public .es-charge-barre::after{animation:none}}
body.public .btn.es-occupe{cursor:progress}
body.public.espace .btn.es-occupe[disabled]{opacity:.75;border-style:solid}
body.public .es-verrou{display:grid;gap:8px}
body.public .es-chargement{min-height:160px;align-content:center}
body.es-modale-ouverte{overflow:hidden}
body.public .es-entree-carte .es-alerte-zone + .es-form{margin-top:0}
/* Google / Apple : construits, affichés seulement quand le service annonce un fournisseur */
body.public .es-externes{display:grid;gap:8px}
body.public .es-externe{justify-content:center}
/* liste d'activité dans une fenêtre */
body.public .modale .es-mouvements li span{color:var(--encre)}
body.public .modale .es-mouvements b{color:var(--texte-2);font-weight:500;white-space:nowrap}
/* abonnements : séances restantes sans barre (jamais « sur N ») */
/* focus visible partout (clavier) */
body.public :where(a,button,input,select,textarea,summary):focus-visible{outline:3px solid var(--indigo-500);outline-offset:2px}
body.public .es-onglet:focus-visible,body.public .es-filtre:focus-visible,body.public .es-tab:focus-visible{outline-offset:-3px}

/* ---------- mode sombre */
:root[data-theme="dark"] body.public{--menthe-200:#1F5A43;--etoile:#FBBF24;--ombre-1:0 1px 2px rgba(0,0,0,.4);--ombre-carte:0 1px 2px rgba(0,0,0,.45);
  --ombre-survol:0 8px 20px -8px rgba(0,0,0,.6);--ombre-levee:0 12px 32px rgba(0,0,0,.5);--anneau:0 0 0 3px #818cf866}
:root[data-theme="dark"] body.public .v-barre{background:#0B1120db;border-bottom-color:var(--ligne)}
:root[data-theme="dark"] body.public .es-tabbar{background:#131C2Ff5;box-shadow:0 -8px 24px -16px #000}
:root[data-theme="dark"] body.public .es-barre-actions.fin{background:#0B1120f0}
:root[data-theme="dark"] body.public .es-et-ajout{background:#131C2F80}
:root[data-theme="dark"] body.public .es-filtre[aria-pressed="true"]{color:var(--fond)}
:root[data-theme="dark"] body.public .es-pas li.fait b{color:var(--fond)}
:root[data-theme="dark"] body.public .es-rond-ico.ambre{border-color:#5C4410}
:root[data-theme="dark"] body.public .es-b-ambre,:root[data-theme="dark"] body.public .badge.es-b-ambre{background:var(--ambre-fond);color:var(--ambre);border-color:#5C4410}
:root[data-theme="dark"] body.public .es-paliers li{background:var(--surface)}
:root[data-theme="dark"] body.public .es-paliers li.ok{border-color:#1F5A43;background:var(--menthe-fond)}
:root[data-theme="dark"] body.public .es-fetes{border-color:var(--rose-200);background:var(--degrade-doux)}
:root[data-theme="dark"] body.public .v-barre img.es-lea{box-shadow:0 0 0 2px var(--surface),0 0 0 3px #F472B6}
:root[data-theme="dark"] body.public .es-accueil-lea img{box-shadow:0 0 0 3px var(--surface),0 0 0 4px #F472B6}
:root[data-theme="dark"] body.public .note.info.alerte{border-color:#7F1D1D}
:root[data-theme="dark"] body.public .interrupteur span{box-shadow:inset 0 0 0 1px #94A3B8}
:root[data-theme="dark"] body.public .champ input:hover,:root[data-theme="dark"] body.public .champ select:hover{border-color:#64748B}
:root[data-theme="dark"] body.public .voile{background:#000000a6}
:root[data-theme="dark"] body.public .es-cit{color:var(--encre)}

/* ---------- très petits écrans (320 à 359 px, zoom 200 % compris) : rien ne déborde (WCAG 1.4.10) */
@media (max-width:359px){
  body.public .v-barre img.es-lea{display:none}
  body.public .v-barre img.es-logo-ci{width:80px;height:26px}
  body.public .v-barre img.es-logo-as{height:25px;width:82px}
  body.public .es-marque{gap:4px}
  body.public .es-table td{width:auto;padding-left:4px;padding-right:4px}
  body.public .es-table thead th{letter-spacing:.04em;white-space:nowrap}
  body.public .es-barre-actions.fin{flex-wrap:wrap}
  body.public .es-barre-actions.fin .btn{flex:1 1 auto}
}

/* ---------- revue impeccable (23:15) */
/* le titre d'écran reçoit le focus à chaque changement d'écran (lecteurs d'écran) : pas d'anneau visible sur lui */
body.public h1[tabindex="-1"]:focus,body.public h1[tabindex="-1"]:focus-visible,body.public main[tabindex="-1"]:focus{outline:none}
/* écart entre une alerte et ce qui la suit (A3 : 16 px comme la planche) */
body.public .es-alerte-zone:not(:empty) + *{margin-top:16px}
body.public .es-form > .es-alerte-zone:not(:empty) + *,body.public .modale-corps > .es-alerte-zone:not(:empty) + *{margin-top:0}
/* sombre : en-tête moins rouge, citation neutre, étape en cours lisible, lien destructif distinct du rose de marque */
:root[data-theme="dark"] body.public .es-cit{background:var(--surface-2)}
:root[data-theme="dark"] body.public .es-pas li{border-top-color:#3B4A63}
:root[data-theme="dark"] body.public .es-pas li.cours,:root[data-theme="dark"] body.public .es-pas li.fait{border-top-color:var(--rose)}
:root[data-theme="dark"] body.public .es-annuler,:root[data-theme="dark"] body.public .btn-3.es-danger{color:#FCA5A5}
:root[data-theme="dark"] body.public .tete-douce{background:linear-gradient(135deg,#221A2E,#1B2140);border-bottom-color:var(--ligne)}
body.public .es-alerte-zone > .note + .btn{margin-top:16px}

/* ---------- revue UI Finish-Gate (23:30) */
/* n°14 : la feuille garde son titre et sa croix en haut ; seul le corps défile */
body.public .modale{display:flex;flex-direction:column}
body.public .modale > form{display:flex;flex-direction:column;flex:1 1 auto;min-height:0;gap:0}
body.public .modale-tete,body.public .modale-pied{flex:0 0 auto}
body.public .modale-corps{flex:1 1 auto;min-height:0;overflow-y:auto}
/* n°17 : focus de départ sur le titre de la fenêtre, sans anneau */
body.public #modTitre:focus{outline:none}
/* n°25 : un numéro de téléphone ne se coupe jamais */
body.public .es-insecable{white-space:nowrap}
/* n°26 : pas de croix du navigateur dans le champ de recherche (la planche n'en a pas) */
body.public input[type="search"]::-webkit-search-cancel-button,body.public input[type="search"]::-webkit-search-decoration{-webkit-appearance:none;appearance:none}
/* n°27 : en sombre, case et rond non cochés blancs bordés comme la planche (pas « désactivés ») */
:root[data-theme="dark"] body.public .case input{color-scheme:light}
/* 2e passage N3 : rond sombre dessiné : non coché = anneau clair 2 px sur le fond ; coché = anneau rose et point rose */
:root[data-theme="dark"] body.public .es-radio input{-webkit-appearance:none;appearance:none;border:2px solid #CBD5E1;border-radius:50%;background:transparent;display:grid;place-content:center}
:root[data-theme="dark"] body.public .es-radio input::before{content:"";width:10px;height:10px;border-radius:50%;background:var(--rose);transform:scale(0)}
:root[data-theme="dark"] body.public .es-radio input:checked{border-color:var(--rose)}
:root[data-theme="dark"] body.public .es-radio input:checked::before{transform:scale(1)}
:root[data-theme="dark"] body.public .es-radio input:focus-visible{outline:3px solid var(--indigo-500, #818CF8);outline-offset:2px}
/* n°38 : numéro et pastille « Vérifié » sur une ligne */
body.public .es-donnee dd .chiffre{white-space:nowrap;font-variant-numeric:normal}
@media (min-width:360px){body.public .es-donnee dd:has(.chiffre):has(> .badge){flex-wrap:nowrap;column-gap:4px}}
body.public .es-donnee dd .badge{white-space:nowrap}
/* n°40 : interrupteur actif en sombre : rose plus soutenu, pastille blanche lisible (≥ 3:1) */
:root[data-theme="dark"] body.public .interrupteur input:checked + span{background:#DB2777}
body.public .modale-corps > .case{margin:0}
/* fenêtres ajoutées : export, conditions, effacement transmis */
body.public .es-choix-export{display:grid;gap:10px}
body.public .es-choix-export .btn{justify-content:flex-start}
body.public .es-texte-conditions{display:grid;gap:10px;color:var(--texte-2);line-height:1.55}
body.public .es-texte-conditions p{margin:0}
body.public .es-fait{display:inline-flex;align-items:center;gap:6px;color:var(--menthe, #047857);font-weight:700;font-size:.9rem;min-height:44px}
body.public .es-fait .ico{width:16px;height:16px}
/* 2e passage : zones vides sans écart de grille (N4, N7) ; lien d'effacement gras comme la planche (N6) */
body.public #etatLien:empty,body.public .es-zone-preuve:empty{display:none}
body.public .es-relies .es-lien-btn{font-weight:700}
/* P4 (4e passage) : une ligne sans bouton Modifier (Portable « À vérifier plus tard ») garde la hauteur des autres */
body.public .es-donnee-act{min-height:44px}
