/* =========================================================================
   Yefy Addon — Cards Réalisations
   Design calqué sur la maquette Lime-Mantis (.project-card).
   ========================================================================= */

.yefy-realisations {
	/* Reprise des tokens de la maquette — tous surchargeables via Elementor. */
	--yefy-accent: #ffbd33;
	--yefy-accent-2: #f29b15;
	--yefy-text: #f4f6f7;
	--yefy-muted: #8b969e;
	--yefy-line: rgba(255, 255, 255, 0.12);
	--yefy-card-bg: #09131b;
	--yefy-card-border: rgba(255, 255, 255, 0.18);
	--yefy-card-radius: 15px;
	--yefy-card-min-h: 350px;

	--yefy-per-view: 4;
	--yefy-gap: 15px;
	/* Largeur en dessous de laquelle une card devient illisible. */
	--yefy-card-min-w: 260px;

	color: var(--yefy-text);
}

.yefy-realisations *,
.yefy-realisations *::before,
.yefy-realisations *::after {
	box-sizing: border-box;
}

/* -------------------------------------------------------------------------
   Garde-fou thème

   La plupart des thèmes stylisent `button` et `button:hover` globalement :
   fond plein, ombre, dégradé. Nos boutons sont transparents — dont celui qui
   couvre toute la card — donc ces règles les repeignaient en entier.

   On neutralise ici, et chaque bouton repose ensuite son propre style avec
   un sélecteur préfixé par le wrapper : deux classes, ça passe devant le
   `button:hover` du thème quel que soit l'ordre de chargement des feuilles.
   ------------------------------------------------------------------------- */

.yefy-realisations button,
.yefy-avis button,
.yefy-modal button {
	-webkit-appearance: none;
	appearance: none;
	margin: 0;
	font: inherit;
	color: inherit;
	text-transform: none;
	letter-spacing: inherit;
	text-decoration: none;
	text-shadow: none;
	background-image: none;
	box-shadow: none;
	filter: none;
	-webkit-tap-highlight-color: transparent;
}

.yefy-realisations button:hover,
.yefy-avis button:hover,
.yefy-avis button:focus,
.yefy-avis button:active,
.yefy-realisations button:focus,
.yefy-realisations button:active,
.yefy-modal button:hover,
.yefy-modal button:focus,
.yefy-modal button:active {
	text-decoration: none;
	text-shadow: none;
	background-image: none;
	box-shadow: none;
	filter: none;
	outline: none;
}

/* -------------------------------------------------------------------------
   En-tête : eyebrow + filtres
   ------------------------------------------------------------------------- */

.yefy-realisations__head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 30px;
	margin-bottom: 28px;
}

.yefy-eyebrow {
	display: flex;
	align-items: center;
	gap: 16px;
	margin: 0;
	color: var(--yefy-accent);
	text-transform: uppercase;
	font-size: 12px;
	font-weight: 800;
	letter-spacing: 0.07em;
	line-height: 1.55;
}

.yefy-eyebrow::after {
	content: "";
	width: 130px;
	height: 1px;
	background: var(--yefy-line);
}

.yefy-filters {
	display: flex;
	align-items: center;
	gap: 24px;
	font-size: 12px;
	color: #d3d7da;
	white-space: nowrap;
}

.yefy-filters button {
	background: none;
	border: 0;
	color: inherit;
	font: inherit;
	cursor: pointer;
	padding: 8px 0;
	transition: color 0.22s ease;
}

.yefy-filters button:hover {
	color: var(--yefy-accent);
}

.yefy-filters button.is-on {
	background: var(--yefy-accent);
	color: #111;
	padding: 10px 18px;
	border-radius: 999px;
	font-weight: 800;
}

.yefy-filters button:focus-visible {
	outline: 2px solid var(--yefy-accent);
	outline-offset: 3px;
	border-radius: 999px;
}

/* Variante liste déroulante, prise par le CSS au breakpoint mobile. */
.yefy-filters-select {
	display: none;
	position: relative;
	width: 100%;
}

.yefy-filters-select::after {
	content: "";
	position: absolute;
	right: 18px;
	top: 50%;
	width: 8px;
	height: 8px;
	margin-top: -6px;
	border-right: 2px solid var(--yefy-accent);
	border-bottom: 2px solid var(--yefy-accent);
	transform: rotate(45deg);
	pointer-events: none;
}

.yefy-filters-select select {
	-webkit-appearance: none;
	appearance: none;
	width: 100%;
	padding: 13px 44px 13px 18px;
	border: 1px solid var(--yefy-line);
	border-radius: 999px;
	background: rgba(255, 255, 255, 0.03);
	color: var(--yefy-text);
	font: inherit;
	font-size: 13px;
	font-weight: 600;
	line-height: 1.3;
	cursor: pointer;
}

