/*
Theme Name: TERRA
Description: Thème du site solution-terra.com, reconstruit à partir du site React (branche securite/aout-2026). Couleurs, typographie et gabarits repris à l'identique.
Author: TERRA
Version: 0.1.0
Requires at least: 6.6
Requires PHP: 8.1
Text Domain: terra
License: Propriétaire
*/

/* Le design (couleurs, polices, espacements, boutons) vit dans theme.json.
   Ce fichier ne porte que ce que theme.json ne sait pas exprimer. */

/* En-tête collant, fond blanc translucide (Header.tsx) */
.terra-header {
	position: sticky;
	top: 0;
	z-index: 50;
	backdrop-filter: blur(12px);
	-webkit-backdrop-filter: blur(12px);
}

/* Liens du menu en pilule, fond gris au survol */
.terra-header .wp-block-navigation .wp-block-navigation-item__content {
	padding: 0.5rem 1rem;
	border-radius: 9999px;
	transition: background-color 0.2s ease;
}
.terra-header .wp-block-navigation .wp-block-navigation-item__content:hover {
	background-color: var(--wp--preset--color--muted);
}
.terra-header .wp-block-navigation .current-menu-item > .wp-block-navigation-item__content {
	background-color: var(--wp--preset--color--primary);
	color: var(--wp--preset--color--white);
}

/* Sous-menus : carte blanche arrondie avec ombre */
.terra-header .wp-block-navigation__submenu-container {
	border: 1px solid var(--wp--preset--color--border) !important;
	border-radius: 1rem;
	padding: 0.5rem !important;
	box-shadow: 0 16px 40px -12px rgb(16 5 107 / 0.12);
	min-width: 18rem !important;
}
.terra-header .wp-block-navigation__submenu-container .wp-block-navigation-item__content {
	border-radius: 0.5rem;
}

/* Bouton CTA : léger soulèvement au survol (variante "cta" de button.tsx) */
.wp-block-button__link {
	transition: transform 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
	box-shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1);
}
.wp-block-button__link:hover {
	transform: translateY(-2px);
	box-shadow: 0 10px 15px -3px rgb(0 0 0 / 0.1);
}

/* Logo blanc sur fond bleu (pied de page) */
.terra-logo-blanc img {
	filter: brightness(0) invert(1);
}

/* Liens du pied de page : blanc à 80 %, blanc plein au survol */
.terra-footer a {
	color: rgb(255 255 255 / 0.8);
	text-decoration: none;
	transition: color 0.2s ease;
}
.terra-footer a:hover {
	color: var(--wp--preset--color--white);
}
.terra-footer .terra-footer-liste {
	list-style: none;
	padding-left: 0;
}
.terra-footer .terra-footer-liste li + li {
	margin-top: 0.75rem;
}

/* Classes utilitaires reprises de index.css, sélectionnables dans « Classe CSS additionnelle » */

/* .badge-pill : petite étiquette en capitales */
.badge-pill {
	display: inline-flex;
	align-items: center;
	padding: 0.375rem 1rem;
	border-radius: 9999px;
	font-size: 0.75rem;
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: 0.05em;
}

/* .card-modern : carte blanche qui se soulève au survol */
.card-modern {
	background: var(--wp--preset--color--white);
	border: 1px solid rgb(226 228 233 / 0.5);
	border-radius: 1rem;
	box-shadow: 0 2px 16px -4px rgb(16 5 107 / 0.06);
	transition: box-shadow 0.3s ease, transform 0.3s ease;
}
.card-modern:hover {
	box-shadow: 0 16px 40px -12px rgb(16 5 107 / 0.12);
	transform: translateY(-4px);
}

/* .headline-accent : mot mis en valeur en jaune dans un titre */
.headline-accent {
	color: var(--wp--preset--color--accent);
}

/* Contenu des articles de blog (index.css, .blog-article-content) */
.single .wp-block-post-content {
	font-size: 1.0625rem;
	line-height: 1.9;
	color: var(--wp--preset--color--muted-foreground);
}
.single .wp-block-post-content h2 {
	margin-top: 3.5rem;
	padding-top: 2rem;
	border-top: 2px solid rgb(226 228 233 / 0.3);
}
.single .wp-block-post-content h2:first-child {
	margin-top: 0;
	padding-top: 0;
	border-top: 0;
}
.single .wp-block-post-content strong {
	color: var(--wp--preset--color--primary);
}

@media (prefers-reduced-motion: reduce) {
	.card-modern,
	.wp-block-button__link {
		transition: none;
	}
	.card-modern:hover,
	.wp-block-button__link:hover {
		transform: none;
	}
}

