/* =========================================================
   FAGS — feuille de style
   Dérivée de la charte graphique FAGS (mai 2024)
   ========================================================= */

/* ---------- 1. Polices ----------------------------------
   Les polices sont hébergées ici, dans assets/fonts/.
   Aucune connexion vers Google : rien ne sort du serveur.

   Ce sont des polices « variables » : un seul fichier contient
   toutes les graisses, d'où la plage 100–900 ci-dessous.

   Bely Display, elle, est commerciale (licence web à acquérir).
   Le site utilise Playfair Display à la place — c'est un choix
   assumé, pas un provisoire.                                   */

@font-face {
  font-family: "Outfit";
  src: url("../assets/fonts/outfit.woff") format("woff");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Playfair Display";
  src: url("../assets/fonts/playfair-display.woff") format("woff");
  font-weight: 400 900;
  font-style: normal;
  font-display: swap;
}

/* ---------- 2. Jetons de design ------------------------- */

:root {
  /* Couleurs de la charte */
  --vert:   #91FF1D;   /* R=145 V=255 B=29  */
  --orange: #FFA51D;   /* R=255 V=165 B=29  */
  --violet: #BD1CFF;   /* R=189 V=28  B=255 */
  --jaune:  #FFFF00;   /* à confirmer : la charte note 255/255/255 */
  --noir:   #000000;
  --blanc:  #FFFFFF;
  --gris:   #6B6B6B;   /* texte secondaire uniquement */

  /* Typographie */
  --display: "Bely Display", "Playfair Display", Georgia, serif;
  --texte: "Outfit", system-ui, -apple-system, "Segoe UI", sans-serif;

  /* Rythme */
  --page: 1140px;
  --marge: clamp(1.25rem, 5vw, 4rem);
  --section: clamp(4rem, 9vw, 7.5rem);
}

/* ---------- 3. Base ------------------------------------- */

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--blanc);
  color: var(--noir);
  font-family: var(--texte);
  font-weight: 300;
  font-size: clamp(1.05rem, 0.98rem + 0.35vw, 1.2rem);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; display: block; }

a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: 0.22em; }
a:hover { text-decoration-color: var(--violet); }

:focus-visible {
  outline: 3px solid var(--violet);
  outline-offset: 3px;
}

.contenu {
  max-width: var(--page);
  margin-inline: auto;
  padding-inline: var(--marge);
}

.etroit { max-width: 720px; }

/* ---------- 4. Typographie ------------------------------ */

h1, h2, h3 {
  font-family: var(--display);
  font-weight: 700;
  line-height: 1.02;
  margin: 0;
  letter-spacing: -0.01em;
}

h1 { font-size: clamp(2.75rem, 1.4rem + 6.5vw, 6rem); }
h2 { font-size: clamp(1.9rem, 1.2rem + 3vw, 3.25rem); }
h3 {
  font-family: var(--texte);
  font-weight: 500;
  font-size: 1.15rem;
  line-height: 1.35;
  letter-spacing: 0;
  margin-bottom: 0.55rem;   /* sans ça, le texte colle au titre */
}

p { margin: 0 0 1.1em; }
p:last-child { margin-bottom: 0; }

strong, b { font-weight: 500; }

.chapeau {
  font-size: clamp(1.2rem, 1.05rem + 0.7vw, 1.5rem);
  line-height: 1.45;
  max-width: 38ch;
}

/* Le chapeau qui suit directement un titre a besoin d'air.
   Après un filet, non : le filet apporte déjà sa marge. */
h1 + .chapeau,
h2 + .chapeau { margin-top: 1.75rem; }

/* Sur-titre : reprend les petits titres de la charte */
.surtitre {
  font-family: var(--display);
  font-weight: 700;
  font-size: 0.92rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin: 0 0 0.9rem;
}

/* Le filet noir sous les titres de section, comme dans la charte */
.filet {
  border: 0;
  border-top: 2.5px solid currentColor;
  margin: 0.8rem 0 2.5rem;
}

.grille .filet:last-child,
.grille > div > .filet:last-child { margin-bottom: 0; }

/* ---------- 5. En-tête et navigation -------------------- */

