/* TVH Consulting — Formations : mise en page de la fiche complète [tvh_formation_fiche] (gabarit retenu « Évolution »).
   S'appuie sur tvh-design-system.css et tvh-formations.css. */

/* ===================== Base ===================== */
.tvh-fo-fiche { color: var(--color-text); }
.tvh-fo-fiche a:not([class]):not(.tvh-carte__titre a) { color: var(--color-primary); text-underline-offset: 3px; }
.tvh-fo-fiche a:not([class]):focus-visible { outline: 3px solid var(--color-gris-fonce); outline-offset: 2px; }
.tvh-fo-afournir { display: inline-block; padding: 1px 8px; border: 1px dashed var(--color-primary); background: var(--color-blanc); font-weight: 700; font-size: .9em; color: var(--color-primary); }
.tvh-fo-fiche :is(.tvh-fo-meta, .tvh-fo-modalites) svg { flex: none; width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

/* ===================== Héros : texte | photo ronde avec logo partenaire ===================== */
.tvh-fo-hero { padding-block: var(--space-2xl) var(--space-3xl); overflow: hidden; }
.tvh-fo-hero .tvh-h1 { margin-block: 16px 24px; }
.tvh-fo-hero .tvh-chapo { max-width: 58ch; margin-bottom: var(--space-l); }
.tvh-fo-meta { list-style: none; margin: 0 0 var(--space-l); padding: 0; display: flex; flex-wrap: wrap; gap: 12px 28px; }
.tvh-fo-meta li { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 16px; color: var(--color-gris-fonce); }
.tvh-fo-meta svg { color: var(--color-primary); }
.tvh-fo-fiche .tvh-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 16px 28px; }
.tvh-fo-partenaire { display: flex; align-items: center; gap: 16px; margin-top: var(--space-l); }
.tvh-fo-partenaire .tvh-pastille { width: 96px; padding: 18px; }
.tvh-fo-partenaire p { margin: 0; font-weight: 700; color: var(--color-gris-fonce); }

/* Sections de lecture */
.tvh-fo-section .tvh-titre { margin-bottom: 24px; }
.tvh-fo-colonnes { display: grid; gap: var(--space-l) var(--space-xl); grid-template-columns: 1fr; }
.tvh-fo-colonnes > * { min-width: 0; }
.tvh-fo-colonnes .tvh-h3 { margin-bottom: 14px; }
.tvh-fo-colonnes .tvh-liste, .tvh-fo-modalites .tvh-liste { margin: 0; }
/* Public visé et prérequis : pictogramme dans un rond rose + texte */
#tvh-formations .tvh-fo-items { display: grid; gap: 16px; margin: 0; padding: 0; list-style: none; }
#tvh-formations .tvh-fo-items li { display: flex; align-items: center; gap: 14px; min-width: 0; margin: 0; }
.tvh-fo-items li > span:last-child { min-width: 0; }
.tvh-fo-picto { flex: none; width: 44px; height: 44px; display: grid; place-items: center; border-radius: 50%; background: var(--color-rose-cercle); color: var(--color-primary); }
.tvh-fo-picto svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.tvh-fo-modalites { margin: 0; }
.tvh-fo-modalites svg { color: var(--color-primary); }
.tvh-fo-modalites dd { min-width: 0; margin: 0; }
.tvh-fo-retour { margin-top: var(--space-xl); }

