/* ==========================================================================
   EDGAR — styles complémentaires à theme.json
   Détails visuels propres au design (badges, cartes, superpositions) que
   les réglages de blocs natifs ne permettent pas d'exprimer directement.
   Couleurs / polices / espacements restent pilotés par theme.json.
   ========================================================================== */

/* ---- Boutons : chevron ---- */
.edgar-btn-arrow .wp-block-button__link {
	display: inline-flex;
	align-items: center;
	gap: 0.5rem;
}
.edgar-btn-arrow .wp-block-button__link::after {
	content: "";
	display: inline-block;
	width: 12px;
	height: 12px;
	background-color: currentColor;
	-webkit-mask: url('../icons/chevron-right.svg') no-repeat center / contain;
	mask: url('../icons/chevron-right.svg') no-repeat center / contain;
	flex: none;
	transition: transform 0.2s ease;
}
.edgar-btn-arrow .wp-block-button__link {
	transition: opacity 0.2s ease;
}
.edgar-btn-arrow .wp-block-button__link:hover {
	opacity: 0.82;
}
.edgar-btn-arrow .wp-block-button__link:hover::after {
	transform: translateX(3px);
}

/* ---- En-tête ---- */
.wp-block-site-logo img {
	display: block;
}

/* L'en-tête reste visible au défilement.
   Le sticky doit porter sur le <header> lui-même : posé sur le bloc intérieur,
   il ne pouvait pas dépasser la hauteur de son parent. */
header.wp-block-template-part {
	position: sticky;
	top: 0;
	z-index: 100;
}
.admin-bar header.wp-block-template-part { top: 32px; }
@media (max-width: 782px) {
	.admin-bar header.wp-block-template-part { top: 46px; }
}

/* Logo complet (cube + "FADOR Analyse & Solutions") */
.edgar-logo { display: block; line-height: 0; }
.edgar-logo img {
	display: block;
	width: clamp(150px, 14vw, 215px);
	height: auto;
}

