/*
 * ENP 2027 — signature visuelle (v0.4).
 *
 * Objectif : un site qui ressemble à l'ENP et à aucun autre gabarit.
 * 1. Le croissant du symbole comme motif graphique (filets, repères de surtitre, grands arcs en fond).
 * 2. Le « papier millimétré » des cahiers de soins et de laboratoire en trame de fond.
 * 3. Le tampon « Accrédité » prévu par la charte, posé sur les photos.
 * 4. Le bilinguisme français / arabe visible dans les surtitres.
 * 5. Une mise en forme plus éditoriale : coins nets, filets fins, grands chiffres, pas d'ombres floues ni d'effets de lévitation.
 *
 * Charte : aucun autre symbole médical, jamais de croissant rouge, texte bleu nuit sur les accents vifs.
 */

:root {
	--enp-rayon-carte: 8px;
	--enp-croissant: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100'%3E%3Cpath d='M58.47 2.75A48 48 0 1 0 96.18 63.09A38 38 0 1 1 58.47 2.75Z'/%3E%3C/svg%3E");
	--enp-croissant-trait: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='-1 -1 102 102'%3E%3Cpath d='M58.47 2.75A48 48 0 1 0 96.18 63.09A38 38 0 1 1 58.47 2.75Z' fill='none' stroke='%23000' stroke-width='0.6'/%3E%3C/svg%3E");
	--enp-millimetre:
		linear-gradient(rgb(0 104 177 / 0.07) 1px, transparent 1px) 0 0 / 24px 24px,
		linear-gradient(90deg, rgb(0 104 177 / 0.07) 1px, transparent 1px) 0 0 / 24px 24px;
}

/* ---------- 1. Trames et fonds ---------- */

/* Ouvertures : papier millimétré sur bleu ciel, sans dégradé. */
.enp-fil-hero,
[dir="rtl"] .enp-fil-hero,
.enp-entete-page {
	position: relative;
	isolation: isolate;
	background: var(--enp-millimetre), var(--enp-ciel);
}
.enp-fil-hero::after,
.enp-entete-page::after {
	/* Grand croissant au trait, coupé par le bord : rappel du symbole. */
	content: "";
	position: absolute;
	z-index: -1;
	inset-block-start: -18%;
	inset-inline-end: -6%;
	width: min(52vw, 720px);
	aspect-ratio: 1;
	background: var(--enp-accent);
	opacity: 0.35;
	-webkit-mask: var(--enp-croissant-trait) center / contain no-repeat;
	mask: var(--enp-croissant-trait) center / contain no-repeat;
	pointer-events: none;
}
[dir="rtl"] .enp-fil-hero::after,
[dir="rtl"] .enp-entete-page::after { transform: scaleX(-1); }

/* Sections bleu ciel : la trame reste discrète. */
.enp-section--ciel { background: var(--enp-millimetre), var(--enp-ciel); }

/* Bandeaux bleu nuit : un croissant plein, très sombre, en filigrane. */
.is-style-bandeau-nuit,
.is-style-bandeau { position: relative; isolation: isolate; overflow: hidden; }
.is-style-bandeau-nuit::before,
.is-style-bandeau::before {
	content: "";
	position: absolute;
	z-index: -1;
	inset-block-start: 50%;
	inset-inline-start: -4rem;
	width: 22rem;
	aspect-ratio: 1;
	transform: translateY(-50%);
	background: #fff;
	opacity: 0.06;
	-webkit-mask: var(--enp-croissant) center / contain no-repeat;
	mask: var(--enp-croissant) center / contain no-repeat;
}

/* ---------- 2. Surtitres : croissant + libellé dans l'autre langue ---------- */

.is-style-surtitre { display: flex; flex-wrap: wrap; align-items: center; gap: 0.25rem 0.625rem; }
.is-style-surtitre::before,
.enp-section .is-style-surtitre::before {
	content: "";
	display: inline-block;
	flex-shrink: 0;
	width: 0.875rem;
	height: 0.875rem;
	margin: 0;
	background: var(--enp-accent);
	-webkit-mask: var(--enp-croissant) center / contain no-repeat;
	mask: var(--enp-croissant) center / contain no-repeat;
	vertical-align: middle;
}
[dir="rtl"] .is-style-surtitre::before { transform: scaleX(-1); }
.enp-bi {
	padding-inline-start: 0.625rem;
	border-inline-start: 1px solid currentColor;
	color: var(--enp-gris);
	font-weight: 400;
	letter-spacing: 0;
	text-transform: none;
	opacity: 0.85;
}
.enp-bi:lang(ar) { font-family: var(--wp--preset--font-family--arabe); font-size: 1.0625em; }
.enp-bi:lang(fr) { font-family: var(--wp--preset--font-family--titre); font-size: 0.8125em; letter-spacing: 0.06em; text-transform: uppercase; }
.is-style-bandeau-nuit .enp-bi, .is-style-bandeau .enp-bi { color: rgb(255 255 255 / 0.75); }

/* ---------- 3. Tampon « Accrédité » ---------- */

