@font-face {
  font-family: "CriteriaCF";
  src: url("fonts/CriteriaCF-Medium.woff2") format("woff2");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}

:root {
  --nuit: #0B0A14;
  --blanc: #FEFEFE;
  --or: #E2BC6B;
  --or-clair: #F6DFA6;
  --or-fonce: #B58E40;
  --rose: #FF5C9D;
  --violet: #8B6CFF;
  --bleu: #4CC3FF;
  --vert: #4ADCAB;
  --rouge: #FF7A7A;
  --texte-2: rgba(255, 255, 255, 0.76);
  --texte-3: rgba(255, 255, 255, 0.62);
  --verre: rgba(13, 11, 24, 0.6);
  --verre-fort: rgba(13, 11, 24, 0.82);
  --verre-bord: rgba(255, 255, 255, 0.11);
  --trait: rgba(255, 255, 255, 0.10);
  --rayon: 22px;
  --titres: "CriteriaCF", "Inter", system-ui, sans-serif;
  --sortie: cubic-bezier(0.16, 1, 0.3, 1);
  --ressort: cubic-bezier(0.34, 1.56, 0.64, 1);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; -webkit-tap-highlight-color: transparent; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; background: var(--nuit); }

body {
  color: var(--blanc);
  font-family: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  font-size: 15px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  overflow-x: hidden;
}