.tvh-fo-hero__grille { display: grid; gap: var(--space-xl); grid-template-columns: 1fr; align-items: center; }
.tvh-fo-hero__texte { min-width: 0; }
.tvh-fo-hero__visuel { position: relative; width: 100%; max-width: 240px; margin-inline: auto; }
.tvh-fo-hero__visuel .tvh-cercle { position: absolute; width: 118%; left: -9%; top: -9%; }
.tvh-fo-hero__image { position: relative; display: block; width: 100%; height: auto; aspect-ratio: 1; object-fit: cover; border-radius: 50%; }
/* Logo partenaire posé sur la photo, en haut à gauche, à cheval sur le cercle rose */
#tvh-formations .tvh-fo-hero__partenaire { position: absolute; z-index: 2; left: -6%; top: 2%; width: 40%; min-width: 96px; max-width: 304px; padding: 14px; }
@media (max-width: 1023px) { #tvh-formations .tvh-fo-hero__partenaire { padding: 12px; } }
.tvh-fo-hero__repere { position: relative; display: grid; place-items: center; aspect-ratio: 1; margin: 0; padding: 14%; border: 2px dashed var(--color-secondary); border-radius: 50%;
  background: var(--color-blanc); text-align: center; font-weight: 700; font-size: 15px; line-height: 1.35; color: var(--color-gris-fonce); }
@media (min-width: 1024px) {
  .tvh-fo-hero__grille { grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); gap: var(--space-2xl); }
  .tvh-fo-hero--sans-visuel .tvh-fo-hero__grille { grid-template-columns: 1fr; }
  .tvh-fo-hero__visuel { max-width: 380px; }
}

/* Corps : sommaire collant (bureau) + contenu.
   --tvh-entete = hauteur de l'en-tête collant du site (et de la barre d'administration), mesurée par tvh-formations.js. */
.tvh-fo-corps { display: grid; grid-template-columns: 1fr; }
.tvh-fo-contenu { min-width: 0; padding-bottom: var(--space-3xl); }
.tvh-fo-fiche .tvh-fo-lecture { max-width: 860px; }
.tvh-fo-fiche .tvh-fo-section { padding-top: var(--space-3xl); scroll-margin-top: calc(var(--tvh-entete, 0px) - 32px); }
.tvh-fo-side { display: none; }
.tvh-fo-side__titre { display: block; margin: 0 0 12px; font: 600 18px/1.3 var(--font-titres); letter-spacing: normal; color: var(--color-noir); }
.tvh-fo-side ol { list-style: none; margin: 0 0 28px; padding: 0; }
.tvh-fo-side li { border-left: 3px solid var(--color-gris-medium); }
.tvh-fo-side li:has(a[aria-current="true"]) { border-left-color: var(--color-primary); }
.tvh-fo-side a.tvh-fo-ancre { display: flex; align-items: center; min-height: 44px; padding-left: 16px; font-weight: 700; font-size: 16px; color: var(--color-gris-fonce); text-decoration: none; }
.tvh-fo-side a.tvh-fo-ancre:hover, .tvh-fo-side a.tvh-fo-ancre[aria-current="true"] { color: var(--color-primary); }
.tvh-fo-side a.tvh-fo-ancre:focus-visible { outline: 3px solid var(--color-gris-fonce); outline-offset: 2px; }
.tvh-fo-side .tvh-fo-side__recap { margin: 0 0 16px; padding-top: 20px; border-top: 1px solid var(--color-gris-medium); font-size: 15px; }
.tvh-fo-side__recap strong { display: block; font: 600 19px/1.3 var(--font-titres); color: var(--color-noir); }
@media (min-width: 768px) { .tvh-fo-fiche .tvh-fo-colonnes { grid-template-columns: 1fr 1fr; } }
@media (min-width: 1024px) {
  .tvh-fo-corps { grid-template-columns: 250px minmax(0, 1fr); gap: var(--space-2xl); }
  .tvh-fo-side { display: block; position: sticky; top: calc(var(--tvh-entete, 0px) + 32px); align-self: start; margin-top: var(--space-3xl); }
}

/* Modalités : libellé | contenu */
.tvh-fo-fiche .tvh-fo-modalites > div { display: grid; grid-template-columns: 1fr; gap: 6px 32px; padding: 20px 0; border-top: 1px solid var(--color-gris-medium); }
.tvh-fo-fiche .tvh-fo-modalites > div:last-child { border-bottom: 1px solid var(--color-gris-medium); }
.tvh-fo-fiche .tvh-fo-modalites dt { display: flex; align-items: center; gap: 12px; font: 600 18px/1.3 var(--font-titres); color: var(--color-noir); }
.tvh-fo-fiche .tvh-fo-modalites dd p { margin: 0 0 6px; }
.tvh-fo-fiche .tvh-fo-modalites dd p:last-child { margin: 0; }
@media (min-width: 768px) { .tvh-fo-fiche .tvh-fo-modalites > div { grid-template-columns: 240px minmax(0, 1fr); } }
.tvh-fo-fiche .tvh-fo-suite { margin-top: var(--space-l); padding-top: 24px; border-top: 1px solid var(--color-gris-medium); }

