/* Invités de thèse — style iOS, verre dépoli. */

:root {
  --fond: #f2f2f7;
  --tache-1: rgba(255, 170, 125, 0.7);
  --tache-2: rgba(140, 160, 255, 0.65);
  --tache-3: rgba(255, 150, 200, 0.55);
  --verre: rgba(255, 255, 255, 0.55);
  --verre-fort: rgba(255, 255, 255, 0.78);
  --liseré: rgba(255, 255, 255, 0.75);
  --ombre: 0 8px 30px rgba(30, 30, 60, 0.08), 0 1px 2px rgba(30, 30, 60, 0.05);
  --texte: #1c1c1e;
  --texte-2: rgba(60, 60, 67, 0.62);
  --texte-3: rgba(60, 60, 67, 0.35);
  --separateur: rgba(60, 60, 67, 0.16);
  --remplissage: rgba(118, 118, 128, 0.12);
  --accent: #007aff;
  --danger: #ff3b30;
  --voile: rgba(0, 0, 0, 0.22);
  --flou: blur(28px) saturate(180%);
  --courbe: cubic-bezier(0.22, 1, 0.36, 1);
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root {
    --fond: #000;
    --tache-1: rgba(255, 120, 70, 0.28);
    --tache-2: rgba(90, 110, 255, 0.32);
    --tache-3: rgba(220, 70, 160, 0.24);
    --verre: rgba(44, 44, 48, 0.5);
    --verre-fort: rgba(44, 44, 48, 0.78);
    --liseré: rgba(255, 255, 255, 0.1);
    --ombre: 0 8px 30px rgba(0, 0, 0, 0.35);
    --texte: #fff;
    --texte-2: rgba(235, 235, 245, 0.6);
    --texte-3: rgba(235, 235, 245, 0.3);
    --separateur: rgba(84, 84, 88, 0.55);
    --remplissage: rgba(118, 118, 128, 0.24);
    --accent: #0a84ff;
    --danger: #ff453a;
    --voile: rgba(0, 0, 0, 0.5);
    color-scheme: dark;
  }
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }

html { background: var(--fond); }

body {
  margin: 0;
  min-height: 100dvh;
  background: var(--fond);
  color: var(--texte);
  font: 17px/1.35 -apple-system, BlinkMacSystemFont, "SF Pro Text", system-ui, "Segoe UI", Roboto, sans-serif;
  letter-spacing: -0.01em;
  -webkit-font-smoothing: antialiased;
  overscroll-behavior-y: none;
}

button, input, textarea { font: inherit; color: inherit; letter-spacing: inherit; }
button { background: none; border: 0; padding: 0; cursor: pointer; }
a { color: inherit; text-decoration: none; }
[hidden] { display: none !important; }
svg.lucide { width: 1em; height: 1em; stroke-width: 2; flex: none; }

/* Taches colorées derrière le verre : sans elles, le flou n'a rien à montrer. */
.fond-flou {
  position: fixed;
  inset: -20%;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(38% 30% at 18% 14%, var(--tache-1), transparent 70%),
    radial-gradient(40% 32% at 88% 22%, var(--tache-2), transparent 70%),
    radial-gradient(46% 34% at 50% 92%, var(--tache-3), transparent 70%);
  filter: blur(30px);
}

.verre {
  background: var(--verre);
  -webkit-backdrop-filter: var(--flou);
  backdrop-filter: var(--flou);
  box-shadow: var(--ombre), inset 0 0 0 0.5px var(--liseré);
}

/* --- Barre du haut --------------------------------------------------------- */

.barre-nav {
  position: sticky;
  top: 0;
  z-index: 20;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 8px;
  padding: calc(env(safe-area-inset-top) + 6px) 16px 8px;
  min-height: calc(env(safe-area-inset-top) + 52px);
  transition: background 200ms ease-out, box-shadow 200ms ease-out;
}
.barre-nav.defile {
  background: var(--verre);
  -webkit-backdrop-filter: var(--flou);
  backdrop-filter: var(--flou);
  box-shadow: 0 0.5px 0 var(--separateur);
}
.barre-nav .titre-compact {
  font-size: 17px;
  font-weight: 600;
  opacity: 0;
  transform: translateY(4px);
  transition: opacity 200ms ease-out, transform 200ms ease-out;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 50vw;
}
.barre-nav.defile .titre-compact { opacity: 1; transform: none; }
.barre-nav .gauche { justify-self: start; display: flex; }
.barre-nav .droite { justify-self: end; display: flex; gap: 10px; }

