/* =========================================================
   Couleurs
   Une couleur par direction, toujours la même :
   vert en haut, jaune à droite, rose en bas, violet à gauche.
   ========================================================= */
:root {
  --fond: #E9E7E2;           /* fond de toute l'application */
  --surface: #FFFFFF;        /* cartes, pastilles, boutons ronds */
  --encre: #121212;          /* textes, contours */
  --doux: #5C5953;           /* textes secondaires (contraste AA sur fond et surface) */
  --gris: #D9D5CD;           /* éléments désactivés, séparations */
  --lime: #D6F26A;           /* action principale */
  --rec: #F2392C;            /* bouton d'écoute */

  --inspiration: #1FA45B;    /* en haut : de qui il s'est inspiré */
  --collaboration: #F6C21C;  /* à droite : avec qui il travaille */
  --ailleurs: #EE4E9B;       /* en bas : même genre, hors Québec */
  --scene: #8C7CF4;          /* à gauche : même genre, au Québec */

  --police-titre: "Bricolage Grotesque", "Arial Narrow", "Helvetica Neue", Arial, system-ui, sans-serif;
  --police-texte: "Inter Tight", "Inter", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;

  --marge: 16px;
}

[data-dir="haut"]   { --c: var(--inspiration); }
[data-dir="droite"] { --c: var(--collaboration); }
[data-dir="bas"]    { --c: var(--ailleurs); }
[data-dir="gauche"] { --c: var(--scene); }

/* =========================================================
   Base
   ========================================================= */
*, *::before, *::after { box-sizing: border-box; }

html { background: var(--fond); -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--fond);
  color: var(--encre);
  font-family: var(--police-texte);
  font-size: 17px;
  line-height: 1.4;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
}

/* Grand écran : une colonne de 420 px au centre */
#app { max-width: 420px; margin: 0 auto; min-height: 100dvh; }

[hidden] { display: none !important; }

button, input, a { font: inherit; color: inherit; }
button { background: none; border: 0; padding: 0; cursor: pointer; text-align: inherit; }
img { display: block; max-width: 100%; }

:focus { outline: none; }
:focus-visible { outline: 3px solid var(--encre); outline-offset: 3px; }

h1, h2, h3, p, ul, ol, dl, dd { margin: 0; }
ul, ol { padding: 0; list-style: none; }

.lecteur-seul {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0);
  white-space: nowrap; border: 0;
}

/* Donnée manquante : bien visible */
mark.manque {
  background: var(--encre);
  color: var(--surface);
  font-family: var(--police-texte);
  font-weight: 700;
  font-size: 0.8em;
  letter-spacing: 0;
  padding: 1px 6px;
  border-radius: 6px;
  vertical-align: 0.1em;
}

/* Titres : grasse, étroite, serrée */
.grand-titre, .accueil-titre, .carte-nom, .ecoute-statut, .ecoute-titre, .fiche-titre,
.noeud-nom, .resultat-nom, .suggestion, .moyeu-initiales {
  font-family: var(--police-titre);
  font-weight: 800;
  font-stretch: 75%;
  font-optical-sizing: auto;
  letter-spacing: -0.03em;
}

.grand-titre { font-size: 64px; line-height: 0.9; }

.petit-titre { font-size: 15px; font-weight: 600; color: var(--doux); }

/* Icônes (dessinées par app.js) */
.icone { display: inline-grid; place-items: center; width: 22px; height: 22px; flex: none; }
.icone svg { width: 100%; height: 100%; }