.entete {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--blanc);
  border-bottom: 2.5px solid var(--noir);
}

.entete .contenu {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  min-height: 76px;
  padding-block: 0.75rem;
}

.marque {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
  flex: none;
}

/* Charte : ajuster sans déformer. On ne fixe que la hauteur,
   la largeur suit toute seule. */
.marque img {
  height: clamp(2.4rem, 5vw, 3rem);
  width: auto;
  display: block;
}

/* Pastille dégradée : reprise du disque du logo, pas le logo lui-même.
   Remplace ce bloc par le fichier officiel dès que tu l'as. */
.pastille {
  width: 1.5em;
  height: 1.5em;
  border-radius: 50%;
  flex: none;
  background: radial-gradient(115% 115% at 28% 18%,
              var(--violet) 0%, var(--violet) 20%,
              var(--vert) 68%, var(--jaune) 100%);
}

.nav ul {
  display: flex;
  gap: clamp(1rem, 2.5vw, 2.25rem);
  list-style: none;
  margin: 0;
  padding: 0;
  font-size: 1rem;
}

.nav a {
  text-decoration: none;
  padding-bottom: 3px;
  border-bottom: 2.5px solid transparent;
}

.nav a:hover { border-bottom-color: var(--violet); }
.nav a[aria-current="page"] { border-bottom-color: var(--noir); font-weight: 500; }

/* ---------- 6. Sections et bandeaux --------------------- */

.section { padding-block: var(--section); }
.section-serre { padding-block: clamp(2.5rem, 6vw, 4.5rem); }

/* Sans changement de fond, deux paddings qui s'additionnent créent
   un trou. On n'en garde qu'un. */
.section:not(.bandeau) + .section:not(.bandeau),
.section:not(.bandeau) + .section-serre:not(.bandeau),
.section-serre:not(.bandeau) + .section:not(.bandeau),
.section-serre:not(.bandeau) + .section-serre:not(.bandeau) { padding-top: 0; }

/* Bandeaux fluo pleine largeur.
   Le noir sur fluo est le seul contraste validé par la charte. */
.bandeau { color: var(--noir); }
.bandeau-jaune  { background: var(--jaune); }
.bandeau-vert   { background: var(--vert); }
.bandeau-violet { background: var(--violet); }
.bandeau-degrade {
  background: linear-gradient(115deg,
              var(--violet) 0%, var(--vert) 62%, var(--jaune) 100%);
}

/* ---------- 7. Héros ------------------------------------ */

.heros {
  position: relative;
  overflow: hidden;
  padding-block: clamp(3.5rem, 8vw, 7rem) clamp(3.5rem, 8vw, 6rem);
}

.heros .contenu { position: relative; z-index: 1; }

/* Le disque dégradé, en écho à la construction du logo :
   le texte noir passe par-dessus le cercle. */
.disque {
  position: absolute;
  z-index: 0;
  top: 50%;
  left: 50%;
  translate: -50% -50%;
  width: min(78vw, 620px);
  aspect-ratio: 1;
  border-radius: 50%;
  background: radial-gradient(110% 110% at 30% 20%,
              var(--violet) 0%, var(--violet) 18%,
              var(--vert) 66%, var(--jaune) 100%);
  filter: blur(4px);
  animation: tourne 48s linear infinite;
}

@keyframes tourne { to { rotate: 360deg; } }

.heros h1 { max-width: 15ch; }

.heros .chapeau { margin-top: 1.75rem; }

/* Ancrage géographique sous le chapeau */
.mention-lieu {
  margin-top: 1.1rem;
  font-weight: 500;
  font-size: 1rem;
  letter-spacing: 0.01em;
  display: inline-block;
  border-bottom: 2.5px solid var(--violet);
  padding-bottom: 2px;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem;
  margin-top: 2.25rem;
}

/* ---------- 8. Boutons ---------------------------------- */

.bouton {
  display: inline-block;
  font-family: var(--texte);
  font-weight: 500;
  font-size: 1.02rem;
  line-height: 1.2;
  padding: 0.95em 1.6em;
  border: 2.5px solid var(--noir);
  background: var(--noir);
  color: var(--blanc);
  text-decoration: none;
  transition: background 0.15s ease, color 0.15s ease;
}

