/* ==========================================================================
   GM Froid — styles des composants
   Couleurs et polices : voir theme.json (variables --wp--preset--*)
   ========================================================================== */

body {
	--gm-navy: var(--wp--preset--color--navy);
	--gm-ice: var(--wp--preset--color--ice);
	--gm-accent: var(--wp--preset--color--accent);
	--gm-line: var(--wp--preset--color--line);
	--gm-muted: var(--wp--preset--color--muted);
	--gm-pale: var(--wp--preset--color--pale);
	--gm-radius: 10px;
}

body { -webkit-font-smoothing: antialiased; }
h1, h2, h3, h4, .wp-block-site-title { font-stretch: 85%; }
h1 { font-stretch: 80%; }
img { max-width: 100%; height: auto; }
:where(.wp-site-blocks) > * { margin-block-start: 0; }


/* ---------- Éléments réutilisables ---------- */
.gm-eyebrow {
	font-family: var(--wp--preset--font-family--mono);
	font-size: 13px !important;
	font-weight: 500;
	letter-spacing: 0.12em;
	text-transform: uppercase;
	color: var(--gm-accent);
	margin: 0;
}
.gm-tag {
	font-family: var(--wp--preset--font-family--mono);
	font-size: 13px !important;
	color: var(--gm-accent);
	margin: 0;
}
.gm-lead { font-size: 18px; color: var(--wp--preset--color--slate); }
.gm-mono { font-family: var(--wp--preset--font-family--mono); }

