/*
Theme Name: DRG Constructions
Theme URI: https://drgconstructions.fr
Author: Luca Paul
Author URI: https://www.lucapaul.ro
Description: Thème pour DRG Constructions, entreprise de construction et rénovation tous corps d'état. En-tête avec logo, menu, téléphone et horaires ; page d'accueil avec présentation, slider de réalisations et actualités.
Version: 1.0.1
Requires at least: 6.0
Requires PHP: 8.0
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: drg-constructions
*/

:root {
	--bleu: #1f3d66;          /* bleu de travail */
	--bleu-profond: #152b49;
	--platre: #f3f3f0;
	--beton: #dcdedb;
	--graphite: #171b20;
	--muted: #5d656e;
	--chantier: #f0b400;      /* jaune de chantier: réservé aux appels à l'action */
	--blanc: #fff;

	--font-head: "Bahnschrift", "Franklin Gothic Medium", "Arial Narrow", "Helvetica Neue", Arial, sans-serif;
	--font-body: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;

	--header-h: 5.25rem;
}

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

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

body {
	margin: 0;
	background: var(--platre);
	color: var(--graphite);
	font-family: var(--font-body);
	font-size: 1.0625rem;
	line-height: 1.65;
}

img, svg, video { max-width: 100%; height: auto; }
a { color: var(--bleu); text-underline-offset: 0.2em; }
a:hover { color: var(--graphite); }

h1, h2, h3 { font-family: var(--font-head); line-height: 1.1; }

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

.wrap {
	width: 100%;
	max-width: 1240px;
	margin: 0 auto;
	padding-inline: clamp(1rem, 4vw, 2rem);
}

.screen-reader-text {
	position: absolute !important;
	width: 1px; height: 1px;
	margin: -1px; padding: 0; border: 0;
	overflow: hidden;
	clip: rect(0 0 0 0);
	white-space: nowrap;
}
.skip-link:focus {
	position: fixed !important;
	top: 0.75rem; left: 0.75rem;
	width: auto; height: auto; margin: 0; clip: auto;
	padding: 0.6rem 1rem;
	background: var(--chantier); color: var(--graphite);
	z-index: 1000;
}

.hint {
	margin: 0;
	padding: 0.6rem 0.9rem;
	border: 1px dashed currentColor;
	font-size: 0.85rem;
	opacity: 0.8;
}

/* ---------- En-tête ---------- */

.site-header {
	position: sticky;
	top: 0;
	z-index: 100;
	background: var(--blanc);
	border-bottom: 1px solid var(--beton);
}
.admin-bar .site-header { top: 32px; }
@media (max-width: 782px) { .admin-bar .site-header { top: 46px; } }

.header__inner {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 2rem;
	min-height: var(--header-h);
	padding-block: 0.6rem;
}

.brand { display: inline-flex; align-items: center; color: var(--graphite); text-decoration: none; }
.brand__logo { display: block; width: auto; max-height: 3.75rem; }
.brand__name { font-family: var(--font-head); font-size: 1.5rem; font-weight: 700; }

.header__right { display: flex; align-items: center; gap: 2rem; }

.nav-menu { display: flex; gap: 0.25rem; margin: 0; padding: 0; list-style: none; }
.nav-menu a {
	display: block;
	padding: 0.55rem 0.8rem;
	border-bottom: 2px solid transparent;
	color: var(--graphite);
	font-weight: 600;
	text-decoration: none;
}
.nav-menu a:hover,
.nav-menu .current-menu-item > a,
.nav-menu .current_page_item > a { border-bottom-color: var(--bleu); color: var(--bleu); }

.contact {
	display: flex;
	flex-direction: column;
	align-items: flex-end;
	gap: 0.3rem;
	padding-left: 2rem;
	border-left: 1px solid var(--beton);
}
.contact__phone {
	display: inline-flex;
	align-items: center;
	gap: 0.55rem;
	padding: 0.4rem 0.95rem;
	background: var(--chantier);
	border-radius: 3px;
	color: var(--graphite);
	font-family: var(--font-head);
	font-size: 1.2rem;
	font-weight: 700;
	letter-spacing: 0.01em;
	text-decoration: none;
	white-space: nowrap;
}
.contact__phone:hover { background: var(--graphite); color: var(--chantier); }
.contact__hours { color: var(--muted); font-size: 0.82rem; white-space: nowrap; }

.header__actions { display: none; align-items: center; gap: 0.6rem; }
.call-btn {
	display: inline-flex;
	align-items: center;
	gap: 0.4rem;
	padding: 0.55rem 0.9rem;
	background: var(--chantier);
	border-radius: 3px;
	color: var(--graphite);
	font-weight: 700;
	text-decoration: none;
}
.nav-toggle {
	width: 2.85rem; height: 2.85rem;
	padding: 0;
	background: transparent;
	border: 2px solid var(--graphite);
	border-radius: 3px;
	cursor: pointer;
}
.nav-toggle__bars,
.nav-toggle__bars::before,
.nav-toggle__bars::after {
	display: block;
	width: 1.2rem; height: 2px;
	margin: 0 auto;
	background: var(--graphite);
	content: "";
}
.nav-toggle__bars { position: relative; }
.nav-toggle__bars::before { position: absolute; top: -6px; left: 0; }
.nav-toggle__bars::after { position: absolute; top: 6px; left: 0; }