.retour {
  display: flex;
  align-items: center;
  gap: 2px;
  height: 40px;
  padding: 0 14px 0 8px;
  border-radius: 999px;
  color: var(--accent);
  font-size: 17px;
}
.retour svg.lucide { font-size: 26px; stroke-width: 2.4; }

.bouton-rond {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: var(--texte);
  font-size: 21px;
}
.bouton-capsule {
  height: 40px;
  padding: 0 16px;
  border-radius: 999px;
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 16px;
  font-weight: 500;
}
.bouton-rond:active, .bouton-capsule:active, .retour:active { transform: scale(0.94); }
.bouton-rond, .bouton-capsule, .retour { transition: transform 160ms var(--courbe); }

/* --- Contenu --------------------------------------------------------------- */

#vue { min-height: 100dvh; }

.contenu {
  max-width: 760px;
  margin: 0 auto;
  padding: 0 16px calc(env(safe-area-inset-bottom) + 120px);
}

.grand-titre {
  margin: 2px 0 2px;
  font-size: 34px;
  font-weight: 700;
  letter-spacing: -0.025em;
  line-height: 1.15;
}
.sous-titre { margin: 0 0 16px; color: var(--texte-2); font-size: 15px; }

.entete-section {
  margin: 28px 4px 10px;
  font-size: 13px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  color: var(--texte-2);
  display: flex;
  justify-content: space-between;
  align-items: baseline;
}
.entete-section .compte { text-transform: none; letter-spacing: 0; }

.recherche {
  display: flex;
  align-items: center;
  gap: 6px;
  height: 38px;
  padding: 0 10px;
  border-radius: 12px;
  background: var(--remplissage);
  color: var(--texte-2);
}
.recherche svg.lucide { font-size: 17px; }
.recherche input {
  flex: 1;
  min-width: 0;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--texte);
  font-size: 17px;
}
.recherche input::placeholder { color: var(--texte-2); }
.recherche input::-webkit-search-cancel-button { display: none; }

/* --- Thrombinoscope -------------------------------------------------------- */

.grille {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
  gap: 18px 12px;
}

.carte-personne {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  min-width: 0;
  transition: transform 160ms var(--courbe);
}
.carte-personne:active { transform: scale(0.96); }
.carte-personne .avatar { width: 100%; aspect-ratio: 1; border-radius: 24px; font-size: 30px; }
.carte-personne .prenom {
  margin-top: 8px;
  font-size: 15px;
  font-weight: 600;
  max-width: 100%;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.carte-personne .infos {
  margin-top: 1px;
  font-size: 12.5px;
  line-height: 1.3;
  color: var(--texte-2);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  overflow-wrap: anywhere;
}

.avatar {
  position: relative;
  display: grid;
  place-items: center;
  overflow: hidden;
  flex: none;
  background: var(--remplissage);
  color: #fff;
  font-weight: 600;
  letter-spacing: 0;
  box-shadow: var(--ombre), inset 0 0 0 0.5px var(--liseré);
}
.avatar img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  /* Les visages sont plutôt en haut du cadre. */
  object-position: 50% 30%;
}
.avatar .marque-groupe {
  position: absolute;
  right: 6px;
  bottom: 6px;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 13px;
  color: var(--texte);
  background: var(--verre-fort);
  -webkit-backdrop-filter: var(--flou);
  backdrop-filter: var(--flou);
}

.vide {
  margin-top: 28px;
  padding: 36px 24px;
  border-radius: 28px;
  text-align: center;
  color: var(--texte-2);
}
.vide .icone-vide { font-size: 40px; color: var(--texte-3); margin-bottom: 10px; }
.vide strong { display: block; color: var(--texte); font-size: 19px; margin-bottom: 4px; }
.vide p { margin: 0 0 20px; font-size: 15px; }

/* --- Bouton principal ------------------------------------------------------ */

