/* Page Formations : offre, programme, infos pratiques, formulaire de demande.
   Chargée uniquement par /formations/ (même logique que home.css). */

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

/* Ghost-type de l'en-tête de page. Le gabarit global (style.css) est calibré
   sur des mots courts ("Auteur", 6 lettres) : "Formations" en fait 10 et déborde
   horizontalement du viewport à 30vw. On réduit le clamp pour cette page, et on
   passe le chevauchement en `em` pour qu'il suive la taille de police au lieu
   d'être figé en rem. */
main > p.eyebrow {
  font-size: clamp(4rem, 22vw, 18rem);
  margin-bottom: -0.21em;
}

/* Eyebrow de section (le .eyebrow global est détourné en ghost-type géant
   pour les en-têtes de page secondaire, cf. style.css). */
.kicker {
  font-size: 0.8rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 0.75rem;
}

/* Variante de bouton secondaire : même gabarit, contour atténué. */
.btn--ghost {
  border-color: #333;
  color: var(--muted);
}

.btn--ghost:hover {
  border-color: var(--fg);
  background: var(--fg);
  color: var(--bg);
}

/* Méthode : 3 piliers */
.feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 2rem;
}

.feature__kicker {
  font-size: 0.7rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 0.5rem;
}

.feature h3 {
  font-size: 1.5rem;
  margin-bottom: 0.75rem;
}

.feature p {
  color: var(--muted);
}

/* Bandeau promo */
.promo {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 2.5rem;
  color: var(--muted);
  font-size: 0.95rem;
}

.promo__tag {
  display: inline-block;
  padding: 0.3rem 0.8rem;
  border: 1px solid var(--fg);
  border-radius: 999px;
  font-size: 0.7rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--fg);
}

/* Formules */
.plans__title {
  font-size: 1.6rem;
  margin-bottom: 1.25rem;
}

.plans__title--spaced { margin-top: 4rem; }

.plans__intro {
  max-width: 68ch;
  margin-bottom: 1.75rem;
  color: var(--muted);
  font-size: 0.95rem;
}

.plans {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
}

@media (min-width: 760px) {
  .plans--duo { grid-template-columns: repeat(2, 1fr); }
}

@media (min-width: 880px) {
  .plans { grid-template-columns: repeat(3, 1fr); }
  .plans--duo { grid-template-columns: repeat(2, 1fr); }
}

.plan {
  display: flex;
  flex-direction: column;
  padding: 2rem;
  border: 1px solid #222;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.015);
}

.plan--featured {
  border-color: var(--fg);
  background: rgba(255, 255, 255, 0.04);
}

.plan__label {
  font-size: 0.75rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 1.25rem;
}

/* Tarif habituel, barré au-dessus du tarif promotionnel */
.plan__was {
  margin-bottom: 0.35rem;
  font-size: 0.95rem;
  color: var(--muted);
}

.plan__price {
  font-family: var(--font-display);
  font-size: clamp(2.6rem, 6vw, 3.4rem);
  line-height: 1;
  letter-spacing: 0.01em;
}

.plan__price span {
  font-family: var(--font-body);
  font-size: 0.9rem;
  letter-spacing: 0.06em;
  color: var(--muted);
}

.plan__meta {
  margin-top: 0.5rem;
  font-size: 0.9rem;
  color: var(--muted);
}

.plan__list {
  list-style: none;
  margin: 1.75rem 0 2rem;
  display: grid;
  gap: 0.75rem;
  font-size: 0.95rem;
}

.plan__list li {
  position: relative;
  padding-left: 1.25rem;
  color: var(--muted);
}

.plan__list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.55em;
  width: 6px;
  height: 1px;
  background: var(--fg);
}

.plan__list strong { color: var(--fg); }

.plan .btn {
  margin-top: auto;
  align-self: flex-start;
}

.note {
  margin-top: 2rem;
  font-size: 0.9rem;
  color: var(--muted);
  max-width: 62ch;
}

/* Programme */
.modules {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2.5rem 2rem;
}

