/* ==========================================================================
   Page « Formation IA pour TPE » (RS7311) — contenu de la page WordPress /formation-ia-tpe/
   Tout est borné à #fia : le thème Blocksy et le kit Elementor stylent le reste de la page.
   Poppins et Roboto sont chargées par le site.
   Source de la charte : design.md du projet (palette Blocksy, Poppins + Roboto).
   Le bleu d'accent #5c9ecf fait 2,9:1 sur blanc : décor seulement, jamais en texte.
   ========================================================================== */

#fia {
  color-scheme: light;
  --violet: #52328a;
  --violet-fonce: #3c2468;
  --nuit: #192a3d;
  --bleu: #5c9ecf;
  --bleu-clair: #b9d9f2;
  --magenta: #a3268f;
  --texte: #5e5076;
  --bord: #e1e8ed;
  --fond-alt: #f2f5f7;
  --blanc: #fff;
  --focus: var(--magenta);
  --rayon: 25px;
  --rayon-ctrl: 8px;
  --ombre: 0 12px 18px -6px rgba(34, 56, 101, .10);
  --ombre-forte: 0 18px 40px -12px rgba(25, 42, 61, .35);
  --titre: Poppins, "Segoe UI", system-ui, sans-serif;
  --corps: Roboto, "Segoe UI", system-ui, sans-serif;
  --large: 1140px;
  interpolate-size: allow-keywords;
}

#fia *, #fia *::before, #fia *::after { box-sizing: border-box; }
#fia { margin: 0; background: var(--blanc); color: var(--texte); font: 400 1.0625rem/1.65 var(--corps); font-size-adjust: from-font; }
#fia img, #fia svg { max-width: 100%; height: auto; display: block; }
#fia h1, #fia h2, #fia h3 { font-family: var(--titre); color: var(--violet); margin: 0; line-height: 1.2; text-wrap: balance; }
#fia p { margin: 0; text-wrap: pretty; }
#fia a { color: var(--violet); text-underline-offset: 3px; }
#fia a:hover { color: var(--violet-fonce); }
#fia :focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; border-radius: 4px; }
#fia abbr[title] { text-decoration: none; }

#fia .w { width: min(var(--large), 100% - 40px); margin-inline: auto; }
#fia .sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