/* Demande : texte sur fond sombre, carte blanche du formulaire */
.tvh-fo-demande { padding-block: var(--space-3xl); scroll-margin-top: var(--tvh-entete, 0px); }
.tvh-fo-demande__grille { display: grid; gap: var(--space-xl); grid-template-columns: 1fr; align-items: start; }
.tvh-fo-demande__texte { min-width: 0; }
.tvh-fo-demande .tvh-titre { margin-bottom: 24px; }
.tvh-fo-demande .tvh-fo-ensuite__titre { margin: var(--space-l) 0 16px; font-size: 20px; }
@media (min-width: 1024px) { .tvh-fo-demande__grille { grid-template-columns: minmax(0, .85fr) minmax(0, 1.15fr); gap: var(--space-3xl); } }
.tvh-fo-contact { position: relative; z-index: 1; min-width: 0; display: grid; gap: 20px; padding: 48px; background: var(--color-blanc); border: 1px solid var(--color-blanc); }
@media (max-width: 767px) { .tvh-fo-contact { padding: 28px 20px; } }
.tvh-fo-demande .tvh-fo-contact :is(p, li, span) { color: var(--color-text); }
.tvh-fo-demande .tvh-fo-contact .tvh-fo-afournir { color: var(--color-primary); }
#tvh-formations .tvh-fo-contact__titre { margin: 0; font: 600 22px/1.3 var(--font-titres); letter-spacing: normal; color: var(--color-noir); text-wrap: balance; }

/* Mobile et tablette : bouton « Demander un devis » collant en bas d'écran, masqué quand le formulaire est visible */
.tvh-fo-cta-mobile { position: fixed; left: 0; right: 0; bottom: 0; z-index: 40; display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 10px var(--gouttiere-mobile) calc(10px + env(safe-area-inset-bottom, 0px));
  background: var(--color-blanc); border-top: 1px solid var(--color-gris-medium); box-shadow: 0 -6px 16px rgba(0, 0, 0, .06); }
.tvh-fo-cta-mobile p { min-width: 0; margin: 0; font-size: 14px; line-height: 1.3; font-weight: 700; color: var(--color-gris-fonce); }
.tvh-fo-cta-mobile.est-masque { transform: translateY(110%); }
@media (prefers-reduced-motion: no-preference) { .tvh-fo-cta-mobile { transition: transform .25s ease; } }
@media (max-width: 1023px) { .tvh-fo-fiche { padding-bottom: 76px; } }
@media (min-width: 1024px) { .tvh-fo-cta-mobile { display: none; } }

/* Boutons propres à la fiche (réglages communs dans tvh-formations.css) */
/* Sommaire (pleine largeur) et bouton collant mobile */
.tvh-fo-side .tvh-fo-btn { display: block; }
#tvh-formations#tvh-formations .tvh-fo-side .tvh-fo-btn .elementor-button { display: flex; width: 100%; padding-left: 20px; font-size: 16px; white-space: nowrap; }
#tvh-formations#tvh-formations .tvh-fo-side .elementor-button-content-wrapper { width: 100%; justify-content: space-between; }
#tvh-formations#tvh-formations .tvh-fo-side .elementor-button-icon { padding: 14px; }
.tvh-fo-cta-mobile .tvh-fo-btn { flex: none; }
#tvh-formations#tvh-formations .tvh-fo-cta-mobile .tvh-fo-btn .elementor-button { padding: 6px 6px 6px 18px; font-size: 15px; }
#tvh-formations#tvh-formations .tvh-fo-cta-mobile .elementor-button-icon { padding: 12px; }

