/* ==========================================================================
   Richard Imprimerie — feuille de style principale
   ========================================================================== */

/* Polices (hébergées localement, pas d'appel à Google) */
@font-face {
	font-family: "Figtree";
	src: url("../fonts/figtree-latin.woff2") format("woff2");
	font-weight: 300 900;
	font-style: normal;
	font-display: swap;
}
@font-face {
	font-family: "Poppins";
	src: url("../fonts/poppins-500-latin.woff2") format("woff2");
	font-weight: 500;
	font-style: normal;
	font-display: swap;
}
@font-face {
	font-family: "Poppins";
	src: url("../fonts/poppins-600-latin.woff2") format("woff2");
	font-weight: 600;
	font-style: normal;
	font-display: swap;
}

:root {
	--bleu: #1a237e;
	--bleu-2: #283593;
	--orange: #ff6f00;
	--orange-fonce: #e06200;
	--texte: #212121;
	--fond: #ffffff;
	--fond-2: #f5f5f5;
	--blanc-voile: rgba(255, 255, 255, 0.59);

	--police-titre: "Poppins", system-ui, sans-serif;
	--police-texte: "Figtree", system-ui, sans-serif;

	--largeur: 1140px;
	--gouttiere: 16px;
	--rayon: 3px;
}

/* --- Base ---------------------------------------------------------------- */
*,
*::before,
*::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
	margin: 0;
	background: var(--fond);
	color: var(--texte);
	font-family: var(--police-texte);
	font-size: 17px;
	line-height: 1.6;
	display: flex;
	flex-direction: column;
	min-height: 100vh;
}

img { max-width: 100%; height: auto; display: block; }

[hidden] { display: none !important; }

a { color: var(--bleu-2); }

h1, h2, h3, h4 {
	font-family: var(--police-titre);
	font-weight: 600;
	line-height: 1.2;
	color: var(--bleu);
	margin: 0 0 0.6em;
}

.conteneur {
	width: 100%;
	max-width: var(--largeur);
	margin-inline: auto;
	padding-inline: var(--gouttiere);
}

.lien-evitement {
	position: absolute;
	left: -9999px;
	top: 0;
	z-index: 100;
	background: var(--bleu);
	color: #fff;
	padding: 8px 16px;
}
.lien-evitement:focus { left: 8px; top: 8px; }

:focus-visible { outline: 3px solid var(--orange); outline-offset: 2px; }

