/* ==========================================================================
   Espacements des sections sur ordinateur et Mac (≥ 1024 px) — 01/11/2026
   Demande : 110 px entre le haut de chaque section et son contenu, et 110 px sous le contenu
   (hero de l'accueil compris, compté sous le menu).

   Ce fichier : chaque section prend la hauteur de son contenu (au lieu de la hauteur de
   l'écran), avec 110 px de marge intérieure ; les blocages de hauteur internes sont levés.
   js/espacements.js mesure ensuite chaque section et corrige au pixel près (les contenus ont
   leurs propres marges, différentes d'une section à l'autre).
   Le défilement section par section est conservé.

   « #main#main#main » : identifiant répété volontairement, pour passer devant les sélecteurs
   très longs de styles.css.
   ========================================================================== */
@media (min-width: 1024px) {

	/* Sections : Accueil, Domaines, Outils (#main > section / bloc), À propos, Parcours, Contact */
	html body #main#main#main > section,
	html body #main#main#main > .tools-snap-block,
	html body #main#main .aboutContent > section,
	html body section.audienceHub {
		height: auto !important;
		min-height: 0 !important;
		max-height: none !important;
		overflow: visible !important;
		padding-top: 110px !important;
		padding-bottom: 110px !important;
	}

	/* Premier niveau sous la section : plus de marge propre ni de hauteur imposée */
	html body #main#main#main > section > *,
	html body #main#main#main > .tools-snap-block > * {
		padding-top: 0 !important;
		padding-bottom: 0 !important;
		margin-top: 0 !important;
		margin-bottom: 0 !important;
		height: auto !important;
		min-height: 0 !important;
		max-height: none !important;
	}
	html body #main#main .aboutContent > section > * {
		height: auto !important;
		min-height: 0 !important;
		max-height: none !important;
	}

	/* Grilles internes : rangées à la hauteur du contenu (plus de rangées vides de remplissage) */
	html body #main#main#main > section > .container,
	html body #main#main#main > .tools-snap-block > .container {
		grid-template-rows: none !important;
		grid-auto-rows: auto !important;
		align-content: start !important;
	}

	/* Groupements (Accueil et À propos) : le tableau gardait la hauteur de l'écran */
	html body #main#main .groupementsChoiceBoard,
	html body #main#main .aboutContent > section .groupementsChoiceBoard {
		height: auto !important;
		max-height: none !important;
		min-height: 0 !important;
	}

	/* Hero de l'accueil : le bandeau « Fédération nationale… » était posé en absolu au tiers de
	   la photo, avec une rangée vide au-dessus du titre. Il passe en tête du hero, dans le flux,
	   et le titre suit à 28 px. */
	html body.page-id-198584 #main#main#main > #hero {
		grid-template-rows: auto auto !important;
		row-gap: 28px !important;
		align-content: start !important;
	}
	html body.page-id-198584 #main#main#main > #hero > .heroInstitutionalBand {
		position: relative !important;
		inset: auto !important;
		grid-row: 1 !important;
		grid-column: 1 / -1 !important;
	}
	html body.page-id-198584 #main#main#main > #hero > .container {
		grid-row: 2 !important;
	}

	/* Hero de l'accueil (1.1.39, retour client du 10/11/2026) : il remplit exactement l'écran sous
	   le menu, pour que la section suivante ne soit plus visible en bas (les 900 px fixes laissaient
	   une bande sur un écran 1920 × 1080). js/espacements.js écrit la hauteur exacte dans
	   --fnam-hero-h ; la valeur de secours ci-dessous (71 px = hauteur du menu) sert avant le script.
	   Plancher de 640 px pour les écrans très bas. Le contenu est centré par le script. */
	html body.page-id-198584 #main#main#main > #hero {
		min-height: max(640px, var(--fnam-hero-h, calc(100vh - 71px))) !important;
		box-sizing: border-box !important;
		row-gap: 40px !important;
	}
	/* Titre : même formule qu'avant mais en vh au lieu de svh (Safari le faisait tomber à 48 px).
	   Le script fixe en plus la taille en pixels, pour un rendu identique dans tous les navigateurs. */
	html body.page-id-198584 #main#main#main > #hero h1.heroTitle {
		font-size: clamp(48px, min(6.85vw, 11vh), 114px) !important;
		margin: 0 0 28px !important;
	}
	/* Espaces réguliers : titre → texte 28 px, texte → « PARCOURS » 40 px (ils se touchaient). */
	html body.page-id-198584 #main#main#main > #hero p.lead {
		margin: 0 0 40px !important;
	}
	/* Nos domaines d'action : les 5 domaines à 1000 px minimum (demande du 01/11/2026). */
	html body.page-id-198562 #main#main#main > section.domainesDetail {
		min-height: 1000px !important;
		box-sizing: border-box !important;
	}
	/* La vidéo de fond était décalée (-15 px, hauteur fixe, zoom 1,035) : elle laissait une bande
	   plus claire entre deux domaines. Vidéo et voile couvrent maintenant toute la section. */
	html body.page-id-198562 #main#main#main > section.domainesDetail > .domainesVideo,
	html body.page-id-198562 #main#main#main > section.domainesDetail > .domainesShade {
		top: 0 !important; bottom: auto !important; left: 0 !important; right: auto !important;
		width: 100% !important; height: 100% !important; max-height: none !important;
		transform: none !important; margin: 0 !important;
	}
	html body.page-id-198562 #main#main#main > section.domainesDetail > .domainesVideo { object-fit: cover !important; }
}

/* Chiffres clés de l'accueil (1.1.42) : le fondu de 24 px sur les bords gauche et droit de la
   grille (prévu pour le carrousel mobile) effaçait le bord des tuiles sur ordinateur. */
@media (min-width: 1024px) {
	html body.page-id-198584 #main#main#main > #dsKpiSection .dsKpiMosaic {
		-webkit-mask-image: none !important;
		mask-image: none !important;
	}
}

/* Domaines de l'accueil (1.1.45, demande du 11/11/2026) : le titre « Nos domaines d'action » suivait
   la hauteur de l'écran (clamp(3rem, min(5.3vw, 12.72svh), 6rem) dans correctifs-mobile.css) et
   montait à 102 px, sur 2 lignes : le bas des cartes sortait de l'écran. Taille fixée sur la
   largeur, sur une ligne à 1920 px (67 px), pour laisser la place aux cartes. */
@media (min-width: 1024px) {
	html body.page-id-198584 #main#main#main > section.homeDomainsImmersive .homeDomainsCopy h2 {
		font-size: clamp(40px, 3.5vw, 68px) !important;
		line-height: 1.05 !important;
	}
}