/* ---- Bouton « retour en haut » ---- */
.edgar-to-top {
	position: fixed;
	right: clamp(16px, 3vw, 32px);
	bottom: clamp(16px, 3vw, 32px);
	z-index: 90;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 48px;
	height: 48px;
	border-radius: 999px;
	background: var(--wp--preset--color--gold);
	color: var(--wp--preset--color--black);
	box-shadow: 0 6px 20px rgba(5, 4, 3, 0.35);
	/* masqué tant que le pied de page n'est pas atteint */
	opacity: 0;
	visibility: hidden;
	transform: translateY(12px);
	transition: opacity 0.25s ease, transform 0.25s ease, visibility 0.25s;
}
.edgar-to-top svg { width: 22px; height: 22px; display: block; }
.edgar-to-top.is-visible {
	opacity: 1;
	visibility: visible;
	transform: translateY(0);
}
.edgar-to-top:hover { background: var(--wp--preset--color--gold-light, #e8caa0); }
@media (prefers-reduced-motion: reduce) {
	.edgar-to-top { transition: none; }
}

/* ---- Héro : panneau sombre + photo repérée ---- */
.edgar-hero {
	align-items: center;
	background: var(--wp--preset--color--black);
}

.edgar-hero-panel {
	position: relative;
	/* le panneau absorbe la largeur restante : sur très grand écran le texte
	   n'est plus collé au bord gauche, il reste centré dans la colonne */
	flex: 1 1 38%;
	min-height: 620px;
	background: var(--wp--preset--color--black);
	overflow: hidden;
	display: flex;
	align-items: center;
	justify-content: center;
}
.edgar-hero-panel > * { position: relative; z-index: 2; }
/* Le bloc de texte reste lisible et centré dans le panneau, même très large */
.edgar-hero-panel > .wp-block-group {
	width: 100%;
	max-width: 520px;
	margin-inline: auto;
}
.edgar-hero-panel__bg {
	position: absolute;
	inset: -20%;
	z-index: 1;
	background-image: radial-gradient(rgba(244, 234, 212, 0.16) 1.4px, transparent 1.6px);
	background-size: 16px 16px;
	-webkit-mask-image: radial-gradient(ellipse 70% 65% at 30% 70%, #000 0%, transparent 72%);
	mask-image: radial-gradient(ellipse 70% 65% at 30% 70%, #000 0%, transparent 72%);
	pointer-events: none;
}
.edgar-hero-panel h1 {
	text-wrap: balance;
	hyphens: none;
	overflow-wrap: anywhere;
}
.edgar-hero-panel p {
	font-size: clamp(1.05rem, 0.9rem + 0.5vw, 1.4rem);
	line-height: 1.6;
}
/* Très grand écran : on laisse respirer la colonne de texte */
@media (min-width: 1600px) {
	.edgar-hero-panel h1 { font-size: clamp(3.4rem, 2.4vw, 4.4rem); }
	.edgar-hero-panel > .wp-block-group { max-width: 620px; }
}
/* Globe repris de la maquette : bas-gauche du panneau, derrière le texte */
.edgar-hero-globe {
	position: absolute;
	margin: 0 !important;
	z-index: 1;
	left: 4%;
	bottom: 3%;
	width: 56%;
	min-width: 240px;
	max-width: 430px;
	height: auto;
	opacity: 0.9;
	pointer-events: none;
	display: block;
}

.edgar-hero-photo {
	position: relative;
	/* la photo garde le ratio exact de l'image (donc aucun recadrage,
	   et les repères restent alignés) et reste collée au bord droit */
	flex: 0 1 62%;
	max-width: 1400px;
	align-self: center;
	aspect-ratio: 3 / 2;
	overflow: hidden;
	border-radius: 24px 0 0 24px;
}
.edgar-hero-photo__img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; }

.edgar-marker__icon {
	position: absolute;
	/* WordPress applique un margin-block-start (block-gap) aux enfants du groupe :
	   il décalerait les repères vers le bas, d'où le reset. */
	margin: 0 !important;
	transform: translate(-50%, -50%);
	width: 26px;
	height: 26px;
	display: flex;
	align-items: center;
	justify-content: center;
	color: #f4ead4;
}
.edgar-marker__icon svg { width: 26px; height: 26px; }


/* ---- Étiquette "eyebrow" avec petit trait ---- */
.edgar-eyebrow {
	position: relative;
	padding-bottom: 0.9rem;
}
.edgar-eyebrow::after {
	content: "";
	position: absolute;
	left: 0;
	bottom: 0;
	width: 44px;
	height: 3px;
	background: var(--wp--preset--color--gold);
	border-radius: 2px;
}
.has-text-align-center.edgar-eyebrow::after {
	left: 50%;
	transform: translateX(-50%);
}

/* ---- Photo "Notre Histoire" : occupe toute la hauteur de la colonne ---- */
.edgar-histoire-img { display: flex; flex-direction: column; }
.edgar-histoire-img > .wp-block-image {
	flex: 1 1 auto;
	min-height: 0;
	margin: 0;
}
.edgar-histoire-img > .wp-block-image img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}

/* ---- Citation "Notre Histoire" ---- */
.edgar-quote {
	font-size: var(--wp--preset--font-size--medium);
	color: var(--wp--preset--color--white);
	border-left: 3px solid var(--wp--preset--color--gold);
	padding-left: 1rem;
	margin: 1.5rem 0;
}

/* ---- Ligne "Trouver rapidement les bonnes informations" ---- */
.edgar-defi-arrow img { width: 30px; height: 30px; display: block; }
.edgar-defi-icons { display: inline-flex; gap: 0.65rem; margin-left: 0.25rem; }
.edgar-defi-icons img { width: 28px; height: 28px; display: block; }

/* ---- 3 expertises (Notre Histoire) ---- */
.edgar-expertise { align-items: center; text-align: center; width: 140px; }
/* Dans la maquette l'icône est posée seule, sans pastille.
   On cale sur la HAUTEUR : les trois pictogrammes n'ont pas le même
   rapport largeur/hauteur (celui des technologies est deux fois plus large). */
.edgar-expertise__icon {
	display: flex;
	align-items: center;
	justify-content: center;
	height: 52px;
	margin: 0 auto 0.6rem;
}
.edgar-expertise__icon img { height: 100%; width: auto; display: block; }

/* ---- Cartes "Notre solution EDGAR®" ---- */
.edgar-solution-card {
	position: relative;
	height: 100%;
	padding: 10px 10px var(--wp--preset--spacing--40);
	border: 1px solid var(--wp--preset--color--gold);
	border-radius: 14px;
	transition: transform 0.25s ease;
}
.edgar-solution-card:hover { transform: translateY(-4px); }
/* Trait doré centré sous le titre de chaque carte */
.edgar-solution-card__rule {
	display: block;
	width: 64px;
	height: 2px;
	margin: 0 auto var(--wp--preset--spacing--20);
	background: var(--wp--preset--color--gold);
	border-radius: 2px;
}
.edgar-solution-card h3,
.edgar-solution-card p { padding-inline: 0.75rem; }
.edgar-solution-card__img img { width: 100%; height: 190px; object-fit: cover; display: block; transition: transform 0.4s ease; }
.edgar-solution-card:hover .edgar-solution-card__img img { transform: scale(1.04); }
/* L'icône vient de la maquette : le cercle doré est déjà dans le SVG,
   le thème ne dessine donc plus de pastille. */
.edgar-solution-card__icon {
	position: relative;
	z-index: 2;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 64px;
	height: 64px;
	margin: -32px auto 0;
}
.edgar-solution-card__icon img {
	display: block;
	width: 100%;
	height: 100%;
}

/* ---- Lignes "Notre Approche" ---- */
.edgar-approche-row {
	--edgar-approche-gap: 1.5rem;
	--edgar-approche-img: 220px;
	gap: var(--edgar-approche-gap);
	align-items: center;
}
.edgar-approche-row__text { flex-grow: 1; text-align: center; }
.edgar-approche-row__img { flex: none; margin: 0 !important; }
.edgar-approche-row__img img { display: block; }

/* Séparateur : centré sur la colonne de texte (pas sur l'image) */
.edgar-approche-sep {
	display: flex;
	justify-content: center;
	padding-right: calc(220px + 1.5rem);
}
.edgar-approche-sep .edgar-gold-rule {
	width: 120px;
	margin: 0;
}

/* ---- Petit trait doré (sous un titre, ou centré entre des lignes) ---- */
.edgar-gold-rule {
	width: 44px;
	height: 3px;
	background: var(--wp--preset--color--gold);
	border-radius: 2px;
	margin-top: var(--wp--preset--spacing--20);
}
.edgar-gold-rule--center { margin: 0 auto; }

/* ---- Cartes "Domaines d'intervention" ---- */
.edgar-domaine-card { position: relative; overflow: hidden; border-radius: 12px; }
.edgar-domaine-card__img { margin: 0; line-height: 0; }
.edgar-domaine-card__img img { width: 100%; aspect-ratio: 3 / 4.4; object-fit: cover; display: block; transition: transform 0.4s ease; }
.edgar-domaine-card:hover .edgar-domaine-card__img img { transform: scale(1.06); }
.edgar-domaine-card__icon {
	position: absolute;
	left: 50%;
	bottom: 78px;
	transform: translateX(-50%);
	width: 58px;
	height: 58px;
	display: flex;
	align-items: center;
	justify-content: center;
	background: var(--wp--preset--color--gold);
	border-radius: 999px;
	overflow: hidden;
	z-index: 2;
}
/* le pictogramme blanc vient de la maquette et occupe toute la pastille */
.edgar-domaine-card__icon img { width: 100%; height: 100%; display: block; }
.edgar-domaine-card__label {
	position: absolute;
	left: 0.6rem;
	right: 0.6rem;
	bottom: 0.6rem;
	z-index: 2;
	background: rgba(5, 4, 3, 0.75);
	color: var(--wp--preset--color--white);
	font-family: var(--wp--preset--font-family--heading);
	font-weight: 700;
	font-size: 0.78rem;
	text-transform: uppercase;
	letter-spacing: 0.02em;
	text-align: center;
	padding: 0.6rem 0.5rem;
	border-radius: 6px;
}

/* ---- Pied de page ---- */
/* Les 5 éléments tiennent sur une seule ligne, comme dans la maquette */
.edgar-footer-stats {
	row-gap: 1.75rem;
	/* la gouttière se resserre avec la colonne pour garder les 5 items en ligne */
	column-gap: clamp(0.35rem, 1.6%, 1rem);
	align-items: flex-start;
}
/* Pictogramme au-dessus, libellé centré dessous */
.edgar-stat {
	width: clamp(70px, 18.6%, 126px);
	text-align: center;
}
.edgar-stat p { margin: 0; }
.edgar-stat-number {
	font-size: 2.2rem;
	line-height: 1;
	margin-bottom: 0.5rem !important;
}
.edgar-stat-icon {
	display: flex;
	align-items: center;
	justify-content: center;
	height: 46px;
	margin: 0 auto 0.5rem;
}
/* on cale sur la hauteur : les pictogrammes n'ont pas tous le même ratio */
.edgar-stat-icon img { height: 100%; width: auto; display: block; }
.edgar-ovh-badge { width: clamp(54px, 14%, 96px); }
.edgar-ovh-badge img { display: block; width: 100%; height: auto; }

/* "Notre engagement" : pictogramme à gauche du texte */
.edgar-engagement-item { align-items: flex-start !important; }
.edgar-engagement-item .edgar-stat-icon {
	height: 38px;
	flex: none;
	margin: 0.1rem 0 0;
}

/* ---- Responsive ---- */
@media (max-width: 900px) {
	.edgar-histoire-img,
	.edgar-histoire-img + .wp-block-column {
		flex-basis: 100% !important;
	}
	.wp-block-columns { flex-wrap: wrap; }
	.edgar-hero { flex-wrap: wrap; }
	.edgar-hero-panel { flex-basis: 100%; min-height: 0; }
	.edgar-hero-photo { flex-basis: 100%; border-radius: 0; }
	/* Bloc de texte centré dans la colonne quand le héro est empilé */
	.edgar-hero-panel .wp-block-group { margin-inline: auto; }
}

@media (max-width: 600px) {
	.edgar-approche-row { flex-wrap: wrap; }
	.edgar-approche-row__img { width: 100% !important; }
	.edgar-approche-row__img img { width: 100% !important; height: auto !important; }
	/* la photo passe pleine largeur : le séparateur se recentre sur la colonne */
	.edgar-approche-sep { padding-right: 0; }
}

/* ---- Responsive : en-tête ---- */
/* La barre complète (logo + menu + bouton) demande ~970 px.
   En dessous, on bascule sur le menu burger natif de WordPress plutôt que
   de laisser l'en-tête se replier sur deux ou trois lignes — il est collant,
   sa hauteur doit rester minimale. */
@media (min-width: 600px) and (max-width: 1024px) {
	.wp-block-navigation__responsive-container:not(.is-menu-open) {
		display: none !important;
		position: fixed !important;
		width: auto !important;
		z-index: 100000 !important;
		background-color: inherit !important;
	}
	.wp-block-navigation__responsive-container-open:not(.always-shown) {
		display: flex !important;
	}
	.wp-block-navigation__responsive-container.is-menu-open {
		display: flex !important;
	}
	.wp-block-navigation__responsive-container.is-menu-open
		.wp-block-navigation__responsive-container-close {
		display: block !important;
	}
}

/* En mode burger : logo à gauche, bouton et burger groupés à droite. */
@media (max-width: 1024px) {
	.edgar-header-row > .wp-block-navigation { order: 3; }
	.edgar-header-row > .wp-block-buttons { order: 2; margin-left: auto; }
}

@media (max-width: 520px) {
	.edgar-header-row { gap: 12px !important; }
	.edgar-logo img { width: 140px; }
	.edgar-header-row .wp-block-button__link {
		font-size: 0.64rem;
		padding: 0.55rem 0.8rem;
	}
}

/* Sous 400 px, l'en-tête doit encore tenir sur une seule ligne. */
@media (max-width: 400px) {
	.edgar-header-row { gap: 8px !important; }
	header.wp-block-template-part > .wp-block-group {
		padding-left: 12px !important;
		padding-right: 12px !important;
	}
	.edgar-logo img { width: 120px; }
	.edgar-header-row .wp-block-button__link {
		font-size: 0.58rem;
		padding: 0.5rem 0.7rem;
		letter-spacing: 0.01em;
	}
	.edgar-btn-arrow .wp-block-button__link { gap: 0.35rem; }
	.edgar-btn-arrow .wp-block-button__link::after { width: 10px; height: 10px; }
}

/* Très petits écrans (320 px) : on resserre encore pour rester sur une ligne. */
@media (max-width: 340px) {
	.edgar-logo img { width: 104px; }
	.edgar-header-row .wp-block-button__link {
		font-size: 0.55rem;
		padding: 0.45rem 0.6rem;
	}
}

/* ---- Responsive : grilles de cartes ---- */
/* WordPress empile les colonnes une par une sous 782 px : sur tablette et
   grand téléphone, deux cartes par ligne restent bien plus lisibles. */
@media (min-width: 480px) and (max-width: 781px) {
	.wp-block-columns.edgar-card-grid {
		flex-wrap: wrap !important;
	}
	/* sélecteur aligné sur celui du cœur de WordPress, qui empile en 100 % */
	.wp-block-columns.edgar-card-grid:not(.is-not-stacked-on-mobile) > .wp-block-column {
		flex-basis: calc(50% - 0.5 * var(--wp--preset--spacing--30, 24px)) !important;
		flex-grow: 0;
	}
}

/* ---- Responsive : « Notre histoire » ---- */
/* Une fois la colonne empilée, la photo n'a plus de hauteur à occuper. */
@media (max-width: 900px) {
	.edgar-histoire-img > .wp-block-image { min-height: 300px; }
}

/* ---- Responsive : pied de page ---- */
/* Sous 600 px, cinq colonnes deviennent illisibles : on les laisse
   se répartir sur plusieurs lignes, centrées. */
@media (max-width: 599px) {
	.edgar-footer-stats {
		column-gap: 1rem;
		justify-content: center;
	}
	.edgar-stat { width: 126px; }
	.edgar-ovh-badge { width: 96px; }
}

/* Menu superposé (burger) : liens centrés plutôt que collés à droite. */
.wp-block-navigation__responsive-container.is-menu-open
	.wp-block-navigation__responsive-container-content {
	align-items: center;
	justify-content: center;
}
.wp-block-navigation__responsive-container.is-menu-open
	.wp-block-navigation__container {
	align-items: center !important;
	gap: 1.4rem;
}
.wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation-item {
	text-align: center;
}
