/* çaMeuble — feuille de style unique. Reprend la maquette validée, en plein écran. */

:root {
  --ground: #ECEEE9;
  --ground-2: #E1E4DD;
  --surface: #FFFFFF;
  --surface-2: #F4F6F2;
  --ink: #1A1E1A;
  --ink-2: #5A625A;
  --ink-3: #8B938A;
  --line: #DBDFD6;
  --line-2: #C6CBC1;
  --accent: #A96A12;
  --accent-soft: #F4E8D6;
  --on-accent: #FFFBF4;
  --ok: #2F7A55;
  --ok-soft: #DEEDE4;
  --on-ok: #F5FBF7;
  --info: #2F62A8;
  --info-soft: #DCE6F6;
  --alerte: #B3261E;
  --alerte-soft: #FBE7E5;
  --scrim: rgba(20, 24, 20, .42);
  --ombre: 0 1px 2px rgba(26, 30, 26, .06), 0 8px 24px rgba(26, 30, 26, .07);

  --police-titre: ui-rounded, "SF Pro Rounded", "Hiragino Maru Gothic ProN", system-ui, sans-serif;
  --police: -apple-system, BlinkMacSystemFont, system-ui, "Segoe UI", sans-serif;
  --police-chiffre: ui-monospace, "SF Mono", SFMono-Regular, Menlo, monospace;

  --marge-haut: env(safe-area-inset-top, 0px);
  --marge-bas: env(safe-area-inset-bottom, 0px);
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --ground: #121412;
    --ground-2: #1B1E1A;
    --surface: #1E211E;
    --surface-2: #262A25;
    --ink: #ECEFE8;
    --ink-2: #A5ADA3;
    --ink-3: #798177;
    --line: #2F342E;
    --line-2: #3C423B;
    --accent: #E0A552;
    --accent-soft: #3A2F1C;
    --on-accent: #17150F;
    --ok: #62BB8C;
    --ok-soft: #1E3A2C;
    --on-ok: #0E2419;
    --info: #7FA8E0;
    --info-soft: #1B2A44;
    --alerte: #F0938B;
    --alerte-soft: #3B1D1A;
    --scrim: rgba(0, 0, 0, .55);
    --ombre: 0 1px 2px rgba(0, 0, 0, .45), 0 8px 24px rgba(0, 0, 0, .35);
  }
}

:root[data-theme="dark"] {
  --ground: #121412;
  --ground-2: #1B1E1A;
  --surface: #1E211E;
  --surface-2: #262A25;
  --ink: #ECEFE8;
  --ink-2: #A5ADA3;
  --ink-3: #798177;
  --line: #2F342E;
  --line-2: #3C423B;
  --accent: #E0A552;
  --accent-soft: #3A2F1C;
  --on-accent: #17150F;
  --ok: #62BB8C;
  --ok-soft: #1E3A2C;
  --on-ok: #0E2419;
  --info: #7FA8E0;
  --info-soft: #1B2A44;
  --alerte: #F0938B;
  --alerte-soft: #3B1D1A;
  --scrim: rgba(0, 0, 0, .55);
  --ombre: 0 1px 2px rgba(0, 0, 0, .45), 0 8px 24px rgba(0, 0, 0, .35);
}

* { box-sizing: border-box; }

html, body {
  height: 100%;
  margin: 0;
  overscroll-behavior-y: none;
}

body {
  background: var(--surface-2);
  color: var(--ink);
  font-family: var(--police);
  font-size: 15px;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
}

button, input, select, textarea { font-family: inherit; color: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.invisible { display: none !important; }

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; }
}

/* ------------------------------------------------------------------ écrans -- */

#app { height: 100%; }

.ecran {
  position: fixed;
  inset: 0;
  display: none;
  flex-direction: column;
  background: var(--surface-2);
}
.ecran.actif { display: flex; }

.defile {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding-bottom: calc(96px + var(--marge-bas));
}

/* ------------------------------------------------------------- code d'accès -- */

#ecran-code { justify-content: center; align-items: center; background: var(--ground); }

