/*
 * enduro-maroc.com : en-tête, menu plein écran, boutons, logo et pied de page « L'empreinte ».
 * Chargé sur toutes les pages. Les classes sont préfixées ep- pour ne pas croiser guide.css.
 */

:root {
	--gomme: #141210;          /* sol de la page */
	--gomme-2: #1D1A17;        /* surfaces posées dessus (cartes, barre) */
	--gomme-3: #2A2622;        /* survol, champs */
	--os: #EFE6D8;             /* texte principal sur gomme (15,9:1) */
	--os-doux: #B5AA9A;        /* texte secondaire sur gomme (8,1:1) */
	--sable: #C98B45;          /* bandes pleines, boutons d'action (texte gomme 6,9:1) */
	--sable-clair: #E2B57C;    /* sable en texte sur gomme (9,6:1) */
	--braise: #E0612A;         /* état actif uniquement */
	--trait: rgba(239, 230, 216, .14);
	--controle: rgba(239, 230, 216, .42); /* bord des champs, 3:1 minimum */

	--titres: 'Big Shoulders Display', 'Arial Narrow', sans-serif;
	--texte: 'Barlow', system-ui, sans-serif;
	--main: 'Kalam', cursive;

	--largeur: 1320px;
	--gouttiere: 20px;
	--hd-h: 64px;
	--sortie: cubic-bezier(.16, 1, .3, 1);   /* sortie exponentielle */
	--rapide: .25s;
	--lent: .9s;
}

@media (min-width: 900px) {
	:root { --gouttiere: 48px; --hd-h: 76px; }
}

.ep-hd, .ep-menu, .ep-pied { font-family: var(--texte); -webkit-font-smoothing: antialiased; }
.ep-hd *, .ep-menu *, .ep-pied * { box-sizing: border-box; }

.ep-sr, .ep-evite:not(:focus) {
	position: absolute; width: 1px; height: 1px; overflow: hidden;
	clip: rect(0 0 0 0); white-space: nowrap;
}
.ep-evite:focus { position: fixed; z-index: 200; top: 12px; left: 12px; padding: 10px 16px; background: var(--sable); color: var(--gomme); }