.bouton:hover { background: var(--vert); color: var(--noir); }

.bouton-clair {
  background: transparent;
  color: var(--noir);
}
.bouton-clair:hover { background: var(--noir); color: var(--blanc); }

/* ---------- 9. Grilles et cartes ------------------------ */

.grille {
  display: grid;
  gap: clamp(1.75rem, 4vw, 3rem);
}

.grille-3 { grid-template-columns: repeat(auto-fit, minmax(255px, 1fr)); }
.grille-2 { grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); }

.carte > h3 { margin-bottom: 0.6rem; }
.carte-bordee > h3 { margin-bottom: 0.35rem; }

.carte-bordee {
  border: 2.5px solid var(--noir);
  padding: clamp(1.5rem, 3vw, 2.25rem);
  display: flex;
  flex-direction: column;
}

.carte-bordee .prix {
  margin-top: auto;
  padding-top: 1.5rem;
  font-weight: 500;
}

/* Chiffres-clés */
.reperes {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 2rem;
}

.repere .valeur {
  font-family: var(--display);
  font-weight: 700;
  font-size: clamp(2.4rem, 1.5rem + 3vw, 3.75rem);
  line-height: 1;
  display: block;
}

/* Ligne durée · groupe · tarif en tête de formation */
.ligne-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 1.1rem;
  font-weight: 500;
  font-size: 0.95rem;
  line-height: 1.3;
  border-top: 2px solid var(--noir);
  border-bottom: 2px solid var(--noir);
  padding: 0.55rem 0;
  margin: 0 0 1.25rem;
}

.ligne-meta .tarif { margin-left: auto; }

.sous-titre {
  font-weight: 500;
  color: var(--noir);
  font-size: 1.05rem;
  line-height: 1.35;
  margin: 0.5rem 0 1.1rem;
}

.public {
  font-size: 0.95rem;
  line-height: 1.45;
  margin-top: auto;
  padding-top: 1.35rem;
}

.public strong { display: block; }

.lien-pdf {
  display: inline-block;
  font-weight: 500;
  font-size: 0.95rem;
  text-decoration: none;
  border-bottom: 2.5px solid var(--noir);
  padding-bottom: 1px;
}

.lien-pdf::before { content: "\2193\00a0"; }
.lien-pdf:hover { border-bottom-color: var(--violet); }

.portrait {
  border: 2.5px solid var(--noir);
  width: 100%;
  max-width: 300px;
  margin-bottom: 1.5rem;
}

.portrait-legende {
  font-size: 0.9rem;
  margin-top: -1rem;
  margin-bottom: 1.75rem;
}

/* Repère dont la valeur est un mot et non un chiffre */
.repere .valeur-mot { font-size: clamp(1.9rem, 1.3rem + 2vw, 2.9rem); }

.repere .libelle {
  font-size: 0.98rem;
  margin-top: 0.5rem;
  display: block;
}

/* Listes */
.liste-nette {
  list-style: none;
  margin: 0;
  padding: 0;
}

.liste-nette li {
  border-top: 1.5px solid currentColor;
  padding: 0.9rem 0;
}
.liste-nette li:last-child { border-bottom: 1.5px solid currentColor; }

/* Liste définition, comme le bloc « Historique / Prix / Dates » de la charte */
.definitions { margin: 0; }
.definitions dt {
  font-weight: 500;
  float: left;
  margin-right: 0.5em;
}
.definitions dd {
  margin: 0 0 0.85em;
  overflow: hidden;
}

/* ---------- 10. Pied de page ---------------------------- */

.pied {
  border-top: 2.5px solid var(--violet);
  padding-block: 1.5rem 2.5rem;
  margin-top: 0;
}

.pied .contenu {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem 2rem;
  align-items: baseline;
  justify-content: space-between;
}

.pied-marque {
  font-family: var(--display);
  font-weight: 700;
  color: var(--violet);
  font-size: 1.1rem;
}

.pied-liens {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
  list-style: none;
  margin: 0;
  padding: 0;
  font-size: 0.98rem;
}