.bloc-code {
  width: 100%;
  max-width: 340px;
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  text-align: center;
}
.bloc-code .logo { width: 76px; height: 76px; border-radius: 20px; align-self: center; box-shadow: var(--ombre); }
.bloc-code h1 { margin: 6px 0 0; font-family: var(--police-titre); font-size: 30px; letter-spacing: -.03em; }
.bloc-code h1 em { font-style: normal; color: var(--accent); }
.bloc-code p { margin: 0; font-size: 14px; line-height: 1.5; color: var(--ink-2); }
.bloc-code input {
  font-size: 17px;
  text-align: center;
  padding: 14px;
  border-radius: 14px;
  border: 1px solid var(--line-2);
  background: var(--surface);
  letter-spacing: .04em;
}
.bloc-code .erreur { color: var(--alerte); font-weight: 600; min-height: 1.2em; }

/* ------------------------------------------------------------------ entête -- */

.entete {
  flex: none;
  padding: calc(var(--marge-haut) + 10px) 16px 0;
  background: var(--surface-2);
}
.entete-ligne { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.entete h1 { margin: 0; font-family: var(--police-titre); font-size: 22px; letter-spacing: -.02em; }
.entete h1 em { font-style: normal; color: var(--accent); }

.fantome {
  border: 1px solid var(--line-2);
  background: transparent;
  color: var(--ink-2);
  font-size: 13px;
  font-weight: 600;
  padding: 8px 13px;
  border-radius: 99px;
  min-height: 36px;
}
.fantome:active { background: var(--ground-2); }

/* --------------------------------------------------------------- le chiffre -- */

.chiffre { padding: 12px 16px 14px; display: flex; flex-direction: column; gap: 10px; }
.chiffre .etiquette {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--ink-3);
}
.chiffre .montant {
  font-family: var(--police-titre);
  font-size: 44px;
  font-weight: 700;
  letter-spacing: -.035em;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}
.chiffre .montant span { font-size: 18px; font-weight: 600; color: var(--ink-3); margin-left: 6px; letter-spacing: 0; }

.jauge { display: flex; gap: 2px; height: 7px; border-radius: 99px; background: var(--line); overflow: hidden; }
.jauge i { display: block; height: 100%; }
.jauge .sorti { background: var(--ok); }
.jauge .a-sortir { background: var(--info); }

.legende { display: flex; flex-wrap: wrap; gap: 5px 14px; font-size: 12px; color: var(--ink-2); }
.legende span { display: inline-flex; align-items: center; gap: 6px; }
.legende b { color: var(--ink); font-weight: 600; font-variant-numeric: tabular-nums; }
.point { width: 8px; height: 8px; border-radius: 99px; flex: none; display: inline-block; }
.point.sorti { background: var(--ok); }
.point.a-sortir { background: var(--info); }
.point.libre { background: var(--line-2); }

.enveloppe {
  display: block;
  width: 100%;
  text-align: left;
  background: transparent;
  border: 0;
  padding: 2px 0 0;
  font-size: 11.5px;
  line-height: 1.45;
  color: var(--ink-3);
}
.enveloppe u { text-decoration: none; border-bottom: 1px dotted var(--line-2); }

/* ------------------------------------------------------------------ filtres -- */

.filtres { padding: 0 16px 10px; display: flex; flex-direction: column; gap: 8px; }

.bande {
  display: flex;
  gap: 7px;
  overflow-x: auto;
  padding: 2px 0 4px;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}
.bande::-webkit-scrollbar { display: none; }

