/* =========================================================
   PORTEO BTP — styles principaux
   DA : carrousel PORTEO BTP (bleu roi, blanc, jaune, Inter)
   ========================================================= */

/* ---------- Police Inter (hébergée dans le thème) ---------- */
@font-face {
	font-family: "Inter";
	src: url("../fonts/inter-latin-wght-normal.woff2") format("woff2");
	font-weight: 100 900;
	font-style: normal;
	font-display: swap;
	unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
	font-family: "Inter";
	src: url("../fonts/inter-latin-ext-wght-normal.woff2") format("woff2");
	font-weight: 100 900;
	font-style: normal;
	font-display: swap;
	unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

/* ---------- Variables de la charte ---------- */
:root {
	--blue: #0071ce;          /* bleu roi du carrousel */
	--blue-light: #519edd;    /* courbes de fond */
	--blue-pale: #e6f1fb;
	--blue-ink: #06315c;      /* texte foncé sur fond clair */
	--yellow: #ffde00;        /* carré flèche */
	--red: #e30613;           /* « BTP » du logo */
	--white: #ffffff;
	--grey-50: #f5f7fa;
	--grey-200: #dfe4ea;
	--grey-600: #5b6773;
	--text: #0f1b26;

	--font: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;

	--container: 1280px;
	--gutter: clamp(1.25rem, 4vw, 3rem);
	--section-y: clamp(4rem, 9vw, 8rem);
	--header-h: 5.5rem;

	--ease-out: cubic-bezier(.22, 1, .36, 1);
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
	margin: 0;
	font-family: var(--font);
	font-size: 1.0625rem;
	line-height: 1.6;
	color: var(--text);
	background: var(--white);
	-webkit-font-smoothing: antialiased;
}
img, video, svg { display: block; max-width: 100%; height: auto; }
a { color: var(--blue); text-decoration-thickness: 1px; text-underline-offset: .2em; }
a:hover { color: var(--blue-ink); }
:focus-visible { outline: 3px solid var(--yellow); outline-offset: 3px; }

.container {
	width: 100%;
	max-width: calc(var(--container) + var(--gutter) * 2);
	margin-inline: auto;
	padding-inline: var(--gutter);
}
.section { padding-block: var(--section-y); }
.section--blue { background: var(--blue); color: var(--white); }
.section--pale { background: var(--grey-50); }

.screen-reader-text {
	position: absolute !important; width: 1px; height: 1px; overflow: hidden;
	clip: rect(1px, 1px, 1px, 1px); white-space: nowrap;
}
.skip-link {
	position: absolute; left: 1rem; top: -4rem; z-index: 1000;
	padding: .75rem 1rem; background: var(--yellow); color: var(--blue-ink); font-weight: 700;
}
.skip-link:focus { top: 1rem; }

/* ---------- Titres : capitales grasses + mélange fin/gras ---------- */
.title {
	margin: 0 0 1.25rem;
	font-weight: 900;
	text-transform: uppercase;
	letter-spacing: -0.02em;
	line-height: 1.02;
	color: var(--blue);
}
.title .light { font-weight: 300; letter-spacing: 0; }
.section--blue .title { color: var(--white); }
.title--xl { font-size: clamp(2.5rem, 6vw, 5.5rem); }
.title--lg { font-size: clamp(2rem, 4.2vw, 3.75rem); }
.title--md { font-size: clamp(1.5rem, 2.6vw, 2.25rem); }

.eyebrow {
	display: inline-block;
	margin-bottom: 1rem;
	font-size: .8125rem;
	font-weight: 800;
	letter-spacing: .12em;
	text-transform: uppercase;
}
.lead { font-size: clamp(1.125rem, 1.6vw, 1.375rem); line-height: 1.5; max-width: 46ch; }

/* ---------- Boutons : signature carré jaune + flèche bleue ---------- */
.btn {
	display: inline-flex;
	align-items: stretch;
	gap: 0;
	font: 700 .9375rem/1 var(--font);
	letter-spacing: .04em;
	text-transform: uppercase;
	text-decoration: none;
	border: 0;
	cursor: pointer;
}
.btn > span:first-child {
	display: inline-flex; align-items: center;
	padding: 1rem 1.4rem;
	background: var(--blue);
	color: var(--white);
	transition: background .3s var(--ease-out);
}
.btn__arrow {
	position: relative;
	width: 3rem;
	background: var(--yellow);
	overflow: hidden;
}
.btn__arrow::before {
	content: "";
	position: absolute; inset: 0;
	background: var(--blue);
	-webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M4 10.5h11.2l-4.6-4.6L12.7 4 21 12l-8.3 8-2.1-1.9 4.6-4.6H4z'/%3E%3C/svg%3E") center / 1.35rem no-repeat;
	        mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M4 10.5h11.2l-4.6-4.6L12.7 4 21 12l-8.3 8-2.1-1.9 4.6-4.6H4z'/%3E%3C/svg%3E") center / 1.35rem no-repeat;
	transition: transform .35s var(--ease-out);
}
.btn:hover > span:first-child { background: var(--blue-ink); }
.btn:hover .btn__arrow::before { transform: translateX(.3rem); }
.section--blue .btn > span:first-child { background: var(--white); color: var(--blue); }

/* Bouton seul en carré jaune (flèche de carrousel, lien « voir plus ») */
.arrow-square {
	display: inline-grid; place-items: center;
	width: 3.25rem; height: 3.25rem;
	background: var(--yellow); color: var(--blue);
}

/* ---------- En-tête ---------- */
.site-header {
	position: sticky; top: 0; z-index: 100;
	background: var(--white);
	transition: box-shadow .3s var(--ease-out), transform .4s var(--ease-out);
}
.admin-bar .site-header { top: 32px; }
@media (max-width: 782px) { .admin-bar .site-header { top: 46px; } }
.site-header.is-scrolled { box-shadow: 0 6px 24px rgba(6, 49, 92, .08); }
.site-header.is-hidden { transform: translateY(-100%); }

.topbar { background: var(--blue-ink); color: var(--white); font-size: .8125rem; }
.topbar__inner { display: flex; justify-content: flex-end; align-items: center; gap: 1.5rem; min-height: 2.25rem; }
.topbar__menu { display: flex; gap: 1.5rem; margin: 0; padding: 0; list-style: none; }
.topbar a { color: var(--white); text-decoration: none; }
.topbar a:hover { color: var(--yellow); }
.topbar__lang .is-active { font-weight: 800; color: var(--yellow); }

.header__inner { display: flex; align-items: center; gap: 2rem; min-height: var(--header-h); }
.header__logo { flex-shrink: 0; text-decoration: none; }
.header__logo img { max-height: 3.25rem; width: auto; }
.header__logo-text { font-weight: 900; font-size: 1.5rem; color: var(--blue); text-transform: uppercase; }

.header__nav { margin-left: auto; }
.nav__menu { display: flex; gap: 2rem; margin: 0; padding: 0; list-style: none; }
.nav__menu > li { position: relative; }
.nav__menu > li > a {
	display: block; padding-block: 2rem;
	font-weight: 700; font-size: .9375rem; text-transform: uppercase; letter-spacing: .03em;
	color: var(--text); text-decoration: none;
}
.nav__menu > li > a::after {
	content: ""; display: block; height: 3px; margin-top: .35rem;
	background: var(--yellow); transform: scaleX(0); transform-origin: left;
	transition: transform .35s var(--ease-out);
}
.nav__menu > li > a:hover::after,
.nav__menu > .current-menu-item > a::after,
.nav__menu > .current-menu-ancestor > a::after { transform: scaleX(1); }
.nav__menu .sub-menu {
	position: absolute; top: 100%; left: -1.25rem; min-width: 15rem;
	margin: 0; padding: .75rem 0; list-style: none;
	background: var(--white); box-shadow: 0 16px 40px rgba(6, 49, 92, .12);
	opacity: 0; visibility: hidden; transform: translateY(.5rem);
	transition: opacity .25s, transform .25s var(--ease-out), visibility .25s;
}
.nav__menu li:hover > .sub-menu,
.nav__menu li:focus-within > .sub-menu { opacity: 1; visibility: visible; transform: none; }
.nav__menu .sub-menu a { display: block; padding: .55rem 1.25rem; color: var(--text); text-decoration: none; font-size: .9375rem; }
.nav__menu .sub-menu a:hover { color: var(--blue); background: var(--blue-pale); }

.header__burger { display: none; }

@media (max-width: 1080px) {
	.header__cta { display: none; }
	.header__burger {
		display: grid; gap: .4rem; margin-left: auto;
		width: 2.75rem; height: 2.75rem; padding: .7rem .55rem;
		background: var(--yellow); border: 0; cursor: pointer;
	}
	.header__burger span:not(.screen-reader-text) { display: block; height: 3px; background: var(--blue); transition: transform .3s var(--ease-out); }
	.header__burger[aria-expanded="true"] span:nth-of-type(2) { transform: translateY(.3rem) rotate(45deg); }
	.header__burger[aria-expanded="true"] span:nth-of-type(3) { transform: translateY(-.3rem) rotate(-45deg); }

	.header__nav {
		position: fixed; inset: calc(var(--header-h) + 2.25rem) 0 0 0;
		margin: 0; padding: 2rem var(--gutter);
		background: var(--blue); overflow-y: auto;
		transform: translateX(100%); transition: transform .45s var(--ease-out);
	}
	.header__nav.is-open { transform: none; }
	.nav__menu { flex-direction: column; gap: 0; }
	.nav__menu > li > a { padding-block: 1rem; color: var(--white); font-size: 1.375rem; border-bottom: 1px solid rgba(255,255,255,.15); }
	.nav__menu > li > a::after { display: none; }
	.nav__menu .sub-menu { position: static; opacity: 1; visibility: visible; transform: none; box-shadow: none; background: transparent; padding: .25rem 0 1rem; }
	.nav__menu .sub-menu a { color: rgba(255,255,255,.85); padding-inline: 0; }
	.nav__menu .sub-menu a:hover { background: transparent; color: var(--yellow); }
}

/* ---------- Pied de page ---------- */
.site-footer { background: var(--blue); color: var(--white); position: relative; overflow: hidden; }
.site-footer a { color: var(--white); text-decoration: none; }
.site-footer a:hover { color: var(--yellow); }
.footer__top {
	display: grid; grid-template-columns: 1.2fr 2fr auto; gap: 3rem;
	padding-block: 4.5rem 3rem;
}
.footer__logo img { max-height: 3.5rem; width: auto; }
.footer__slogan { margin: 1rem 0 0; font-weight: 300; font-size: 1.25rem; text-transform: uppercase; letter-spacing: .04em; }
.footer__menu { columns: 2; gap: 2rem; margin: 0; padding: 0; list-style: none; }
.footer__menu li { margin-bottom: .6rem; break-inside: avoid; }
.footer__group {
	grid-column: -2 / -1; justify-self: end;
	align-self: start; display: grid; justify-items: center; gap: .25rem;
	padding: .9rem 1.4rem; border: 1px solid rgba(255,255,255,.6);
}
.footer__group-label { font-size: .75rem; opacity: .85; }
.footer__group-name { font-weight: 700; letter-spacing: .14em; }
.footer__bottom {
	display: flex; flex-wrap: wrap; justify-content: space-between; gap: 1rem;
	padding-block: 1.5rem; border-top: 1px solid rgba(255,255,255,.2);
	font-size: .875rem;
}
.footer__bottom p { margin: 0; }
.footer__legal { display: flex; flex-wrap: wrap; gap: 1.5rem; margin: 0; padding: 0; list-style: none; }

@media (max-width: 860px) {
	.footer__top { grid-template-columns: 1fr; }
	.footer__group { grid-column: auto; justify-self: start; }
}

/* ---------- Contenu éditorial ---------- */
.entry__content { max-width: 72ch; }
.entry__content h2, .entry__content h3 { color: var(--blue); line-height: 1.15; }

/* ---------- Animations d'apparition (pilotées par main.js) ---------- */
.js [data-reveal] { opacity: 0; transform: translateY(2rem); }

@media (prefers-reduced-motion: reduce) {
	html { scroll-behavior: auto; }
	*, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
	.js [data-reveal] { opacity: 1; transform: none; }
}