/* Bouton « Nous contacter » de l'en-tête : masqué sous 1024 px, comme sur le site React */
@media (max-width: 1023px) {
	.terra-header-cta {
		display: none !important;
	}
}

/* En-tête, contenu et pied de page collés, pied de page toujours en bas de l'écran */
.wp-site-blocks {
	display: flex;
	flex-direction: column;
	min-height: 100vh;
}
.wp-site-blocks > * {
	margin-block-start: 0;
}
.wp-site-blocks > main,
.wp-site-blocks > .wp-block-group:has(> main),
.wp-site-blocks > main.wp-block-group {
	flex: 1;
}

/* Lot 1 — sections de l'accueil en blocs natifs, également dans l'éditeur. */
.terra-section,.terra-hero,.terra-cta { box-sizing:border-box; }
.home .wp-block-post-content { margin-block:0; }
.home .wp-block-post-content > * { margin-block-start:0; }
.terra-container { max-width:var(--wp--style--global--wide-size); margin-inline:auto; padding-inline:var(--wp--preset--spacing--50); }
.terra-section > .terra-container { box-sizing:border-box; }
.terra-container > * + * { margin-top:var(--wp--preset--spacing--60); }
.terra-container p { line-height:1.65; }
.terra-container h2 { margin-top:var(--wp--preset--spacing--30); }
.terra-container .wp-block-columns { gap:var(--wp--preset--spacing--50); }
.terra-container .wp-block-column { min-width:0; }
.terra-center { text-align:center; }
.terra-center > p:not(.badge-pill) { max-width:48rem; margin-inline:auto; }
.terra-center .wp-block-buttons { justify-content:center; }
.terra-center > .badge-pill { margin-inline:auto; }
.terra-section .badge-pill { border:1px solid var(--wp--preset--color--border); font-size:.75rem !important; }
.terra-section.has-primary-background-color .badge-pill { color:var(--wp--preset--color--white) !important; background:color-mix(in srgb,var(--wp--preset--color--white) 10%,transparent); border:0; }
.terra-hero { padding:13rem 0 1rem; min-height:0; }
.terra-hero .terra-container { width:100%; }
.terra-hero-columns { align-items:flex-end !important; gap:var(--wp--preset--spacing--60) !important; }
.terra-hero-columns > .wp-block-column:first-child { flex-basis:60% !important; }
.terra-hero-columns > .wp-block-column:last-child { flex-basis:40% !important; }
.terra-hero-title { font-family:var(--wp--preset--font-family--cinzel); display:flex; flex-wrap:wrap; align-items:baseline; gap:var(--wp--preset--spacing--40); letter-spacing:.025em; line-height:1.1; }
.terra-hero-tagline { font-family:var(--wp--preset--font-family--inter); color:var(--wp--preset--color--accent); font-size:clamp(1.25rem,2.1vw,1.875rem); font-weight:600; letter-spacing:normal; }
.terra-hero .wp-block-buttons { gap:var(--wp--preset--spacing--20); flex-wrap:nowrap; }
.terra-hero .wp-block-button__link { padding-inline:var(--wp--preset--spacing--40); white-space:nowrap; }
.terra-expertises { background:var(--wp--preset--color--white); color:var(--wp--preset--color--primary); border-radius:1rem; padding:var(--wp--preset--spacing--40) var(--wp--preset--spacing--50); margin-top:8rem !important; margin-bottom:0; gap:0 !important; }
.terra-expertises > .wp-block-column + .wp-block-column { border-left:1px solid var(--wp--preset--color--border); padding-left:var(--wp--preset--spacing--40); }
.terra-expertise { padding-inline:var(--wp--preset--spacing--30); }
.terra-expertise p { margin:0; }
.terra-expertise-label { font-size:.65rem !important; text-transform:uppercase; letter-spacing:.1em; }
.terra-expertise a { font-weight:700; }
.terra-clients { padding-block:var(--wp--preset--spacing--60) !important; }
.terra-client-gallery { display:grid !important; grid-template-columns:repeat(6,minmax(0,1fr)); gap:var(--wp--preset--spacing--50) !important; }
.terra-client-gallery .wp-block-image { width:100% !important; margin:0 !important; }
.terra-client-gallery img { height:3.5rem !important; width:100% !important; object-fit:contain !important; }
.terra-invert img { filter:invert(1); }
.terra-stat { font-weight:700; line-height:1 !important; margin-bottom:var(--wp--preset--spacing--30); }
.terra-photo img { aspect-ratio:4/3; object-fit:cover; border-radius:1.5rem; width:100%; }
.terra-section .card-modern { padding:var(--wp--preset--spacing--50); height:100%; box-sizing:border-box; }
.terra-section .card-modern h3 { font-size:var(--wp--preset--font-size--large); }
.terra-icon { display:inline-flex; align-items:center; justify-content:center; background:var(--wp--preset--color--muted); border-radius:1rem; padding:var(--wp--preset--spacing--30); margin-top:0; }
.terra-grid-two { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:var(--wp--preset--spacing--40); }
.terra-grid-two > * { margin:0; }
.terra-keywords-section { padding-block:var(--wp--preset--spacing--50) !important; border-block:1px solid var(--wp--preset--color--border); }
.terra-keywords { font-weight:700; text-align:center; }
.terra-dark h2,.terra-dark a { color:var(--wp--preset--color--white) !important; }
.terra-sector { border-top:1px solid color-mix(in srgb,var(--wp--preset--color--white) 25%,transparent); padding-block:var(--wp--preset--spacing--30); }
.terra-sector summary { cursor:pointer; font-weight:700; padding:var(--wp--preset--spacing--30); border-radius:.75rem; color:var(--wp--preset--color--white); background:color-mix(in srgb,var(--wp--preset--color--white) 8%,transparent); }
.terra-sector[open] summary { border-top:2px solid var(--wp--preset--color--accent); }
.terra-solution-card { background:color-mix(in srgb,var(--wp--preset--color--white) 18%,transparent); border:1px solid color-mix(in srgb,var(--wp--preset--color--white) 15%,transparent); border-radius:1.5rem; padding:var(--wp--preset--spacing--40); height:100%; box-sizing:border-box; }
.terra-solution-card h3 { font-size:var(--wp--preset--font-size--large); }
.terra-solution-image img { aspect-ratio:16/10; object-fit:cover; width:100%; border-radius:1rem; }
.terra-cee { display:flex; align-items:center; gap:var(--wp--preset--spacing--20); }
.terra-cee > * { margin:0; }
.terra-cee img { width:2.5rem; height:1.25rem; object-fit:contain; }
.terra-step { font-weight:700; }
.terra-latest-posts .wp-block-post-template { gap:var(--wp--preset--spacing--40); }
.terra-cta { padding:var(--wp--preset--spacing--70) var(--wp--preset--spacing--50); }
.terra-cta .wp-block-cover__inner-container { max-width:64rem; }
.terra-cta h2 { font-size:var(--wp--preset--font-size--huge); }
.terra-cta .badge-pill { background:color-mix(in srgb,var(--wp--preset--color--white) 10%,transparent); }
.home .terra-header { position:fixed; left:0; right:0; background:transparent !important; border-color:transparent !important; backdrop-filter:none; }
.home .terra-header > .wp-block-group { min-height:4rem; }
.home .terra-header figure img { filter:brightness(0) invert(1); }
.home .terra-header .wp-block-navigation-item__content,.home .terra-header .wp-block-navigation__responsive-container-open { color:var(--wp--preset--color--white); }
.home .terra-header .wp-block-navigation__submenu-container .wp-block-navigation-item__content,.home .terra-header .is-menu-open .wp-block-navigation-item__content { color:var(--wp--preset--color--primary); }
@media (max-width:1100px) {
 .terra-hero .wp-block-buttons { flex-wrap:wrap; }
 .terra-container .wp-block-columns:has(> .wp-block-column:nth-child(4)) { flex-wrap:wrap !important; }
 .terra-container .wp-block-columns:has(> .wp-block-column:nth-child(4)) > .wp-block-column { flex-basis:calc(50% - var(--wp--preset--spacing--50)) !important; }
}
@media (max-width:781px) {
 .terra-container { padding-inline:var(--wp--preset--spacing--30); }
 .terra-hero { padding-top:8rem; }
 .terra-hero-columns > .wp-block-column { flex-basis:100% !important; }
 .terra-hero .wp-block-buttons { flex-direction:column; align-items:stretch; }
 .terra-hero .wp-block-button { width:100%; }
 .terra-expertises { margin-top:var(--wp--preset--spacing--60) !important; padding:var(--wp--preset--spacing--30); }
 .terra-expertises > .wp-block-column + .wp-block-column { border-left:0; border-top:1px solid var(--wp--preset--color--border); padding-left:0; padding-top:var(--wp--preset--spacing--30); }
 .terra-expertise { padding:var(--wp--preset--spacing--20); }
 .terra-client-gallery { grid-template-columns:repeat(3,minmax(0,1fr)); }
 .terra-grid-two { grid-template-columns:1fr; }
 .terra-container .wp-block-columns:has(> .wp-block-column:nth-child(4)) > .wp-block-column { flex-basis:100% !important; }
 .terra-latest-posts .wp-block-post-template { grid-template-columns:1fr; }
 .terra-cta { padding-inline:var(--wp--preset--spacing--30); }
}
.terra-icon.wp-block-image { width:3.5rem; height:3.5rem; box-sizing:border-box; margin-bottom:var(--wp--preset--spacing--40); }
.terra-icon.wp-block-image img { width:1.5rem; height:1.5rem; }
.terra-center .terra-icon { margin-inline:auto; }
.terra-expertise { display:grid; grid-template-columns:2.75rem 1fr; column-gap:var(--wp--preset--spacing--30); align-items:center; }
.terra-expertise-icon { grid-row:1/3; margin:0; padding:.7rem; border-radius:1rem; background:var(--wp--preset--color--muted); }
.terra-expertise-icon img { display:block; width:1.25rem; height:1.25rem; }
.terra-expertise > p { grid-column:2; }