.enp-sceau { display: block; width: 7.5rem; height: auto; border-radius: 50%; }

.enp-sceau--photo {
	position: absolute;
	z-index: 2;
	inset-block-end: -1.75rem;
	inset-inline-end: -1.75rem;
	transform: rotate(-9deg);
	box-shadow: 0 0 0 4px #fff;
}
[dir="rtl"] .enp-sceau--photo { transform: rotate(9deg); }

/* ---------- 4. Photos : cadre net et décalé au trait, au lieu d'un aplat flou ---------- */

.enp-fil-hero__photo::before,
[dir="rtl"] .enp-fil-hero__photo::before {
	inset: 0.875rem -0.875rem -0.875rem 0.875rem;
	background: none;
	border: 2px solid var(--enp-accent);
	border-radius: var(--enp-rayon-carte);
	opacity: 1;
}
[dir="rtl"] .enp-fil-hero__photo::before { inset: 0.875rem 0.875rem -0.875rem -0.875rem; }
.enp-fil-hero__photo img { border-radius: var(--enp-rayon-carte); box-shadow: none; }

/* ---------- 5. Mise en forme éditoriale ---------- */

/* Pas d'ombres floues ni de lévitation : filets fins et accent au survol. */
.enp-faits,
.is-style-cartes li,
.wp-block-columns.is-style-icones > .wp-block-column,
.is-style-tarifs > .wp-block-column.enp-tarif--avantage { box-shadow: none; }
.is-style-cartes li:hover,
.is-style-carte:has(a):hover,
.enp-carte-article:hover { transform: none; box-shadow: none; border-color: var(--enp-accent); }
.enp-bouton--principal, .enp-bouton--principal:hover { box-shadow: none; }
.wp-block-button:not(.is-style-whatsapp) .wp-block-button__link:hover { box-shadow: none; }

/* Repères clés : une règle typographique plutôt qu'une boîte. */
.enp-faits { background: transparent; border: 0; border-block: 1px solid var(--enp-nuit); border-radius: 0; }
.enp-faits__item { padding-inline: 0 1rem; }
.enp-faits__item + .enp-faits__item { border-inline-start: 1px solid rgb(11 37 69 / 0.18); padding-inline-start: 1rem; }

/* Cartes de compétences : filet d'accent en tête, puce croissant. */
.is-style-cartes li {
	padding-block-start: var(--wp--preset--spacing--6);
	padding-inline-start: 3.25rem;
	border-block-start: 3px solid var(--enp-accent);
}
.is-style-cartes li::before {
	inset-block-start: calc(var(--wp--preset--spacing--6) + 0.15rem);
	width: 1.25rem;
	height: 1.25rem;
	margin-block-start: 0;
	border-radius: 0;
	background: var(--enp-accent);
	-webkit-mask: var(--enp-croissant) center / contain no-repeat;
	mask: var(--enp-croissant) center / contain no-repeat;
}
[dir="rtl"] .is-style-cartes li::before { transform: scaleX(-1); }
.is-style-cartes li:last-child { border-block-start-color: var(--enp-accent); }
.is-style-cartes li:last-child::before { background: var(--enp-accent); }
.is-style-cartes li:last-child:nth-child(4n+1)::before { inset-block-start: 50%; margin-block-start: -0.625rem; }

/* Grands chiffres éditoriaux (frise du programme). */
.is-style-frise > .wp-block-column { padding-block-start: 5.5rem; }
.is-style-frise > .wp-block-column::before {
	content: counter(annee, decimal-leading-zero);
	inset-block-start: var(--wp--preset--spacing--4);
	display: block;
	width: auto;
	height: auto;
	background: none;
	box-shadow: none;
	border-radius: 0;
	color: transparent;
	-webkit-text-stroke: 1.5px var(--enp-accent);
	font: 600 4rem / 1 var(--wp--preset--font-family--titre);
	letter-spacing: -0.02em;
}
.is-style-frise > .wp-block-column:not(:last-child)::after {
	inset-block-start: calc(var(--wp--preset--spacing--4) + 2rem);
	inset-inline-start: calc(var(--wp--preset--spacing--6) + 6rem);
	height: 1px;
	background: var(--enp-accent);
	opacity: 0.6;
}

/* Étapes : chiffres au trait, filet vertical fin. */
.is-style-etapes li { padding-inline-start: 3.25rem; }
.is-style-etapes li::before {
	content: counter(etape, decimal-leading-zero);
	width: auto;
	height: auto;
	background: none;
	border-radius: 0;
	color: var(--enp-bleu);
	font: 600 1.5rem / 1 var(--wp--preset--font-family--titre);
}
.is-style-etapes li:not(:last-child)::after { inset-inline-start: 0.875rem; inset-block-start: 2rem; width: 1px; }

/* Débouchés : icône au trait sans tuile, filet d'accent en tête. */
.wp-block-columns.is-style-icones > .wp-block-column { border-block-start: 3px solid var(--enp-accent); }
.is-style-icones > .wp-block-column::before {
	width: 2.25rem;
	height: 2.25rem;
	border-radius: 0;
	background: var(--enp-icone) center / contain no-repeat;
}