.pastille {
  flex: none;
  white-space: nowrap;
  border: 1px solid var(--line-2);
  background: transparent;
  color: var(--ink-2);
  font-size: 12.5px;
  font-weight: 600;
  padding: 7px 12px;
  border-radius: 99px;
  min-height: 34px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.pastille[aria-pressed="false"] { opacity: .4; }
.pastille .point { border: 1.5px solid var(--ink-3); background: transparent; }
.pastille.choisir .point { background: var(--accent-soft); border-color: var(--accent); }
.pastille.valide .point { background: var(--info-soft); border-color: var(--info); }
.pastille.achete .point { background: var(--ok); border-color: var(--ok); }

/* -------------------------------------------------------------------- liste -- */

.liste { padding: 0 16px; }
.groupe + .groupe { margin-top: 18px; }
.groupe-tete {
  position: sticky;
  top: 0;
  z-index: 2;
  background: var(--surface-2);
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  padding: 8px 2px;
}
.groupe-tete h2 { margin: 0; font-family: var(--police-titre); font-size: 15px; letter-spacing: -.01em; }
.groupe-tete .total {
  font-family: var(--police-chiffre);
  font-size: 12.5px;
  color: var(--ink-2);
  font-variant-numeric: tabular-nums;
}
.groupe-tete .total.vide { color: var(--ink-3); }
.cartes { display: flex; flex-direction: column; gap: 8px; }

.poste {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  text-align: left;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 10px;
  color: inherit;
}
.poste:active { background: var(--surface-2); }
.poste .corps { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.poste .titre { font-size: 15px; font-weight: 600; letter-spacing: -.01em; }
.poste .meta { display: flex; align-items: center; gap: 7px; flex-wrap: wrap; font-size: 12px; color: var(--ink-3); }
.poste .droite { flex: none; text-align: right; }

.vignette {
  width: 54px;
  height: 54px;
  border-radius: 12px;
  flex: none;
  background: var(--accent-soft);
  color: var(--accent);
  display: grid;
  place-items: center;
  overflow: hidden;
  border: 0;
  padding: 0;
  position: relative;
}
.vignette img { width: 100%; height: 100%; object-fit: cover; display: block; }
.vignette svg { width: 30px; height: 30px; }
.vignette .compte {
  position: absolute;
  right: 3px;
  bottom: 3px;
  background: var(--ink);
  color: var(--surface);
  font-family: var(--police-chiffre);
  font-size: 9.5px;
  font-weight: 700;
  padding: 1px 5px;
  border-radius: 99px;
}

.prix { font-family: var(--police-chiffre); font-size: 14px; font-weight: 600; font-variant-numeric: tabular-nums; }
.prix.aucun { color: var(--ink-3); font-weight: 500; font-size: 12.5px; }

.gelule {
  font-size: 10.5px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 99px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.gelule.idee { border: 1px solid var(--line-2); color: var(--ink-3); }
.gelule.choisir { border: 1px solid var(--accent); color: var(--accent); }
.gelule.valide { background: var(--info-soft); color: var(--info); border: 1px solid var(--info); }
.gelule.achete { background: var(--ok); color: var(--on-ok); border: 1px solid var(--ok); }
.gelule.achete::before { content: "\2713"; font-size: 10px; }

.rien-prevu {
  width: 100%;
  border: 1px dashed var(--line-2);
  background: transparent;
  color: var(--ink-3);
  border-radius: 14px;
  padding: 13px;
  font-size: 12.5px;
  font-weight: 600;
  text-align: center;
}
.rien-filtre { margin: 0; padding: 2px 4px 6px; font-size: 12px; font-style: italic; color: var(--ink-3); }

/* -------------------------------------------------------------------- rond -- */

.rond-ajout {
  position: fixed;
  right: 18px;
  bottom: calc(20px + var(--marge-bas));
  width: 58px;
  height: 58px;
  border-radius: 50%;
  border: 0;
  background: var(--accent);
  color: var(--on-accent);
  box-shadow: var(--ombre);
  display: grid;
  place-items: center;
  z-index: 3;
}
.rond-ajout svg { width: 26px; height: 26px; }

/* ----------------------------------------------------------------- un poste -- */

.barre-nav {
  flex: none;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: calc(var(--marge-haut) + 8px) 8px 10px;
  background: var(--surface-2);
}
.retour {
  border: 0;
  background: transparent;
  color: var(--accent);
  font-size: 16px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 8px;
  min-height: 44px;
}
.barre-nav .titre-nav { flex: 1; text-align: center; font-family: var(--police-titre); font-size: 16px; font-weight: 700; }
.barre-nav .fin { min-width: 76px; display: flex; justify-content: flex-end; gap: 6px; }

.corps-poste { padding: 0 16px; display: flex; flex-direction: column; gap: 14px; }
.tete-poste { display: flex; flex-direction: column; gap: 10px; }
.tete-poste h2 {
  margin: 0;
  font-family: var(--police-titre);
  font-size: 26px;
  letter-spacing: -.025em;
  line-height: 1.15;
  text-wrap: balance;
}
.ligne-meta { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--ink-2); }
.sous-titre { font-size: 11px; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; color: var(--ink-3); }

.segments {
  display: flex;
  padding: 3px;
  gap: 3px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 13px;
}
.segments button {
  flex: 1;
  border: 0;
  background: transparent;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--ink-2);
  padding: 9px 3px;
  border-radius: 10px;
}
.segments button[aria-pressed="true"] { background: var(--ink); color: var(--surface); }

.options { display: flex; flex-direction: column; gap: 10px; }

.option {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 11px;
}
.option.retenue { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent); }
.option .haut { display: flex; gap: 12px; }
.photo {
  width: 78px;
  height: 78px;
  border-radius: 12px;
  flex: none;
  display: grid;
  place-items: center;
  background: var(--surface-2);
  border: 1px solid var(--line);
  color: var(--ink-3);
  overflow: hidden;
  padding: 0;
  position: relative;
}
.photo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.photo svg { width: 34px; height: 34px; }
.photo .compte {
  position: absolute;
  right: 3px;
  bottom: 3px;
  background: var(--ink);
  color: var(--surface);
  font-family: var(--police-chiffre);
  font-size: 9.5px;
  font-weight: 700;
  padding: 1px 5px;
  border-radius: 99px;
}
.option .infos { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.enseigne { font-size: 10.5px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--ink-3); }
.modele { font-size: 15px; font-weight: 600; letter-spacing: -.01em; }
.mesures { font-family: var(--police-chiffre); font-size: 11.5px; color: var(--ink-2); }
.option .montant { font-family: var(--police-chiffre); font-size: 17px; font-weight: 700; font-variant-numeric: tabular-nums; }
.lien-fiche {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  align-self: flex-start;
  margin-top: 3px;
  color: var(--info);
  font-size: 12px;
  font-weight: 600;
  text-decoration: none;
}
.lien-fiche svg { width: 12px; height: 12px; flex: none; }
.sans-fiche { margin-top: 3px; font-size: 11.5px; font-style: italic; color: var(--ink-3); }