@media (max-width: 1040px) {
	.header__actions { display: flex; }
	.header__right {
		display: none;
		position: absolute;
		top: 100%; left: 0; right: 0;
		flex-direction: column;
		align-items: stretch;
		gap: 1rem;
		padding: 1rem clamp(1rem, 4vw, 2rem) 1.5rem;
		background: var(--blanc);
		border-bottom: 1px solid var(--beton);
	}
	.header__right.is-open { display: flex; }
	.nav-menu { flex-direction: column; }
	.nav-menu a { padding: 0.7rem 0; border-bottom: 1px solid var(--beton); }
	.contact { align-items: flex-start; padding: 0; border: 0; }
}

/* ---------- Présentation ---------- */

.about { padding-block: clamp(3rem, 8vw, 6.5rem); }
.about__grid {
	display: grid;
	grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
	gap: clamp(2rem, 6vw, 5.5rem);
	align-items: center;
}
.about__title {
	margin: 0 0 1.25rem;
	color: var(--bleu);
	font-size: clamp(2.25rem, 4.2vw + 0.75rem, 4.25rem);
	font-weight: 700;
	letter-spacing: -0.01em;
	text-wrap: balance;
}
.about__body { max-width: 60ch; font-size: 1.15rem; }
.about__body p { margin: 0 0 1em; }

.about__list-title { margin: 2rem 0 0.5rem; font-size: 1.2rem; }
.services {
	margin: 0 0 2rem;
	padding: 0;
	list-style: none;
	columns: 2;
	column-gap: 2rem;
	border-top: 2px solid var(--graphite);
}
.services li {
	padding: 0.55rem 0;
	border-bottom: 1px solid var(--beton);
	break-inside: avoid;
	font-weight: 600;
}

.about__cta { display: flex; flex-wrap: wrap; align-items: center; gap: 1.25rem 1.75rem; }
.btn {
	display: inline-block;
	padding: 0.9rem 1.6rem;
	background: var(--bleu);
	border-radius: 3px;
	color: var(--blanc);
	font-weight: 700;
	text-decoration: none;
	transition: background-color 0.15s;
}
.btn:hover { background: var(--graphite); color: var(--blanc); }
.about__phone { color: var(--graphite); font-family: var(--font-head); font-size: 1.4rem; font-weight: 700; text-decoration: none; }
.about__phone:hover { color: var(--bleu); }

.about__img { display: block; width: 100%; aspect-ratio: 4 / 5; object-fit: cover; border-radius: 3px; }
.media-placeholder {
	display: grid;
	place-items: center;
	aspect-ratio: 4 / 5;
	padding: 1.5rem;
	background: var(--beton);
	border-radius: 3px;
	color: var(--muted);
}

@media (max-width: 900px) {
	.about__grid { grid-template-columns: minmax(0, 1fr); }
	.about__img, .media-placeholder { aspect-ratio: 16 / 10; }
}
@media (max-width: 520px) { .services { columns: 1; } }

/* ---------- Slider de réalisations ---------- */

.projects {
	padding-block: clamp(3rem, 7vw, 5.5rem);
	background: var(--graphite);
	color: var(--blanc);
}
.section-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 1rem; margin-bottom: 1.75rem; }
.section-title { margin: 0; font-size: clamp(1.9rem, 3vw + 1rem, 3rem); font-weight: 700; }
.section-link { font-weight: 600; }

.projects .section-link,
.projects__all a { color: var(--blanc); }
.projects__all { margin: 1.5rem 0 0; }

