/*
Theme Name: SDTE Transport
Description: Thème moderne et épuré pour la société de transport SDTE. Bleu marine des fourgons, jaune des quais de chargement.
Version: 1.2.2
Requires at least: 6.0
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: sdte
*/

/* ---------- Tokens ---------- */
:root {
	--navy: #1A2A4C;        /* bleu des fourgons */
	--navy-deep: #0C1426;   /* nuit sur l'entrepôt */
	--asphalt: #2A2F38;     /* portes de quai, bitume mouillé */
	--dock: #F4B400;        /* butoirs jaunes des quais */
	--fog: #F2F4F7;         /* ciel couvert */
	--ink: #0E1424;
	--slate: #566072;
	--line: #D9DEE7;

	--font-head: 'Barlow Condensed', 'Arial Narrow', sans-serif;
	--font-body: 'Barlow', system-ui, -apple-system, 'Segoe UI', sans-serif;
	--header-h: 88px;
}

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

html { scroll-behavior: smooth; }
.has-sticky-header { scroll-padding-top: var(--header-h); }

body {
	margin: 0;
	font-family: var(--font-body);
	font-size: 1.0625rem;
	line-height: 1.6;
	color: var(--ink);
	background: #fff;
	-webkit-font-smoothing: antialiased;
}

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

h1, h2, h3, h4 {
	margin: 0;
	font-family: var(--font-head);
	font-weight: 700;
	line-height: 1.04;
	letter-spacing: -0.005em;
}

p { margin: 0 0 1em; }
a { color: inherit; }

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

.container { width: min(1200px, 100% - 2.5rem); margin-inline: auto; }

.screen-reader-text {
	position: absolute !important;
	width: 1px; height: 1px;
	overflow: hidden; clip: rect(0 0 0 0);
	white-space: nowrap;
}

.skip-link {
	position: absolute; left: 1rem; top: -4rem; z-index: 100;
	background: var(--dock); color: var(--navy-deep);
	padding: .6rem 1rem; font-weight: 600; text-decoration: none;
}
.skip-link:focus { top: 1rem; }