.actions { display: flex; gap: 7px; align-items: center; border-top: 1px solid var(--line); padding-top: 11px; }
.retenir {
  flex: 1;
  border: 1px solid var(--line-2);
  background: transparent;
  color: var(--ink-2);
  border-radius: 11px;
  padding: 11px;
  font-size: 13px;
  font-weight: 600;
}
.option.retenue .retenir { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.icone-action {
  border: 1px solid var(--line-2);
  background: transparent;
  color: var(--ink-3);
  border-radius: 11px;
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
}
.icone-action svg { width: 17px; height: 17px; }
.icone-action.danger { color: var(--alerte); border-color: var(--alerte-soft); }

.ajouter-option {
  border: 1px dashed var(--line-2);
  background: transparent;
  color: var(--ink-2);
  border-radius: 14px;
  padding: 14px;
  font-size: 13.5px;
  font-weight: 600;
}
.vide-options {
  border: 1px dashed var(--line-2);
  border-radius: 14px;
  padding: 22px 14px;
  text-align: center;
  color: var(--ink-3);
  font-size: 13.5px;
  line-height: 1.5;
}

/* ---------------------------------------------------------------- formulaire */

.formulaire { padding: 0 16px; display: flex; flex-direction: column; gap: 14px; }
.etape { background: var(--surface); border: 1px solid var(--line); border-radius: 18px; padding: 14px; display: flex; gap: 12px; }
.etape .numero {
  width: 25px;
  height: 25px;
  flex: none;
  border-radius: 99px;
  background: var(--ink);
  color: var(--surface);
  display: grid;
  place-items: center;
  font-family: var(--police-chiffre);
  font-size: 12px;
  font-weight: 700;
}
.etape .texte { flex: 1; min-width: 0; }
.etape h3 { margin: 0 0 3px; font-family: var(--police-titre); font-size: 15px; }
.etape p { margin: 0; font-size: 13px; line-height: 1.5; color: var(--ink-2); }

.champs { display: flex; gap: 9px; margin-top: 11px; }
.champ { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 5px; }
.champ label { font-size: 10.5px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--ink-3); }
.champ input, .champ select {
  font-size: 16px;
  width: 100%;
  padding: 11px 10px;
  border-radius: 10px;
  border: 1px solid var(--line-2);
  background: var(--surface-2);
  -webkit-appearance: none;
  appearance: none;
}
.champ select { background-image: none; }
.aide { margin: 8px 0 0; font-size: 12px; color: var(--ink-3); line-height: 1.5; }

