/*
Theme Name: Forge One
Theme URI: https://forgeonefitness.ch/
Author: Forge One Fitness
Description: Thème enfant de Twenty Twenty-Five pour Forge One Fitness : en-têtes, pied de page, blog et styles de la marque. Remplace The7 + Elementor (migration de décembre 2026).
Template: twentytwentyfive
Version: 1.6.7
Requires at least: 6.7
Requires PHP: 8.1
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: forge-one
*/

/* ---------- 1. Base ---------- */
html, body { background-color: #000; }                 /* ce qu'on voit au-dessus de l'en-tête / sous le pied */
.wp-site-blocks { position: relative; background: #fff; }
.wp-site-blocks > * + * { margin-block-start: 0; }     /* en-tête, contenu et pied collés */
.fo-content > * { margin-block-start: 0 !important; margin-block-end: 0; } /* sections empilées comme dans Elementor */
.fo-content *, .fo-content *::before, .fo-content *::after { box-sizing: border-box; }
.fo-content img { height: auto; max-width: 100%; border: none; border-radius: 0; box-shadow: none; }

/* ---------- 1 bis. Pages converties depuis Elementor (groupe « fo-page ») ----------
   Mise en page et typographie : assets/css/elementor.css (CSS d'Elementor et du kit), assets/css/the7.css (ce que
   The7 imposait au contenu), puis les styles propres à chaque page (méta _forge_css), tous générés à l'identique
   de l'ancien site. Ici, seulement les raccords propres au nouveau thème : */
/* 1. Pages au modèle « par défaut » de The7 : contenu dans une boîte de 1200 px centrée, comme avant. */
.fo-page.fo-tpl-boxed { max-width: var(--the7-content-width, 1200px); margin-left: auto; margin-right: auto; }
/* 2. Sections « étirées » d'Elementor (pleine largeur dans une page en boîte) : ce que faisait son JavaScript. */
.fo-page.fo-page > .fo-sec.fo-sec-stretched { width: calc(100vw - var(--fo-sbw, 0px)); left: calc(50% - (100vw - var(--fo-sbw, 0px)) / 2); } /* --fo-sbw : largeur de la barre de défilement (functions.php) */
.wp-site-blocks { overflow-x: clip; } /* comme The7 (body { overflow-x: hidden }) : pas de défilement horizontal */
/* 3. Les sections de premier niveau ne prennent pas l'espacement automatique de WordPress (20 px) :
      leurs marges sont celles d'Elementor. Priorité moyenne (:where) : au-dessus de la règle de WordPress, en dessous
      des marges propres à chaque élément (ex. marge négative sous l'en-tête « Retour »), quel que soit l'ordre des feuilles. */
.fo-page.fo-page > :where(.fo-sec) { margin-block-start: 0; margin-block-end: 0; }
.fo-page.fo-page > :where(.fo-con) { margin-block-start: var(--margin-block-start); margin-block-end: var(--margin-block-end); }

/* ---------- 2. En-têtes, pieds de page et fenêtre du menu ----------
   Convertis à l'identique depuis les modèles Elementor de l'ancien site (parts/*.html, styles dans
   assets/css/parts.css, générés par scripts/import-parts.php). Comportements (en-tête fixé en haut qui fonce au
   défilement, fenêtre « Mobile Menu ») : assets/js/forge.js. Ici, seulement les raccords propres au thème : */
.fo-popup-modal[hidden] { display: none !important; } /* fenêtre du menu fermée */

/* ---------- 3. Blog, articles, page 404 ----------
   Modèles Elementor de l'ancien site convertis à l'identique (inc/*.html, remplis par inc/blog.php, inc/single.php,
   inc/404.php ; styles dans assets/css/blog.css, single.css, 404.css, générés par scripts/build-*.php). */

/* ---------- 4. Repris du CSS personnalisé de The7 (Personnaliser › CSS additionnel) ---------- */
#pmpro_pricing_fields .pmpro_level_name_text,
#pmpro_pricing_fields .pmpro_level_description_text,
.pmpro_checkout-h2-msg,
#pmpro_pricing_fields h2 { display: none; }
#pmpro_btn-submit { width: 100%; background-color: #FFB625; color: #FFFFFF; border: none; padding: 15px; font-size: 20px; text-align: center; display: inline-block; cursor: pointer; }
#pmpro_btn-submit:hover { background-color: #FFB625; }
.pmpro_checkout .pmpro_checkout-field input[type="text"],
.pmpro_checkout .pmpro_checkout-field input[type="password"],
.pmpro_checkout .pmpro_checkout-field input[type="email"],
.pmpro_checkout .pmpro_checkout-field input[type="number"],
.pmpro_checkout .pmpro_checkout-field input[type="tel"],
.pmpro_checkout .pmpro_checkout-field textarea { width: 100%; box-sizing: border-box; padding: 10px; font-size: 16px; }
.pmpro_checkout .pmpro_checkout-field { width: 100%; margin-bottom: 15px; box-sizing: border-box; }

/* ---------- 5. Améliorations voulues (demande de Rémy, 02.12.2026) : différences assumées avec l'ancien site ----------
   Tout le reste du site est repris à l'identique ; ici seulement ce qu'on a choisi de corriger. Les textes corrigés
   (ton de voix) sont dans scripts/corrections.php. */

/* 5.1 Une seule police partout : Inter (titres, texte, menus, boutons, champs). Avant : Helvetica dans les menus de
       l'en-tête et un texte de l'accueil, Manrope dans la fenêtre du menu mobile et sur la page 404, la police par
       défaut du navigateur (Arial) dans les boutons et les champs de formulaire. Les icônes et les émojis gardent la leur. */
/* « :not(#fo-x) » : priorité d'un identifiant, pour passer devant les réglages propres à chaque section. */
.wp-site-blocks:not(#fo-x) :is(h1, h2, h3, h4, h5, h6, p, span, a, li, dt, dd, td, th, label, button, input, select, textarea, blockquote, figcaption, strong, em, b, small, time, div):not([class*="icon"]):not([class*="emoji"]):not([class*="fa-"]) {
	font-family: Inter, sans-serif !important;
}

/* 5.2 Titres et boutons harmonisés selon le Brand Guide 2026 (PDF « Forge_One_Brand_Guide », page Typographie) :
       titres en Inter 700, interlettrage -0,02 em, interligne 1,1 (titre principal) ou 1,15 (sous-titres), jamais en
       italique ni en majuscules ; boutons en 600, interlettrage 0. Avant, selon la section : titres en 800 (trop gras)
       ou très serrés (-2 px, jusqu'à -0,05 em), boutons à -0,8 px ou en 700. Tailles et couleurs inchangées. */
.wp-site-blocks:not(#fo-x) :is(h1, h2, h3, h4, h5, h6, .fof-app-title),
.wp-site-blocks:not(#fo-x) :is(h1, h2, h3, h4, h5, h6, .fof-app-title) :is(span, em, strong, b, a, mark):not([class*="icon"]) {
	font-weight: 700 !important;
	letter-spacing: -0.02em !important;
	font-style: normal !important;
	text-transform: none !important;
}
.wp-site-blocks:not(#fo-x) :is(h2, h3, h4, h5, h6) { line-height: 1.15 !important; text-wrap: balance; }
.wp-site-blocks:not(#fo-x) :is(h1, .fof-app-title) { line-height: 1.1 !important; text-wrap: balance; }
.wp-site-blocks:not(#fo-x) :is(.fo-button, .fo-button-text, .box-button, .fo-ps, .ffn-btn) {
	font-weight: 600 !important;
	letter-spacing: 0 !important;
}

/* 5.3 Icône du menu (burger) toujours à droite : entre 990 et 1200 px de large, elle se collait au logo. */
@media (max-width: 1200px) {
	.fo-location-header .fo-container > .fo-col:has(a[aria-haspopup="dialog"]) { margin-left: auto; }
}

/* 5.4 Numéro de téléphone jamais coupé sur deux ou trois lignes (pied de page sur téléphone). */
.wp-site-blocks a[href^="tel:"] { white-space: nowrap; }

/* 5.5 Articles : l'image du haut a toujours le même format, quelle que soit la photo (avant : la photo entière, souvent
       en hauteur, repoussait le titre très bas, et elle était calée à gauche). Bandeau 16:9 recadré au centre, au plus
       60 % de la hauteur de l'écran, aligné sur le titre, coins arrondis comme les images du texte. */
.fo-page.fo-page-31980 .fo-el.fo-el-c726841 { width: 100%; max-width: none; padding-inline: 10px; }
.fo-page.fo-page-31980 .fo-el.fo-el-c726841 .the7-image-container { display: block; }
.fo-page.fo-page-31980 .fo-el.fo-el-c726841 .the7-image-wrapper { width: 100%; max-width: none; margin: 0; }
.fo-page.fo-page-31980 .fo-el.fo-el-c726841 .post-thumbnail-rollover {
	display: block; width: 100%; height: auto; aspect-ratio: 16 / 9 !important; max-height: 60vh;
	overflow: hidden; border-radius: 12px;
}
.fo-page.fo-page-31980 .fo-el.fo-el-c726841 .post-thumbnail-rollover img {
	display: block; width: 100% !important; height: 100% !important; max-width: none !important; max-height: none !important;
	aspect-ratio: auto !important; object-fit: cover !important; object-position: 50% 30%; border-radius: 0;
}

/* 5.6 Pages légales (conditions générales, confidentialité, mentions légales, règlement intérieur, cookies ; classe
       « fo-legal » posée par functions.php) : mise en page de lecture. Avant : lignes de 1160 px, 114 px entre le
       titre et le texte, sous-titres collés au paragraphe précédent, liens beige clair presque invisibles sur fond
       blanc, peu d'air avant le pied de page. Maintenant : une colonne de 760 px (≈ 75 signes par ligne), titre
       aligné sur le texte, sous-titres espacés, liens soulignés en or, 120 px avant le pied (80 px sur téléphone). */
body.fo-legal .fo-page.fo-page-31961.fo-tpl-boxed {
	box-sizing: border-box; max-width: 800px; margin-inline: auto; padding: 0 20px 120px;
}
body.fo-legal .fo-page-31961 .fo-el.fo-el-522d3281 { --margin-top: 88px; --margin-bottom: 0px; }
body.fo-legal .fo-page-31961 .fo-el.fo-el-522d3281 > .fo-con-inner { justify-content: flex-start; }
body.fo-legal .fo-page-31961 .fo-el.fo-el-7c6f8cf0 { width: 100%; max-width: 100%; text-align: left; }
body.fo-legal .fo-page-31961 .fo-el.fo-el-7c6f8cf0 > .fo-wc { margin: 0 !important; }
/* Texte calé sur le titre : sans le retrait de 10 px des colonnes et conteneurs d'Elementor. */
body.fo-legal .fo-page-31961 .fo-w-theme-post-content .fo-wrap.fo-populated { padding: 0 !important; }
body.fo-legal .fo-page-31961 .fo-w-theme-post-content .fo-page > .fo-el:first-child { --margin-top: 0px; --padding-top: 0px; margin-top: 0 !important; }
body.fo-legal .fo-page-31961 .fo-w-theme-post-content .fo-con { --padding-left: 0px; --padding-right: 0px; }
body.fo-legal .wp-site-blocks .fo-page-31961 .fo-el.fo-el-7c6f8cf0 .fo-h {
	font-size: clamp(34px, 4.4vw, 48px) !important; margin: 0 !important; text-align: left;
}
body.fo-legal .fo-page-31961 .fo-el.fo-el-7c6f8cf0 .fo-h::after {
	content: ""; display: block; width: 56px; height: 3px; margin-top: 20px; border-radius: 2px; background: #E3AA6F;
}
body.fo-legal .fo-page-31961 .fo-el.fo-el-56655dec {
	--padding-top: 0px; --padding-bottom: 0px; --padding-left: 0px; --padding-right: 0px; margin-top: 44px;
}
body.fo-legal .fo-page-31961 .fo-w-theme-post-content :is(p, li) {
	font-size: 17px; line-height: 1.65; color: #3d3d3d;
}
body.fo-legal .fo-page-31961 .fo-w-theme-post-content p { margin: 0 0 16px; }
body.fo-legal .fo-page-31961 .fo-w-theme-post-content :is(ul, ol) { margin: 0 0 18px; padding-left: 1.3em; }
body.fo-legal .fo-page-31961 .fo-w-theme-post-content li { margin: 0 0 6px; }
body.fo-legal .fo-page-31961 .fo-w-theme-post-content li::marker { color: #E3AA6F; }
body.fo-legal .fo-page-31961 .fo-w-theme-post-content :is(h2, h3) {
	margin: 48px 0 12px; color: #181818;
}
body.fo-legal .fo-page-31961 .fo-w-theme-post-content h2 { font-size: 24px; }
body.fo-legal .fo-page-31961 .fo-w-theme-post-content h3 { font-size: 19px; margin-top: 32px; }
body.fo-legal .fo-page-31961 .fo-w-theme-post-content :is(h2, h3):first-child { margin-top: 0; }
body.fo-legal .fo-page-31961 .fo-w-theme-post-content :is(strong, b) { color: #181818; font-weight: 600; }
body.fo-legal .fo-page-31961 .fo-w-theme-post-content a {
	color: #181818; text-decoration: underline; text-decoration-color: #E3AA6F; text-decoration-thickness: 2px;
	text-underline-offset: 3px; overflow-wrap: anywhere;
}
body.fo-legal .fo-page-31961 .fo-w-theme-post-content a:hover { color: #181818; background: #F7E9D9; }
body.fo-legal .fo-page-31961 .fo-w-theme-post-content > .fo-wc > .fo-page > :last-child,
body.fo-legal .fo-page-31961 .fo-w-theme-post-content :is(p, ul, ol):last-child { margin-bottom: 0; }
@media (max-width: 777px) {
	body.fo-legal .fo-page.fo-page-31961.fo-tpl-boxed { padding-bottom: 80px; }
	body.fo-legal .fo-page-31961 .fo-el.fo-el-522d3281 { --margin-top: 48px; }
	body.fo-legal .fo-page-31961 .fo-el.fo-el-56655dec { margin-top: 36px; }
	body.fo-legal .fo-page-31961 .fo-w-theme-post-content :is(p, li) { font-size: 16px; }
	body.fo-legal .fo-page-31961 .fo-w-theme-post-content :is(h2, h3) { margin-top: 36px; }
	body.fo-legal .fo-page-31961 .fo-w-theme-post-content h2 { font-size: 21px; }
}

/* 5.7 Pied de page : les séparateurs « | » entre les liens légaux étaient noirs sur fond noir (invisibles). */
.fo-location-footer .fo-w-nav-menu { --e-nav-menu-divider-color: rgba(253, 251, 248, 0.32); --e-nav-menu-divider-height: 0.9em; }