h1, h2, h3 { font-family: var(--titres); font-weight: 500; letter-spacing: -0.01em; line-height: 1.12; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
.montant { font-variant-numeric: tabular-nums; white-space: nowrap; }

:focus-visible { outline: 2px solid var(--or); outline-offset: 3px; border-radius: 8px; }

/* ───────── Fond photo ───────── */
.fond {
  position: fixed;
  top: 0; left: 0;
  width: 100%;
  height: 100vh;
  height: 100lvh;
  z-index: -1;
  overflow: hidden;
  background: var(--nuit);
  animation: zoom-arriere 2.6s var(--sortie) both;
}
.fond-photo {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  object-position: 42% 22%;
  transform: translate3d(0, -3.5%, 0) scale(1.1);
  will-change: transform;
}
.fond-degrade {
  position: absolute; inset: 0;
  background:
    linear-gradient(180deg, rgba(11, 10, 20, 0.42) 0%, rgba(11, 10, 20, 0) 15%, rgba(11, 10, 20, 0) 40%, rgba(11, 10, 20, 0.5) 52%, rgba(11, 10, 20, 0.78) 68%, rgba(11, 10, 20, 0.88) 100%);
}
.fond-voile {
  position: absolute; inset: 0;
  background: var(--nuit);
  opacity: 0;
  will-change: opacity;
}

@keyframes zoom-arriere {
  from { transform: scale(1.14); filter: brightness(0.6); }
  to { transform: scale(1); filter: brightness(1); }
}

/* ───────── Confettis ───────── */
.confettis {
  position: fixed; inset: 0;
  width: 100%; height: 100%;
  pointer-events: none;
  z-index: 60;
}

/* ───────── Barre haute (mobile, après le hero) ───────── */
.barre-haut {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 40;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: calc(8px + env(safe-area-inset-top, 0px)) 14px 8px;
  background: var(--verre-fort);
  -webkit-backdrop-filter: blur(18px) saturate(160%);
  backdrop-filter: blur(18px) saturate(160%);
  border-bottom: 1px solid var(--verre-bord);
  transform: translateY(-110%);
  transition: transform 0.5s var(--sortie);
}
.barre-haut.visible { transform: none; }
.barre-haut-titre { font-family: var(--titres); font-size: 14.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; flex: 1; }
.barre-haut-moi {
  flex: none;
  font-size: 12.5px; font-weight: 600;
  color: var(--or-clair);
  padding: 5px 10px;
  border-radius: 99px;
  background: rgba(226, 188, 107, 0.14);
  border: 1px solid rgba(226, 188, 107, 0.34);
  font-variant-numeric: tabular-nums;
}
.barre-haut-moi:empty { display: none; }

.pastille {
  position: relative;
  flex: none;
  width: 38px; height: 38px;
  border-radius: 50%;
  overflow: hidden;
  box-shadow: 0 0 0 2px var(--or), 0 0 18px rgba(255, 92, 157, 0.5);
  transition: transform 0.35s var(--ressort);
}
.pastille:active { transform: scale(0.88) rotate(-8deg); }
.pastille img {
  position: absolute;
  width: 240%; height: auto;
  left: -51%; top: -78%;
  max-width: none;
}

/* ───────── Hero ───────── */
.hero {
  position: relative;
  min-height: max(65vh, 452px);
  min-height: max(65svh, 452px);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 0 20px 16px;
}
.hero-cadre { display: none; }

.hero-texte { position: relative; z-index: 2; }
.surtitre {
  color: var(--or-clair);
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  margin-bottom: 10px;
  text-shadow: 0 1px 12px rgba(0, 0, 0, 0.7);
  animation: monte 0.9s 0.25s var(--sortie) both;
}
.hero h1 {
  font-size: clamp(40px, 11.6vw, 56px);
  line-height: 0.98;
  letter-spacing: -0.02em;
  background: linear-gradient(100deg, #fff 0%, #fff 38%, var(--or-clair) 50%, #fff 62%, #fff 100%);
  background-size: 250% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
  filter: drop-shadow(0 2px 18px rgba(0, 0, 0, 0.55));
  animation: monte 1s 0.38s var(--sortie) both, reflet 5.5s 1.6s ease-in-out infinite;
}
.maj {
  color: var(--texte-2);
  font-size: 13px;
  text-shadow: 0 1px 10px rgba(0, 0, 0, 0.7);
}
.hero-bas {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  margin-top: 10px;
  animation: monte 0.9s 0.55s var(--sortie) both;
}
.hero-suite {
  flex: none;
  width: 38px; height: 38px;
  display: grid; place-items: center;
  border-radius: 50%;
  color: var(--blanc);
  background: rgba(255, 255, 255, 0.10);
  border: 1px solid rgba(255, 255, 255, 0.18);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  animation: rebond 2.2s 2s ease-in-out infinite;
}

@keyframes monte {
  from { opacity: 0; transform: translateY(26px); }
  to { opacity: 1; transform: none; }
}
@keyframes reflet {
  0%, 55% { background-position: 100% 0; }
  100% { background-position: -50% 0; }
}
@keyframes rebond {
  0%, 100% { translate: 0 0; }
  50% { translate: 0 6px; }
}

/* Étoiles scintillantes (clin d'œil au décor de la photo) */
.etoiles { position: absolute; inset: 0; pointer-events: none; z-index: 1; }
.etoiles span {
  position: absolute;
  width: 14px; height: 14px;
  background: radial-gradient(circle, #fff 0%, rgba(255, 255, 255, 0.9) 18%, rgba(255, 255, 255, 0) 60%);
  clip-path: polygon(50% 0%, 61% 39%, 100% 50%, 61% 61%, 50% 100%, 39% 61%, 0% 50%, 39% 39%);
  opacity: 0;
  animation: scintille 3.2s ease-in-out infinite;
}
.etoiles span:nth-child(1) { left: 9%; top: 12%; animation-delay: 0.4s; }
.etoiles span:nth-child(2) { left: 84%; top: 9%; width: 18px; height: 18px; animation-delay: 1.3s; background: radial-gradient(circle, var(--or-clair) 0%, rgba(246, 223, 166, 0) 62%); }
.etoiles span:nth-child(3) { left: 74%; top: 38%; animation-delay: 2.1s; }
.etoiles span:nth-child(4) { left: 14%; top: 44%; width: 10px; height: 10px; animation-delay: 0.9s; background: radial-gradient(circle, #ffb1d2 0%, rgba(255, 92, 157, 0) 62%); }
.etoiles span:nth-child(5) { left: 92%; top: 58%; width: 10px; height: 10px; animation-delay: 2.7s; }
.etoiles span:nth-child(6) { left: 4%; top: 68%; animation-delay: 1.8s; background: radial-gradient(circle, var(--or-clair) 0%, rgba(246, 223, 166, 0) 62%); }

@keyframes scintille {
  0%, 100% { opacity: 0; transform: scale(0.4) rotate(0deg); }
  50% { opacity: 1; transform: scale(1.15) rotate(45deg); }
}

/* ───────── Contenu ───────── */
.contenu {
  padding: 8px 14px calc(64px + env(safe-area-inset-bottom, 0px));
  scroll-margin-top: 64px;
}
.chargement { color: var(--texte-2); padding: 40px 0; text-align: center; }

.section { margin-top: 34px; scroll-margin-top: 70px; }
.section-titre {
  font-size: 25px;
  margin-bottom: 4px;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.7), 0 2px 18px rgba(0, 0, 0, 0.7);
}
.section-aide { color: rgba(255, 255, 255, 0.94); font-size: 14px; margin-bottom: 14px; max-width: 62ch; text-shadow: 0 1px 3px rgba(0, 0, 0, 0.9), 0 0 14px rgba(0, 0, 0, 0.8); }

.carte {
  position: relative;
  background: var(--verre);
  border: 1px solid var(--verre-bord);
  border-radius: var(--rayon);
  padding: 18px;
  -webkit-backdrop-filter: blur(7px) saturate(150%);
  backdrop-filter: blur(7px) saturate(150%);
  box-shadow: 0 14px 44px rgba(0, 0, 0, 0.34), inset 0 1px 0 rgba(255, 255, 255, 0.09);
  overflow: hidden;
}
/* Halo qui suit le doigt / la souris */
.carte::after {
  content: "";
  position: absolute; inset: 0;
  pointer-events: none;
  border-radius: inherit;
  background: radial-gradient(240px circle at var(--mx, 50%) var(--my, 0%), rgba(255, 255, 255, 0.11), transparent 65%);
  opacity: 0;
  transition: opacity 0.4s ease;
}
.carte.touche::after { opacity: 1; }
.carte > * { position: relative; z-index: 1; }

/* Apparitions au défilement */
.js .apparait {
  opacity: 0;
  transform: translateY(20px) scale(0.985);
  transition: opacity 0.55s var(--sortie), transform 0.6s var(--sortie);
  transition-delay: var(--d, 0ms);
}
.js .apparait.visible { opacity: 1; transform: none; }

/* Alertes */
.alerte {
  border-radius: 16px;
  padding: 14px 16px;
  font-size: 14px;
  margin-bottom: 14px;
  border: 1px solid rgba(226, 188, 107, 0.4);
  background: rgba(40, 30, 8, 0.82);
  color: var(--or-clair);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
}
.alerte strong { color: var(--blanc); }
.alerte-erreur { border-color: rgba(255, 122, 122, 0.5); background: rgba(52, 12, 16, 0.86); color: #FFC9C9; }
.alerte ul { margin: 6px 0 0 18px; }
.sans-js { margin: 20px; }

/* ───────── « Combien je dois ? » ───────── */
.moi {
  scroll-margin-top: 68px;
  padding: 20px 18px 18px;
  border-color: rgba(226, 188, 107, 0.34);
  background:
    linear-gradient(150deg, rgba(226, 188, 107, 0.16), rgba(255, 92, 157, 0.07) 45%, rgba(139, 108, 255, 0.08) 100%),
    var(--verre-fort);
}
.moi-question { font-size: 27px; }
.moi-aide { color: var(--texte-2); font-size: 14px; margin-top: 6px; }

.puces { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.puce {
  padding: 9px 15px;
  border-radius: 99px;
  font-size: 14.5px; font-weight: 600;
  color: var(--blanc);
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.16);
  transition: transform 0.35s var(--ressort), background 0.3s ease, border-color 0.3s ease, color 0.3s ease, box-shadow 0.3s ease;
}
.puce:active { transform: scale(0.92); }
.puce[aria-pressed="true"] {
  color: #1C1404;
  background: linear-gradient(135deg, var(--or-clair), var(--or));
  border-color: transparent;
  box-shadow: 0 6px 22px rgba(226, 188, 107, 0.42);
  transform: scale(1.04);
}

.moi-resultat {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 16px;
  align-items: center;
  margin-top: 18px;
  transition: opacity 0.22s ease, transform 0.22s ease;
}
.moi-resultat.change { opacity: 0; transform: translateY(8px); }

.anneau { position: relative; width: 92px; height: 92px; flex: none; }
.anneau svg { width: 100%; height: 100%; transform: rotate(-90deg); display: block; }
.anneau-piste { fill: none; stroke: rgba(255, 255, 255, 0.12); stroke-width: 8; }
.anneau-valeur {
  fill: none;
  stroke: url(#degrade-anneau);
  stroke-width: 8;
  stroke-linecap: round;
  transition: stroke-dashoffset 1.4s var(--sortie);
}
.anneau-centre {
  position: absolute; inset: 0;
  display: grid; place-content: center;
  text-align: center;
  line-height: 1.05;
}
.anneau-pourcent { font-family: var(--titres); font-size: 22px; font-variant-numeric: tabular-nums; }
.anneau-legende { font-size: 10.5px; color: var(--texte-3); letter-spacing: 0.06em; text-transform: uppercase; }

.moi-phrase { color: var(--texte-2); font-size: 14.5px; }
.moi-montant {
  font-family: var(--titres);
  font-size: clamp(40px, 12vw, 54px);
  line-height: 1;
  margin: 4px 0 6px;
  color: var(--or-clair);
  text-shadow: 0 0 28px rgba(226, 188, 107, 0.35);
  display: block;
}
.moi.est-ok .moi-montant { color: var(--vert); text-shadow: 0 0 28px rgba(74, 220, 171, 0.35); }
.moi-suite { color: var(--blanc); font-size: 14.5px; font-weight: 500; }

.calcul {
  display: flex;
  flex-wrap: wrap;
  gap: 3px 6px;
  align-items: baseline;
  font-size: 13.5px;
  color: var(--texte-2);
}
.calcul b { color: var(--blanc); font-weight: 600; font-variant-numeric: tabular-nums; }
.calcul .op { color: var(--texte-3); }
.calcul .resultat { color: var(--or-clair); font-weight: 700; font-variant-numeric: tabular-nums; }
.calcul.en-phrase { display: block; }
.moi-calcul { font-size: 13px; margin-top: 16px; padding-top: 14px; border-top: 1px dashed var(--trait); }

/* ───────── Cartes personnes ───────── */
.personnes { display: grid; gap: 12px; grid-template-columns: 1fr; align-items: start; }

.personne {
  padding: 0;
  transition: transform 0.35s var(--sortie), border-color 0.4s ease, box-shadow 0.4s ease;
}
.personne:active { transform: scale(0.985); }
.personne.est-moi {
  border-color: rgba(226, 188, 107, 0.62);
  box-shadow: 0 14px 44px rgba(0, 0, 0, 0.34), 0 0 0 1px rgba(226, 188, 107, 0.3), 0 0 34px rgba(226, 188, 107, 0.2), inset 0 1px 0 rgba(255, 255, 255, 0.09);
}
.personne-bouton { display: block; width: 100%; text-align: left; padding: 16px 16px 14px; }
.personne-haut { display: flex; align-items: center; gap: 12px; }
.avatar {
  flex: none;
  width: 44px; height: 44px;
  border-radius: 50%;
  display: grid; place-items: center;
  font-weight: 700;
  font-size: 14px;
  letter-spacing: 0.02em;
  color: #fff;
  background: linear-gradient(135deg, hsl(var(--teinte, 40) 78% 62%), hsl(calc(var(--teinte, 40) + 50) 72% 48%));
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.25), 0 6px 16px rgba(0, 0, 0, 0.3);
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.35);
}
.personne-identite { min-width: 0; flex: 1; }
.personne-nom { font-weight: 600; font-size: 16px; line-height: 1.25; display: flex; align-items: center; gap: 7px; flex-wrap: wrap; }
.personne-role { color: var(--texte-3); font-size: 12.5px; }
.personne-reste { text-align: right; flex: none; }
.personne-reste .montant { font-family: var(--titres); font-size: 28px; line-height: 1; color: var(--or-clair); display: block; }
.personne-reste .libelle { color: var(--texte-3); font-size: 11.5px; margin-top: 5px; display: block; }
.personne.est-a-jour .personne-reste .montant,
.personne.est-crediteur .personne-reste .montant { color: var(--vert); }

.barre {
  position: relative;
  height: 9px;
  border-radius: 99px;
  background: rgba(255, 255, 255, 0.10);
  overflow: hidden;
  margin-top: 14px;
}
.barre > span {
  position: relative;
  display: block;
  height: 100%;
  width: 100%;
  border-radius: 99px;
  background: linear-gradient(90deg, var(--violet), var(--rose) 55%, var(--or));
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform 1.3s var(--sortie);
  transition-delay: var(--d, 0ms);
  overflow: hidden;
}
.visible .barre > span, .barre.animee > span { transform: scaleX(var(--p, 0)); }
.barre > span::after {
  content: "";
  position: absolute; top: 0; bottom: 0; left: 0;
  width: 40%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.65), transparent);
  transform: translateX(-120%);
  animation: brillance 3.4s 1.6s ease-in-out infinite;
}
.barre.est-pleine > span { background: linear-gradient(90deg, #26b98a, var(--vert)); }
@keyframes brillance {
  0% { transform: translateX(-120%); }
  45%, 100% { transform: translateX(320%); }
}

.barre-legende { display: flex; justify-content: space-between; gap: 10px; margin-top: 7px; font-size: 12.5px; color: var(--texte-2); }
.barre-legende b { color: var(--blanc); font-weight: 600; font-variant-numeric: tabular-nums; }

.personne-pied { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 10px; }
.voir-detail { display: inline-flex; align-items: center; gap: 4px; color: var(--texte-3); font-size: 12.5px; font-weight: 500; flex: none; }
.voir-detail svg { transition: transform 0.45s var(--sortie); }
.personne.ouverte .voir-detail svg { transform: rotate(180deg); }

.personne-detail {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows 0.5s var(--sortie);
}
.personne.ouverte .personne-detail { grid-template-rows: 1fr; }
.personne-detail > div { overflow: hidden; min-height: 0; }
.personne-detail-contenu {
  padding: 0 16px 16px;
  opacity: 0;
  transform: translateY(-6px);
  transition: opacity 0.4s ease, transform 0.5s var(--sortie);
}
.personne.ouverte .personne-detail-contenu { opacity: 1; transform: none; }
.detail-dons {
  list-style: none;
  padding-top: 12px;
  border-top: 1px dashed var(--trait);
  font-size: 13.5px;
  color: var(--texte-2);
  display: grid;
  gap: 6px;
}
.detail-dons li { display: flex; gap: 10px; justify-content: space-between; align-items: baseline; }
.detail-dons .montant { color: var(--blanc); font-weight: 600; }
.detail-dons .total { color: var(--blanc); font-weight: 600; padding-top: 6px; border-top: 1px solid var(--trait); }
.consigne {
  margin-top: 12px;
  font-size: 13.5px;
  padding: 10px 12px;
  border-radius: 12px;
  background: rgba(226, 188, 107, 0.13);
  border: 1px solid rgba(226, 188, 107, 0.22);
  color: var(--or-clair);
}
.personne.est-a-jour .consigne,
.personne.est-crediteur .consigne { background: rgba(74, 220, 171, 0.12); border-color: rgba(74, 220, 171, 0.26); color: #A9F0D8; }

/* ───────── Chiffres clés ───────── */
.chiffres { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.chiffre { padding: 15px 16px; transition: transform 0.35s var(--sortie); }
.chiffre:active { transform: scale(0.97); }
.chiffre-libelle { color: var(--texte-3); font-size: 11px; font-weight: 600; letter-spacing: 0.09em; text-transform: uppercase; }
.chiffre-valeur { font-family: var(--titres); font-size: 27px; margin-top: 7px; line-height: 1.05; display: block; }
.chiffre-note { color: var(--texte-2); font-size: 12.5px; margin-top: 5px; }
.chiffre.accent { border-color: rgba(226, 188, 107, 0.36); }
.chiffre.accent .chiffre-valeur { color: var(--or-clair); }

/* ───────── Colonnes ───────── */
.colonnes { display: grid; gap: 0; grid-template-columns: 1fr; }

/* ───────── Transferts ───────── */
.transferts { list-style: none; display: grid; }
.transfert {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 2px 12px;
  align-items: center;
  padding: 12px 0;
  border-bottom: 1px solid var(--trait);
}
.transfert:first-child { padding-top: 0; }
.transfert:last-child { border-bottom: 0; padding-bottom: 0; }
.transfert-qui { font-weight: 600; }
.transfert-vers { display: flex; align-items: flex-start; gap: 6px; color: var(--texte-2); font-size: 13.5px; grid-column: 1; }
.transfert-vers .fleche { color: var(--or); flex: none; display: inline-flex; margin-top: 2px; animation: glisse 1.8s ease-in-out infinite; }
.transfert:nth-child(2n) .fleche { animation-delay: 0.3s; }
.transfert .montant { font-family: var(--titres); font-size: 21px; color: var(--or-clair); grid-row: 1 / span 2; grid-column: 2; }
.transfert.est-remboursement .montant { color: var(--vert); }
@keyframes glisse {
  0%, 100% { transform: translateX(-2px); opacity: 0.6; }
  50% { transform: translateX(3px); opacity: 1; }
}

.bouclage {
  margin-top: 16px;
  border-radius: 16px;
  background: rgba(74, 220, 171, 0.11);
  border: 1px solid rgba(74, 220, 171, 0.3);
  padding: 14px 16px;
  font-size: 14px;
  color: #C9F4E5;
}
.bouclage-titre { display: flex; align-items: center; gap: 8px; color: var(--vert); font-weight: 700; margin-bottom: 6px; }
.bouclage strong { color: var(--blanc); font-weight: 600; font-variant-numeric: tabular-nums; }
.bouclage.est-ko { background: rgba(255, 122, 122, 0.12); border-color: rgba(255, 122, 122, 0.4); color: #FFC9C9; }
.bouclage.est-ko .bouclage-titre { color: var(--rouge); }
.coche path { stroke-dasharray: 24; stroke-dashoffset: 24; transition: stroke-dashoffset 0.7s 0.5s var(--sortie); }
.visible .coche path { stroke-dashoffset: 0; }

/* ───────── Lignes clé / valeur ───────── */
.lignes { display: grid; }
.ligne { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--trait); color: var(--texte-2); }
.ligne:last-child { border-bottom: 0; padding-bottom: 0; }
.ligne .montant { color: var(--blanc); font-weight: 600; }
.ligne.total { color: var(--blanc); font-weight: 600; padding-top: 14px; }
.ligne.total .montant { font-family: var(--titres); font-weight: 500; font-size: 30px; color: var(--or-clair); }
.carte-surtitre { display: flex; align-items: center; gap: 8px; color: var(--texte-2); font-size: 13px; margin-bottom: 8px; }
.carte-note { margin-top: 14px; padding-top: 12px; border-top: 1px dashed var(--trait); color: var(--texte-3); font-size: 12.5px; }

/* ───────── Dépenses ───────── */
.depenses { display: grid; gap: 12px; }
.depense-haut { display: flex; justify-content: space-between; gap: 12px; align-items: flex-start; }
.depense-nom { font-family: var(--titres); font-size: 20px; line-height: 1.15; }
.depense-detail { color: var(--texte-3); font-size: 13px; margin-top: 2px; }
.depense-montant { font-family: var(--titres); font-size: 24px; text-align: right; line-height: 1.1; }
.depense-etat { display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap; margin-top: 8px; font-size: 13px; color: var(--texte-2); }
.depense-etat b { color: var(--blanc); font-weight: 600; font-variant-numeric: tabular-nums; }

.badge {
  display: inline-flex; align-items: center; gap: 5px;
  font-size: 11px; font-weight: 600; letter-spacing: 0.03em;
  padding: 3px 9px; border-radius: 99px;
  border: 1px solid var(--verre-bord);
  color: var(--texte-2);
  white-space: nowrap;
}
.badge.vert { color: var(--vert); border-color: rgba(74, 220, 171, 0.36); background: rgba(74, 220, 171, 0.12); }
.badge.or { color: var(--or-clair); border-color: rgba(226, 188, 107, 0.36); background: rgba(226, 188, 107, 0.13); }
.badge.rouge { color: var(--rouge); border-color: rgba(255, 122, 122, 0.4); background: rgba(255, 122, 122, 0.12); }
.badge.neutre { background: rgba(255, 255, 255, 0.06); }

.paiements { list-style: none; margin-top: 12px; padding-top: 2px; border-top: 1px dashed var(--trait); }
.paiement { display: grid; grid-template-columns: 1fr auto; gap: 1px 12px; padding: 10px 0; border-bottom: 1px solid var(--trait); }
.paiement:last-child { border-bottom: 0; padding-bottom: 0; }
.paiement-qui { font-weight: 600; }
.paiement-meta { color: var(--texte-3); font-size: 12.5px; grid-column: 1 / -1; }
.paiement .montant { font-weight: 600; }
.depense-partage { margin-top: 12px; color: var(--texte-3); font-size: 12.5px; }

/* ───────── Historique ───────── */
.historique { list-style: none; }
.mouvement { display: grid; grid-template-columns: 1fr auto; gap: 3px 12px; padding: 12px 0; border-bottom: 1px solid var(--trait); }
.mouvement:first-child { padding-top: 0; }
.mouvement:last-child { border-bottom: 0; padding-bottom: 0; }
.mouvement-texte { font-weight: 600; }
.mouvement-texte .faible { color: var(--texte-2); font-weight: 400; }
.mouvement .montant { font-weight: 600; }
.mouvement-meta { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 6px 8px; align-items: center; color: var(--texte-3); font-size: 12.5px; }

/* ───────── Explications ───────── */
.etapes { list-style: none; counter-reset: etape; display: grid; gap: 16px; }
.etapes li { counter-increment: etape; display: grid; grid-template-columns: 32px 1fr; gap: 12px; color: var(--texte-2); }
.etapes li::before {
  content: counter(etape);
  width: 32px; height: 32px; border-radius: 50%;
  display: grid; place-items: center;
  background: linear-gradient(135deg, var(--or-clair), var(--or));
  color: #1C1404;
  font-weight: 700; font-size: 13.5px;
  box-shadow: 0 6px 18px rgba(226, 188, 107, 0.3);
}
.etapes strong { color: var(--blanc); font-weight: 600; }
.etapes .formule { display: block; margin-top: 4px; color: var(--or-clair); font-variant-numeric: tabular-nums; font-weight: 500; }
.encart { margin-top: 18px; padding-top: 16px; border-top: 1px dashed var(--trait); color: var(--texte-2); font-size: 14px; }
.encart h3 { font-size: 17px; color: var(--blanc); margin-bottom: 6px; }
.encart ul { margin-left: 18px; display: grid; gap: 4px; }
.encart strong { color: var(--blanc); font-weight: 600; }

.pied { margin-top: 36px; color: var(--texte-2); font-size: 12.5px; text-align: center; text-shadow: 0 1px 10px rgba(0, 0, 0, 0.8); }

/* ───────── Tablette ───────── */
@media (min-width: 640px) {
  .hero { padding: 0 32px 18px; }
  .contenu { padding-left: 28px; padding-right: 28px; }
  .personnes { grid-template-columns: 1fr 1fr; }
  .chiffres { grid-template-columns: repeat(4, 1fr); }
  .moi { padding: 24px; }
}

/* ───────── Desktop : portrait fixe à gauche, comptes à droite ───────── */
@media (min-width: 1024px), (orientation: landscape) and (max-height: 520px) and (min-width: 600px) {
  .fond { animation: none; }
  .fond-photo { filter: blur(46px) saturate(1.35); transform: scale(1.25); object-position: 50% 30%; }
  .fond-degrade { background: rgba(11, 10, 20, 0.55); }
  .barre-haut { display: none; }

  .mise-en-page {
    display: grid;
    grid-template-columns: minmax(min(380px, 30vw), min(38vw, 62vh)) minmax(0, 1fr);
    align-items: start;
  }
  .hero {
    position: sticky;
    top: 0;
    height: 100vh;
    min-height: 0;
    padding: 0 36px 40px;
    overflow: hidden;
  }
  .hero-cadre {
    display: block;
    position: absolute; inset: 14px 0 14px 14px;
    border-radius: 28px;
    overflow: hidden;
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.55), inset 0 0 0 1px rgba(255, 255, 255, 0.12);
  }
  .hero-cadre::after {
    content: "";
    position: absolute; inset: 0;
    border-radius: inherit;
    background: linear-gradient(180deg, rgba(11, 10, 20, 0.2) 0%, rgba(11, 10, 20, 0) 22%, rgba(11, 10, 20, 0) 52%, rgba(11, 10, 20, 0.88) 100%);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.12);
  }
  .hero-photo {
    position: absolute; inset: -3%;
    width: 106%; height: 106%;
    object-fit: cover;
    object-position: 42% 18%;
    animation: zoom-arriere 2.6s var(--sortie) both;
    translate: var(--px, 0px) var(--py, 0px);
    transition: translate 0.6s var(--sortie);
  }
  .hero-texte { padding-left: 14px; }
  .hero h1 { font-size: clamp(48px, 4.6vw, 68px); }
  .hero-suite { display: none; }
  .etoiles { inset: 14px 0 14px 14px; }

  .contenu { padding: 30px 40px 80px 32px; max-width: 1040px; }
  .section { margin-top: 44px; }
  .carte { padding: 22px; }
  .moi { padding: 28px; }
  .moi-question { font-size: 32px; }
  .moi-resultat { gap: 24px; }
  .anneau { width: 116px; height: 116px; }
  .anneau-pourcent { font-size: 27px; }
  .moi-montant { font-size: 64px; }
  .personne { padding: 0; }
  .personne-bouton { padding: 20px 20px 16px; }
  .personne-detail-contenu { padding: 0 20px 20px; }
  .colonnes { grid-template-columns: 1fr 1fr; gap: 0 22px; }

  .carte { transition: transform 0.45s var(--sortie), border-color 0.4s ease, box-shadow 0.4s ease; }
  .personne:hover, .chiffre:hover { transform: translateY(-3px); border-color: rgba(255, 255, 255, 0.22); }
  .puce:hover { background: rgba(255, 255, 255, 0.15); }
  .puce[aria-pressed="true"]:hover { background: linear-gradient(135deg, var(--or-clair), var(--or)); }
}

/* Téléphone en paysage : même mise en page que le desktop, en plus compact */
@media (orientation: landscape) and (max-height: 520px) and (min-width: 600px) {
  .hero { padding: 0 16px 24px; }
  .hero-cadre, .etoiles { inset: 8px 0 8px 8px; }
  .hero-cadre { border-radius: 20px; }
  .hero-texte { padding-left: 10px; }
  .hero h1 { font-size: 30px; }
  .surtitre { font-size: 9.5px; letter-spacing: 0.1em; margin-bottom: 6px; }
  .maj { font-size: 11px; }
  .contenu { padding: 10px 16px 60px 14px; }
  .moi { padding: 18px; }
  .moi-question { font-size: 24px; }
  .moi-montant { font-size: 44px; }
  .anneau { width: 92px; height: 92px; }
  .anneau-pourcent { font-size: 22px; }
  .colonnes { grid-template-columns: 1fr; }
  .chiffres { grid-template-columns: 1fr 1fr; }
  .personnes { grid-template-columns: 1fr; }
}

@media (min-width: 1500px) {
  .personnes { grid-template-columns: repeat(3, 1fr); }
}

/* ───────── Mouvement réduit ───────── */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-delay: 0s !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    transition-delay: 0s !important;
  }
  .js .apparait { opacity: 1; transform: none; }
  .etoiles span { opacity: 0.8; }
  .confettis { display: none; }
}