.yefy-filters-select select:focus-visible {
	outline: 2px solid var(--yefy-accent);
	outline-offset: 2px;
}

/* La liste native s'ouvre avec les couleurs du système : on force un fond
   lisible, sinon on a du texte clair sur blanc. */
.yefy-filters-select option {
	background: #0b151d;
	color: #f4f6f7;
}

/* -------------------------------------------------------------------------
   Piste : grille de --yefy-per-view cards, qui devient carrousel dès qu'il
   y en a plus. En dessous du seuil, rendu strictement identique à une grille.
   ------------------------------------------------------------------------- */

.yefy-realisations__viewport {
	position: relative;
}

/* Le `max()` est un plancher de lisibilité : si --yefy-per-view reste à 4
   sur un écran étroit — ce qui arrive dès qu'Elementor fait hériter la
   valeur desktop vers le bas — la card ne descend pas sous
   --yefy-card-min-w et la piste défile au lieu de tout écraser. */
.yefy-realisations__track {
	display: grid;
	grid-auto-flow: column;
	grid-auto-columns: max(
		var(--yefy-card-min-w),
		calc( (100% - (var(--yefy-per-view) - 1) * var(--yefy-gap)) / var(--yefy-per-view) )
	);
	gap: var(--yefy-gap);

	overflow-x: auto;
	overscroll-behavior-x: contain;
	scroll-snap-type: x mandatory;
	scroll-behavior: smooth;

	/* scrollbar masquée : la navigation se fait aux flèches / puces / swipe */
	scrollbar-width: none;
	-ms-overflow-style: none;
}

.yefy-realisations__track::-webkit-scrollbar {
	display: none;
}

@media (prefers-reduced-motion: reduce) {
	.yefy-realisations__track {
		scroll-behavior: auto;
	}
}

/* -------------------------------------------------------------------------
   Card
   ------------------------------------------------------------------------- */

.yefy-card {
	position: relative;
	min-height: var(--yefy-card-min-h);
	border: 1px solid var(--yefy-card-border);
	border-radius: var(--yefy-card-radius);
	overflow: hidden;
	background: var(--yefy-card-bg);
	isolation: isolate;
	scroll-snap-align: start;
	transition: border-color 0.3s ease, transform 0.35s cubic-bezier(0.22, 1, 0.36, 1);
	/* le déclencheur couvre la card : sans ça, un clic qui glisse d'un pixel
	   sélectionne le texte et le thème peint sa couleur de sélection partout */
	-webkit-user-select: none;
	user-select: none;
	-webkit-tap-highlight-color: transparent;
}

.yefy-card[hidden] {
	display: none;
}

/* --- Le visuel de fond ----------------------------------------------------

   Deux couches : un conteneur qui occupe toute la card, et l'image qui
   remplit ce conteneur.

   Les thèmes WordPress imposent presque tous `img { height: auto }`, souvent
   en `!important`, parfois sur des sélecteurs plus spécifiques que les nôtres.
   D'où le verrouillage complet ci-dessous : on écrit les quatre décalages en
   longhand plutôt qu'en `inset` (un thème qui pose `top: auto` battrait le
   raccourci), et on neutralise tout ce qu'un thème pourrait ajouter sur une
   image — marge, bordure, arrondi, ratio imposé.
   ------------------------------------------------------------------------- */

.yefy-realisations .yefy-card__media {
	position: absolute !important;
	top: 0 !important;
	right: 0 !important;
	bottom: 0 !important;
	left: 0 !important;
	display: block !important;
	width: auto !important;
	height: auto !important;
	margin: 0 !important;
	padding: 0 !important;
	overflow: hidden;
	z-index: -2;
}

.yefy-realisations .yefy-card__media .yefy-card__img {
	position: absolute !important;
	top: 0 !important;
	left: 0 !important;
	right: auto !important;
	bottom: auto !important;
	display: block !important;
	width: 100% !important;
	height: 100% !important;
	min-width: 100% !important;
	min-height: 100% !important;
	max-width: none !important;
	max-height: none !important;
	margin: 0 !important;
	padding: 0 !important;
	border: 0 !important;
	border-radius: 0 !important;
	aspect-ratio: auto !important;
	object-fit: cover !important;
	/* captures de sites : on cadre le haut, pas le milieu */
	object-position: top center !important;
	filter: saturate(0.8) brightness(0.72);
	transition: transform 0.6s cubic-bezier(0.22, 1, 0.36, 1), filter 0.35s ease;
}

.yefy-card::before {
	content: "";
	position: absolute;
	inset: 0;
	background: linear-gradient(
		180deg,
		rgba(0, 0, 0, 0.05) 34%,
		rgba(3, 8, 12, 0.35) 52%,
		rgba(3, 8, 12, 0.95) 100%
	);
	z-index: -1;
}

