/* ============================================================
   Revelium — composants
   Complément de theme.json : uniquement ce qui n'est pas
   exprimable en tokens (pseudo-éléments, survols, dégradés).
   Les sélecteurs suivent les variations de style enregistrées
   dans functions.php (.is-style-*), jamais des classes libres.
   ============================================================ */

:root {
	--rev-radius: var(--wp--custom--radius, 14px);
	--rev-line: var(--wp--preset--color--line);
}

html { scroll-behavior: smooth; scroll-padding-top: 7rem; }

@media (prefers-reduced-motion: reduce) {
	html { scroll-behavior: auto; }
	*, *::before, *::after {
		animation-duration: 0.01ms !important;
		animation-iteration-count: 1 !important;
		transition-duration: 0.01ms !important;
	}
}

/* ---------- Accessibilité ---------- */

/* Indicateur de focus visible (WCAG 2.4.7 / 1.4.11).
   Vert profond sur crème = 10:1 ; inversé sur les fonds sombres. */
:where(a, button, input, select, textarea, summary, [tabindex]):focus-visible {
	outline: 3px solid var(--wp--preset--color--green-dark);
	outline-offset: 3px;
	border-radius: 4px;
}

.is-style-cta :focus-visible { outline-color: var(--wp--preset--color--cream); }

/* Masquage visuel accessible */
.screen-reader-text {
	position: absolute !important;
	width: 1px;
	height: 1px;
	padding: 0;
	margin: -1px;
	overflow: hidden;
	clip-path: inset(50%);
	white-space: nowrap;
	border: 0;
}

/* Lien d'évitement : révélé au focus clavier */
.skip-link.screen-reader-text:focus {
	position: fixed !important;
	top: 0.75rem;
	left: 0.75rem;
	z-index: 100;
	width: auto;
	height: auto;
	margin: 0;
	padding: 0.75rem 1.4rem;
	overflow: visible;
	clip-path: none;
	border-radius: 999px;
	background: var(--wp--preset--color--green-dark);
	color: #ffffff;
	font-size: 0.95rem;
	font-weight: 500;
	text-decoration: none;
}

/* ---------- Sections ---------- */

/* Dégradés d'ambiance : trop composites pour theme.json. */
.is-style-hero {
	background:
		radial-gradient(60rem 30rem at 110% -10%, rgba(194, 145, 79, 0.08), transparent 60%),
		radial-gradient(50rem 30rem at -20% 110%, rgba(64, 88, 74, 0.07), transparent 60%);
	border-bottom: 1px solid var(--rev-line);
}

