/* ── Espace client — feuille partagée par /connexion et /compte ─────────────────────
   Portage de la maquette « Espace client v2 » (projet Claude Design) dans le système
   « Estampes » de la vitrine. Trois écarts assumés par rapport au fichier de maquette :

     — les polices sont AUTO-HÉBERGÉES, pas chargées chez Google. La page reste sans
       aucune requête externe, ce que le garde-fou de déploiement et la CSP exigent ;
     — les couleurs passent par les jetons de la vitrine plutôt que par des valeurs
       écrites en clair, pour que les deux moitiés du site vieillissent ensemble ;
     — les gravures de portail sont des JPEG opaques traités par --plate-filter, et non
       des PNG à alpha composés en mix-blend-mode. Même raison que presse-atelier.jpg :
       une trame fine sature la couche alpha et pèse cinq fois plus (5,7 Mo -> 815 Ko).

   Contrairement à index.html, monolithique, ces deux pages partagent ce fichier : trois
   exemplaires des mêmes jetons auraient divergé au premier réglage. Une requête de plus,
   autorisée par `style-src 'self'`.                                                    */

/* ── Polices ──────────────────────────────────────────────────────────────────────── */
@font-face {
  font-family: 'Instrument Sans';
  font-style: normal; font-weight: 400 700; font-display: swap;
  src: url('../fonts/instrumentsans-var.woff2') format('woff2');
}
/* ── Titres : Doyle Medium Italic ────────────────────────────────────────────────────
   Remplace Niconne depuis le 2026-08-10, pour que l'espace client porte la même face de
   titre que la home — Niconne n'y est plus déclarée du tout.
   Seule l'ITALIQUE est employée, comme sur la home : les règles de titre demandent donc
   `font-style: italic` en plus de la famille. La romaine est déclarée pour que la
   famille soit complète, mais aucun sélecteur ne l'appelle : elle n'est pas téléchargée.
   Les corps ont été relevés de 15 % en même temps — ils étaient calibrés pour une
   anglaise, qui rend petit pour son corps ; Doyle y paraissait timide.
   ⚠️ Fonte SOUS LICENCE (Sharp Type). Voir la section « Polices » du README. */
@font-face {
  font-family: 'Doyle Medium';
  font-style: normal; font-weight: 400; font-display: swap;
  src: url('../fonts/doyle-medium.woff2') format('woff2');
}
@font-face {
  font-family: 'Doyle Medium';
  font-style: italic; font-weight: 400; font-display: swap;
  src: url('../fonts/doyle-medium-italic.woff2') format('woff2');
}