/* Pastilles */
.pastille {
  display: inline-flex;
  align-items: center;
  align-self: flex-start;
  min-height: 30px;
  padding: 4px 14px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.pastille-lime { background: var(--lime); }
.pastille-blanche { background: var(--surface); }

/* Boutons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 56px;
  padding: 0 24px;
  border-radius: 999px;
  font-size: 17px;
  font-weight: 700;
  text-decoration: none;
  white-space: nowrap;
}
.btn-lime { background: var(--lime); }
.btn-noir { background: var(--encre); color: var(--surface); }
.btn-contour { border: 2px solid var(--encre); }

.btn-texte {
  min-height: 44px;
  padding: 8px 4px;
  font-size: 16px;
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 4px;
}

.rond {
  position: relative;
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  flex: none;
  border-radius: 50%;
  background: var(--surface);
}
.rond-gris { background: var(--gris); color: #77736B; cursor: not-allowed; }
.rond-vide { width: 52px; height: 52px; }

.barre {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: calc(10px + env(safe-area-inset-top)) var(--marge) 10px;
}
.barre-titre { font-size: 19px; font-weight: 700; }

/* Infobulle « Bientôt » */
.infobulle {
  display: none;
  position: absolute;
  bottom: calc(100% + 8px);
  right: 0;
  padding: 6px 12px;
  background: var(--encre);
  color: var(--surface);
  font-size: 15px;
  font-weight: 700;
  border-radius: 999px;
  white-space: nowrap;
}
.rond:hover .infobulle,
.rond:focus-visible .infobulle,
.rond.infobulle-visible .infobulle { display: block; }

/* =========================================================
   1. Accueil
   ========================================================= */
.ecran-accueil {
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  gap: 18px;
  padding: calc(14px + env(safe-area-inset-top)) var(--marge) calc(110px + env(safe-area-inset-bottom));
}

.accueil-tete { display: flex; justify-content: space-between; align-items: center; min-height: 32px; }
.marque {
  font-family: var(--police-titre);
  font-weight: 800;
  font-stretch: 75%;
  font-size: 28px;
  line-height: 1;
  letter-spacing: -0.02em;
}

.accueil-titre {
  font-size: clamp(64px, 22vw, 92px);
  line-height: 0.84;
  margin-top: 4px;
}

.accueil-phrase { font-size: 18px; font-weight: 500; line-height: 1.3; max-width: 30ch; }

.bloc-ecoute {
  position: relative;
  height: 250px;
  border-radius: 32px;
  background: var(--surface);
  overflow: hidden;
}
.cables-deco { position: absolute; inset: 0; width: 100%; height: 100%; }

.btn-rec {
  position: absolute;
  left: 50%;
  top: 46%;
  transform: translate(-50%, -50%);
  display: grid;
  place-items: center;
  width: 112px;
  height: 112px;
  border-radius: 50%;
  background: var(--surface);
  border: 10px solid var(--fond);
}
.btn-rec-point {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--rec);
}
.btn-rec:active .btn-rec-point { transform: scale(0.9); }

.bloc-ecoute-texte {
  position: absolute;
  left: 50%;
  bottom: 16px;
  transform: translateX(-50%);
  padding: 6px 14px;
  border-radius: 999px;
  background: var(--surface);
  font-size: 15px;
  font-weight: 700;
  white-space: nowrap;
}

.rangee-entrees { display: flex; gap: 10px; }
.pilule-recherche {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 60px;
  padding: 0 22px;
  border-radius: 999px;
  background: var(--surface);
  font-size: 17px;
  font-weight: 500;
  color: var(--doux);
}
.pilule-recherche .icone { color: var(--encre); }
.rangee-entrees .rond { width: 60px; height: 60px; }

.suggestions { display: flex; flex-direction: column; gap: 10px; margin-top: 4px; }

.suggestions-liste { display: flex; flex-wrap: wrap; gap: 8px; }
.suggestion {
  min-height: 48px;
  padding: 8px 18px 10px;
  border-radius: 999px;
  font-size: 22px;
  line-height: 1;
  background: var(--surface);
}
.suggestions-liste li:nth-child(4n+1) .suggestion { background: var(--lime); }
.suggestions-liste li:nth-child(4n+2) .suggestion { background: var(--collaboration); }
.suggestions-liste li:nth-child(4n+3) .suggestion { background: var(--ailleurs); }
.suggestions-liste li:nth-child(4n+4) .suggestion { background: var(--scene); }

