/**
 * FAQ — Vision d'un Jour Mariage.
 *
 * Widget vdjm-faq. Deux colonnes au-delà de la tablette : l'introduction à
 * gauche, la liste des questions à droite ; une seule en dessous. Ce fichier
 * porte les valeurs de la maquette ; les réglages de l'onglet Style du widget
 * passent par le CSS généré par Elementor et l'emportent toujours.
 *
 * Tout est en px, comme ce qu'Elementor écrit autour (titres, textes,
 * boutons) : en rem, la FAQ suivait la taille de police du navigateur et
 * pas le reste de la page — sur un navigateur réglé à 20 px, son bouton
 * faisait 225 × 50 à côté d'un bouton Elementor de 180 × 40.
 *
 *   .vdjm-faq                   la grille
 *   ├── .vdjm-faq__intro         accroche, titre, texte, puis __appel
 *   │   └── .vdjm-faq__appel     ::before (le trait), relance, bouton
 *   └── .vdjm-faq__liste
 *       └── .vdjm-faq__item      [--ouvert]
 *           ├── .vdjm-faq__question > .vdjm-faq__declencheur (<button>)
 *           │   numéro · intitulé · icône
 *           └── .vdjm-faq__reponse > __reponse-interieur > __reponse-contenu
 *
 * Voir 04-css-js-conventions.md du socle web-core
 */

.vdjm-faq {

	/* Les valeurs que le panneau du widget réécrit. */
	--vdjm-faq-liste: 500px;
	--vdjm-faq-ecart: 80px;
	--vdjm-faq-filet: color-mix( in srgb, var( --vdjm-color-secondary ) 32%, transparent );
	--vdjm-faq-icone: color-mix( in srgb, var( --vdjm-color-secondary ) 55%, transparent );

	/* Colonnes du numéro et de l'icône : la réponse s'aligne sur le texte de
	   la question en reprenant la première, et se dégage de la seconde. */
	--vdjm-faq-numero: 28px;
	--vdjm-faq-icone-taille: 30px;
	--vdjm-faq-gouttiere: 20px;

	display: grid;
	grid-template-columns: minmax( 0, 1fr ) minmax( 0, var( --vdjm-faq-liste ) );
	column-gap: var( --vdjm-faq-ecart );
	row-gap: 48px;
	align-items: start;
	color: var( --vdjm-color-text-warm );
}

/* Palier tablette (768 – 1024 px) : les deux colonnes du bureau, en
   proportions — à 768 px, les 500 px de la liste ne laissaient que 140 px
   à l'introduction. Empilée, la FAQ montait l'introduction centrée au-dessus
   de la liste et doublait la hauteur de la section ; Geoffrey veut la
   largeur occupée plutôt que la hauteur (2026-11-16). Les réglages du
   widget (largeur de la liste, écart) ne jouent qu'au-dessus de 1024 px. */
@media ( min-width: 768px ) and ( max-width: 1024px ) {

	.vdjm-faq {
		grid-template-columns: minmax( 0, 2fr ) minmax( 0, 3fr );
		column-gap: 40px;
	}
}

@media ( max-width: 767px ) {

	.vdjm-faq {
		grid-template-columns: minmax( 0, 1fr );
	}
}

/* --- Introduction --- */

.vdjm-faq__intro {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
}

.vdjm-faq__accroche {
	margin: 0 0 10px;
	font-family: var( --vdjm-font-heading );
	font-size: 11px;
	font-weight: 400;
	color: var( --vdjm-color-secondary );
	letter-spacing: 0.25em;
	text-transform: uppercase;
}

.vdjm-faq__titre {
	margin: 0;
	font-family: var( --vdjm-font-title );
	font-size: 28px; /* comme les autres titres de section en mobile */
	font-weight: 400;
	line-height: 1.25;
	color: var( --vdjm-color-secondary );
}

@media ( min-width: 768px ) {

	.vdjm-faq__titre {
		font-size: 44px;
	}
}

@media ( min-width: 1025px ) {

	.vdjm-faq__titre {
		font-size: 58px; /* comme les autres titres de section */
	}
}

.vdjm-faq__texte {
	max-width: 360px;
	margin: 24px 0 0;
	font-family: var( --vdjm-font-heading );
	font-size: 15px;
	font-style: italic;
	line-height: 1.7;
}

