/* ==========================================================================
   Système de design — Mini-Entreprises Éducatives
   Ancrage : le cahier de classe illustré, l'atelier, l'étal de marché.
   Palette fixe à six rôles — ne pas ajouter de septième accent.
   ========================================================================== */

:root {
  /* Palette — chaude, vive, pensée pour un public d'élèves du collège */
  --papier: #FFF6E8;
  --papier-creux: #FFEAC5;   /* renfoncement : zones de saisie, en-têtes de tableau */
  --encre: #2B2118;
  --encre-douce: #6B5A48;   /* texte secondaire, sur fond papier */
  --indigo: #4C4FE0;
  --indigo-sombre: #3937B8;
  --vert-cahier: #16A97E;
  --vert-cahier-sombre: #0E7F5C;
  --ocre: #F2921B;
  --ocre-sombre: #A8460A;
  --ligne: #F2DFB8;
  --ligne-forte: #B37D22;
  --blanc-carnet: #FFFFFF;   /* feuille posée sur la table */
  --rouge-erreur: #C73A26;
  --soleil: #FFC93C;
  --corail: #FF6F59;
  --ciel: #D8F3EF;
  --violet-doux: #8B7FE8;

  /* Typographie — rond et amical pour un public d'élèves, sans perdre en lisibilité */
  --f-display: "Baloo 2", "Fredoka", "Segoe UI", sans-serif;
  --f-interface: "Nunito", -apple-system, "Segoe UI", sans-serif;

  /* Échelle typographique (ratio 1.25, base 16px) */
  --t-xs: 0.75rem;
  --t-sm: 0.875rem;
  --t-base: 1rem;
  --t-md: 1.25rem;
  --t-lg: 1.563rem;
  --t-xl: 1.953rem;
  --t-2xl: 2.441rem;
  --t-3xl: 3.052rem;

  /* Rythme */
  --espace-1: 0.25rem;
  --espace-2: 0.5rem;
  --espace-3: 0.75rem;
  --espace-4: 1rem;
  --espace-5: 1.25rem;
  --espace-6: 1.5rem;
  --espace-8: 2rem;
  --espace-12: 3rem;
  --espace-16: 4rem;

  --rayon: 12px;       /* généreux : on est dans un cahier d'élève, pas un tableur */
  --rayon-carte: 22px;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--papier);
  color: var(--encre);
  font-family: var(--f-interface);
  font-size: var(--t-base);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

body { min-height: 100vh; }

h1, h2, h3, h4 {
  font-family: var(--f-display);
  font-weight: 700;
  line-height: 1.15;
  margin: 0 0 var(--espace-4) 0;
  color: var(--encre);
  letter-spacing: -0.01em;
}
h1 { font-size: var(--t-3xl); font-weight: 700; }
h2 { font-size: var(--t-2xl); font-weight: 700; }
h3 { font-size: var(--t-lg); font-weight: 600; }
h4 { font-size: var(--t-md); font-weight: 600; }

p { margin: 0 0 var(--espace-4) 0; max-width: 62ch; color: var(--encre-douce); }
a { color: var(--indigo); text-decoration: none; font-weight: 600; }
a:hover { text-decoration: underline; }
a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible {
  outline: 3px solid var(--soleil);
  outline-offset: 2px;
  border-radius: 4px;
}

.tabular { font-variant-numeric: tabular-nums; }

/* -------------------------------------------------------------------- */
/* Structure de page                                                     */
/* -------------------------------------------------------------------- */

.page-shell { min-height: 100vh; display: flex; flex-direction: column; }

.entete {
  background: var(--encre);
  color: var(--blanc-carnet);
  padding: var(--espace-4) var(--espace-6);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--espace-4);
}
.entete__marque {
  display: flex;
  align-items: baseline;
  gap: var(--espace-2);
  font-family: var(--f-display);
  font-weight: 700;
  font-size: var(--t-md);
  color: var(--blanc-carnet);
}
.entete__marque .points {
  color: var(--soleil);
  font-family: var(--f-interface);
  font-size: var(--t-xs);
}
.entete__nav { display: flex; align-items: center; gap: var(--espace-4); flex-wrap: wrap; }
.entete__nav a, .entete__nav button.lien {
  color: var(--blanc-carnet);
  opacity: 0.85;
  font-size: var(--t-sm);
  font-weight: 700;
  background: none;
  border: none;
  cursor: pointer;
  font-family: var(--f-interface);
  padding: 0;
}
.entete__nav a:hover, .entete__nav button.lien:hover { opacity: 1; text-decoration: underline; }
.entete__utilisateur {
  font-size: var(--t-sm);
  border-left: 1px solid rgba(255,255,255,0.25);
  padding-left: var(--espace-4);
  display: flex;
  align-items: center;
  gap: var(--espace-3);
}
.entete__role {
  background: var(--indigo);
  color: var(--blanc-carnet);
  border-radius: 999px;
  padding: 3px 10px;
  font-size: var(--t-xs);
  font-weight: 700;
}

.contenu { flex: 1; padding: var(--espace-8) var(--espace-6); max-width: 1100px; width: 100%; margin: 0 auto; min-width: 0; }
.contenu--large { max-width: 1280px; }

.pied {
  text-align: center;
  font-size: var(--t-xs);
  color: var(--encre-douce);
  padding: var(--espace-6);
  border-top: 1px solid var(--ligne);
}

/* -------------------------------------------------------------------- */
/* Boutons — grands, ronds, un peu rebondis au clic                     */
/* -------------------------------------------------------------------- */

.bouton {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--espace-2);
  font-family: var(--f-interface);
  font-size: var(--t-sm);
  font-weight: 700;
  padding: 0.7rem 1.25rem;
  border-radius: 999px;
  border: 2px solid transparent;
  cursor: pointer;
  transition: transform 140ms cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 140ms ease, background-color 120ms ease, border-color 120ms ease;
  min-height: 44px; /* tap target mobile */
  line-height: 1;
}
.bouton:active { transform: translateY(1px) scale(0.98); }
.bouton:disabled { opacity: 0.5; cursor: not-allowed; transform: none; box-shadow: none; }

.bouton--primaire { background: var(--indigo); color: var(--blanc-carnet); box-shadow: 0 3px 0 var(--indigo-sombre); }
.bouton--primaire:hover:not(:disabled) { background: var(--indigo-sombre); }

