/* ============================================================
   Formation IA — site.css
   Compléments au mockup (eokin.css) : sélecteur de langue,
   icônes sociales, formulaire de contact, messages flash, 404.
   S'appuie sur les variables du thème dark-violet (formation.css).
   ============================================================ */

/* --- Lien d'évitement (accessibilité) --- */
.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 1000;
  background: var(--primary);
  color: #06201F;
  padding: 0.7rem 1.1rem;
  border-radius: 0 0 10px 0;
  font-family: var(--font-ui);
  font-weight: 700;
  text-decoration: none;
}
.skip-link:focus {
  left: 0;
}

/* --- Sélecteur de langue (header) --- */
.lang-switch {
  font-family: var(--font-ui);
  font-weight: 700;
  font-size: 0.82rem;
  letter-spacing: 0.04em;
  color: var(--text-secondary);
  text-decoration: none;
  border: 1px solid var(--border-strong);
  border-radius: 999px;
  padding: 0.42rem 0.7rem;
  line-height: 1;
  transition: color 0.2s var(--ease), border-color 0.2s var(--ease), background 0.2s var(--ease);
}
.lang-switch:hover {
  color: var(--text-primary);
  border-color: var(--primary);
  background: var(--primary-soft);
}
.lang-switch--mobile {
  display: inline-block;
  margin-top: var(--space-sm);
  text-align: center;
}

/* --- Icônes sociales (footer) --- */
.site-footer__social {
  display: flex;
  gap: 0.6rem;
  margin-top: var(--space-md);
  flex-wrap: wrap;
}
.site-footer__social-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1px solid var(--border-strong);
  color: var(--text-secondary);
  transition: color 0.2s var(--ease), border-color 0.2s var(--ease), background 0.2s var(--ease), transform 0.2s var(--ease);
}
.site-footer__social-link:hover {
  color: var(--primary);
  border-color: var(--primary);
  background: var(--primary-soft);
  transform: translateY(-2px);
}
.site-footer__social-link svg {
  display: block;
}

/* --- Messages flash --- */
.flash {
  border-radius: 12px;
  padding: 0.9rem 1.1rem;
  margin-bottom: var(--space-md);
  font-family: var(--font-ui);
  font-size: 0.95rem;
  border: 1px solid transparent;
}
.flash--success {
  background: var(--primary-soft);
  border-color: var(--primary);
  color: var(--text-primary);
}
.flash--error {
  background: var(--secondary-soft);
  border-color: var(--secondary);
  color: var(--text-primary);
}

/* --- Section Contact --- */
.contact-section {
  position: relative;
  overflow: hidden;
}
.contact-form {
  max-width: 720px;
  margin: var(--space-lg) auto 0;
  text-align: left;
}
.contact-form__row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-md);
}
.contact-form .field {
  margin-bottom: var(--space-md);
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}
.contact-form label {
  font-family: var(--font-ui);
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--text-secondary);
}
.contact-form .req {
  color: var(--secondary);
}
.contact-form input,
.contact-form textarea {
  font-family: var(--font-body);
  font-size: 1rem;
  color: var(--text-primary);
  background: var(--bg-soft);
  border: 1px solid var(--border-fine);
  border-radius: 10px;
  padding: 0.8rem 0.9rem;
  width: 100%;
  transition: border-color 0.2s var(--ease), box-shadow 0.2s var(--ease);
}
.contact-form input::placeholder,
.contact-form textarea::placeholder {
  color: var(--text-muted);
}
.contact-form input:focus,
.contact-form textarea:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-soft);
}
.contact-form .field.is-error input,
.contact-form .field.is-error textarea {
  border-color: var(--secondary);
  box-shadow: 0 0 0 3px var(--secondary-soft);
}
.contact-form__hint {
  font-family: var(--font-ui);
  font-size: 0.85rem;
  color: var(--text-muted);
  margin: 0 0 var(--space-sm);
}
.contact-form__hint--error {
  color: var(--secondary);
}
.contact-form__actions {
  margin-top: var(--space-sm);
}

/* --- 404 --- */
.error-section {
  position: relative;
  overflow: hidden;
  text-align: center;
}
.error-section__actions {
  margin-top: var(--space-lg);
}

/* --- Responsive --- */
@media (max-width: 640px) {
  .contact-form__row {
    grid-template-columns: 1fr;
    gap: 0;
  }
}

/* ============================================================
   Schémas « galaxy » — TOUTES les cartes/nodes (écosystème + pastilles
   de mots). Fond BLANC (texte foncé, bien voyant) puis survol ORANGE
   plein avec texte blanc, comme les autres éléments oranges du site.
   IMPORTANT : on ne touche PAS au `transform` (positionnement +
   animation « floaty » des cartes).
   Override de eokin.css (chargé avant) : on ne modifie pas le mockup.
   ============================================================ */