.is-style-cta {
	background-image: radial-gradient(50rem 25rem at 80% 0%, rgba(194, 145, 79, 0.15), transparent 60%);
}
.is-style-cta :where(h1, h2, h3) { color: #ffffff; }
.is-style-cta p { color: rgba(244, 241, 232, 0.8); }

.wp-block-image figcaption {
	font-size: 0.85rem;
	font-style: italic;
	color: var(--wp--preset--color--ink-soft);
	text-align: left;
}

/* ---------- Boutons ---------- */
.wp-block-button__link {
	transition: background 0.25s ease, color 0.25s ease, transform 0.25s ease;
}
.wp-block-button__link:hover { transform: translateY(-2px); }

.is-style-contour .wp-block-button__link:hover {
	background: var(--wp--preset--color--green-light);
	color: var(--wp--preset--color--green);
}
.is-style-clair .wp-block-button__link:hover { background: #ffffff; }

/* ---------- En-tête ---------- */
.site-header {
	position: sticky;
	top: 0;
	z-index: 50;
	background: rgba(250, 246, 239, 0.92);
	backdrop-filter: blur(8px);
	border-bottom: 1px solid var(--rev-line);
}

/* L'en-tête n'est pas un conteneur « constrained » : on rejoue la gouttière
   racine à la main pour rester aligné sur le contenu. */
.header-inner {
	max-width: calc(1140px + var(--wp--style--root--padding-left) + var(--wp--style--root--padding-right));
	margin-inline: auto;
	padding-block: 0.8rem;
	padding-inline: var(--wp--style--root--padding-left) var(--wp--style--root--padding-right);
	gap: 1.5rem;
}

/* Logo du site (SVG large, ratio ~2,18:1) : la hauteur pilote la taille. */
.wp-block-site-logo,
.wp-block-site-logo .custom-logo-link {
	display: block;
	width: auto;
	line-height: 0;
}
.wp-block-site-logo img {
	width: auto;
	max-width: 100%;
	height: auto;
	border-radius: 0;
	box-shadow: none;
}

.site-header .wp-block-site-logo img { height: 64px; }
@media (max-width: 781px) {
	.site-header .wp-block-site-logo img { height: 48px; }
}

.site-footer .wp-block-site-logo { margin-bottom: 0.6rem; }
.site-footer .wp-block-site-logo img { height: 46px; }

/* Navigation */
.site-header .wp-block-navigation a {
	font-size: 0.95rem;
	letter-spacing: 0.03em;
	transition: color 0.2s ease;
	text-decoration: none;
}
.site-header .wp-block-navigation a:hover {
	color: var(--wp--preset--color--green);
	text-decoration: none;
}

/* Soulignement qui apparaît en fondu au survol (hors bouton « devis »). */
.site-header .wp-block-navigation :not(.nav-cta) > .wp-block-navigation-item__content {
	position: relative;
}
.site-header .wp-block-navigation :not(.nav-cta) > .wp-block-navigation-item__content::after {
	content: "";
	position: absolute;
	inset-inline: 0;
	bottom: -0.4em;
	height: 1px;
	background: currentColor;
	opacity: 0;
	transition: opacity 0.3s ease;
}
.site-header .wp-block-navigation :not(.nav-cta) > .wp-block-navigation-item__content:hover::after,
.site-header .wp-block-navigation :not(.nav-cta) > .wp-block-navigation-item__content:focus-visible::after {
	opacity: 1;
}

/* Bouton devis dans le menu */
.site-header .wp-block-navigation .nav-cta a {
	padding: 0.55rem 1.3rem;
	border-radius: 999px;
	background: var(--wp--preset--color--green);
	color: #ffffff;
	transition: background 0.2s ease;
}
.site-header .wp-block-navigation .nav-cta a:hover {
	background: var(--wp--preset--color--green-dark);
	color: #ffffff;
}

/* Panneau mobile du bloc navigation */
.wp-block-navigation__responsive-container.is-menu-open {
	background: var(--wp--preset--color--cream);
}

/* ---------- Emplacement image (héro accueil en attente de photo) ---------- */
.img-placeholder {
	display: grid;
	place-items: center;
	text-align: center;
	aspect-ratio: 4 / 5;
	background:
		repeating-linear-gradient(45deg, transparent 0 14px, rgba(64, 88, 74, 0.04) 14px 28px),
		var(--wp--preset--color--green-light);
	border: 1px dashed #b7c4b6;
	border-radius: var(--rev-radius);
	color: var(--wp--preset--color--ink-soft);
	font-size: 0.85rem;
	letter-spacing: 0.05em;
}

.hero-frame { position: relative; }
.hero-frame::before {
	content: "";
	position: absolute;
	inset: -14px 14px 14px -14px;
	border: 1px solid var(--wp--preset--color--ochre);
	border-radius: var(--rev-radius);
	opacity: 0.5;
	pointer-events: none;
}

/* ---------- Photos ---------- */
.is-style-photo img,
img.is-style-photo {
	border-radius: var(--rev-radius);
	box-shadow: 0 12px 30px rgba(46, 53, 46, 0.10);
}

/* ---------- Bandeau de logos ---------- */
.is-style-logos img {
	max-height: 64px;
	max-width: 150px;
	width: auto;
	height: auto;
	object-fit: contain;
	filter: grayscale(1);
	opacity: 0.65;
	transition: filter 0.3s ease, opacity 0.3s ease;
}
.is-style-logos img:hover { filter: none; opacity: 1; }

/* ---------- Carte ---------- */
.is-style-carte {
	transition: transform 0.25s ease, box-shadow 0.25s ease;
}
.is-style-carte:hover {
	transform: translateY(-4px);
	box-shadow: 0 14px 34px rgba(46, 53, 46, 0.08);
}

.is-style-carte h3 a {
	color: inherit;
	text-decoration: none;
	transition: color 0.2s ease;
}
.is-style-carte h3 a:hover { color: var(--wp--preset--color--green); }

.is-style-carte p { color: var(--wp--preset--color--ink-soft); }

.service-icon {
	display: grid;
	place-items: center;
	width: 56px;
	height: 56px;
	border-radius: 50%;
	background: var(--wp--preset--color--green-light);
	color: var(--wp--preset--color--green);
}
.service-icon svg { width: 28px; height: 28px; }

/* ---------- Listes à coches ---------- */
ul.is-style-coches {
	list-style: none;
	padding-left: 0;
}
ul.is-style-coches li {
	position: relative;
	padding-left: 2rem;
	margin-bottom: 0.75rem;
}
ul.is-style-coches li::before {
	content: "";
	position: absolute;
	left: 0;
	top: 0.30em;
	width: 1.15rem;
	height: 1.15rem;
	border-radius: 50%;
	background: var(--wp--preset--color--green-light) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M4 8.5l2.8 2.8L12 5.5' fill='none' stroke='%2340584a' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 0.7rem no-repeat;
}

/* ---------- Étiquettes ---------- */
ul.is-style-etiquettes {
	list-style: none;
	padding-left: 0;
	display: flex;
	flex-wrap: wrap;
	gap: 0.5rem;
}
ul.is-style-etiquettes li {
	padding: 0.28rem 0.9rem;
	border-radius: 999px;
	background: var(--wp--preset--color--green-light);
	color: var(--wp--preset--color--green-dark);
	font-size: 0.82rem;
	letter-spacing: 0.03em;
	margin: 0;
}

/* ---------- Publications ---------- */
ol.is-style-publications {
	list-style: none;
	padding-left: 0;
}
ol.is-style-publications li {
	padding: 1.1rem 0 1.1rem 1.4rem;
	border-left: 3px solid var(--wp--preset--color--green-light);
	margin-bottom: 0.9rem;
	color: var(--wp--preset--color--ink-soft);
	font-size: 0.97rem;
}
ol.is-style-publications li strong {
	color: var(--wp--preset--color--ink);
	font-weight: 500;
}

/* ---------- Frise chronologique ----------
   Les jalons sont les groupes enfants directs : aucune classe à saisir. */
.is-style-frise { position: relative; }
.is-style-frise::before {
	content: "";
	position: absolute;
	left: 0.45rem;
	top: 0.5rem;
	bottom: 0.5rem;
	width: 2px;
	background: var(--rev-line);
}
.is-style-frise > .wp-block-group {
	position: relative;
	padding: 0 0 2.2rem 2.4rem;
}
.is-style-frise > .wp-block-group:last-child { padding-bottom: 0; }
.is-style-frise > .wp-block-group::before {
	content: "";
	position: absolute;
	left: 0;
	top: 0.45rem;
	width: 1rem;
	height: 1rem;
	border-radius: 50%;
	background: var(--wp--preset--color--cream);
	border: 3px solid var(--wp--preset--color--green);
}
.is-style-frise > .wp-block-group:last-child::before {
	background: var(--wp--preset--color--ochre);
	border-color: var(--wp--preset--color--ochre);
}
.is-style-frise h3 { margin-top: 0.2rem; }
.is-style-frise p { color: var(--wp--preset--color--ink-soft); }

/* ---------- Projets ---------- */
.is-style-projet { align-items: center; }
.is-style-projet + .is-style-projet {
	border-top: 1px solid var(--rev-line);
	padding-top: clamp(2.2rem, 4vw, 3.2rem);
}
.is-style-projet h3 { font-size: 1.45rem; }

.is-style-meta strong {
	color: var(--wp--preset--color--green-dark);
	font-weight: 500;
}

/* ---------- Formulaire (Contact Form 7) ---------- */
.wpcf7 p { margin-bottom: 1.3rem; }

/* Les intitulés de champs sont des <label for> ; « Objet de votre demande »
   reste du texte simple (groupe de radios). On garde l'apparence identique. */
.wpcf7 label { display: block; }

.wpcf7 input[type="text"],
.wpcf7 input[type="email"],
.wpcf7 textarea {
	display: block;
	box-sizing: border-box;
	width: 100%;
	margin-top: 0.45rem;
	font-family: var(--wp--preset--font-family--body);
	font-size: 1rem;
	font-weight: 300;
	color: var(--wp--preset--color--ink);
	background: #ffffff;
	border: 1px solid var(--rev-line);
	border-radius: 10px;
	padding: 0.8rem 1rem;
	transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.wpcf7 textarea { resize: vertical; min-height: 160px; }

.wpcf7 input:focus,
.wpcf7 textarea:focus {
	border-color: var(--wp--preset--color--green);
	box-shadow: 0 0 0 3px rgba(64, 88, 74, 0.12);
}

.wpcf7-radio {
	display: flex;
	flex-wrap: wrap;
	gap: 0.5rem;
	margin-top: 0.45rem;
}
.wpcf7-radio .wpcf7-list-item { margin: 0; }
.wpcf7-radio label {
	margin: 0;
	padding: 0.45rem 1.1rem;
	border: 1px solid var(--rev-line);
	border-radius: 999px;
	background: #ffffff;
	font-weight: 400;
	cursor: pointer;
	transition: background 0.2s ease, border-color 0.2s ease;
}
.wpcf7-radio input[type="radio"] {
	accent-color: var(--wp--preset--color--green);
	margin-right: 0.45rem;
}
.wpcf7-radio label:has(input:checked) {
	background: var(--wp--preset--color--green-light);
	border-color: var(--wp--preset--color--green);
}

.wpcf7 input[type="submit"] {
	display: inline-block;
	padding: 0.85rem 1.9rem;
	border: none;
	border-radius: 999px;
	background: var(--wp--preset--color--green);
	color: #ffffff;
	font-family: var(--wp--preset--font-family--body);
	font-size: 0.95rem;
	font-weight: 500;
	letter-spacing: 0.04em;
	cursor: pointer;
	transition: background 0.25s ease, transform 0.25s ease;
}
.wpcf7 input[type="submit"]:hover {
	background: var(--wp--preset--color--green-dark);
	transform: translateY(-2px);
}

/* ---------- Pied de page ---------- */
.site-footer { border-top: 1px solid var(--rev-line); }

.footer-nav a {
	font-size: 0.9rem;
	text-decoration: none;
	color: var(--wp--preset--color--ink);
}
.footer-nav a:hover { color: var(--wp--preset--color--green); }

.footer-legal {
	font-size: 0.8rem;
	color: var(--wp--preset--color--ink-soft);
	border-top: 1px solid var(--rev-line);
	padding-top: 1.5rem;
}
.footer-legal a { color: inherit; }