.home .terra-header .wp-block-navigation__submenu-icon { color:var(--wp--preset--color--white); }
.home .terra-header.terra-header-scrolled { background:var(--wp--preset--color--white) !important; border-color:var(--wp--preset--color--border) !important; }
.home .terra-header.terra-header-scrolled figure img { filter:none; }
.home .terra-header.terra-header-scrolled .wp-block-navigation-item__content,
.home .terra-header.terra-header-scrolled .wp-block-navigation__responsive-container-open,
.home .terra-header.terra-header-scrolled .wp-block-navigation__submenu-icon,
.home .terra-header .wp-block-navigation-item__content:hover { color:var(--wp--preset--color--primary); }

/* Lot 4 : encadrés des articles de blog (repris de BlogComponents.tsx) */
.terra-callout, .terra-statcard, .terra-tip { border-radius:1rem; margin-block:2rem; }
.terra-callout { padding:1.5rem 1.75rem; border:1px solid var(--wp--preset--color--border); background:color-mix(in srgb, var(--wp--preset--color--muted) 70%, transparent); }
.terra-callout.is-green, .terra-tip { background:hsl(160 50% 95%); }
.terra-callout.is-green { border-color:hsl(160 50% 80%); }
.terra-callout.is-blue { background:hsl(220 60% 96%); border-color:hsl(220 60% 82%); }
.terra-callout.is-amber { background:hsl(40 80% 95%); border-color:hsl(40 80% 78%); }
.terra-callout__title { font-weight:700; font-size:1.125rem; margin-bottom:.75rem; }
.terra-callout > *:not(.terra-callout__title) { color:var(--wp--preset--color--muted-foreground); }
.terra-callout strong { color:var(--wp--preset--color--primary); }
.terra-statgrid { display:grid; grid-template-columns:1fr; gap:1rem; margin-block:2rem; }
@media (min-width:640px) { .terra-statgrid { grid-template-columns:repeat(2,1fr); } }
.terra-statgrid > .terra-statcard { margin:0; padding:1.25rem 1.5rem; background:color-mix(in srgb, var(--wp--preset--color--muted) 60%, transparent); border:1px solid var(--wp--preset--color--border); }
.terra-statcard p { margin:0; }
.terra-statcard__icon { font-size:1.5rem; margin-bottom:.5rem !important; }
.terra-statcard__value { font-weight:700; font-size:1.375rem; color:var(--wp--preset--color--primary); }
.terra-statcard__label { color:var(--wp--preset--color--muted-foreground); font-size:.875rem; line-height:1.6; }
.terra-tip { padding:1.25rem 1.5rem; border-left:4px solid var(--wp--preset--color--accent); font-weight:500; }
.terra-tip p { margin:0; }
.terra-checklist { list-style:none; padding-left:0; }
.terra-checklist li { padding-left:1.75rem; position:relative; }
.terra-checklist li::before { content:"✓"; position:absolute; left:0; color:var(--wp--preset--color--teal); font-weight:700; }

/* Lot 3 : pages locales */
.terra-page .section-container.terra-local-content { max-width:56rem; margin-inline:auto; }
.terra-page .terra-local-content > p, .terra-page .terra-local-content li { color:var(--wp--preset--color--muted-foreground); line-height:1.8; font-size:1.0625rem; }
.terra-page .terra-local-content > h2 { margin-top:2.5rem; margin-bottom:1rem; }
.terra-page .terra-local-content > h2:first-child { margin-top:0; }
.terra-local-solutions { display:grid; grid-template-columns:repeat(auto-fit,minmax(16rem,1fr)); gap:1.25rem; }
.terra-local-solution { padding:1.5rem; }
.terra-local-solution p { margin:0 0 .25rem; }
.terra-local-solution a { text-decoration:none; color:var(--wp--preset--color--primary); }
