/* Espace de suivi — même identité visuelle que le site FNCF (vert forêt, ivoire, Fraunces + Work Sans).
   Tout est préfixé par .esp : rien ne déborde sur le reste du site. Le reset de Tailwind étant actif,
   les titres, listes, boutons et tableaux sont redéfinis explicitement. */
.esp {
  --forest: #0B3B2E; --forest-2: #145C46; --green: #0E7A35; --green-light: #2FB567; --green-soft: #EAF7EE;
  --gold: #D4A017; --gold-soft: #FBF3DC; --ink: #24332D; --muted: #5C685F; --line: #DCEDE2; --bg: #F5F9F6;
  --red: #B8503A; --red-soft: #FBEAE6;
  font-family: 'Work Sans', 'Segoe UI', Arial, sans-serif; color: var(--ink); background: var(--bg);
  padding: 28px 16px 64px; line-height: 1.6; min-height: 70vh;
}
.esp *, .esp *::before, .esp *::after { box-sizing: border-box; }
.esp-wrap { max-width: 960px; margin: 0 auto; }
.esp-barre { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap;
  font-size: .82rem; font-weight: 600; color: var(--muted); margin-bottom: 14px; text-transform: uppercase; letter-spacing: .08em; }
.esp-barre a { color: var(--green); text-decoration: none; text-transform: none; letter-spacing: 0; margin-left: 14px; font-size: .9rem; }
.esp-barre a:hover { text-decoration: underline; }

