/* ============================================================================
   myCerfa — GABARITS, lot « vitrine-b » (phase 2)
   Compléments du gabarit Vitrine pour deux pages :
     · fonctionnalites/reporting.php        → classes reporting-*
     · fonctionnalites/espace-donateur.php  → classes espace-donateur-*
   Chargé après assets/css/gabarits.css (socle). Animations en transform /
   opacity ; déclenchées par la classe .is-in posée par [data-g-inview] (socle).
   Mouvement réduit : le socle ramène toutes les animations à leur état final
   (animation-fill-mode both partout ici). Sans JS ou en repli (g-fallback) :
   rien n'est masqué.
   ============================================================================ */


/* ============================================================================
   REPORTING
   ============================================================================ */

/* ---------- Hero : le tableau croisé se construit ---------- */
.reporting-stage .report-builder { box-shadow: var(--shadow-lg); }
/* Cartes flottantes : sous le tableau, pour ne jamais cacher les totaux */
.reporting-stage { padding-bottom: 84px; }
.reporting-stage .g-layer--tr { top: -4px; right: -10px; }
.reporting-stage .g-layer--bl { bottom: 4px; left: -8px; }
.reporting-stage .g-layer--br { bottom: 22px; right: -12px; }
.reporting-scroll { overflow-x: auto; }
.reporting-stage .reporting-total td { background: var(--pine-soft); border-bottom: 0; }
.reporting-stage .rb-table tbody tr:not(.reporting-total) td:last-child { background: #f6f8fc; }

/* Les réglages se posent, puis les lignes se remplissent l'une après l'autre ;
   les totaux comptent pendant ce temps (compteurs du socle). */
.reporting-stage.is-in .rb-cols .rb-col { animation: reporting-drop .55s var(--g-ease-out) both; }
.reporting-stage.is-in .rb-cols .rb-col:nth-child(1) { animation-delay: .45s; }
.reporting-stage.is-in .rb-cols .rb-col:nth-child(2) { animation-delay: .6s; }
.reporting-stage.is-in .rb-cols .rb-col:nth-child(3) { animation-delay: .75s; }
.reporting-stage.is-in .rb-cols .rb-col:nth-child(4) { animation-delay: .9s; }
.reporting-stage.is-in .rb-cols .rb-col:nth-child(5) { animation-delay: 1s; }
.reporting-stage.is-in .rb-table tbody tr:not(.reporting-total) { animation: reporting-row .5s var(--g-ease-out) both; }
.reporting-stage.is-in .rb-table tbody tr:nth-child(1) { animation-delay: .55s; }
.reporting-stage.is-in .rb-table tbody tr:nth-child(2) { animation-delay: .7s; }
.reporting-stage.is-in .rb-table tbody tr:nth-child(3) { animation-delay: .85s; }
.reporting-stage.is-in .rb-table tbody tr:nth-child(4) { animation-delay: 1s; }
.reporting-stage.is-in .rb-foot .rb-btn { animation: reporting-nudge .6s var(--g-ease-out) 1.9s both; }
@keyframes reporting-drop {
  0% { opacity: 0; transform: translateY(-14px) rotate(-4deg); }
  70% { opacity: 1; transform: translateY(2px) rotate(.5deg); }
  100% { opacity: 1; transform: none; }
}
@keyframes reporting-row { from { opacity: 0; transform: translateX(-14px); } to { opacity: 1; transform: none; } }
@keyframes reporting-nudge { 0%, 100% { transform: none; } 40% { transform: scale(1.1); } 70% { transform: scale(.97); } }

/* ---------- Les 4 sources ---------- */
.reporting-sources {
  max-width: 1060px; margin: 0 auto; display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px;
}
.reporting-src {
  background: var(--white); border: 1px solid var(--line); border-radius: var(--r-lg);
  padding: 22px 20px 24px; box-shadow: var(--shadow-sm);
  display: flex; flex-direction: column; align-items: flex-start; gap: 12px;
  transition: transform .35s var(--g-ease-out), box-shadow .35s, border-color .35s;
}
.reporting-src:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); border-color: transparent; }
.reporting-src-ic {
  width: 46px; height: 46px; border-radius: 14px; display: grid; place-items: center;
  font-size: 22px; background: var(--paper-2);
}
.reporting-src .chip-key {
  font-family: var(--display); font-weight: 800; font-size: 12.5px; letter-spacing: .04em;
  background: var(--pine-soft); color: var(--pine-deep); padding: 3px 9px; border-radius: 6px;
}
.reporting-src .chip-lab { font-size: 14px; color: var(--ink-soft); }
.reporting-src .chip-lab b { display: block; color: var(--ink); font-family: var(--display); font-size: 16.5px; line-height: 1.3; margin-bottom: 4px; }
.reporting-dot { display: none; }

