/* Ruela AI : feuille de style de l'espace client (app.ruela.fr). Direction « verre de nuit » : voir DIRECTION.md.
   Couleurs et polices de site-ruela/ruela.css (nuit, lanterne ambre, vert-de-gris du dôme de Lumi).
   Cartes de verre et graphiques inspirés de nos kits « verre v17 » et « en verre CRM » (structure, liseré, barres).
   CSP stricte de l'espace : aucun style="" ni <style> ni <script> en ligne ; aucune ressource externe.
   Les valeurs (jauge, barres) passent par des ATTRIBUTS SVG écrits par le serveur, jamais par du CSS en ligne. */

/* ---------- Polices (OFL, licences dans polices/) ---------- */
@font-face { font-family: 'Jost'; font-style: normal; font-weight: 300 800; font-display: swap; src: url('polices/jost-latin-wght-normal.woff2') format('woff2'); }
@font-face { font-family: 'Fraunces'; font-style: italic; font-weight: 500; font-display: swap; src: url('polices/fraunces-latin-500-italic.woff2') format('woff2'); }
@font-face { font-family: 'Inter'; font-style: normal; font-weight: 400; font-display: swap; src: url('polices/inter-latin-400-normal.woff2') format('woff2'); }
@font-face { font-family: 'Inter'; font-style: normal; font-weight: 500; font-display: swap; src: url('polices/inter-latin-500-normal.woff2') format('woff2'); }
@font-face { font-family: 'Inter'; font-style: normal; font-weight: 600; font-display: swap; src: url('polices/inter-latin-600-normal.woff2') format('woff2'); }
@font-face { font-family: 'Inter'; font-style: normal; font-weight: 700; font-display: swap; src: url('polices/inter-latin-700-normal.woff2') format('woff2'); }