/* Le trait n'est dessiné que s'il y a une relance ou un bouton à séparer
   du texte : il appartient à l'appel, pas à l'introduction. */
.vdjm-faq__appel::before {
	display: block;
	width: 88px;
	height: 1px;
	margin: 28px 0 22px;
	content: '';
	background: color-mix( in srgb, var( --vdjm-color-secondary ) 45%, transparent );
}

.vdjm-faq__relance {
	margin: 0 0 14px;
	font-family: var( --vdjm-font-heading );
	font-size: 14px;
	font-style: italic;
}

/* Le dessin des autres boutons du site (« Contactez-nous » du bloc CTA,
   « Découvrir nos formules ») : Noto Serif 18 romain, 16 × 50 px de marges,
   rayon 10, soit 50 px de haut. Il était en 13 px gras, 4 px de rayon —
   le seul bouton du site à part, relevé par Geoffrey le 2026-11-11. */
.vdjm-faq__bouton {
	display: inline-block;
	padding: 16px 50px;
	font-family: var( --vdjm-font-heading );
	font-size: 18px;
	font-weight: 400;
	line-height: 1;
	color: var( --vdjm-color-accent );
	text-decoration: none;
	background-color: var( --vdjm-color-secondary );
	border-radius: var( --vdjm-radius-lg );
	transition: background-color var( --vdjm-transition-fast );
}

.vdjm-faq__bouton:hover,
.vdjm-faq__bouton:focus-visible {
	color: var( --vdjm-color-accent );
	background-color: var( --vdjm-color-secondary-dark );
}

.vdjm-faq__bouton:focus-visible {
	outline: 2px solid var( --vdjm-color-secondary-dark );
	outline-offset: 2px;
}

/* Une colonne (mobile) : l'introduction coiffe la liste, centrée comme les
   autres titres de section. La liste reste à gauche — numéros et icônes
   l'alignent. Demande de Geoffrey, 2026-11-11 ; la tablette est repassée en
   deux colonnes le 2026-11-16. Placé après les règles de l'introduction,
   qui l'emporteraient sinon à spécificité égale. */
@media ( max-width: 767px ) {

	.vdjm-faq__intro {
		align-items: center;
		text-align: center;
	}

	.vdjm-faq__appel::before {
		margin-right: auto;
		margin-left: auto;
	}
}

/* --- Liste des questions --- */

.vdjm-faq__liste {
	border-top: 1px solid var( --vdjm-faq-filet );
}

.vdjm-faq__item {
	border-bottom: 1px solid var( --vdjm-faq-filet );
}

/* La balise de titre ne sert que la structure du document : elle ne doit
   rien imposer au bouton qu'elle contient. Le reset du thème parent lui
   donne marges, corps et graisse — une classe (0,1,0) les bat. */
.vdjm-faq__question {
	margin: 0;
	font: inherit;
}

/* Deux classes, et des états explicites : le reset du thème parent habille
   tout `[type=button]` — bordure et texte roses, fond rose au survol et au
   focus (0,2,0), et `white-space: nowrap`, qui ferait déborder les
   questions longues. Une classe seule perdrait sur le survol. */
.vdjm-faq .vdjm-faq__declencheur,
.vdjm-faq .vdjm-faq__declencheur:hover,
.vdjm-faq .vdjm-faq__declencheur:focus {
	color: inherit;
	background: transparent;
	border: 0;
}

.vdjm-faq .vdjm-faq__declencheur {
	display: grid;
	grid-template-columns: var( --vdjm-faq-numero ) minmax( 0, 1fr ) var( --vdjm-faq-icone-taille );
	column-gap: var( --vdjm-faq-gouttiere );
	align-items: center;
	width: 100%;
	padding: 22px 4px;
	margin: 0;
	font: inherit;
	text-align: left;
	white-space: normal;
	cursor: pointer;
	border-radius: 0;
	transition: none;
}

.vdjm-faq .vdjm-faq__declencheur:focus-visible {
	outline: 2px solid var( --vdjm-color-secondary-dark );
	outline-offset: 2px;
}

.vdjm-faq__numero {
	font-family: var( --vdjm-font-body );
	font-size: 22px;
	line-height: 1;
	color: var( --vdjm-faq-icone );
}