/* --- Boutons ------------------------------------------------------------- */
.bouton {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 44px; /* zone tactile confortable */
	padding: 8px 20px;
	border: 1px solid currentColor;
	border-radius: var(--rayon);
	font-family: var(--police-texte);
	font-size: 16px;
	line-height: 1.5;
	text-decoration: none;
	text-align: center;
	cursor: pointer;
	transition: background-color .2s, color .2s, border-color .2s;
}
.bouton--contour { color: var(--bleu); background: transparent; border-color: var(--bleu); }
.bouton--contour:hover { background: var(--bleu); color: #fff; }

.bouton--accent { color: #fff; background: var(--orange); border-color: var(--orange); }
.bouton--accent:hover { background: var(--orange-fonce); border-color: var(--orange-fonce); }

.bouton--clair { color: var(--bleu); background: #fff; border-color: #fff; }
.bouton--clair:hover { background: var(--orange); border-color: var(--orange); color: #fff; }

.bouton--grand { padding: 12px 28px; font-size: 18px; }

/* --- En-tête ------------------------------------------------------------- */
.site-entete {
	background: #fff;
	position: relative;
	z-index: 2;
}
.site-entete__inner {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 16px;
	min-height: 85px;
	padding-block: 4px;
}
.site-logo { display: block; flex-shrink: 0; }
.site-logo__img { height: 84px; width: auto; }
.site-entete__actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 12px; }

/* --- Accueil ------------------------------------------------------------- */
.home-fond {
	position: fixed;
	inset: 0;
	z-index: -1;
	background-color: #1b1f3a;
	background-position: center;
	background-size: cover;
}
.home main { flex: 1; }

.accueil__panneau {
	background: var(--blanc-voile);
	padding-block: 24px 56px;
}

.atouts {
	list-style: none;
	margin: 0 0 32px;
	padding: 0;
	display: grid;
	grid-template-columns: repeat(4, 1fr);
	gap: 24px;
}
.atouts__item img { width: 100%; max-width: 220px; margin-inline: auto; }

.services__titre {
	text-align: center;
	font-size: clamp(28px, 4vw, 42px);
	margin-bottom: 40px;
}
.services__grille {
	list-style: none;
	margin: 0;
	padding: 0;
	display: grid;
	grid-template-columns: repeat(4, 1fr);
	gap: 32px 24px;
}
.service__lien {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 20px;
	text-decoration: none;
}
.service__image {
	display: block;
	width: 100%;
	background: #fff;
	padding: 6px;
	box-shadow: 0 2px 10px rgba(0, 0, 0, .12);
	transition: transform .2s;
}
.service__image img { width: 100%; height: auto; aspect-ratio: 3 / 2; object-fit: cover; }
.service__lien:hover .service__image { transform: translateY(-4px); }
.service__lien:hover .bouton--contour { background: var(--bleu); color: #fff; }

.appel {
	margin-block: 90px;
	background: var(--bleu-2);
	color: #fff;
	padding: 56px clamp(24px, 4vw, 48px);
}
.appel__titre { color: #fff; font-size: clamp(28px, 4vw, 48px); }
.appel__texte { font-family: var(--police-titre); font-weight: 500; font-size: 18px; line-height: 1.4; margin: 0 0 25px; max-width: 60ch; }

/* --- Pages --------------------------------------------------------------- */
.page-contenu {
	flex: 1;
	padding-block: 24px 64px;
}
.page-contenu__titre {
	text-align: center;
	text-transform: uppercase;
	font-size: clamp(28px, 7.5vw, 90px);
	color: #1e293b;
	overflow-wrap: break-word;
	hyphens: auto;
	margin-bottom: 32px;
}
.contenu-editeur > * { margin-block: 0 1.2em; }
.contenu-editeur img { margin-inline: auto; }
.contenu-editeur .wp-block-image { text-align: center; }
.contenu-editeur iframe,
.contenu-editeur video { max-width: 100%; }
.contenu-editeur table { display: block; max-width: 100%; overflow-x: auto; }
.page-contenu__appel { text-align: center; margin-top: 32px; }
.page-404 p { text-align: center; }
.page-404 .bouton { margin: 4px; }

/* --- Contact ------------------------------------------------------------- */
.contact__intro { text-align: center; max-width: 60ch; margin-inline: auto; }
.contact__cartes {
	list-style: none;
	margin: 32px 0 0;
	padding: 0;
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 24px;
}
.contact__carte {
	background: var(--fond-2);
	border-top: 4px solid var(--orange);
	padding: 28px 24px;
	text-align: center;
	display: flex;
	flex-direction: column;
	align-items: center;
}
.contact__icone { width: 40px; height: 40px; fill: var(--bleu); margin-bottom: 12px; }
.contact__titre { font-size: 22px; margin-bottom: 8px; }
.contact__carte p,
.contact__carte address { margin: 0 0 16px; font-style: normal; }
.contact__valeur {
	margin-top: auto;
	font-family: var(--police-titre);
	font-weight: 600;
	font-size: 18px;
	color: var(--bleu);
	text-decoration: none;
	overflow-wrap: anywhere;
	padding-block: 10px; /* zone tactile */
}
a.contact__valeur:hover { color: var(--orange); text-decoration: underline; }
address.contact__valeur { font-style: normal; line-height: 1.4; }

/* --- Formulaire de devis ------------------------------------------------- */
.devis {
	margin-top: 56px;
	padding-top: 48px;
	border-top: 1px solid #e2e8f0;
	max-width: 760px;
	margin-inline: auto;
	scroll-margin-top: 16px;
}
.devis__titre { text-align: center; font-size: clamp(26px, 4vw, 36px); }
.devis__groupe { border: 0; padding: 0; margin: 0 0 24px; min-width: 0; }
.devis__groupe legend {
	font-family: var(--police-titre);
	font-weight: 600;
	font-size: 18px;
	color: var(--bleu);
	padding: 0;
	margin-bottom: 12px;
}
.devis__facultatif { font-family: var(--police-texte); font-weight: 400; font-size: 15px; color: #64748b; }
.devis__grille { display: grid; grid-template-columns: 1fr 1fr; gap: 0 20px; }
.devis__grille--cp { grid-template-columns: 160px 1fr; }
.devis__champ { margin: 0 0 16px; display: flex; flex-direction: column; gap: 6px; }
.devis__champ label { font-weight: 500; }
.devis__requis { color: #c2410c; }
.devis__form input,
.devis__form select,
.devis__form textarea {
	width: 100%;
	font: inherit;
	font-size: 16px; /* évite le zoom automatique sur iPhone */
	color: var(--texte);
	background: #fff;
	border: 1px solid #94a3b8;
	border-radius: var(--rayon);
	padding: 10px 12px;
	min-height: 46px;
}
.devis__form textarea { resize: vertical; min-height: 140px; }
.devis__form input:focus,
.devis__form select:focus,
.devis__form textarea:focus { border-color: var(--bleu); outline: 2px solid var(--bleu); outline-offset: 0; }
.devis__champ--erreur input,
.devis__champ--erreur select,
.devis__champ--erreur textarea { border-color: #b91c1c; }
.devis__erreur { color: #b91c1c; font-size: 15px; }
.devis__alerte {
	background: #fef2f2;
	border-left: 4px solid #b91c1c;
	color: #7f1d1d;
	padding: 12px 16px;
	margin-bottom: 24px;
}
.devis__succes {
	background: #f0fdf4;
	border-left: 4px solid #15803d;
	color: #14532d;
	padding: 20px 24px;
	text-align: center;
}
.devis__succes p { margin: 6px 0 0; }
.devis__mentions { font-size: 14px; color: #475569; }
.devis__piege { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* --- Pied de page -------------------------------------------------------- */
.site-pied { background: #fff; }
.home .site-pied { background: transparent; }
.site-pied__inner {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 16px 32px;
	padding-block: 40px;
}
.site-pied__logo { background: #fff; padding: 8px; }
.site-pied__logo img { height: 96px; width: auto; }
.site-pied__menu { list-style: none; display: flex; flex-wrap: wrap; gap: 8px 24px; margin: 0; padding: 0; }
.site-pied__coordonnees { font-style: normal; line-height: 1.8; }
.site-pied__coordonnees a { text-decoration: none; }
.site-pied__coordonnees a:hover { text-decoration: underline; }
.site-pied__menu a,
.site-pied__coordonnees,
.site-pied__coordonnees a,
.site-pied__copyright { color: #1e293b; font-size: 15px; }
.home .site-pied__menu a,
.home .site-pied__coordonnees,
.home .site-pied__coordonnees a,
.home .site-pied__copyright { color: #fff; text-shadow: 0 1px 3px rgba(0, 0, 0, .6); }
.site-pied__copyright { margin: 0; font-style: italic; }
.site-pied__legal { flex-basis: 100%; margin: 0; font-size: 13px; color: #475569; text-align: center; }
.home .site-pied__legal { color: #fff; text-shadow: 0 1px 3px rgba(0, 0, 0, .6); }

/* --- Responsive ----------------------------------------------------------
   Paliers : ≤ 1024 tablette paysage · ≤ 900 tablette · ≤ 640 téléphone
   · ≤ 400 petit téléphone
   ------------------------------------------------------------------------ */

/* L'effet de survol seulement sur les appareils qui ont une souris. */
@media (hover: none) {
	.service__lien:hover .service__image { transform: none; }
}

@media (max-width: 1024px) {
	.atouts { gap: 16px; }
	.services__grille { gap: 28px 16px; }
	.appel { margin-block: 64px; }
}

@media (max-width: 900px) {
	.services__grille { grid-template-columns: repeat(2, 1fr); gap: 32px 24px; }
	.services__titre { margin-bottom: 28px; }
	.contact__cartes { grid-template-columns: 1fr; max-width: 480px; margin-inline: auto; }
}

@media (max-width: 640px) {
	body { font-size: 16px; }

	/* En-tête compacte : logo plus petit, un seul bouton */
	.site-entete__inner { min-height: 68px; }
	.site-logo__img { height: 60px; }
	.site-entete__actions .bouton--contour { display: none; }
	.site-entete__actions .bouton { padding: 8px 14px; font-size: 15px; }

	/* Accueil */
	.accueil__panneau { padding-block: 16px 36px; }
	.atouts { grid-template-columns: repeat(2, 1fr); gap: 12px 16px; margin-bottom: 24px; }
	.atouts__item img { max-width: 140px; }
	.services__titre br { display: none; }
	.services__grille { grid-template-columns: repeat(2, 1fr); gap: 24px 12px; }
	.service__lien { gap: 12px; }
	.service__image { padding: 4px; }
	.service__lien .bouton { width: 100%; font-size: 15px; padding: 8px 6px; }

	.appel { margin-block: 40px; padding: 32px 20px; }
	.appel__texte { font-size: 16px; }
	.appel .bouton { width: 100%; }

	/* Pages */
	.page-contenu { padding-block: 16px 40px; }
	.page-contenu__titre { margin-bottom: 20px; }
	.page-contenu__appel .bouton { width: 100%; }

	/* Formulaire de devis */
	.devis { margin-top: 40px; padding-top: 32px; }
	.devis__grille,
	.devis__grille--cp { grid-template-columns: 1fr; }
	.devis .bouton { width: 100%; }

	/* Pied de page */
	/* padding bas : laisse la place au bouton rond des cookies */
	.site-pied__inner { flex-direction: column; justify-content: center; text-align: center; padding-block: 28px 84px; }
	.site-pied__logo img { height: 72px; }
	.site-pied__legal { flex-basis: auto; }
	.site-pied__menu { justify-content: center; }
}

@media (max-width: 400px) {
	.site-logo__img { height: 52px; }
	.site-entete__actions .bouton { padding: 8px 10px; font-size: 14px; }
	.services__grille { gap: 20px 10px; }
	.service__lien .bouton { font-size: 14px; }
}

@media (prefers-reduced-motion: reduce) {
	* { transition: none !important; }
}
