/* The Story Tailors — feuille de style unique.
   Aucune ressource externe : polices servies depuis /assets/fonts. */

@font-face {
  font-family: "Crimson Pro";
  src: url("../fonts/CrimsonPro-VF.ttf") format("truetype");
  font-weight: 200 900;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Crimson Pro";
  src: url("../fonts/CrimsonPro-Italic-VF.ttf") format("truetype");
  font-weight: 200 900;
  font-style: italic;
  font-display: swap;
}

:root {
  --papier: #fbf8f3;
  --papier-2: #f3ede3;
  --encre: #1d1b18;
  --encre-2: #57514a;
  --fil: #a3262a;          /* rouge « fil à coudre » : liens et accents */
  --fil-fonce: #7d1c1f;
  --fil-pale: #e8cfcb;     /* piste des jauges : même teinte, plus claire */
  --trait: #d9d0c3;
  --surligne: #fff1a8;
  --serif: "Crimson Pro", Georgia, "Times New Roman", serif;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mesure: 42rem;
  --large: 72rem;
  --gouttiere: clamp(1rem, 4vw, 2rem);
}

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

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

body {
  margin: 0;
  background: var(--papier);
  color: var(--encre);
  font-family: var(--serif);
  font-size: 1.25rem;
  line-height: 1.55;
  font-kerning: normal;
  overflow-wrap: break-word;
}

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

a { color: var(--fil); text-decoration-thickness: 1px; text-underline-offset: 0.18em; }
a:hover { color: var(--fil-fonce); text-decoration-thickness: 2px; }
a:focus-visible, summary:focus-visible {
  outline: 3px solid var(--fil);
  outline-offset: 3px;
  border-radius: 2px;
}

h1, h2, h3, h4 { font-family: var(--serif); line-height: 1.15; margin: 0 0 0.6em; font-weight: 600; }
h1 { font-size: clamp(2.3rem, 5.5vw, 3.6rem); letter-spacing: -0.01em; font-weight: 500; }
h2 { font-size: clamp(1.7rem, 3.4vw, 2.2rem); margin-top: 2.2em; }
h2::after {                 /* point de couture sous chaque titre de section */
  content: "";
  display: block;
  width: 3.5rem;
  margin-top: 0.45em;
  border-top: 2px dashed var(--fil);
}
h3 { font-size: 1.4rem; margin-top: 1.6em; }
h2, h3, section { scroll-margin-top: 1rem; }
h4 { font-size: 1.2rem; margin-top: 1.2em; }
p, ul, ol, dl, table { margin: 0 0 1em; }
ul, ol { padding-left: 1.3em; }
li { margin-bottom: 0.3em; }
li::marker { color: var(--fil); }
strong { font-weight: 650; }
small, .petit { font-size: 0.9em; }

.sans { font-family: var(--sans); }
.insecable { white-space: nowrap; }
.discret { color: var(--encre-2); }

/* Lien d'évitement */
.evitement {
  position: absolute;
  left: 0.5rem;
  top: -4rem;
  z-index: 10;
  background: var(--encre);
  color: var(--papier);
  padding: 0.6rem 1rem;
  font-family: var(--sans);
  font-size: 1rem;
}
.evitement:focus { top: 0.5rem; color: var(--papier); }

/* Gabarit */
.conteneur { width: 100%; max-width: var(--large); margin: 0 auto; padding: 0 var(--gouttiere); }
.lecture { max-width: var(--mesure); }

/* En-tête */
.entete { border-bottom: 1px solid var(--trait); background: var(--papier); }
.entete .conteneur {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem 2rem;
  padding-top: 0.9rem;
  padding-bottom: 0.9rem;
}
.marque { display: block; flex: none; }
.marque img { width: 150px; }
.navigation ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.15rem 1.4rem;
  font-family: var(--sans);
  font-size: 0.95rem;
}
.navigation li { margin: 0; }
.navigation a { color: var(--encre); text-decoration: none; padding: 0.35rem 0; display: inline-block; border-bottom: 2px solid transparent; }
.navigation a:hover { color: var(--fil); border-bottom-color: var(--fil); }
.navigation a[aria-current="page"] { color: var(--fil); border-bottom: 2px dashed var(--fil); }