.vdjm-faq__intitule {
	font-family: var( --vdjm-font-heading );
	font-size: 17px;
	font-weight: 500;
	line-height: 1.4;
}

/* Le + et le − : deux traits dans un cercle. Ouvrir efface le trait
   vertical — le + devient −. */
.vdjm-faq__icone {
	position: relative;
	width: var( --vdjm-faq-icone-taille );
	aspect-ratio: 1;
	border: 1px solid var( --vdjm-faq-icone );
	border-radius: 50%;
}

.vdjm-faq__icone::before,
.vdjm-faq__icone::after {
	position: absolute;
	top: 50%;
	left: 50%;
	width: 10px;
	height: 1px;
	content: '';
	background: var( --vdjm-faq-icone );
	transform: translate( -50%, -50% );
	transition: transform var( --vdjm-transition-base );
}

.vdjm-faq__icone::after {
	transform: translate( -50%, -50% ) rotate( 90deg );
}

.vdjm-faq__item--ouvert .vdjm-faq__icone::after {
	transform: translate( -50%, -50% ) rotate( 90deg ) scaleX( 0 );
}

/* --- Réponse --- */

/* La hauteur s'anime par la grille : 0fr → 1fr suit le contenu, quelle que
   soit sa longueur, sans hauteur codée. `visibility` retire la réponse
   fermée de la lecture vocale et du parcours au clavier ; elle ne bascule
   qu'à la fin de la fermeture, sinon le texte disparaîtrait avant que la
   boîte ne se replie. La réponse reste dans la page pour les moteurs. */
.vdjm-faq__reponse {
	display: grid;
	grid-template-rows: 0fr;
	visibility: hidden;
	transition:
		grid-template-rows var( --vdjm-transition-base ),
		visibility 0s linear 300ms;
}

.vdjm-faq__item--ouvert .vdjm-faq__reponse {
	grid-template-rows: 1fr;
	visibility: visible;
	transition:
		grid-template-rows var( --vdjm-transition-base ),
		visibility 0s;
}

.vdjm-faq__reponse-interieur {
	min-height: 0;
	overflow: hidden;
}

/* Alignée sur l'intitulé de la question, et dégagée de la colonne de
   l'icône à droite. */
.vdjm-faq__reponse-contenu {
	padding:
		0
		calc( var( --vdjm-faq-icone-taille ) + var( --vdjm-faq-gouttiere ) )
		24px
		calc( var( --vdjm-faq-numero ) + var( --vdjm-faq-gouttiere ) + 4px );
	font-family: var( --vdjm-font-heading );
	font-size: 15px;
	font-style: italic;
	line-height: 1.7;
}

.vdjm-faq__reponse-contenu p {
	margin: 0 0 1em;
}

.vdjm-faq__reponse-contenu > :last-child {
	margin-bottom: 0;
}

/* Mobile : ce qui allongeait la liste, c'était moins le corps des questions
   que les marges et la colonne de l'icône. Mesuré à 390 px, six questions
   et la première ouverte : 779 px avant ; 632 px avec les seules questions
   en 12,8 px ; 590 px ainsi, questions en 14 px — plus courte, et des
   questions qui ne passent pas sous le corps des réponses. */
@media ( max-width: 767px ) {

	.vdjm-faq {
		--vdjm-faq-numero: 20px;
		--vdjm-faq-icone-taille: 24px;
		--vdjm-faq-gouttiere: 14px;
	}

	.vdjm-faq .vdjm-faq__declencheur {
		padding: 16px 4px;
	}

	/* Le bouton de la FAQ est un appel secondaire, glissé dans une
	   introduction : à 18 px il pesait autant que celui du bloc CTA. */
	.vdjm-faq__bouton {
		padding: 12px 32px;
		font-size: 16px;
	}

	.vdjm-faq__numero {
		font-size: 18px;
	}

	.vdjm-faq__intitule {
		font-size: 14px;
	}

	.vdjm-faq__reponse-contenu {
		padding-right: 0;
		font-size: 14px;
	}
}

@media ( prefers-reduced-motion: reduce ) {

	.vdjm-faq__reponse,
	.vdjm-faq__item--ouvert .vdjm-faq__reponse,
	.vdjm-faq__icone::before,
	.vdjm-faq__icone::after,
	.vdjm-faq__bouton {
		transition: none;
	}
}
