/*
 * E2IT - modele de page d expertise.
 *
 * Balisage et proportions du dossier de maquette (prefixe e2x-), valeurs
 * ramenees aux jetons du site. Les boutons sont ceux du systeme commun :
 * aucune regle de bouton ici, sauf la taille de celui de la barre.
 *
 *   Heros            image mise en avant, en fond sous voile et a droite
 *   Barre de page    collante, calee sous l en-tete fige
 *   01 Prestations   intro collante, cartes numerotees
 *   02 Realisations  fond photo automatique sous voile, masquee sans chantier
 *   Carrousel        composant global, surtitre renumerote au besoin
 */

.e2x-section,
#contact {
	/* En remontant, l en-tete (72 px) et la barre (64 px) sont visibles tous
	   les deux : la cible doit s arreter sous les deux. */
	scroll-margin-top: 148px;
}

/* ==================================================================
   Heros
   ================================================================== */
.e2x-hero {
	position: relative;
	overflow: hidden;
	isolation: isolate;
	background: var(--e2it-marine);
	color: var(--e2it-blanc);
}

.e2x-hero__fond {
	position: absolute;
	inset: 0;
	z-index: 0;
}

.e2x-hero__fond img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}

/* Voile marine : la photo devient une texture, le texte reste lisible
   (contraste verifie au dossier - ne pas alleger). Pas de motif d aretes
   par-dessus : l image seule, sous le degrade. */
.e2x-hero::before {
	content: "";
	position: absolute;
	inset: 0;
	z-index: 1;
	pointer-events: none;
	background: linear-gradient(100deg, rgba(7, 28, 62, .96) 0%, rgba(11, 46, 94, .9) 45%, rgba(11, 46, 94, .78) 100%);
}

/* Le heros commence sous l en-tete transparent, comme sur les autres pages. */
.e2x-hero__inner {
	position: relative;
	z-index: 2;
	max-width: var(--e2it-largeur-contenu, 1240px);
	margin: 0 auto;
	padding: calc(88px + var(--e2it-espace-12)) 40px var(--e2it-espace-16);
	box-sizing: border-box;
	display: grid;
	grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
	gap: 56px;
	align-items: center;
}

.e2x-hero__texte {
	display: flex;
	flex-direction: column;
	gap: 22px;
}

.e2x-ariane {
	display: flex;
	gap: 10px;
	flex-wrap: wrap;
	font: 500 11px/1.4 var(--e2it-police-mono);
	letter-spacing: var(--e2it-mono-interlettrage);
	text-transform: uppercase;
}

.e2x-ariane a {
	color: var(--e2it-glacier);
	text-decoration: none;
}

.e2x-ariane a:hover {
	color: var(--e2it-blanc);
}

.e2x-ariane span {
	color: var(--e2it-blanc);
}

.e2x-ariane .e2x-ariane__sep {
	color: var(--e2it-bleu-crete);
}

/* Titre condense comme tous les titres du site, a une taille pensee pour une
   demi-colonne : l echelle H1 du site (88 px) debordait des qu un intitule
   depasse deux mots. */
.e2x-hero .e2x-hero__titre:not(#e2it) {
	margin: 0;
	font-size: clamp(40px, 4.6vw, 64px);
	line-height: .98;
	letter-spacing: -.035em;
	color: var(--e2it-blanc);
	text-wrap: balance;
}

.e2x-hero__promesse {
	margin: 0;
	max-width: 540px;
	font-size: 19px;
	line-height: 1.6;
	color: var(--e2it-bleu-clair);
	text-wrap: pretty;
}

.e2x-reperes {
	display: flex;
	gap: 8px;
	flex-wrap: wrap;
	list-style: none;
	margin: 0;
	padding: 0;
}

.e2x-reperes li {
	font: 500 11px/1 var(--e2it-police-mono);
	letter-spacing: .1em;
	text-transform: uppercase;
	color: var(--e2it-blanc);
	border: 1px solid rgba(169, 196, 229, .4);
	border-radius: var(--e2it-rayon-pilule);
	padding: 8px 13px;
}

.e2x-hero__actions {
	display: flex;
	gap: 20px;
	flex-wrap: wrap;
	align-items: center;
	padding-top: 6px;
}