main { display: block; padding-bottom: 4rem; }

/* Fil d'Ariane */
.ariane { font-family: var(--sans); font-size: 0.9rem; color: var(--encre-2); margin: 1.6rem 0 0; }
.ariane ol { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 0.3rem; }
.ariane li { margin: 0; }
.ariane li + li::before { content: "›"; margin-right: 0.3rem; color: var(--encre-2); }
.ariane a { color: var(--encre-2); }

/* Titre de page */
.titre-page { padding: 2.2rem 0 0.6rem; }
.titre-page .surtitre {
  font-family: var(--sans);
  font-size: 0.85rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--fil);
  margin-bottom: 0.6rem;
}
.titre-page .chapo { font-size: 1.45rem; line-height: 1.45; color: var(--encre-2); max-width: var(--mesure); }
.maj { font-family: var(--sans); font-size: 0.85rem; color: var(--encre-2); }

/* Accueil */
.une { padding: clamp(3rem, 9vw, 6.5rem) 0 clamp(2.5rem, 6vw, 4.5rem); border-bottom: 1px solid var(--trait); }
.une h1 { font-size: clamp(2.7rem, 7.5vw, 5.2rem); line-height: 1.02; max-width: 15ch; margin-bottom: 0.4em; }
.une h1 em { color: var(--fil); font-weight: 400; }
.une .chapo { font-size: clamp(1.35rem, 2.6vw, 1.65rem); line-height: 1.4; max-width: 34rem; color: var(--encre-2); }
.une .fil-deco { width: min(22rem, 70%); border-top: 2px dashed var(--fil); margin: 2rem 0; }