/* ---------- Boutons ---------- */
.btn {
	display: inline-block;
	padding: .9rem 1.7rem;
	border: 2px solid transparent;
	border-radius: 4px;
	font: 600 1rem/1.2 var(--font-body);
	text-decoration: none;
	cursor: pointer;
	transition: background-color .2s, border-color .2s, color .2s;
}
.btn--primary { background: var(--dock); color: var(--navy-deep); }
.btn--primary:hover { background: #FFC933; }
.btn--ghost { border-color: rgba(255, 255, 255, .55); color: #fff; }
.btn--ghost:hover { border-color: #fff; background: rgba(255, 255, 255, .08); }
.btn--small { padding: .6rem 1.1rem; font-size: .95rem; }

/* ---------- En-tête ---------- */
.site-header {
	position: relative; z-index: 50;
	background: var(--navy-deep);
	color: #fff;
}
.has-sticky-header .site-header { position: sticky; top: 0; }
.site-header__inner {
	display: flex; align-items: center; justify-content: space-between;
	gap: 2rem; height: var(--header-h);
}

.brand {
	display: inline-flex; align-items: center; gap: .7rem;
	color: #fff; text-decoration: none;
	font: 700 2rem/1 var(--font-head);
	letter-spacing: .03em;
}
.site-header .brand__logo { display: block; height: 58px; width: auto; max-width: 220px; object-fit: contain; }

.main-nav { display: flex; align-items: center; gap: 2rem; }
.main-nav ul { display: flex; gap: 2rem; list-style: none; margin: 0; padding: 0; }
.main-nav li a { color: #DCE3F0; text-decoration: none; font-weight: 500; }
.main-nav li a:hover { color: var(--dock); }

.nav-toggle { display: none; }

@media (max-width: 860px) {
	.nav-toggle {
		display: inline-flex; align-items: center; justify-content: center;
		width: 46px; height: 46px; padding: 0;
		background: transparent; border: 1px solid rgba(255, 255, 255, .35);
		border-radius: 4px; color: #fff; cursor: pointer;
	}
	.nav-toggle__bars,
	.nav-toggle__bars::before,
	.nav-toggle__bars::after {
		display: block; width: 22px; height: 2px; background: currentColor; content: "";
	}
	.nav-toggle__bars { position: relative; }
	.nav-toggle__bars::before { position: absolute; top: -7px; }
	.nav-toggle__bars::after { position: absolute; top: 7px; }

	.main-nav {
		display: none;
		position: absolute; left: 0; right: 0; top: var(--header-h);
		flex-direction: column; align-items: stretch; gap: 1.5rem;
		padding: 1.5rem 1.25rem 2rem;
		background: var(--navy-deep);
		border-top: 1px solid rgba(255, 255, 255, .12);
	}
	.main-nav.is-open { display: flex; }
	.main-nav ul { flex-direction: column; gap: 1rem; }
	.main-nav li a { font-size: 1.15rem; }
	.main-nav .btn { text-align: center; }
}

/* ---------- Accueil ---------- */
.hero {
	position: relative; isolation: isolate;
	min-height: min(94vh, 900px);
	padding: clamp(3rem, 9vh, 6rem) 0 3rem;
	color: #fff;
	background: var(--navy-deep);
}
.hero__img {
	position: absolute; inset: 0; z-index: -2;
	width: 100%; height: 100%;
	object-fit: cover; object-position: 50% 100%;
}
.hero::after {
	content: ""; position: absolute; inset: 0; z-index: -1;
	background: linear-gradient(180deg,
		rgba(12, 20, 38, .9) 0%,
		rgba(12, 20, 38, .62) 38%,
		rgba(12, 20, 38, 0) 72%);
}
.hero__content { max-width: 780px; animation: rise .8s ease-out both; }
.hero h1 { font-size: clamp(3rem, 7vw, 5.4rem); margin-bottom: 1.25rem; }
.hero p { max-width: 46ch; font-size: 1.2rem; color: #DCE3F0; }
.hero__actions { display: flex; flex-wrap: wrap; gap: .9rem; margin-top: 1.75rem; }

@keyframes rise {
	from { opacity: 0; transform: translateY(18px); }
	to   { opacity: 1; transform: none; }
}

/* ---------- Sections ---------- */
.section { padding: clamp(4rem, 9vw, 7rem) 0; }
.section--fog { background: var(--fog); }
.section--navy { background: var(--navy); color: #fff; }

.section-head { max-width: 640px; margin-bottom: clamp(2.5rem, 5vw, 3.75rem); }
.section-head h2,
.split__text h2,
.contact__info h2 { font-size: clamp(2.3rem, 5vw, 3.7rem); margin-bottom: 1rem; }
.section-head p { color: var(--slate); font-size: 1.125rem; margin: 0; }
.section-head--light { margin-bottom: 2.5rem; }
.section-head--light h2 { margin: 0; }

/* ---------- Services : portes de quai ---------- */
.docks { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.5rem; }

.dock {
	position: relative;
	min-height: 300px;
	padding: 3.25rem 1.9rem 2rem;
	color: #fff;
	background-color: var(--asphalt);
	background-image: repeating-linear-gradient(180deg, rgba(255, 255, 255, .045) 0 2px, transparent 2px 16px);
	border-top: 6px solid var(--navy-deep);
}
.dock::before,
.dock::after {
	content: ""; position: absolute; top: 34%; bottom: 0; width: 7px;
	background: var(--dock);
}
.dock::before { left: 0; }
.dock::after { right: 0; }

.dock__no {
	position: absolute; top: 0; left: 1.9rem; transform: translateY(-50%);
	padding: .1rem .75rem;
	background: #fff; color: var(--ink);
	border: 2px solid var(--navy-deep); border-radius: 2px;
	font: 700 1.3rem/1.3 var(--font-head);
}
.dock h3 { font-size: 1.85rem; margin-bottom: .7rem; }
.dock p { margin: 0; color: #CAD2DF; font-size: 1rem; }

@media (max-width: 1040px) { .docks { grid-template-columns: repeat(2, 1fr); row-gap: 2.5rem; } }
@media (max-width: 560px)  { .docks { grid-template-columns: 1fr; } .dock { min-height: 0; } }

/* ---------- Flotte ---------- */
.split {
	display: grid; grid-template-columns: 1.1fr 1fr; align-items: center;
	gap: clamp(2rem, 6vw, 5rem);
}
.split__media img {
	width: 100%; height: 100%; min-height: 380px; max-height: 540px;
	object-fit: cover; object-position: 88% 90%;
	border-radius: 4px;
}
.split__text > p { color: var(--slate); max-width: 52ch; }

.spec { display: grid; gap: 1.5rem; margin: 2rem 0 0; padding: 0; list-style: none; }
.spec li { padding-left: 1.2rem; border-left: 6px solid var(--dock); }
.spec strong { display: block; font: 700 1.55rem/1.15 var(--font-head); }
.spec span { color: var(--slate); }

@media (max-width: 860px) {
	.split { grid-template-columns: 1fr; }
	.split__media img { min-height: 260px; }
}

/* ---------- Engagements ---------- */
.commit { display: grid; grid-template-columns: repeat(3, 1fr); }
.commit > div { padding: 0 2rem; border-left: 1px solid rgba(255, 255, 255, .2); }
.commit > div:first-child { padding-left: 0; border-left: 0; }
.commit h3 { font-size: 1.9rem; margin-bottom: .7rem; }
.commit p { margin: 0; color: #C5CEE2; max-width: 36ch; }

@media (max-width: 860px) {
	.commit { grid-template-columns: 1fr; gap: 2rem; }
	.commit > div { padding: 2rem 0 0; border-left: 0; border-top: 1px solid rgba(255, 255, 255, .2); }
	.commit > div:first-child { padding-top: 0; border-top: 0; }
}

/* ---------- Contact ---------- */
.contact {
	display: grid; grid-template-columns: 1fr 1.15fr; align-items: start;
	gap: clamp(2rem, 6vw, 5rem);
}
.contact__info > p { color: var(--slate); max-width: 44ch; }

.contact__list { display: grid; gap: 1.25rem; margin: 2rem 0 0; }
.contact__list dt { font-weight: 600; color: var(--slate); font-size: .95rem; }
.contact__list dd { margin: 0; font-size: 1.15rem; font-weight: 500; }
.contact__list a { text-decoration: none; border-bottom: 2px solid var(--dock); }
.contact__list a:hover { background: var(--dock); }

.form { padding: clamp(1.5rem, 4vw, 2.5rem); background: #fff; border-top: 6px solid var(--navy); }
.form p { margin: 0 0 1.25rem; }
.form__row { display: grid; grid-template-columns: 1fr 1fr; gap: 0 1.25rem; }
.form label { display: block; margin-bottom: .4rem; font-weight: 600; font-size: .95rem; }
.form input,
.form textarea {
	width: 100%;
	padding: .8rem .9rem;
	font: inherit; color: var(--ink);
	background: #fff;
	border: 1px solid #B8C0CE; border-radius: 4px;
}
.form input:focus,
.form textarea:focus { border-color: var(--navy); outline: 3px solid rgba(244, 180, 0, .55); outline-offset: 0; }
.form textarea { resize: vertical; }
.form .hp { position: absolute; left: -9999px; }

.notice { padding: .9rem 1rem; border-left: 5px solid; font-weight: 500; }
.notice--ok { background: #E9F6EC; border-color: #2E8B4A; color: #14532D; }
.notice--error { background: #FBEAEA; border-color: #C0392B; color: #7F1D1D; }

@media (max-width: 860px) { .contact { grid-template-columns: 1fr; } }
@media (max-width: 520px) { .form__row { grid-template-columns: 1fr; } }

/* ---------- Pied de page ---------- */
.site-footer { padding: 2.25rem 0; background: var(--navy-deep); color: #AEB8CC; font-size: .95rem; }
.site-footer__inner { display: flex; flex-wrap: wrap; align-items: center; gap: 1rem 2rem; }
.site-footer__logo { height: 96px; width: auto; }
.site-footer__copy { margin: 0; flex: 1 1 auto; }
.site-footer__links { display: flex; gap: 1.5rem; margin: 0; padding: 0; list-style: none; }
.site-footer__links a { text-decoration: none; }
.site-footer__links a:hover { color: var(--dock); }

/* ---------- Pages et articles ---------- */
.content-wrap { padding: clamp(3rem, 7vw, 5rem) 0; max-width: 820px; }
.entry { margin-bottom: 3rem; }
.entry__title { font-size: clamp(2.3rem, 5vw, 3.6rem); margin-bottom: 1.25rem; }
.entry__title a { text-decoration: none; }
.entry__content { max-width: 68ch; }
.entry__content h2 { font-size: 2rem; margin: 2rem 0 .75rem; }
.entry__content h3 { font-size: 1.5rem; margin: 1.5rem 0 .5rem; }
.entry__content a { text-decoration-color: var(--dock); text-decoration-thickness: 2px; }
.entry__content img { border-radius: 4px; }

/* ---------- Mouvement réduit ---------- */
@media (prefers-reduced-motion: reduce) {
	html { scroll-behavior: auto; }
	.hero__content { animation: none; }
	* { transition: none !important; }
}

/* ---------- Pages internes ---------- */
.page-hero {
	padding: clamp(3rem, 8vw, 5.5rem) 0;
	background: var(--navy);
	color: #fff;
	border-bottom: 6px solid var(--dock);
}
.page-hero h1 { font-size: clamp(2.8rem, 7vw, 5rem); margin-bottom: .75rem; }
.page-hero p { max-width: 52ch; margin: 0; font-size: 1.2rem; color: #C5CEE2; }

.section-more { margin: 2.5rem 0 0; }
.link {
	font-weight: 600; text-decoration: none;
	border-bottom: 2px solid var(--dock);
}
.link:hover { background: var(--dock); }

.btn--dark { background: var(--navy-deep); color: #fff; }
.btn--dark:hover { background: #000; }

.cta-band { padding: clamp(2.5rem, 6vw, 4rem) 0; background: var(--dock); color: var(--navy-deep); }
.cta-band__inner { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1.25rem 2rem; }
.cta-band h2 { font-size: clamp(2rem, 4.5vw, 3rem); }

.steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 2rem; margin: 0; padding: 0; list-style: none; counter-reset: step; }
.steps li { position: relative; padding-top: 1.25rem; border-top: 6px solid var(--navy); counter-increment: step; }
.steps li::before {
	content: counter(step);
	position: absolute; top: -1.05rem; left: 0;
	min-width: 2rem; padding: 0 .55rem;
	background: var(--dock); color: var(--navy-deep);
	font: 700 1.3rem/1.9rem var(--font-head); text-align: center;
}
.steps h3 { font-size: 1.5rem; margin: .5rem 0 .5rem; }
.steps p { margin: 0; color: var(--slate); }
@media (max-width: 960px) { .steps { grid-template-columns: repeat(2, 1fr); row-gap: 2.5rem; } }
@media (max-width: 520px) { .steps { grid-template-columns: 1fr; } }

.about { display: grid; grid-template-columns: 1fr 1.2fr; gap: clamp(2rem, 6vw, 5rem); align-items: start; }
.about h2 { font-size: clamp(2.3rem, 5vw, 3.6rem); }
.about__text { font-size: 1.15rem; max-width: 60ch; }
@media (max-width: 860px) { .about { grid-template-columns: 1fr; } }

.commit--dark > div { border-color: var(--line); }
.commit--dark p { color: var(--slate); }

/* Masque le crayon de raccourci du Personnaliseur WordPress */
.customize-partial-edit-shortcut,
.widget .customize-partial-edit-shortcut button { display: none !important; }