.galaxy__planet {
  background: #ffffff;
  border-color: transparent;
  box-shadow: 0 12px 28px -14px rgba(0, 0, 0, 0.6);
  transition: background 0.3s var(--ease), border-color 0.3s var(--ease),
              box-shadow 0.3s var(--ease), color 0.3s var(--ease);
}
.galaxy__planet h3,
.galaxy--words .galaxy__planet h3 { color: #142029; }
.galaxy__planet p { color: #46535f; }

.galaxy__planet:hover,
.galaxy__planet:focus-visible {
  background: var(--secondary);
  border-color: var(--secondary);
  box-shadow: 0 20px 40px -16px rgba(232, 112, 62, 0.7);
}
.galaxy__planet:hover h3,
.galaxy__planet:hover p,
.galaxy--words .galaxy__planet:hover h3,
.galaxy__planet:focus-visible h3,
.galaxy__planet:focus-visible p { color: #ffffff; }

/* ============================================================
   Module Newsletter (page d'accueil)
   ============================================================ */
.nl-section {
  position: relative;
  overflow: hidden;
  padding: clamp(3rem, 7vw, var(--space-xl)) 0;
  text-align: center;
  background: var(--bg-soft);
  border-top: 1px solid var(--border-fine);
}
.nl-halo { top: -40%; left: 50%; transform: translateX(-50%); opacity: 0.5; pointer-events: none; }
.nl-inner { position: relative; z-index: 1; }
.nl-title { margin-top: var(--space-sm); }
.nl-text { margin: var(--space-sm) auto var(--space-md); max-width: 560px; }

.nl-form { max-width: 540px; margin: 0 auto; }
.nl-row { display: flex; gap: 0.6rem; align-items: stretch; }
.nl-input {
  flex: 1;
  min-width: 0;
  padding: 0.9rem 1.1rem;
  border-radius: 14px;
  background: var(--bg-primary);
  border: 1px solid var(--border-strong);
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: 1rem;
  transition: border-color 0.2s var(--ease), box-shadow 0.2s var(--ease);
}
.nl-input::placeholder { color: var(--text-secondary); opacity: 0.9; }
.nl-input:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-soft); }
.nl-btn { white-space: nowrap; }
.nl-btn.is-loading { opacity: 0.7; cursor: progress; }

.nl-msg { min-height: 1.25em; margin: var(--space-sm) 0 0; font-family: var(--font-ui); font-size: 0.92rem; }
.nl-msg.is-ok { color: var(--primary); }
.nl-msg.is-error { color: var(--secondary); }
.nl-privacy { margin: 0.5rem 0 0; font-family: var(--font-ui); font-size: 0.8rem; color: var(--text-secondary); opacity: 0.85; }

@media (max-width: 520px) {
  .nl-row { flex-direction: column; }
  .nl-btn { width: 100%; }
}

/* Case de consentement RGPD (newsletter) */
.nl-consent {
  display: flex;
  gap: 0.55rem;
  align-items: flex-start;
  text-align: left;
  max-width: 540px;
  margin: 0.9rem auto 0;
  font-family: var(--font-ui);
  font-size: 0.85rem;
  line-height: 1.45;
  color: var(--text-secondary);
  cursor: pointer;
}
.nl-consent input {
  flex: 0 0 auto;
  width: 1.05rem;
  height: 1.05rem;
  margin-top: 0.15rem;
  accent-color: var(--primary);
  cursor: pointer;
}

/* ============================================================
   Chiffres des étapes (.step__num) plus visibles
   (étaient en --accent-blue très sombre). Override du custom_css
   de page (chargé après site.css) -> !important nécessaire.
   ============================================================ */
.step__num {
  color: var(--primary) !important;
  opacity: 0.85 !important;
}

/* ============================================================
   Survols des cartes de contenu (cohérents avec le site)
   - Compare : orange (« ce que ce n'est pas ») / vert (« ce que c'est »)
   - Autres cartes : orange
   Ce sont de NOUVEAUX :hover (le custom_css n'en définit pas) :
   la spécificité du :hover suffit, pas besoin de !important.
   ============================================================ */
.duo__col,
.transform__col,
.deliverable,
.tflow__panel {
  transition: border-color 0.25s var(--ease), box-shadow 0.25s var(--ease),
              background 0.25s var(--ease), transform 0.25s var(--ease);
}

/* Compare : « Ce que ce n'est pas » -> orange */
.duo__col--no:hover {
  border-color: var(--secondary);
  box-shadow: 0 16px 34px -18px rgba(232, 112, 62, 0.6), 0 0 0 1px var(--secondary-soft);
  transform: translateY(-3px);
}
/* Compare : « Ce que c'est » -> vert/turquoise */
.duo__col--yes:hover {
  border-color: var(--primary);
  box-shadow: 0 16px 34px -18px rgba(31, 182, 178, 0.6), 0 0 0 1px var(--primary-soft);
  transform: translateY(-3px);
}

/* Autres cartes -> orange */
.transform__col:hover,
.deliverable:hover,
.tflow__panel--out:hover {
  border-color: var(--secondary);
  box-shadow: 0 16px 34px -18px rgba(232, 112, 62, 0.6), 0 0 0 1px var(--secondary-soft);
  transform: translateY(-3px);
}
/* Panneau « positif » du flux -> vert/turquoise (cohérent avec sa couleur) */
.tflow__panel--in:hover {
  border-color: var(--primary);
  box-shadow: 0 16px 34px -18px rgba(31, 182, 178, 0.6), 0 0 0 1px var(--primary-soft);
  transform: translateY(-3px);
}

/* ============================================================
   Pages légales (mentions légales, confidentialité, CGV)
   ============================================================ */
.legal-prose { margin-top: var(--space-lg); color: var(--text-secondary); }
.legal-prose h2 {
  font-family: var(--font-title, var(--font-ui));
  color: var(--text-primary);
  font-size: 1.3rem;
  margin: var(--space-lg) 0 var(--space-sm);
}
.legal-prose p { margin: 0 0 1rem; line-height: 1.75; }
.legal-prose ul { margin: 0 0 1rem 1.1rem; line-height: 1.75; }
.legal-prose a { color: var(--primary); }
.legal-prose strong { color: var(--text-primary); }

/* ============================================================
   PERFORMANCE AU SCROLL
   Allègement d'effets coûteux de eokin.css, sans changer le rendu.
   (site.css est chargé après eokin.css : ces règles priment.)
   ============================================================ */

/* 1) Halos — on N'ANIME PLUS le rayon de flou (blur 80px ↔ 108px), qui force
   le navigateur à re-calculer un flou énorme à CHAQUE frame (cause n°1 de la
   latence). Le flou reste fixe ; seule l'opacité « respire » (composée par le
   GPU, sans repaint). Chaque halo est promu sur sa propre couche pour ne pas
   être redessiné pendant le défilement. */
.halo {
  animation: haloPulse 17s ease-in-out infinite;
  will-change: opacity;
}
@keyframes haloPulse {
  0%, 100% { opacity: 0.46; }
  50%      { opacity: 0.60; }
}

/* 2) Header « verre » — le backdrop-filter ré-échantillonne le fond à chaque
   frame de scroll. On réduit le rayon (20px → 8px) : aspect quasi identique,
   coût nettement moindre. */
.site-header {
  backdrop-filter: blur(8px) saturate(140%);
  -webkit-backdrop-filter: blur(8px) saturate(140%);
}

/* 3) Voile de grain plein écran — mix-blend-mode recompose tout le viewport au
   scroll. On le fige sur sa propre couche pour limiter les recompositions. */
body::after { will-change: transform; transform: translateZ(0); }

/* 4) Accessibilité — on respecte « animations réduites » (déjà géré par
   eokin.css, redéclaré ici car nos règles passent après). */
@media (prefers-reduced-motion: reduce) {
  .halo { animation: none; will-change: auto; }
}

/* --- Anti-spam : pot de miel (hors écran pour les humains, présent pour les bots) --- */
.hp-field {
  position: absolute !important;
  left: -9999px !important;
  top: auto !important;
  width: 1px; height: 1px;
  overflow: hidden;
  opacity: 0;
  pointer-events: none;
}

/* --- reCAPTCHA sur le formulaire de contact --- */
.contact-form__captcha { margin: var(--space-sm) 0 var(--space-md); }
.contact-form__captcha .g-recaptcha { transform-origin: 0 0; }
.contact-form__captcha.is-error { padding-left: .6rem; border-left: 3px solid var(--secondary, #E8703E); }
@media (max-width: 360px) { .contact-form__captcha .g-recaptcha { transform: scale(0.88); } }

/* ============================================================
   MODE MAINTENANCE
   ============================================================ */
.maintenance-body { min-height: 100vh; display: flex; }
.maintenance {
  position: relative;
  flex: 1;
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 2rem;
  overflow: hidden;
  background: var(--bg-primary, #131A22);
}
.maintenance__halo { top: -10%; left: 50%; width: 70vw; height: 70vw; transform: translateX(-50%); }
.maintenance__halo--2 { top: auto; bottom: -20%; left: 20%; }
.maintenance__inner {
  position: relative;
  z-index: 2;
  text-align: center;
  max-width: 620px;
}
.maintenance__logo { height: 64px; width: auto; margin-bottom: var(--space-lg); }
.maintenance__title {
  font-family: var(--font-display);
  font-size: clamp(2rem, 5vw, 3.2rem);
  margin: var(--space-sm) 0 var(--space-md);
  color: var(--text-primary);
}
.maintenance__text { font-size: 1.1rem; line-height: 1.7; color: var(--text-secondary); }
.maintenance__text p { margin: 0 0 .8rem; }
.maintenance__contact { margin-top: var(--space-lg); color: var(--text-secondary); }
.maintenance__contact a { color: var(--primary); }

/* Bandeau d'aperçu admin (au-dessus du header) */
.maint-banner {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  flex-wrap: wrap;
  padding: .5rem 1rem;
  background: #B45309;
  color: #fff;
  font-size: .85rem;
  text-align: center;
}
.maint-banner__link { color: #fff; text-decoration: underline; font-weight: 700; white-space: nowrap; }