.emplacements { display: flex; gap: 8px; margin-top: 11px; flex-wrap: wrap; }
.emplacement {
  width: calc(33.333% - 6px);
  aspect-ratio: 1;
  border-radius: 12px;
  border: 1px dashed var(--line-2);
  background: var(--surface-2);
  color: var(--ink-3);
  padding: 6px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  font-size: 9.5px;
  text-align: center;
  line-height: 1.25;
  overflow: hidden;
  position: relative;
}
.emplacement img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.emplacement svg { width: 20px; height: 20px; }
.emplacement .retirer {
  position: absolute;
  top: 3px;
  right: 3px;
  width: 22px;
  height: 22px;
  border-radius: 99px;
  border: 0;
  background: var(--scrim);
  color: #fff;
  display: grid;
  place-items: center;
  font-size: 13px;
  line-height: 1;
}

.principal {
  flex: none;
  margin: 12px 16px calc(14px + var(--marge-bas));
  padding: 16px;
  border-radius: 14px;
  border: 0;
  background: var(--accent);
  color: var(--on-accent);
  font-size: 16px;
  font-weight: 700;
}
.principal[disabled] { opacity: .5; }

/* ------------------------------------------------------------- feuilles bas -- */

.feuille {
  position: fixed;
  inset: 0;
  z-index: 10;
  background: var(--scrim);
  display: none;
  align-items: flex-end;
}
.feuille.ouverte { display: flex; }
.feuille-carte {
  width: 100%;
  max-height: 86%;
  background: var(--surface);
  border-radius: 24px 24px 0 0;
  padding: 18px 16px calc(18px + var(--marge-bas));
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.feuille-tete { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; }
.feuille-tete h3 { margin: 0; font-family: var(--police-titre); font-size: 17px; }
.feuille p { margin: 0; font-size: 13px; color: var(--ink-2); line-height: 1.5; }

.choix {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  text-align: left;
  width: 100%;
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 14px;
  color: inherit;
}
.choix .rond {
  width: 38px;
  height: 38px;
  flex: none;
  border-radius: 11px;
  background: var(--accent-soft);
  color: var(--accent);
  display: grid;
  place-items: center;
}
.choix .rond svg { width: 20px; height: 20px; }
.choix b { display: block; font-size: 14.5px; font-weight: 600; }
.choix i { display: block; font-style: normal; font-size: 12.5px; line-height: 1.45; color: var(--ink-2); margin-top: 2px; }

/* ------------------------------------------------------------------ budget --- */

.budget-total {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 12px 13px;
}
.budget-total b { font-size: 14.5px; }
.lignes-budget { display: flex; flex-direction: column; flex: 1; min-height: 0; overflow-y: auto; }
.ligne-budget { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 2px; }
.ligne-budget + .ligne-budget { border-top: 1px solid var(--line); }
.ligne-budget label { display: flex; flex-direction: column; gap: 2px; font-size: 14px; font-weight: 600; }
.ligne-budget label span { font-family: var(--police-chiffre); font-size: 11.5px; font-weight: 500; color: var(--ink-3); }
.ligne-budget input, .budget-total input {
  width: 108px;
  flex: none;
  text-align: right;
  font-family: var(--police-chiffre);
  font-size: 16px;
  padding: 10px 9px;
  border-radius: 10px;
  border: 1px solid var(--line-2);
  background: var(--surface);
}
.ligne-budget.depasse { background: var(--alerte-soft); border-radius: 10px; padding-left: 8px; padding-right: 8px; }
.ligne-budget.depasse label { color: var(--alerte); }
.ligne-budget.depasse label span { color: var(--alerte); font-weight: 700; }
.ligne-budget.depasse input { border-color: var(--alerte); color: var(--alerte); font-weight: 700; }
.resume-budget { font-size: 12.5px; line-height: 1.5; color: var(--ink-2); }
.resume-budget.depasse { color: var(--alerte); }

/* ------------------------------------------------------------- visionneuse --- */

.nav-photos { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.nav-photos .fleche {
  width: 40px;
  height: 40px;
  flex: none;
  border-radius: 50%;
  border: 1px solid var(--line-2);
  background: transparent;
  color: var(--ink-2);
  display: grid;
  place-items: center;
}
.nav-photos .fleche svg { width: 16px; height: 16px; }
.nav-photos .fleche[disabled] { opacity: .3; }
.grande {
  flex: 1;
  min-width: 0;
  aspect-ratio: 4 / 3;
  border-radius: 16px;
  background: var(--surface-2);
  border: 1px solid var(--line);
  display: grid;
  place-items: center;
  overflow: hidden;
  color: var(--ink-3);
}
.grande img { width: 100%; height: 100%; object-fit: contain; display: block; }
.legende-photo { text-align: center; }
.legende-photo b { display: block; font-size: 14px; font-weight: 600; }
.legende-photo span {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 11.5px;
  color: var(--ink-3);
  margin-top: 3px;
}
.legende-photo span svg { width: 11px; height: 11px; }
.pellicule { display: flex; gap: 8px; overflow-x: auto; padding: 2px; }
.pellicule button {
  width: 56px;
  height: 56px;
  flex: none;
  padding: 0;
  border-radius: 11px;
  background: var(--surface-2);
  border: 1px solid var(--line);
  display: grid;
  place-items: center;
  overflow: hidden;
  color: var(--ink-3);
}
.pellicule button.courante { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent); }
.pellicule img { width: 100%; height: 100%; object-fit: cover; display: block; }

/* ------------------------------------------------------------- état réseau --- */

.bandeau {
  flex: none;
  display: none;
  align-items: center;
  gap: 8px;
  margin: 0 16px 8px;
  padding: 9px 12px;
  border-radius: 12px;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 12.5px;
  font-weight: 600;
}
.bandeau.visible { display: flex; }
.bandeau svg { width: 15px; height: 15px; flex: none; }

.mot {
  position: fixed;
  left: 50%;
  transform: translateX(-50%);
  bottom: calc(90px + var(--marge-bas));
  z-index: 20;
  max-width: calc(100% - 32px);
  padding: 11px 16px;
  border-radius: 99px;
  background: var(--ink);
  color: var(--surface);
  font-size: 13px;
  font-weight: 600;
  box-shadow: var(--ombre);
  opacity: 0;
  pointer-events: none;
  transition: opacity .18s ease;
}
.mot.visible { opacity: 1; }

/* ------------------------------------------------------------ grands écrans -- */

/*
 * L'app est faite pour un téléphone. Sur un ordinateur, on garde exactement la
 * même mise en page mais dans une colonne centrée : sans ça, un bouton de pièce
 * vide s'étire sur toute la largeur de l'écran et la lecture se casse.
 */
@media (min-width: 700px) {
  .entete,
  .barre-nav,
  .principal,
  .liste,
  .corps-poste,
  .formulaire {
    width: 100%;
    max-width: 620px;
    margin-left: auto;
    margin-right: auto;
  }

  .rond-ajout { right: calc(50% - 310px); }

  .feuille { justify-content: center; align-items: center; }
  .feuille-carte {
    max-width: 620px;
    max-height: min(86%, 760px);
    border-radius: 24px;
  }
}

.version { margin: 2px 0 0; font-size: 11px; color: var(--ink-3); text-align: right; }