/* ---------- Boutons ---------- */
#fia .btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; padding: 12px 24px; border-radius: var(--rayon-ctrl); border: 2px solid var(--violet); background: var(--violet); color: #fff; font: 500 1.0625rem/1.2 var(--corps); text-decoration: none; text-align: center; transition: background-color .2s, color .2s, border-color .2s, transform .15s, box-shadow .2s; }
#fia .btn:hover { background: var(--violet-fonce); border-color: var(--violet-fonce); color: #fff; transform: translateY(-2px); box-shadow: 0 10px 20px -8px rgba(60, 36, 104, .6); }
#fia .btn:active { transform: translateY(0); box-shadow: none; }
#fia .btn--ligne { background: transparent; color: var(--violet); }
#fia .btn--ligne:hover { background: var(--violet); color: #fff; }
#fia .btn--clair { background: #fff; border-color: #fff; color: var(--violet); }
#fia .btn--clair:hover { background: var(--bleu-clair); border-color: var(--bleu-clair); color: var(--violet-fonce); }
#fia .btn--ligne-clair { background: transparent; border-color: #fff; color: #fff; }
#fia .btn--ligne-clair:hover { background: #fff; border-color: #fff; color: var(--violet); }
#fia .ext::after { content: "↗"; font-size: .9em; }
@media (prefers-reduced-motion: reduce) { #fia .btn, #fia .btn:hover { transition: none; transform: none; } }

/* ---------- Hero ---------- */
#fia .hero { position: relative; --focus: #fff; background: linear-gradient(135deg, var(--violet) 0%, #45297a 55%, #2f2166 100%); color: #fff; padding: 56px 0 120px; overflow: hidden; }
#fia .hero::before { content: ""; position: absolute; inset: 0; background: radial-gradient(600px 400px at 85% 10%, rgba(92, 158, 207, .28), transparent 70%), radial-gradient(500px 380px at 5% 95%, rgba(163, 38, 143, .30), transparent 70%); pointer-events: none; }
#fia .hero .w { position: relative; display: grid; grid-template-columns: 1.15fr .85fr; gap: 48px; align-items: center; }
/* fil d'Ariane Yoast (shortcode), même source que les fiches formation */
#fia .ariane { font-size: .875rem; line-height: 1.4; margin-bottom: 18px; color: #fff; }
#fia .ariane a { color: #fff; display: inline-block; padding: 6px 0; }
#fia .ariane a:hover { color: var(--bleu-clair); }
#fia .pastille { display: inline-block; background: #fff; color: var(--violet); font: 600 .8125rem/1.3 var(--titre); letter-spacing: .04em; text-transform: uppercase; padding: 8px 14px; border-radius: 999px; margin-bottom: 20px; }
#fia .hero h1 { color: #fff; font-weight: 700; font-size: clamp(2rem, 4.6vw, 3.125rem); line-height: 1.12; }
#fia .hero h1 span { color: var(--bleu-clair); }
#fia .chapo { font: 300 1.25rem/1.55 var(--titre); margin: 20px 0 28px; max-width: 34em; }
#fia .actions { display: flex; flex-wrap: wrap; gap: 12px; }
#fia .coches { list-style: none; padding: 0; margin: 26px 0 0; display: flex; flex-wrap: wrap; gap: 8px 22px; font-size: 1rem; }
#fia .coches li::before { content: "✔"; color: var(--bleu-clair); margin-right: 8px; }
#fia .vague { position: absolute; left: 0; right: 0; bottom: -1px; width: 100%; height: 70px; color: var(--fond-alt); }

/* cascade d'entrée du hero : CSS seul, le titre (LCP) n'est jamais masqué */
@media (prefers-reduced-motion: no-preference) {
  #fia .hero [data-in] { animation: fia-entre .6s cubic-bezier(.2, .7, .2, 1) both; animation-delay: calc(var(--i, 0) * 90ms + 80ms); }
  @keyframes fia-entre { from { opacity: 0; translate: 0 14px; } }
}

/* ---------- Schéma du workflow ---------- */
#fia .flux { margin: 0; background: #fff; color: var(--texte); border-radius: var(--rayon); padding: 26px 24px 22px; box-shadow: var(--ombre-forte); --focus: var(--magenta); }
#fia .flux figcaption { font: 600 1rem var(--titre); color: var(--violet); margin-bottom: 16px; }
#fia .flux ol { list-style: none; margin: 0; padding: 0; display: grid; gap: 28px; }
#fia .etape { position: relative; display: flex; align-items: center; gap: 14px; background: var(--fond-alt); border: 1px solid var(--bord); border-radius: 16px; padding: 14px 16px; font-size: 1rem; line-height: 1.4; color: var(--nuit); overflow: hidden; }
#fia .etape__halo { position: absolute; inset: 0; border: 2px solid var(--magenta); border-radius: inherit; opacity: 0; pointer-events: none; }
#fia .etape__ico { position: relative; flex: none; width: 42px; height: 42px; border-radius: 50%; display: grid; place-items: center; background: linear-gradient(135deg, var(--magenta), var(--violet) 60%, #2c3580); color: #fff; }
#fia .etape__ico svg { width: 22px; height: 22px; }
#fia .etape__scan { position: absolute; inset: 0 auto 0 0; width: 45%; background: linear-gradient(90deg, transparent, rgba(92, 158, 207, .28), transparent); opacity: 0; pointer-events: none; }
#fia .etape__ok { margin-left: auto; flex: none; width: 26px; height: 26px; border-radius: 50%; background: var(--violet); color: #fff; display: grid; place-items: center; font-size: .875rem; }
#fia .etape--fin .etape__halo { opacity: 1; }
#fia .etape--fin { font-weight: 500; }
/* lien entre deux étapes : posé hors de la carte, dans l'intervalle de la grille */
#fia .flux li { position: relative; }
#fia .lien { position: absolute; left: 36px; top: -28px; height: 28px; border-left: 2px dashed var(--magenta); pointer-events: none; }
#fia .lien i { position: absolute; left: -7px; top: -6px; width: 12px; height: 12px; border-radius: 50%; background: var(--magenta); opacity: 0; }
#fia .flux__pause { margin-top: 16px; display: none; align-items: center; gap: 8px; min-height: 44px; padding: 8px 14px; background: transparent; border: 1px solid var(--bord); border-radius: var(--rayon-ctrl); color: var(--violet); font: 500 .9375rem var(--corps); cursor: pointer; }
#fia .flux__pause:hover { background: var(--fond-alt); }
#fia .flux__pause svg { width: 16px; height: 16px; }
.fia-anime #fia .flux__pause { display: inline-flex; }
#fia .flux__pause .ico-lecture, #fia .flux__pause[aria-pressed="true"] .ico-pause { display: none; }
#fia .flux__pause[aria-pressed="true"] .ico-lecture { display: block; }

/* ---------- Chiffres clés ---------- */
#fia .cles { position: relative; display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin: 44px 0 0; grid-column: 1 / -1; }
#fia .cles div { border: 1px solid rgba(255, 255, 255, .28); border-radius: 16px; padding: 14px 16px; background: rgba(255, 255, 255, .07); }
#fia .cles dt { font-size: .875rem; opacity: .9; order: 2; }
#fia .cles dd { margin: 0; font: 700 1.5rem/1.2 var(--titre); }
#fia .cles div { display: flex; flex-direction: column; }

/* ---------- Sections ---------- */
#fia section { padding: 72px 0; }
#fia .alt { background: var(--fond-alt); }
#fia h2 { font-weight: 700; font-size: clamp(1.625rem, 3.4vw, 2.375rem); margin-bottom: 14px; }
#fia .intro { max-width: 44em; margin-bottom: 34px; font-size: 1.125rem; }
#fia .grille { display: grid; gap: 20px; grid-template-columns: repeat(2, 1fr); }
#fia .grille--3 { grid-template-columns: repeat(3, 1fr); }
#fia .carte { background: #fff; border: 1px solid var(--bord); border-radius: var(--rayon); padding: 26px; box-shadow: var(--ombre); transition: translate .2s, box-shadow .2s; }
#fia .carte:hover { translate: 0 -3px; box-shadow: 0 18px 28px -12px rgba(34, 56, 101, .22); }
@media (prefers-reduced-motion: reduce) { #fia .carte, #fia .carte:hover { transition: none; translate: none; } }
#fia .carte h3 { font: 600 1.1875rem/1.3 var(--titre); margin-bottom: 8px; }
#fia .carte--cle { border: 2px solid var(--violet); }
#fia .etiq { display: inline-block; background: var(--violet); color: #fff; font: 600 .75rem/1.2 var(--titre); letter-spacing: .05em; text-transform: uppercase; padding: 6px 10px; border-radius: 6px; margin-bottom: 12px; }
#fia .prix { font: 700 2.25rem/1.15 var(--titre); color: var(--violet); margin: 2px 0 10px; }
#fia .carte .lien-plus { display: inline-block; margin-top: 14px; font-weight: 500; }

/* ---------- Barre des 30 heures ---------- */
#fia .heures { margin: 0 0 34px; }
#fia .heures__titre { font: 600 1rem var(--titre); color: var(--violet); margin-bottom: 10px; }
#fia .heures ol { list-style: none; margin: 0; padding: 0; display: flex; gap: 4px; }
#fia .heures li { flex: var(--h) 1 0; min-width: 0; }
#fia .heures__seg { display: block; height: 14px; border-radius: 7px; background: var(--violet); transform-origin: left center; }
#fia .heures li:nth-child(even) .heures__seg { background: var(--bleu); }
#fia .heures li:last-child .heures__seg { background: var(--magenta); }
#fia .heures__lib { display: block; margin-top: 8px; font-size: .875rem; line-height: 1.3; color: var(--nuit); }
#fia .heures__lib b { display: block; font-family: var(--titre); font-weight: 600; }

/* ---------- Formateur ---------- */
#fia .qui { display: grid; grid-template-columns: auto 1fr; gap: 28px; align-items: start; }
#fia .mono { width: 92px; height: 92px; border-radius: 50%; background: linear-gradient(135deg, var(--magenta), var(--violet) 60%, #2c3580); color: #fff; display: grid; place-items: center; font: 700 1.875rem var(--titre); }
#fia .qui h3 { font-size: 1.5rem; }
#fia .role { color: var(--violet); font-weight: 500; margin: 4px 0 12px; }
#fia .qui ul { list-style: none; margin: 14px 0 0; padding: 0; display: grid; gap: 8px; }
#fia .qui li { padding-left: 28px; position: relative; }
#fia .qui li::before { content: "✔"; position: absolute; left: 0; color: var(--violet); }

/* ---------- Inscription ---------- */
#fia .pas { position: relative; list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; counter-reset: pas; }
#fia .pas__trait { position: absolute; left: 8%; right: 8%; top: 46px; height: 4px; border-radius: 2px; background: var(--bord); z-index: 0; }
#fia .pas__trait i { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--magenta), var(--violet)); transform-origin: left center; }
#fia .pas .carte { position: relative; z-index: 1; }
#fia .pas .carte::before { counter-increment: pas; content: counter(pas); display: grid; place-items: center; width: 42px; height: 42px; border-radius: 50%; background: var(--violet); color: #fff; font: 600 1.125rem var(--titre); margin-bottom: 14px; box-shadow: 0 0 0 6px #fff; }

/* ---------- FAQ ---------- */
#fia .faq { display: grid; gap: 12px; max-width: 860px; }
#fia details { background: #fff; border: 1px solid var(--bord); border-radius: 16px; box-shadow: var(--ombre); }
#fia summary { cursor: pointer; list-style: none; display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 18px 22px; min-height: 56px; font: 600 1.0625rem/1.35 var(--titre); color: var(--violet); border-radius: 16px; }
#fia summary::-webkit-details-marker { display: none; }
#fia summary::after { content: ""; flex: none; width: 12px; height: 12px; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; rotate: 45deg; translate: 0 -3px; transition: rotate .25s, translate .25s; }
#fia details[open] summary::after { rotate: 225deg; translate: 0 3px; }
#fia details p { padding: 0 22px 20px; }
@media (prefers-reduced-motion: no-preference) {
  #fia details::details-content { block-size: 0; overflow: clip; transition: block-size .3s ease, content-visibility .3s allow-discrete; }
  #fia details[open]::details-content { block-size: auto; }
}
@media (prefers-reduced-motion: reduce) { #fia summary::after { transition: none; } }
#fia .detail { margin-top: 20px; }
#fia .detail a { display: inline-block; padding: 10px 0; font-weight: 500; }

/* ---------- Appel final ---------- */
#fia .final { --focus: #fff; background: linear-gradient(135deg, #2f2166, var(--violet)); color: #fff; text-align: center; }
#fia .final h2 { color: #fff; }
#fia .final .intro { margin-inline: auto; }
#fia .final .actions { justify-content: center; }

/* ---------- Mention de certification (le pied de page est celui du site) ---------- */
#fia .mentions { padding: 26px 0 30px; font-size: .9375rem; line-height: 1.6; }
#fia .mentions p { max-width: 60em; }

/* ---------- Barre d'action mobile ---------- */
#fia .barre { display: none; }

/* ---------- Tablette et mobile ---------- */
@media (max-width: 900px) {
  #fia .hero { padding-top: 36px; }
  #fia .hero .w { grid-template-columns: 1fr; gap: 36px; }
  #fia .cles { grid-template-columns: repeat(2, 1fr); margin-top: 8px; }
  #fia .grille--3, #fia .pas { grid-template-columns: 1fr; }
  #fia .pas__trait { left: 46px; right: auto; top: 30px; bottom: 30px; width: 4px; height: auto; }
  #fia .pas__trait i { transform-origin: center top; background: linear-gradient(180deg, var(--magenta), var(--violet)); }
  #fia .pas .carte { margin-left: 0; }
}
@media (max-width: 700px) {
  #fia section { padding: 52px 0; }
  #fia .grille { grid-template-columns: 1fr; }
  #fia .actions .btn { flex: 1 1 100%; }
  #fia .chapo { font-size: 1.125rem; }
  #fia .qui { grid-template-columns: 1fr; }
  #fia .heures ol { flex-direction: column; gap: 10px; }
  #fia .heures li { flex: none; }
  #fia .heures__seg { width: calc(var(--h) / 8 * 100%); }
  #fia .barre { display: block; position: fixed; left: 0; right: 0; bottom: 0; z-index: 60; padding: 10px 16px calc(10px + env(safe-area-inset-bottom, 0px)); background: #fff; border-top: 1px solid var(--bord); box-shadow: 0 -8px 20px rgba(17, 16, 97, .12); transition: translate .3s; }
  #fia .barre .btn { width: 100%; }
  .fia-js #fia .barre:not(.is-on) { translate: 0 110%; visibility: hidden; transition: translate .3s, visibility 0s .3s; }
}
@media (prefers-reduced-motion: reduce) { #fia .barre { transition: none !important; } }

@media print {
  #fia .barre, #fia .flux__pause, #fia .vague { display: none; }
  #fia .hero, #fia .final { background: #fff; color: #000; }
  #fia .hero h1, #fia .final h2, #fia .hero h1 span { color: #000; }
}