.bouton-plein {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 50px;
  padding: 0 22px;
  border-radius: 999px;
  background: var(--accent);
  color: #fff;
  font-size: 17px;
  font-weight: 600;
  transition: transform 160ms var(--courbe), opacity 160ms;
}
.bouton-plein:active { transform: scale(0.97); }
.bouton-plein.large { width: 100%; }
.bouton-plein.discret { background: var(--verre-fort); color: var(--accent); }

.bouton-danger {
  display: block;
  width: 100%;
  margin-top: 36px;
  height: 50px;
  border-radius: 16px;
  color: var(--danger);
  font-size: 17px;
}

.lien { color: var(--accent); font-size: 17px; }
.lien.fort { font-weight: 600; }
.lien:disabled { color: var(--texte-3); }

/* --- Fiche d'une personne -------------------------------------------------- */

.fiche-entete { display: flex; flex-direction: column; align-items: center; padding-top: 4px; }

.photo-fiche { position: relative; width: min(100%, 340px); transition: transform 160ms var(--courbe); }
.photo-fiche:active { transform: scale(0.98); }
.photo-fiche .avatar { width: 100%; aspect-ratio: 1; border-radius: 36px; font-size: 110px; }
.photo-fiche .pastille {
  position: absolute;
  right: 12px;
  bottom: 12px;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 18px;
}

.champ-titre {
  width: 100%;
  margin-top: 16px;
  border: 0;
  outline: 0;
  background: transparent;
  text-align: center;
  font-size: 30px;
  font-weight: 700;
  letter-spacing: -0.02em;
}
.champ-titre.gauche { text-align: left; margin-top: 2px; font-size: 34px; letter-spacing: -0.025em; }
.champ-infos {
  width: 100%;
  border: 0;
  outline: 0;
  background: transparent;
  text-align: center;
  font-size: 16px;
  color: var(--texte-2);
}
.champ-titre::placeholder, .champ-infos::placeholder { color: var(--texte-3); }

.segments {
  display: grid;
  grid-template-columns: 1fr 1fr;
  padding: 2px;
  border-radius: 10px;
  background: var(--remplissage);
  position: relative;
}
.segments button {
  position: relative;
  z-index: 1;
  height: 32px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 500;
  transition: color 200ms;
}
.segments .curseur {
  position: absolute;
  top: 2px;
  bottom: 2px;
  left: 2px;
  width: calc(50% - 2px);
  border-radius: 8px;
  background: var(--verre-fort);
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.12), 0 0 0 0.5px rgba(0, 0, 0, 0.04);
  transition: transform 260ms var(--courbe);
}
.segments[data-choix="groupe"] .curseur { transform: translateX(100%); }
@media (prefers-color-scheme: dark) { .segments .curseur { background: rgba(99, 99, 102, 0.9); } }

.carte-texte { margin-top: 12px; border-radius: 22px; padding: 4px; }
.champ-texte {
  display: block;
  width: 100%;
  min-height: 180px;
  padding: 14px 14px;
  border: 0;
  outline: 0;
  resize: none;
  background: transparent;
  font-size: 17px;
  line-height: 1.5;
  field-sizing: content;
}
.champ-texte::placeholder { color: var(--texte-3); }

.note {
  margin: 8px 6px 0;
  min-height: 18px;
  font-size: 13px;
  color: var(--texte-2);
  display: flex;
  justify-content: space-between;
  gap: 12px;
}
.etat-enregistrement { transition: opacity 300ms; }

/* --- Listes façon « Réglages » -------------------------------------------- */

