/* Fiche formation publique : mise en page (livraison 72).
   Chargée après public.css, uniquement sur fiche.php. Reprend les variables de public.css
   (--navy, --bleu, --orange, --bleu-pale, --orange-pale, --filet, --ombre).
   Règles de contraste de la charte : texte en navy sur blanc (11,8), bleu pâle (10,6) ou orange pâle (10,6) ;
   le bleu clair et l'orange ne servent qu'en filets et décors, jamais en texte. */

/* Titre et résumé : longueur de ligne maîtrisée */
.fiche h1 { max-width: 48rem; margin: 0 0 1.25rem; line-height: 1.2; }
.fiche .fiche-resume { max-width: 46rem; margin: 0 0 1.25rem; }
.fiche .fiche-resume p:last-child { margin-bottom: 0; }

/* Bandeau « En bref » : un titre pour les lecteurs d'écran, quatre tuiles au plus */
.fiche section.en-bref { margin: 0 0 1.25rem; padding: 1rem; border: 0; background: var(--bleu-pale); border-radius: 20px; }
.fiche .en-bref h2 { position: absolute; width: 1px; height: 1px; margin: 0; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.fiche .en-bref h2::before { display: none; }
.fiche .en-bref dl { display: flex; flex-wrap: wrap; gap: .85rem; margin: 0; }
.fiche .en-bref dl > div { flex: 1 1 11rem; max-width: 24rem; min-width: 0; padding: .8rem 1.1rem; background: #fff; border: 1px solid var(--filet); border-radius: 14px; }
.fiche .en-bref dt { font-size: .875rem; font-weight: 700; letter-spacing: .02em; }
.fiche .en-bref dd { margin: 0; font-size: 1.2rem; font-weight: 700; line-height: 1.3; }

/* Encadré du programme et bouton de la fiche PDF */
.fiche section.documents {
  display: flex; flex-wrap: wrap; align-items: center; gap: .9rem 1.5rem;
  margin: 0 0 2.5rem; padding: 1.1rem 1.5rem; border: 2px solid var(--navy); border-radius: 16px;
}
.fiche .documents-texte { flex: 1 1 16rem; min-width: 0; }
.fiche .documents h2 { margin: 0; padding: 0; font-size: 1.25rem; line-height: 1.3; }
.fiche .documents h2::before { display: none; }
.fiche .documents p { margin: 0; font-size: .9375rem; }
.fiche .documents .bouton { flex: 0 0 auto; }
.fiche .documents-seul { margin: 0 0 2.5rem; }

/* Rubriques : plus d'air, titre au-dessus du texte */
.fiche section.rubrique { margin: 2.5rem 0 0; padding: 0; border-top: 0; }
.fiche section.rubrique > h2 { margin: 0 0 1rem; font-size: 1.5rem; }
.fiche section.rubrique-pleine > :not(h2):not(.liste-num):not(.liste-sessions):not(.resultats) { max-width: 46rem; }
.fiche section.rubrique > :last-child { margin-bottom: 0; }

/* Rubriques courtes en cartes */
.fiche .grille-rubriques { display: grid; gap: 1.25rem; grid-template-columns: minmax(0, 1fr); margin-top: 2.5rem; }
.fiche section.rubrique-carte {
  margin: 0; padding: 1.25rem 1.4rem; background: #fff;
  border: 1px solid var(--filet); border-radius: 16px; box-shadow: var(--ombre);
}
.fiche section.rubrique-carte > h2 { margin: 0 0 .75rem; font-size: 1.3rem; }
.fiche section.rubrique-carte h3 { margin: 1rem 0 .25rem; font-size: 1.05rem; }
.fiche section.rubrique-carte h3:first-of-type { margin-top: 0; }

/* Listes saisies en lignes numérotées ou à tirets (texte_html) */
.fiche .liste-num, .fiche .liste-puces { margin: 0 0 1rem; padding-left: 1.4rem; }
.fiche .liste-num li, .fiche .liste-puces li { margin: 0 0 .35rem; padding-left: .25rem; }

/* Objectifs : une carte par objectif */
.fiche .rubrique-objectifs .liste-num {
  list-style: none; margin: 0; padding: 0; counter-reset: obj;
  display: grid; gap: .9rem; grid-template-columns: minmax(0, 1fr);
}
.fiche .rubrique-objectifs .liste-num li {
  counter-increment: obj; display: flex; align-items: flex-start; gap: .75rem; margin: 0; padding: .9rem 1rem;
  background: #fff; border: 1px solid var(--filet); border-top: 4px solid var(--bleu); border-radius: 12px;
  font-size: 1rem; line-height: 1.55;
}
.fiche .rubrique-objectifs .liste-num li::before {
  content: counter(obj); flex: none; min-width: 1.4rem; font-size: 1.4rem; font-weight: 700; line-height: 1.1;
}

@media (min-width: 40rem) {
  .fiche h1 { font-size: 2.3rem; }
  .fiche .rubrique-objectifs .liste-num { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (min-width: 48rem) {
  .fiche .grille-rubriques { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 30rem) {
  .fiche .documents .bouton { flex: 1 1 100%; text-align: center; }
}