.boutons { display: flex; flex-wrap: wrap; gap: 0.8rem; margin-top: 1.6rem; }
.bouton {
  display: inline-block;
  font-family: var(--sans);
  font-size: 1rem;
  font-weight: 600;
  text-decoration: none;
  padding: 0.75rem 1.3rem;
  border: 2px solid var(--encre);
  border-radius: 999px;
  color: var(--encre);
  background: transparent;
}
.bouton:hover { border-color: var(--fil); color: var(--fil); text-decoration: none; }
.bouton.plein { background: var(--encre); color: var(--papier); }
.bouton.plein:hover { background: var(--fil); border-color: var(--fil); color: #fff; }

/* Photos (toutes décoratives) */
.photo { display: block; }
.photo img { width: 100%; height: auto; }

/* Une : peinture en fond, texte sur un panneau papier pour rester lisible */
.une-photo { position: relative; overflow: hidden; padding: clamp(5rem, 13vw, 8.5rem) 0 clamp(2.5rem, 7vw, 5rem); }
.une-photo .fond { position: absolute; inset: 0; }
.une-photo .fond img { width: 100%; height: 100%; object-fit: cover; }
.une-panneau {
  position: relative;
  max-width: 46rem;
  background: var(--papier);
  border-radius: 6px;
  padding: clamp(1.4rem, 4vw, 3rem);
  box-shadow: 0 12px 40px rgba(29, 27, 24, 0.28);
}
.une-panneau .fil-deco { margin: 1.4rem 0; }

/* Texte et photo côte à côte */
.duo { display: grid; gap: 1.6rem 3rem; align-items: center; margin-top: 3.5rem; }
.duo h2 { margin-top: 0; }
.duo-photo { max-width: 20rem; }
.duo-photo img { border-radius: 6px; }
@media (min-width: 48rem) { .duo { grid-template-columns: minmax(0, 1fr) 20rem; } }
/* Page Qualiopi : certificat officiel */
.certificat-duo { align-items: start; margin-top: 1rem; }
.certificat { margin: 0; max-width: 26rem; }
.certificat img { border: 1px solid var(--trait); border-radius: 3px; box-shadow: 0 2px 10px rgba(29, 27, 24, 0.12); background: #fff; }
.certificat figcaption { font-family: var(--sans); font-size: 0.85rem; margin-top: 0.6rem; }
@media (min-width: 48rem) { .certificat-duo { grid-template-columns: minmax(0, 1fr) 26rem; } }

/* Photo en tête de carte, bandeaux */
.carte-photo { margin: 0 0 1.2rem; overflow: hidden; border-radius: 3px; }
.carte-photo img { aspect-ratio: 3 / 2; object-fit: cover; transition: transform 0.4s ease; }
.bandeau { margin: 1.4rem 0 0; }
.bandeau + .grille { margin-top: 2rem; }
.bandeau img { aspect-ratio: 5 / 2; object-fit: cover; border-radius: 6px; }
@media (max-width: 40rem) { .bandeau img { aspect-ratio: 16 / 9; } }

/* Grilles */
.grille { display: grid; gap: 1.5rem; grid-template-columns: repeat(auto-fit, minmax(min(100%, 19rem), 1fr)); }
.grille.trois { grid-template-columns: repeat(auto-fit, minmax(min(100%, 15rem), 1fr)); gap: 1.5rem 2.5rem; }
.grille.trois h3 { margin-top: 0.4em; }

/* Carte formation */
.carte {
  position: relative;
  background: var(--papier-2);
  padding: 1.8rem 1.6rem 1.6rem;
  border-radius: 6px;
  outline: 1px dashed var(--fil);
  outline-offset: -8px;
  display: flex;
  flex-direction: column;
}
.carte .titre-carte { margin-top: 0; font-size: 1.55rem; font-weight: 600; }
.carte .titre-carte::after { display: none; }
.carte .titre-carte a { color: var(--encre); text-decoration: none; }
.carte .titre-carte a::after { content: ""; position: absolute; inset: 0; }   /* carte entièrement cliquable */
/* Relief au survol : la carte se soulève et son ombre s'allonge ; la photo
   s'avance à peine. Même effet au clavier (focus-within). Pour qui a demandé
   moins de mouvement (prefers-reduced-motion), le relief reste mais sans
   animation, et la photo ne bouge pas. */
.carte { box-shadow: 0 1px 2px rgba(29, 27, 24, 0.06); transition: transform 0.2s ease, box-shadow 0.2s ease; }
.carte:hover, .carte:focus-within {
  transform: translateY(-6px);
  box-shadow: 0 20px 36px -14px rgba(29, 27, 24, 0.32), 0 4px 10px rgba(29, 27, 24, 0.08);
}
.carte:hover .carte-photo img, .carte:focus-within .carte-photo img { transform: scale(1.04); }
.carte:hover .suite, .carte:focus-within .suite { text-decoration: underline; text-underline-offset: 0.2em; }
.carte:focus-within { outline: 3px solid var(--fil); outline-offset: 2px; }
@media (prefers-reduced-motion: reduce) {
  .carte, .carte-photo img { transition: none; }
  .carte:hover .carte-photo img, .carte:focus-within .carte-photo img { transform: none; }
}
.carte .titre-carte a:focus-visible { outline: none; }
.carte .faits { margin-top: auto; }
.carte .sous-titre { font-family: var(--sans); font-size: 0.92rem; color: var(--encre-2); margin: -0.3rem 0 0.4rem; }
.pied-de-page { margin: 2.4rem 0 0; }
.carte .suite { font-family: var(--sans); font-size: 0.95rem; font-weight: 600; color: var(--fil); margin: 1rem 0 0; }

/* Faits clés (liste de définitions) */
.faits { display: grid; grid-template-columns: max-content 1fr; gap: 0.35rem 1.2rem; font-family: var(--sans); font-size: 0.95rem; line-height: 1.45; margin: 1rem 0 0; }
.faits dt { color: var(--encre-2); }
.faits dd { margin: 0; font-weight: 600; }

/* Fiche synthétique d'une formation */
.fiche {
  background: var(--papier-2);
  border-radius: 6px;
  outline: 1px dashed var(--fil);
  outline-offset: -8px;
  padding: 1.6rem 1.6rem 1.2rem;
  margin: 1.8rem 0 0;
}
.fiche .faits { grid-template-columns: repeat(auto-fit, minmax(min(100%, 13rem), 1fr)); gap: 1rem 1.6rem; margin: 0; }
.fiche .faits > div { margin: 0; }
.fiche .faits dt { font-size: 0.82rem; letter-spacing: 0.06em; text-transform: uppercase; }
.fiche .faits dd { font-size: 1.05rem; }
.fiche .mention { font-family: var(--sans); font-size: 0.85rem; color: var(--encre-2); margin: 1rem 0 0; }

/* Mise en page à deux colonnes : sommaire + contenu */
.page-formation { display: grid; gap: 0 3rem; grid-template-columns: minmax(0, 1fr); }
@media (min-width: 62rem) {
  .page-formation { grid-template-columns: 14rem minmax(0, var(--mesure)); }
  .sommaire { position: sticky; top: 1.5rem; align-self: start; }
}
.sommaire { font-family: var(--sans); font-size: 0.92rem; margin-top: 2.4rem; }
.sommaire h2 { font-family: var(--sans); font-size: 0.82rem; letter-spacing: 0.08em; text-transform: uppercase; margin: 0 0 0.6rem; color: var(--encre-2); }
.sommaire h2::after { display: none; }
.sommaire ol { list-style: none; padding: 0; margin: 0; border-left: 2px dashed var(--trait); }
.sommaire li { margin: 0; }
.sommaire a { display: block; padding: 0.3rem 0 0.3rem 0.9rem; color: var(--encre); text-decoration: none; }
.sommaire a:hover { color: var(--fil); }

/* Tableaux */
.tableau-defile { overflow-x: auto; margin: 0 0 1.2rem; }
table { border-collapse: collapse; width: 100%; font-family: var(--sans); font-size: 0.95rem; line-height: 1.4; }
caption { text-align: left; font-family: var(--serif); font-size: 1.15rem; font-weight: 600; padding-bottom: 0.6rem; }
th, td { text-align: left; vertical-align: top; padding: 0.6rem 0.8rem; border-bottom: 1px solid var(--trait); }
thead th { border-bottom: 2px solid var(--encre); font-weight: 650; }
tbody th { font-weight: 500; color: var(--encre-2); }
td.chiffre { font-weight: 650; }

/* Encadrés */
.encadre { border-left: 3px solid var(--fil); background: var(--papier-2); padding: 1rem 1.2rem; margin: 1.4rem 0; border-radius: 0 6px 6px 0; }
.encadre > :last-child { margin-bottom: 0; }

/* Synthèse chiffrée */
.chiffres { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fit, minmax(min(100%, 10rem), 1fr)); margin: 1.4rem 0; padding: 0; list-style: none; }
.chiffres li { margin: 0; border-top: 2px dashed var(--fil); padding-top: 0.6rem; }
.chiffres strong { display: block; font-family: var(--sans); font-size: 2.3rem; line-height: 1; font-weight: 600; letter-spacing: -0.01em; }
.chiffres span { display: block; margin-top: 0.3rem; font-family: var(--sans); font-size: 0.9rem; line-height: 1.35; color: var(--encre-2); }

/* Partenaires handicap */
.partenaire { border-top: 2px dashed var(--fil); padding-top: 0.4rem; }
.partenaire h3 { margin-top: 0.4em; font-size: 1.25rem; }
.partenaire .coordonnees { font-family: var(--sans); font-size: 0.92rem; line-height: 1.5; }

/* Graphiques de résultats : jauges et pictogrammes, sans script.
   Valeurs toujours écrites en clair à côté du dessin. */
.mesures { max-width: 28rem; }
.mesures + p { margin-top: 1.2rem; }
.mesure { margin: 1rem 0 0; font-family: var(--sans); }
.mesure-tete { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; margin: 0 0 0.45rem; font-family: var(--sans); font-size: 0.92rem; line-height: 1.35; }
.mesure-libelle { color: var(--encre-2); }
.mesure-valeur { font-weight: 650; color: var(--encre); white-space: nowrap; }
.mesure-seule { margin-top: 1rem; }
.jauge { height: 8px; border-radius: 4px; background: var(--fil-pale); overflow: hidden; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
.jauge > span { display: block; height: 100%; border-radius: 4px; background: var(--fil); }
.unites { display: flex; flex-wrap: wrap; gap: 6px; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
.unites svg { width: 28px; height: 28px; }
.chiffres .unites.groupes { display: flex; flex-wrap: nowrap; margin-top: 0.6rem; gap: 12px; }   /* l'emporte sur « .chiffres span » */
.chiffres .unites.groupes .groupe { margin-top: 0; }
.unites.groupes .groupe { display: inline-flex; gap: 4px; }
.unites.groupes .groupe + .groupe { padding-left: 14px; border-left: 1px solid var(--trait); }
.unites.groupes svg { width: 22px; height: 22px; }
.unites .plein { fill: var(--fil); }
.unites .vide { fill: none; stroke: var(--encre-2); stroke-width: 1.5; }
@media (forced-colors: active) {
  .jauge { border: 1px solid CanvasText; }
  .jauge > span { background: CanvasText; }
  .unites .plein { fill: CanvasText; }
}

/* Frise de séance (F01) : barre au prorata des durées + légende alignée */
.frise { margin: 1.2rem 0 1.8rem; font-family: var(--sans); }
.frise figcaption { font-family: var(--serif); font-size: 1.15rem; font-weight: 600; margin-bottom: 0.7rem; }
.frise-barre, .frise-legende { display: grid; grid-template-columns: var(--colonnes); column-gap: 2px; }
.frise-barre { height: 2.2rem; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
.frise-barre .segment { display: flex; align-items: center; justify-content: center; background: var(--fil); color: #fff; font-weight: 650; font-size: 0.95rem; }
.frise-barre .segment:first-child { border-radius: 4px 0 0 4px; }
.frise-barre .segment:last-child { border-radius: 0 4px 4px 0; }
.frise-echelle { display: flex; justify-content: space-between; font-size: 0.8rem; color: var(--encre-2); margin: 0.3rem 0 0.6rem; }
.frise-legende { list-style: none; padding: 0; margin: 0; }
.frise-legende li { margin: 0; padding: 0.5rem 0.7rem 0 0; border-top: 1px solid var(--trait); display: flex; flex-direction: column; gap: 0.1rem; font-size: 0.85rem; line-height: 1.35; }
.frise-legende .numero { display: none; }
.frise-legende strong { font-weight: 650; }
.frise-legende span { color: var(--encre-2); }
.frise-legende .duree { color: var(--encre); font-weight: 600; }

/* Planning des quatre jours (F02) */
.planning { border-collapse: separate; border-spacing: 6px; width: calc(100% + 12px); margin: 0.4rem -6px 1.8rem; font-family: var(--sans); }
.planning caption { font-family: var(--serif); font-size: 1.15rem; font-weight: 600; text-align: left; padding: 0 6px 0.3rem; }
.planning th, .planning td { border: 0; }
.planning thead th { font-size: 0.85rem; font-weight: 650; color: var(--encre); padding: 0 0.75rem 0.1rem; vertical-align: bottom; }
.planning thead th span { display: block; font-weight: 400; color: var(--encre-2); }
.planning tbody th { width: 32%; padding: 0.65rem 0.6rem 0.65rem 0; vertical-align: top; color: var(--encre); }
.planning tbody th a { font-size: 0.95rem; font-weight: 700; text-decoration: none; }
.planning tbody th span { display: block; margin-top: 0.15rem; font-size: 0.82rem; font-weight: 400; color: var(--encre-2); }
.planning tbody td { background: var(--papier-2); border-left: 3px solid var(--fil); border-radius: 0 4px 4px 0; padding: 0.65rem 0.75rem; font-size: 0.92rem; font-weight: 600; vertical-align: middle; -webkit-print-color-adjust: exact; print-color-adjust: exact; }

/* Parcours d'inscription : étapes reliées, délai d'accès en accolade */
.parcours { margin: 1.4rem 0 1.6rem; font-family: var(--sans); }
.parcours-delai { position: relative; margin: 0 calc(100% / 12) 1rem; padding-bottom: 0.45rem; border-bottom: 2px solid var(--fil); text-align: center; font-size: 0.92rem; color: var(--encre-2); }
.parcours-delai strong { color: var(--encre); }
.parcours-delai::before, .parcours-delai::after { content: ""; position: absolute; bottom: -6px; width: 2px; height: 10px; background: var(--fil); }
.parcours-delai::before { left: 0; }
.parcours-delai::after { right: 0; }
.etapes { position: relative; list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 0 0.5rem; }
.etapes::before { content: ""; position: absolute; top: 0.85rem; left: calc(100% / 12); right: calc(100% / 12); border-top: 2px solid var(--fil-pale); }
.etapes li { position: relative; margin: 0; display: flex; flex-direction: column; align-items: center; gap: 0.15rem; text-align: center; font-size: 0.82rem; line-height: 1.35; }
.etapes .numero, .frise-legende .numero { flex: none; width: 1.7rem; height: 1.7rem; border-radius: 50%; background: var(--fil); color: #fff; align-items: center; justify-content: center; font-weight: 700; font-size: 0.85rem; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
.etapes .numero { display: flex; position: relative; z-index: 1; margin-bottom: 0.35rem; box-shadow: 0 0 0 4px var(--papier); }
.etapes strong { font-weight: 650; }
.etapes span:not(.numero) { color: var(--encre-2); }

@media (max-width: 40rem) {
  .frise-legende { display: block; }
  .frise-legende li { display: grid; grid-template-columns: 1.7rem 1fr auto; grid-template-areas: "n t d" "n c d"; column-gap: 0.7rem; padding: 0.55rem 0; }
  .frise-legende .numero { display: flex; grid-area: n; }
  .frise-legende strong { grid-area: t; }
  .frise-legende span:not(.numero):not(.duree) { grid-area: c; }
  .frise-legende .duree { grid-area: d; align-self: center; }
  .planning { border-spacing: 4px; width: calc(100% + 8px); margin-left: -4px; margin-right: -4px; }
  .planning tbody th { width: 3.6rem; }
  .planning thead th { padding: 0 0.5rem 0.1rem; }
  .planning tbody th span { display: none; }
  .planning td { font-size: 0.88rem; padding: 0.6rem; }
  .parcours-delai { margin: 0 0 1rem; padding: 0.2rem 0 0.2rem 0.75rem; border-bottom: 0; border-left: 3px solid var(--fil); text-align: left; }
  .parcours-delai::before, .parcours-delai::after { display: none; }
  .etapes { grid-template-columns: 1fr; gap: 0.75rem; }
  .etapes::before { top: 0.85rem; bottom: 0.85rem; left: calc(0.85rem - 1px); right: auto; border-top: 0; border-left: 2px solid var(--fil-pale); }
  .etapes li { display: grid; grid-template-columns: 1.7rem 1fr; column-gap: 0.8rem; align-items: start; text-align: left; }
  .etapes .numero { grid-row: 1 / span 2; margin: 0; }
}

/* Documents à télécharger */
.documents { list-style: none; padding: 0; }
.documents li { margin: 0 0 0.6rem; font-family: var(--sans); font-size: 0.98rem; }
.documents a { font-weight: 600; }
.documents .poids { color: var(--encre-2); font-weight: 400; }

/* Programme jour par jour */
.jour { border-top: 1px solid var(--trait); padding-top: 0.4rem; }

/* Texte juridique (CGV, mentions) */
.juridique h2 { font-size: 1.45rem; margin-top: 1.8em; }
.juridique h2::after { width: 2.5rem; }

/* Valeur manquante : volontairement voyante tant qu'elle n'est pas fournie */
mark.a-completer { background: var(--surligne); color: var(--encre); font-family: var(--sans); font-size: 0.85em; font-weight: 700; padding: 0.05em 0.35em; border-radius: 3px; }

/* Pied de page */
.pied { border-top: 1px solid var(--trait); background: var(--papier-2); font-family: var(--sans); font-size: 0.9rem; line-height: 1.5; color: var(--encre-2); padding: 2.6rem 0 2rem; }
.pied .grille { gap: 2rem; grid-template-columns: repeat(auto-fit, minmax(min(100%, 15rem), 1fr)); }
.pied h2 { font-family: var(--sans); font-size: 0.82rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--encre); margin: 0 0 0.7rem; }
.pied h2::after { display: none; }
.pied p { margin: 0 0 0.6rem; }
.pied ul { list-style: none; padding: 0; margin: 0; }
.pied li { margin: 0 0 0.35rem; }
.pied a { color: var(--encre); }
.pied a:hover { color: var(--fil); }
.qualiopi { background: #fff; padding: 1rem; border-radius: 6px; }
.qualiopi img { width: 210px; margin: 0 0 0.6rem; }   /* logo sur fond blanc, zone de protection préservée */
.qualiopi p { color: var(--encre); font-size: 0.85rem; margin: 0; }
.pied .bas { border-top: 1px solid var(--trait); margin-top: 2rem; padding-top: 1.2rem; font-size: 0.85rem; }

/* En-tête réservé à l'impression (programmes PDF) */
.impression-seule { display: none; }

@media (max-width: 40rem) {
  body { font-size: 1.18rem; }
  .entete .conteneur { flex-direction: column; align-items: flex-start; }
  .marque img { width: 130px; }
  .navigation ul { gap: 0.1rem 1.1rem; }
  .faits { grid-template-columns: 1fr; gap: 0.1rem; }
  .faits dd { margin-bottom: 0.5rem; }
  th, td { padding: 0.5rem 0.55rem; }
  .unites.groupes svg { width: 18px; height: 18px; }
  .unites.groupes .groupe { gap: 3px; }
  .unites.groupes .groupe + .groupe { padding-left: 12px; }
  .sommaire ol { display: flex; flex-wrap: wrap; gap: 0.3rem 0.4rem; border-left: 0; }
  .sommaire a { padding: 0.25rem 0.6rem; border: 1px dashed var(--trait); border-radius: 999px; font-size: 0.85rem; }
  .navigation ul { font-size: 0.92rem; }
}

@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}

/* Impression : le programme PDF est l'impression de la page formation */
@media print {
  @page { size: A4; margin: 16mm 15mm 16mm; }
  body { font-size: 10.5pt; line-height: 1.45; background: #fff; }
  .entete, .sommaire, .ariane, .boutons, .pied .liens, .pied .bas, .ecran-seul, .evitement, .photo, .bandeau { display: none !important; }
  .impression-seule { display: block; }
  .page-formation { display: block; }
  main { padding-bottom: 0; }
  h1 { font-size: 22pt; }
  h2 { font-size: 15pt; margin-top: 1.3em; break-after: avoid; }
  h3 { font-size: 12.5pt; break-after: avoid; }
  h2::after { margin-top: 0.3em; }
  .titre-page { padding-top: 0.4rem; }
  .titre-page .chapo { font-size: 12.5pt; }
  .fiche, .encadre, .carte { break-inside: avoid; }
  li, tr { break-inside: avoid; }
  a { color: var(--encre); text-decoration: none; }
  .pied { background: #fff; padding: 1rem 0 0; margin-top: 1.5rem; font-size: 8.5pt; break-inside: avoid; }
  .pied .grille { display: block; }
  .pied .grille > * { margin-bottom: 0.6rem; }
  .qualiopi { padding: 0; }
  .qualiopi img { width: 45mm; }
  .entete-impression { display: flex; justify-content: space-between; align-items: flex-end; border-bottom: 1px solid var(--trait); padding-bottom: 4mm; margin-bottom: 2mm; font-family: var(--sans); font-size: 9pt; color: var(--encre-2); }
  .entete-impression img { width: 38mm; }
  .mesure-tete { font-size: 9pt; margin-bottom: 1.5mm; }
  .mesure { margin-top: 3mm; }
  .unites svg { width: 5mm; height: 5mm; }
  .jauge { height: 2mm; }
  .mesures { max-width: 95mm; break-inside: avoid; }
  .frise, .planning, .parcours { break-inside: avoid; }
  .frise figcaption, .planning caption { font-size: 12pt; }
  .etapes li, .frise-legende li, .planning { font-size: 8.5pt; }
}
.qualiopi-lien { display: inline-block; }
.qualiopi-lien:hover img, .qualiopi-lien:focus-visible img { opacity: 0.85; }