.liste { border-radius: 22px; overflow: hidden; }
.liste.espacee { margin-top: 12px; }
.ligne {
  position: relative;
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  min-height: 60px;
  padding: 10px 14px;
  text-align: left;
  background: transparent;
  transition: background 120ms;
}
.ligne:active { background: var(--remplissage); }
.ligne + .ligne::before {
  content: "";
  position: absolute;
  top: 0;
  right: 0;
  left: 70px;
  border-top: 0.5px solid var(--separateur);
}
.ligne.sans-avatar + .ligne::before, .ligne + .ligne.sans-avatar::before { left: 16px; }
.ligne .avatar { width: 44px; height: 44px; border-radius: 50%; font-size: 16px; box-shadow: none; }
.ligne .corps { flex: 1; min-width: 0; }
.ligne .titre { font-size: 17px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ligne .titre.vide-nom { color: var(--texte-2); font-style: italic; }
.ligne .detail {
  font-size: 14px;
  color: var(--texte-2);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.ligne .fin { color: var(--texte-3); font-size: 20px; display: flex; }
.ligne .coche { color: var(--accent); font-size: 22px; display: flex; }
.ligne.action { color: var(--accent); }
.ligne.action .icone-ligne {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--remplissage);
  font-size: 20px;
}

/* Petites photos superposées pour un groupe. */
.pile { display: flex; flex: none; width: 44px; height: 44px; position: relative; }
.pile .avatar {
  position: absolute;
  width: 30px;
  height: 30px;
  font-size: 11px;
  border-radius: 50%;
  box-shadow: 0 0 0 2px var(--verre-fort);
}
.pile .avatar:nth-child(1) { left: 0; top: 0; }
.pile .avatar:nth-child(2) { right: 0; top: 4px; }
.pile .avatar:nth-child(3) { left: 8px; bottom: 0; }
.pile.vide-pile { border-radius: 50%; background: var(--remplissage); display: grid; place-items: center; color: var(--texte-2); }

.poignee-glisser {
  display: grid;
  place-items: center;
  width: 36px;
  height: 44px;
  margin-right: -8px;
  color: var(--texte-3);
  font-size: 20px;
  touch-action: none;
  cursor: grab;
}
.sortable-ghost { opacity: 0.35; }
.sortable-chosen { background: var(--verre-fort); }
.sortable-drag { box-shadow: var(--ombre); border-radius: 16px; }

/* --- Barre d'onglets flottante -------------------------------------------- */

.barre-onglets {
  position: fixed;
  left: 50%;
  bottom: calc(env(safe-area-inset-bottom) + 14px);
  z-index: 30;
  transform: translateX(-50%);
  display: flex;
  gap: 2px;
  padding: 5px;
  border-radius: 999px;
  transition: transform 300ms var(--courbe), opacity 200ms;
}
.barre-onglets.cachee { transform: translate(-50%, 140%); opacity: 0; pointer-events: none; }
.onglet {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1px;
  width: 104px;
  height: 54px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
  color: var(--texte);
  transition: background 200ms, color 200ms;
}
.onglet svg.lucide { font-size: 23px; }
.onglet.actif { color: var(--accent); background: var(--remplissage); }

/* --- Feuilles et alertes --------------------------------------------------- */

.voile {
  position: fixed;
  inset: 0;
  z-index: 50;
  background: var(--voile);
  animation: apparait 240ms ease-out;
}
.voile.sort { animation: disparait 200ms ease-out forwards; }

.feuille {
  position: fixed;
  left: 0;
  right: 0;
  bottom: var(--clavier, 0px);
  z-index: 51;
  max-width: 560px;
  max-height: calc(100dvh - env(safe-area-inset-top) - 40px - var(--clavier, 0px));
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  border-radius: 30px 30px 0 0;
  padding: 8px 16px calc(env(safe-area-inset-bottom) + 20px);
  background: var(--verre-fort);
  animation: monte 360ms var(--courbe);
}
.feuille.sort { animation: descend 240ms ease-in forwards; }
.feuille .poignee { width: 36px; height: 5px; border-radius: 3px; background: var(--texte-3); margin: 0 auto 6px; flex: none; }
.feuille-entete {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  min-height: 44px;
  flex: none;
}
.feuille-entete strong { font-size: 17px; font-weight: 600; }
.feuille-entete > :first-child { justify-self: start; }
.feuille-entete > :last-child { justify-self: end; }
.feuille-corps { overflow-y: auto; margin: 0 -16px; padding: 4px 16px 4px; }

.choix-photo-ajout {
  display: block;
  margin: 12px auto 18px;
}
.choix-photo-ajout .avatar { width: 112px; height: 112px; border-radius: 32px; color: var(--accent); font-size: 34px; }
.choix-photo-ajout span { display: block; margin-top: 8px; color: var(--accent); font-size: 15px; }

.champs { border-radius: 18px; overflow: hidden; }
.champs input {
  display: block;
  width: 100%;
  height: 50px;
  padding: 0 16px;
  border: 0;
  outline: 0;
  background: transparent;
  font-size: 17px;
}
.champs input + input { border-top: 0.5px solid var(--separateur); }
.champs input::placeholder { color: var(--texte-3); }

.apercu-export {
  border-radius: 20px;
  padding: 16px 18px;
  font-family: "New York", "Iowan Old Style", Georgia, serif;
  font-size: 16px;
  line-height: 1.55;
  white-space: pre-wrap;
}
.apercu-export p { margin: 0 0 1em; }
.actions-export { display: grid; gap: 10px; margin-top: 16px; flex: none; }

.alerte {
  position: fixed;
  top: 50%;
  left: 50%;
  z-index: 61;
  width: min(290px, calc(100vw - 48px));
  transform: translate(-50%, -50%);
  border-radius: 22px;
  overflow: hidden;
  text-align: center;
  background: var(--verre-fort);
  animation: surgit 260ms var(--courbe);
}
.alerte.sort { animation: disparait 160ms ease-out forwards; }
.alerte .texte-alerte { padding: 20px 18px 16px; }
.alerte h3 { margin: 0 0 4px; font-size: 17px; font-weight: 600; }
.alerte p { margin: 0; font-size: 14px; color: var(--texte-2); }
.alerte input {
  width: 100%;
  margin-top: 14px;
  height: 36px;
  padding: 0 10px;
  border-radius: 9px;
  border: 0;
  outline: 0;
  background: var(--remplissage);
  font-size: 16px;
}
.alerte .boutons { display: flex; border-top: 0.5px solid var(--separateur); }
.alerte .boutons button { flex: 1; height: 46px; color: var(--accent); font-size: 17px; }
.alerte .boutons button + button { border-left: 0.5px solid var(--separateur); }
.alerte .boutons .fort { font-weight: 600; }
.alerte .boutons .rouge { color: var(--danger); }
.alerte .boutons.empiles { flex-direction: column; }
.alerte .boutons.empiles button + button { border-left: 0; border-top: 0.5px solid var(--separateur); }
.voile.voile-alerte { z-index: 60; }

.toast {
  position: fixed;
  left: 50%;
  top: calc(env(safe-area-inset-top) + 12px);
  z-index: 70;
  transform: translateX(-50%);
  padding: 10px 18px;
  border-radius: 999px;
  font-size: 15px;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 8px;
  animation: tombe 320ms var(--courbe);
  background: var(--verre-fort);
}
.toast.sort { animation: disparait 200ms ease-out forwards; }

/* --- Transitions entre pages ---------------------------------------------- */

.entree-pousse { animation: pousse 340ms var(--courbe); }
.entree-retour { animation: revient 300ms var(--courbe); }
.entree-fondu { animation: apparait 220ms ease-out; }

@keyframes pousse { from { transform: translateX(28%); opacity: 0; } }
@keyframes revient { from { transform: translateX(-12%); opacity: 0; } }
@keyframes apparait { from { opacity: 0; } }
@keyframes disparait { to { opacity: 0; } }
@keyframes monte { from { transform: translateY(100%); } }
@keyframes descend { to { transform: translateY(100%); } }
@keyframes surgit { from { opacity: 0; transform: translate(-50%, -50%) scale(1.12); } }
@keyframes tombe { from { opacity: 0; transform: translate(-50%, -20px); } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 1ms !important; transition-duration: 1ms !important; }
}