/* Lien secondaire : meme geste Filet que les liens d action du site. */
.e2x-lien {
	font: 600 15px/1 var(--e2it-police);
	color: var(--e2it-blanc);
	padding: 14px 0 6px;
	text-decoration: none;
	background-image: linear-gradient(var(--e2it-glacier), var(--e2it-glacier)), linear-gradient(rgba(169, 196, 229, .45), rgba(169, 196, 229, .45));
	background-repeat: no-repeat;
	background-position: 100% 100%, 0 100%;
	background-size: 0 2px, 100% 1px;
	transition: background-size var(--e2it-bouton-duree, 320ms) var(--e2it-courbe);
}

.e2x-lien:hover,
.e2x-lien:focus-visible {
	color: var(--e2it-blanc);
	background-position: 0 100%, 0 100%;
	background-size: 100% 2px, 100% 1px;
}

.e2x-hero__photo {
	aspect-ratio: 5 / 4;
	border-radius: 14px;
	overflow: hidden;
	box-shadow: 0 24px 56px rgba(7, 28, 62, .3);
	background: var(--e2it-bleu-profond);
}

.e2x-hero__photo img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}

/* ==================================================================
   Barre de page

   La barre est collante par son conteneur Elementor (e2x-barre-hote) : un
   element collant ne se deplace que dans son parent, et le parent du widget
   n est pas plus haut que la barre. Le conteneur, lui, a pour parent la page
   entiere.
   ================================================================== */
.e2x-barre-hote.e-con:not(#e2it) {
	position: sticky;
	top: 72px;
	z-index: 800;
	padding: 0;
	transition: top 240ms var(--e2it-courbe);
}

body.admin-bar .e2x-barre-hote.e-con:not(#e2it) {
	top: calc(72px + 32px);
}

/* En-tete masque en descendant : la barre prend seule le haut de l ecran. */
body.e2it-entete-cachee .e2x-barre-hote.e-con:not(#e2it) {
	top: 0;
}

body.admin-bar.e2it-entete-cachee .e2x-barre-hote.e-con:not(#e2it) {
	top: 32px;
}

.e2x-barre {
	background: rgba(255, 255, 255, .97);
	border-bottom: 1px solid var(--e2it-bordure);
}

.e2x-barre__inner {
	max-width: var(--e2it-largeur-contenu, 1240px);
	margin: 0 auto;
	padding: 0 40px;
	box-sizing: border-box;
	height: 64px;
	display: flex;
	align-items: center;
	gap: 28px;
}

.e2x-barre__titre {
	font-weight: 620;
	font-stretch: 88%;
	font-size: 17px;
	color: var(--e2it-marine);
	white-space: nowrap;
}

.e2x-barre nav {
	display: flex;
	gap: 4px;
	flex: 1;
	min-width: 0;
	overflow-x: auto;
	scrollbar-width: none;
}

.e2x-barre nav::-webkit-scrollbar {
	display: none;
}

.e2x-barre nav a {
	font-size: 14px;
	white-space: nowrap;
	padding: 9px 14px;
	border-radius: var(--e2it-rayon-pilule);
	color: var(--e2it-texte-secondaire);
	text-decoration: none;
	transition: background-color .2s ease, color .2s ease;
}

.e2x-barre nav a:hover {
	color: var(--e2it-marine);
}

.e2x-barre nav a[aria-current="true"] {
	color: var(--e2it-marine);
	font-weight: 600;
	background: var(--e2it-bleu-pale);
}

.e2x-barre .e2x-barre__cta:not(#e2it) {
	min-height: 40px;
	padding: 0 18px;
	font-size: 14px;
	white-space: nowrap;
}

/* ==================================================================
   01 Prestations
   ================================================================== */
.e2x-prest {
	background: var(--e2it-blanc);
}

.e2x-prest__inner {
	max-width: var(--e2it-largeur-contenu, 1240px);
	margin: 0 auto;
	padding: 88px 40px 80px;
	box-sizing: border-box;
	display: grid;
	grid-template-columns: minmax(0, 1fr) minmax(0, 2fr);
	gap: 64px;
	align-items: start;
}