/* =========================================================
   2. Écoute (simulée)
   ========================================================= */
.ecran-ecoute { min-height: 100dvh; display: flex; flex-direction: column; }

.ecoute-corps {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 18px;
  padding: 4px var(--marge) calc(24px + env(safe-area-inset-bottom));
}

.grille-carte {
  position: relative;
  padding: 18px 18px 14px;
  border-radius: 32px;
  background: var(--surface);
}
.grille-cadre { position: relative; max-width: 320px; margin: 0 auto; }
.grille { display: block; width: 100%; aspect-ratio: 1; overflow: visible; }
.grille circle { fill: var(--encre); }
.grille circle.rouge { fill: var(--rec); }

.ecoute-pochette {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 78%;
  aspect-ratio: 1;
  object-fit: cover;
  border-radius: 20px;
  transform: translate(-50%, -50%);
}

.timecode {
  display: flex;
  justify-content: space-between;
  margin-top: 10px;
  font-size: 15px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}
.timecode-max { color: var(--doux); }

.ecoute-statut { font-size: 52px; line-height: 0.9; }
.ecran-ecoute[data-phase="trouve"] .ecoute-statut { display: none; }

.ecoute-resultat { display: flex; flex-direction: column; gap: 10px; }
.ecoute-titre { font-size: 76px; line-height: 0.85; margin-top: 4px; }
.ecoute-artiste { font-size: 19px; font-weight: 600; }
.ecoute-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 8px; }
.ecoute-actions .btn-lime { flex: 1 1 200px; }
.ecoute-resultat .btn-texte { align-self: flex-start; }

.btn-stop {
  align-self: center;
  margin-top: auto;
  display: grid;
  place-items: center;
  width: 84px;
  height: 84px;
  border-radius: 50%;
  background: var(--surface);
}
.btn-stop-carre { width: 28px; height: 28px; border-radius: 7px; background: var(--rec); }

/* =========================================================
   3. Recherche
   ========================================================= */
.recherche-corps {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: calc(28px + env(safe-area-inset-top)) var(--marge) calc(110px + env(safe-area-inset-bottom));
}

.champ-pilule {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 64px;
  padding: 0 22px;
  border-radius: 999px;
  background: var(--surface);
  margin-top: 8px;
}
.champ-pilule:focus-within { outline: 3px solid var(--encre); outline-offset: 0; }
.champ {
  flex: 1;
  min-width: 0;
  border: 0;
  background: transparent;
  font-size: 20px;
  font-weight: 600;
  -webkit-appearance: none;
  appearance: none;
}
.champ::placeholder { color: var(--doux); font-weight: 500; }
.champ::-webkit-search-cancel-button { -webkit-appearance: none; }

.recherche-statut { font-size: 16px; color: var(--doux); }
.recherche-statut:empty { display: none; }

.resultats { display: flex; flex-direction: column; gap: 8px; }
.resultat {
  display: flex;
  flex-direction: column;
  gap: 4px;
  width: 100%;
  padding: 16px 20px 18px;
  border-radius: 24px;
  background: var(--surface);
}
.resultat-nom { font-size: 32px; line-height: 0.95; }
.resultat-detail { font-size: 15px; color: var(--doux); }

.recherche-suggestions { display: flex; flex-direction: column; gap: 10px; margin-top: 12px; }

/* =========================================================
   4. Carte : les câbles
   ========================================================= */
.ecran-carte { height: 100dvh; display: flex; flex-direction: column; }

.carte-defilement {
  flex: 1;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding: 0 12px 28px;
}