.module__num {
  font-family: var(--font-display);
  font-size: 1.6rem;
  color: transparent;
  -webkit-text-stroke: 1px rgba(245, 245, 245, 0.45);
  display: block;
  margin-bottom: 0.5rem;
}

.module h3 {
  font-size: 1.25rem;
  margin-bottom: 0.5rem;
}

.module p { color: var(--muted); font-size: 0.95rem; }

/* Infos pratiques */
.facts {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 2rem;
}

.facts dt {
  font-size: 0.75rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--fg);
  margin-bottom: 0.5rem;
}

.facts dd { color: var(--muted); font-size: 0.95rem; }

/* Formulaire */
.form {
  display: grid;
  gap: 1.5rem;
  max-width: 780px;
}

.form__row {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
}

@media (min-width: 720px) {
  .form__row { grid-template-columns: 1fr 1fr; }
}

.field {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  border: 0;
  padding: 0;
  margin: 0;
  min-width: 0;
}

.field > label,
.field > legend {
  font-size: 0.75rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  padding: 0;
}

.field__hint {
  font-size: 0.8rem;
  color: #6a6a6a;
  order: 3;
}

.field input,
.field select,
.field textarea {
  width: 100%;
  padding: 0.85rem 1rem;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid #2a2a2a;
  border-radius: 6px;
  color: var(--fg);
  font-family: var(--font-body);
  font-size: 0.95rem;
  transition: border-color 0.2s, background 0.2s;
}

.field textarea { resize: vertical; }

.field select {
  appearance: none;
  background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%),
                    linear-gradient(135deg, var(--muted) 50%, transparent 50%);
  background-position: calc(100% - 18px) calc(50% + 2px), calc(100% - 13px) calc(50% + 2px);
  background-size: 5px 5px, 5px 5px;
  background-repeat: no-repeat;
  padding-right: 2.5rem;
}

.field select option { background: #141414; color: var(--fg); }

.field input:focus,
.field select:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--fg);
  background: rgba(255, 255, 255, 0.06);
}

.field input[aria-invalid="true"],
.field select[aria-invalid="true"] { border-color: #c0392b; }

.field--check {
  flex-direction: row;
  align-items: flex-start;
  gap: 0.75rem;
}

.field--check input {
  width: 18px;
  height: 18px;
  flex: 0 0 18px;
  margin-top: 0.15rem;
  accent-color: var(--fg);
  padding: 0;
}

.field--check label {
  font-size: 0.95rem;
  text-transform: none;
  letter-spacing: 0;
  color: var(--muted);
  line-height: 1.5;
}

.form__actions { margin-top: 0.5rem; }

.form__fallback,
.form__status {
  font-size: 0.85rem;
  color: var(--muted);
}

.form__fallback a { text-decoration: underline; text-underline-offset: 3px; }

.form__status.is-error { color: #e07a6c; }

/* Service annexe : commande de matériel */
.aside-card {
  border: 1px solid #222;
  border-radius: 10px;
  padding: clamp(1.75rem, 4vw, 3rem);
  background: rgba(255, 255, 255, 0.015);
}

.aside-card__list {
  list-style: none;
  margin-top: 1.5rem;
  display: grid;
  gap: 0.6rem;
  font-size: 0.95rem;
  color: var(--muted);
  max-width: 62ch;
}

.aside-card__list strong { color: var(--fg); }

/* FAQ */
.faq {
  display: grid;
  gap: 0;
  max-width: 780px;
}

.faq details {
  border-top: 1px solid #222;
  padding-block: 1.25rem;
}

.faq details:last-child { border-bottom: 1px solid #222; }

.faq summary {
  cursor: pointer;
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  font-size: 1.05rem;
}

.faq summary::-webkit-details-marker { display: none; }

.faq summary::after {
  content: "+";
  color: var(--muted);
  font-size: 1.3rem;
  line-height: 1;
  flex: 0 0 auto;
}

.faq details[open] summary::after { content: "−"; }

.faq details p {
  margin-top: 1rem;
  color: var(--muted);
  max-width: 68ch;
}