/* Modalités de paiement : en-tête de tableau tarifaire plutôt que cartes flottantes. */
.is-style-tarifs > .wp-block-column { border-radius: var(--enp-rayon-carte); }
.is-style-tarifs > .wp-block-column.enp-tarif--avantage { border-color: var(--enp-nuit); background: var(--enp-nuit); }
.enp-tarif--avantage .enp-tarif__remise,
.enp-tarif--avantage .enp-tarif__nom { color: #fff; }
.enp-tarif--avantage .enp-tarif__detail { color: rgb(255 255 255 / 0.75); }
.is-style-tarifs .enp-tarif__etiquette { background: var(--enp-accent); color: var(--enp-nuit); border-radius: 4px; }

/* Encart et carte : coins nets. */
.is-style-encart, .is-style-carte, .enp-bourse { border-radius: var(--enp-rayon-carte); }
.is-style-encart { border-inline-start-width: 3px; }

/* Bourse : croissant en filigrane. */
.enp-bourse { position: relative; isolation: isolate; overflow: hidden; }
.enp-bourse::after {
	content: "";
	position: absolute;
	z-index: -1;
	inset-inline-end: -2rem;
	inset-block-start: -3rem;
	width: 12rem;
	aspect-ratio: 1;
	background: #fff;
	opacity: 0.07;
	-webkit-mask: var(--enp-croissant) center / contain no-repeat;
	mask: var(--enp-croissant) center / contain no-repeat;
}

/* Sommaire : soulignement fin en accent, comme un onglet de classeur. */
.enp-sommaire { background: rgb(255 255 255 / 0.97); }
.enp-sommaire a.est-actif { border-block-end-width: 2px; }

/* Titres de section : graisse un peu plus forte, approche serrée. */
.enp-section .wp-block-heading:is(h2) { letter-spacing: -0.015em; }
.langue-ar .enp-section .wp-block-heading:is(h2) { letter-spacing: 0; }

@media (max-width: 960px) {
	.enp-sceau--photo { width: 6rem; inset-block-end: -1.25rem; inset-inline-end: -0.5rem; }
	.enp-fil-hero::after, .enp-entete-page::after { width: 90vw; inset-block-start: -8%; inset-inline-end: -30%; opacity: 0.25; }
}
@media (max-width: 781px) {
	.is-style-cartes li, .is-style-cartes li:last-child:nth-child(4n+1) { padding: var(--wp--preset--spacing--4) var(--wp--preset--spacing--4) var(--wp--preset--spacing--4) 3.25rem; }
	[dir="rtl"] .is-style-cartes li, [dir="rtl"] .is-style-cartes li:last-child:nth-child(4n+1) { padding: var(--wp--preset--spacing--4) 3.25rem var(--wp--preset--spacing--4) var(--wp--preset--spacing--4); }
	.is-style-cartes li::before { inset-block-start: 50%; margin-block-start: -0.625rem; }
	.is-style-frise > .wp-block-column { padding-block-start: 5rem; }
	.is-style-frise > .wp-block-column::before { font-size: 3.25rem; }
}

/* ---------- Ouverture des pages standard ---------- */

.enp-entete-page { padding-block: var(--wp--preset--spacing--10) var(--wp--preset--spacing--16); overflow: hidden; border-block-start: 6px solid var(--enp-bleu); }
.enp-entete-page__inner { max-width: var(--enp-largeur); }
.enp-entete-page__titre {
	max-width: 18ch;
	color: var(--enp-nuit);
	font-size: var(--wp--preset--font-size--affiche);
	line-height: var(--wp--custom--line-height--titre);
	letter-spacing: -0.015em;
}
.langue-ar .enp-entete-page__titre { letter-spacing: 0; line-height: 1.35; }
.enp-entete-page__chapo { max-width: 40em; color: var(--enp-gris); font-size: 1.1875rem; line-height: 1.55; }
@media (max-width: 781px) {
	.enp-entete-page__titre { font-size: var(--wp--preset--font-size--titre-1); }
	.enp-entete-page__chapo { font-size: 1.0625rem; }
}

/* Pages composées de sections : pas de marge haute ni basse autour du contenu. */
.enp-contenu:has(> .enp-section:first-child) { padding-block-start: 0; }
.enp-contenu:has(> .alignfull:last-child) { padding-block-end: 0; }
.enp-contenu > .enp-section:first-child { margin-block-start: 0; }
.enp-contenu > .enp-section { margin-block: 0; }

/* ---------- Pied de page : croissant en filigrane ---------- */

.enp-pied { position: relative; isolation: isolate; overflow: hidden; }
.enp-pied::before {
	content: "";
	position: absolute;
	z-index: -1;
	inset-block-start: -6rem;
	inset-inline-end: -5rem;
	width: 28rem;
	aspect-ratio: 1;
	background: #fff;
	opacity: 0.05;
	-webkit-mask: var(--enp-croissant) center / contain no-repeat;
	mask: var(--enp-croissant) center / contain no-repeat;
}
[dir="rtl"] .enp-pied::before { transform: scaleX(-1); }