@media (min-width: 700px) {
  .grille { grid-template-columns: repeat(auto-fill, minmax(124px, 1fr)); gap: 24px 16px; }
}

/* --- Statut ---------------------------------------------------------------- */

.carte-personne .statut {
  margin-top: 1px;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--accent);
}

/* Le <select> natif garde la roue de choix d'iOS ; on n'habille que la ligne. */
.ligne-statut {
  position: relative;
  display: flex;
  align-items: center;
  height: 50px;
  padding: 0 16px;
  border-top: 0.5px solid var(--separateur);
  border-bottom: 0.5px solid var(--separateur);
  font-size: 17px;
}
.ligne-statut span { flex: 1; }
.ligne-statut select, .pastille-statut select {
  appearance: none;
  -webkit-appearance: none;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--texte-2);
  font: inherit;
  text-align: right;
  text-align-last: right;
  padding-right: 22px;
  cursor: pointer;
}
.ligne-statut svg.lucide { position: absolute; right: 14px; color: var(--texte-3); pointer-events: none; }

.pastille-statut {
  position: relative;
  display: inline-flex;
  align-items: center;
  margin-top: 12px;
  height: 34px;
  padding: 0 12px 0 14px;
  border-radius: 999px;
  font-size: 15px;
  font-weight: 600;
}
.pastille-statut select { color: var(--accent); text-align: left; text-align-last: left; padding-right: 20px; }
.pastille-statut svg.lucide { position: absolute; right: 12px; color: var(--accent); font-size: 15px; pointer-events: none; }
.pastille-statut.vide select, .pastille-statut.vide svg.lucide { color: var(--texte-2); font-weight: 500; }
.pastilles { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin-top: 12px; }
.pastilles .pastille-statut { margin-top: 0; }
.ligne-statut + .ligne-statut { border-top: 0; }

