/* Choquenet Construction — styles du site */

html { scroll-behavior: smooth; scroll-padding-top: 90px; }
body { -webkit-font-smoothing: antialiased; }

.cq-main, .cq-content { margin-block: 0 !important; }
.cq-content > * { margin-block: 0 !important; }

/* ---------- En-tête ---------- */
.site-header {
	position: sticky;
	top: var(--wp-admin--admin-bar--height, 0px);
	z-index: 50;
	background: rgba(244, 242, 238, 0.96);
	border-bottom: 1px solid #DEDAD2;
}
.site-header__bar { padding-block: 16px; }
.site-header__inner { gap: 16px 32px; align-items: center; }
.site-header__nav { gap: 12px 28px; align-items: center; }
.site-header .wp-block-site-logo img { height: 40px; width: auto; }
.site-header__tel .wp-block-button__link { padding: 0.7rem 1.2rem; font-size: 0.9375rem; }
.site-header .wp-block-navigation a { text-decoration: none; }

/* ---------- Pied de page ---------- */
.site-footer__bar { padding-block: 40px; }
.site-footer .wp-block-site-logo img { height: 32px; width: auto; filter: brightness(0) invert(1); }
.site-footer a { color: #DEDAD2; }
.site-footer a:hover { color: #FFFFFF; }

/* ---------- Éléments communs ---------- */
.cq-section { padding-block: var(--wp--preset--spacing--60); }
.cq-kicker {
	font-size: 0.8125rem !important;
	letter-spacing: 0.3em;
	font-weight: 600;
	color: var(--wp--preset--color--accent);
	margin: 0 0 0.75rem !important;
}
.cq-kicker--clair { color: #C9CDCA; }
.cq-section--sombre .cq-kicker--clair { color: var(--wp--preset--color--accent-clair); }
.cq-texte { color: var(--wp--preset--color--gris); }
.cq-entete { gap: 24px; margin-bottom: 56px; }
.cq-entete h2 { margin: 0; max-width: 640px; }
.cq-entete__texte { max-width: 420px; color: var(--wp--preset--color--gris); font-size: 1.0625rem; margin: 0; }
.cq-sous-titre { font-size: 1.125rem !important; margin-top: 1.75rem !important; margin-bottom: 0.25rem !important; }

/* ---------- Haut de page ---------- */
.cq-hero { overflow: hidden; padding-top: 96px !important; padding-bottom: 80px !important; }
.cq-hero__text { max-width: 1240px; }
.cq-hero__titre { max-width: 820px; color: #FFFFFF; margin-top: 0 !important; }
.cq-hero__intro { max-width: 620px; font-size: 1.25rem; font-weight: 300; color: #E4E6E4; margin-top: 1.75rem !important; }
.cq-hero__boutons { margin-top: 2.5rem !important; gap: 16px; }
.cq-hero .is-style-outline .wp-block-button__link { border: 1px solid #FFFFFF; background: transparent; padding: calc(1rem - 1px) calc(1.75rem - 1px); }
.cq-hero .is-style-outline .wp-block-button__link:hover { background: #FFFFFF; color: var(--wp--preset--color--anthracite) !important; }

/* ---------- Cartes métiers ---------- */
.cq-cartes { gap: 32px !important; }
.cq-carte {
	background: #FFFFFF;
	border: 1px solid #E3DFD8;
	padding: 0 0 32px;
	transition: transform .5s cubic-bezier(.2,.7,.2,1), box-shadow .5s;
}
.cq-carte:hover { transform: translateY(-6px); box-shadow: 0 18px 40px rgba(29,31,30,.10); }
.cq-carte > *:not(.cq-carte__picto) { padding-inline: 32px; }
.cq-carte__picto {
	height: 220px;
	margin: 0 0 24px !important;
	background: var(--wp--preset--color--pierre);
	border-bottom: 1px solid #E3DFD8;
	display: flex !important;
	align-items: center;
	justify-content: center;
	padding: 32px;
	box-sizing: border-box;
}
.cq-carte__picto img { max-width: 70%; max-height: 150px; width: auto; height: auto; }
.cq-carte__num { font-size: 0.8125rem; letter-spacing: 0.2em; color: #5E625F; margin: 0 !important; }
.cq-carte h3 { margin-top: 0.5rem !important; }
.cq-carte p:last-child { color: var(--wp--preset--color--gris); font-size: 1rem; }

/* ---------- Prestations ---------- */
.cq-prestations { margin-top: 56px !important; padding-top: 40px; border-top: 1px solid #DEDAD2; gap: 24px 40px; }
.cq-prestations__titre { flex: 0 1 260px; font-size: 1.25rem !important; margin: 0 !important; }
.cq-pastilles {
	list-style: none;
	padding: 0;
	margin: 0;
	display: flex;
	flex-wrap: wrap;
	gap: 12px;
	flex: 1 1 560px;
}
.cq-pastilles li { border: 1px solid #C9C4BA; background: #FFFFFF; padding: 10px 16px; font-size: 0.9375rem; margin: 0; }
.cq-pastilles--labels { margin-top: 1.5rem !important; }
.cq-pastilles--labels li { background: transparent; font-size: 0.875rem; padding: 8px 14px; }

/* ---------- Réalisations ---------- */
.cq-galerie { gap: 20px !important; }
.cq-galerie .wp-block-image { overflow: hidden; }
.cq-galerie.is-cropped .wp-block-image img { aspect-ratio: 4 / 3; transition: transform .9s cubic-bezier(.2,.7,.2,1); }
.cq-galerie .wp-block-image:hover img { transform: scale(1.05); }
.wp-block-gallery.cq-galerie.has-nested-images figure.wp-block-image figcaption {
	position: static;
	background: none;
	color: #FFFFFF;
	text-align: left;
	font-size: 0.9375rem;
	font-weight: 600;
	padding: 12px 0 0;
	max-height: none;
	overflow: visible;
	text-shadow: none;
}
.wp-block-gallery.cq-galerie.has-nested-images figure.wp-block-image { flex-direction: column; }
.wp-block-gallery.cq-galerie.has-nested-images figure.wp-block-image:before { display: none; }

/* ---------- Entreprise ---------- */
.cq-entreprise { gap: 64px !important; }
.cq-entreprise__photo img { aspect-ratio: 5 / 4; object-fit: cover; width: 100%; }

/* ---------- Contact ---------- */
.cq-contact { gap: 64px !important; }
.cq-adresse { font-size: 1.0625rem; }
.cq-telephone { font-size: 1.75rem; font-weight: 600; }
.cq-telephone a { text-decoration: none; }

.cq-form { background: #FFFFFF; padding: 40px; display: flex; flex-direction: column; gap: 20px; }
.cq-form label { display: flex; flex-direction: column; gap: 8px; font-size: 0.875rem; font-weight: 600; }
.cq-form__row label { flex: 1 1 200px; }
.cq-form__row { display: flex; flex-wrap: wrap; gap: 20px; }
.cq-form input, .cq-form select, .cq-form textarea {
	font: inherit;
	font-weight: 400;
	font-size: 1rem;
	border: 1px solid #B9B4AA;
	border-radius: 2px;
	padding: 13px 14px;
	background: #FFFFFF;
	color: inherit;
}
.cq-form input:focus, .cq-form select:focus, .cq-form textarea:focus { outline: 2px solid var(--wp--preset--color--accent); outline-offset: 1px; }
.cq-form textarea { resize: vertical; }
.cq-form__btn {
	align-self: flex-start;
	background: var(--wp--preset--color--accent);
	color: #FFFFFF;
	border: 0;
	border-radius: 2px;
	padding: 16px 30px;
	font: inherit;
	font-weight: 600;
	cursor: pointer;
}
.cq-form__btn:hover { background: var(--wp--preset--color--anthracite); }
.cq-form__msg { margin: 0; padding: 16px 18px; font-size: 0.9375rem; }
.cq-form__msg--ok { background: #E6EEF0; color: #1F3F4B; }
.cq-form__msg--err { background: #F6E7E2; color: #6B2A16; }
.cq-form__rgpd { margin: 0; font-size: 0.8125rem; color: var(--wp--preset--color--gris); }
.cq-form__piege { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* ---------- Pages simples ---------- */
.cq-page { padding-block: var(--wp--preset--spacing--50); }

@media (max-width: 781px) {
	.cq-form { padding: 24px; }
	.cq-hero { min-height: 520px !important; }
}

/* ---------- Animations au défilement ---------- */
@media (prefers-reduced-motion: no-preference) {
	@supports (animation-timeline: view()) {
		@keyframes cq-reveal { from { opacity: 0; transform: translateY(48px); } to { opacity: 1; transform: none; } }
		@keyframes cq-hero-bg { to { transform: translateY(180px) scale(1.08); } }
		@keyframes cq-hero-text { to { opacity: 0; transform: translateY(-60px); } }
		@keyframes cq-header { to { box-shadow: 0 6px 24px rgba(29,31,30,.08); background: rgba(244,242,238,.85); backdrop-filter: blur(10px); } }

		body:not(.wp-admin) .reveal { animation: cq-reveal linear both; animation-timeline: view(); animation-range: entry 5% cover 28%; }
		body:not(.wp-admin) .reveal-late { animation: cq-reveal linear both; animation-timeline: view(); animation-range: entry 20% cover 38%; }
		body:not(.wp-admin) .reveal-later { animation: cq-reveal linear both; animation-timeline: view(); animation-range: entry 35% cover 48%; }
		body:not(.wp-admin) .cq-galerie .wp-block-image:nth-child(3n+1) { animation: cq-reveal linear both; animation-timeline: view(); animation-range: entry 5% cover 28%; }
		body:not(.wp-admin) .cq-galerie .wp-block-image:nth-child(3n+2) { animation: cq-reveal linear both; animation-timeline: view(); animation-range: entry 20% cover 38%; }
		body:not(.wp-admin) .cq-galerie .wp-block-image:nth-child(3n) { animation: cq-reveal linear both; animation-timeline: view(); animation-range: entry 35% cover 48%; }
		body:not(.wp-admin) .cq-hero .wp-block-cover__image-background { animation: cq-hero-bg linear both; animation-timeline: scroll(root); animation-range: 0 800px; }
		body:not(.wp-admin) .cq-hero__text { animation: cq-hero-text linear both; animation-timeline: scroll(root); animation-range: 0 600px; }
		body:not(.wp-admin) .site-header { animation: cq-header linear both; animation-timeline: scroll(root); animation-range: 0 160px; }
	}
}

/* Dans l'éditeur, tout reste visible et immobile. */
.editor-styles-wrapper .reveal,
.editor-styles-wrapper .reveal-late,
.editor-styles-wrapper .reveal-later { animation: none !important; opacity: 1 !important; transform: none !important; }
.editor-styles-wrapper .cq-galerie .wp-block-image,
.editor-styles-wrapper .site-header,
.editor-styles-wrapper .cq-hero__text,
.editor-styles-wrapper .cq-hero .wp-block-cover__image-background { animation: none !important; opacity: 1 !important; }

/* Alignement du haut de page sur la grille du site */
.cq-hero.wp-block-cover { padding-left: var(--wp--style--root--padding-left, 2rem) !important; padding-right: var(--wp--style--root--padding-right, 2rem) !important; }
.wp-block-cover.cq-hero.has-custom-content-position .wp-block-cover__inner-container { width: 100% !important; max-width: var(--wp--style--global--wide-size, 1240px) !important; margin-inline: auto !important; padding-left: 0 !important; padding-right: 0 !important; }
.cq-hero .cq-hero__text { max-width: none; margin-inline: 0 !important; }