.yefy-card__badge {
	position: absolute;
	left: 17px;
	top: 17px;
	z-index: 2;
	background: rgba(255, 255, 255, 0.45);
	backdrop-filter: blur(12px);
	-webkit-backdrop-filter: blur(12px);
	color: var(--yefy-text);
	padding: 7px 12px;
	border-radius: 999px;
	font-size: 10px;
	font-weight: 700;
	line-height: 1.55;
}

.yefy-card__content {
	position: absolute;
	left: 18px;
	right: 18px;
	bottom: 18px;
	z-index: 2;
}

.yefy-card__title {
	font-size: 16px;
	font-weight: 700;
	line-height: 1.3;
	margin: 0 0 7px;
	color: var(--yefy-text);
	padding-right: 38px;
}

.yefy-card__desc {
	font-size: 12px;
	color: #c4c9cc;
	line-height: 1.6;
	margin: 0;
	padding-right: 38px;
}

.yefy-card__go {
	position: absolute;
	right: 0;
	bottom: 0;
	width: 33px;
	height: 33px;
	border: 1px solid rgba(255, 255, 255, 0.35);
	border-radius: 50%;
	display: grid;
	place-items: center;
	font-size: 18px;
	line-height: 1;
	transition: background 0.22s ease, border-color 0.22s ease, color 0.22s ease;
}

/* Déclencheur étiré : un seul arrêt de tabulation, le <h3> reste un vrai titre.
   Il doit rester rigoureusement invisible dans tous ses états — sans quoi
   c'est toute la card qui se repeint. */
.yefy-realisations .yefy-card__trigger,
.yefy-realisations .yefy-card__trigger:hover,
.yefy-realisations .yefy-card__trigger:focus,
.yefy-realisations .yefy-card__trigger:active {
	position: absolute;
	inset: 0;
	z-index: 3;
	width: 100%;
	height: 100%;
	padding: 0;
	margin: 0;
	border: 0;
	background: transparent;
	cursor: pointer;
}

.yefy-realisations .yefy-card__trigger:focus-visible {
	outline: 2px solid var(--yefy-accent);
	outline-offset: -4px;
	border-radius: var(--yefy-card-radius);
}

/* --- Survol : voile de verre discret --------------------------------------
   Une seule couche, au-dessus de l'image et sous le texte. Le flou porte sur
   ce qui est peint derrière (image + dégradé), jamais sur le titre. */

.yefy-card__glass {
	position: absolute;
	inset: 0;
	z-index: 1;
	pointer-events: none;
	opacity: 0;
	background: linear-gradient(
		180deg,
		rgba(255, 255, 255, 0.10) 0%,
		rgba(255, 255, 255, 0.04) 45%,
		rgba(255, 255, 255, 0) 100%
	);
	backdrop-filter: blur(2px) saturate(1.08);
	-webkit-backdrop-filter: blur(2px) saturate(1.08);
	transition: opacity 0.35s ease;
}

.yefy-card:hover .yefy-card__glass,
.yefy-card:focus-within .yefy-card__glass {
	opacity: 1;
}

.yefy-card:hover,
.yefy-card:focus-within {
	border-color: rgba(255, 255, 255, 0.30);
	transform: translateY(-3px);
}

.yefy-realisations .yefy-card:hover .yefy-card__img,
.yefy-realisations .yefy-card:focus-within .yefy-card__img {
	transform: scale(1.04) !important;
	filter: saturate(0.95) brightness(0.82);
}

.yefy-card:hover .yefy-card__go,
.yefy-card:focus-within .yefy-card__go {
	background: rgba(255, 255, 255, 0.14);
	border-color: rgba(255, 255, 255, 0.55);
	backdrop-filter: blur(6px);
	-webkit-backdrop-filter: blur(6px);
}

/* -------------------------------------------------------------------------
   Navigation du carrousel de section
   ------------------------------------------------------------------------- */

.yefy-realisations__nav {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 18px;
	margin-top: 26px;
}

.yefy-realisations__nav[hidden] {
	display: none;
}

.yefy-nav__arrow {
	width: 42px;
	height: 42px;
	display: grid;
	place-items: center;
	border: 1px solid rgba(255, 255, 255, 0.28);
	border-radius: 999px;
	background: rgba(255, 255, 255, 0.015);
	color: inherit;
	font-size: 17px;
	line-height: 1;
	cursor: pointer;
	transition: 0.22s ease;
}

.yefy-nav__arrow:hover:not(:disabled) {
	border-color: var(--yefy-accent);
	color: var(--yefy-accent);
	transform: translateY(-2px);
}

.yefy-nav__arrow:disabled {
	opacity: 0.3;
	cursor: default;
}

