/* =========================================================
   Alsharidah Child — Header
   Toutes les valeurs sont relevées dans Header.tsx / Logo.tsx.
   Hauteur : 64px mobile / 72px à partir de 768px.
   ========================================================= */
 
:root {
	--ash-header-height: 64px;
	--ash-header-top: 0px;
 
	--ash-navy: #0f2957;
	--ash-navy-dark: #071630;
	--ash-green: #4caf50;
	--ash-ink: #0a0d14;
 
	--ash-ease: cubic-bezier(0.22, 1, 0.36, 1);
 
	--ash-header-container: 1280px;
	--ash-header-z: 999;
}
 
@media (min-width: 768px) {
	:root {
		--ash-header-height: 72px;
	}
}
 
/* Décalage sous l'admin bar de WordPress (visible uniquement connecté). */
.admin-bar {
	--ash-header-top: 32px;
}
 
@media screen and (max-width: 782px) {
	.admin-bar {
		--ash-header-top: 46px;
	}
}
 
/* Aucun décalage global : comme dans l'original, le fond du hero passe
   sous le header fixe et c'est le contenu interne qui porte le retrait
   (PageHeader : 112px / 144px). Les gabarits sans hero doivent prévoir
   leur propre retrait. */
 
/* ---------- Barre ---------- */
 
/* État haut de page : blanc 98 %, filet navy 6 %, pas d'ombre. */
.ash-header {
	position: fixed;
	top: var(--ash-header-top);
	inset-inline: 0;
	height: var(--ash-header-height);
	z-index: var(--ash-header-z);
	background: rgba(255, 255, 255, 0.98);
	border-bottom: 1px solid rgba(15, 41, 87, 0.06);
	transition: background-color 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
}
 
/* État après défilement (> 10px) : blanc plein, filet navy 8 %.
   Header.tsx déclare une ombre, mais theme.css l'annule pour tout le
   site (`*, *::before, *::after { box-shadow: none !important }`).
   Le header d'origine n'a donc pas d'ombre : on ne la reproduit pas. */
.ash-header.is-scrolled {
	background: #fff;
	border-bottom-color: rgba(15, 41, 87, 0.08);
}
 
.ash-header__inner {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 16px;
	height: 100%;
	max-width: var(--ash-header-container);
	margin-inline: auto;
	padding-inline: 20px;
}
 
@media (min-width: 640px) {
	.ash-header__inner {
		padding-inline: 24px;
	}
}
 
@media (min-width: 1024px) {
	.ash-header__inner {
		padding-inline: 40px;
	}
}
 
/* ---------- Logo ---------- */
 
.ash-header__brand {
	display: flex;
	align-items: center;
	flex-shrink: 0;
}
 
.ash-header__brand .custom-logo-link,
.ash-header__brand .ash-header__title {
	display: flex;
	align-items: center;
	text-decoration: none;
}
 
/* Logo.tsx, size="normal" : h-10 / sm:h-11 / md:h-12,
   w-auto, object-contain, max-width: clamp(160px, 50vw, 300px). */
.ash-header__brand .custom-logo {
	display: block;
	height: 40px;
	width: auto;
	max-width: clamp(160px, 50vw, 300px);
	object-fit: contain;
	user-select: none;
	transition: all 0.3s ease;
}
 
@media (min-width: 640px) {
	.ash-header__brand .custom-logo {
		height: 44px;
	}
}
 
@media (min-width: 768px) {
	.ash-header__brand .custom-logo {
		height: 48px;
	}
}
 
.ash-header__title {
	font-size: 18px;
	font-weight: 700;
	color: var(--ash-navy);
}
 
/* ---------- Menu ---------- */
 
.ash-nav {
	display: none;
}
 
@media (min-width: 1024px) {
	.ash-nav {
		display: block;
	}
}
 
.ash-menu {
	display: flex;
	align-items: center;
	gap: 2px;
	list-style: none;
	margin: 0;
	padding: 0;
}
 
.ash-menu li {
	margin: 0;
}
 
.ash-menu a {
	display: inline-flex;
	align-items: center;
	padding: 8px 16px;
	border-radius: 999px;
	font-size: 15px;
	font-weight: 700;
	line-height: 1.2;
	color: var(--ash-navy);
	text-decoration: none;
	transition: color 0.3s ease, background-color 0.3s ease;
}
 