/* ---------- Jetons ---------- */
:root {
  /* nuit (ruela.css) */
  --fond: #0A1230;
  --fond-2: #0D1738;
  --fond-3: #070D24;
  --surface: #131E45;
  --surface-2: #1A2753;
  --trait: #263463;
  /* texte : contraste AA sur toutes les surfaces de verre (texte-3 compris, 6:1 au moins) */
  --texte: #F6F1E7;
  --texte-2: #C3CAE0;
  --texte-3: #9BA6C7;
  /* lanterne */
  --ambre: #FFB54D;
  --ambre-clair: #FFD68C;
  --laiton: #D6A24A;
  /* vert-de-gris : #3F9A82 = dôme de Lumi (logo, décor) ; #5FCDB2 et #A6EBD8 = textes et états lisibles */
  --vdg: #5FCDB2;
  --vdg-clair: #A6EBD8;
  --vdg-lumi: #3F9A82;
  --vdg-fonce: #2B7360;
  --corail: #FF8E76;
  --corail-clair: #FFC2B3;
  --encre: #0A1230; /* texte sur un fond clair (bouton ambre, vert-de-gris) */
  --degrade: linear-gradient(100deg, #FFBE55 0%, #FFD991 50%, #A9E8D2 100%);
  --degrade-ambre: linear-gradient(140deg, #FFE0A3 0%, #FFB54D 100%);
  /* verre de nuit */
  --verre-fond: linear-gradient(155deg, rgba(255, 255, 255, .085), rgba(255, 255, 255, .02) 55%), rgba(16, 26, 62, .68);
  --verre-flou: 22px;
  --verre-lisere: linear-gradient(150deg, rgba(255, 255, 255, .36) 0%, rgba(255, 255, 255, .08) 28%, rgba(255, 255, 255, .03) 60%, rgba(255, 255, 255, .15) 100%);
  --verre-ombre: 0 30px 60px -32px rgba(1, 4, 16, .95), 0 12px 26px -18px rgba(1, 4, 16, .8);
  --interne: rgba(255, 255, 255, .045);
  --interne-2: rgba(255, 255, 255, .085);
  --filet: rgba(255, 255, 255, .09);
  --filet-2: rgba(255, 255, 255, .17);
  /* formes */
  --r-carte: 26px;
  --r-moyen: 18px;
  --r-petit: 12px;
  --r-pilule: 999px;
  /* polices */
  --titre: 'Jost', 'Avenir Next', 'Segoe UI', system-ui, sans-serif;
  --texte-police: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --accent-police: 'Fraunces', Georgia, 'Times New Roman', serif;
  /* mise en page */
  --gouttiere: 16px;
  --largeur-nav: 248px;
  --hauteur-barre-bas: 72px;
  color-scheme: dark;
}
@supports (background: linear-gradient(in oklab, red, blue)) {
  :root { --degrade: linear-gradient(100deg in oklab, #FFBE55 0%, #FFD991 50%, #A9E8D2 100%); }
}
@media (min-width: 640px) { :root { --gouttiere: 24px; } }
@media (max-width: 639px) { :root { --verre-flou: 16px; --r-carte: 22px; } }

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; background: var(--fond); scroll-padding-top: 24px; }
body {
  position: relative; margin: 0; min-height: 100vh;
  font-family: var(--texte-police); font-size: 1rem; line-height: 1.55; color: var(--texte);
  background: var(--fond); overflow-x: clip; -webkit-font-smoothing: antialiased;
}
/* le ciel de nuit : lueur de la lanterne en haut à droite, vert-de-gris en bas à gauche, grain de points.
   Calque fixe (pas de background-attachment: fixed, lent sur téléphone). */
body::before {
  content: ''; position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background:
    radial-gradient(52% 46% at 88% -4%, rgba(255, 181, 77, .17), transparent 72%),
    radial-gradient(40% 40% at 58% 46%, rgba(255, 181, 77, .05), transparent 70%),
    radial-gradient(46% 50% at -6% 104%, rgba(95, 205, 178, .11), transparent 72%),
    radial-gradient(circle, rgba(195, 202, 224, .075) 1px, transparent 1.4px) 0 0 / 22px 22px,
    linear-gradient(180deg, #0A1230 0%, #0C1638 55%, #0A1230 100%);
}
img { max-width: 100%; height: auto; display: block; }
[hidden] { display: none !important; }
h1, h2, h3 { font-family: var(--titre); font-weight: 600; line-height: 1.12; margin: 0; letter-spacing: -0.015em; }
p, ul, ol, dl, dd, figure { margin: 0; }
ul, ol { padding: 0; }
a { color: var(--ambre-clair); text-underline-offset: 3px; }
a:hover { color: #FFE6B8; }
:focus-visible { outline: 3px solid var(--ambre-clair); outline-offset: 3px; border-radius: 8px; }
::selection { background: rgba(255, 181, 77, .35); color: #fff; }
svg { flex-shrink: 0; }
.sr-only { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.lien-evitement { position: absolute; left: 12px; top: -80px; z-index: 100; padding: 12px 18px; border-radius: 12px; background: var(--texte); color: var(--fond); font-weight: 600; text-decoration: none; }
.lien-evitement:focus { top: 12px; }
.insecable { white-space: nowrap; }
.chiffre { font-variant-numeric: tabular-nums; }
code { padding: 1px 6px; border-radius: 6px; font-size: .9em; background: rgba(255, 255, 255, .08); }

/* Icônes (sprite assets/icones.svg) : le trait suit la couleur du texte */
.ic { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.ic-petite { width: 18px; height: 18px; }
.ic-grande { width: 26px; height: 26px; }

/* =====================================================================
   Verre : la carte de base
   ===================================================================== */
.verre {
  position: relative; isolation: isolate; min-width: 0;
  border-radius: var(--r-carte); border: 1px solid transparent; /* bord visible en mode « couleurs forcées » */
  background: var(--verre-fond);
  -webkit-backdrop-filter: blur(var(--verre-flou)) saturate(150%);
  backdrop-filter: blur(var(--verre-flou)) saturate(150%);
  box-shadow: var(--verre-ombre), inset 0 1px 0 rgba(255, 255, 255, .1);
}
/* liseré brillant en haut à gauche, qui s'éteint autour de la carte */
.verre::before {
  content: ''; position: absolute; inset: -1px; z-index: -1; border-radius: inherit; padding: 1px; pointer-events: none;
  background: var(--verre-lisere);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor; mask-composite: exclude;
}
/* reflet doux dans le coin */
.verre::after {
  content: ''; position: absolute; inset: 0; z-index: -1; border-radius: inherit; pointer-events: none;
  background: radial-gradient(120% 70% at 0% 0%, rgba(255, 255, 255, .06), transparent 60%);
}
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  .verre { background: #141F49; }
}
/* teintes : ambre (l'action du moment), vert-de-gris (fait, validé), plat (verre dans du verre : sans second flou) */
.verre-ambre {
  background:
    radial-gradient(70% 120% at 100% 100%, rgba(255, 181, 77, .26), transparent 62%),
    linear-gradient(150deg, rgba(255, 214, 140, .14), rgba(255, 181, 77, .03) 55%),
    rgba(20, 26, 60, .74);
  box-shadow: var(--verre-ombre), inset 0 1px 0 rgba(255, 233, 196, .22), 0 0 0 1px rgba(255, 214, 140, .14), 0 30px 80px -40px rgba(255, 170, 60, .55);
}
.verre-vdg {
  background: linear-gradient(150deg, rgba(95, 205, 178, .16), rgba(95, 205, 178, .03) 60%), rgba(14, 30, 58, .72);
}
.verre-plat { -webkit-backdrop-filter: none; backdrop-filter: none; background: var(--interne); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .06); }

/* Carte : intérieur */
/* .carte et .conteneur sont des conteneurs de requête : le fil, l'anneau… se mettent en forme selon leur largeur */
.carte { container-type: inline-size; display: flex; flex-direction: column; gap: 18px; padding: 20px; }
.conteneur { container-type: inline-size; }
@media (min-width: 640px) { .carte { padding: 24px; } }
.carte-tete { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.carte-tete > .lien-fleche { margin: -9px -8px 0 0; }
.carte-titre { display: flex; align-items: center; gap: 10px; font-size: 1.2rem; }
.carte-titre .ic { color: var(--ambre-clair); }
.carte-sous-titre { margin-top: 4px; font-size: .9375rem; color: var(--texte-2); }
.carte-pied { font-size: .875rem; color: var(--texte-3); }

/* Surtitre avec la petite flamme de la lanterne */
.surtitre { display: inline-flex; align-items: center; gap: 10px; font-size: .8125rem; font-weight: 700; letter-spacing: .09em; text-transform: uppercase; color: var(--ambre-clair); }
.flamme { width: 9px; height: 9px; flex: none; border-radius: 50%; background: var(--ambre); box-shadow: 0 0 0 4px rgba(255, 181, 77, .18), 0 0 14px rgba(255, 181, 77, .9); }
.flamme-vdg { background: var(--vdg); box-shadow: 0 0 0 4px rgba(95, 205, 178, .16), 0 0 14px rgba(95, 205, 178, .8); }

/* =====================================================================
   Cadre : barre latérale (ordinateur) qui devient la barre du bas (téléphone)
   ===================================================================== */
.entete-mobile { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px var(--gouttiere) 0; }
.marque { display: inline-flex; align-items: center; gap: 10px; min-height: 44px; color: var(--texte); text-decoration: none; }
.marque:hover { color: var(--texte); }
.marque img { width: 28px; height: auto; filter: drop-shadow(0 0 10px rgba(255, 181, 77, .55)); }
.marque-nom { font: 600 1.28rem/1 var(--titre); letter-spacing: -0.01em; }
.marque-nom span { font-weight: 500; color: var(--ambre-clair); }
.marque-espace { display: block; margin-top: 3px; font: 500 .8125rem/1 var(--texte-police); letter-spacing: 0; color: var(--texte-3); }

.cadre-nav {
  position: fixed; z-index: 40; left: 10px; right: 10px; bottom: calc(10px + env(safe-area-inset-bottom));
  padding: 6px; border-radius: 26px;
}
.cadre-nav .marque, .cadre-nav .commerce, .cadre-nav .commerce-choix { display: none; }
.nav ul { list-style: none; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 2px; }
.nav-lien {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
  min-height: 60px; padding: 4px 2px; border-radius: 20px;
  font: 600 .75rem/1.1 var(--texte-police); color: var(--texte-2); text-decoration: none; text-align: center;
  transition: color .2s ease, background-color .2s ease;
}
.nav-lien:hover { color: var(--texte); }
.nav-icone { display: grid; place-items: center; width: 44px; height: 32px; border-radius: var(--r-pilule); transition: background-color .2s ease, box-shadow .2s ease; }
.nav-lien[aria-current="page"] { color: var(--texte); }
.nav-lien[aria-current="page"] .nav-icone {
  color: var(--encre); background: var(--degrade-ambre);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .6), 0 6px 18px -6px rgba(255, 181, 77, .85);
}
.nav-texte-long { display: none; }
/* téléphone et tablette : la barre du bas est presque opaque (aucun texte lisible au travers), et un fondu de nuit
   cache ce qui défile sous elle et dans la marge du bas */
@media (max-width: 1023px) {
  .cadre-nav {
    background: linear-gradient(155deg, rgba(255, 255, 255, .07), rgba(255, 255, 255, .02) 55%), rgba(11, 19, 50, .94);
    -webkit-backdrop-filter: blur(28px) saturate(150%); backdrop-filter: blur(28px) saturate(150%);
  }
  body::after {
    content: ''; position: fixed; z-index: 39; left: 0; right: 0; bottom: 0; pointer-events: none;
    height: calc(var(--hauteur-barre-bas) + 22px + env(safe-area-inset-bottom));
    background: linear-gradient(180deg, rgba(10, 18, 48, 0) 0%, rgba(10, 18, 48, .92) 38%, var(--fond) 70%);
  }
}
/* très petit téléphone (moins de 340 px) : la barre tient dans l'écran */
@media (max-width: 339px) {
  .cadre-nav { left: 6px; right: 6px; padding: 5px; }
  .nav ul { gap: 0; }
  .nav-lien { min-width: 0; padding-inline: 0; }
  .nav-icone { width: 40px; }
  .nav-texte-court { max-width: 100%; overflow-wrap: anywhere; }
}

/* ordinateur : barre latérale de verre, pleine hauteur */
@media (min-width: 1024px) {
  .entete-mobile { display: none; }
  .cadre-nav {
    top: 16px; bottom: 16px; left: 16px; right: auto; width: var(--largeur-nav);
    display: flex; flex-direction: column; gap: 22px; padding: 22px 14px 14px; border-radius: 28px;
  }
  .cadre-nav .marque { display: inline-flex; padding: 0 8px; }
  .nav ul { display: flex; flex-direction: column; gap: 4px; }
  .nav-lien {
    flex-direction: row; justify-content: flex-start; gap: 12px; min-height: 52px; padding: 0 12px 0 6px;
    border-radius: 16px; font: 500 1rem/1.2 var(--texte-police);
  }
  .nav-lien:hover { background: rgba(255, 255, 255, .05); }
  .nav-icone { width: 40px; height: 40px; border-radius: 13px; background: rgba(255, 255, 255, .05); box-shadow: inset 0 0 0 1px var(--filet); }
  .nav-lien[aria-current="page"] {
    background: linear-gradient(90deg, rgba(255, 181, 77, .17), rgba(255, 181, 77, .03));
    box-shadow: inset 0 0 0 1px rgba(255, 214, 140, .2); font-weight: 600;
  }
  .nav-texte-long { display: inline; }
  .nav-texte-court { display: none; }
  /* le commerce, en bas de la barre */
  .cadre-nav .commerce { display: flex; margin-top: auto; }
  .cadre-nav .commerce-choix { display: block; margin-top: auto; }
  .cadre-nav .commerce-choix > .commerce { margin-top: 0; }
}

/* Carte du commerce (barre latérale ; sélecteur Ultimate à 2 commerces : même carte en bouton) */
.commerce { align-items: center; gap: 12px; padding: 12px; border-radius: var(--r-moyen); background: var(--interne); box-shadow: inset 0 0 0 1px var(--filet); }
.commerce-initiales {
  display: grid; place-items: center; flex: none; width: 44px; height: 44px; border-radius: 14px;
  font: 600 1rem/1 var(--titre); color: var(--encre); background: var(--degrade-ambre);
  box-shadow: 0 0 18px -4px rgba(255, 181, 77, .7);
}
.commerce-texte { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.commerce-nom { font-weight: 600; font-size: .95rem; line-height: 1.25; }
.commerce-formule { font-size: .8125rem; color: var(--texte-2); }

/* Sélecteur de commerce (Ultimate à 2 commerces, spec §8.0 et §8.9) : la carte du commerce devient un <details>,
   sans JavaScript. Téléphone : en haut à droite (.entete-mobile), la liste s'ouvre vers le bas ;
   ordinateur : en bas de la barre latérale, la liste s'ouvre vers le haut. Le commerce affiché a aria-current. */
.commerce-choix { position: relative; }
.commerce-choix > summary { list-style: none; cursor: pointer; }
.commerce-choix > summary::-webkit-details-marker { display: none; }
.commerce-choix > summary.commerce { display: flex; }
.commerce-choix > summary:hover { background: var(--interne-2); }
.commerce-choix > summary .ic-chevron { margin-left: auto; color: var(--texte-3); transition: rotate .2s ease; }
.commerce-choix[open] > summary .ic-chevron { rotate: 180deg; }
.commerce-liste {
  position: absolute; z-index: 45; left: 0; right: 0; bottom: calc(100% + 8px); display: grid; gap: 4px; padding: 6px;
  list-style: none; border-radius: var(--r-moyen); background: #16214C;
  box-shadow: inset 0 0 0 1px var(--filet-2), 0 24px 40px -18px rgba(1, 4, 16, .95);
}
.commerce-liste a {
  display: flex; align-items: center; gap: 12px; min-height: 52px; padding: 6px 10px 6px 6px; border-radius: 13px;
  color: var(--texte); text-decoration: none; font-weight: 600; font-size: .9375rem; line-height: 1.25;
}
.commerce-liste a:hover { color: var(--texte); background: rgba(255, 255, 255, .06); }
.commerce-liste a[aria-current="true"] { background: rgba(255, 181, 77, .1); box-shadow: inset 0 0 0 1px rgba(255, 214, 140, .3); }
.commerce-liste .commerce-initiales { width: 38px; height: 38px; border-radius: 12px; font-size: .875rem; }
.commerce-liste .initiales-2 { background: linear-gradient(140deg, #CFF5EA 0%, #5FCDB2 100%); box-shadow: 0 0 18px -4px rgba(95, 205, 178, .7); }
.commerce-liste .ic { margin-left: auto; color: var(--ambre-clair); }
/* téléphone : version compacte dans l'en-tête */
.entete-mobile .commerce-choix > summary.commerce { gap: 8px; min-height: 44px; padding: 4px 10px 4px 4px; border-radius: var(--r-pilule); }
.entete-mobile .commerce-choix .commerce-initiales { width: 36px; height: 36px; border-radius: 50%; font-size: .8125rem; }
.entete-mobile .commerce-choix .commerce-nom { max-width: 9.5rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: .875rem; }
.entete-mobile .commerce-liste { left: auto; right: 0; bottom: auto; top: calc(100% + 8px); width: min(300px, calc(100vw - 2 * var(--gouttiere))); }
@media (prefers-reduced-motion: reduce) { .commerce-choix > summary .ic-chevron { transition: none; } }

/* Zone de contenu */
.contenu { padding: 18px var(--gouttiere) 28px; }
.pied { padding: 8px var(--gouttiere) calc(var(--hauteur-barre-bas) + 34px + env(safe-area-inset-bottom)); }
@media (min-width: 1024px) {
  .contenu { margin-left: calc(var(--largeur-nav) + 32px); padding: 30px 40px 28px 8px; max-width: calc(1240px + var(--largeur-nav)); }
  .pied { margin-left: calc(var(--largeur-nav) + 32px); padding: 4px 40px 32px 8px; max-width: calc(1240px + var(--largeur-nav)); }
}

/* En-tête de page : date, « Bonjour » + nom du commerce */
.page-tete { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 10px 16px; margin-bottom: 20px; }
.page-surtitre { margin-bottom: 6px; font-size: .9375rem; font-weight: 500; color: var(--texte-2); }
.page-tete h1 { font-size: clamp(1.85rem, 1.3rem + 1.9vw, 2.6rem); letter-spacing: -0.025em; text-wrap: balance; }
.page-tete h1 em { font-family: var(--accent-police); font-style: italic; font-weight: 500; letter-spacing: -0.01em; color: var(--ambre-clair); text-shadow: 0 0 30px rgba(255, 181, 77, .35); }
.page-chapo { max-width: 46rem; margin-top: 8px; color: var(--texte-2); text-wrap: pretty; }
@media (min-width: 1024px) { .page-tete { margin-bottom: 24px; } }

/* Marque « exemple » des maquettes (données d'un commerce fictif) */
.badge-exemple {
  display: inline-flex; align-items: center; gap: 6px; padding: 4px 11px; border-radius: 9px;
  font-size: .8125rem; font-weight: 600; line-height: 1.3; color: #FFE3B3;
  background: rgba(255, 181, 77, .1); border: 1px dashed rgba(255, 181, 77, .55); white-space: nowrap;
}
@media (max-width: 379px) { .badge-exemple { max-width: 100%; white-space: normal; } }

/* =====================================================================
   Boutons et liens (toute cible fait 44 px au moins)
   ===================================================================== */
.bouton {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 48px; padding: 0 22px; border-radius: var(--r-pilule); border: 1px solid transparent;
  font: 600 1rem/1.2 var(--texte-police); text-decoration: none; text-align: center; cursor: pointer;
  color: var(--texte); background: transparent;
  transition: transform .2s ease, box-shadow .2s ease, background-color .2s ease, filter .2s ease;
}
.bouton:hover { transform: translateY(-1px); }
.bouton .ic { width: 20px; height: 20px; }
/* l'action principale de l'écran (une seule par écran sur téléphone) */
.bouton-principal {
  color: var(--encre); background: var(--degrade);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .55), 0 14px 34px -14px rgba(255, 181, 77, .75), 0 0 0 1px rgba(255, 214, 140, .35);
}
.bouton-principal:hover { color: var(--encre); filter: brightness(1.05) saturate(1.05); }
.bouton-principal .ic { transition: transform .2s ease; }
.bouton-principal:hover .ic-fleche { transform: translateX(3px); }
/* secondaire : verre clair */
.bouton-verre { color: var(--texte); background: rgba(255, 255, 255, .07); border-color: rgba(255, 255, 255, .2); }
.bouton-verre:hover { color: var(--texte); background: rgba(255, 255, 255, .12); border-color: rgba(255, 255, 255, .32); }
/* « C'est bon » : vert-de-gris plein */
.bouton-vdg { color: var(--encre); background: var(--vdg); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .45), 0 12px 28px -14px rgba(95, 205, 178, .8); }
.bouton-vdg:hover { color: var(--encre); filter: brightness(1.06); }
/* sur une bande colorée (bandeau) */
.bouton-clair { color: var(--fond); background: var(--texte); }
.bouton-clair:hover { color: var(--fond); background: #fff; }
/* action qui coûte ou qui arrête (« Demander l'arrêt ») : contour corail, jamais plein */
.bouton-corail { color: var(--corail-clair); background: rgba(255, 142, 118, .08); border-color: rgba(255, 142, 118, .5); }
.bouton-corail:hover { color: #FFD9CF; background: rgba(255, 142, 118, .14); }
.bouton-petit { min-height: 44px; padding: 0 16px; font-size: .9375rem; }
.bouton-plein { width: 100%; }
.bouton[aria-disabled="true"], .bouton:disabled { opacity: .5; cursor: not-allowed; transform: none; filter: none; }
/* bouton rond à icône seule (toujours un aria-label) */
.bouton-rond { width: 44px; min-height: 44px; padding: 0; border-radius: 50%; color: var(--texte); background: rgba(255, 255, 255, .07); border-color: rgba(255, 255, 255, .18); }
.bouton-rond:hover { background: rgba(255, 255, 255, .13); }
.groupe-boutons { display: flex; flex-wrap: wrap; gap: 10px; }
@media (prefers-reduced-motion: reduce) { .bouton, .bouton .ic { transition: none; } .bouton:hover { transform: none; } }

/* lien « Tout voir → » en tête de carte */
.lien-fleche {
  display: inline-flex; align-items: center; gap: 6px; min-height: 44px; padding: 0 4px 0 12px; border-radius: var(--r-pilule);
  font-size: .9375rem; font-weight: 600; color: var(--texte-2); text-decoration: none; white-space: nowrap;
}
.lien-fleche:hover { color: var(--texte); background: rgba(255, 255, 255, .06); }
.lien-fleche .ic { width: 18px; height: 18px; }

/* =====================================================================
   Étiquettes d'état (non cliquables)
   ===================================================================== */
.etiquette {
  display: inline-flex; align-items: center; gap: 6px; padding: 4px 11px 4px 9px; border-radius: var(--r-pilule);
  font-size: .8125rem; font-weight: 600; line-height: 1.3; white-space: nowrap;
  color: var(--texte-2); background: rgba(255, 255, 255, .06); border: 1px solid var(--filet-2);
}
.etiquette .ic { width: 15px; height: 15px; stroke-width: 2.2; }
/* « À relire » = à vous de jouer : contour ambre (non rempli : seul « Prêt à publier » est allumé) */
.etiquette-relire { color: var(--ambre-clair); background: rgba(255, 181, 77, .04); border-color: rgba(255, 214, 140, .5); }
.etiquette-pret { color: var(--ambre-clair); background: rgba(255, 181, 77, .12); border-color: rgba(255, 181, 77, .42); }
.etiquette-publie { color: var(--vdg-clair); background: rgba(95, 205, 178, .12); border-color: rgba(95, 205, 178, .42); }
.etiquette-retouche { color: var(--corail-clair); background: rgba(255, 142, 118, .1); border-color: rgba(255, 142, 118, .42); }
.etiquette-plus-tard { color: var(--texte-3); border-style: dashed; }
.etiquette-formule { color: var(--encre); background: var(--degrade-ambre); border-color: transparent; text-transform: uppercase; letter-spacing: .06em; font-size: .8125rem; }

/* Mention IA : bande sur un grand visuel, puce sur une vignette (+ légende une fois dans la carte) */
.visuel { position: relative; overflow: hidden; border-radius: var(--r-moyen); background: var(--fond-3); }
.visuel > img { width: 100%; height: 100%; object-fit: cover; }
.visuel-carre { aspect-ratio: 1; }
.visuel-portrait { aspect-ratio: 4 / 5; }
.visuel-reel { aspect-ratio: 9 / 16; }
.mention-ia {
  position: absolute; left: 10px; bottom: 10px; display: inline-flex; align-items: center; gap: 6px;
  padding: 4px 10px; border-radius: 8px; font-size: .8125rem; font-weight: 600; color: #fff;
  background: rgba(7, 13, 36, .78); border: 1px solid rgba(255, 255, 255, .2);
}
/* puce « IA » : posée À CHEVAL sur le coin de la vignette, pour ne pas cacher le visuel */
.puce-ia {
  position: absolute; right: -6px; bottom: -6px; padding: 0 5px; border-radius: 6px;
  font: 700 .8125rem/1.3 var(--texte-police); letter-spacing: .02em; color: #fff;
  background: rgba(7, 13, 36, .82); border: 1px solid rgba(255, 255, 255, .25);
}

/* =====================================================================
   Jauges : anneau (crédits) et barre en segments (un segment par contenu, ou par étape)
   ===================================================================== */
.anneau { position: relative; display: grid; place-items: center; flex: none; width: 156px; aspect-ratio: 1; }
.anneau svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.anneau-graduation { fill: none; stroke: rgba(255, 255, 255, .16); stroke-width: 1.4; stroke-dasharray: .6 2.53; }
.anneau-piste { fill: none; stroke: rgba(255, 255, 255, .08); stroke-width: 11; }
.anneau-valeur { fill: none; stroke: url(#anneau-degrade); stroke-width: 11; stroke-linecap: round; filter: drop-shadow(0 0 8px rgba(255, 181, 77, .55)); }
.anneau-centre { position: relative; display: flex; flex-direction: column; align-items: center; text-align: center; }
.anneau-nombre { font: 600 2.6rem/1 var(--titre); letter-spacing: -0.03em; font-variant-numeric: tabular-nums; }
.anneau-legende { max-width: 84px; margin-top: 5px; font-size: .8125rem; font-weight: 500; line-height: 1.2; color: var(--texte-2); }

.segments { display: flex; gap: 5px; }
.segment { flex: 1; height: 8px; border-radius: var(--r-pilule); background: rgba(255, 255, 255, .12); }
.segment.est-publie { background: var(--vdg); box-shadow: 0 0 12px -2px rgba(95, 205, 178, .7); }
.segment.est-pret { background: var(--ambre); box-shadow: 0 0 12px -2px rgba(255, 181, 77, .7); }
.segment.est-retouche { background: var(--corail); }
.segment.est-fait { background: var(--degrade-ambre); }
/* à relire : contour ambre, non rempli (gris = rien de prévu) */
.segment.est-relire { background: transparent; box-shadow: inset 0 0 0 1.5px var(--ambre); }
.legende { display: flex; flex-wrap: wrap; gap: 6px 16px; font-size: .875rem; color: var(--texte-2); }
.legende li { display: inline-flex; align-items: center; gap: 7px; list-style: none; }
.legende-point { width: 10px; height: 10px; flex: none; border-radius: 50%; background: rgba(255, 255, 255, .35); }
.legende-point.est-publie { background: var(--vdg); }
.legende-point.est-pret { background: var(--ambre); }
.legende-point.est-relire { background: transparent; box-shadow: inset 0 0 0 2px var(--ambre); }
.legende-point.est-retouche { background: var(--corail); }

/* =====================================================================
   Graphique des crédits : barres en pilule, la semaine en cours allumée (SVG écrit par le serveur)
   viewBox 0 0 300 150 ; 5 colonnes de 60 ; barre de 22 de large ; base à y = 128.
   ===================================================================== */
.graphe { display: flex; flex-direction: column; gap: 8px; }
.graphe-titre { font-size: .875rem; font-weight: 600; color: var(--texte-2); }
.graphe svg { display: block; width: 100%; height: auto; overflow: visible; }
.graphe-grille { stroke: rgba(255, 255, 255, .09); stroke-width: 1; stroke-dasharray: 3 5; }
.graphe-barre { fill: url(#barre-verre); }
.graphe-barre-reflet { fill: rgba(255, 255, 255, .5); }
.graphe-barre.est-actuelle { fill: url(#barre-ambre); filter: drop-shadow(0 0 10px rgba(255, 181, 77, .65)); }
.graphe-barre.est-vide { fill: rgba(255, 255, 255, .12); }
.graphe-barre.est-a-venir { fill: none; stroke: rgba(255, 255, 255, .28); stroke-width: 1.2; stroke-dasharray: 3 3; }
.graphe-valeur { font: 600 13px var(--texte-police); fill: var(--texte-2); text-anchor: middle; }
.graphe-etiquette rect { fill: var(--texte); }
.graphe-etiquette text { font: 700 13px var(--texte-police); fill: var(--encre); text-anchor: middle; }
.graphe-axe { display: grid; grid-template-columns: repeat(var(--colonnes, 5), minmax(0, 1fr)); text-align: center; font-size: .8125rem; color: var(--texte-3); }
.graphe-axe .est-actuelle { color: var(--texte); font-weight: 600; }

/* =====================================================================
   Fil « votre semaine » : un jour, un contenu ; le trait relie les jours, « Aujourd'hui » coupe le fil
   ===================================================================== */
.fil { position: relative; display: grid; gap: 10px; list-style: none; }
.fil::before {
  content: ''; position: absolute; left: 25px; top: 18px; bottom: 18px; width: 2px; border-radius: 2px;
  background: linear-gradient(180deg, rgba(95, 205, 178, .55), rgba(255, 214, 140, .5) 45%, rgba(255, 255, 255, .14));
}
.fil-item { position: relative; display: grid; grid-template-columns: 52px minmax(0, 1fr); gap: 12px; align-items: center; }
.fil-jour {
  position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center;
  width: 52px; height: 56px; border-radius: 16px; background: #121C43; box-shadow: inset 0 0 0 1px var(--filet-2);
}
.fil-jour-nom { font-size: .8125rem; font-weight: 700; letter-spacing: .03em; text-transform: uppercase; color: var(--texte-3); line-height: 1.2; }
.fil-jour-num { font: 600 1.3rem/1.1 var(--titre); }
.fil-carte {
  display: flex; align-items: center; gap: 12px; min-height: 76px; padding: 10px 12px 10px 10px;
  border-radius: var(--r-moyen); color: var(--texte); text-decoration: none;
  background: var(--interne); box-shadow: inset 0 0 0 1px var(--filet), inset 3px 0 0 rgba(255, 255, 255, .28);
  transition: background-color .2s ease;
}
a.fil-carte:hover { color: var(--texte); background: var(--interne-2); }
/* vignette : le visuel entier (contain) sur le fond crème des visuels Ruela, partout le même (accueil, semaine, fiche) */
.fil-vignette {
  position: relative; flex: none; width: 56px; height: 56px; border-radius: 13px;
  background: radial-gradient(90% 80% at 50% 35%, #FFF7E8, #EAD7B5); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .25);
}
.fil-vignette img { width: 100%; height: 100%; object-fit: contain; padding: 3px; }
.fil-vignette-vide { display: grid; place-items: center; color: var(--texte-3); background: rgba(255, 255, 255, .04); box-shadow: inset 0 0 0 1px var(--filet); }
.fil-texte {
  display: grid; grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "titre etat" "canal etat";
  align-items: center; gap: 3px 12px; min-width: 0; flex: 1;
}
.fil-titre { grid-area: titre; font-weight: 600; line-height: 1.3; text-wrap: pretty; }
.fil-canal { grid-area: canal; font-size: .8125rem; color: var(--texte-3); }
.fil-etat { grid-area: etat; justify-self: end; }
/* états : couleur du jour et du liseré gauche de la carte */
.fil-item.est-publie .fil-jour { box-shadow: inset 0 0 0 1px rgba(95, 205, 178, .55); }
.fil-item.est-publie .fil-jour-nom { color: var(--vdg-clair); }
.fil-item.est-publie .fil-carte { box-shadow: inset 0 0 0 1px var(--filet), inset 3px 0 0 var(--vdg); }
.fil-item.est-pret .fil-jour { box-shadow: inset 0 0 0 1px rgba(255, 181, 77, .6), 0 0 18px -6px rgba(255, 181, 77, .7); }
.fil-item.est-pret .fil-jour-nom { color: var(--ambre-clair); }
.fil-item.est-pret .fil-carte { box-shadow: inset 0 0 0 1px var(--filet), inset 3px 0 0 var(--ambre); }
/* à relire : contour ambre, non allumé (seul « prêt à publier » brille) */
.fil-item.est-relire .fil-jour { box-shadow: inset 0 0 0 1.5px rgba(255, 214, 140, .5); }
.fil-item.est-relire .fil-jour-nom { color: var(--ambre-clair); }
.fil-item.est-relire .fil-carte { box-shadow: inset 0 0 0 1px var(--filet), inset 3px 0 0 rgba(255, 214, 140, .6); }
.fil-item.est-retouche .fil-carte { box-shadow: inset 0 0 0 1px var(--filet), inset 3px 0 0 var(--corail); }
.fil-item.est-plus-tard .fil-carte { box-shadow: inset 0 0 0 1px var(--filet); border: 1px dashed rgba(255, 255, 255, .2); }
/* « Aujourd'hui » : un trait de lumière en travers du fil */
.fil-aujourdhui { position: relative; display: grid; grid-template-columns: 52px minmax(0, 1fr); gap: 12px; align-items: center; min-height: 22px; }
.fil-aujourdhui::before { content: ''; justify-self: center; width: 12px; height: 12px; border-radius: 50%; background: var(--ambre); box-shadow: 0 0 0 4px rgba(255, 181, 77, .2), 0 0 16px rgba(255, 181, 77, .95); }
.fil-aujourdhui span { display: flex; align-items: center; gap: 12px; font-size: .8125rem; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: var(--ambre-clair); }
.fil-aujourdhui span::after { content: ''; flex: 1; height: 1px; background: linear-gradient(90deg, rgba(255, 181, 77, .6), transparent); }
/* fil étroit (téléphone, colonne étroite) : jour et vignette plus petits, l'état passe sous le titre */
@container (max-width: 459px) {
  .fil::before { left: 21px; }
  .fil-item, .fil-aujourdhui { grid-template-columns: 44px minmax(0, 1fr); gap: 10px; }
  .fil-jour { width: 44px; height: 52px; border-radius: 14px; }
  .fil-jour-num { font-size: 1.2rem; }
  .fil-carte { gap: 10px; min-height: 72px; padding: 10px 10px 10px 8px; }
  .fil-vignette { width: 48px; height: 48px; border-radius: 12px; }
  .fil-texte { grid-template-columns: minmax(0, 1fr); grid-template-areas: "titre" "etat"; gap: 6px; }
  .fil-canal { display: none; } /* le canal est dit dans « Ma semaine » */
  .fil-etat { justify-self: start; }
}

/* =====================================================================
   Bandeaux (paiement, validation bancaire, arrêt demandé, semaine sautée)
   ===================================================================== */
.bandeau {
  display: flex; flex-wrap: wrap; align-items: center; gap: 12px 16px; padding: 14px 16px; border-radius: var(--r-moyen);
  background: rgba(255, 255, 255, .06); border: 1px solid var(--filet-2);
}
.bandeau-texte { display: flex; align-items: flex-start; gap: 12px; flex: 1 1 260px; min-width: 0; }
.bandeau-texte .ic { margin-top: 1px; }
.bandeau-alerte { background: rgba(255, 142, 118, .1); border-color: rgba(255, 142, 118, .45); }
.bandeau-alerte .bandeau-texte .ic { color: var(--corail); }
.bandeau-ambre { background: rgba(255, 181, 77, .09); border-color: rgba(255, 181, 77, .42); }
.bandeau-ambre .bandeau-texte .ic { color: var(--ambre); }
.bandeau-info .bandeau-texte .ic { color: var(--vdg); }
.bandeaux { display: grid; gap: 10px; margin-bottom: 18px; }

/* =====================================================================
   Lumi : poses carrées sur fond nuit, bords fondus (jamais détourée)
   ===================================================================== */
.lumi {
  display: block; width: 100%; height: auto; pointer-events: none; mix-blend-mode: lighten;
  -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 13%, #000 87%, transparent 100%), linear-gradient(180deg, transparent 0, #000 9%, #000 89%, transparent 100%);
  mask-image: linear-gradient(90deg, transparent 0, #000 13%, #000 87%, transparent 100%), linear-gradient(180deg, transparent 0, #000 9%, #000 89%, transparent 100%);
  -webkit-mask-composite: source-in; mask-composite: intersect;
}
.lumi-cadre { position: relative; flex: none; }
/* la lueur de la lanterne derrière Lumi */
.lumi-cadre::before {
  content: ''; position: absolute; left: 50%; top: 54%; width: 120%; aspect-ratio: 1; translate: -50% -50%; border-radius: 50%;
  background: radial-gradient(closest-side, rgba(255, 196, 110, .22), rgba(255, 181, 77, .06) 55%, transparent 100%);
}
.lumi-cadre .lumi { position: relative; }
@keyframes lumi-flotte { 0%, 100% { translate: 0 0; } 50% { translate: 0 -5px; } }
@media (prefers-reduced-motion: no-preference) { .lumi-flotte .lumi { animation: lumi-flotte 5.5s ease-in-out infinite; } }

/* État vide : Lumi + un titre + une phrase (+ un bouton au plus) */
.vide { display: flex; flex-direction: column; align-items: center; gap: 10px; padding: 8px 8px 12px; text-align: center; }
.vide .lumi-cadre { width: 168px; margin-bottom: -6px; }
.vide-titre { font: 600 1.25rem/1.25 var(--titre); }
.vide-texte { max-width: 30rem; color: var(--texte-2); text-wrap: pretty; }

/* =====================================================================
   Tuiles (raccourcis vers les autres écrans) et listes d'informations
   ===================================================================== */
.tuiles { display: grid; gap: 10px; list-style: none; }
.tuile {
  display: flex; align-items: center; gap: 14px; min-height: 66px; padding: 12px 14px 12px 12px;
  border-radius: var(--r-moyen); color: var(--texte); text-decoration: none;
  background: var(--interne); box-shadow: inset 0 0 0 1px var(--filet);
  transition: background-color .2s ease;
}
.tuile:hover { color: var(--texte); background: var(--interne-2); }
.tuile-icone {
  display: grid; place-items: center; flex: none; width: 46px; height: 46px; border-radius: 14px;
  color: var(--ambre-clair); background: radial-gradient(circle at 30% 25%, rgba(255, 214, 140, .26), rgba(255, 181, 77, .06));
  box-shadow: inset 0 0 0 1px rgba(255, 214, 140, .3);
}
.tuile-icone-vdg { color: var(--vdg-clair); background: radial-gradient(circle at 30% 25%, rgba(95, 205, 178, .28), rgba(95, 205, 178, .06)); box-shadow: inset 0 0 0 1px rgba(95, 205, 178, .35); }
.tuile-texte { display: flex; flex-direction: column; gap: 2px; min-width: 0; flex: 1; }
.tuile-nom { font-size: .875rem; font-weight: 500; color: var(--texte-2); }
.tuile-valeur { font-weight: 600; line-height: 1.3; }
.tuile > .ic { color: var(--texte-3); }

/* liste « intitulé : valeur » (abonnement, informations) */
.infos { display: grid; gap: 0; }
.infos > div { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 4px 16px; padding: 12px 0; border-top: 1px solid var(--filet); }
.infos > div:first-child { border-top: 0; padding-top: 0; }
.infos dt { color: var(--texte-2); }
.infos dd { font-weight: 600; text-align: right; }

/* lignes (paiements, historique des crédits) */
.lignes { list-style: none; }
.lignes > li { display: flex; align-items: center; gap: 6px 12px; min-height: 60px; padding: 10px 0; border-top: 1px solid var(--filet); }
.lignes > li:first-child { border-top: 0; }
.ligne-texte { display: flex; flex-direction: column; gap: 2px; flex: 1; min-width: 0; }
.ligne-quoi { font-weight: 500; }
.ligne-date { font-size: .875rem; color: var(--texte-2); font-variant-numeric: tabular-nums; }
.ligne-montant { font-weight: 600; font-variant-numeric: tabular-nums; }

/* =====================================================================
   Formulaires (fiche, « À changer », arrêt) et sections repliables
   ===================================================================== */
.champ { display: grid; gap: 8px; }
.champ-label { font-weight: 600; }
.champ-aide { font-size: .875rem; color: var(--texte-2); }
.saisie {
  width: 100%; min-height: 48px; padding: 12px 14px; border-radius: 14px;
  font: inherit; color: var(--texte); background: rgba(7, 13, 36, .55); border: 1px solid var(--filet-2);
}
textarea.saisie { min-height: 104px; resize: vertical; }
.saisie::placeholder { color: var(--texte-3); }
.saisie:focus-visible { outline: 3px solid var(--ambre-clair); outline-offset: 1px; border-color: transparent; }
.case { display: flex; align-items: flex-start; gap: 12px; min-height: 44px; padding: 10px 0; cursor: pointer; }
.case input {
  appearance: none; -webkit-appearance: none; flex: none; width: 24px; height: 24px; margin: 0; border-radius: 7px; cursor: pointer;
  border: 2px solid var(--texte-3); background: rgba(7, 13, 36, .5);
}
/* la coche est un fichier servi par nous (CSP de l'espace : img-src 'self' blob:, jamais data:) */
.case input:checked { border-color: var(--vdg); background: var(--vdg) url("coche.svg") center / 18px no-repeat; }
.case input:focus-visible { outline: 3px solid var(--ambre-clair); outline-offset: 2px; }

.repliable { border-radius: var(--r-moyen); background: var(--interne); box-shadow: inset 0 0 0 1px var(--filet); }
.repliable > summary {
  display: flex; align-items: center; gap: 12px; min-height: 60px; padding: 8px 14px; border-radius: var(--r-moyen);
  list-style: none; cursor: pointer; font: 600 1.05rem/1.3 var(--titre);
}
.repliable > summary::-webkit-details-marker { display: none; }
.repliable > summary:hover { background: rgba(255, 255, 255, .03); }
.repliable > summary .ic-chevron { margin-left: auto; color: var(--texte-3); transition: rotate .2s ease; }
.repliable[open] > summary .ic-chevron { rotate: 180deg; }
.repliable-corps { display: grid; gap: 14px; padding: 4px 16px 18px; }

/* =====================================================================
   Mise en page commune aux écrans
   ===================================================================== */
.pile { display: grid; gap: 14px; align-content: start; }
.pile-serree { gap: 8px; }
.grille-cartes { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 340px), 1fr)); align-items: start; }
.section { display: grid; gap: 14px; margin-top: 30px; }
.section-titre { font-size: 1.3rem; }
.section-chapo { margin-top: -6px; color: var(--texte-2); }
.texte-2 { color: var(--texte-2); }
.texte-3 { color: var(--texte-3); }
/* une phrase d'information sous un bouton ou un formulaire */
.note { display: flex; align-items: flex-start; gap: 8px; font-size: .875rem; color: var(--texte-2); }
.note .ic { width: 18px; height: 18px; margin-top: 1px; color: var(--texte-3); }

/* =====================================================================
   Pied de page
   ===================================================================== */
.pied { font-size: .875rem; color: var(--texte-3); }
.pied-ligne { display: flex; flex-wrap: wrap; align-items: center; gap: 0 18px; padding-top: 16px; border-top: 1px solid var(--filet); }
.pied-liens { display: flex; flex-wrap: wrap; gap: 0 4px; list-style: none; }
.pied a { display: inline-flex; align-items: center; min-height: 44px; padding: 0 8px; border-radius: 10px; color: var(--texte-2); }
.pied a:hover { color: var(--texte); }
.pied-contact { display: flex; flex-wrap: wrap; align-items: center; }
.pied-contact { gap: 8px; padding: 6px 0 2px; }
.pied-contact a { gap: 8px; padding: 0 14px; border-radius: var(--r-pilule); font-weight: 600; color: var(--ambre-clair); text-decoration: none; background: rgba(255, 255, 255, .05); box-shadow: inset 0 0 0 1px var(--filet-2); }
.pied-contact a:hover { color: var(--ambre-clair); background: rgba(255, 255, 255, .1); }
.pied-contact a .ic { width: 18px; height: 18px; }
.pied-marque { margin-right: 6px; }

/* =====================================================================
   Accueil
   ===================================================================== */
.accueil-grille { display: grid; gap: 14px; grid-template-columns: minmax(0, 1fr); grid-template-areas: "afaire" "semaine" "credits" "raccourcis"; }
.zone-afaire { grid-area: afaire; }
.zone-semaine { grid-area: semaine; }
.zone-credits { grid-area: credits; }
.zone-raccourcis { grid-area: raccourcis; }
@media (min-width: 720px) and (max-width: 1023px) {
  .accueil-grille { gap: 16px; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); grid-template-areas: "afaire afaire" "semaine semaine" "credits raccourcis"; }
  .zone-raccourcis { align-self: start; }
}
@media (min-width: 1024px) {
  .accueil-grille {
    gap: 18px; grid-template-columns: minmax(0, 1.72fr) minmax(0, 1fr);
    grid-template-areas: "afaire credits" "semaine credits" "semaine raccourcis";
  }
}

/* « À faire maintenant » : la carte de l'action du moment, éclairée par Lumi.
   Lumi vient EN PREMIER dans le code et flotte à droite : le texte l'entoure, le bouton passe dessous.
   Sa taille suit la largeur de la carte (requête de conteneur), pas celle de l'écran : la carte marche dans
   n'importe quelle colonne. */
.a-faire { container-type: inline-size; display: flow-root; padding: 18px 14px 20px 20px; overflow: hidden; }
.a-faire-texte { min-width: 0; }
.a-faire .surtitre { display: flex; margin: 6px 0 12px; }
.a-faire-titre { font: 500 1.28rem/1.3 var(--titre); letter-spacing: -0.01em; color: var(--texte); text-wrap: pretty; }
.a-faire-titre strong { display: block; margin-top: 4px; font-weight: 600; font-size: 1.5em; line-height: 1.1; letter-spacing: -0.02em; color: var(--ambre-clair); text-shadow: 0 0 26px rgba(255, 181, 77, .4); }
.a-faire .lumi-cadre { float: right; width: 100px; margin: -12px -8px -8px 6px; }
.a-faire .bouton { width: 100%; margin-top: 18px; }
@container (min-width: 440px) {
  .a-faire .lumi-cadre { width: 164px; margin: -14px -6px -12px 12px; }
  .a-faire .bouton { width: auto; }
  .a-faire .surtitre { margin-top: 4px; }
  .a-faire-titre { font-size: 1.45rem; }
  .a-faire-titre strong { font-size: 1.62em; }
}
@container (min-width: 600px) {
  .a-faire .lumi-cadre { width: 212px; margin: -22px -4px -34px 18px; }
  .a-faire-titre { font-size: 1.55rem; }
}
@media (min-width: 480px) { .a-faire { padding: 24px 18px 26px 28px; } }
@media (min-width: 1024px) { .zone-afaire { padding: 28px 22px 30px 32px; min-height: 248px; } }

/* variantes : « Rien à faire » (vert-de-gris, sans bouton) ; barre des étapes de la mise en route */
.a-faire-calme .surtitre { color: var(--vdg-clair); }
.a-faire-calme .a-faire-titre strong { color: var(--vdg-clair); text-shadow: 0 0 26px rgba(95, 205, 178, .35); }
.a-faire-etapes { max-width: 300px; margin-top: 16px; }

/* Votre semaine */
.semaine-progres { display: grid; gap: 10px; }
.semaine-pied { display: grid; gap: 6px; margin-top: auto; padding-top: 14px; border-top: 1px solid var(--filet); }
.semaine-suivante { display: flex; align-items: center; gap: 8px; color: var(--texte-2); }
.semaine-suivante .ic { color: var(--vdg); }

/* Vos crédits */
.credits-haut { display: flex; align-items: center; gap: 18px; }
.credits-chiffres { display: grid; gap: 0; flex: 1; min-width: 0; }
.credits-chiffres > div { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; padding: 9px 0; border-top: 1px solid var(--filet); }
.credits-chiffres > div:first-child { border-top: 0; }
.credits-chiffres dt { font-size: .9375rem; color: var(--texte-2); }
.credits-chiffres dd { font: 600 1.15rem/1.2 var(--titre); font-variant-numeric: tabular-nums; text-align: right; white-space: nowrap; }
.credits-bareme { display: flex; align-items: flex-start; gap: 8px; margin-top: auto; padding-top: 14px; border-top: 1px solid var(--filet); font-size: .875rem; color: var(--texte-3); }
.credits-bareme .ic { width: 18px; height: 18px; margin-top: 1px; color: var(--texte-3); }
@media (min-width: 1024px) { .zone-credits .anneau { width: 168px; } }
@container (max-width: 309px) { .credits-haut { flex-direction: column; align-items: stretch; } .credits-haut .anneau { align-self: center; } }

/* Apparition douce des cartes (rien avec « réduire les animations ») */
@keyframes monte { from { opacity: 0; translate: 0 14px; } }
@media (prefers-reduced-motion: no-preference) {
  .apparait { animation: monte .7s cubic-bezier(.22, 1, .36, 1) both; }
  .apparait:nth-child(2) { animation-delay: .07s; }
  .apparait:nth-child(3) { animation-delay: .14s; }
  .apparait:nth-child(4) { animation-delay: .21s; }
  .apparait:nth-child(5) { animation-delay: .28s; }
}

/* Couleurs forcées (Windows contraste élevé) : les cartes gardent un bord */
@media (forced-colors: active) {
  .verre, .fil-carte, .tuile, .bandeau, .repliable { border: 1px solid CanvasText; }
  .segment { border: 1px solid CanvasText; }
}