.carte-tete { padding: 2px 4px 22px; display: flex; flex-direction: column; gap: 10px; }
.carte-nom { font-size: 60px; line-height: 0.86; overflow-wrap: anywhere; }
.carte-sous { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.carte-note { font-size: 16px; font-weight: 500; color: var(--doux); margin-right: 4px; }
.pilule-ecouter {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 36px;
  padding: 0 14px;
  border-radius: 999px;
  background: var(--lime);
  font-size: 15px;
  font-weight: 700;
  text-decoration: none;
}
.pilule-ecouter .icone { width: 16px; height: 16px; }
.pilule-ailleurs {
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  padding: 0 14px;
  border-radius: 999px;
  border: 2px solid var(--encre);
  font-size: 14px;
  font-weight: 700;
}

.carte {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 146px minmax(0, 1fr);
  grid-template-areas:
    "lh lh lh"
    "h  h  h"
    "ls ls ls"
    "g  c  d"
    "b  b  b"
    "lb lb lb";
  row-gap: 16px;
}

.carte-cables {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: visible;
  pointer-events: none;
  z-index: 0;
}
.carte-cables path {
  fill: none;
  stroke: var(--c);
  stroke-width: 9;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.carte-cables path.vide { stroke-dasharray: 0 15; stroke-width: 8; }
.carte-cables path.actif { stroke-width: 14; }

.carte > *:not(svg) { position: relative; z-index: 1; }

/* Étiquettes de direction */
.etiquette {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 3px 12px;
  border-radius: 999px;
  background: var(--c);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  white-space: nowrap;
}
.lab-haut { grid-area: lh; justify-self: center; }
.lab-bas  { grid-area: lb; justify-self: center; }
.lab-cotes { grid-area: ls; display: flex; justify-content: space-between; margin-top: 14px; }

/* Zones */
.zone-haut   { grid-area: h; }
.zone-bas    { grid-area: b; margin-top: 30px; }
.zone-gauche { grid-area: g; padding-right: 0; }
.zone-droite { grid-area: d; }

.zone-haut, .zone-bas {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: stretch;
  gap: 10px;
}
.zone-haut > *, .zone-bas > * { flex: 0 1 calc((100% - 20px) / 3); }

.zone-gauche, .zone-droite {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 12px;
}

/* Une station : le nom (recentre) + sa phrase (ouvre la fiche) */
.noeud {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
  padding: 11px 11px 13px;
  border-radius: 20px;
  background: var(--surface);
}
.noeud::after {
  content: "";
  position: absolute;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--encre);
  border: 4px solid var(--surface);
}
.noeud[data-dir="haut"]::after   { left: 50%; bottom: -9px; transform: translateX(-50%); }
.noeud[data-dir="bas"]::after    { left: 50%; top: -9px; transform: translateX(-50%); }
.noeud[data-dir="gauche"]::after { right: -9px; top: 50%; transform: translateY(-50%); }
.noeud[data-dir="droite"]::after { left: -9px; top: 50%; transform: translateY(-50%); }
.noeud.actif { outline: 4px solid var(--c); outline-offset: 0; }

.noeud-nom {
  width: 100%;
  font-size: 22px;
  line-height: 0.92;
  text-align: left;
}

.noeud-phrase {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
  line-clamp: 3;
  overflow: hidden;
  font-size: 14px;
  line-height: 1.25;
  color: var(--doux);
  text-align: left;
  text-decoration: underline dotted 1px;
  text-underline-offset: 3px;
}

.plus-autres {
  align-self: center;
  min-height: 40px;
  padding: 0 14px;
  border-radius: 999px;
  border: 2px solid var(--encre);
  background: var(--fond);
  font-size: 14px;
  font-weight: 700;
}

/* Direction vide : un câble en pointillé, rien au bout */
.vide {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 70px;
  padding: 10px;
  border: 2px dashed var(--c);
  border-radius: 20px;
  background: var(--fond);
  color: var(--doux);
  font-size: 14px;
  font-weight: 500;
  line-height: 1.2;
  text-align: center;
}

/* Le moyeu : l'artiste au centre */
.moyeu {
  grid-area: c;
  justify-self: center;
  align-self: center;
  display: grid;
  place-items: center;
  width: 104px;
  height: 104px;
  border-radius: 50%;
  background: var(--encre);
  border: 5px solid var(--encre);
  overflow: hidden;
  color: var(--surface);
}
.moyeu img { width: 100%; height: 100%; object-fit: cover; border-radius: 50%; }
.moyeu-initiales { font-size: 44px; line-height: 1; }

/* Le fil du chemin parcouru, dessiné comme une ligne de métro */
.fil {
  background: var(--surface);
  border-radius: 26px 26px 0 0;
  padding: 10px var(--marge) calc(10px + env(safe-area-inset-bottom));
}
.fil-liste {
  display: flex;
  align-items: center;
  overflow-x: auto;
  white-space: nowrap;
  scrollbar-width: none;
}
.fil-liste::-webkit-scrollbar { display: none; }
.fil-liste li { display: flex; align-items: center; flex: none; }
.fil-trait { width: 26px; height: 4px; margin: 0 6px; border-radius: 2px; background: var(--encre); }
.fil-pas {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 48px;
  font-size: 15px;
  font-weight: 600;
}
.fil-pas::before {
  content: "";
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--encre);
  flex: none;
}
.fil-pas[aria-current="step"] { font-weight: 800; }
.fil-pas[aria-current="step"]::before { width: 20px; height: 20px; background: var(--lime); border: 4px solid var(--encre); }
.fil-pas.apres { color: var(--doux); }
.fil-pas.apres::before { background: var(--gris); }
.fil-trait.apres { background: var(--gris); }