@media (min-width: 768px) {
	.ash-menu a {
		font-size: 16px;
	}
}
 
.ash-menu a:hover,
.ash-menu a:focus-visible {
	color: var(--ash-green);
	background-color: rgba(76, 175, 80, 0.08);
}
 
/* `current_page_parent` est posée par WordPress sur l'élément de la page des
   articles dès que la vue n'est pas une page : article, mais aussi 404 et
   recherche (mesuré). L'original n'active la pastille que sur /blog, d'où le
   cadrage par `.single-post`. */
.ash-menu .current-menu-item > a,
.ash-menu .current_page_item > a,
.ash-menu .current-menu-ancestor > a,
.ash-menu .current-menu-parent > a,
.single-post .ash-menu .current_page_parent > a {
	color: var(--ash-green);
	background-color: rgba(76, 175, 80, 0.1);
}
 
/* ---------- Actions ---------- */
 
.ash-header__actions {
	display: flex;
	align-items: center;
	gap: 8px;
}
 
/* ---------- Bouton de langue ---------- */
 
.ash-lang {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 6px;
	height: 36px;
	padding: 6px 14px;
	border: 1px solid rgba(15, 41, 87, 0.15);
	border-radius: 999px;
	background: transparent;
	/* Classe font-english de l'original (--font-english dans fonts.css). */
	font-family: "IBM Plex Sans", system-ui, sans-serif;
	font-size: 14px;
	font-weight: 700;
	line-height: 1;
	color: var(--ash-navy);
	text-decoration: none;
	cursor: pointer;
	transition: background-color 0.3s ease;
}
 
.ash-lang:hover,
.ash-lang:focus-visible {
	background-color: rgba(15, 41, 87, 0.05);
	color: var(--ash-navy);
}
 
.ash-lang__icon {
	flex-shrink: 0;
	color: var(--ash-green);
}
 
/* ---------- Bouton d'appel à l'action ---------- */
 
.ash-cta {
	display: none;
	align-items: center;
	justify-content: space-between;
	height: 36px;
	min-width: 150px;
	padding: 4px;
	padding-inline-start: 16px;
	border: 1px solid rgba(15, 41, 87, 0.15);
	border-radius: 999px;
	background: var(--ash-navy);
	color: #fff;
	text-decoration: none;
	transition: background-color 0.3s ease;
}
 
.ash-cta:hover,
.ash-cta:focus-visible {
	background: var(--ash-navy-dark);
	color: #fff;
}
 
@media (min-width: 768px) {
	.ash-cta--header {
		display: inline-flex;
	}
}
 
.ash-cta__inner {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	width: 100%;
}
 
/* Deux copies du libellé superposées : la première glisse vers le haut
   au survol, la seconde la remplace. */
.ash-cta__text {
	position: relative;
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	flex: 1;
	height: 20px;
	overflow: hidden;
	user-select: none;
}
 
.ash-cta__text span {
	display: inline-block;
	font-size: 13px;
	font-weight: 700;
	line-height: 20px;
	white-space: nowrap;
	text-align: start;
	transition: transform 0.5s var(--ash-ease);
}
 
.ash-cta__text span + span {
	position: absolute;
	top: 100%;
}
 
.ash-cta:hover .ash-cta__text span,
.ash-cta:focus-visible .ash-cta__text span {
	transform: translateY(-100%);
}
 
.ash-cta__icon {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 24px;
	height: 24px;
	flex-shrink: 0;
	border-radius: 50%;
	background: var(--ash-green);
	color: #fff;
	transition: transform 0.5s ease;
}
 
.ash-cta:hover .ash-cta__icon,
.ash-cta:focus-visible .ash-cta__icon {
	transform: scale(1.05);
}
 
.ash-cta__icon svg {
	transition: transform 0.5s ease;
}
 
.ash-cta:hover .ash-cta__icon svg,
.ash-cta:focus-visible .ash-cta__icon svg {
	transform: rotate(45deg);
}
 
/* Variante pleine largeur du panneau mobile. */
.ash-cta--block {
	display: inline-flex;
	width: 100%;
	height: 46px;
	padding: 6px;
	padding-inline-start: 20px;
	border-color: rgba(15, 41, 87, 0.12);
}
 
.ash-cta--block .ash-cta__text {
	height: 18px;
}
 
.ash-cta--block .ash-cta__text span {
	font-size: 12px;
	line-height: 18px;
}
 