.ep-ic { width: 20px; height: 20px; flex-shrink: 0; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

.ep-enveloppe { width: 100%; max-width: var(--largeur); margin: 0 auto; padding: 0 var(--gouttiere); }


/* Boutons --------------------------------------------------------------------------------- */

.ep-bt {
	display: inline-flex; align-items: center; justify-content: center; gap: 12px;
	min-height: 48px; padding: 0 22px;
	border: 0; border-radius: 4px;
	font: 600 16px/1 var(--texte); letter-spacing: .01em; text-decoration: none;
	cursor: pointer;
	transition: background-color var(--rapide) ease, color var(--rapide) ease, transform var(--rapide) var(--sortie);
}
.ep-bt .ep-ic { transition: transform .35s var(--sortie); }
.ep-bt:hover .ep-ic { transform: translateX(4px); }
.ep-bt:active { transform: scale(.98); }
.ep-bt--large { min-height: 58px; padding: 0 28px; font-size: 17px; }
.ep-bt--sable { background: var(--sable); color: var(--gomme); }
.ep-bt--sable:hover { background: var(--sable-clair); }
.ep-bt--encre { background: var(--gomme); color: var(--os); }
.ep-bt--encre:hover { background: #000; }
.ep-bt--contour { background: transparent; color: var(--os); box-shadow: inset 0 0 0 1.5px var(--controle); }
.ep-bt--contour:hover { box-shadow: inset 0 0 0 1.5px var(--os); }

.lien { background: none; border: 0; padding: 8px 4px; color: var(--os-doux); text-decoration: underline; text-underline-offset: 4px; cursor: pointer; }
.lien:hover { color: var(--os); }
.lien[hidden] { display: none; }


/* Logo : « maroc » reste manuscrit (engagement de marque) --------------------------------- */

.ep-logo {
	display: inline-flex; align-items: baseline; gap: 6px;
	font: 800 25px/1 var(--titres); letter-spacing: .02em; text-transform: uppercase; text-decoration: none;
	color: var(--os);
}
.ep-logo span { font: 700 24px/1 var(--main); text-transform: none; color: var(--sable-clair); letter-spacing: 0; }
.ep-logo--grand { font-size: 40px; }
.ep-logo--grand span { font-size: 38px; }


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

.ep-hd {
	position: fixed; z-index: 50; inset: 0 0 auto;
	height: var(--hd-h);
	transition: transform .45s var(--sortie), background-color .3s ease, box-shadow .3s ease;
}
/* Voile sous l'en-tête transparent : le menu reste lisible sur la photo et la trace */
.ep-hd::before {
	content: ""; position: absolute; inset: 0 0 -40px; z-index: -1; pointer-events: none;
	background: linear-gradient(180deg, rgba(20, 18, 16, .78), rgba(20, 18, 16, 0));
	transition: opacity .3s ease;
}
.ep-hd.est-plein::before { opacity: 0; }
.ep-hd.est-plein { background: rgba(20, 18, 16, .97); box-shadow: 0 1px 0 var(--trait); }
.ep-hd.est-cache { transform: translateY(-100%); }
.ep-hd__in {
	display: flex; align-items: center; gap: 28px; height: 100%;
	max-width: var(--largeur); margin: 0 auto; padding: 0 var(--gouttiere);
}
.ep-hd__nav { display: none; gap: 30px; }
.ep-hd__nav a {
	position: relative; padding: 8px 0;
	font: 700 16px/1 var(--titres); letter-spacing: .12em; text-transform: uppercase; text-decoration: none;
	color: var(--os);
}
.ep-hd__nav a::after {
	content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 2px; background: var(--sable);
	transform: scaleX(0); transform-origin: right; transition: transform .45s var(--sortie);
}
.ep-hd__nav a:hover::after, .ep-hd__nav a.est-actif::after { transform: scaleX(1); transform-origin: left; }
.ep-hd__nav a.est-actif { color: var(--sable-clair); }

/* Rappel de la recherche : apparaît quand la phrase du haut sort de l'écran */
.ep-hd__rappel {
	display: none; align-items: center; gap: 10px;
	margin-left: auto; min-height: 42px; padding: 0 16px 0 14px;
	border: 1.5px solid var(--controle); border-radius: 4px; background: transparent;
	font-size: 15px; cursor: pointer; white-space: nowrap;
	animation: apparait .5s var(--sortie);
}
.ep-hd__rappel strong { color: var(--sable-clair); font-weight: 600; }
.ep-hd__rappel:hover { border-color: var(--os); }
.ep-hd__cta { display: none; min-height: 44px; font-size: 15px; }
.ep-hd__menu {
	display: inline-flex; align-items: center; gap: 10px; margin-left: auto;
	min-height: 44px; padding: 0 4px; border: 0; background: none; cursor: pointer;
	font: 700 15px/1 var(--titres); letter-spacing: .12em; text-transform: uppercase;
}
.ep-hd__barres { display: grid; gap: 6px; width: 24px; }
.ep-hd__barres i { height: 2px; background: currentColor; transition: transform .35s var(--sortie); }
.ep-hd__menu[aria-expanded="true"] .ep-hd__barres i:first-child { transform: translateY(4px) rotate(45deg); }
.ep-hd__menu[aria-expanded="true"] .ep-hd__barres i:last-child { transform: translateY(-4px) rotate(-45deg); }

@media (min-width: 640px) {
	.ep-hd__cta { display: inline-flex; }
	.ep-hd__menu { margin-left: 0; }
}
@media (min-width: 1040px) {
	.ep-hd__nav { display: flex; }
	.ep-hd__menu { display: none; }
	.ep-hd__cta { margin-left: auto; }
	.ep-hd__rappel:not([hidden]) { display: inline-flex; }
	.ep-hd__rappel:not([hidden]) + .ep-hd__cta { margin-left: 0; }
}

/* Menu plein écran */
.ep-menu {
	position: fixed; z-index: 45; inset: 0;
	display: flex; flex-direction: column; justify-content: flex-end; gap: 28px;
	padding: calc(var(--hd-h) + 24px) var(--gouttiere) calc(32px + env(safe-area-inset-bottom));
	background: var(--gomme);
	clip-path: inset(0 0 100% 0); transition: clip-path .6s var(--sortie);
}
.ep-menu[hidden] { display: none; }
.ep-menu.est-ouvert { clip-path: inset(0 0 0 0); }
.ep-menu__liens { display: grid; gap: 4px; }
.ep-menu__liens a {
	font: 900 64px/1 var(--titres); text-transform: uppercase; text-decoration: none;
	opacity: 0; transform: translateY(24px);
	transition: opacity .5s ease, transform .6s var(--sortie);
}
.ep-menu.est-ouvert .ep-menu__liens a { opacity: 1; transform: none; }
.ep-menu.est-ouvert .ep-menu__liens a:nth-child(2) { transition-delay: .05s; }
.ep-menu.est-ouvert .ep-menu__liens a:nth-child(3) { transition-delay: .1s; }
.ep-menu.est-ouvert .ep-menu__liens a:nth-child(4) { transition-delay: .15s; }
.ep-menu__note { margin: 0; color: var(--os-doux); font-size: 15px; }
body.ep-menu-ouvert { overflow: hidden; }


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

.ep-pied { padding: 80px 0 32px; border-top: 1px solid var(--trait); }
.ep-pied__in { display: grid; gap: 40px; }
.ep-pied__marque p { max-width: 34ch; margin: 16px 0 0; color: var(--os-doux); }
.ep-pied__col { display: grid; gap: 10px; align-content: start; }
.ep-pied__col p { margin: 0 0 4px; color: var(--sable-clair); font: 700 14px/1 var(--titres); letter-spacing: .14em; text-transform: uppercase; }
.ep-pied__col a { color: var(--os-doux); text-decoration: none; }
.ep-pied__col a:hover { color: var(--os); }
.ep-pied__bas { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px; margin-top: 64px; padding-top: 24px; border-top: 1px solid var(--trait); color: var(--os-doux); font-size: 14px; }
@media (min-width: 900px) { .ep-pied__in { grid-template-columns: 2fr 1fr 1fr 1.3fr; } }


/* Raccords avec les autres pages : l'en-tête est collé en haut, toujours plein */
.ep-hd--page { position: sticky; }
.admin-bar .ep-hd { top: 32px; }
.admin-bar .ep-menu { top: 32px; }
@media (max-width: 782px) { .admin-bar .ep-hd, .admin-bar .ep-menu { top: 46px; } }
@media (max-width: 600px) { .admin-bar .ep-hd.est-plein { top: 0; } }
/* GeneratePress donne un fond gris aux boutons survolés : on le neutralise dans l'en-tête */
.ep-hd button:hover, .ep-hd button:focus, .ep-menu button:hover, .ep-menu button:focus { background-color: transparent; color: inherit; }
.ep-hd .ep-bt--sable:hover, .ep-menu .ep-bt--sable:hover { background: var(--sable-clair); color: var(--gomme); }
.ep-pied { background: var(--gomme); color: var(--os); }
.ep-pied a:hover { color: var(--os); }

@keyframes apparait { from { opacity: 0; transform: translateY(-6px); } }
@media (prefers-reduced-motion: reduce) {
	.ep-hd, .ep-hd *, .ep-menu, .ep-menu * { animation: none !important; transition-duration: .01ms !important; transition-delay: 0s !important; }
}

/* Inscription aux nouveautés dans le pied de page (formulaire de l'extension) */
.ep-pied__news { margin: 28px 0 0 !important; color: var(--os) !important; font-weight: 600; }