/* =========================================================
   5. Fiche d'un lien : un panneau de la couleur de la direction
   ========================================================= */
.voile {
  position: fixed;
  inset: 0;
  z-index: 19;
  background: rgba(18, 18, 18, 0.45);
}

.fiche {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 20;
  max-width: 420px;
  max-height: 90dvh;
  margin: 0 auto;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 10px 20px calc(18px + env(safe-area-inset-bottom));
  background: var(--c, var(--surface));
  border-radius: 30px 30px 0 0;
  touch-action: none;
}

.fiche-poignee {
  align-self: center;
  width: 48px;
  height: 5px;
  margin: 2px 0 6px;
  border-radius: 3px;
  background: var(--encre);
  opacity: 0.35;
}

.fiche-titre { font-size: 58px; line-height: 0.86; margin-top: 4px; }
.fiche-de { font-size: 15px; font-weight: 600; }
.fiche-phrase { font-size: 20px; font-weight: 500; line-height: 1.32; }

.fiche-source {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 14px 16px;
  border-radius: 22px;
  background: var(--surface);
  font-size: 15px;
}
.fiche-source > div { display: flex; gap: 12px; }
.fiche-source dt { flex: none; width: 64px; color: var(--doux); }
.fiche-source a { text-decoration: underline; text-underline-offset: 3px; overflow-wrap: anywhere; }

.fiche-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 4px; }
.fiche-actions .btn { flex: 1 1 140px; }

.fiche-fermer { align-self: center; }

/* =========================================================
   Barre de navigation
   ========================================================= */
.navbar {
  position: fixed;
  left: 0;
  right: 0;
  bottom: calc(10px + env(safe-area-inset-bottom));
  z-index: 10;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  width: calc(100% - 24px);
  max-width: 396px;
  margin: 0 auto;
  padding: 8px;
  border-radius: 30px;
  background: var(--encre);
  color: var(--surface);
}
.nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  min-height: 56px;
  padding: 4px 0;
  font-size: 12px;
  font-weight: 600;
  text-align: center;
  color: #B9B5AD;
}
.nav-icone {
  display: grid;
  place-items: center;
  width: 48px;
  height: 30px;
  border-radius: 999px;
}
.nav-item[aria-current="page"] { color: var(--surface); }
.nav-item[aria-current="page"] .nav-icone { background: var(--lime); color: var(--encre); }

/* =========================================================
   Historique et compte
   ========================================================= */