.slider__controls { display: flex; align-items: center; gap: 0.6rem; }
.slider__count { margin-right: 0.5rem; font-variant-numeric: tabular-nums; color: #b9bfc6; }
.slider__btn {
	display: grid;
	place-items: center;
	width: 3rem; height: 3rem;
	padding: 0;
	background: transparent;
	border: 2px solid var(--blanc);
	border-radius: 3px;
	color: var(--blanc);
	cursor: pointer;
	transition: background-color 0.15s, color 0.15s;
}
.slider__btn:hover { background: var(--chantier); border-color: var(--chantier); color: var(--graphite); }
.slider__btn[aria-disabled="true"] { opacity: 0.35; cursor: default; }
.slider__btn[aria-disabled="true"]:hover { background: transparent; border-color: var(--blanc); color: var(--blanc); }

.slider__track {
	display: flex;
	overflow-x: auto;
	scroll-snap-type: x mandatory;
	scrollbar-width: none;
	overscroll-behavior-x: contain;
}
.slider__track::-webkit-scrollbar { display: none; }

.slide {
	position: relative;
	flex: 0 0 100%;
	min-height: 22rem;
	aspect-ratio: 16 / 9;
	scroll-snap-align: start;
	background: #262c33;
}
.slide__img, .slide__ph { display: block; width: 100%; height: 100%; object-fit: cover; }
.slide .plate {
	position: absolute;
	left: clamp(1rem, 3vw, 2rem);
	bottom: clamp(1rem, 3vw, 2rem);
	width: min(23rem, calc(100% - 2rem));
}

@media (max-width: 700px) {
	.slide { display: flex; flex-direction: column; aspect-ratio: auto; min-height: 0; }
	.slide__img, .slide__ph { height: auto; aspect-ratio: 4 / 3; }
	.slide .plate { position: static; width: 100%; }
}

/* Panneau de chantier */
.plate {
	background: var(--blanc);
	border: 3px solid var(--graphite);
	color: var(--graphite);
}
.plate__title { margin: 0; padding: 0.6rem 0.9rem; background: var(--bleu); color: var(--blanc); font-size: 1.2rem; font-weight: 700; }
.plate__title a { color: inherit; text-decoration: none; }
.plate__title a:hover { text-decoration: underline; }
.plate__rows { margin: 0; }
.plate__row {
	display: grid;
	grid-template-columns: 8.5rem 1fr;
	gap: 0.75rem;
	padding: 0.5rem 0.9rem;
	border-top: 2px solid var(--graphite);
	font-size: 0.92rem;
	line-height: 1.4;
}
.plate__title + .plate__rows .plate__row:first-child { border-top: 0; }
.plate__label { color: var(--muted); }
.plate__value { margin: 0; font-weight: 700; }

/* ---------- Articles ---------- */

.posts { padding-block: clamp(3rem, 7vw, 5.5rem); }

.grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 2.5rem 2rem; }
@media (max-width: 960px) { .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 600px) { .grid { grid-template-columns: minmax(0, 1fr); } }

.post-card { display: flex; flex-direction: column; gap: 0.7rem; }
.post-card__media { display: block; aspect-ratio: 3 / 2; overflow: hidden; background: var(--beton); }
.post-card__media img { display: block; width: 100%; height: 100%; object-fit: cover; }
.post-card__date { color: var(--muted); font-size: 0.85rem; }
.post-card__title { margin: 0; font-size: 1.35rem; font-weight: 700; }
.post-card__title a { color: var(--graphite); text-decoration: none; }
.post-card__title a:hover { color: var(--bleu); text-decoration: underline; }
.post-card__excerpt { margin: 0; color: var(--muted); }
.post-card--projet .plate { margin-top: 0; }

/* ---------- Pages, articles, archives ---------- */

.content { padding-block: clamp(2.5rem, 6vw, 4.5rem); padding-inline: clamp(1rem, 4vw, 2rem); max-width: 50rem; margin: 0 auto; }
.content--wide { max-width: none; padding-inline: 0; }
.page-head { margin-bottom: 2rem; }
.page-title, .entry__title { margin: 0 0 0.5rem; color: var(--bleu); font-size: clamp(2rem, 3.5vw + 1rem, 3.25rem); font-weight: 700; }
.entry__date { color: var(--muted); font-size: 0.9rem; }
.entry__media { margin: 1.5rem 0; }
.entry__media img { display: block; width: 100%; }
.entry .plate { margin: 1.5rem 0; max-width: 26rem; }
.entry-content { overflow-wrap: break-word; }
.entry-content > * + * { margin-top: 1em; }

.pagination .nav-links { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-top: 2.5rem; }
.pagination a, .pagination span {
	padding: 0.45rem 0.9rem;
	border: 2px solid var(--graphite);
	border-radius: 3px;
	color: var(--graphite);
	font-weight: 600;
	text-decoration: none;
}
.pagination .current { background: var(--graphite); color: var(--blanc); }

/* ---------- Pied de page ---------- */

.site-footer { background: var(--bleu-profond); color: #dbe3ee; font-size: 0.95rem; }
.site-footer a { color: var(--blanc); }
.site-footer__inner { padding-block: 2.75rem 1.75rem; }
.site-footer__cols { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 2rem; }
.site-footer p { margin: 0 0 0.4rem; }
.site-footer__name { color: var(--blanc); font-family: var(--font-head); font-size: 1.35rem; font-weight: 700; }
.footer-menu { margin: 0; padding: 0; list-style: none; }
.footer-menu li + li { margin-top: 0.4rem; }
.site-footer__legal { margin-top: 2rem !important; padding-top: 1.25rem; border-top: 1px solid rgba(255, 255, 255, 0.18); font-size: 0.85rem; }

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