/* ---------- 11. Zones à compléter -----------------------
   Marque le texte provisoire, à remplacer par le vrai contenu.
   Pour tout enlever d'un coup : supprime les deux règles
   ci-dessous et le site redevient parfaitement propre.      */

.acompleter {
  background: var(--jaune);
  border-bottom: 2px dotted var(--noir);
  padding: 0 0.15em;
}

.bloc-acompleter {
  border: 2px dashed var(--noir);
  background: color-mix(in srgb, var(--jaune) 35%, white);
  padding: clamp(1.25rem, 3vw, 2rem);
}

.bloc-acompleter > .surtitre { color: var(--noir); }

/* ---------- 11 bis. Formulaire -------------------------- */

.formulaire {
  border: 2.5px solid var(--noir);
  background: var(--blanc);
  padding: clamp(1.5rem, 3.5vw, 2.5rem);
}

.alerte {
  border: 2.5px solid var(--noir);
  background: var(--jaune);
  padding: 1rem 1.15rem;
  margin-bottom: 1.75rem;
  font-size: 0.98rem;
}

.champs {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 1.25rem;
}

.champ { display: flex; flex-direction: column; }
.champ-large { grid-column: 1 / -1; }

.champ label {
  font-weight: 500;
  font-size: 0.98rem;
  margin-bottom: 0.4rem;
}

.champ .aide {
  font-size: 0.88rem;
  color: var(--gris);
  margin: 0.35rem 0 0;
}

.champ input,
.champ select,
.champ textarea {
  font-family: var(--texte);
  font-weight: 300;
  font-size: 1rem;
  color: var(--noir);
  background: var(--blanc);
  border: 2px solid var(--noir);
  border-radius: 0;
  padding: 0.7em 0.8em;
  width: 100%;
}

.champ textarea { min-height: 8.5em; resize: vertical; }

.champ select { appearance: none; background-image: none; cursor: pointer; }

.champ input:focus,
.champ select:focus,
.champ textarea:focus {
  outline: 3px solid var(--violet);
  outline-offset: 1px;
}

.champ .obligatoire { color: var(--noir); font-weight: 500; }

.accord {
  display: flex;
  align-items: flex-start;
  gap: 0.7rem;
  margin-top: 1.75rem;
  font-size: 0.95rem;
  line-height: 1.45;
}

.accord input {
  flex: none;
  width: 1.25rem;
  height: 1.25rem;
  margin-top: 0.15rem;
  accent-color: var(--violet);
}

.formulaire .bouton { margin-top: 1.75rem; cursor: pointer; }