/* Intro collante : sous la barre (64 px), avec de l air. */
.e2x-intro {
	position: sticky;
	top: 96px;
	display: flex;
	flex-direction: column;
	gap: 16px;
	max-width: 380px;
}

.e2x-surtitre {
	display: flex;
	align-items: center;
	gap: 14px;
	margin: 0;
	font: 500 11px/1.4 var(--e2it-police-mono);
	letter-spacing: var(--e2it-mono-interlettrage);
	text-transform: uppercase;
	color: var(--e2it-texte-tertiaire);
}

.e2x-surtitre::before {
	content: "";
	width: 28px;
	height: 2px;
	background: var(--e2it-accent);
	flex: none;
}

.e2x-h2:not(#e2it) {
	margin: 0;
	font-size: clamp(28px, 2.6vw, 38px);
	line-height: 1.06;
	letter-spacing: -.03em;
	color: var(--e2it-marine);
	text-wrap: balance;
}

.e2x-intro__texte {
	margin: 0;
	font-size: 17px;
	line-height: 1.62;
	color: var(--e2it-texte-secondaire);
}

.e2x-cartes {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
	gap: 12px;
	list-style: none;
	margin: 0;
	padding: 0;
}

.e2x-carte {
	display: flex;
	gap: 18px;
	padding: 24px;
	border: 1px solid var(--e2it-bordure);
	border-radius: 14px;
	background: var(--e2it-blanc);
	transition: border-color .2s ease, box-shadow .2s ease;
}

@media (hover: hover) {
	.e2x-carte:hover {
		border-color: var(--e2it-glacier);
		box-shadow: 0 10px 28px rgba(7, 28, 62, .08);
	}
}

.e2x-carte__num {
	font: 500 11px/1 var(--e2it-police-mono);
	letter-spacing: .1em;
	color: var(--e2it-bleu-profond);
	padding-top: 5px;
	flex: none;
}

.e2x-carte .e2x-carte__titre:not(#e2it) {
	margin: 0 0 6px;
	font-size: 19px;
	line-height: 1.25;
	color: var(--e2it-marine);
}

.e2x-carte p {
	margin: 0;
	font-size: 15px;
	line-height: 1.55;
	color: var(--e2it-texte-secondaire);
}

/* ==================================================================
   02 Realisations
   ================================================================== */
.e2x-real {
	position: relative;
	overflow: hidden;
	isolation: isolate;
	background: var(--e2it-marine);
}

.e2x-real__fond {
	position: absolute;
	inset: 0;
	z-index: 0;
}

.e2x-real__fond img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}

.e2x-real::before {
	content: "";
	position: absolute;
	inset: 0;
	z-index: 1;
	pointer-events: none;
	background: linear-gradient(to bottom, rgba(7, 28, 62, .9) 0%, rgba(11, 46, 94, .86) 55%, rgba(7, 28, 62, .94) 100%);
}

.e2x-real__inner {
	position: relative;
	z-index: 2;
	max-width: var(--e2it-largeur-contenu, 1240px);
	margin: 0 auto;
	padding: 80px 40px 88px;
	box-sizing: border-box;
	display: flex;
	flex-direction: column;
	gap: 32px;
}

.e2x-real__tete {
	display: flex;
	justify-content: space-between;
	align-items: flex-end;
	gap: 20px;
	flex-wrap: wrap;
	border-bottom: 1px solid rgba(169, 196, 229, .24);
	padding-bottom: 22px;
}

.e2x-real .e2x-surtitre {
	color: var(--e2it-glacier);
	margin-bottom: 10px;
}

.e2x-real .e2x-h2:not(#e2it) {
	color: var(--e2it-blanc);
}

.e2x-real__grille {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 20px;
}

/* Un ou deux chantiers : les cartes gardent la largeur d une colonne sur
   trois, plutot que de s etirer sur toute la page. */
.e2x-real__grille[data-nombre="1"],
.e2x-real__grille[data-nombre="2"] {
	grid-template-columns: repeat(3, minmax(0, 1fr));
}

.e2x-chantier {
	display: flex;
	flex-direction: column;
	background: var(--e2it-blanc);
	border-radius: 14px;
	overflow: hidden;
	color: var(--e2it-texte);
	text-decoration: none;
	transition: transform .28s var(--e2it-courbe);
}