/* ===================== Formulaire de devis HubSpot (intégration v2) =====================
   Champs au style des formulaires du site : libellé visible, fond #f8f8f8, bordure --color-secondary (3,27:1),
   bouton d'envoi au format des boutons du site. */
#tvh-formations .tvh-fo-hubspot .hs-form { display: grid; gap: 16px; }
#tvh-formations .tvh-fo-hubspot fieldset { max-width: none; margin: 0; padding: 0; border: 0; }
#tvh-formations .tvh-fo-hubspot .hs-form-field > label { display: block; margin-bottom: 6px; font: 700 15px/1.4 var(--font-texte); color: var(--color-noir); }
#tvh-formations .tvh-fo-hubspot .hs-form-required { color: var(--color-primary); }
#tvh-formations .tvh-fo-hubspot .hs-input:not([type="checkbox"]):not([type="radio"]) { box-sizing: border-box; width: 100% !important; min-height: 48px; margin: 0; padding: .5rem 1rem;
  border: 1px solid var(--color-secondary); border-radius: 3px; background: #f8f8f8; font: 400 17px/1.4 var(--font-texte); color: var(--color-gris-fonce); }
#tvh-formations .tvh-fo-hubspot textarea.hs-input { min-height: 120px; resize: vertical; }
#tvh-formations .tvh-fo-hubspot .hs-input:focus { outline: 3px solid var(--color-primary); outline-offset: 1px; border-color: var(--color-primary); }
#tvh-formations .tvh-fo-hubspot :is(.inputs-list, .hs-error-msgs) { margin: 6px 0 0; padding: 0; list-style: none; }
#tvh-formations .tvh-fo-hubspot .hs-error-msg { font-size: 14px; font-weight: 700; color: var(--color-primary); }
#tvh-formations .tvh-fo-hubspot :is(.legal-consent-container, .hs-richtext) { font-size: 14px; color: var(--color-text); }
#tvh-formations .tvh-fo-hubspot input[type="checkbox"] { width: 18px; height: 18px; margin: 0 8px 0 0; accent-color: var(--color-primary); }
#tvh-formations .tvh-fo-hubspot .hs-button { min-height: 52px; margin: 0; padding: 14px 40px; border: 0; border-radius: 50px; background: var(--color-primary);
  font: 700 clamp(1rem, 1.1vw, 1.125rem)/1.2 var(--font-texte); letter-spacing: 0; color: var(--color-blanc); cursor: pointer; }
#tvh-formations .tvh-fo-hubspot .hs-button:hover { background: #b30838e0; }
#tvh-formations .tvh-fo-hubspot .hs-button:focus-visible { outline: 3px solid var(--color-gris-fonce); outline-offset: 3px; }

/* À propos : texte libre de l'éditeur visuel (listes rétablies malgré la neutralisation des puces du site) */
.tvh-fo-texte > :last-child { margin-bottom: 0; }
.tvh-fo-texte a { text-decoration: underline; }
#tvh-formations#tvh-formations .tvh-fo-texte :is(ul, ol) { margin: 0 0 1em; padding-left: 0; }
#tvh-formations#tvh-formations .tvh-fo-texte ul li { position: relative; margin: 0 0 8px; padding-left: 22px; }
#tvh-formations#tvh-formations .tvh-fo-texte ul li::before { content: ""; display: block; position: absolute; left: 4px; top: calc(.8em - 3px); width: 6px; height: 6px; margin: 0;
  border: 0; border-radius: 50%; background: var(--color-primary); }
#tvh-formations#tvh-formations .tvh-fo-texte ol { padding-left: 1.4em; list-style: decimal; }
#tvh-formations#tvh-formations .tvh-fo-texte ol li { list-style: decimal; margin: 0 0 8px; }
#tvh-formations#tvh-formations .tvh-fo-texte ol li::marker { content: counter(list-item) ". "; font-weight: 700; color: var(--color-primary); }

/* Formations associées : 3 cartes du catalogue, fond gris, avant la demande de devis */
.tvh-fo-associees { padding-block: var(--space-3xl); }
@media (min-width: 1024px) { .tvh-fo-associees .tvh-cat-grille { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