/* Bouton secondaire (contour) */
.wp-block-button.is-style-outline > .wp-block-button__link {
	background: transparent;
	color: inherit;
	border: 1px solid currentColor;
	padding: 14px 21px;
}
.gm-dark .wp-block-button.is-style-outline > .wp-block-button__link { color: #fff; border-color: #4A6378; }
.wp-block-button.is-style-outline > .wp-block-button__link:hover { background: rgba(143, 221, 245, 0.12); }

/* ---------- Sections sombres ---------- */
.gm-dark { background: var(--gm-navy); color: #fff; }
.gm-dark p { color: var(--gm-pale); }
.gm-dark .gm-eyebrow, .gm-dark .gm-tag { color: var(--gm-ice); }
.gm-dark a:not(.wp-block-button__link) { color: #fff; }
.gm-dark h1, .gm-dark h2, .gm-dark h3 { color: #fff; }

/* ---------- En-tête ---------- */
.gm-header { background: var(--gm-navy); border-bottom: 1px solid var(--wp--preset--color--navy-line); }
.gm-header a { text-decoration: none; }
.gm-header .wp-block-site-title a { color: #fff; }
.gm-header .gm-tagline { font-size: 12px !important; color: #9FB6C6; margin: 0; line-height: 1.2; }
.gm-header .wp-block-site-logo img { height: 45px; width: auto; }
.gm-header .wp-block-navigation { color: #E6EEF3; }
.gm-header .wp-block-navigation a:hover { color: var(--gm-ice); }
.gm-header .wp-block-navigation .wp-block-navigation__submenu-container {
	background: var(--gm-navy) !important;
	border: 1px solid var(--wp--preset--color--navy-line) !important;
	border-radius: 8px;
	padding: 8px 0;
	min-width: 240px !important;
}
.gm-header .wp-block-navigation .wp-block-navigation__submenu-container a { padding: 10px 18px; }
.gm-header .wp-block-navigation__responsive-container.is-menu-open { background: var(--gm-navy) !important; color: #fff !important; padding: 24px; }
.gm-header .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__submenu-container { border: 0 !important; background: transparent !important; }
.gm-tel a { color: #fff; font-family: var(--wp--preset--font-family--mono); font-size: 15px; white-space: nowrap; }
.gm-header .wp-block-button__link { padding: 12px 18px; font-size: 15px; white-space: nowrap; }
@media (max-width: 900px) {
	.gm-header .gm-tel, .gm-header .gm-header__cta { display: none; }
}

/* ---------- Héros ---------- */
.gm-hero h1 { margin: 0; }
.gm-hero .gm-hero__img img { width: 100%; height: 440px; object-fit: cover; border-radius: var(--gm-radius); display: block; }
.gm-hero--page .gm-hero__img img { height: 380px; }
@media (max-width: 760px) {
	.gm-hero .gm-hero__img img { height: 260px; }
}
.gm-breadcrumb { font-size: 14px; color: #9FB6C6 !important; margin: 0; }
.gm-breadcrumb a { color: #9FB6C6 !important; }

/* Bande des températures */
.gm-temp { border: 1px solid var(--wp--preset--color--navy-line); border-radius: var(--gm-radius); padding: 28px 28px 24px; display: flex; flex-direction: column; gap: 18px; }
.gm-temp__head { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px; }
.gm-temp__title { font-family: var(--wp--preset--font-family--display); font-weight: 700; font-size: 18px; color: #fff; }
.gm-temp__note { font-size: 14px; color: #9FB6C6; }
.gm-temp__bar { position: relative; height: 14px; border-radius: 7px; background: linear-gradient(90deg, #2D6FA3 0%, #3E8FC4 40%, #8FDDF5 100%); }
.gm-temp__bar span { position: absolute; top: -4px; height: 22px; border: 2px solid #fff; border-radius: 8px; box-sizing: border-box; }
.gm-temp__items { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 16px; }
.gm-temp__val { font-family: var(--wp--preset--font-family--mono); font-size: 22px; font-weight: 600; color: #fff; }
.gm-temp__lbl { font-size: 14px; color: var(--gm-pale); }

/* ---------- Bandeaux de logos ---------- */
.gm-logos { background: #fff; border-bottom: 1px solid var(--gm-line); }
.gm-logos--top { border-top: 1px solid var(--gm-line); }
.gm-logos__label { font-size: 14px !important; color: var(--gm-muted); margin: 0; max-width: 240px; }
.gm-logos .wp-block-image { margin: 0; }
.gm-logos .wp-block-image img { height: 46px !important; width: auto !important; max-width: 170px; object-fit: contain; border-radius: 0; }
.gm-logos .gm-logo--dark { background: var(--gm-navy); border-radius: 8px; padding: 6px 12px; }
.gm-logos .gm-logo--dark img { height: 52px !important; }

/* ---------- Cartes ---------- */
.gm-card { background: #fff; border: 1px solid var(--gm-line); border-radius: var(--gm-radius); overflow: hidden; display: flex; flex-direction: column; }
.gm-card > .wp-block-image { margin: 0; }
.gm-card > .wp-block-image img { width: 100%; height: 200px; object-fit: cover; border-radius: 0; display: block; }
.gm-card__body { padding: 22px; flex: 1; display: flex; flex-direction: column; }
.gm-card__body h3 { margin: 0; }
.gm-card__body p { margin: 0; font-size: 15px; color: var(--gm-muted); }
.gm-card__body .gm-card__more { margin-top: auto; padding-top: 6px; font-weight: 600; }
.gm-card__body .gm-card__more a { text-decoration: none; }
.gm-card:hover { border-color: #AFC0CC; }

/* ---------- Étapes ---------- */
.gm-steps { border-top: 2px solid var(--wp--preset--color--ink); }
.gm-step { padding-top: 24px; }
.gm-step__num { font-family: var(--wp--preset--font-family--mono); font-size: 14px !important; font-weight: 600; color: var(--gm-accent); margin: 0; }
.gm-step h3 { font-size: 21px; margin: 0; }
.gm-step p { font-size: 15px; color: var(--gm-muted); margin: 0; }

/* ---------- Chiffres clés ---------- */
.gm-stat { background: var(--wp--preset--color--mist); border-radius: var(--gm-radius); padding: 24px; }
.gm-stat__val { font-family: var(--wp--preset--font-family--display); font-weight: 800; font-size: 40px !important; line-height: 1.1; margin: 0; font-stretch: 85%; color: var(--wp--preset--color--ink); }
.gm-stat__lbl { font-size: 15px !important; color: var(--gm-muted); margin: 0; }

/* ---------- Photos encadrées ---------- */
.gm-photo img { width: 100%; object-fit: cover; border-radius: var(--gm-radius); display: block; }
.gm-photo--h280 img { height: 280px; }
.gm-photo--h300 img { height: 300px; }
.gm-photo--h220 img { height: 220px; }
.gm-photo--portrait img { width: 100%; height: auto !important; aspect-ratio: 3 / 4; object-fit: cover; }
.gm-photo--paysage img { width: 100%; height: auto !important; aspect-ratio: 16 / 9; object-fit: cover; object-position: center top; }

/* ---------- Réalisations (grille de requête) ---------- */
.gm-real .wp-block-post-featured-image img { height: 300px; width: 100%; object-fit: cover; }
.gm-real .wp-block-post-title { font-size: 19px; margin: 12px 0 4px; font-stretch: 85%; }
.gm-real .wp-block-post-title a { color: var(--wp--preset--color--ink); text-decoration: none; }
.gm-real .wp-block-post-title a:hover { color: var(--gm-accent); }
.gm-real .wp-block-post-terms { font-family: var(--wp--preset--font-family--mono); font-size: 13px; }
.gm-real .wp-block-post-terms a { color: var(--gm-accent); text-decoration: none; }
.gm-real .wp-block-post-excerpt { font-size: 15px; color: var(--gm-muted); }
.gm-real .wp-block-post-excerpt__excerpt { margin: 0; }
.gm-filtres { display: flex; flex-wrap: wrap; gap: 8px; margin: 0; padding: 0; list-style: none; }
.gm-filtres a { display: inline-block; padding: 8px 14px; border: 1px solid var(--gm-line); border-radius: 999px; background: #fff; color: var(--wp--preset--color--ink); text-decoration: none; font-size: 14px; }
.gm-filtres a:hover, .gm-filtres a[aria-current="page"] { background: var(--gm-navy); border-color: var(--gm-navy); color: #fff; }
.wp-block-gallery.has-nested-images figure.wp-block-image img { border-radius: 8px; }

/* ---------- Tableau technique ---------- */
.gm-spec { background: #fff; border: 1px solid var(--gm-line); border-radius: var(--gm-radius); overflow-x: auto; }
.gm-spec table { width: 100%; min-width: 720px; border-collapse: collapse; font-size: 15px; }
.gm-spec th, .gm-spec td { padding: 16px 22px; text-align: left; border: 0; border-bottom: 1px solid #E3E8EC; vertical-align: top; }
.gm-spec thead th { border-bottom: 2px solid var(--wp--preset--color--ink); font-family: var(--wp--preset--font-family--display); font-size: 20px; font-weight: 700; font-stretch: 85%; }
.gm-spec tbody th { font-weight: 500; color: var(--gm-muted); width: 22%; }
.gm-spec tbody tr:last-child th, .gm-spec tbody tr:last-child td { border-bottom: 0; }
.gm-spec .gm-mono { font-weight: 600; }
.wp-block-table.gm-spec { margin: 0; }
.wp-block-table.gm-spec thead { border-bottom: 0; }

/* Listes à puces techniques */
.gm-list { padding-left: 20px; margin: 0; }
.gm-list li { font-size: 15px; color: var(--wp--preset--color--slate); margin-bottom: 8px; }

/* Liste numérotée (bureau d'étude) */
.gm-numlist { list-style: none; padding: 0; margin: 0; border-top: 2px solid var(--wp--preset--color--ink); counter-reset: gm; }
.gm-numlist li { counter-increment: gm; display: flex; gap: 20px; padding: 20px 0; border-bottom: 1px solid var(--gm-line); font-size: 17px; }
.gm-numlist li::before { content: counter(gm, decimal-leading-zero); font-family: var(--wp--preset--font-family--mono); font-weight: 600; color: var(--gm-accent); }

/* ---------- Formulaire de devis ---------- */
.gm-devis { background: #fff; color: var(--wp--preset--color--ink); border-radius: 12px; padding: 32px; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.gm-devis label { display: flex; flex-direction: column; gap: 6px; font-size: 14px; font-weight: 500; color: var(--wp--preset--color--ink); }
.gm-devis input, .gm-devis select, .gm-devis textarea {
	min-height: 46px; border: 1px solid #B8C4CC; border-radius: 6px; padding: 0 12px; font: inherit; font-size: 16px; color: var(--wp--preset--color--ink); background: #fff; box-sizing: border-box; width: 100%;
}
.gm-devis textarea { padding: 10px 12px; resize: vertical; min-height: 110px; }
.gm-devis input:focus, .gm-devis select:focus, .gm-devis textarea:focus { outline: 2px solid var(--gm-accent); outline-offset: 1px; border-color: var(--gm-accent); }
.gm-devis__full { grid-column: 1 / -1; }
.gm-devis__piege { position: absolute !important; left: -10000px !important; width: 1px; height: 1px; overflow: hidden; }
.gm-devis__mention { font-size: 13px; color: var(--gm-muted) !important; margin: 0; }
.gm-devis__mention a { color: var(--gm-accent) !important; }
.gm-devis__envoyer { min-height: 52px; background: var(--gm-accent); color: #fff; border: 0; border-radius: 6px; font: 600 16px var(--wp--preset--font-family--body); cursor: pointer; }
.gm-devis__envoyer:hover { background: #08506C; }
.gm-devis__erreur { grid-column: 1 / -1; margin: 0; padding: 12px 14px; border-radius: 6px; background: #FEF3F2; color: #912018 !important; font-size: 15px; }
@media (max-width: 600px) {
	.gm-devis { grid-template-columns: 1fr; padding: 22px; }
}

/* Coordonnées */
.gm-coords { display: grid; grid-template-columns: 110px 1fr; gap: 12px 16px; margin: 8px 0 0; font-size: 16px; }
.gm-coords dt { color: #9FB6C6; }
.gm-coords dd { margin: 0; color: #fff; }
.gm-coords a { color: #fff; }
.gm-coords .gm-mono { font-family: var(--wp--preset--font-family--mono); }
.gm-whatsapp { display: inline-flex; align-items: center; gap: 8px; margin-top: 8px; padding: 12px 18px; border-radius: 6px; background: #25D366; color: #08141F !important; font-weight: 600; text-decoration: none; }

/* ---------- Pied de page ---------- */
.gm-footer { background: var(--wp--preset--color--navy-deep); color: #9FB6C6; font-size: 14px; }
.gm-footer p { margin: 0; color: #9FB6C6; }
.gm-footer a { color: #C9D6DF; }
.gm-footer h3 { color: #fff; font-size: 16px; font-family: var(--wp--preset--font-family--body); font-weight: 600; font-stretch: normal; margin: 0 0 8px; }
.gm-footer ul { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 8px; }
.gm-footer .wp-block-site-logo img { height: 56px; width: auto; }
.gm-footer__bottom { border-top: 1px solid #1A2C3D; }

/* ---------- Appel à l'action ---------- */
.gm-cta h2 { font-size: clamp(28px, 3.4vw, 38px); }

/* ---------- Contenus génériques (pages texte) ---------- */
.gm-prose h2 { font-size: 28px; margin-top: 40px; }
.gm-prose p, .gm-prose li { color: var(--wp--preset--color--slate); }
.wp-block-post-featured-image.gm-photo img { max-height: 560px; width: 100%; object-fit: cover; }

/* Sections blanches et en-têtes de section */
.gm-white { background: #fff; border-top: 1px solid var(--gm-line); border-bottom: 1px solid var(--gm-line); }
.gm-head__text { max-width: 720px; }
.gm-head__text h2, .wp-block-group > h2 { margin: 0; }
.gm-hero .wp-block-columns { margin: 0; }
.gm-spec tbody td:first-child { font-weight: 500; color: var(--gm-muted); width: 22%; }
.gm-spec .gm-mono { font-family: var(--wp--preset--font-family--mono); }
.gm-numlist li { margin: 0; }

/* Sections pleine largeur collées les unes aux autres */
.wp-block-post-content > .alignfull { margin-block-start: 0 !important; margin-block-end: 0 !important; }
.wp-site-blocks > main, .wp-site-blocks > footer { margin-block-start: 0 !important; }
.gm-logos .wp-block-image { flex-shrink: 0; }
.gm-logos > .wp-block-group { flex-wrap: nowrap !important; gap: 64px !important; }
.gm-logos__label { flex: 0 0 220px; }
.gm-logos__row { flex: 1 1 auto; justify-content: space-between !important; column-gap: 32px !important; row-gap: 20px; }
@media (max-width: 900px) {
	.gm-logos > .wp-block-group { flex-wrap: wrap !important; gap: 20px !important; }
	.gm-logos__label { flex-basis: 100%; max-width: none; }
	.gm-logos__row { display: grid !important; grid-template-columns: repeat(3, 1fr); justify-items: center; width: 100%; gap: 24px 16px !important; }
	.gm-logos .wp-block-image img { max-width: 100%; height: 40px !important; }
	.gm-logos__row:has(> :nth-child(4):last-child) { grid-template-columns: repeat(2, 1fr); }
}
.gm-stats.is-layout-grid { grid-template-columns: repeat(auto-fit, minmax(min(220px, 100%), 1fr)) !important; }
.gm-devis__lbl b { color: #B42318; font-weight: 600; }

/* Grilles : les colonnes occupent toute la largeur (pas de colonne vide) */
.gm-g210.is-layout-grid { grid-template-columns: repeat(auto-fit, minmax(min(210px, 100%), 1fr)) !important; }
.gm-g220.is-layout-grid { grid-template-columns: repeat(auto-fit, minmax(min(220px, 100%), 1fr)) !important; }
.gm-g230.is-layout-grid { grid-template-columns: repeat(auto-fit, minmax(min(230px, 100%), 1fr)) !important; }
.gm-g240.is-layout-grid { grid-template-columns: repeat(auto-fit, minmax(min(240px, 100%), 1fr)) !important; }
.gm-g260.is-layout-grid { grid-template-columns: repeat(auto-fit, minmax(min(260px, 100%), 1fr)) !important; }
.gm-g280.is-layout-grid { grid-template-columns: repeat(auto-fit, minmax(min(280px, 100%), 1fr)) !important; }
.gm-numlist li::before { flex-shrink: 0; min-width: 24px; }
.wp-block-gallery.has-nested-images figure.wp-block-image img { aspect-ratio: 4 / 3; object-fit: cover; }
@media (max-width: 781px) { .gm-real .wp-block-post-template.is-layout-grid { grid-template-columns: 1fr !important; } }

/* Marges latérales des sections pleine largeur (mobile et desktop) */
.wp-site-blocks .alignfull.wp-block-group.is-layout-constrained {
	padding-left: clamp(20px, 3vw, 32px) !important;
	padding-right: clamp(20px, 3vw, 32px) !important;
}
.gm-g300.is-layout-grid { grid-template-columns: repeat(auto-fit, minmax(min(300px, 100%), 1fr)) !important; }

/* ------------------------------------------------------------------
   Liens : pas de soulignement par défaut, sauf dans un texte courant.
   ------------------------------------------------------------------ */
a { text-decoration: none; text-underline-offset: 3px; text-decoration-thickness: 1px; transition: color .15s ease, border-color .15s ease, background-color .15s ease; }
a:hover { text-decoration: underline; }
a:focus-visible { outline: 2px solid var(--gm-accent); outline-offset: 3px; border-radius: 3px; }
.gm-dark a:focus-visible, .gm-footer a:focus-visible { outline-color: var(--gm-ice); }

/* Liens au fil d'un texte (politique de confidentialité, mention du formulaire) : soulignement discret. */
.gm-prose p a, .gm-prose li a, .gm-devis__mention a { text-decoration: underline; text-decoration-color: color-mix(in srgb, currentColor 35%, transparent); }
.gm-prose p a:hover, .gm-prose li a:hover, .gm-devis__mention a:hover { text-decoration-color: currentColor; }

/* Lien d'action autonome : petit bouton contour avec flèche. */
a.gm-lien {
	display: inline-flex; align-items: center; gap: 10px;
	padding: 11px 18px; border: 1.5px solid var(--gm-line); border-radius: 6px;
	background: #fff; color: var(--wp--preset--color--ink) !important;
	font-weight: 600; font-size: 15px; line-height: 1.2; white-space: nowrap;
}
a.gm-lien::after { content: "→"; color: var(--gm-accent); transition: transform .15s ease; }
a.gm-lien:hover { text-decoration: none; border-color: var(--gm-accent); color: var(--gm-accent) !important; }
a.gm-lien:hover::after { transform: translateX(3px); }
a.gm-lien--retour::after { content: none; }
a.gm-lien--retour::before { content: "←"; color: var(--gm-accent); transition: transform .15s ease; }
a.gm-lien--retour:hover::before { transform: translateX(-3px); }
a.gm-lien--externe::after { content: "↗"; }
a.gm-lien--externe:hover::after { transform: translate(2px, -2px); }
.gm-dark a.gm-lien { background: transparent; border-color: #4A6378; color: #fff !important; }
.gm-dark a.gm-lien::after, .gm-dark a.gm-lien::before { color: var(--gm-ice); }
.gm-dark a.gm-lien:hover { border-color: var(--gm-ice); color: var(--gm-ice) !important; }

/* « En savoir plus » dans les cartes : texte en couleur, flèche qui avance. */
a.gm-lien-fleche { display: inline-flex; align-items: center; gap: 8px; color: var(--gm-accent); font-weight: 600; }
a.gm-lien-fleche::after { content: "→"; transition: transform .15s ease; }
a.gm-lien-fleche:hover { text-decoration: none; }
a.gm-lien-fleche:hover::after, .gm-card:hover a.gm-lien-fleche::after { transform: translateX(4px); }

/* Fil d'Ariane, étiquettes, coordonnées, pied de page : pas de soulignement, couleur au survol. */
.gm-breadcrumb a:hover { color: #fff !important; text-decoration: none; }
a[href^="tel:"], a[href^="mailto:"] { white-space: nowrap; }
.gm-coords a:hover, .gm-dark a[href^="tel:"]:hover, .gm-dark a[href^="mailto:"]:hover { color: var(--gm-ice); text-decoration: none; }
.gm-tag a { display: inline-block; padding: 3px 10px; border-radius: 999px; background: color-mix(in srgb, var(--gm-accent) 10%, transparent); color: var(--gm-accent); }
.gm-tag a:hover { background: var(--gm-accent); color: #fff; text-decoration: none; }
.gm-footer a { text-decoration: none; }
.gm-footer a:hover { color: #fff; text-decoration: none; }
.gm-reseaux { display: flex; gap: 8px; flex-wrap: wrap; }
.gm-footer__bottom a { display: inline-flex; align-items: center; padding: 6px 12px; border: 1px solid #2A4559; border-radius: 999px; }
.gm-footer__bottom a:hover { border-color: #4A6378; }
.gm-real a:hover, .wp-block-image a:hover { text-decoration: none; }
.gm-dark .gm-tag a { background: rgba(143, 221, 245, 0.14); color: var(--gm-ice); }
.gm-dark .gm-tag a:hover { background: var(--gm-ice); color: var(--gm-navy); }

/* Encart mis en avant (automatisme de basculement, accueil) */
.gm-encart { background: var(--wp--preset--color--mist, #F2F6F8); border: 1px solid var(--gm-line); border-left: 4px solid var(--gm-accent); border-radius: var(--gm-radius); padding: 32px 36px; }
.gm-encart h3 { font-size: 26px; margin: 0; }
.gm-encart .gm-list { margin: 0; }
@media (max-width: 781px) { .gm-encart { padding: 24px 20px; } }

/* Bande de 4 photos verticales (Salles blanches) : 4 colonnes, 2 sur mobile */
.gm-photos4.is-layout-grid { grid-template-columns: repeat(4, 1fr) !important; }
@media (max-width: 781px) { .gm-photos4.is-layout-grid { grid-template-columns: repeat(2, 1fr) !important; gap: 12px !important; } }