.bouton--valide { background: var(--vert-cahier-sombre); color: var(--blanc-carnet); box-shadow: 0 3px 0 #0A6449; }
.bouton--valide:hover:not(:disabled) { background: #0A6449; }

.bouton--attention { background: var(--ocre-sombre); color: var(--blanc-carnet); box-shadow: 0 3px 0 #7E3407; }
.bouton--attention:hover:not(:disabled) { background: #7E3407; }

.bouton--discret {
  background: var(--blanc-carnet);
  color: var(--indigo);
  border-color: var(--ligne-forte);
}
.bouton--discret:hover:not(:disabled) { background: var(--papier-creux); border-color: var(--indigo); }

.bouton--danger { background: transparent; color: var(--rouge-erreur); border-color: var(--rouge-erreur); }
.bouton--danger:hover:not(:disabled) { background: rgba(199,58,38,0.08); }

.bouton--petit { padding: 0.45rem 0.9rem; font-size: var(--t-xs); min-height: 36px; box-shadow: 0 2px 0 rgba(0,0,0,0.15); }

.bouton:not(:disabled):hover { transform: translateY(-2px); text-decoration: none; }
.bouton:active { transform: translateY(1px); box-shadow: none; }

/* -------------------------------------------------------------------- */
/* Formulaires                                                           */
/* -------------------------------------------------------------------- */

.champ { margin-bottom: var(--espace-4); }
.champ label {
  display: block;
  font-size: var(--t-sm);
  color: var(--encre-douce);
  margin-bottom: var(--espace-1);
  font-weight: 700;
}
.champ input,
.champ select,
.champ textarea {
  width: 100%;
  font-family: var(--f-interface);
  font-size: var(--t-base);
  padding: 0.65rem 0.9rem;
  border: 2px solid var(--ligne);
  border-radius: var(--rayon);
  background: var(--blanc-carnet);
  color: var(--encre);
  min-height: 44px;
  transition: border-color 120ms ease, box-shadow 120ms ease;
}
.champ textarea { min-height: 88px; resize: vertical; }
.champ input:focus, .champ select:focus, .champ textarea:focus {
  border-color: var(--indigo);
  box-shadow: 0 0 0 3px rgba(76,79,224,0.15);
  outline: none;
}
.champ--montant input {
  text-align: right;
  font-variant-numeric: tabular-nums;
  font-size: var(--t-md);
  font-weight: 700;
}
.champ__aide { font-size: var(--t-xs); color: var(--encre-douce); margin-top: var(--espace-1); }
.champ__erreur { font-size: var(--t-xs); color: var(--rouge-erreur); margin-top: var(--espace-1); }

fieldset { border: none; padding: 0; margin: 0; }

/* -------------------------------------------------------------------- */
/* Messages / bannières                                                  */
/* -------------------------------------------------------------------- */

.bandeau {
  padding: var(--espace-3) var(--espace-4);
  border-radius: var(--rayon);
  font-size: var(--t-sm);
  font-weight: 600;
  margin-bottom: var(--espace-4);
  border-left: 4px solid transparent;
}
.bandeau--erreur { background: rgba(199,58,38,0.09); color: var(--rouge-erreur); border-color: var(--rouge-erreur); }
.bandeau--succes { background: rgba(14,127,92,0.1); color: var(--vert-cahier-sombre); border-color: var(--vert-cahier); }
.bandeau--attention { background: rgba(242,146,27,0.14); color: var(--ocre-sombre); border-color: var(--ocre); }
.bandeau--info { background: var(--papier-creux); color: var(--encre-douce); border-color: var(--ligne-forte); }

/* -------------------------------------------------------------------- */
/* Feuille / carnet — surface principale (pas de carte SaaS générique)   */
/* -------------------------------------------------------------------- */

.feuille {
  background: var(--blanc-carnet);
  border: 1px solid var(--ligne);
  border-radius: var(--rayon-carte) var(--rayon-carte) var(--rayon-carte) 6px;
  padding: var(--espace-6);
  box-shadow: 0 3px 0 var(--ligne);
}
.feuille + .feuille { margin-top: var(--espace-6); }
.feuille__entete {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: var(--espace-4);
  margin-bottom: var(--espace-4);
  flex-wrap: wrap;
}
.feuille__entete h3 { margin-bottom: 0; }

/* Ligne de statut (rangée simple — pour listes équipes/orgs) */
.rangee {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--espace-4);
  padding: var(--espace-4);
  border-bottom: 1px solid var(--ligne);
  border-radius: var(--rayon);
  flex-wrap: wrap;
  transition: background-color 120ms ease;
}
.rangee:last-child { border-bottom: none; }
.rangee:hover { background: var(--papier-creux); }
.rangee__titre { font-weight: 700; }
.rangee__meta { font-size: var(--t-sm); color: var(--encre-douce); }

/* Rangées / cartes rendues cliquables pour ouvrir une fiche détaillée */
.carte-cliquable {
  cursor: pointer;
  transition: transform 140ms ease, background-color 120ms ease, box-shadow 140ms ease;
}
.carte-cliquable:hover, .carte-cliquable:focus-visible {
  background: var(--papier-creux);
  transform: translateY(-2px);
}
.carte-cliquable__indice {
  flex: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px; height: 30px;
  border-radius: 50%;
  background: var(--papier-creux);
  color: var(--indigo);
  font-weight: 700;
  font-size: var(--t-md);
  transition: background-color 120ms ease, transform 140ms ease;
}
.carte-cliquable:hover .carte-cliquable__indice, .carte-cliquable:focus-visible .carte-cliquable__indice {
  background: var(--indigo);
  color: var(--blanc-carnet);
  transform: translateX(2px);
}

/* -------------------------------------------------------------------- */
/* Cahier de comptes — tableau ligné pour transactions                   */
/* -------------------------------------------------------------------- */

.cahier {
  width: 100%;
  border-collapse: collapse;
  font-size: var(--t-sm);
}
.cahier th {
  text-align: left;
  font-weight: 700;
  color: var(--encre-douce);
  padding: var(--espace-2) var(--espace-3);
  border-bottom: 3px solid var(--encre);
  font-size: var(--t-xs);
}
.cahier td {
  padding: var(--espace-3);
  border-bottom: 1px dashed var(--ligne);
  vertical-align: top;
}
.cahier tr:hover td { background: var(--papier-creux); }
.cahier tr:last-child td { border-bottom: none; }
.cahier td.montant, .cahier th.montant { text-align: right; font-variant-numeric: tabular-nums; font-weight: 700; }
.cahier .montant--positif { color: var(--vert-cahier-sombre); }
.cahier .montant--negatif { color: var(--rouge-erreur); }

.etiquette {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: var(--t-xs);
  font-weight: 700;
  white-space: nowrap;
}
.etiquette--cotisation, .etiquette--subvention { background: rgba(76,79,224,0.12); color: var(--indigo-sombre); }
.etiquette--vente { background: rgba(14,127,92,0.14); color: var(--vert-cahier-sombre); }
.etiquette--achat { background: rgba(168,70,10,0.14); color: var(--ocre-sombre); }
.etiquette--repartition { background: rgba(43,33,24,0.09); color: var(--encre); }
.etiquette--en_attente { background: rgba(242,146,27,0.16); color: var(--ocre-sombre); }
.etiquette--demande { background: rgba(76,79,224,0.12); color: var(--indigo-sombre); }
.etiquette--valide { background: rgba(14,127,92,0.14); color: var(--vert-cahier-sombre); }
.etiquette--rejete { background: rgba(199,58,38,0.12); color: var(--rouge-erreur); }
.etiquette--assigne { background: var(--papier-creux); color: var(--encre-douce); }
.etiquette--soumis { background: rgba(76,79,224,0.12); color: var(--indigo-sombre); }
.etiquette--inactif { background: rgba(43,33,24,0.08); color: var(--encre-douce); }

/* Solde de caisse — le chiffre qui compte le plus sur l'écran équipe */
.solde {
  font-family: var(--f-display);
  font-size: var(--t-3xl);
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  color: var(--vert-cahier-sombre);
  line-height: 1;
}
.solde--negatif { color: var(--rouge-erreur); }
.solde-bloc__label { font-size: var(--t-sm); color: var(--encre-douce); margin-bottom: var(--espace-1); font-weight: 600; }

/* -------------------------------------------------------------------- */
/* Frise des jalons — grosses pastilles colorées, ludique                */
/* -------------------------------------------------------------------- */

.frise { display: flex; align-items: flex-start; overflow-x: auto; padding: var(--espace-4) 0 var(--espace-2); gap: 0; }
.frise__etape {
  position: relative;
  flex: 1 0 140px;
  padding: 0 var(--espace-3);
  text-align: center;
}
.frise__etape::before {
  content: "";
  position: absolute;
  top: 21px;
  left: -50%;
  width: 100%;
  height: 4px;
  border-radius: 999px;
  background: var(--ligne);
  z-index: 0;
}
.frise__etape:first-child::before { display: none; }
.frise__etape.est-fait::before { background: var(--vert-cahier); }
.frise__puce {
  position: relative;
  z-index: 1;
  width: 44px; height: 44px;
  margin: 0 auto var(--espace-2);
  border-radius: 50%;
  background: var(--blanc-carnet);
  border: 3px solid var(--ligne-forte);
  display: flex; align-items: center; justify-content: center;
  font-family: var(--f-display);
  font-size: var(--t-base); font-weight: 700; color: var(--encre-douce);
  box-shadow: 0 3px 0 var(--ligne);
}
.frise__etape.est-fait .frise__puce { background: var(--vert-cahier-sombre); border-color: var(--vert-cahier-sombre); color: var(--blanc-carnet); box-shadow: 0 3px 0 #0A6449; }
.frise__etape.en-cours .frise__puce { border-color: var(--indigo); color: var(--indigo); box-shadow: 0 3px 0 var(--indigo); animation: pulse-doux 1.6s ease-in-out infinite; }
.frise__etape.est-rejete .frise__puce { border-color: var(--rouge-erreur); color: var(--rouge-erreur); box-shadow: 0 3px 0 var(--rouge-erreur); }
.frise__nom { font-size: var(--t-sm); font-weight: 700; }
.frise__statut { font-size: var(--t-xs); color: var(--encre-douce); }

@keyframes pulse-doux {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.06); }
}

/* -------------------------------------------------------------------- */
/* Grille de tuiles simples (admin/organisation)                         */
/* -------------------------------------------------------------------- */

.grille-gestion {
  display: grid;
  grid-template-columns: minmax(240px, 320px) 1fr;
  gap: var(--espace-6);
  align-items: start;
  min-width: 0;
}
.grille-gestion > * { min-width: 0; }
@media (max-width: 780px) {
  .grille-gestion { grid-template-columns: 1fr; }
}

.liste-nav { list-style: none; margin: 0; padding: 0; }
.liste-nav li + li { margin-top: var(--espace-1); }
.liste-nav button {
  width: 100%;
  text-align: left;
  background: none;
  border: none;
  padding: var(--espace-3) var(--espace-3);
  font-family: var(--f-interface);
  font-size: var(--t-sm);
  font-weight: 700;
  color: var(--encre);
  cursor: pointer;
  border-radius: var(--rayon);
  transition: background-color 120ms ease, transform 120ms ease;
}
.liste-nav button:hover { background: var(--papier-creux); }
.liste-nav button.actif { background: var(--indigo); color: var(--blanc-carnet); box-shadow: 0 3px 0 var(--indigo-sombre); }

/* -------------------------------------------------------------------- */
/* Onglets (formateur : Séances / Assignations / Jalons / Évaluations)   */
/* -------------------------------------------------------------------- */

.onglets { display: flex; gap: var(--espace-1); border-bottom: 3px solid var(--ligne); margin-bottom: var(--espace-6); overflow-x: auto; }
.onglets button {
  background: none;
  border: none;
  font-family: var(--f-interface);
  font-size: var(--t-sm);
  font-weight: 700;
  color: var(--encre-douce);
  padding: var(--espace-3) var(--espace-3);
  cursor: pointer;
  border-radius: var(--rayon) var(--rayon) 0 0;
  border-bottom: 3px solid transparent;
  margin-bottom: -3px;
  white-space: nowrap;
  transition: color 120ms ease, background-color 120ms ease;
}
.onglets button.actif { color: var(--indigo); border-bottom-color: var(--indigo); background: var(--papier-creux); }
.onglets button:hover:not(.actif) { color: var(--encre); background: var(--papier-creux); }

/* -------------------------------------------------------------------- */
/* Écran de clôture — cérémonie                                          */
/* -------------------------------------------------------------------- */

.ceremonie {
  background: var(--encre);
  color: var(--blanc-carnet);
  border-radius: var(--rayon-carte);
  padding: var(--espace-8);
}
.ceremonie h2, .ceremonie h3, .ceremonie h4 { color: var(--blanc-carnet); }
.ceremonie p { color: rgba(255,246,232,0.78); }
.ceremonie__solde { color: var(--soleil); }
.ceremonie__ligne {
  display: flex;
  justify-content: space-between;
  padding: var(--espace-3) 0;
  border-bottom: 1px solid rgba(255,255,255,0.15);
  font-variant-numeric: tabular-nums;
}
.ceremonie__total {
  display: flex;
  justify-content: space-between;
  padding-top: var(--espace-4);
  font-weight: 700;
  font-size: var(--t-md);
  font-variant-numeric: tabular-nums;
}
.ceremonie__total.ok { color: #6FE0B0; }
.ceremonie__total.ko { color: #FFA98F; }
.ceremonie .champ input {
  background: rgba(255,255,255,0.08);
  border-color: rgba(255,255,255,0.28);
  color: var(--blanc-carnet);
}
.ceremonie .champ label { color: rgba(255,246,232,0.78); }
.case-confirmation {
  display: flex;
  align-items: flex-start;
  gap: var(--espace-3);
  margin: var(--espace-6) 0;
  padding: var(--espace-4);
  border: 2px dashed rgba(255,255,255,0.32);
  border-radius: var(--rayon-carte);
}
.case-confirmation input { width: 22px; height: 22px; margin-top: 2px; accent-color: var(--soleil); }

/* -------------------------------------------------------------------- */
/* Utilitaires                                                           */
/* -------------------------------------------------------------------- */

.pile { display: flex; flex-direction: column; gap: var(--espace-4); }
.ligne-flex { display: flex; gap: var(--espace-4); flex-wrap: wrap; align-items: center; }
.ligne-flex--entre { justify-content: space-between; }
.chargement { color: var(--encre-douce); font-size: var(--t-sm); padding: var(--espace-6) 0; text-align: center; font-weight: 600; }
.vide { text-align: center; padding: var(--espace-8) var(--espace-4); color: var(--encre-douce); }
.vide h4 { color: var(--encre-douce); }
.masque { display: none !important; }
.badge-nombre {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 22px; height: 22px; padding: 0 6px;
  background: var(--ocre-sombre); color: var(--blanc-carnet);
  border-radius: 999px; font-size: var(--t-xs); font-weight: 700;
}

@media (max-width: 640px) {
  .contenu { padding: var(--espace-6) var(--espace-4); }
  h1 { font-size: var(--t-2xl); }
  .entete { flex-wrap: wrap; }
  .grille-gestion { gap: var(--espace-4); }
}

/* ==========================================================================
   Couche communautaire et apprentissage actif
   ========================================================================== */

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: 0.5;
  background-image:
    radial-gradient(circle at 10% 18%, rgba(255, 201, 60, 0.16) 0 3px, transparent 4px),
    radial-gradient(circle at 90% 10%, rgba(22, 169, 126, 0.14) 0 3px, transparent 4px),
    radial-gradient(circle at 76% 82%, rgba(255, 111, 89, 0.12) 0 3px, transparent 4px),
    radial-gradient(circle at 22% 88%, rgba(76, 79, 224, 0.12) 0 3px, transparent 4px);
  background-size: 34px 34px, 42px 42px, 46px 46px, 30px 30px;
  z-index: -1;
}

.entete { position: sticky; top: 0; z-index: 10; box-shadow: 0 3px 0 rgba(0,0,0,0.18); }
.entete__marque::before { content: "✳"; color: var(--soleil); font-size: var(--t-sm); }

.espace-accueil {
  position: relative;
  overflow: hidden;
  padding: var(--espace-8);
  background: linear-gradient(135deg, var(--blanc-carnet) 0%, #FFF0D2 100%);
  border: 1px solid var(--ligne);
  border-radius: var(--rayon-carte);
  margin-bottom: var(--espace-6);
}
.espace-accueil::after {
  content: "✳";
  position: absolute;
  right: var(--espace-6);
  bottom: calc(-1 * var(--espace-8));
  color: rgba(242, 146, 27, 0.14);
  font-size: 11rem;
  line-height: 1;
  font-family: var(--f-display);
}
.espace-accueil > * { position: relative; z-index: 1; }
.espace-accueil__eyebrow { color: var(--ocre-sombre); font-weight: 800; font-size: var(--t-sm); letter-spacing: 0.02em; }
.espace-accueil h1 { max-width: 17ch; margin-bottom: var(--espace-3); }
.espace-accueil p { font-size: var(--t-md); }

.resume-parcours { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--espace-3); margin-top: var(--espace-6); }
.resume-parcours__item { padding: var(--espace-3); border-left: 4px solid var(--indigo); border-radius: 0 var(--rayon) var(--rayon) 0; background: var(--papier-creux); }
.resume-parcours__item:nth-child(2) { border-left-color: var(--vert-cahier); }
.resume-parcours__item:nth-child(3) { border-left-color: var(--ocre); }
.resume-parcours__value { display: block; font-family: var(--f-display); font-size: var(--t-lg); color: var(--encre); }
.resume-parcours__label { display: block; color: var(--encre-douce); font-size: var(--t-xs); }

.profil-equipe {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: var(--espace-4);
  align-items: center;
  padding: var(--espace-5) 0;
}
.profil-equipe__logo, .avatar {
  display: grid;
  place-items: center;
  overflow: hidden;
  background: var(--indigo);
  color: var(--blanc-carnet);
  font-family: var(--f-display);
  font-weight: 700;
}
.profil-equipe__logo { width: 74px; height: 74px; border-radius: 22px 22px 22px 6px; font-size: var(--t-xl); transform: rotate(-4deg); box-shadow: 0 3px 0 var(--indigo-sombre); }
.profil-equipe__logo img, .avatar img { width: 100%; height: 100%; object-fit: cover; }
.profil-equipe__nom { margin: 0 0 var(--espace-1); }
.profil-equipe__meta { color: var(--encre-douce); font-size: var(--t-sm); margin: 0; }
.profil-equipe__mission { margin-top: var(--espace-2); font-size: var(--t-sm); }
.profil-equipe__statut { align-self: start; }

.grille-chiffres { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--espace-3); margin: var(--espace-4) 0; }
.chiffre-atelier { padding: var(--espace-4); background: var(--papier-creux); border-radius: var(--rayon-carte); border-top: 4px solid var(--indigo); }
.chiffre-atelier:nth-child(2) { border-top-color: var(--vert-cahier); }
.chiffre-atelier:nth-child(3) { border-top-color: var(--ocre); }
.chiffre-atelier strong { display: block; font-family: var(--f-display); font-size: var(--t-lg); }
.chiffre-atelier span { display: block; font-size: var(--t-xs); color: var(--encre-douce); font-weight: 600; }

.galerie-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: var(--espace-4); }
.galerie-card {
  position: relative;
  min-height: 200px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  gap: var(--espace-2);
  padding: var(--espace-4);
  overflow: hidden;
  background: linear-gradient(135deg, var(--ciel), var(--blanc-carnet));
  border: 1px solid var(--ligne);
  border-radius: var(--rayon-carte) var(--rayon-carte) var(--rayon-carte) 6px;
  transition: transform 200ms cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 200ms ease;
}
.galerie-card:hover { transform: translateY(-5px) rotate(-1deg); box-shadow: 0 10px 0 rgba(76,79,224,0.14); }
.galerie-card__image { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.galerie-card__image + .galerie-card__contenu { position: relative; margin: calc(-1 * var(--espace-2)); padding: var(--espace-3); background: rgba(255,255,255,0.92); backdrop-filter: blur(5px); border-radius: var(--rayon); }
.galerie-card__contenu h4 { margin: 0; font-size: var(--t-md); }
.galerie-card__contenu p { margin: 0; font-size: var(--t-sm); }
.galerie-card__etat { position: absolute; top: var(--espace-3); right: var(--espace-3); }

.membres-mosaic { display: flex; flex-wrap: wrap; gap: var(--espace-3); }
.membre-mini { display: flex; align-items: center; gap: var(--espace-2); min-width: 145px; }
.avatar { width: 38px; height: 38px; border-radius: 50%; flex: none; font-size: var(--t-sm); }
.membre-mini__nom { font-size: var(--t-sm); font-weight: 700; display: block; }
.membre-mini__role { display: block; font-size: var(--t-xs); color: var(--encre-douce); }

.carte-edition { background: linear-gradient(135deg, rgba(76,79,224,0.08), rgba(22,169,126,0.08)); border: 2px dashed var(--ligne-forte); }
.carte-edition h3::before { content: "\2713 "; color: var(--ocre-sombre); }

.vitrine-hero { padding: var(--espace-12) 0 var(--espace-8); text-align: center; }
.vitrine-hero h1 { max-width: 20ch; margin-inline: auto; }
.vitrine-hero p { margin-inline: auto; font-size: var(--t-md); }
.vitrine-liste { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: var(--espace-5); }
.vitrine-org { background: var(--blanc-carnet); padding: var(--espace-6); border: 1px solid var(--ligne); border-radius: var(--rayon-carte) var(--rayon-carte) var(--rayon-carte) 6px; border-top: 6px solid var(--indigo); box-shadow: 0 3px 0 var(--ligne); }
.vitrine-org:nth-child(3n+2) { border-top-color: var(--vert-cahier); }
.vitrine-org:nth-child(3n) { border-top-color: var(--ocre); }
.vitrine-org h2 { font-size: var(--t-xl); }
.vitrine-team-list { list-style: none; padding: 0; margin: var(--espace-4) 0 0; }
.vitrine-team-list li + li { border-top: 1px dashed var(--ligne); }
.vitrine-team-list a { display: flex; justify-content: space-between; gap: var(--espace-3); padding: var(--espace-3) 0; font-weight: 700; }

@keyframes entree-douce {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}
.espace-accueil, .feuille { animation: entree-douce 340ms ease both; }
.feuille:nth-of-type(2) { animation-delay: 60ms; }
.feuille:nth-of-type(3) { animation-delay: 110ms; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 1ms !important; animation-iteration-count: 1 !important; transition-duration: 1ms !important; scroll-behavior: auto !important; }
}
@media (max-width: 700px) {
  .resume-parcours, .grille-chiffres { grid-template-columns: 1fr; }
  .profil-equipe { grid-template-columns: auto minmax(0, 1fr); }
  .profil-equipe__statut { grid-column: 1 / -1; }
  .espace-accueil { padding: var(--espace-6); }
}

/* ==========================================================================
   Couche interaction — toasts, modale, tampon, squelettes, lightbox.
   ========================================================================== */

/* ------------------------------------------------------------- toasts */
.zone-toasts {
  position: fixed;
  top: calc(var(--espace-6) + 4px);
  right: var(--espace-4);
  z-index: 60;
  display: flex;
  flex-direction: column;
  gap: var(--espace-2);
  max-width: min(360px, calc(100vw - 2 * var(--espace-4)));
  pointer-events: none;
}
.toast {
  pointer-events: auto;
  display: flex;
  align-items: flex-start;
  gap: var(--espace-3);
  padding: var(--espace-3) var(--espace-4);
  background: var(--encre);
  color: var(--blanc-carnet);
  border-radius: var(--rayon-carte);
  border-left: 5px solid var(--indigo);
  box-shadow: 0 6px 0 rgba(0,0,0,0.18);
  font-size: var(--t-sm);
  font-weight: 600;
  line-height: 1.4;
  cursor: pointer;
  opacity: 0;
  transform: translateX(16px);
  transition: opacity 200ms ease, transform 200ms ease;
}
.toast--visible { opacity: 1; transform: translateX(0); }
.toast__icone {
  flex: none;
  width: 24px; height: 24px;
  display: grid; place-items: center;
  border-radius: 50%;
  background: rgba(255,255,255,0.16);
  font-weight: 700; font-size: var(--t-xs);
}
.toast--succes { border-left-color: var(--vert-cahier); }
.toast--succes .toast__icone { background: var(--vert-cahier); }
.toast--erreur { border-left-color: var(--corail); }
.toast--erreur .toast__icone { background: var(--corail); }
.toast--attention { border-left-color: var(--soleil); }
.toast--attention .toast__icone { background: var(--soleil); color: var(--encre); }
.toast--info { border-left-color: var(--indigo); }

/* ------------------------------------------------------------ modale */
.modale-fond {
  position: fixed;
  inset: 0;
  z-index: 70;
  display: grid;
  place-items: center;
  padding: var(--espace-4);
  background: rgba(43, 33, 24, 0.5);
  opacity: 0;
  transition: opacity 160ms ease;
}
.modale-fond--visible { opacity: 1; }
.modale {
  width: min(440px, 100%);
  max-height: calc(100vh - 2 * var(--espace-4));
  overflow-y: auto;
  background: var(--blanc-carnet);
  border: 1px solid var(--ligne);
  border-radius: var(--rayon-carte);
  border-top: 6px solid var(--indigo);
  padding: var(--espace-6);
  box-shadow: 0 16px 0 rgba(0,0,0,0.16);
  transform: scale(0.96);
  transition: transform 160ms cubic-bezier(0.34, 1.56, 0.64, 1);
}
.modale-fond--visible .modale { transform: scale(1); }
.modale--large { width: min(680px, 100%); border-top-color: var(--ocre); }
.modale__titre { margin-bottom: var(--espace-2); }
.modale__texte { margin-bottom: var(--espace-6); }
.modale__corps { margin-bottom: var(--espace-6); }
.modale__actions { display: flex; justify-content: flex-end; gap: var(--espace-3); flex-wrap: wrap; }
.modale__fermer {
  position: absolute;
  top: var(--espace-4); right: var(--espace-4);
  background: var(--papier-creux);
  color: var(--encre);
  border: none;
  border-radius: 50%;
  width: 34px; height: 34px;
  font-size: 1.2rem;
  cursor: pointer;
  line-height: 1;
}
.modale__fermer:hover { background: var(--ligne); }
.bouton--danger.bouton--plein { background: var(--rouge-erreur); color: var(--blanc-carnet); border-color: var(--rouge-erreur); box-shadow: 0 3px 0 #8E2A1C; }
.bouton--danger.bouton--plein:hover:not(:disabled) { background: #8E2A1C; }

/* fiche détail : petites lignes clé/valeur dans une modale ou un panneau */
.fiche-detail { display: flex; flex-direction: column; gap: var(--espace-3); }
.fiche-detail__ligne { display: flex; justify-content: space-between; gap: var(--espace-4); padding: var(--espace-2) 0; border-bottom: 1px dashed var(--ligne); }
.fiche-detail__ligne:last-child { border-bottom: none; }
.fiche-detail__cle { font-size: var(--t-xs); font-weight: 700; color: var(--encre-douce); text-transform: none; }
.fiche-detail__valeur { font-weight: 700; text-align: right; }
.fiche-detail__texte { color: var(--encre-douce); font-size: var(--t-sm); white-space: pre-line; }

/* ------------------------------------------------------------- tampon */
.tampon {
  position: absolute;
  top: 50%; left: 50%;
  z-index: 5;
  pointer-events: none;
  padding: 0.4rem 1rem;
  border: 4px solid var(--vert-cahier-sombre);
  color: var(--vert-cahier-sombre);
  border-radius: var(--rayon);
  font-family: var(--f-display);
  font-weight: 700;
  font-size: var(--t-lg);
  letter-spacing: 0.06em;
  transform: translate(-50%, -50%) rotate(-8deg) scale(2.4);
  opacity: 0;
  animation: pose-tampon 700ms cubic-bezier(0.2, 1.4, 0.4, 1) forwards;
  mix-blend-mode: multiply;
  background: rgba(255, 255, 255, 0.6);
}
@keyframes pose-tampon {
  0% { opacity: 0; transform: translate(-50%, -50%) rotate(-14deg) scale(2.4); }
  55% { opacity: 1; transform: translate(-50%, -50%) rotate(-7deg) scale(0.94); }
  72% { transform: translate(-50%, -50%) rotate(-8deg) scale(1.04); }
  100% { opacity: 1; transform: translate(-50%, -50%) rotate(-8deg) scale(1); }
}
.tamponne { position: relative; }
.tampon.tampon--corail { border-color: var(--corail); color: var(--corail); }
.tampon.tampon--attente { border-color: var(--ocre); color: var(--ocre-sombre); }

/* la ligne de progression de la frise se dessine quand l'étape est validée */
.frise__etape.est-fait::before {
  background: var(--vert-cahier);
  transform-origin: right center;
  animation: trace-ligne 600ms ease-out;
}
@keyframes trace-ligne {
  from { transform: scaleX(0); }
  to { transform: scaleX(1); }
}

/* ---------------------------------------------------------- squelettes */
.squelette { padding: var(--espace-4) 0; }
.squelette__ligne {
  height: 14px;
  margin: var(--espace-3) 0;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--papier-creux) 25%, #FFF9EC 50%, var(--papier-creux) 75%);
  background-size: 200% 100%;
  animation: onde 1.1s infinite linear;
}
@keyframes onde {
  from { background-position: 200% 0; }
  to { background-position: -200% 0; }
}

/* ----------------------------------------------------------- lightbox */
.lightbox-fond {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: grid;
  place-items: center;
  padding: var(--espace-6);
  background: rgba(43, 33, 24, 0.86);
  opacity: 0;
  transition: opacity 160ms ease;
  cursor: zoom-out;
}
.lightbox-fond--visible { opacity: 1; }
.lightbox { margin: 0; max-width: min(880px, 100%); }
.lightbox img {
  max-width: 100%;
  max-height: 78vh;
  display: block;
  border-radius: var(--rayon-carte);
  border: 5px solid var(--blanc-carnet);
  background: var(--blanc-carnet);
}
.lightbox__legende { color: var(--blanc-carnet); font-size: var(--t-sm); margin-top: var(--espace-3); text-align: center; font-weight: 600; }
.lightbox__fermer {
  position: absolute;
  top: 14px; right: 14px;
  background: var(--blanc-carnet);
  color: var(--encre);
  border: none;
  border-radius: 50%;
  width: 44px; height: 44px;
  font-size: 1.5rem;
  cursor: pointer;
  line-height: 1;
}

/* ------------------------------------------------------- révélation */
[data-reveal] { opacity: 0; transform: translateY(12px); transition: opacity 380ms ease, transform 380ms ease; }
[data-reveal].revele { opacity: 1; transform: none; }

/* ------------------------------------------------------------ filtres */
.chips { display: flex; flex-wrap: wrap; gap: var(--espace-2); margin: var(--espace-4) 0 var(--espace-6); }
.chip {
  font-family: var(--f-interface);
  font-size: var(--t-sm);
  font-weight: 700;
  color: var(--indigo);
  background: var(--blanc-carnet);
  border: 2px solid var(--ligne-forte);
  border-radius: 999px;
  padding: 8px 16px;
  min-height: 38px;
  cursor: pointer;
  transition: background-color 120ms ease, color 120ms ease, transform 80ms ease;
}
.chip:hover { border-color: var(--indigo); transform: translateY(-1px); }
.chip.actif { background: var(--indigo); border-color: var(--indigo); color: var(--blanc-carnet); }

/* -------------------------------------------- panneaux d'édition inline */
.panneau-edition {
  width: 100%;
  margin-top: var(--espace-3);
  padding: var(--espace-4);
  background: var(--papier-creux);
  border: 2px dashed var(--ligne-forte);
  border-radius: var(--rayon-carte);
  animation: entree-douce 240ms ease both;
}
.panneau-edition .pile { gap: var(--espace-3); }

/* fiche membre avec avatar (gestion d'équipe, vitrines) */
.fiche-membre {
  display: flex;
  align-items: center;
  gap: var(--espace-3);
  padding: var(--espace-2) 0;
  border-bottom: 1px dashed var(--ligne);
}
.fiche-membre:last-child { border-bottom: none; }
.fiche-membre__nom { font-weight: 700; font-size: var(--t-sm); display: block; }
.fiche-membre__meta { font-size: var(--t-xs); color: var(--encre-douce); display: block; }

/* rangée multi-lignes avec panneau d'édition déroulant */
.rangee--bloc { display: block; }
.rangee--bloc .rangee__principal { display: flex; flex-direction: column; gap: 2px; margin-bottom: var(--espace-2); }
.rangee--bloc > .ligne-flex { margin-bottom: var(--espace-1); }
.rangee--bloc > .ligne-flex:last-child { margin-bottom: 0; }

/* tuiles de chiffres — variantes d'accent réutilisant la palette */
.grille-chiffres--six { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.chiffre-atelier--accent2 { border-top-color: var(--vert-cahier); }
.chiffre-atelier--accent3 { border-top-color: var(--ocre); }
@media (max-width: 700px) {
  .grille-chiffres--six { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* accordéon de module (détail du défi pédagogique) */
.defi details, .defi-details { border: 1px solid var(--ligne); border-radius: var(--rayon-carte); background: var(--blanc-carnet); overflow: hidden; }
.defi summary, .defi-details summary {
  cursor: pointer;
  padding: var(--espace-3) var(--espace-4);
  min-height: 44px;
  display: flex;
  align-items: center;
  gap: var(--espace-2);
  font-weight: 700;
  list-style: none;
  transition: background-color 120ms ease;
}
.defi summary:hover, .defi-details summary:hover { background: var(--papier-creux); }
.defi summary::-webkit-details-marker { display: none; }
.defi summary::after, .defi-details summary::after {
  content: "+";
  margin-left: auto;
  flex: none;
  width: 26px; height: 26px;
  display: grid; place-items: center;
  border-radius: 50%;
  background: var(--papier-creux);
  color: var(--indigo);
  font-weight: 700;
  font-size: var(--t-md);
}
.defi details[open] summary::after, .defi-details[open] summary::after { content: "\2212"; background: var(--indigo); color: var(--blanc-carnet); }
.defi__contenu {
  padding: 0 var(--espace-4) var(--espace-4);
  color: var(--encre-douce);
  font-size: var(--t-sm);
  white-space: pre-line;
}

/* barre de progression du parcours (x/4 jalons) */
.progression {
  height: 12px;
  background: var(--papier-creux);
  border-radius: 999px;
  overflow: hidden;
  margin-top: var(--espace-2);
  border: 1px solid var(--ligne);
}
.progression__remplissage {
  height: 100%;
  background: linear-gradient(90deg, var(--vert-cahier), var(--soleil));
  border-radius: 999px;
  transition: width 700ms cubic-bezier(0.3, 1, 0.4, 1);
}

/* vignette cliquable de galerie */
.galerie-card--cliquable { cursor: zoom-in; }
.galerie-card__image-vide {
  display: grid;
  place-items: center;
  position: absolute;
  inset: 0;
  font-family: var(--f-display);
  font-size: 3rem;
  color: rgba(76, 79, 224, 0.18);
}

@media (max-width: 640px) {
  .zone-toasts { top: var(--espace-2); right: var(--espace-2); left: var(--espace-2); }
  .toast { max-width: none; }
}

/* ==========================================================================
   Couche « gabarit 3 » — transposition de la template ZeroFour (HTML5 UP)
   Le projet garde ses classes, son kit ui.js et sa palette : seules les
   valeurs et quelques ajouts purs transposent le langage du gabarit :
   table anthracite grainée, capsules sombres à inner-shadow, accent bleu
   acier, titres 800 en capitales, double filet de registre, grandes
   feuilles posées en ombre douce. Ce bloc étant isolé en fin de fichier,
   le supprimer restaure l'habillage précédent.
   ========================================================================== */

:root {
  /* Mêmes noms, valeurs réaccordées sur le gabarit */
  --papier: #303238;        /* la table : fond de page anthracite grainé */
  --encre: #3B3E45;         /* titres sur clair + panneaux sombres */
  --encre-douce: #61686F;   /* texte secondaire sur clair (AA) */
  --indigo: #4091BF;        /* l'accent acier du gabarit (fonds, boutons) */
  --indigo-sombre: #3081AF;
  --indigo-clair: #50A1CF;
  --indigo-encre: #28648B;  /* accent en TEXTE sur fond clair (AA) */
  --ligne: #E2E4E9;
  --ligne-forte: #A9AEB9;
  --rayon: 8px;
  --rayon-carte: 10px;
  --f-display: "Open Sans", "Segoe UI", sans-serif;
  --f-interface: "Open Sans", "Segoe UI", sans-serif;

  /* Ajouts de la couche */
  --bruit: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.75' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix type='matrix' values='0 0 0 0 0.55 0 0 0 0 0.56 0 0 0 0 0.58 0 0 0 0.5 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  --bruit-clair: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.75' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix type='matrix' values='0 0 0 0 0.45 0 0 0 0 0.47 0 0 0 0 0.5 0 0 0 0.10 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  --texte-clair: #C6CBD4;
  --texte-clair-70: rgba(255, 255, 255, 0.74);
  --filet-clair: rgba(255, 255, 255, 0.28);
  --ombre-posee: 0 14px 30px rgba(0, 0, 0, 0.38), 0 2px 6px rgba(0, 0, 0, 0.25);
  --interieur-panneau: inset 0 0 0 1px rgba(0, 0, 0, 0.45), inset 0 2px 1px 0 rgba(255, 255, 255, 0.13);
}

html { scroll-behavior: smooth; }

/* Le grain du gabarit remplace les confettis : même pseudo-élément, valeurs seules */
body::before {
  opacity: 0.16;
  background-image: var(--bruit);
  background-size: 180px 180px;
}

h1, h2, h3, h4 { font-weight: 800; letter-spacing: 0.01em; }

a { color: var(--indigo-encre); }

/* ---------------------------------------------------------------- entête */
/* La capsule flottante du gabarit : panneau sombre à inner-shadow        */
.entete {
  position: sticky;
  top: var(--espace-2);
  z-index: 10;
  width: min(1120px, calc(100% - 2 * var(--espace-4)));
  margin: var(--espace-2) auto 0;
  padding: 0.55em 0.8em;
  border-radius: 10px;
  color: #fff;
  background-color: rgba(59, 62, 69, 0.96);
  background-image: linear-gradient(180deg, rgba(0, 0, 0, 0.22), rgba(0, 0, 0, 0) 60%);
  box-shadow: var(--interieur-panneau), 0 2px 14px rgba(0, 0, 0, 0.4);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
}
.entete__marque {
  white-space: nowrap;
  flex: none;
  text-transform: uppercase;
  font-weight: 800;
  letter-spacing: 0.045em;
  font-size: 1.02rem;
}
.entete__nav a,
.entete__nav button.lien {
  color: #fff;
  opacity: 0.88;
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 0.45em 0.75em;
  border-radius: 6px;
  transition: background-color 150ms ease-in-out, opacity 150ms ease-in-out;
}
.entete__nav a:hover,
.entete__nav button.lien:hover {
  opacity: 1;
  background: rgba(0, 0, 0, 0.2);
  text-decoration: none;
}
.entete__role {
  background: var(--indigo);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-size: 0.68rem;
  padding: 3px 9px;
}
@media (max-width: 640px) {
  .entete { gap: var(--espace-2); }
  .entete__marque { font-size: 0.9rem; }
  .entete__utilisateur { gap: 6px; }
  .entete__utilisateur > span:not(.entete__role) { font-size: 0.75rem; }
  .entete__role { font-size: 0.56rem; padding: 2px 6px; white-space: nowrap; }
  .entete__nav button.lien { font-size: 0.68rem; padding: 4px 6px; white-space: nowrap; }
}

/* ----------------------------------------------------------------- pied */
.pied {
  border-top: 1px solid rgba(255, 255, 255, 0.075);
  padding: var(--espace-12) var(--espace-6) var(--espace-16);
  color: #9AA1AD;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0), rgba(0, 0, 0, 0.35));
}
.pied a { color: var(--texte-clair); }
.pied a:hover { color: #fff; }

/* -------------------------------------------------------------- boutons */
.bouton {
  border-radius: 8px;
  padding: 0.8rem 1.5rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.075em;
  text-shadow: -1px -1px 0 rgba(0, 0, 0, 0.35);
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.22), inset 0 2px 1px 0 rgba(255, 255, 255, 0.3), 0 2px 8px rgba(0, 0, 0, 0.22);
  transition: background-color 200ms ease-in-out, box-shadow 200ms ease-in-out, transform 100ms ease;
}
.bouton:not(:disabled):hover { transform: none; text-decoration: none; }
.bouton:active { transform: translateY(1px); box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.28), inset 0 2px 1px 0 rgba(0, 0, 0, 0.12); }
.bouton--primaire {
  background: var(--indigo);
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.28), inset 0 2px 1px 0 rgba(255, 255, 255, 0.35), 0 2px 8px rgba(0, 0, 0, 0.25);
}
.bouton--primaire:hover:not(:disabled) { background: var(--indigo-clair); }
.bouton--primaire:active:not(:disabled) { background: var(--indigo-sombre); }
.bouton--valide { background: #0E7F5C; box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.28), inset 0 2px 1px 0 rgba(255, 255, 255, 0.3), 0 2px 8px rgba(0, 0, 0, 0.25); }
.bouton--valide:hover:not(:disabled) { background: #12916B; }
.bouton--attention { background: #A8460A; box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.28), inset 0 2px 1px 0 rgba(255, 255, 255, 0.28), 0 2px 8px rgba(0, 0, 0, 0.25); }
.bouton--attention:hover:not(:disabled) { background: #B85412; }
.bouton--discret {
  background: #464A52;
  color: #fff;
  border-color: transparent;
  text-shadow: -1px -1px 0 rgba(0, 0, 0, 0.35);
}
.bouton--discret:hover:not(:disabled) { background: #565A62; border-color: transparent; }
.bouton--danger {
  color: var(--rouge-erreur);
  border-color: var(--rouge-erreur);
  text-shadow: none;
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.04);
}
.bouton--danger:hover:not(:disabled) { background: rgba(199, 58, 38, 0.08); }
.bouton--petit { padding: 0.5rem 1rem; }
.bouton--danger.bouton--plein { background: var(--rouge-erreur); color: #fff; text-shadow: -1px -1px 0 rgba(0, 0, 0, 0.35); box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.28), inset 0 2px 1px 0 rgba(255, 255, 255, 0.25), 0 2px 8px rgba(0, 0, 0, 0.25); }
.bouton--danger.bouton--plein:hover:not(:disabled) { background: #D24935; }

/* ---------------------------------------------------------- formulaires */
.champ label {
  text-transform: uppercase;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.05em;
  color: var(--encre);
}
.champ input,
.champ select,
.champ textarea {
  border: 1px solid #D8DBE1;
  border-radius: 8px;
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.05);
}
.champ input:focus,
.champ select:focus,
.champ textarea:focus {
  border-color: var(--indigo);
  box-shadow: 0 0 0 3px rgba(64, 145, 191, 0.22);
  outline: none;
}

/* ---------------------------------------------------- feuilles posées */
.feuille {
  border: 1px solid var(--ligne);
  border-radius: var(--rayon-carte);
  background-image: var(--bruit-clair);
  background-size: 180px auto;
  box-shadow: var(--ombre-posee);
}
.feuille__entete {
  position: relative;
  border-bottom: 1px solid var(--ligne);
  padding-bottom: 0.7rem;
  margin-bottom: var(--espace-6);
}
/* le double filet de registre du gabarit (header.major) */
.feuille__entete::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -9px;
  border-top: 1px solid var(--ligne);
}
.feuille__entete h3 {
  text-transform: uppercase;
  font-weight: 800;
  letter-spacing: 0.04em;
  font-size: 1.05rem;
}

/* -------------------------------------------------- tableau de caisse */
.cahier th {
  background: var(--encre);
  color: #fff;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-size: 0.68rem;
  font-weight: 800;
  padding: 0.65em 0.75em;
  border-bottom: none;
}
.cahier th:first-child { border-radius: 6px 0 0 0; }
.cahier th:last-child { border-radius: 0 6px 0 0; }
.cahier td { border-bottom: 1px solid #E9EAEE; }
.cahier tr:hover td { background: #F3F4F6; }

.etiquette {
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-size: 0.68rem;
}
.rangee:hover { background: #F3F4F6; }
.carte-cliquable:hover, .carte-cliquable:focus-visible { background: #F3F4F6; }
.carte-cliquable__indice { color: var(--indigo-encre); }

/* ------------------------------------------------------- navigation 2e niveau */
.liste-nav button {
  text-transform: uppercase;
  font-weight: 800;
  font-size: 0.78rem;
  letter-spacing: 0.05em;
}
.liste-nav button:hover { background: #F3F4F6; }
.onglets button {
  text-transform: uppercase;
  font-weight: 800;
  letter-spacing: 0.07em;
  font-size: 0.8rem;
}
.onglets button.actif { color: var(--indigo-encre); background: #F3F4F6; }
.onglets button:hover:not(.actif) { background: #F3F4F6; }
/* onglets posés directement sur la table sombre : palette claire du gabarit */
#app-racine > .onglets, #onglets-formateur { border-bottom-color: rgba(255, 255, 255, 0.14); }
#app-racine > .onglets button, #onglets-formateur button { color: #A0A6B0; }
#app-racine > .onglets button.actif, #onglets-formateur button.actif { color: #fff; background: rgba(255, 255, 255, 0.08); }
#app-racine > .onglets button:hover:not(.actif), #onglets-formateur button:hover:not(.actif) { color: #fff; background: rgba(255, 255, 255, 0.05); }
.chip {
  border-radius: 6px;
  text-transform: uppercase;
  font-weight: 800;
  font-size: 0.75rem;
  letter-spacing: 0.05em;
  color: var(--indigo-encre);
  border-width: 1px;
}
.chip.actif { color: #fff; }

/* ------------------------------------------------------- kit interaction */
.toast {
  background-color: rgba(59, 62, 69, 0.97);
  background-image: linear-gradient(180deg, rgba(0, 0, 0, 0.18), rgba(0, 0, 0, 0));
  border-radius: 8px;
  border-left-width: 4px;
  box-shadow: var(--interieur-panneau), 0 2px 14px rgba(0, 0, 0, 0.45);
}
.modale-fond { background: rgba(14, 15, 17, 0.6); }
.modale {
  position: relative; /* le bouton fermer s'ancre à la modale, pas au fond */
  border: 1px solid var(--ligne);
  border-top: 4px solid var(--indigo);
  border-radius: var(--rayon-carte);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.5);
}
.modale__titre {
  text-transform: uppercase;
  letter-spacing: 0.04em;
  font-size: 1.05rem;
  font-weight: 800;
}
.modale__fermer { background: #F3F4F6; }
.modale__fermer:hover { background: var(--ligne); }
.fiche-detail__ligne { border-bottom: 1px solid var(--ligne); }
.fiche-detail__cle {
  text-transform: uppercase;
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.05em;
}
.fiche-detail__texte { color: var(--encre-douce); }
.squelette__ligne { background: linear-gradient(90deg, #E9EAEE 25%, #F7F8F9 50%, #E9EAEE 75%); }
.lightbox-fond { background: rgba(10, 11, 13, 0.88); }
.lightbox img { border-radius: 8px; }

/* --------------------------------------------------------- cérémonie */
.ceremonie {
  background-color: var(--encre);
  background-image: linear-gradient(180deg, rgba(0, 0, 0, 0.2), rgba(0, 0, 0, 0) 55%), var(--bruit);
  background-size: auto, 180px auto;
  border-radius: var(--rayon-carte);
  box-shadow: var(--interieur-panneau), var(--ombre-posee);
}

/* -------------------------------------- carte d'édition sur table sombre */
.carte-edition {
  background-color: var(--encre);
  background-image: linear-gradient(135deg, rgba(64, 145, 191, 0.07), rgba(14, 127, 92, 0.07)), var(--bruit);
  background-size: auto, 180px auto;
  box-shadow: var(--interieur-panneau);
}
.carte-edition h3 { color: #fff; }
.carte-edition h3::before { color: var(--soleil); }
.carte-edition label { color: var(--texte-clair); }

/* ------------------------------------------------- bannière sombre (espace-accueil) */
.espace-accueil {
  background-color: var(--encre);
  background-image: linear-gradient(155deg, rgba(0, 0, 0, 0.28), rgba(0, 0, 0, 0) 55%), var(--bruit);
  background-size: auto, 180px auto;
  border: none;
  border-radius: var(--rayon-carte);
  color: #fff;
  box-shadow: var(--interieur-panneau), var(--ombre-posee);
}
.espace-accueil h1, .espace-accueil h2, .espace-accueil h3, .espace-accueil h4 { color: #fff; }
.espace-accueil h1 {
  border-top: 1px solid var(--filet-clair);
  border-bottom: 1px solid var(--filet-clair);
  padding: 1.1rem 0;
}
.espace-accueil p { color: var(--texte-clair-70); }
.espace-accueil::after { color: rgba(255, 255, 255, 0.05); }
.espace-accueil__eyebrow {
  color: var(--soleil);
  text-transform: uppercase;
  letter-spacing: 0.09em;
  font-weight: 800;
  font-size: 0.75rem;
}
.espace-accueil .tampon {
  mix-blend-mode: normal;
  background: rgba(255, 255, 255, 0.88);
}
.espace-accueil .chiffre-atelier strong { color: var(--indigo-encre); }
.espace-accueil .etiquette {
  color: var(--texte-clair);
  background: rgba(255, 255, 255, 0.14);
}

/* ------------------------------------------------------------ vitrine */
.vitrine-hero {
  color: #fff;
  padding: var(--espace-16) 0 var(--espace-8);
}
.vitrine-hero h1 {
  color: #fff;
  font-weight: 800;
  border-top: 1px solid var(--filet-clair);
  border-bottom: 1px solid var(--filet-clair);
  padding: 1.25rem 0;
}
.vitrine-hero p { color: var(--texte-clair-70); }
.vitrine-org {
  border: 1px solid var(--ligne);
  border-top: 4px solid var(--indigo);
  border-radius: var(--rayon-carte);
  background-image: var(--bruit-clair);
  background-size: 180px auto;
  box-shadow: var(--ombre-posee);
}
.galerie-card { border-radius: var(--rayon-carte); }
.galerie-card:hover { box-shadow: var(--ombre-posee); }

/* textes posés directement sur la table sombre */
.chargement, .vide { color: #A0A6B0; }
.feuille .chargement,
.feuille .vide,
.vide.feuille { color: var(--encre-douce); }
/* bandeaux posés sur la table sombre : variantes claires du gabarit */
.espace-accueil .bandeau,
#app-racine > .bandeau {
  color: var(--texte-clair);
  background: rgba(255, 255, 255, 0.07);
  border-left-color: var(--ligne-forte);
}
.espace-accueil .bandeau--attention,
#app-racine > .bandeau--attention {
  color: var(--soleil);
  background: rgba(242, 146, 27, 0.16);
  border-left-color: var(--ocre);
}
.espace-accueil .bandeau--erreur,
#app-racine > .bandeau--erreur {
  color: #FFA98F;
  background: rgba(199, 58, 38, 0.22);
  border-left-color: var(--corail);
}

/* --------------------------------------------------------- accordéons */
.defi summary, .defi-details summary {
  text-transform: uppercase;
  font-weight: 800;
  font-size: 0.85rem;
  letter-spacing: 0.04em;
}
.defi summary:hover, .defi-details summary:hover { background: #F3F4F6; }
.defi summary::after, .defi-details summary::after { color: var(--indigo-encre); }

/* ------------------------------------------------ page d'accueil (panneau blanc du gabarit) */
.page-accueil {
  background-color: var(--blanc-carnet);
  background-image: var(--bruit-clair);
  background-size: 180px auto;
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: var(--rayon-carte);
  padding: var(--espace-6);
  box-shadow: 0 18px 44px rgba(0, 0, 0, 0.42), 0 3px 8px rgba(0, 0, 0, 0.28);
  overflow: hidden;
}
.page-accueil h2 {
  text-transform: uppercase;
  letter-spacing: 0.04em;
  font-weight: 800;
  font-size: var(--t-xl);
}
.page-accueil .qa summary:hover,
.page-accueil .qa details[open] summary { color: var(--indigo-encre); }
.page-accueil .projet-chiffres__valeur { color: var(--indigo-encre); }

/* -------------------------------------------------------------- connexion */
.carnet-connexion__panneau {
  border-radius: var(--rayon-carte);
  background-image: var(--bruit-clair);
  background-size: 180px auto;
  box-shadow: 0 18px 44px rgba(0, 0, 0, 0.42), 0 3px 8px rgba(0, 0, 0, 0.28);
}
.onglets-connexion button {
  text-transform: uppercase;
  font-weight: 800;
  letter-spacing: 0.06em;
  font-size: 0.8rem;
}
.onglets-connexion button.actif { color: var(--indigo-encre); }
.compte-chip {
  color: var(--indigo-encre);
  border-radius: 6px;
  text-transform: uppercase;
  font-weight: 800;
  font-size: 0.68rem;
  letter-spacing: 0.05em;
}
.compte-chip:hover { border-color: var(--indigo); }

/* ==========================================================================
   COUCHE FRONT OFFICE — accueil public, vitrine, connexion
   Demande explicite : front office premium et AUCUN maillage/grain.
   Les 3 pages publiques portent body.front-office (block body_class) :
   toile ivoire nette + voiles radiaux doux, titres Fraunces, cartes
   blanches à filets fins. Le back office garde la table grainée.
   ========================================================================== */
:root {
  --fo-fond: #FAF7F0;
  --fo-encre: #262B33;
  --fo-encre-doux: #5C6672;
  --fo-filet: rgba(38, 43, 51, 0.14);
  --fo-ombre: 0 10px 30px rgba(38, 43, 51, 0.10), 0 2px 6px rgba(38, 43, 51, 0.06);
  --fo-ombre-forte: 0 24px 50px rgba(38, 43, 51, 0.16), 0 4px 10px rgba(38, 43, 51, 0.08);
  --f-serif: "Fraunces", Georgia, serif;
}

/* ---------- la toile : plus aucun grain ni maillage ---------- */
body.front-office {
  color: var(--fo-encre);
  background-color: var(--fo-fond);
  background-image:
    radial-gradient(900px 460px at 6% -6%, rgba(64, 145, 191, 0.12), rgba(64, 145, 191, 0) 62%),
    radial-gradient(780px 460px at 98% 0%, rgba(242, 146, 27, 0.09), rgba(242, 146, 27, 0) 62%);
}
body.front-office::before { content: none; }

/* surfaces posées sur la toile : blanc net, ombre douce, sans grain */
body.front-office .feuille,
body.front-office .vitrine-org,
body.front-office .carnet-connexion__panneau,
body.front-office .page-accueil {
  background-image: none;
  border: 1px solid var(--fo-filet);
  box-shadow: var(--fo-ombre);
}

/* entête + pied : capsules nettes */
body.front-office .entete {
  background-color: rgba(38, 43, 51, 0.97);
  background-image: none;
  box-shadow: 0 12px 28px rgba(38, 43, 51, 0.16);
}
body.front-office .pied {
  background-color: #262B33;
  background-image: none;
  padding: var(--espace-12) var(--espace-6) var(--espace-16);
}
body.front-office .pied a { color: var(--texte-clair); }
body.front-office .pied a:hover { color: #fff; }

/* le soleil du gabarit devient accent encre sur fond clair */
body.front-office .espace-accueil__eyebrow { color: var(--indigo-encre); }

/* bouton discret : fantôme clair sur la toile (les panneaux sombres le re-surstylent) */
body.front-office .bouton--discret {
  background: #fff;
  border: 1px solid var(--fo-filet);
  color: var(--fo-encre);
  box-shadow: 0 1px 2px rgba(38, 43, 51, 0.08);
}

/* nav de la capsule un peu plus dense sur les pages publiques */
body.front-office .entete__nav { gap: var(--espace-3); }
body.front-office .entete__nav a,
body.front-office .entete__nav button.lien { font-size: 0.72rem; letter-spacing: 0.05em; }

/* ---------- vocabulaire éditorial partagé ---------- */
.kicker {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 var(--espace-3);
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-weight: 800;
  font-size: 0.72rem;
  color: var(--indigo-encre);
}
.kicker::before { content: ""; width: 26px; height: 2px; border-radius: 2px; background: var(--indigo); }

.fo-titre {
  font-family: var(--f-serif);
  font-weight: 600;
  letter-spacing: -0.015em;
  line-height: 1.1;
  margin: 0;
}
.fo-titre em { font-style: italic; color: var(--indigo-encre); }

.fo-lead { color: var(--fo-encre-doux); font-size: var(--t-md); line-height: 1.7; }

.fo-section { padding: var(--espace-12) 0; border-top: 1px solid var(--fo-filet); }
.fo-section--entete { max-width: 720px; margin-bottom: var(--espace-8); }
.fo-section--entete h2 {
  font-family: var(--f-serif);
  font-weight: 600;
  font-size: clamp(1.7rem, 3vw, 2.3rem);
  line-height: 1.12;
  margin: 0 0 var(--espace-3);
  letter-spacing: -0.015em;
}

.fo-carte {
  background: #fff;
  border: 1px solid var(--fo-filet);
  border-radius: 12px;
  box-shadow: var(--fo-ombre);
  padding: var(--espace-6);
}

/* ---------- panneau CTA sombre (net, sans grain) ---------- */
.fo-cta {
  background: linear-gradient(155deg, #2E3944 0%, #262B33 55%, #22303C 100%);
  border-radius: 16px;
  padding: var(--espace-12) var(--espace-8);
  text-align: center;
  box-shadow: var(--fo-ombre-forte);
}
.fo-cta h2 {
  font-family: var(--f-serif);
  font-weight: 600;
  color: #fff;
  font-size: clamp(1.8rem, 3.4vw, 2.6rem);
  line-height: 1.15;
  letter-spacing: -0.015em;
  margin: 0 auto var(--espace-3);
  max-width: 22ch;
}
.fo-cta p { color: var(--texte-clair-70); margin: 0 auto var(--espace-6); max-width: 52ch; }
.fo-cta .bouton.bouton--discret { background: transparent; border: 1px solid rgba(255, 255, 255, 0.35); color: #fff; box-shadow: none; }
.fo-cta .ligne-flex { justify-content: center; flex-wrap: wrap; }

/* ---------- vitrine ---------- */
body.front-office .vitrine-hero { padding: var(--espace-12) 0 var(--espace-10); color: var(--fo-encre); }
body.front-office .vitrine-hero h1 {
  font-family: var(--f-serif);
  font-weight: 600;
  letter-spacing: -0.015em;
  text-transform: none;
  color: var(--fo-encre);
  font-size: clamp(2rem, 4vw, 3rem);
  line-height: 1.1;
  border-top: 1px solid var(--fo-filet);
  border-bottom: 1px solid var(--fo-filet);
  padding: 1.1rem 0;
  margin: 0 0 var(--espace-4);
  max-width: 24ch;
}
body.front-office .vitrine-hero p { color: var(--fo-encre-doux); max-width: 62ch; }
body.front-office .vitrine-org {
  border-top: 5px solid var(--indigo);
  border-radius: 12px;
  transition: transform 200ms ease, box-shadow 200ms ease;
}
body.front-office .vitrine-org:hover { transform: translateY(-4px); box-shadow: var(--fo-ombre-forte); }
body.front-office .vitrine-org h2 {
  font-family: var(--f-serif);
  font-weight: 600;
  letter-spacing: -0.01em;
  font-size: var(--t-lg);
}
body.front-office .vitrine-liste .champ__aide { color: var(--fo-encre-doux); }

body.front-office .galerie-card { background: #fff; border: 1px solid var(--fo-filet); }
body.front-office .galerie-card:hover { box-shadow: var(--fo-ombre-forte); }

/* ---------- connexion : carte duo vitrine + formulaire ---------- */
.connexion-duo {
  display: grid;
  grid-template-columns: 0.95fr 1.05fr;
  max-width: 880px;
  margin: var(--espace-10) auto var(--espace-12);
  border: 1px solid var(--fo-filet);
  border-radius: 16px;
  overflow: hidden;
  background: #fff;
  box-shadow: var(--fo-ombre-forte);
}
.connexion-duo__vitrine {
  background: linear-gradient(165deg, #2E3944, #262B33 70%);
  color: #fff;
  padding: var(--espace-8);
  display: flex;
  flex-direction: column;
  gap: var(--espace-4);
  position: relative;
  overflow: hidden;
}
.connexion-duo__vitrine::after {
  content: "";
  position: absolute;
  width: 340px;
  height: 340px;
  border-radius: 50%;
  right: -120px;
  bottom: -140px;
  background: radial-gradient(circle, rgba(64, 145, 191, 0.28), rgba(64, 145, 191, 0) 70%);
}
.connexion-duo__vitrine > * { position: relative; }
.connexion-duo__marque {
  margin: 0;
  text-transform: uppercase;
  font-weight: 800;
  letter-spacing: 0.1em;
  font-size: 0.78rem;
  color: var(--indigo-clair);
}
.connexion-duo__vitrine h2 {
  font-family: var(--f-serif);
  font-weight: 600;
  font-size: 1.9rem;
  line-height: 1.15;
  letter-spacing: -0.015em;
  margin: 0;
  color: #fff;
}
.connexion-duo__vitrine p { color: var(--texte-clair-70); font-size: var(--t-sm); line-height: 1.65; margin: 0; }
.connexion-duo__points { list-style: none; margin: var(--espace-2) 0 0; padding: 0; display: flex; flex-direction: column; gap: var(--espace-3); }
.connexion-duo__points li {
  display: flex;
  gap: var(--espace-3);
  align-items: baseline;
  font-size: var(--t-sm);
  line-height: 1.55;
  color: var(--texte-clair);
}
.connexion-duo__points li::before { content: "—"; color: var(--indigo-clair); font-weight: 800; flex: none; }
.connexion-duo__vitrine .connexion-duo__note {
  margin-top: auto;
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-weight: 800;
  color: rgba(255, 255, 255, 0.5);
}
.connexion-duo__corps { padding: var(--espace-8); }
@media (max-width: 780px) {
  .connexion-duo { grid-template-columns: 1fr; margin-top: var(--espace-6); }
  .connexion-duo__vitrine { padding: var(--espace-6); gap: var(--espace-3); }
  .connexion-duo__vitrine h2 { font-size: 1.4rem; }
  .connexion-duo__points,
  .connexion-duo__vitrine p:not(.connexion-duo__marque):not(.connexion-duo__note) { display: none; }
}

/* ajustements de teinte pour les composants réutilisés sur la toile claire */
body.front-office .onglets-connexion button { color: var(--fo-encre-doux); }
body.front-office .onglets-connexion button.actif { color: var(--indigo-encre); }
body.front-office .comptes-demo__titre { color: var(--fo-encre-doux); }
body.front-office .chargement,
body.front-office .vide { color: var(--fo-encre-doux); }
body.front-office .rangee__meta { color: var(--fo-encre-doux); }
body.front-office #projet, body.front-office #parcours, body.front-office #parents,
body.front-office #ecoles, body.front-office #faq, body.front-office #exploits {
  scroll-margin-top: 92px;
}

/* ============================================================
   ITÉRATION 6 — PHOTOS DU FRONT PUBLIC (couche additive)
   Vocabulaire générique : .fo-figure / .fo-photo / grilles.
   Le back office n'utilise jamais ces classes.
   ============================================================ */

.fo-figure { margin: 0; }

.fo-figure .fo-photo {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 12px;
  box-shadow: var(--fo-ombre);
}

.fo-figure figcaption {
  font-size: var(--t-xs);
  color: var(--fo-encre-doux);
  line-height: 1.5;
  margin-top: var(--espace-2);
}

/* photo « polaroid » : cadre blanc fin posé sur la toile */
.fo-figure--filet {
  background: #fff;
  border: 1px solid var(--fo-filet);
  border-radius: 14px;
  box-shadow: var(--fo-ombre);
  padding: 10px;
}
.fo-figure--filet .fo-photo { border-radius: 8px; box-shadow: none; }

/* photo « relevé » : dalle indigo inclinée derrière, photo à liseré blanc */
.fo-figure--releve { position: relative; }
.fo-figure--releve::before {
  content: "";
  position: absolute;
  top: 7%;
  right: 1%;
  bottom: 9%;
  left: 8%;
  background: linear-gradient(160deg, var(--indigo) 0%, var(--indigo-encre) 100%);
  border-radius: 16px;
  transform: rotate(2deg);
  box-shadow: var(--fo-ombre-forte);
}
.fo-figure--releve .fo-photo {
  position: relative;
  transform: rotate(-1deg);
  border: 5px solid #fff;
  box-shadow: var(--fo-ombre-forte);
}
.fo-figure--releve figcaption {
  position: relative;
  margin-top: var(--espace-3);
}

/* photo pleine hauteur de panneau (hero de page) */
.fo-photo--pleine {
  height: 100%;
  min-height: 320px;
  object-fit: cover;
}

/* grilles de photos */
.fo-photo-grille {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--espace-4);
}
.fo-photo-grille .fo-figure .fo-photo { height: 220px; object-fit: cover; }
.fo-photo-grille--deux { grid-template-columns: 1fr 1fr; }
@media (max-width: 780px) {
  .fo-photo-grille { grid-template-columns: 1fr 1fr; }
  .fo-photo-grille .fo-figure:first-child { grid-column: 1 / -1; }
  .fo-photo-grille .fo-figure:first-child .fo-photo { height: 240px; }
}
@media (max-width: 520px) {
  .fo-photo-grille { grid-template-columns: 1fr; }
  .fo-photo-grille .fo-figure .fo-photo { height: 220px; }
}

/* duo texte + photo (teaser, section) */
.fo-teaser {
  display: grid;
  grid-template-columns: 0.92fr 1.08fr;
  gap: var(--espace-10);
  align-items: center;
}
.fo-teaser--inverse .fo-figure { order: 2; }
@media (max-width: 900px) {
  .fo-teaser { grid-template-columns: 1fr; gap: var(--espace-6); }
  .fo-teaser--inverse .fo-figure { order: 0; }
}

/* page interne : hero éditorial avec photo */
.fo-page-hero {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: var(--espace-10);
  align-items: center;
  padding: var(--espace-8) 0 var(--espace-12);
}
.fo-page-hero .fo-page-hero__intro {
  margin: var(--espace-5) 0 var(--espace-6);
  font-size: var(--t-md);
  line-height: 1.7;
  color: var(--fo-encre-doux);
  max-width: 56ch;
}
@media (max-width: 900px) {
  .fo-page-hero { grid-template-columns: 1fr; gap: var(--espace-8); padding-top: var(--espace-6); }
}

/* jalon illustré (parcours détaillé) */
.fo-jalon-photo {
  display: grid;
  grid-template-columns: 300px 1fr;
  gap: var(--espace-8);
  align-items: center;
  background: #fff;
  border: 1px solid var(--fo-filet);
  border-radius: 14px;
  box-shadow: var(--fo-ombre);
  padding: var(--espace-6);
}
.fo-jalon-photo:nth-child(even) .fo-figure { order: 2; }
.fo-jalon-photo .fo-figure .fo-photo { height: 200px; object-fit: cover; }
.fo-jalon-photo h3 { font-family: var(--f-serif); font-weight: 600; font-size: var(--t-lg); margin: 0 0 var(--espace-2); }
.fo-jalon-photo h3 span { color: var(--indigo-encre); }
.fo-jalon-photo p { margin: 0; color: var(--fo-encre-doux); line-height: 1.65; font-size: var(--t-sm); }
@media (max-width: 780px) {
  .fo-jalon-photo { grid-template-columns: 1fr; }
  .fo-jalon-photo:nth-child(even) .fo-figure { order: 0; }
}

/* photo du panneau ardoise (connexion) */
.connexion-duo__photo {
  width: 100%;
  height: 160px;
  object-fit: cover;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.35);
}

/* hero vitrine avec photo */
.vitrine-hero__media {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: var(--espace-10);
  align-items: center;
}
.vitrine-hero__media .fo-photo { max-height: 400px; object-fit: cover; }
@media (max-width: 900px) {
  .vitrine-hero__media { grid-template-columns: 1fr; gap: var(--espace-6); }
  .vitrine-hero__media .fo-photo { max-height: 280px; }
}

/* ==========================================================================
   VITRINE — la parade des mini-sites
   Chaque organisation = une fenêtre de « site d'entreprise » : barre de
   navigateur factice, devanture photo, logo pastillé, fiche style vitrine
   de commerce. Couche additive (page /vitrine uniquement).
   ========================================================================== */
.vitrine-filtre { margin-bottom: var(--espace-6); }
.vitrine-liste--parade { align-items: start; }

.vitrine-detail {
  margin-top: var(--espace-8);
  animation: entree-douce 340ms ease both;
}

.vitrine-mini {
  --accent: var(--indigo);
  --accent-fonce: #3081AF;
  display: flex;
  flex-direction: column;
  background: #fff;
  border: 1px solid var(--fo-filet);
  border-radius: 14px;
  overflow: hidden;
  box-shadow: var(--fo-ombre);
  transition: transform 240ms ease, box-shadow 240ms ease;
}
.vitrine-mini:hover {
  transform: translateY(-6px);
  box-shadow: var(--fo-ombre-forte);
}
.vitrine-mini--vert { --accent: var(--vert-cahier); --accent-fonce: var(--vert-cahier-sombre); }
.vitrine-mini--ocre { --accent: var(--ocre); --accent-fonce: var(--ocre-sombre); }
.vitrine-mini--indigo { --accent: var(--indigo); --accent-fonce: var(--indigo-sombre); }

/* barre de navigateur factice */
.vitrine-mini__chrome {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 9px 14px;
  background: #262B33;
}
.vitrine-mini__pointe {
  width: 9px; height: 9px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.22);
}
.vitrine-mini__pointe:first-child { background: var(--corail); }
.vitrine-mini__pointe:nth-child(2) { background: var(--soleil); }
.vitrine-mini__pointe:nth-child(3) { background: var(--vert-cahier); }
.vitrine-mini__adresse {
  margin-left: 8px;
  flex: 1;
  min-width: 0;
  font-size: 11px;
  letter-spacing: 0.04em;
  color: rgba(255, 255, 255, 0.75);
  background: rgba(255, 255, 255, 0.10);
  border-radius: 999px;
  padding: 3px 10px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* la devanture : photo d'ambiance + logo posé sur le rebord */
.vitrine-mini__devanture {
  position: relative;
  padding: 10px 10px 0;
  background: #fff;
}
.vitrine-mini__devanture img {
  display: block;
  width: 100%;
  height: 180px;
  object-fit: cover;
  border-radius: 8px;
  box-shadow: var(--fo-ombre);
}
.vitrine-mini__logo {
  position: absolute;
  z-index: 2;
  left: 26px;
  bottom: -26px;
  width: 64px;
  height: 64px;
  display: grid;
  place-items: center;
  overflow: hidden;
  background: #fff;
  border: 3px solid var(--fo-fond);
  border-radius: 20px 20px 20px 6px;
  box-shadow: 0 4px 0 var(--accent-fonce);
  transform: rotate(-4deg);
  font-family: var(--f-serif);
  font-size: 26px;
  font-weight: 700;
  color: var(--accent-fonce);
}
.vitrine-mini__logo img { width: 100%; height: 100%; object-fit: cover; }

/* le corps : fiche vitrine de commerce */
.vitrine-mini__corps {
  padding: calc(var(--espace-8) + var(--espace-2)) var(--espace-5) var(--espace-5);
  display: flex;
  flex-direction: column;
  gap: var(--espace-3);
  flex: 1;
}
.vitrine-mini__corps h2 {
  margin: 0;
  font-size: var(--t-xl);
  font-family: var(--f-serif);
}
.vitrine-mini__corps h2::after {
  content: "";
  display: block;
  width: 44px;
  height: 4px;
  margin-top: 6px;
  border-radius: 2px;
  background: var(--accent);
}
.vitrine-mini__note { margin: 0; color: var(--fo-encre-doux); font-size: var(--t-sm); }

.vitrine-mini__feuille {
  margin: 0;
  display: grid;
  gap: var(--espace-3);
  background: var(--fo-fond);
  border: 1px dashed var(--fo-filet);
  border-radius: 10px;
  padding: var(--espace-4) var(--espace-4) 0;
}
.vitrine-mini__feuille > div + div { border-top: 1px dashed var(--fo-filet); }
.vitrine-mini__feuille dt {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent-fonce);
  margin-bottom: 3px;
}
.vitrine-mini__feuille dd { margin: 0 0 var(--espace-3); font-size: var(--t-sm); }

.vitrine-mini__actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--espace-2);
  margin: 0;
}
.vitrine-mini__cta {
  display: inline-block;
  padding: 7px 16px;
  border-radius: 999px;
  background: var(--accent);
  color: #fff;
  font-size: var(--t-sm);
  font-weight: 700;
  box-shadow: 0 2px 0 var(--accent-fonce);
}
.vitrine-mini__cta:hover { transform: translateY(-2px); }
.vitrine-mini__cta--discret {
  background: #fff;
  color: var(--fo-encre);
  border: 1px solid var(--fo-filet);
  box-shadow: 0 1px 2px rgba(38, 43, 51, 0.08);
}

.vitrine-mini__sous-titre {
  margin: var(--espace-2) 0 0;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--fo-encre-doux);
}
.vitrine-mini .vitrine-team-list { margin-top: 0; }
.vitrine-mini .vitrine-team-list a {
  color: var(--fo-encre);
  font-size: var(--t-sm);
}
.vitrine-mini .vitrine-team-list a span[aria-hidden] { color: var(--accent-fonce); }
.vitrine-mini .vitrine-team-list a:hover span:not([aria-hidden]) { text-decoration: underline; }

@media (max-width: 640px) {
  .vitrine-mini__devanture img { height: 150px; }
  .vitrine-mini__corps { padding: calc(var(--espace-8) - var(--espace-2)) var(--espace-4) var(--espace-4); }
}

/* ==========================================================================
   VITRINE BIS — mur des exploits épinglé + site vitrine d'équipe
   Additif : page /vitrine uniquement. Les épinglettes = fiches cartonnées
   scotchées ; le détail d'équipe devient un vrai mini-site (couverture,
   logo posé, compteurs, défi encadré, troupe, galerie).
   ========================================================================== */
.feuille--mur { position: relative; }

.feuille__entete--mur {
  display: grid;
  gap: var(--espace-2);
  margin-bottom: var(--espace-6);
}
.feuille__entete--mur h3 {
  font-family: var(--f-serif);
  font-size: var(--t-xl);
}
.mur-note { margin: 0; color: var(--fo-encre-doux); font-size: var(--t-sm); max-width: 52ch; }
.mur-total {
  position: relative;
  justify-self: start;
  background: var(--soleil);
  color: var(--encre);
  font-size: var(--t-sm);
  font-weight: 700;
  padding: 10px 18px 6px;
  border-radius: 2px;
  box-shadow: var(--fo-ombre);
  transform: rotate(-2deg);
}
.mur-total .epingle__scotch {
  top: -7px;
  left: 50%;
  transform: translateX(-50%) rotate(-3deg);
  height: 14px;
  width: 56px;
}
.mur-pied {
  margin: var(--espace-6) 0 0;
  font-size: var(--t-sm);
  color: var(--fo-encre-doux);
}
.mur-pied a { color: var(--indigo-encre); font-weight: 700; }

/* le mur : colonnes type babillard, épinglettes posées */
.mur-grid, .galerie-grid--mur {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: var(--espace-6) var(--espace-5);
}

.epingle {
  position: relative;
  margin: 0;
  display: flex;
  flex-direction: column;
  background: #fff;
  border: 1px solid var(--fo-filet);
  border-radius: 6px 6px 8px 8px;
  box-shadow: var(--fo-ombre);
  overflow: visible;
  transition: transform 220ms ease, box-shadow 220ms ease;
}
.galerie-card.epingle { padding: 0; }
.epingle:hover {
  transform: translateY(-5px) rotate(-1deg);
  box-shadow: var(--fo-ombre-forte);
}
.epingle--une { transform: rotate(-1.2deg); }
.epingle--deux { transform: rotate(0.8deg); }
.epingle--trois { transform: rotate(-0.4deg); }
.epingle--une:hover, .epingle--deux:hover { transform: translateY(-5px) rotate(-0.6deg); }
.epingle--trois:hover { transform: translateY(-5px) rotate(0.4deg); }

.epingle__photo {
  display: block;
  width: 100%;
  height: 150px;
  object-fit: cover;
  border-radius: 5px 5px 0 0;
  border-bottom: 1px solid var(--fo-filet);
}
.epingle__photo--vide {
  display: grid;
  place-items: center;
  background: repeating-linear-gradient(-45deg, var(--fo-fond) 0 14px, #f2f0ea 14px 28px);
  color: var(--fo-encre-doux);
  font-family: var(--f-serif);
  font-size: 42px;
  font-weight: 700;
  height: 110px;
}
.epingle__scotch {
  position: absolute;
  top: -10px;
  left: 18px;
  width: 64px;
  height: 20px;
  background: rgba(242, 146, 27, 0.32);
  border-inline: 1px dashed rgba(168, 70, 10, 0.25);
  transform: rotate(-4deg);
  border-radius: 2px;
  pointer-events: none;
}

.epingle__corps {
  padding: var(--espace-4) var(--espace-4) var(--espace-5);
  display: grid;
  gap: 6px;
}
.epingle__corps h4 {
  margin: 0;
  font-family: var(--f-serif);
  font-size: var(--t-md);
  line-height: 1.25;
}
.epingle__meta {
  margin: 0;
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--indigo-encre, var(--indigo));
  font-weight: 700;
}
.epingle__legende {
  margin: 0;
  font-size: var(--t-sm);
  color: var(--fo-encre-doux);
}

/* ---------- site vitrine d'équipe (détail) ---------- */
.site-equipe { display: grid; gap: var(--espace-6); }

.site-equipe__hero { position: relative; padding: 10px 10px 0; }
.site-equipe__couverture {
  display: block;
  width: 100%;
  height: 300px;
  object-fit: cover;
  border-radius: 10px;
  box-shadow: var(--fo-ombre-forte);
}
.site-equipe__carte {
  position: relative;
  margin: -74px 26px 0;
  padding: 0 var(--espace-6) var(--espace-6);
  background: #fff;
  border: 1px solid var(--fo-filet);
  border-radius: 14px;
  box-shadow: var(--fo-ombre);
  padding-top: calc(var(--espace-6) + var(--espace-4));
}
.site-equipe__logo {
  position: absolute;
  top: -32px;
  left: 26px;
  width: 76px;
  height: 76px;
  display: grid;
  place-items: center;
  overflow: hidden;
  background: #fff;
  border: 3px solid var(--fo-fond);
  border-radius: 22px 22px 22px 6px;
  box-shadow: 0 4px 0 var(--indigo-sombre);
  transform: rotate(-4deg);
  font-family: var(--f-serif);
  font-size: 30px;
  font-weight: 700;
  color: var(--indigo-sombre);
}
.site-equipe__logo img { width: 100%; height: 100%; object-fit: cover; }

.site-equipe__nom {
  margin: 0;
  font-family: var(--f-serif);
  font-size: clamp(26px, 4vw, 40px);
  line-height: 1.1;
}
.site-equipe__slogan {
  margin: var(--espace-2) 0 0;
  font-family: var(--f-serif);
  font-style: italic;
  font-size: var(--t-lg, 20px);
  color: var(--indigo-encre);
}
.site-equipe__note { margin: var(--espace-3) 0 0; color: var(--fo-encre-doux); max-width: 62ch; }

.site-equipe__compte {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--espace-3);
  margin: 0 var(--espace-6);
  padding: var(--espace-4) 0;
  border-top: 1px dashed var(--fo-filet);
  border-bottom: 1px dashed var(--fo-filet);
  text-align: center;
}
.site-equipe__compte strong {
  display: block;
  font-family: var(--f-serif);
  font-size: var(--t-xl);
}
.site-equipe__compte span {
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--fo-encre-doux);
}

.site-equipe__defi {
  margin: 0 var(--espace-6);
  background: var(--fo-fond);
  border: 1px dashed rgba(242, 146, 27, 0.5);
  border-radius: 10px;
  padding: var(--espace-4) var(--espace-5);
}
.site-equipe__defi span {
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ocre-sombre);
  margin-bottom: 4px;
}
.site-equipe__defi p { margin: 0; font-size: var(--t-sm); }

.site-equipe__corps { margin: 0 var(--espace-6) var(--espace-6); display: grid; gap: var(--espace-4); }
.site-equipe__corps h3 {
  margin: var(--espace-4) 0 0;
  font-family: var(--f-serif);
  font-size: var(--t-lg, 22px);
}
.site-equipe__aide-troupe { margin: 0; font-size: var(--t-sm); color: var(--fo-encre-doux); }

.equipe-troupe {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
  gap: var(--espace-4);
}
.equipe-membre {
  display: grid;
  gap: 4px;
  justify-items: start;
  background: #fff;
  border: 1px solid var(--fo-filet);
  border-radius: 12px;
  padding: var(--espace-4);
  box-shadow: var(--fo-ombre);
}
.equipe-membre .avatar { width: 52px; height: 52px; }
.membre-mini__nom { font-weight: 700; font-size: var(--t-sm); }
.membre-mini__role {
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--indigo-encre);
  font-weight: 700;
}
.membre-mini__bio { margin: 4px 0 0; font-size: var(--t-sm); color: var(--fo-encre-doux); }

@media (max-width: 640px) {
  .site-equipe__couverture { height: 190px; }
  .site-equipe__carte { margin: -52px 10px 0; padding: var(--espace-6) var(--espace-4) var(--espace-5); }
  .site-equipe__logo { top: -26px; width: 60px; height: 60px; font-size: 22px; }
  .site-equipe__compte { grid-template-columns: 1fr 1fr; margin: 0 10px; }
  .site-equipe__compte > div:last-child { grid-column: 1 / -1; }
  .site-equipe__defi { margin: 0 10px; }
  .site-equipe__corps { margin: 0 10px; }
  .mur-grid, .galerie-grid--mur { grid-template-columns: 1fr; }
}

/* ---- CMS admin : contenu du site (additif, itération 7) ---- */
.cms-default {
  font-size: var(--t-sm);
  color: var(--fo-encre-doux, var(--encre-douce, #5C6672));
  background: var(--papier-creux, #F4F2EE);
  border-left: 3px solid var(--filet, var(--ligne, #DDD6CB));
  padding: 8px 12px;
  border-radius: 6px;
  max-width: 56ch;
  overflow-wrap: anywhere;
}
.cms-apercu {
  display: block;
  width: 132px;
  height: 82px;
  object-fit: cover;
  border-radius: 8px;
  border: 1px solid var(--filet, var(--ligne, #DDD6CB));
}
.cms-actions {
  display: grid;
  gap: var(--espace-2);
  grid-template-columns: 1fr auto;
  align-items: start;
  margin-top: var(--espace-3);
}
.cms-texte-actions,
.cms-photo-actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--espace-2);
  align-items: center;
}
.cms-texte, .cms-url {
  flex: 1 1 220px;
  min-width: 0;
}
.cms-apercu + .cms-photo-actions { margin-top: var(--espace-2); }