/* Palette des champs de la source Dons : cascade rapide */
.reporting-fields { max-width: 960px; margin: 44px auto 0; text-align: center; }
.reporting-fields .rb-label { margin-bottom: 14px; }
.reporting-fields .rb-cols { justify-content: center; margin-bottom: 0; }
.reporting-fields .rb-col { font-size: 12.5px; padding: 5px 11px; background: var(--white); transition: border-color .2s, color .2s; }
.reporting-fields .rb-col:hover { border-color: var(--pine); color: var(--pine); }
html.g-js .reporting-fields [data-g-stagger] > * { transition-delay: calc(var(--g-i, 0) * 28ms); translate: 0 12px; }
html.g-js .reporting-fields [data-g-stagger].is-in > * { translate: none; }
html.g-js.g-fallback .reporting-fields [data-g-stagger] > * { translate: none; }

/* ---------- Les 5 étapes en onglets ---------- */
.reporting-tabn { font-size: 11.5px; letter-spacing: .04em; opacity: .55; margin-right: 3px; }
.reporting-steps .g-tab[aria-selected="true"] .reporting-tabn { opacity: .8; }
.reporting-step-txt h3 { font-size: clamp(24px, 2.6vw, 32px); margin-bottom: 16px; }
.reporting-step-txt .ch-tag {
  display: inline-block; font-size: 12px; font-weight: 700;
  color: var(--pine-deep); background: var(--pine-soft); padding: 3px 10px; border-radius: 100px;
}
.reporting-steps .g-panel-visual > .g-example { margin-bottom: 12px; }
.reporting-mini {
  background: var(--white); border: 1px solid var(--line); border-radius: var(--r-md);
  padding: 18px; box-shadow: var(--shadow-sm); display: grid; gap: 12px;
}
.reporting-mini .rb-label { margin-bottom: 0; }
.reporting-mini .rb-cols { margin-bottom: 0; }
/* En attente d'apparition : le contenu de l'écran est masqué (JS actif seulement) */
html.g-js:not(.g-fallback) .reporting-mini:not(.is-in) > * { opacity: 0; }

/* Puces de choix (segment) */
.reporting-calc {
  display: flex; flex-wrap: wrap; gap: 4px; background: var(--paper-2); border-radius: 10px; padding: 4px;
}
.reporting-calc span {
  flex: 1; text-align: center; padding: 7px 8px; border-radius: 7px; white-space: nowrap;
  font-size: 12px; font-weight: 700; color: var(--ink-soft);
}
.reporting-calc span.is-on { background: var(--white); color: var(--ink); box-shadow: var(--shadow-sm); }
.reporting-calc--2 { max-width: 260px; }