.yefy-nav__dots {
	display: flex;
	align-items: center;
	gap: 8px;
}

.yefy-nav__dot {
	width: 8px;
	height: 8px;
	padding: 0;
	border: 0;
	border-radius: 999px;
	background: rgba(255, 255, 255, 0.25);
	cursor: pointer;
	transition: 0.22s ease;
}

.yefy-nav__dot.is-active {
	width: 26px;
	background: var(--yefy-accent);
}

.yefy-empty {
	padding: 24px;
	border: 1px dashed var(--yefy-line, currentColor);
	border-radius: 12px;
	opacity: 0.7;
	text-align: center;
}

/* -------------------------------------------------------------------------
   Responsive de la section — aligné sur les breakpoints de la maquette
   ------------------------------------------------------------------------- */

@media (max-width: 1050px) {
	.yefy-realisations {
		--yefy-per-view: 2;
	}
}

@media (max-width: 700px) {
	.yefy-realisations {
		--yefy-per-view: 1;
		--yefy-card-min-h: 400px;
		/* 82 % : la card suivante dépasse juste assez pour qu'on comprenne
		   qu'il y en a d'autres. */
		--yefy-card-min-w: 82%;
	}

	.yefy-realisations__head {
		align-items: flex-start;
		flex-direction: column;
		gap: 18px;
	}

	.yefy-eyebrow {
		font-size: 10px;
	}

	.yefy-eyebrow::after {
		width: 70px;
	}

	/* On troque la rangée de boutons — qui devenait une barre de défilement
	   horizontale — contre la liste déroulante. */
	.yefy-filters {
		display: none;
	}

	.yefy-filters-select {
		display: block;
	}

	/* La card suivante est rognée par le bord de l'écran. Un dégradé sur
	   les deux côtés fait de cette coupure un effet voulu plutôt qu'un
	   accident, et indique qu'il y a une suite. */
	.yefy-realisations__viewport,
	.yefy-avis__viewport {
		-webkit-mask-image: linear-gradient(90deg, transparent 0, #000 18px, #000 calc(100% - 26px), transparent 100%);
		mask-image: linear-gradient(90deg, transparent 0, #000 18px, #000 calc(100% - 26px), transparent 100%);
	}

	/* Le masque rogne 18 px à gauche : on décale la piste d'autant pour que
	   la première card reste entière au repos. */
	.yefy-realisations__track,
	.yefy-avis__track {
		padding-inline: 18px 26px;
		scroll-padding-inline: 18px;
		margin-inline: -18px -26px;
	}
}

/* =========================================================================
   Modale — 3 parties en flex
   ========================================================================= */

.yefy-modal {
	--yefy-accent: #ffbd33;
	--yefy-text: #f4f6f7;
	--yefy-muted: #8b969e;
	--yefy-line: rgba(255, 255, 255, 0.12);
	--yefy-modal-bg: #0b151d;
	--yefy-modal-panel: #07131b;
	--yefy-overlay: rgba(3, 8, 12, 0.78);
	--yefy-modal-width: 1280px;
	--yefy-modal-radius: 18px;
	--yefy-phone-width: 264px;

	position: fixed;
	inset: 0;
	z-index: 99999;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: clamp(12px, 3vw, 40px);
	color: var(--yefy-text);
}

.yefy-modal[hidden] {
	display: none;
}

.yefy-modal *,
.yefy-modal *::before,
.yefy-modal *::after {
	box-sizing: border-box;
}

.yefy-modal__overlay {
	position: absolute;
	inset: 0;
	background: var(--yefy-overlay);
	backdrop-filter: blur(4px);
	-webkit-backdrop-filter: blur(4px);
	opacity: 0;
	transition: opacity 0.28s ease;
}

.yefy-modal.is-open .yefy-modal__overlay {
	opacity: 1;
}

.yefy-modal__dialog {
	position: relative;
	width: 100%;
	max-width: var(--yefy-modal-width);
	height: min(86vh, 860px);
	background: var(--yefy-modal-bg);
	border: 1px solid var(--yefy-line);
	border-radius: var(--yefy-modal-radius);
	box-shadow: 0 24px 80px rgba(0, 0, 0, 0.38);
	overflow: hidden;
	opacity: 0;
	transform: translateY(18px) scale(0.985);
	transition: opacity 0.3s ease, transform 0.35s cubic-bezier(0.22, 1, 0.36, 1);
}

.yefy-modal.is-open .yefy-modal__dialog {
	opacity: 1;
	transform: none;
}

.yefy-modal .yefy-modal__close {
	position: absolute;
	top: 16px;
	right: 16px;
	z-index: 5;
	width: 40px;
	height: 40px;
	/* flex + SVG : centrage optique exact, contrairement au glyphe « × » */
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 0;
	border: 1px solid var(--yefy-line);
	border-radius: 50%;
	background: rgba(255, 255, 255, 0.05);
	backdrop-filter: blur(8px);
	-webkit-backdrop-filter: blur(8px);
	color: var(--yefy-text);
	line-height: 0;
	cursor: pointer;
	transition: background 0.22s ease, border-color 0.22s ease, color 0.22s ease;
}

.yefy-modal .yefy-modal__close svg {
	display: block;
	width: 16px;
	height: 16px;
}

.yefy-modal .yefy-modal__close:hover,
.yefy-modal .yefy-modal__close:focus-visible {
	background: rgba(255, 255, 255, 0.12);
	border-color: rgba(255, 255, 255, 0.4);
	color: var(--yefy-text);
}

.yefy-modal .yefy-modal__close:focus-visible {
	outline: 2px solid var(--yefy-accent);
	outline-offset: 2px;
}

.yefy-modal__content {
	height: 100%;
}

.yefy-modal__layout {
	display: flex;
	height: 100%;
	/* min-height:0 sur le conteneur ET les colonnes : sans ça, un enfant en
	   overflow force le flex item à s'étendre et c'est la page qui défile. */
	min-height: 0;
}

.yefy-modal__part {
	min-height: 0;
	min-width: 0;
}

/* --- Partie 1 : texte ---------------------------------------------------- */

.yefy-modal__part--info {
	flex: 1 1 30%;
	display: flex;
	flex-direction: column;
	padding: 34px 28px 28px 34px;
	border-right: 1px solid var(--yefy-line);
}

.yefy-modal__head {
	flex: 0 0 auto;
	padding-right: 44px;
}

.yefy-modal__badge {
	display: inline-block;
	margin-bottom: 12px;
	padding: 6px 12px;
	border-radius: 999px;
	background: rgba(255, 189, 51, 0.12);
	color: var(--yefy-accent);
	font-size: 10px;
	font-weight: 700;
	letter-spacing: 0.04em;
	text-transform: uppercase;
}

.yefy-modal__title {
	margin: 0;
	font-size: clamp(1.4rem, 2vw, 1.9rem);
	font-weight: 650;
	letter-spacing: -0.03em;
	line-height: 1.12;
	color: var(--yefy-text);
}

.yefy-modal__subtitle {
	margin: 10px 0 0;
	color: var(--yefy-muted);
	font-size: 14px;
	line-height: 1.55;
}

.yefy-modal__link {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	margin-top: 14px;
	font-size: 13px;
	font-weight: 700;
	color: var(--yefy-accent);
	text-decoration: none;
	border-bottom: 1px solid currentColor;
	transition: 0.22s ease;
}

.yefy-modal__link:hover {
	color: var(--yefy-accent-2, #f29b15);
}

/* Les infos vivent dans la zone scrollable, en tête de celle-ci :
   le séparateur du haut est déjà porté par .yefy-modal__scroll. */
.yefy-modal__infos {
	display: grid;
	gap: 11px;
	margin: 0 0 22px;
	padding: 0 0 20px;
	border-bottom: 1px solid var(--yefy-line);
}

.yefy-modal__info {
	display: flex;
	gap: 12px;
	align-items: baseline;
	font-size: 13px;
}

.yefy-modal__info dt {
	flex: 0 0 38%;
	margin: 0;
	color: var(--yefy-muted);
	text-transform: uppercase;
	letter-spacing: 0.06em;
	font-size: 10px;
	font-weight: 700;
}

.yefy-modal__info dd {
	flex: 1 1 auto;
	margin: 0;
	font-weight: 500;
}

/* La zone scrollable : la seule de la partie 1. Elle contient les infos PUIS
   la description, pour que celle-ci garde de la place quelles que soient les
   lignes d'infos saisies. */
.yefy-modal__scroll {
	flex: 1 1 auto;
	/* le flex-basis 0 fait partager la hauteur à la description, pas au reste :
	   sans lui, un en-tête un peu long l'écrase à deux lignes */
	flex-basis: 0;
	min-height: 0;
	overflow-y: auto;
	/* empêche le scroll de « déborder » sur la page en fin de course */
	overscroll-behavior: contain;
	margin-top: 20px;
	padding: 20px 14px 4px 0;
	border-top: 1px solid var(--yefy-line);
	scrollbar-width: thin;
	scrollbar-color: rgba(255, 255, 255, 0.22) transparent;
}

.yefy-modal__scroll::-webkit-scrollbar {
	width: 6px;
}

.yefy-modal__scroll::-webkit-scrollbar-thumb {
	background: rgba(255, 255, 255, 0.22);
	border-radius: 3px;
}

.yefy-modal__scroll:focus-visible {
	outline: 2px solid var(--yefy-accent);
	outline-offset: 2px;
}

.yefy-modal__description {
	font-size: 14px;
	line-height: 1.7;
	color: #c4c9cc;
}

.yefy-modal__description > :first-child {
	margin-top: 0;
}

.yefy-modal__description > :last-child {
	margin-bottom: 0;
}

/* --- Partie 2 : galerie desktop ------------------------------------------ */

.yefy-modal__part--gallery {
	flex: 1 1 42%;
	overflow-y: auto;
	overscroll-behavior: contain;
	padding: 34px 28px;
	background: var(--yefy-modal-panel);
	scrollbar-width: thin;
	scrollbar-color: rgba(255, 255, 255, 0.22) transparent;
}

.yefy-modal__part--gallery::-webkit-scrollbar {
	width: 6px;
}

.yefy-modal__part--gallery::-webkit-scrollbar-thumb {
	background: rgba(255, 255, 255, 0.22);
	border-radius: 3px;
}

.yefy-gallery {
	display: grid;
	gap: 18px;
}

.yefy-gallery__item {
	margin: 0;
	border: 1px solid var(--yefy-line);
	border-radius: 12px;
	overflow: hidden;
	background: #0d1821;
	box-shadow: 0 18px 40px -20px rgba(0, 0, 0, 0.7);
}

.yefy-gallery__img {
	display: block;
	width: 100%;
	height: auto;
}

/* --- Partie 3 : mockup mobile + carrousel -------------------------------- */

.yefy-modal__part--mobile {
	flex: 0 0 auto;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 18px;
	padding: 34px;
	border-left: 1px solid var(--yefy-line);
}

.yefy-phone {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 16px;
	flex: 1 1 auto;
	min-height: 0;
	width: 100%;
}

/* Le cadre se dimensionne par la HAUTEUR disponible : le flex résout sa
   hauteur, aspect-ratio en déduit la largeur. max-height borne la largeur
   à --yefy-phone-width sans jamais déformer le ratio. */
.yefy-phone__frame {
	position: relative;
	flex: 1 1 auto;
	min-height: 0;
	height: 100%;
	max-height: calc(var(--yefy-phone-width) * 19.5 / 9);
	width: auto;
	aspect-ratio: 9 / 19.5;
	padding: 11px;
	border-radius: 40px;
	background: linear-gradient(160deg, #2b2f38, #10161c);
	box-shadow:
		0 0 0 1px rgba(255, 255, 255, 0.1) inset,
		0 30px 60px -24px rgba(0, 0, 0, 0.8);
}

.yefy-phone__notch {
	position: absolute;
	top: 17px;
	left: 50%;
	transform: translateX(-50%);
	width: 88px;
	height: 19px;
	border-radius: 999px;
	background: #0b0c10;
	z-index: 2;
}

.yefy-phone__screen {
	position: relative;
	width: 100%;
	height: 100%;
	border-radius: 30px;
	overflow: hidden;
	background: #061017;
}

.yefy-phone__track {
	display: flex;
	height: 100%;
	transition: transform 0.45s cubic-bezier(0.22, 1, 0.36, 1);
	will-change: transform;
}

.yefy-phone__slide {
	flex: 0 0 100%;
	height: 100%;
	overflow: hidden;
}

.yefy-phone__img {
	display: block;
	width: 100%;
	height: 100%;
	max-width: none;
	/* les captures mobiles sont longues : on cadre en haut */
	object-fit: cover;
	object-position: top center;
}

.yefy-phone__nav {
	display: flex;
	align-items: center;
	gap: 14px;
	flex: 0 0 auto;
}

.yefy-phone__arrow {
	width: 34px;
	height: 34px;
	display: grid;
	place-items: center;
	border: 1px solid var(--yefy-line);
	border-radius: 50%;
	background: transparent;
	color: inherit;
	font-size: 20px;
	line-height: 1;
	cursor: pointer;
	transition: 0.22s ease;
}

.yefy-phone__arrow:hover {
	border-color: var(--yefy-accent);
	color: var(--yefy-accent);
}

.yefy-phone__dots {
	display: flex;
	gap: 7px;
}

.yefy-phone__dot {
	width: 7px;
	height: 7px;
	padding: 0;
	border: 0;
	border-radius: 999px;
	background: rgba(255, 255, 255, 0.25);
	cursor: pointer;
	transition: 0.22s ease;
}

.yefy-phone__dot.is-active {
	width: 22px;
	background: var(--yefy-accent);
}

/* -------------------------------------------------------------------------
   Verrou du scroll de page pendant l'ouverture
   ------------------------------------------------------------------------- */

body.yefy-modal-open {
	overflow: hidden;
	/* compense la disparition de la scrollbar pour éviter le saut de layout */
	padding-right: var(--yefy-scrollbar-width, 0px);
}

/* -------------------------------------------------------------------------
   Responsive de la modale
   ------------------------------------------------------------------------- */

@media (max-width: 1200px) {
	.yefy-modal {
		--yefy-phone-width: 220px;
	}

	.yefy-modal__part--mobile {
		padding: 28px 24px;
	}
}

@media (max-width: 1024px) {
	.yefy-modal__dialog {
		height: min(92vh, 900px);
	}

	.yefy-modal__layout {
		flex-direction: column;
		overflow-y: auto;
		overscroll-behavior: contain;
	}

	.yefy-modal__part {
		flex: 0 0 auto;
	}

	.yefy-modal__part--info {
		border-right: 0;
		border-bottom: 1px solid var(--yefy-line);
		padding: 30px 22px 24px;
	}

	/* en colonne, la description n'a plus de hauteur contrainte :
	   elle se déroule et c'est la modale entière qui défile */
	.yefy-modal__scroll {
		overflow: visible;
		max-height: none;
	}

	.yefy-modal__part--gallery {
		overflow: visible;
		padding: 24px 22px;
	}

	.yefy-modal__part--mobile {
		border-left: 0;
		border-top: 1px solid var(--yefy-line);
	}

	/* en colonne, la partie 3 n'a plus de hauteur définie :
	   on repasse à un cadre dimensionné par la largeur */
	.yefy-phone,
	.yefy-phone__frame {
		flex: 0 0 auto;
	}

	.yefy-phone__frame {
		width: 240px;
		height: auto;
		max-height: none;
	}
}

@media (max-width: 600px) {
	.yefy-modal {
		padding: 0;
	}

	.yefy-modal__dialog {
		height: 100dvh;
		max-width: none;
		border: 0;
		border-radius: 0;
	}
}

@media (prefers-reduced-motion: reduce) {
	.yefy-modal__overlay,
	.yefy-modal__dialog,
	.yefy-phone__track,
	.yefy-card__img {
		transition: none;
	}
}

/* =========================================================================
   Avis Google
   Calqué sur la section « 5. Avis » de la maquette Lime-Mantis.
   ========================================================================= */

.yefy-avis {
	--yefy-accent: #ffbd33;
	--yefy-text: #f4f6f7;
	--yefy-muted: #9ba4aa;
	--yefy-line: rgba(255, 255, 255, 0.12);

	--yefy-per-view: 3;
	--yefy-gap: 13px;
	--yefy-card-min-w: 240px;
	--yefy-avis-column-gap: 42px;
	--yefy-avis-intro-width: 25%;

	--yefy-avis-card-bg: rgba(255, 255, 255, 0.015);
	--yefy-avis-card-border: rgba(255, 255, 255, 0.14);
	--yefy-avis-card-radius: 12px;
	--yefy-avis-card-padding: 22px;
	--yefy-avis-avatar: 33px;

	color: var(--yefy-text);
}

.yefy-avis *,
.yefy-avis *::before,
.yefy-avis *::after {
	box-sizing: border-box;
}

/* --- Les deux colonnes ---------------------------------------------------- */

.yefy-avis__layout {
	display: flex;
	flex-wrap: wrap;
	align-items: flex-start;
	gap: var(--yefy-avis-column-gap);
}

.yefy-avis__intro {
	flex: 0 0 var(--yefy-avis-intro-width);
	max-width: var(--yefy-avis-intro-width);
	min-width: 0;
}

.yefy-avis__main {
	/* flex-basis 0 : la colonne de droite prend tout le reste,
	   sans que la largeur des cards ne la fasse déborder */
	flex: 1 1 0;
	min-width: 0;
}

.yefy-avis__title {
	margin: 25px 0 0;
	font-size: 42px;
	font-weight: 600;
	line-height: 1.08;
	letter-spacing: -0.03em;
	color: var(--yefy-text);
}

.yefy-avis__lead {
	margin: 14px 0 0;
	font-size: 15px;
	line-height: 1.55;
	color: var(--yefy-muted);
}

/* --- La piste d'avis ------------------------------------------------------ */

.yefy-avis__viewport {
	position: relative;
}

/* Même plancher que la piste des réalisations : la valeur demandée peut
   rester à 3 sur un écran étroit, la card ne doit pas s'écraser pour
   autant. */
.yefy-avis__track {
	display: grid;
	grid-auto-flow: column;
	grid-auto-columns: max(
		var(--yefy-card-min-w),
		calc( (100% - (var(--yefy-per-view) - 1) * var(--yefy-gap)) / var(--yefy-per-view) )
	);
	gap: var(--yefy-gap);

	overflow-x: auto;
	overscroll-behavior-x: contain;
	scroll-snap-type: x mandatory;
	scroll-behavior: smooth;

	scrollbar-width: none;
	-ms-overflow-style: none;
}

.yefy-avis__track::-webkit-scrollbar {
	display: none;
}

@media (prefers-reduced-motion: reduce) {
	.yefy-avis__track {
		scroll-behavior: auto;
	}
}

/* --- La card d'avis ------------------------------------------------------- */

.yefy-avis__card {
	display: flex;
	flex-direction: column;
	gap: 14px;
	padding: var(--yefy-avis-card-padding);
	background: var(--yefy-avis-card-bg);
	border: 1px solid var(--yefy-avis-card-border);
	border-radius: var(--yefy-avis-card-radius);
	scroll-snap-align: start;
}

.yefy-avis__card[hidden] {
	display: none;
}

.yefy-avis__stars {
	font-size: 14px;
	line-height: 1.2;
	letter-spacing: 2px;
	color: var(--yefy-accent);
}

/* les étoiles non acquises gardent la place, en retrait */
.yefy-avis__stars-off {
	opacity: 0.22;
}

.yefy-avis__text {
	margin: 0;
	flex: 1 1 auto;
	font-size: 11px;
	line-height: 1.65;
	color: #d0d4d7;
	border: 0;
	padding: 0;
	quotes: none;
}

.yefy-avis__text p {
	margin: 0;
}

/* --- L'auteur ------------------------------------------------------------- */

.yefy-avis__author {
	display: flex;
	align-items: center;
	gap: 10px;
	margin-top: auto;
}

.yefy-avis__avatar {
	flex: 0 0 var(--yefy-avis-avatar);
	width: var(--yefy-avis-avatar);
	height: var(--yefy-avis-avatar);
	display: grid;
	place-items: center;
	border-radius: 50%;
	overflow: hidden;
	background: var(--yefy-accent);
	color: #171717;
	font-size: 12px;
	font-weight: 800;
	line-height: 1;
	text-transform: uppercase;
}

.yefy-avis__avatar--photo {
	background: none;
}

/* même verrouillage que le visuel des cards de réalisation :
   `img { height: auto }` des thèmes déformerait la pastille */
.yefy-avis .yefy-avis__photo {
	display: block !important;
	width: 100% !important;
	height: 100% !important;
	max-width: none !important;
	max-height: none !important;
	margin: 0 !important;
	padding: 0 !important;
	border: 0 !important;
	border-radius: 50% !important;
	aspect-ratio: auto !important;
	object-fit: cover !important;
}

.yefy-avis__id {
	display: flex;
	flex-direction: column;
	gap: 2px;
	min-width: 0;
}

.yefy-avis__name {
	font-size: 10px;
	font-weight: 700;
	line-height: 1.3;
	color: var(--yefy-text);
}

.yefy-avis__role {
	font-size: 9px;
	font-weight: 400;
	line-height: 1.3;
	color: #8f989e;
}

.yefy-avis__link {
	flex: 0 0 auto;
	margin-left: auto;
	display: grid;
	place-items: center;
	width: 26px;
	height: 26px;
	border-radius: 50%;
	border: 1px solid var(--yefy-line);
	opacity: 0.65;
	transition: opacity 0.22s ease, border-color 0.22s ease;
}

.yefy-avis__link:hover,
.yefy-avis__link:focus-visible {
	opacity: 1;
	border-color: rgba(255, 255, 255, 0.35);
}

/* --- Puces ---------------------------------------------------------------- */

.yefy-avis__nav {
	display: flex;
	justify-content: center;
	margin-top: 20px;
}

.yefy-avis__nav[hidden] {
	display: none;
}

/* la maquette garde des puces rondes : on annule l'allongement
   de la puce active hérité de la section Réalisations */
.yefy-avis .yefy-nav__dots {
	display: flex;
	justify-content: center;
	gap: 10px;
}

.yefy-avis .yefy-nav__dot {
	width: 8px;
	height: 8px;
	border-radius: 50%;
	background: #4b565e;
}

.yefy-avis .yefy-nav__dot.is-active {
	width: 8px;
	background: var(--yefy-accent);
}

/* --- Responsive ----------------------------------------------------------- */

@media (max-width: 1050px) {
	.yefy-avis {
		--yefy-per-view: 2;
		--yefy-avis-column-gap: 32px;
	}

	.yefy-avis__intro {
		flex-basis: 100%;
		max-width: 100%;
	}

	.yefy-avis__title {
		font-size: 34px;
	}
}

@media (max-width: 700px) {
	.yefy-avis {
		--yefy-per-view: 1;
		--yefy-card-min-w: 82%;
	}

	.yefy-avis__title {
		font-size: 28px;
		margin-top: 18px;
	}

	.yefy-avis__text {
		font-size: 13px;
	}

	.yefy-avis__name {
		font-size: 12px;
	}

	.yefy-avis__role {
		font-size: 11px;
	}
}