/* --- Statistiques ---------------------------------------------------------- */

.tuiles { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.tuile {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 14px 14px 12px;
  border-radius: 20px;
  min-width: 0;
}
.tuile strong { font-size: 30px; font-weight: 700; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; line-height: 1.1; }
.tuile span { font-size: 13px; line-height: 1.25; color: var(--texte-2); }

.stats { padding: 6px 0; }
.ligne-stat {
  display: grid;
  grid-template-columns: 118px 1fr 32px;
  align-items: center;
  gap: 12px;
  min-height: 44px;
  padding: 0 16px;
}
.ligne-stat .libelle { font-size: 16px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ligne-stat .piste { height: 8px; border-radius: 4px; background: var(--remplissage); overflow: hidden; }
.ligne-stat .jauge { display: block; height: 100%; border-radius: 4px; background: var(--accent); transition: width 400ms var(--courbe); }
.ligne-stat .nombre { text-align: right; font-size: 16px; font-weight: 600; font-variant-numeric: tabular-nums; }
.ligne-stat.nul .libelle, .ligne-stat.nul .nombre { color: var(--texte-3); }
.ligne-stat.sans .libelle { color: var(--texte-2); font-style: italic; }
.ligne-stat.sans .jauge { background: var(--texte-3); }

/* --- Recadrage d'une photo ------------------------------------------------- */

html.fige, html.fige body { overflow: hidden; }

.recadrage {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: flex;
  flex-direction: column;
  background: #000;
  color: #fff;
  animation: apparait 220ms ease-out;
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
}
.recadrage.sort { animation: disparait 200ms ease-out forwards; }
.recadrage-entete {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  padding: calc(env(safe-area-inset-top) + 8px) 16px 8px;
  min-height: 52px;
}
.recadrage-entete > :first-child { justify-self: start; }
.recadrage-entete > :last-child { justify-self: end; }
.recadrage-entete .lien { color: #fff; }
.recadrage-entete .lien.fort { color: #ffd60a; }
.recadrage-scene {
  position: relative;
  flex: 1;
  display: grid;
  place-items: center;
  overflow: hidden;
  cursor: grab;
}
.recadrage-cadre {
  position: relative;
  width: min(100vw - 32px, 100dvh - 220px, 460px);
  aspect-ratio: 1;
}
.recadrage-cadre img {
  position: absolute;
  top: 0;
  left: 0;
  max-width: none;
  transform-origin: 0 0;
  will-change: transform;
  pointer-events: none;
}
/* Tout ce qui déborde du cadre est assombri ; le cadre a l'arrondi des vignettes. */
.recadrage-cadre::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 22%;
  box-shadow: 0 0 0 100vmax rgba(0, 0, 0, 0.62);
  outline: 1px solid rgba(255, 255, 255, 0.55);
  pointer-events: none;
}
.recadrage-aide {
  margin: 0;
  padding: 14px 16px calc(env(safe-area-inset-bottom) + 22px);
  text-align: center;
  font-size: 14px;
  color: rgba(255, 255, 255, 0.6);
}