.esp h1, .esp h2, .esp h3 { font-family: 'Fraunces', Georgia, serif; color: var(--forest); font-weight: 600; line-height: 1.2; margin: 0; }
.esp h1 { font-size: 1.9rem; margin-bottom: 8px; }
.esp h2 { font-size: 1.3rem; margin-bottom: 14px; display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.esp h2 small { font-family: 'Work Sans', sans-serif; font-size: .8rem; font-weight: 500; color: var(--muted); }
.esp h3 { font-size: 1.1rem; margin: 14px 0 6px; }
.esp p { margin: 0 0 10px; }
.esp a { color: var(--green); }
.esp small { color: var(--muted); }
.esp img { max-width: 100%; height: auto; display: inline-block; }

/* Cartes */
.esp section, .esp .carte-form { background: #fff; border: 1px solid var(--line); border-radius: 20px; padding: 24px;
  margin-bottom: 18px; box-shadow: 0 2px 10px -2px rgba(28,25,23,.05), 0 14px 30px -18px rgba(10,58,36,.18); }
.esp .carte-form { max-width: 560px; }

/* En-tête de la bénéficiaire */
.esp .fiche { display: flex; gap: 22px; align-items: center; flex-wrap: wrap; color: #fff; border-radius: 24px; padding: 26px 28px; margin-bottom: 18px;
  background: radial-gradient(circle at 92% 8%, rgba(47,181,103,.28), transparent 32%), radial-gradient(circle at 4% 100%, rgba(168,230,184,.14), transparent 36%), var(--forest); }
.esp .fiche h1 { color: #fff; font-size: 2rem; }
.esp .fiche p { color: rgba(255,255,255,.85); margin: 0; }
.esp .fiche strong { color: #fff; }
.esp .photo-fiche { width: 92px; height: 115px; object-fit: cover; border-radius: 14px; border: 3px solid rgba(255,255,255,.7); }
.esp .badge { display: inline-block; margin-top: 10px; background: var(--gold); color: #1C1917 !important; font-weight: 700; font-size: .82rem;
  padding: 4px 12px; border-radius: 999px; text-decoration: none; }

/* Frise des étapes */
.esp .frise { display: flex; list-style: none; padding: 18px 8px 8px; margin: 0 0 14px; counter-reset: e; background: #fff;
  border: 1px solid var(--line); border-radius: 20px; }
.esp .frise li { flex: 1; text-align: center; font-size: .78rem; position: relative; padding-top: 42px; color: #98A39C; }
.esp .frise li::before { counter-increment: e; content: counter(e); position: absolute; top: 0; left: 50%; transform: translateX(-50%);
  width: 32px; height: 32px; line-height: 32px; border-radius: 50%; background: #E6EFE9; color: #7a877f; font-weight: 700; font-size: .85rem; }
.esp .frise li::after { content: ""; position: absolute; top: 15px; left: calc(-50% + 20px); right: calc(50% + 20px); height: 2px; background: #E1EBE5; }
.esp .frise li:first-child::after { display: none; }
.esp .frise li.fait { color: var(--green); }
.esp .frise li.fait::before { background: var(--green); color: #fff; content: "✓"; }
.esp .frise li.fait::after, .esp .frise li.actuel::after { background: var(--green); }
.esp .frise li.actuel { color: var(--forest); font-weight: 700; }
.esp .frise li.actuel::before { background: var(--gold); color: #1C1917; box-shadow: 0 0 0 5px rgba(212,160,23,.22); }
.esp .frise li.rejet { color: var(--red); font-weight: 700; }
.esp .frise li.rejet::before { background: var(--red); color: #fff; content: "✕"; }

.esp .statut { display: inline-block; padding: 5px 14px; border-radius: 999px; font-size: .85rem; font-weight: 600; margin: 4px 0 10px;
  background: var(--green-soft); color: var(--green); }
.esp .statut-incomplet, .esp .statut-comite, .esp .statut-depose { background: var(--gold-soft); color: #8a6400; }
.esp .statut-rejete { background: var(--red-soft); color: var(--red); }
.esp .statut-solde { background: var(--green); color: #fff; }
.esp .prochaine { background: #fff; border: 1px solid var(--line); border-left: 5px solid var(--green); border-radius: 14px; padding: 14px 18px; margin-bottom: 18px; }
.esp .encadre-rejet { border: 2px solid var(--red); }

/* Mon projet */
.esp .intitule { margin-top: 0; font-size: 1.2rem; }
.esp .description { color: var(--muted); }
.esp .infos-projet { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 12px; margin: 14px 0 0; padding: 0; }
.esp .infos-projet div { background: var(--bg); border: 1px solid var(--line); border-radius: 14px; padding: 12px 14px; }
.esp .infos-projet dt { font-size: .68rem; font-weight: 700; text-transform: uppercase; letter-spacing: .1em; color: var(--muted); }
.esp .infos-projet dd { margin: 2px 0 0; font-weight: 600; }

/* Pièces */
.esp .liste-pieces { list-style: none; margin: 0; padding: 0; }
.esp .liste-pieces li { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 10px 0; border-bottom: 1px solid #EEF5F0; }
.esp .liste-pieces li:last-child { border-bottom: 0; }
.esp .liste-pieces li > span { width: 24px; height: 24px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; font-weight: 700; font-size: .8rem; }
.esp .liste-pieces li.ok > span { background: var(--green); color: #fff; }
.esp .liste-pieces li.manque > span { background: var(--gold); color: #1C1917; }

/* Crédit */
.esp .chiffres { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; margin: 16px 0; }
.esp .chiffres div { background: var(--green-soft); border: 1px solid var(--line); border-radius: 16px; padding: 14px 16px;
  font-family: 'Space Mono', monospace; font-weight: 700; font-size: 1.05rem; color: var(--forest); }
.esp .chiffres span { display: block; font-family: 'Work Sans', sans-serif; font-size: .68rem; font-weight: 700; text-transform: uppercase; letter-spacing: .1em; color: var(--muted); margin-bottom: 4px; }
.esp progress { width: 100%; height: 12px; border-radius: 999px; overflow: hidden; border: 0; background: #E6EFE9; accent-color: var(--green); }
.esp progress::-webkit-progress-bar { background: #E6EFE9; }
.esp progress::-webkit-progress-value { background: var(--green); }
.esp progress::-moz-progress-bar { background: var(--green); }

/* Formulaires */
.esp label { display: block; margin: 12px 0; font-weight: 600; font-size: .92rem; }
.esp input:not([type=checkbox]):not([type=radio]), .esp select, .esp textarea { display: block; width: 100%; padding: 11px 14px; margin-top: 5px;
  border: 1px solid #CBD9D0; border-radius: 12px; font: inherit; background: #fff; color: var(--ink); }
.esp input[type=file] { padding: 10px; background: var(--bg); }
.esp input:focus, .esp select:focus, .esp textarea:focus { outline: 3px solid rgba(47,181,103,.28); border-color: var(--green-light); }
.esp .case { display: flex; gap: 10px; align-items: flex-start; font-weight: 500; }
.esp .case input { width: auto; margin: 4px 0 0; }
.esp button { background: #fff; color: var(--green); border: 2px solid var(--green); padding: 11px 22px; border-radius: 12px; font: inherit; font-weight: 700; cursor: pointer; margin-top: 8px; }
.esp button:hover { background: var(--green-soft); }
.esp button.principal { background: var(--green); color: #fff; }
.esp button.principal:hover { background: var(--forest); border-color: var(--forest); }
.esp .aide, .esp small.aide { font-size: .85rem; color: var(--muted); }
.esp .erreur { background: var(--red-soft); color: var(--red); padding: 10px 14px; border-radius: 12px; font-weight: 600; }
.esp .info { background: var(--green-soft); color: var(--forest); padding: 10px 14px; border-radius: 12px; }
.esp .ok { color: var(--green); }

/* Tableau des remboursements */
.esp table { width: 100%; border-collapse: collapse; margin-top: 14px; font-size: .92rem; }
.esp th { text-align: left; font-size: .68rem; font-weight: 700; text-transform: uppercase; letter-spacing: .1em; color: var(--muted); padding: 8px 10px; border-bottom: 2px solid var(--line); }
.esp td { padding: 11px 10px; border-bottom: 1px solid #EEF5F0; }
.esp tr:last-child td { border-bottom: 0; }

/* Messages */
.esp .message { border-left: 4px solid var(--gold); background: var(--gold-soft); border-radius: 0 14px 14px 0; padding: 12px 16px; margin-bottom: 12px; }
.esp .message.nouveau { border-left-color: var(--green); background: var(--green-soft); }
.esp .message p { margin: 4px 0 0; }

/* Page de connexion */
.esp .suivi-accueil { display: grid; grid-template-columns: minmax(0, 1fr); gap: 24px; align-items: start; }
@media (min-width: 820px) { .esp .suivi-accueil { grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); } }
.esp .suivi-accueil .carte-form { max-width: none; margin: 0; }
.esp .suivi-points { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.esp .suivi-points li { background: #fff; border: 1px solid var(--line); border-left: 5px solid var(--green); border-radius: 16px; padding: 14px 18px; }
.esp .suivi-points strong { display: block; font-family: 'Fraunces', serif; color: var(--forest); }


@media (max-width: 560px) {
  .esp { padding: 18px 12px 48px; }
  .esp .frise li { font-size: .66rem; }
  .esp .fiche { padding: 20px; }
  .esp section, .esp .carte-form { padding: 18px; border-radius: 16px; }
}