.ecran-onglet {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: calc(28px + env(safe-area-inset-top)) var(--marge) calc(110px + env(safe-area-inset-bottom));
}
.onglet-intro { font-size: 17px; font-weight: 500; color: var(--doux); margin-bottom: 4px; }

.historique-liste { display: flex; flex-direction: column; gap: 8px; }
.historique-item {
  display: flex;
  align-items: center;
  gap: 14px;
  width: 100%;
  padding: 10px 16px 10px 10px;
  border-radius: 24px;
  background: var(--surface);
}
.historique-pochette {
  width: 64px;
  height: 64px;
  flex: none;
  border-radius: 14px;
  object-fit: cover;
  background: var(--encre);
}
.historique-texte { display: flex; flex-direction: column; gap: 2px; min-width: 0; flex: 1; }
.historique-titre {
  font-family: var(--police-titre);
  font-weight: 800;
  font-stretch: 75%;
  letter-spacing: -0.03em;
  font-size: 26px;
  line-height: 0.95;
}
.historique-artiste { font-size: 15px; font-weight: 600; }
.historique-date { font-size: 14px; color: var(--doux); }
.historique-item .icone { color: var(--doux); }

.historique-vide {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 14px;
  padding: 22px 20px;
  border-radius: 28px;
  background: var(--surface);
  font-size: 17px;
  font-weight: 500;
}
.ecran-onglet > .btn-texte { align-self: flex-start; }

.carte-bloc {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 20px;
  border-radius: 28px;
  background: var(--surface);
}
.bloc-titre { font-size: 19px; font-weight: 700; }
.bloc-texte { font-size: 15px; color: var(--doux); }

.services { display: flex; flex-direction: column; gap: 8px; margin-top: 4px; }
.service {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 64px;
  padding: 8px 8px 8px 18px;
  border-radius: 999px;
  background: var(--fond);
}
.service-nom { font-size: 17px; font-weight: 700; }
.service-etat { display: block; font-size: 13px; font-weight: 500; color: var(--doux); }
.service .btn { min-height: 48px; padding: 0 18px; font-size: 15px; }
.service.relie { background: var(--lime); }

.chiffres { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.chiffre {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 16px 18px 18px;
  border-radius: 24px;
  background: var(--surface);
}
.chiffre-valeur {
  font-family: var(--police-titre);
  font-weight: 800;
  font-stretch: 75%;
  font-size: 56px;
  line-height: 0.9;
  letter-spacing: -0.03em;
}
.chiffre-libelle { font-size: 14px; font-weight: 600; color: var(--doux); }

.compte-note { font-size: 14px; color: var(--doux); }

/* Petite pastille du compte, en haut de l'accueil */
.avatar-mini {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--lime);
  font-family: var(--police-titre);
  font-weight: 800;
  font-stretch: 75%;
  font-size: 22px;
}

/* Invitation à créer un compte */
.invite {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 24px 20px 20px;
  border-radius: 30px;
  background: var(--lime);
}
.invite-titre {
  font-family: var(--police-titre);
  font-weight: 800;
  font-stretch: 75%;
  font-size: 42px;
  line-height: 0.9;
  letter-spacing: -0.03em;
}
.invite-liste { display: flex; flex-direction: column; gap: 6px; margin: 4px 0 8px; font-size: 16px; font-weight: 600; }
.invite-liste li { display: flex; align-items: center; gap: 10px; }
.invite-liste li::before { content: ""; width: 10px; height: 10px; border-radius: 50%; background: var(--encre); flex: none; }

/* Parcours d'inscription et de connexion */
.ecran-onglet[data-vue="inscription"], .ecran-onglet[data-vue="connexion"] {
  padding-top: calc(10px + env(safe-area-inset-top));
  padding-bottom: calc(28px + env(safe-area-inset-bottom));
}
.flux-tete { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; }