.ash-cta--block .ash-cta__icon {
	width: 32px;
	height: 32px;
}
 
/* ---------- Bouton hamburger ---------- */
 
.ash-burger {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	padding: 8px;
	border: 1px solid rgba(15, 41, 87, 0.12);
	border-radius: 999px;
	background: transparent;
	color: var(--ash-navy);
	cursor: pointer;
	transition: background-color 0.3s ease;
}
 
.ash-burger:hover,
.ash-burger:focus-visible {
	background-color: rgba(15, 41, 87, 0.06);
}
 
.ash-burger__close {
	display: none;
}
 
.ash-burger[aria-expanded="true"] .ash-burger__open {
	display: none;
}
 
.ash-burger[aria-expanded="true"] .ash-burger__close {
	display: block;
}
 
@media (min-width: 1024px) {
	.ash-burger {
		display: none;
	}
}
 
/* ---------- Panneau mobile ---------- */
 
.ash-mobile {
	position: fixed;
	top: calc(var(--ash-header-top) + var(--ash-header-height));
	inset-inline: 0;
	max-height: calc(100vh - var(--ash-header-top) - var(--ash-header-height));
	overflow-y: auto;
	z-index: calc(var(--ash-header-z) - 1);
	padding: 16px 20px 24px;
	background: rgba(255, 255, 255, 0.98);
	-webkit-backdrop-filter: blur(24px);
	backdrop-filter: blur(24px);
	border-top: 1px solid rgba(15, 41, 87, 0.08);
}
 
.ash-mobile[hidden] {
	display: none;
}
 
.ash-mobile .ash-menu {
	flex-direction: column;
	align-items: stretch;
	gap: 4px;
}
 
.ash-mobile .ash-menu a {
	padding: 12px 16px;
	border-radius: 12px;
	font-size: 16px;
}
 
.ash-mobile .ash-menu a:hover,
.ash-mobile .ash-menu a:focus-visible {
	color: var(--ash-navy);
	background-color: rgba(15, 41, 87, 0.05);
}
 
.ash-mobile .ash-menu .current-menu-item > a,
.ash-mobile .ash-menu .current_page_item > a,
.single-post .ash-mobile .ash-menu .current_page_parent > a {
	color: var(--ash-green);
	background-color: rgba(76, 175, 80, 0.1);
}
 
/* Rangée langue + appel, puis bouton pleine largeur. */
.ash-mobile__row {
	display: flex;
	align-items: center;
	gap: 8px;
	margin-top: 8px;
	padding-top: 12px;
	border-top: 1px solid rgba(15, 41, 87, 0.08);
}
 
.ash-mobile__row .ash-lang {
	flex: 1;
	height: auto;
	padding: 10px 12px;
	border-color: rgba(15, 41, 87, 0.12);
	font-size: 12px;
}
 
.ash-call {
	display: inline-flex;
	flex: 1;
	align-items: center;
	justify-content: center;
	gap: 6px;
	padding: 10px 12px;
	border: 1px solid rgba(76, 175, 80, 0.2);
	border-radius: 999px;
	background: rgba(76, 175, 80, 0.1);
	color: var(--ash-green);
	font-size: 12px;
	font-weight: 700;
	line-height: 1;
	text-decoration: none;
}
 
.ash-mobile__actions {
	margin-top: 8px;
}
 
body.ash-menu-open {
	overflow: hidden;
}
 
@media (min-width: 1024px) {
	.ash-mobile {
		display: none;
	}
}
 
/* ---------- Accessibilité ---------- */
 
.ash-header a:focus-visible,
.ash-header button:focus-visible,
.ash-mobile a:focus-visible,
.ash-mobile button:focus-visible {
	outline: 2px solid var(--ash-green);
	outline-offset: 2px;
	border-radius: 4px;
}
 
@media (prefers-reduced-motion: reduce) {
	.ash-header *,
	.ash-mobile * {
		transition: none !important;
	}
}
 
/* ---------- Version anglaise ---------- */
 
/* Header.tsx et CTAButton.tsx : group-hover:rotate-45 en arabe,
   group-hover:-rotate-45 en anglais — la flèche, tournée vers la
   droite, monte vers le haut à droite. */
html[dir="ltr"] .ash-cta:hover .ash-cta__icon svg,
html[dir="ltr"] .ash-cta:focus-visible .ash-cta__icon svg {
	transform: rotate(-45deg);
}
 