/* ── Jetons ───────────────────────────────────────────────────────────────────────── */
:root {
  --idc-font-body: 'Instrument Sans', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --idc-font-script: 'Doyle Medium', Georgia, serif;
  --idc-or: #c6aa60;
  --idc-or-filet: rgba(198, 170, 96, .55);
}
:root, [data-theme="nuit"] {
  --bg: linear-gradient(160deg, #070b18 0%, #0d1430 55%, #080c1c 100%);
  --plate-filter: invert(1) grayscale(1) contrast(1.15) brightness(.95) sepia(.75) saturate(1.7) hue-rotate(-12deg);
  --text: #f4f0e8;
  --text-muted: rgba(244,240,232,.78);
  --line: rgba(244,240,232,.28);
  --line-faint: rgba(244,240,232,.12);
  --surface: rgba(244,240,232,.05);
  --surface-2: rgba(244,240,232,.028);
  --header-bg: rgba(7,11,24,.86);
  --cta-bg: #c6aa60;   --cta-text: #1a1a2d;
  --lien: #a9b8ee;
  /* Ocre et carmin : les deux encres d'alerte. Elles n'existaient pas dans la vitrine
     (l'accent rouge y est décoratif) — voir le brief design, §1. */
  --ocre: #e3b23c;     --ocre-encre: #f0d9a0;
  --carmin: #e0705a;   --carmin-encre: #f3b8ac;
  /* Le volet gauche de la connexion : un papier un ton au-dessus du fond. */
  --volet: rgba(244,240,232,.04);
  --cadre-or: #8a7440;
  /* Repris à l'identique de la home : le menu du compte est le MÊME composant des deux
     côtés, et il ne peut l'être que si sa pastille l'est aussi. ⚠️ Ce n'est pas
     --cta-bg : de nuit le bouton est or et l'avatar crème. */
  --avatar-bg: #f4f0e8;
  --avatar-glyph: #0b1024;
  /* Bordure des COMMANDES : --line, mesuré en tant que tel, tombe à 2,34:1 en nuit et
     1,59:1 en jour, sous les 3:1 de SC 1.4.11. Un jeton séparé plutôt que de relever
     --line, qui sert aussi de filet décoratif partout. */
  --line-ui: rgba(244,240,232,.36);
}
[data-theme="jour"] {
  --bg: linear-gradient(160deg, #faf7f0 0%, #efe8d9 55%, #f4f0e8 100%);
  --plate-filter: none;
  --text: #1a1a2d;
  --text-muted: rgba(26,26,45,.66);
  --line: rgba(26,26,45,.22);
  --line-faint: rgba(26,26,45,.10);
  --surface: rgba(26,26,45,.045);
  --surface-2: rgba(26,26,45,.025);
  --header-bg: rgba(250,247,240,.88);
  --cta-bg: #1a1a2d;   --cta-text: #f4f0e8;
  --lien: #303e75;
  --ocre: #7a5304;     --ocre-encre: #7a5304;
  --carmin: #b14434;   --carmin-encre: #b14434;
  /* Blanc pur, et non le crème de la page : le volet devient une feuille posée sur le
     papier. C'est aussi le fond que `multiply` retire le mieux — les gravures de portail
     sont des JPEG à fond blanc, la fusion les découpe ici sans le moindre reste. */
  --volet: #fff;
  --cadre-or: #a8894a;
  --avatar-bg: #1a1a2d;
  --avatar-glyph: #f4f0e8;
  --line-ui: rgba(26,26,45,.48);
}

/* ── Base ─────────────────────────────────────────────────────────────────────────── */
* { box-sizing: border-box; }
/* ⚠️ Sans cette ligne, tout élément que le script masque par `hidden` mais dont le CSS
   fixe un `display` reste VISIBLE — l'attribut ne pose qu'un `display:none` de feuille
   par défaut, que la moindre règle bat. Constaté aussitôt : le bandeau de paiement
   s'affichait sur l'écran nominal. */
[hidden] { display: none !important; }
html, body { margin: 0; padding: 0; background: #070b18; }
html[data-theme="jour"], [data-theme="jour"] body { background: #faf7f0; }
body {
  min-height: 100vh; min-height: 100dvh;
  background: var(--bg); background-attachment: fixed;
  font-family: var(--idc-font-body); color: var(--text);
}
a { color: var(--lien); }
/* Anneau à deux tons — même correctif que la home, pour le même défaut : l'or seul
   tombait à 2,11:1 sur le papier et 2,25:1 sur le volet blanc, contre 3:1 exigés
   (SC 1.4.11). Le trait porteur suit le thème, l'or reste en halo. */
:where(a, button, input, select, summary):focus-visible {
  outline: 2px solid var(--text);
  outline-offset: 3px;
  box-shadow: 0 0 0 4px var(--idc-or);
}

/* Étiquette : petites capitales espacées. Le motif de libellé de toute la vitrine. */
.etiq {
  font-size: 11px; font-weight: 600; letter-spacing: .16em;
  text-transform: uppercase; color: var(--text-muted);
}

/* ── En-tête ──────────────────────────────────────────────────────────────────────── */
.tete {
  display: flex; align-items: center; justify-content: space-between; gap: 20px;
  padding: 15px max(4vw, 24px);
  border-bottom: 1px solid var(--line-faint);
  background: var(--header-bg);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  position: sticky; top: 0; z-index: 5;
}
/* Le pictogramme d'étiquette précède le nom, comme sur la home. Il y était absent :
   les deux moitiés du site n'avaient pas la même marque. Ici la marque est un LIEN vers
   l'accueil (sur la home, elle ne mène nulle part puisqu'on y est déjà) — c'est la seule
   différence, et elle est voulue. */
.marque { display: inline-flex; align-items: center; gap: 12px; font-size: 13px; font-weight: 600; color: var(--text); text-decoration: none; }
.marque svg { display: block; flex: none; fill: currentColor; }
.marque span { color: var(--text-muted); }

/* ── Menu du compte ──────────────────────────────────────────────────────────────────
   Porté de la home, classes comprises : c'est le même composant, pas une imitation.
   Un <button> et non un lien — il ouvre un menu, il ne navigue pas ; c'est ce qui
   permet d'annoncer correctement aria-haspopup / aria-expanded.
   Il remplace un <span> « Se connecter » qui AVAIT L'AIR d'un contrôle sans en être un :
   ni cliquable, ni atteignable au clavier. */
.usermenu { position: relative; display: flex; align-items: center; }
.usermenu > .login { background: none; border: 0; padding: 0; cursor: pointer; font: inherit; }
.login { display: flex; align-items: center; color: var(--text); text-decoration: none; transition: opacity .18s ease; }
.login:hover { opacity: .8; }
.login .avatar {
  width: 28px; height: 28px; border-radius: 50%; flex: none;
  background: var(--avatar-bg); display: inline-flex; align-items: center; justify-content: center;
}
.login .avatar svg { display: block; fill: var(--avatar-glyph); }
.login .avatar .avatar-initiales {
  font-size: 11px; font-weight: 600; line-height: 1; letter-spacing: .04em;
  color: var(--avatar-glyph); text-transform: uppercase;
}
.login .avatar .avatar-initiales[hidden] { display: none; }
.usermenu .sheet {
  position: absolute; top: calc(100% + 12px); right: 0; min-width: 200px; z-index: 60;
  background: var(--header-bg); border: 1px solid var(--line); border-radius: 10px;
  padding: 6px; backdrop-filter: blur(10px); box-shadow: 0 12px 32px rgba(0,0,0,.22);
}
/* Masqué par l'attribut `hidden`, pas par l'opacité : un menu invisible mais toujours
   atteignable au clavier est un piège. */
.usermenu .sheet[hidden] { display: none; }
.usermenu .sheet a {
  display: block; padding: 9px 12px; border-radius: 7px; text-decoration: none;
  color: var(--text); font-size: 14px; line-height: 1.25; white-space: nowrap;
}
.usermenu .sheet a:hover, .usermenu .sheet a:focus-visible { background: var(--avatar-bg); color: var(--avatar-glyph); }
.usermenu .sheet hr { border: 0; border-top: 1px solid var(--line); margin: 6px 8px; }
.usermenu .who {
  margin: 0; padding: 5px 12px 9px; font-size: 12px; opacity: .62;
  max-width: 220px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.tete-outils { display: flex; align-items: center; gap: clamp(14px, 2.4vw, 34px); }
.tete-lien { text-decoration: none; transition: color .18s ease; }
.tete-lien:hover { color: var(--text); }
.tete-lien[aria-current="page"] { color: var(--text); }
.tete-sep { width: 1px; height: 20px; background: var(--line); flex: none; }

/* Bascule jour / nuit : reprise à l'identique de la vitrine. */
.bascule {
  display: inline-flex; align-items: center; padding: 5px 6px;
  background: transparent; border: 1px solid var(--line-ui); border-radius: 999px;
  cursor: pointer; color: var(--text); font: inherit;
}
.bascule:hover { opacity: .75; }
.bascule span { width: 22px; height: 22px; display: inline-flex; align-items: center; justify-content: center; }
.bascule svg { display: block; fill: currentColor; }
.bascule .lune { display: none; }
[data-theme="jour"] .bascule .soleil { display: none; }
[data-theme="jour"] .bascule .lune { display: inline-flex; }

/* L'icône utilisateur a deux états, et c'est une demande explicite du brief : déconnecté
   elle veut dire « se connecter » ; connecté elle porte l'identité. */
.usager { display: inline-flex; align-items: center; gap: 9px; color: var(--text-muted); text-decoration: none; font-size: 12.5px; }
.usager:hover { color: var(--text); }
.usager .initiales {
  width: 28px; height: 28px; flex: none; display: inline-flex; align-items: center; justify-content: center;
  background: var(--cta-bg); color: var(--cta-text);
  font-size: 10.5px; font-weight: 600; letter-spacing: .06em;
}

/* ── Conteneur ────────────────────────────────────────────────────────────────────── */
.page { padding: clamp(28px, 4vh, 44px) max(4vw, calc((100% - 1320px) / 2)) clamp(48px, 7vh, 72px); }

/* ── Boutons ──────────────────────────────────────────────────────────────────────── */
.bouton {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  width: 100%; min-height: 52px; padding: 14px 22px;
  border: 0; background: var(--cta-bg); color: var(--cta-text);
  font: inherit; font-size: 13px; font-weight: 600; letter-spacing: .1em; text-transform: uppercase;
  text-decoration: none; cursor: pointer; transition: opacity .18s ease;
}
.bouton:hover { opacity: .86; }
.bouton-ligne {
  background: transparent; color: var(--text); border: 1px solid var(--line-ui);
  font-size: 13.5px; font-weight: 400; letter-spacing: 0; text-transform: none; min-height: 48px;
  transition: border-color .18s ease;
}
.bouton-ligne:hover { border-color: var(--idc-or); opacity: 1; }

/* ── Champs ───────────────────────────────────────────────────────────────────────── */
.champ { display: block; margin-bottom: 20px; }
.champ-tete { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; margin-bottom: 8px; }
.champ label, .champ .etiq { display: block; margin-bottom: 8px; }
.champ-tete label { margin-bottom: 0; }
.champ input {
  width: 100%; height: 46px; padding: 0 14px;
  font: inherit; font-size: 14.5px; color: var(--text);
  background: var(--surface); border: 1px solid var(--line-ui); border-radius: 0;
}
.champ input::placeholder { color: var(--text-muted); }
.case { display: flex; align-items: center; gap: 9px; font-size: 13px; color: var(--text-muted); margin-bottom: 26px; }
.case input { width: 15px; height: 15px; margin: 0; accent-color: var(--idc-or); flex: none; }

/* Séparateur « ou », filets d'or de part et d'autre. */
.ou { display: flex; align-items: center; gap: 14px; margin: 28px 0 20px; }
.ou::before, .ou::after { content: ""; flex: 1; height: 1px; background: var(--idc-or-filet); }
.ou span { font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: var(--text-muted); }

/* ── Écran de connexion ───────────────────────────────────────────────────────────── */
.connexion { display: grid; grid-template-columns: 1fr 1fr; min-height: calc(100dvh - 59px); }
.connexion-volet {
  background: var(--volet); border-right: 1px solid var(--idc-or-filet);
  padding: clamp(32px, 5vh, 56px) clamp(24px, 4vw, 52px);
  display: flex; flex-direction: column; gap: 30px; justify-content: center;
}
/* La porte : une gravure par visite, changée toutes les sept secondes. Le filtre de
   thème la passe en crème la nuit — c'est le même traitement que toutes les planches. */
.porte { position: relative; flex: 1; min-height: 260px; }
/* ⚠️ Ces JPEG sont OPAQUES : sans fusion, leur fond blanc se voit en rectangle sur le
   volet. `multiply` le retire le jour ; la nuit, --plate-filter a d'abord inversé le
   blanc en noir, et c'est `screen` qui le retire. C'est le seul endroit du site où un
   mode de fusion est employé, et c'est ici l'opérateur juste : l'image est opaque, il
   n'y a pas d'alpha à simuler — le reproche fait aux modes de fusion ailleurs (voir
   coquille/README.md du dépôt control) ne porte pas. Un navigateur qui ne les
   appliquerait pas montrerait un rectangle terne, jamais une image illisible. */
.porte img {
  position: absolute; inset: 0; margin: auto;
  max-width: 100%; max-height: 100%; object-fit: contain;
  /* L'opacité vient APRÈS la fusion : `multiply` a déjà retiré le fond, ce qui reste à
     diluer est le trait lui-même. À .5 il devenait fantomatique sur le papier clair. */
  filter: var(--plate-filter); opacity: .78;
  mix-blend-mode: multiply;
  animation: porteParait 1.4s ease;
  pointer-events: none;
}
[data-theme="nuit"] .porte img { mix-blend-mode: screen; opacity: .5; }
@keyframes porteParait { from { opacity: 0; } }
.garanties { display: grid; grid-template-columns: repeat(3, 1fr); gap: 26px; align-items: start; }
.garanties div { display: flex; flex-direction: column; gap: 10px; align-items: flex-start; }
.garanties svg { flex: none; color: var(--text); }
.garanties span { font-size: 13px; line-height: 1.55; color: var(--text-muted); }

/* ⚠️ `align-items: center` n'est pas décoratif ici : dans un conteneur flex en colonne,
   `justify-content` ne règle que le vertical, et l'alignement horizontal reste sur
   `stretch`. Un enfant en `width:100%` plafonné par `max-width` s'étire alors jusqu'au
   plafond puis reste calé À GAUCHE, toute la fente tombant à droite. Invisible sur un
   grand écran où la fente est large et se lit comme une composition, très visible en
   1024 px de large — mesuré : 41 px à gauche contre 52 à droite. */
.connexion-form { padding: clamp(32px, 5vh, 56px) clamp(24px, 4vw, 52px); display: flex; flex-direction: column; justify-content: center; align-items: center; }
.connexion-form form, .connexion-form > div { width: 100%; max-width: 420px; }
.connexion h1 { margin: 0 0 6px; font-family: var(--idc-font-script); font-weight: 400; font-style: italic; font-size: 39px; line-height: 1.05; color: var(--text); }
.filet-court { height: 1px; width: 64px; background: var(--idc-or-filet); margin-bottom: 28px; }
.pied-form { margin: 24px 0 0; padding-top: 18px; border-top: 1px solid var(--line-faint); font-size: 12.5px; line-height: 1.6; color: var(--text-muted); }

/* ── Écran de gestion ─────────────────────────────────────────────────────────────── */
/* Le bloc d'entrée : cadre de tableau, plat doré puis réserve puis filet, sur un papier
   texturé. C'est le seul geste décoratif de l'écran — le brief demandait que l'entrée
   domine, et c'est elle qui doit le faire, pas les cartes. */
.entree { display: block; width: fit-content; max-width: 100%; margin: 0 auto clamp(28px, 4vh, 40px); border: 15px solid var(--cadre-or); text-decoration: none; }
/* ⚠️ `display: block` n'est pas une précaution, c'est le correctif : cet élément est un
   <span>, donc INLINE par défaut. Sur une boîte inline, les bordures gauche et droite
   occupent leur place dans le flux, mais celles du haut et du bas sont peintes sans
   contribuer à la hauteur — elles se calent sur les métriques de la police, pas sur la
   boîte de l'enfant. Résultat : une réserve régulière sur les côtés et écrasée en haut
   et en bas, ce qui déformait le cadre. */
.entree-reserve { display: block; border: 8px solid transparent; }
.entree-fond {
  border: 2px solid var(--idc-or-filet);
  background:
    linear-gradient(var(--entree-voile, rgba(245,241,231,.86)), var(--entree-voile, rgba(245,241,231,.86))),
    url('../img/texture-papier.jpg') center / 220px repeat,
    var(--surface);
  background-blend-mode: normal, multiply, normal;
  padding: clamp(22px, 4vw, 34px) clamp(24px, 5vw, 48px);
  display: flex; flex-direction: column; align-items: center;
}
[data-theme="nuit"] .entree-fond { --entree-voile: rgba(13,20,48,.82); }
.entree-adresse {
  font-size: clamp(20px, 3.6vw, 34px); font-weight: 500; line-height: 1.1; letter-spacing: -.01em;
  color: #1a1a2d; text-align: center;
  text-decoration: underline; text-underline-offset: 8px; text-decoration-thickness: 1px;
  text-decoration-color: rgba(198,170,96,.75);
  word-break: break-word;
}
[data-theme="nuit"] .entree-adresse { color: #f4f0e8; }
.entree-adresse small { font-size: .58em; letter-spacing: .06em; color: var(--text-muted); }
.entree:hover .entree-adresse { text-decoration-color: var(--idc-or); }

.filet { height: 1px; background: var(--idc-or-filet); margin-bottom: clamp(24px, 4vh, 34px); }

.cartes { display: grid; grid-template-columns: repeat(3, 1fr); gap: 26px; }
.carte-c {
  border: 1px solid var(--line); background: var(--surface-2);
  padding: 24px 26px; display: flex; flex-direction: column;
}
.carte-c > .etiq { margin-bottom: 16px; }
.carte-c p { margin: 0; font-size: 12.5px; line-height: 1.65; color: var(--text-muted); }
.carte-c .lien-bas { margin-top: auto; padding-top: 14px; font-size: 12.5px; }
.carte-c a { text-decoration: none; }
.carte-c a:hover { text-decoration: underline; }

/* Carte vitrine : la gravure occupe le haut, sans rembourrage. */
.carte-vitrine { padding: 0; background: var(--surface); overflow: hidden; }
.carte-vitrine .planche {
  height: 186px; display: grid; place-items: center;
  border-bottom: 1px solid var(--line); background: var(--surface-2);
}
.carte-vitrine .planche img { max-height: 140px; max-width: 78%; filter: var(--plate-filter); opacity: .9; }
.carte-vitrine .bas { padding: 18px 26px 22px; display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.carte-vitrine .bas strong { display: block; font-size: 14px; font-weight: 500; color: var(--text); margin-bottom: 5px; }
.voir { flex: none; display: inline-flex; align-items: center; gap: 6px; font-size: 11px; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: var(--lien); text-decoration: none; }

/* Mon usage : trois jauges. Le brief demande factuel, jamais anxiogène. */
.jauges { display: flex; flex-direction: column; gap: 14px; }
.jauge-tete { display: flex; justify-content: space-between; gap: 12px; font-size: 13.5px; color: var(--text); margin-bottom: 7px; }
.jauge-tete b { font-weight: 400; color: var(--text-muted); }
.jauge { height: 3px; background: var(--line-faint); }
.jauge i { display: block; height: 100%; background: var(--text); }
.jauge-ocre i { background: var(--ocre); }
.jauge-carmin i { background: var(--carmin); }

.formule { display: flex; align-items: center; gap: 12px; margin-bottom: 10px; }
.formule img { height: 44px; width: auto; filter: var(--plate-filter); }
.formule span { font-family: var(--idc-font-script); font-weight: 400; font-style: italic; font-size: 34.5px; line-height: 1; color: var(--text); }

.usagers { display: flex; flex-direction: column; gap: 11px; font-size: 13.5px; }
.usagers .ligne { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.usagers .ligne span { color: var(--text); }
.usagers .ligne em { font-style: normal; color: var(--text-muted); }
.usagers .attente { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; border-left: 2px solid var(--ocre); padding-left: 10px; }
.usagers .attente span { color: var(--text-muted); font-size: 13px; }
.usagers .attente b { display: block; font-weight: 400; font-size: 12px; color: var(--ocre-encre); }

.garde { display: flex; gap: 13px; align-items: flex-start; }
.garde svg { flex: none; margin-top: 2px; color: var(--text); }
.garde p.fort { margin: 0 0 6px; font-size: 14.5px; line-height: 1.5; color: var(--text); }

.liens-col { display: flex; flex-direction: column; gap: 8px; font-size: 12.5px; }
.liens-bas { margin-top: auto; padding-top: 14px; display: flex; flex-wrap: wrap; gap: 16px; font-size: 12px; }
.liens-bas a { color: var(--text-muted); text-decoration: none; }
.liens-bas a:hover { color: var(--text); }

/* ── Bandeaux d'état ──────────────────────────────────────────────────────────────── */
.bandeau-etat {
  display: flex; align-items: center; justify-content: space-between; gap: 18px; flex-wrap: wrap;
  padding: 14px max(4vw, 24px);
  border-bottom: 1px solid var(--ocre);
  background: color-mix(in srgb, var(--ocre) 12%, transparent);
  font-size: 13.5px; line-height: 1.5; color: var(--text);
}
.bandeau-etat a { flex: none; color: var(--text); font-weight: 600; }

.encart {
  border: 1px solid var(--line); background: var(--surface-2);
  padding: clamp(24px, 4vw, 36px); margin: 0 auto clamp(28px, 4vh, 40px); max-width: 760px;
}
.encart h2 { margin: 0 0 10px; font-family: var(--idc-font-script); font-weight: 400; font-style: italic; font-size: clamp(27.5px, 3.45vw, 37px); line-height: 1.15; color: var(--text); }
.encart p { margin: 0 0 14px; font-size: 14px; line-height: 1.65; color: var(--text-muted); }
.encart p:last-child { margin-bottom: 0; }
.encart-carmin { border-color: var(--carmin); }
.encart-carmin h2 { color: var(--carmin-encre); }

/* Progression réelle du provisionnement. */
.prov { height: 3px; background: var(--line-faint); margin: 6px 0 18px; }
.prov i { display: block; height: 100%; background: var(--idc-or); transition: width .3s linear; }
.etapes { margin: 0; padding: 0; list-style: none; font-size: 13.5px; line-height: 2; color: var(--text-muted); }
.etapes li::before { content: "· "; color: var(--idc-or); }
.etapes li.faite::before { content: "✓ "; }
.etapes li.faite { color: var(--text); }

.reference {
  display: inline-flex; align-items: center; gap: 12px;
  padding: 10px 14px; border: 1px solid var(--line); background: var(--surface);
  font-family: ui-monospace, Menlo, monospace; font-size: 13px; color: var(--text);
}
.reference button { background: transparent; border: 0; color: var(--lien); font: inherit; font-size: 12px; cursor: pointer; }

/* ── Voile d'ouverture ────────────────────────────────────────────────────────────── */
/* Deux à cinq secondes entre le clic et Providence : le brief insiste pour que le clic
   soit visiblement pris en compte. */
.voile {
  position: fixed; inset: 0; z-index: 20;
  display: none; flex-direction: column; align-items: center; justify-content: center; gap: 18px;
  background: var(--header-bg); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
  animation: voileParait .25s ease;
}
.voile[data-ouvert] { display: flex; }
.voile p { margin: 0; font-family: var(--idc-font-script); font-weight: 400; font-style: italic; font-size: clamp(30px, 4.6vw, 41px); color: var(--text); text-align: center; padding: 0 24px; }
.voile-barre { width: 200px; height: 2px; background: var(--line-faint); overflow: hidden; }
.voile-barre i { display: block; width: 25%; height: 100%; background: var(--idc-or); animation: voileBalaye 1.1s ease-in-out infinite; }
@keyframes voileParait { from { opacity: 0; } to { opacity: 1; } }
@keyframes voileBalaye { 0% { transform: translateX(-100%); } 100% { transform: translateX(500%); } }

/* ── Dialogues ────────────────────────────────────────────────────────────────────── */
/* Même construction que la modale de liste d'attente de la vitrine : <dialog> natif,
   donc piège de focus, Échap et restitution du focus sans une ligne de script. */
.dialogue {
  width: min(520px, calc(100vw - 24px)); max-height: calc(100dvh - 24px); overflow-y: auto;
  padding: clamp(24px, 5vw, 34px); border: 1px solid var(--idc-or);
  background: var(--bg); background-attachment: fixed; color: var(--text);
  color-scheme: dark;
}
[data-theme="jour"] .dialogue { color-scheme: light; }
.dialogue::backdrop { background: rgba(7, 11, 24, .55); backdrop-filter: blur(3px); }
.dialogue h2 { margin: 0 0 14px; font-family: var(--idc-font-script); font-weight: 400; font-style: italic; font-size: 31px; line-height: 1.15; color: var(--text); }
.dialogue p { margin: 0 0 14px; font-size: 13.5px; line-height: 1.65; color: var(--text-muted); }
.dialogue-actions { display: flex; gap: 12px; margin-top: 22px; }
.dialogue-actions .bouton { width: auto; flex: 1; }
.dialogue .listes { margin: 0 0 16px; padding: 0; list-style: none; font-size: 13.5px; color: var(--text-muted); }
.dialogue .listes li { display: flex; align-items: center; gap: 9px; padding: 5px 0; }

/* ── Petits écrans ────────────────────────────────────────────────────────────────── */
@media (max-width: 1080px) {
  .cartes { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 860px) {
  /* La planche et les garanties passent AU-DESSUS du formulaire : au téléphone, la
     promesse se lit d'abord, on saisit ensuite. */
  .connexion { grid-template-columns: 1fr; min-height: 0; }
  .connexion-volet { border-right: 0; border-bottom: 1px solid var(--idc-or-filet); }
  .porte { min-height: 190px; }
  .garanties { grid-template-columns: 1fr; gap: 16px; }
  .garanties div { flex-direction: row; align-items: flex-start; gap: 12px; }
  .connexion-form form, .connexion-form > div { max-width: none; }
  .cartes { grid-template-columns: 1fr; }
  .entree { border-width: 10px; }
  .entree-reserve { border-width: 6px; }
}
@media (max-width: 560px) {
  .tete { padding-left: 16px; padding-right: 16px; }
  .tete-outils { gap: 14px; }
  .usager .nom { display: none; }
}

/* ── Mouvement réduit ─────────────────────────────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  .porte img, .voile-barre i, .voile { animation: none !important; }
  .prov i { transition: none; }
}