/* Piège à robots : invisible pour les humains, rempli par les spams */
.pot-de-miel {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

/* ---------- 11 ter. Parcours en étapes (page EVARS jeunes) ----
   Le bord perforé rappelle une pellicule de film : le parcours
   aboutit à une vidéo tournée par les jeunes.                   */

.etape {
  position: relative;
  background: var(--blanc);
  border: 2.5px solid var(--noir);
  padding: clamp(1.5rem, 3vw, 2rem) clamp(1.25rem, 3vw, 2rem) clamp(1.5rem, 3vw, 2rem) 3.5rem;
  margin-bottom: 1.25rem;
}

.etape::before {
  content: "";
  position: absolute;
  top: 0; left: 0; bottom: 0;
  width: 1.9rem;
  border-right: 2.5px solid var(--noir);
  background-image: radial-gradient(var(--noir) 42%, transparent 44%);
  background-size: 1.9rem 1.9rem;
  background-position: center 0.55rem;
  background-repeat: repeat-y;
}

.etape--1::before { background-image: radial-gradient(var(--violet) 42%, transparent 44%); }
.etape--2::before { background-image: radial-gradient(var(--vert) 42%, transparent 44%); }
.etape--3::before { background-image: radial-gradient(var(--jaune) 42%, transparent 44%); }

.etape .tete {
  display: flex;
  align-items: baseline;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 1rem;
}

.etape .tete h3 { margin-bottom: 0; }

.etape .num {
  font-family: var(--display);
  font-weight: 700;
  font-size: clamp(2.2rem, 5vw, 3.4rem);
  line-height: 0.8;
}

.etape .duree {
  font-size: 0.85rem;
  font-weight: 500;
  background: var(--jaune);
  padding: 0.2em 0.6em;
  white-space: nowrap;
}
.etape--1 .duree { background: var(--violet); }
.etape--2 .duree { background: var(--vert); }

.seances {
  list-style: none;
  margin: 1.25rem 0 0;
  padding: 0;
  display: grid;
  gap: 0.6rem;
}

.seances li {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.9rem;
  align-items: baseline;
  border-top: 1.5px solid var(--noir);
  padding-top: 0.6rem;
  font-size: 0.98rem;
}

.seances .idx { font-weight: 500; font-size: 0.85rem; white-space: nowrap; }

@media (max-width: 560px) {
  .etape { padding-left: 2.75rem; }
  .etape::before { width: 1.4rem; background-size: 1.4rem 1.4rem; }
  .seances li { grid-template-columns: 1fr; gap: 0.15rem; }
}

/* Grille de thématiques, séparateurs noirs */
.themes {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 2.5px;
  background: var(--noir);
  border: 2.5px solid var(--noir);
}

.theme { background: var(--blanc); padding: 1.5rem; }
.theme h3 { margin-bottom: 0.5rem; }
.theme p { margin: 0; font-size: 0.95rem; }

.theme .puce {
  display: block;
  width: 0.9rem;
  height: 0.9rem;
  border-radius: 50%;
  margin-bottom: 0.75rem;
}

/* Citation mise en avant */
.definition {
  border-top: 2.5px solid var(--noir);
  border-bottom: 2.5px solid var(--noir);
  padding: clamp(1.75rem, 4vw, 2.75rem) 0;
  margin-top: clamp(2rem, 5vw, 3rem);
}

.definition .etiquette {
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  font-size: 0.75rem;
  margin-bottom: 1rem;
}

.definition .etiquette span { background: var(--violet); padding: 0.25em 0.6em; }

.definition p {
  font-family: var(--display);
  font-weight: 700;
  font-size: clamp(1.35rem, 3.2vw, 2.1rem);
  line-height: 1.2;
  max-width: 26ch;
  margin: 0;
}

/* Encart bordé */
.encart {
  border: 2.5px solid var(--noir);
  padding: clamp(1.5rem, 3vw, 2.25rem);
  background: var(--blanc);
}

.encart .etiquette {
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 0.75rem;
  margin-bottom: 0.75rem;
}

/* Tableau du cadre pratique */
.pratique {
  display: grid;
  grid-template-columns: minmax(9rem, 15rem) 1fr;
  margin: 0;
  border-top: 2.5px solid var(--noir);
}

.pratique dt { font-weight: 500; padding: 1rem 1rem 1rem 0; border-bottom: 1.5px solid var(--noir); }
.pratique dd { margin: 0; padding: 1rem 0; border-bottom: 1.5px solid var(--noir); }

@media (max-width: 620px) {
  .pratique { grid-template-columns: 1fr; }
  .pratique dt { padding-bottom: 0.15rem; border-bottom: 0; }
  .pratique dd { padding-top: 0; }
}

/* Liste à flèches */
.methodes { list-style: none; padding: 0; margin: 0; display: grid; gap: 0.75rem; }
.methodes li { padding-left: 1.6rem; position: relative; }
.methodes li::before { content: "\2192"; position: absolute; left: 0; font-weight: 500; }

/* ---------- 12. Divers ---------------------------------- */

.saut-contenu {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--noir);
  color: var(--blanc);
  padding: 0.75rem 1.25rem;
  z-index: 100;
}
.saut-contenu:focus { left: 0; }

.mel { word-break: break-word; }

@media (max-width: 700px) {
  .entete .contenu {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.75rem;
  }
  .nav ul { flex-wrap: wrap; gap: 0.85rem 1.25rem; }
  .nav .lien-accueil { display: none; }   /* doublon du logo juste au-dessus */
  .definitions dt { float: none; display: block; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .disque { animation: none; }
  * { transition-duration: 0.01ms !important; }
}