@media (hover: hover) {
	.e2x-chantier:hover {
		transform: translateY(-4px);
		color: var(--e2it-texte);
	}
}

.e2x-chantier__image {
	width: 100%;
	aspect-ratio: 16 / 10;
	object-fit: cover;
	display: block;
}

/* Sans photo : un aplat bleu a motif d aretes, plutot qu une case vide. */
.e2x-chantier__vide {
	display: block;
	aspect-ratio: 16 / 10;
	background-color: var(--e2it-bleu-profond);
	background-image: repeating-linear-gradient(30deg, rgba(169, 196, 229, .14) 0 2px, transparent 2px 18px);
}

.e2x-chantier__corps {
	padding: 20px 22px 24px;
	display: flex;
	flex-direction: column;
	gap: 10px;
}

.e2x-chantier__meta {
	font: 500 10px/1.4 var(--e2it-police-mono);
	letter-spacing: .12em;
	text-transform: uppercase;
	color: var(--e2it-bleu-profond);
}

.e2x-chantier__titre {
	font-family: var(--e2it-police);
	font-weight: 620;
	font-stretch: 88%;
	font-size: 19px;
	line-height: 1.25;
	color: var(--e2it-marine);
}

.e2x-attente {
	max-width: 720px;
	margin: 32px auto;
	padding: 24px;
	border: 1.5px dashed var(--e2it-bleu-crete);
	border-radius: 14px;
	font-size: 14px;
	color: var(--e2it-texte-secondaire);
	text-align: center;
}

/* ==================================================================
   En-tete masque en descendant, sur ces pages seulement

   En-tete fige (72 px) plus barre de page (64 px), c est 136 px pris sur
   l ecran pendant toute la lecture. L en-tete se retire en descendant et
   revient des qu on remonte ; le focus clavier le fait toujours reparaitre.
   ================================================================== */
body.e2it-page-modele .e2it-entete:not(#e2it) {
	transition:
		background-color 240ms var(--e2it-courbe),
		border-color 240ms var(--e2it-courbe),
		box-shadow 240ms var(--e2it-courbe),
		transform 240ms var(--e2it-courbe);
}

body.e2it-entete-cachee .e2it-entete:not(#e2it):not(:focus-within) {
	transform: translateY(-110%);
}

:focus-visible {
	outline-color: var(--e2it-accent);
}

/* ==================================================================
   Tablette et mobile
   ================================================================== */
@media (max-width: 1023px) {
	.e2x-hero__inner,
	.e2x-prest__inner {
		grid-template-columns: minmax(0, 1fr);
		gap: 32px;
		padding-left: 20px;
		padding-right: 20px;
	}

	.e2x-hero__inner {
		padding-top: calc(92px + var(--e2it-espace-8));
		padding-bottom: 48px;
	}

	.e2x-intro {
		position: static;
		max-width: none;
	}

	.e2x-prest__inner {
		padding-top: 56px;
		padding-bottom: 56px;
	}

	.e2x-barre-hote.e-con:not(#e2it) {
		top: 78px;
	}

	.e2x-barre__inner {
		padding: 0 20px;
		gap: 12px;
		height: 56px;
	}

	.e2x-barre__titre {
		display: none;
	}

	.e2x-barre .e2x-barre__cta:not(#e2it) {
		padding: 0 14px;
		min-height: 36px;
	}

	.e2x-real__inner {
		padding: 56px 20px 64px;
	}

	.e2x-real__grille,
	.e2x-real__grille[data-nombre] {
		grid-template-columns: minmax(0, 1fr);
	}

	.e2x-section,
	#contact {
		scroll-margin-top: 140px;
	}
}

@media (max-width: 782px) {
	body.admin-bar .e2x-barre-hote.e-con:not(#e2it) {
		top: calc(78px + 46px);
	}

	body.admin-bar.e2it-entete-cachee .e2x-barre-hote.e-con:not(#e2it) {
		top: 46px;
	}
}

@media (prefers-reduced-motion: reduce) {
	.e2x-carte,
	.e2x-chantier,
	.e2x-lien,
	.e2x-barre-hote.e-con,
	body.e2it-page-modele .e2it-entete:not(#e2it) {
		transition: none;
	}
}