.etapes { display: flex; align-items: center; }
.etapes li { display: flex; align-items: center; }
.etapes li::before {
  content: "";
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--gris);
}
.etapes li + li::after { content: none; }
.etapes li + li { gap: 0; }
.etapes li + li::before { margin-left: 34px; }
.etapes li { position: relative; }
.etapes li + li > span:first-child { position: absolute; }
.etapes li.faite::before { background: var(--encre); }
.etapes li.en-cours::before { width: 20px; height: 20px; background: var(--lime); border: 4px solid var(--encre); }
.etapes { background: linear-gradient(var(--encre), var(--encre)) center / calc(100% - 20px) 4px no-repeat; }

.formulaire { display: flex; flex-direction: column; gap: 16px; margin-top: 6px; }
.formulaire .btn { margin-top: 6px; }
.champ-bloc { display: flex; flex-direction: column; gap: 6px; }
.champ-bloc label { font-size: 15px; font-weight: 700; }
.saisie {
  width: 100%;
  min-height: 58px;
  padding: 0 18px;
  border: 2px solid transparent;
  border-radius: 18px;
  background: var(--surface);
  font-size: 18px;
  font-weight: 500;
  -webkit-appearance: none;
  appearance: none;
}
.saisie:focus-visible { outline: none; border-color: var(--encre); }
.saisie[aria-invalid="true"] { border-color: #B3261E; }
.saisie-mdp { position: relative; }
.saisie-mdp .saisie { padding-right: 104px; }
.btn-afficher {
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  min-height: 42px;
  padding: 0 14px;
  border-radius: 12px;
  background: var(--fond);
  font-size: 14px;
  font-weight: 700;
}
.aide { font-size: 14px; color: var(--doux); }
.erreur { font-size: 15px; font-weight: 600; color: #B3261E; }

.puces { display: flex; flex-wrap: wrap; gap: 8px; }
.puce {
  min-height: 44px;
  padding: 0 16px;
  border-radius: 999px;
  border: 2px solid var(--encre);
  font-size: 15px;
  font-weight: 700;
}
.puce[aria-pressed="true"] { background: var(--encre); color: var(--surface); }
.carte-bloc .puce { border-color: var(--gris); }
.carte-bloc .puce[aria-pressed="true"] { border-color: var(--encre); }

.choix-service { display: flex; flex-direction: column; gap: 8px; margin-bottom: 8px; }
.option-service {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 64px;
  padding: 0 20px;
  border-radius: 20px;
  border: 2px solid transparent;
  background: var(--surface);
  font-size: 18px;
  font-weight: 700;
}
.option-service::after {
  content: "";
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: 2px solid var(--gris);
}
.option-service[aria-checked="true"] { border-color: var(--encre); }
.option-service[aria-checked="true"]::after { border: 7px solid var(--encre); }

/* Profil */
.profil-tete { display: flex; align-items: center; gap: 16px; margin-bottom: 4px; }
.avatar {
  display: grid;
  place-items: center;
  width: 88px;
  height: 88px;
  flex: none;
  border-radius: 50%;
  background: var(--lime);
  font-family: var(--police-titre);
  font-weight: 800;
  font-stretch: 75%;
  font-size: 48px;
}
.profil-noms { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.profil-prenom {
  font-family: var(--police-titre);
  font-weight: 800;
  font-stretch: 75%;
  font-size: 48px;
  line-height: 0.9;
  letter-spacing: -0.03em;
  overflow-wrap: anywhere;
}
.profil-email { font-size: 15px; font-weight: 600; overflow-wrap: anywhere; }
.profil-depuis { font-size: 14px; color: var(--doux); }

.bienvenue {
  padding: 14px 18px;
  border-radius: 20px;
  background: var(--encre);
  color: var(--surface);
  font-size: 16px;
  font-weight: 600;
}

.profil-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin-top: 4px; }
.btn-danger { color: #B3261E; }

/* =========================================================
   Erreur de chargement
   ========================================================= */
.ecran-erreur {
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: calc(32px + env(safe-area-inset-top)) var(--marge) 32px;
}
.ecran-erreur code { font-size: 16px; font-weight: 700; }