/* 01 — choix de la source */
.reporting-pick-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.reporting-pick-grid span, .reporting-pick-from span {
  border: 1.5px solid var(--line); border-radius: 10px; padding: 12px; text-align: center;
  font-family: var(--display); font-weight: 800; font-size: 13.5px; color: var(--ink-soft);
}
.reporting-pick-grid span.is-on, .reporting-pick-from span.is-on { border-color: var(--pine); background: var(--pine-soft); color: var(--pine-deep); }
.reporting-pick-from { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.reporting-pick-from span { font-size: 12.5px; border-style: dashed; }
.reporting-pick-from span.is-on { border-style: solid; }
.reporting-pick.is-in > * { animation: reporting-up .5s var(--g-ease-out) both; }
.reporting-pick.is-in > :nth-child(2) { animation-delay: .1s; }
.reporting-pick.is-in > :nth-child(3) { animation-delay: .3s; }
.reporting-pick.is-in .reporting-pick-grid span { animation: reporting-pop .45s var(--g-ease-out) both; }
.reporting-pick.is-in .reporting-pick-grid span:nth-child(2) { animation-delay: .08s; }
.reporting-pick.is-in .reporting-pick-grid span:nth-child(3) { animation-delay: .16s; }
.reporting-pick.is-in .reporting-pick-grid span:nth-child(4) { animation-delay: .24s; }
.reporting-pick.is-in .reporting-pick-grid span.is-on { animation-name: reporting-pick; animation-duration: .8s; animation-delay: .45s; }
@keyframes reporting-up { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }
@keyframes reporting-pop { from { opacity: 0; transform: scale(.85); } to { opacity: 1; transform: none; } }
@keyframes reporting-pick { 0% { opacity: 0; transform: scale(.85); } 50% { opacity: 1; transform: scale(1.06); } 100% { opacity: 1; transform: none; } }

/* 02 — champs glissés dans les zones */
.reporting-zone {
  display: flex; align-items: center; gap: 12px; padding: 10px 12px;
  border: 1.5px dashed #c5cede; border-radius: 10px; min-height: 48px;
}
.reporting-zone .rb-label { width: 70px; flex-shrink: 0; }
.reporting-zone .rb-col { font-size: 12.5px; }
.reporting-drop.is-in .reporting-zone { border-color: var(--pine); background: #f7f9ff; transition: border-color .3s 1s, background .3s 1s; }
.reporting-skel { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 6px; padding-top: 4px; }
.reporting-skel i { height: 9px; border-radius: 4px; background: var(--paper-2); }
.reporting-skel i:nth-child(3n+1) { background: #e6ebf5; }
.reporting-drop.is-in > * { animation: reporting-up .45s var(--g-ease-out) both; }
.reporting-drop.is-in .reporting-drag { animation: reporting-drag .8s var(--g-ease-out) both; }
.reporting-drop.is-in .reporting-zone:nth-child(1) .reporting-drag { animation-delay: .25s; }
.reporting-drop.is-in .reporting-zone:nth-child(2) .reporting-drag { animation-delay: .65s; }
.reporting-drop.is-in > :nth-child(3), .reporting-drop.is-in > :nth-child(4) { animation-delay: .9s; }
.reporting-drop.is-in .reporting-skel i { animation: reporting-fade .4s ease both; animation-delay: calc(1.1s + var(--n, 0) * 60ms); }
.reporting-skel i:nth-child(2) { --n: 1; } .reporting-skel i:nth-child(3) { --n: 2; }
.reporting-skel i:nth-child(4) { --n: 3; } .reporting-skel i:nth-child(5) { --n: 4; }
.reporting-skel i:nth-child(6) { --n: 5; } .reporting-skel i:nth-child(7) { --n: 6; }
.reporting-skel i:nth-child(8) { --n: 7; } .reporting-skel i:nth-child(9) { --n: 8; }
@keyframes reporting-drag {
  0% { opacity: 0; transform: translate(60px, -34px) rotate(-8deg) scale(1.08); }
  60% { opacity: 1; transform: translate(-3px, 2px) rotate(1deg) scale(1); }
  100% { opacity: 1; transform: none; }
}
@keyframes reporting-fade { from { opacity: 0; } to { opacity: 1; } }

/* 03 — tri par total : les barres se remplissent */
.reporting-bars { list-style: none; display: grid; gap: 10px; margin-top: 4px; }
.reporting-bars li { display: grid; grid-template-columns: 104px 1fr auto; gap: 12px; align-items: center; font-size: 12.5px; }
.reporting-bars li > span { font-weight: 600; }
.reporting-bars b { font-family: var(--display); font-size: 12.5px; white-space: nowrap; }
.reporting-bars i { position: relative; height: 10px; border-radius: 100px; background: var(--paper-2); overflow: hidden; }
.reporting-bars i::after {
  content: ""; position: absolute; inset: 0; border-radius: inherit;
  background: linear-gradient(90deg, var(--pine), var(--sky));
  transform-origin: 0 50%; transform: scaleX(var(--w, 1));
}
.reporting-sort.is-in > * { animation: reporting-up .45s var(--g-ease-out) both; }
.reporting-sort.is-in > :nth-child(2) { animation-delay: .1s; }
.reporting-sort.is-in > :nth-child(3) { animation-delay: .2s; }
.reporting-sort.is-in .reporting-bars i::after { animation: reporting-grow 1s var(--g-ease-out) both; }
.reporting-sort.is-in .reporting-bars li:nth-child(1) i::after { animation-delay: .35s; }
.reporting-sort.is-in .reporting-bars li:nth-child(2) i::after { animation-delay: .47s; }
.reporting-sort.is-in .reporting-bars li:nth-child(3) i::after { animation-delay: .59s; }
.reporting-sort.is-in .reporting-bars li:nth-child(4) i::after { animation-delay: .71s; }
@keyframes reporting-grow { from { transform: scaleX(0); } }

/* 04 — enregistrement */
.reporting-field { display: grid; gap: 6px; }
.reporting-input {
  display: block; border: 1.5px solid var(--line); border-radius: 10px; padding: 9px 12px;
  font-size: 13px; font-weight: 600; background: var(--white); overflow: hidden;
}
.reporting-saved {
  display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 10px;
  background: var(--g-sky-soft); color: var(--g-green-ink); font-size: 12.5px; font-weight: 700;
}
.reporting-saved-ic {
  width: 24px; height: 24px; border-radius: 50%; flex-shrink: 0; display: grid; place-items: center;
  background: var(--g-green-ink); color: var(--white); font-size: 13px;
}
.reporting-save.is-in > * { animation: reporting-up .45s var(--g-ease-out) both; }
.reporting-save.is-in > :nth-child(2) { animation-delay: .25s; }
.reporting-save.is-in > :nth-child(3) { animation-delay: .5s; }
.reporting-save.is-in > .reporting-saved { animation: reporting-pick .7s var(--g-ease-out) .85s both; }

/* 05 — export : les fichiers sortent l'un après l'autre */
.reporting-file {
  display: flex; align-items: center; gap: 14px; padding: 12px 14px;
  border: 1.5px solid var(--line); border-radius: 12px; background: var(--white);
  font-family: var(--display); font-weight: 800; font-size: 14.5px;
}
.reporting-file small { display: block; font-family: var(--body); font-weight: 500; font-size: 12px; color: var(--ink-soft); }
.reporting-file-ic {
  width: 42px; height: 50px; border-radius: 6px 14px 6px 6px; flex-shrink: 0;
  display: grid; place-items: end center; padding-bottom: 7px;
  background: var(--g-green-ink); color: var(--white); font-size: 9.5px; letter-spacing: .06em;
}
.reporting-file-ic--csv { background: var(--ink); }
.reporting-exp.is-in .reporting-file { animation: reporting-file .6s var(--g-ease-out) both; }
.reporting-exp.is-in .reporting-file:nth-child(2) { animation-delay: .15s; }
.reporting-exp.is-in .reporting-file:nth-child(3) { animation-delay: .3s; }
.reporting-exp.is-in .reporting-file-ic { animation: reporting-bob .7s var(--g-ease-out) both; animation-delay: inherit; }
@keyframes reporting-file { from { opacity: 0; transform: translateY(-18px) rotate(-2deg); } to { opacity: 1; transform: none; } }
@keyframes reporting-bob { 0% { transform: translateY(-6px); } 60% { transform: translateY(2px); } 100% { transform: none; } }

/* ---------- Bibliothèque filtrable ---------- */
.reporting-lib > .g-example { margin-bottom: 14px; }
.reporting-lib .g-chips { justify-content: flex-start; margin-bottom: 16px; }
.reporting-lib .g-chip { font-size: 13px; padding: 7px 14px; }
.reporting-lib .segment-item[hidden] { display: none; }
@media (min-width: 901px) {   /* hauteur stable quand le filtre masque des rapports */
  .reporting-lib .segment-list { min-height: 390px; align-content: start; }
}
.reporting-lib .segment-item { transition: transform .3s var(--g-ease-out), box-shadow .3s; }
.reporting-lib .segment-item:hover { transform: translateX(4px); box-shadow: var(--shadow-md); }

/* ---------- Chiffres ---------- */
.reporting-keys-sec .g-key p { font-size: 16px; }
.reporting-keys-sec .g-key p b { color: var(--white); font-weight: 700; }
.reporting-keys-sec .g-key-cap { margin-bottom: 12px; }


/* ============================================================================
   ESPACE DONATEUR
   ============================================================================ */

/* ---------- Hero : le tableau de bord s'anime ---------- */
.espace-donateur-stage .donor-dash { box-shadow: var(--shadow-lg); }
.espace-donateur-stage { padding-bottom: 72px; }
.espace-donateur-stage .g-layer--bl { bottom: 6px; left: -8px; }
.espace-donateur-stage .dd-bar span,
.espace-donateur-gauges .dd-bar span,
.espace-donateur-mbar span { transform-origin: 0 50%; }
.espace-donateur-stage.is-in .dd-bar .mc { animation: espace-donateur-grow 1s var(--g-ease-out) .6s both; }
.espace-donateur-stage.is-in .dd-bar .ext { animation: espace-donateur-grow .6s var(--g-ease-out) 1.5s both; }
.espace-donateur-stage .dd-months span { transform-origin: 50% 100%; }
.espace-donateur-stage.is-in .dd-months span { animation: espace-donateur-rise .6s var(--g-ease-out) both; animation-delay: calc(.7s + var(--n, 0) * 70ms); }
.espace-donateur-stage .dd-months span:nth-child(2) { --n: 1; }
.espace-donateur-stage .dd-months span:nth-child(3) { --n: 2; }
.espace-donateur-stage .dd-months span:nth-child(4) { --n: 3; }
.espace-donateur-stage .dd-months span:nth-child(5) { --n: 4; }
.espace-donateur-stage .dd-months span:nth-child(6) { --n: 5; }
.espace-donateur-stage .dd-months span:nth-child(7) { --n: 6; }
.espace-donateur-stage .dd-months span:nth-child(8) { --n: 7; }
.espace-donateur-stage .dd-months span:nth-child(9) { --n: 8; }
.espace-donateur-stage .dd-months span:nth-child(10) { --n: 9; }
.espace-donateur-stage .dd-months span:nth-child(11) { --n: 10; }
.espace-donateur-stage .dd-months span:nth-child(12) { --n: 11; }
.espace-donateur-stage.is-in .dd-row { animation: espace-donateur-in .55s var(--g-ease-out) both; }
.espace-donateur-stage.is-in .dd-row:nth-child(1) { animation-delay: 1.3s; }
.espace-donateur-stage.is-in .dd-row:nth-child(2) { animation-delay: 1.45s; }
.espace-donateur-stage.is-in .dd-btn { animation: reporting-nudge .6s var(--g-ease-out) 2.1s both; }
@keyframes espace-donateur-grow { from { transform: scaleX(0); } }
@keyframes espace-donateur-rise { from { transform: scaleY(0); } }
@keyframes espace-donateur-in { from { opacity: 0; transform: translateX(16px); } to { opacity: 1; transform: none; } }

/* ---------- Mosaïque du tableau de bord ---------- */
.espace-donateur-bento {
  max-width: 1080px; margin: 0 auto; display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px;
}
.espace-donateur-tile {
  background: var(--white); border: 1px solid var(--line); border-radius: var(--r-lg);
  padding: 20px; box-shadow: var(--shadow-sm); position: relative; overflow: hidden;
  display: flex; flex-direction: column; align-items: flex-start; gap: 10px;
  transition: transform .35s var(--g-ease-out), box-shadow .35s, border-color .35s;
}
.espace-donateur-tile:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); border-color: transparent; }
.espace-donateur-tile--wide { grid-column: span 2; }
.espace-donateur-ic {
  width: 44px; height: 44px; border-radius: 14px; display: grid; place-items: center;
  font-size: 21px; background: var(--paper-2); transition: transform .45s var(--g-ease-out);
}
.espace-donateur-tile:hover .espace-donateur-ic { transform: scale(1.1) rotate(-6deg); }
.espace-donateur-tile .chip-key {
  font-family: var(--display); font-weight: 800; font-size: 12px; letter-spacing: .05em;
  background: var(--pine-soft); color: var(--pine-deep); padding: 3px 9px; border-radius: 6px;
}
.espace-donateur-tile .chip-lab { font-size: 13.5px; color: var(--ink-soft); }
.espace-donateur-tile .chip-lab b { display: block; color: var(--ink); font-family: var(--display); font-size: 16px; line-height: 1.3; margin-bottom: 3px; }
.espace-donateur-dot { display: none; }
.espace-donateur-gauge { display: block; width: 100%; height: 10px; border-radius: 100px; background: var(--paper-2); overflow: hidden; margin-top: auto; }
.espace-donateur-gauge i { display: block; height: 100%; width: 76%; border-radius: inherit; background: linear-gradient(90deg, var(--pine) 0 87%, #aab6f2 87%); transform-origin: 0 50%; }
.espace-donateur-bento.is-in .espace-donateur-gauge i { animation: espace-donateur-grow 1.2s var(--g-ease-out) .5s both; }
.espace-donateur-months { display: flex; align-items: flex-end; gap: 5px; width: 100%; height: 44px; margin-top: auto; }
.espace-donateur-months i { flex: 1; border-radius: 3px 3px 0 0; background: var(--pine); transform-origin: 50% 100%; }
.espace-donateur-months i:nth-child(n+11) { background: var(--line); }
.espace-donateur-months i:nth-child(1) { height: 30%; --n: 0; }
.espace-donateur-months i:nth-child(2) { height: 30%; --n: 1; }
.espace-donateur-months i:nth-child(3) { height: 70%; --n: 2; }
.espace-donateur-months i:nth-child(4) { height: 30%; --n: 3; }
.espace-donateur-months i:nth-child(5) { height: 30%; --n: 4; }
.espace-donateur-months i:nth-child(6) { height: 100%; --n: 5; }
.espace-donateur-months i:nth-child(7) { height: 30%; --n: 6; }
.espace-donateur-months i:nth-child(8) { height: 30%; --n: 7; }
.espace-donateur-months i:nth-child(9) { height: 30%; --n: 8; }
.espace-donateur-months i:nth-child(10) { height: 45%; --n: 9; }
.espace-donateur-months i:nth-child(11) { height: 8%; --n: 10; }
.espace-donateur-months i:nth-child(12) { height: 8%; --n: 11; }
.espace-donateur-bento.is-in .espace-donateur-months i { animation: espace-donateur-rise .6s var(--g-ease-out) both; animation-delay: calc(.5s + var(--n, 0) * 60ms); }
.espace-donateur-steps { display: flex; gap: 6px; width: 100%; margin-top: auto; }
.espace-donateur-steps i { flex: 1; height: 10px; border-radius: 100px; background: var(--paper-2); border: 1px solid var(--line); }
.espace-donateur-steps i.is-on { background: var(--pine); border-color: var(--pine); transform-origin: 0 50%; }
.espace-donateur-bento.is-in .espace-donateur-steps i.is-on { animation: espace-donateur-grow .5s var(--g-ease-out) both; animation-delay: .6s; }
.espace-donateur-bento.is-in .espace-donateur-steps i.is-on + i.is-on { animation-delay: .9s; }

/* ---------- Connexion : 3 étapes reliées, chacune avec sa mini-maquette ---------- */
.espace-donateur-path { grid-template-columns: repeat(3, 1fr); max-width: 980px; gap: 26px; }
.espace-donateur-path::before, .espace-donateur-path::after { left: 16.6%; right: 16.6%; }
.espace-donateur-path li { display: flex; flex-direction: column; align-items: center; }
.espace-donateur-path li::before { box-shadow: 0 0 0 6px var(--paper-2); }
.espace-donateur-mini {
  order: -1; width: 100%; max-width: 250px; min-height: 92px; margin-bottom: 18px;
  background: var(--white); border: 1px solid var(--line); border-radius: var(--r-md); box-shadow: var(--shadow-sm);
  padding: 14px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px;
}
.espace-donateur-path li::before { order: -2; }
.espace-donateur-mail {
  display: flex; align-items: center; gap: 8px; width: 100%; padding: 8px 10px;
  border: 1.5px solid var(--pine); border-radius: 9px; font-size: 13px;
}
.espace-donateur-mail i { display: block; height: 8px; flex: 1; border-radius: 4px; background: var(--pine-soft); transform-origin: 0 50%; }
.espace-donateur-social { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; width: 100%; }
.espace-donateur-social span { border: 1px solid var(--line); border-radius: 8px; padding: 5px; font-size: 11px; font-weight: 700; color: var(--ink-soft); text-align: center; }
.espace-donateur-otp { display: grid; grid-template-columns: repeat(6, 1fr); gap: 5px; width: 100%; }
.espace-donateur-otp i {
  height: 34px; border: 1.5px solid var(--line); border-radius: 8px; position: relative;
}
.espace-donateur-otp i::after {
  content: ""; position: absolute; left: 50%; top: 50%; width: 8px; height: 8px; margin: -4px 0 0 -4px;
  border-radius: 50%; background: var(--ink);
}
.espace-donateur-timer {
  font-size: 11px; font-weight: 800; letter-spacing: .06em; color: #8a6d12;
  background: var(--apricot-soft); padding: 2px 9px; border-radius: 100px;
}
.espace-donateur-device { position: relative; font-size: 34px; line-height: 1; }
.espace-donateur-device b {
  position: absolute; right: -10px; bottom: -4px; width: 22px; height: 22px; border-radius: 50%;
  display: grid; place-items: center; font-size: 12px; background: var(--g-green-ink); color: var(--white);
  box-shadow: 0 0 0 3px var(--white);
}
/* À l'apparition : l'adresse s'écrit, les cases du code se remplissent, l'appareil est validé */
.espace-donateur-path.is-in .espace-donateur-mail i { animation: espace-donateur-grow .9s var(--g-ease-out) .2s both; }
.espace-donateur-path.is-in .espace-donateur-otp i::after { animation: reporting-pop .3s var(--g-ease-out) both; animation-delay: calc(.7s + var(--n, 0) * 140ms); }
.espace-donateur-path.is-in .espace-donateur-otp i { animation: espace-donateur-box .3s ease both; animation-delay: calc(.7s + var(--n, 0) * 140ms); }
.espace-donateur-otp i:nth-child(2) { --n: 1; } .espace-donateur-otp i:nth-child(3) { --n: 2; }
.espace-donateur-otp i:nth-child(4) { --n: 3; } .espace-donateur-otp i:nth-child(5) { --n: 4; }
.espace-donateur-otp i:nth-child(6) { --n: 5; }
.espace-donateur-otp i:nth-child(2)::after { --n: 1; } .espace-donateur-otp i:nth-child(3)::after { --n: 2; }
.espace-donateur-otp i:nth-child(4)::after { --n: 3; } .espace-donateur-otp i:nth-child(5)::after { --n: 4; }
.espace-donateur-otp i:nth-child(6)::after { --n: 5; }
.espace-donateur-path.is-in .espace-donateur-device b { animation: reporting-pick .6s var(--g-ease-out) 1.7s both; }
@keyframes espace-donateur-box { from { transform: scale(.9); } 60% { transform: scale(1.06); } to { transform: none; } }
.espace-donateur-tally { margin-top: 56px; }
.espace-donateur-tally .g-tally-v small { font-size: .42em; letter-spacing: 0; -webkit-text-stroke: 0; color: var(--pine); }

/* ---------- Scrollytelling : écrans du téléphone ---------- */
.espace-donateur-scrolly .g-scrolly-step p a { color: var(--pine); }
.espace-donateur-meta { font-size: 12px; color: var(--ink-soft); line-height: 1.4; }
.espace-donateur-sic { margin-right: 4px; }
.espace-donateur-badges { display: flex; gap: 6px; }
.espace-donateur-pdf {
  width: 30px; height: 36px; border-radius: 4px 9px 4px 4px; flex-shrink: 0;
  display: grid; place-items: end center; padding-bottom: 4px;
  background: #b3261e; color: var(--white); font-size: 8.5px; font-weight: 800; letter-spacing: .05em;
}
.espace-donateur-dl b { color: var(--pine); font-size: 16px; }
.espace-donateur-plan { border: 1.5px solid var(--line); border-radius: 12px; padding: 12px; }
.espace-donateur-plan-bar { height: 10px; border-radius: 100px; background: var(--paper-2); overflow: hidden; }
.espace-donateur-plan-bar i { display: block; width: 66%; height: 100%; border-radius: inherit; background: var(--pine); transform-origin: 0 50%; }
.espace-donateur-plan-leg { display: flex; justify-content: space-between; margin-top: 8px; font-size: 11.5px; font-weight: 700; color: var(--ink-soft); }
.espace-donateur-stop { background: var(--white); color: #b3261e; border: 1.5px solid #f0c9c6; }
.espace-donateur-mbar { margin: 4px 0 2px; }
/* L'écran actif rejoue ses détails */
.espace-donateur-scrolly .g-scrolly-state.is-active .espace-donateur-dl { animation: espace-donateur-in .5s var(--g-ease-out) both; }
.espace-donateur-scrolly .g-scrolly-state.is-active .espace-donateur-dl + .espace-donateur-dl { animation-delay: .12s; }
.espace-donateur-scrolly .g-scrolly-state.is-active .espace-donateur-plan-bar i { animation: espace-donateur-grow 1s var(--g-ease-out) .2s both; }
.espace-donateur-scrolly .g-scrolly-state.is-active .espace-donateur-mbar .ext { animation: espace-donateur-grow .7s var(--g-ease-out) .35s both; }
.espace-donateur-scrolly .g-scrolly-state.is-active .g-btn { animation: reporting-nudge .6s var(--g-ease-out) .5s both; }

/* ---------- Budget / réduction d'impôt : deux jauges ---------- */
.espace-donateur-gauges {
  max-width: 640px; margin: 0 auto 40px; background: var(--white); border: 1px solid var(--line);
  border-radius: var(--r-lg); box-shadow: var(--shadow-md); padding: 22px 24px; display: grid; gap: 18px;
}
.espace-donateur-gauges > .g-example { justify-self: start; }
.espace-donateur-gauges .dd-bar { height: 14px; }
.espace-donateur-gauges .dd-legend { margin-top: 0; }
.espace-donateur-no {
  background: repeating-linear-gradient(135deg, #f3d3d0 0 4px, var(--white) 4px 8px) !important;
  outline: 1px dashed #d88c86; outline-offset: -1px;
}
.espace-donateur-gauges.is-in .dd-bar .mc { animation: espace-donateur-grow 1s var(--g-ease-out) .2s both; }
.espace-donateur-gauges.is-in .dd-bar .ext { animation: espace-donateur-grow .6s var(--g-ease-out) 1.1s both; }
.espace-donateur-gauges.is-in .espace-donateur-gauge-row + .espace-donateur-gauge-row .dd-bar .mc { animation-delay: .5s; }
.espace-donateur-gauges.is-in .dd-bar .espace-donateur-no { animation: reporting-fade .6s ease 1.5s both; }


/* ============================================================================
   RESPONSIVE
   ============================================================================ */
@media (max-width: 1000px) {
  .reporting-sources { grid-template-columns: repeat(2, 1fr); }
  .espace-donateur-bento { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 900px) {
  .reporting-stage { padding-bottom: 0; }
  .reporting-stage .g-layer, .espace-donateur-stage .g-layer { inset: auto; }
  .espace-donateur-stage { padding-bottom: 0; }
  .reporting-stage .rb-table th, .reporting-stage .rb-table td { padding: 6px 5px; }
  .reporting-stage .rb-body { padding: 14px 12px; }
  .reporting-bars li { grid-template-columns: 86px 1fr auto; gap: 8px; }
  .reporting-lib .g-chips { justify-content: center; }
  .espace-donateur-path { grid-template-columns: 1fr; gap: 26px; }
  .espace-donateur-path li { display: grid; grid-template-columns: 46px 1fr; column-gap: 16px; align-items: start; }
  .espace-donateur-path li::before { grid-row: span 3; }
  .espace-donateur-mini { order: 0; grid-column: 2; max-width: 280px; margin: 0 0 12px; }
  .espace-donateur-path .g-path-name, .espace-donateur-path .g-path-desc { grid-column: 2; }
  .espace-donateur-tally { margin-top: 40px; }
  .espace-donateur-gauges { padding: 18px; }
}
@media (max-width: 560px) {
  .reporting-sources { grid-template-columns: 1fr; }
  .espace-donateur-bento { grid-template-columns: 1fr; }
  .espace-donateur-tile--wide { grid-column: auto; }
}

/* Tableau comparatif de l'espace donateur : en cartes empilées sur téléphone */
@media (max-width: 600px) {
  .espace-donateur-cmp { overflow: visible; }
  .espace-donateur-cmp table { min-width: 0; }
  .espace-donateur-cmp thead { display: none; }
  .espace-donateur-cmp tbody, .espace-donateur-cmp tr, .espace-donateur-cmp td { display: block; }
  .espace-donateur-cmp tr {
    background: var(--white); border: 1px solid var(--line); border-radius: var(--r-md);
    overflow: hidden; margin-bottom: 12px;
  }
  .espace-donateur-cmp td { padding: 11px 16px; border-bottom: 1px solid var(--line); font-size: 14px; }
  .espace-donateur-cmp tbody tr:last-child td { border-bottom: 1px solid var(--line); }
  .espace-donateur-cmp tr td:last-child { border-bottom: 0 !important; }
  .espace-donateur-cmp td:first-child { font-family: var(--display); font-size: 15px; background: var(--paper-2); }
  .espace-donateur-cmp td[data-label]::before {
    content: attr(data-label); display: block; margin-bottom: 3px;
    font-size: 10.5px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-soft);
  }
  .espace-donateur-cmp td.col-mc[data-label]::before { color: var(--pine); }
}
