/* ==========================================================================
   Composants partagés — maquette/Composants.dc.html
   btn · form-field · card-reportage · card-temoignage · card-formule · faq
   breadcrumb · pagination · nav-reportage · lightbox · cta-band · section-head
   ========================================================================== */

/* ------------------------------------------------------------------ Boutons */
.btn {
	display: inline-flex; align-items: center; justify-content: center; gap: 12px;
	min-height: 52px; padding: 0 32px;
	border: 1px solid var(--ink);
	background: var(--ink); color: var(--bg);
	font-family: var(--font-ui); font-size: var(--fs-ui); font-weight: 500;
	letter-spacing: .18em; line-height: 1.2; text-transform: uppercase; text-decoration: none; text-align: center;
	cursor: pointer;
	transition: background-color var(--t-hover) ease, color var(--t-hover) ease, border-color var(--t-hover) ease;
}
.btn:hover { background: var(--accent); border-color: var(--accent); color: var(--bg); }
.btn:focus-visible { outline: 2px solid var(--ink); outline-offset: 4px; }
.btn:disabled, .btn[aria-disabled="true"] { background: var(--line); border-color: var(--line); color: var(--ink-soft); cursor: not-allowed; }

.btn--outline { background: transparent; color: var(--ink); }
.btn--outline:hover { background: var(--ink); border-color: var(--ink); color: var(--bg); }
.btn--outline:disabled { background: transparent; border-color: var(--line); color: var(--ink-soft); }

/* Sur fond sombre : contour clair, plein clair au survol. */
.btn--light { padding-inline: 28px; border-color: var(--on-dark); background: transparent; color: var(--on-dark); }
.btn--light:hover { background: var(--on-dark); border-color: var(--on-dark); color: var(--dark); }
.btn--light:focus-visible { outline-color: var(--on-dark); }
.btn--solid-light { border-color: var(--on-dark); background: var(--on-dark); color: var(--dark); }
.btn--solid-light:hover { background: transparent; color: var(--on-dark); }
.btn--solid-light:focus-visible { outline-color: var(--on-dark); }
.btn--lg { min-height: 56px; }

/* Lien fléché. */
.btn--link {
	min-height: 44px; padding: 0; gap: 12px;
	border: 0; border-bottom: 1px solid currentColor;
	background: transparent; color: var(--ink);
	transition: gap var(--t-hover) ease, color var(--t-hover) ease;
}
.btn--link:hover { background: transparent; color: var(--accent); gap: 18px; }
.btn-row { display: flex; flex-wrap: wrap; gap: 12px; }
@media (max-width: 900px) { .btn-row--stack { flex-direction: column; align-items: stretch; } }

/* ------------------------------------------------------- En-tête de section */
.section-head { display: flex; flex-direction: column; gap: 14px; }
.section-head--center { align-items: center; text-align: center; }
.section-head--row { flex-direction: row; justify-content: space-between; align-items: flex-end; gap: 24px; flex-wrap: wrap; }

/* ------------------------------------------------------------- Formulaires */
.form { display: flex; flex-direction: column; gap: 28px; font-family: var(--font-ui); }
.form__row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
@media (max-width: 600px) { .form__row { grid-template-columns: minmax(0, 1fr); gap: 28px; } }
.field { display: flex; flex-direction: column; gap: 8px; }
.field__label { font-size: 12px; font-weight: 500; letter-spacing: .14em; text-transform: uppercase; color: var(--ink); }
.field__label .req { color: var(--accent); }
.field__input {
	width: 100%; height: 52px; padding: 0 16px;
	border: 1px solid var(--line); border-radius: 0;
	background: var(--bg); color: var(--ink);
	font-family: var(--font-body); font-size: 20px;
	transition: border-color var(--t-hover) ease;
	-webkit-appearance: none; appearance: none;
}
select.field__input {
	padding-right: 44px;
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8' fill='none' stroke='%23463E37' stroke-width='1.3'%3E%3Cpath d='M1 1l5 5 5-5'/%3E%3C/svg%3E");
	background-repeat: no-repeat; background-position: right 16px center;
}
textarea.field__input { height: auto; min-height: 150px; padding: 14px 16px; resize: vertical; line-height: 1.5; }
.field__input::placeholder { color: var(--ink-soft); opacity: .7; }
.field__input:focus { border-color: var(--ink); outline: 2px solid var(--ink); outline-offset: 2px; }
.field__input:disabled { background: var(--bg-alt); color: var(--ink-soft); }
.field__input[aria-invalid="true"] { border: 2px solid var(--error); }
.field__error { display: flex; align-items: center; gap: 8px; font-size: 12px; color: var(--error); }
.field__error[hidden] { display: none; }
.field__hint { font-size: 11px; color: var(--ink-soft); }

.check { display: flex; gap: 12px; align-items: flex-start; font-size: 13px; line-height: 1.6; color: var(--ink-soft); cursor: pointer; }
.check input { flex: none; width: 20px; height: 20px; margin: 2px 0 0; accent-color: var(--ink); }
.check a { color: var(--ink); }
.checks { display: flex; flex-wrap: wrap; gap: 12px 28px; border: 0; padding: 0; margin: 0; }
.checks legend { padding: 0; margin-bottom: 12px; }

.form-message { display: flex; gap: 12px; align-items: center; padding: 16px 20px; font-size: 13px; line-height: 1.5; }
.form-message svg { flex: none; }
.form-message--success { background: var(--bg-alt); color: var(--ink); }
.form-message--error { background: var(--error-bg); color: #8A2016; }
.form-message[hidden] { display: none; }

/* --------------------------------------------------------- Carte reportage */
.card-reportage { display: flex; flex-direction: column; gap: 16px; text-decoration: none; color: var(--ink); }
.card-reportage__media { position: relative; overflow: hidden; aspect-ratio: 2 / 3; background: var(--ph); }
.card-reportage__media img, .card-reportage__media .ph { width: 100%; height: 100%; object-fit: cover; transition: transform 1.2s var(--ease); }
.card-reportage__overlay {
	position: absolute; inset: 0; display: flex; align-items: flex-end; padding: 24px;
	background: linear-gradient(to top, rgba(20, 16, 13, .55), rgba(20, 16, 13, 0) 55%);
	color: var(--on-dark); opacity: 0; transition: opacity var(--t-hover) ease;
}
.card-reportage__overlay span { font-family: var(--font-script); font-size: 30px; line-height: 1; }
.card-reportage:hover .card-reportage__media img,
.card-reportage:focus-visible .card-reportage__media img { transform: scale(1.04); }
.card-reportage:hover .card-reportage__overlay,
.card-reportage:focus-visible .card-reportage__overlay { opacity: 1; }
.card-reportage:hover .card-reportage__title { color: var(--accent); }
.card-reportage__body { display: flex; flex-direction: column; gap: 6px; }
.card-reportage__cat { font-family: var(--font-ui); font-size: 11px; letter-spacing: .2em; text-transform: uppercase; color: var(--accent); }
.card-reportage__title { font-family: var(--font-display); font-size: 24px; line-height: 1.2; color: var(--ink); transition: color var(--t-hover) ease; }
.card-reportage__resume { font-family: var(--font-body); font-size: 18px; line-height: 1.45; color: var(--ink-soft); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.card-reportage__meta { font-family: var(--font-ui); font-size: 11px; letter-spacing: .06em; color: var(--accent); }
@media (max-width: 600px) { .card-reportage__resume { -webkit-line-clamp: 3; } }

/* ------------------------------------------------------- Carte témoignage */
.card-temoignage { margin: 0; padding: 32px; background: var(--bg-alt); display: flex; flex-direction: column; gap: 20px; }
.card-temoignage > svg { color: var(--accent); }
.card-temoignage blockquote { margin: 0; font-style: italic; font-size: 21px; line-height: 1.55; color: var(--ink); }
.card-temoignage figcaption { display: flex; align-items: center; gap: 14px; font-family: var(--font-ui); }
.avatar { flex: none; width: 56px; height: 56px; border-radius: 50%; overflow: hidden; background: var(--ph); }
.avatar img { width: 100%; height: 100%; object-fit: cover; }
.who { display: flex; flex-direction: column; gap: 2px; }
.who__name { font-size: 13px; font-weight: 500; }
.who__meta { font-size: 11px; letter-spacing: .16em; text-transform: uppercase; color: var(--ink-soft); }

/* ---------------------------------------------------------------- FAQ */
.faq { border-top: 1px solid var(--line); }
.faq__item { border-bottom: 1px solid var(--line); }
.faq__q {
	display: flex; justify-content: space-between; align-items: center; gap: 24px;
	width: 100%; min-height: 64px; padding: 0; border: 0; background: transparent;
	color: var(--ink); font-family: var(--font-display); font-size: 20px; line-height: 1.3; text-align: left;
	transition: color var(--t-hover) ease;
}
.faq__q svg { flex: none; }
.faq__q { transition: color var(--t-hover) ease; }
.faq__q[aria-expanded="true"] { color: var(--accent); }
/* Icône + / − : les deux superposées, fondu et quart de tour à l'ouverture. */
.faq__icone { display: grid; flex: none; }
.faq__icone svg { grid-area: 1 / 1; transition: opacity .25s ease, transform .35s var(--ease); }
.faq__q .i-minus { opacity: 0; transform: rotate(-90deg); }
.faq__q[aria-expanded="true"] .i-plus { opacity: 0; transform: rotate(90deg); }
.faq__q[aria-expanded="true"] .i-minus { opacity: 1; transform: none; }
.faq__a { padding-bottom: 20px; font-size: 20px; line-height: 1.6; color: var(--ink-soft); }
.faq__a[hidden] { display: none; }

/* ------------------------------------------------------------ Fil d'Ariane */
.breadcrumb { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; font-family: var(--font-ui); font-size: 12px; letter-spacing: .12em; text-transform: uppercase; color: var(--ink-soft); }
.breadcrumb a { color: var(--ink-soft); text-decoration: none; }
.breadcrumb a:hover { color: var(--accent); }
.breadcrumb [aria-current="page"] { color: var(--ink); }

/* -------------------------------------------------------------- Pagination */
.pagination { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; font-family: var(--font-ui); font-size: 13px; }
.pagination a, .pagination span {
	display: flex; align-items: center; justify-content: center;
	width: 48px; height: 48px; border: 1px solid var(--line); text-decoration: none; color: var(--ink);
}
.pagination [aria-current="page"], .pagination .current { background: var(--ink); border-color: var(--ink); color: var(--bg); }
.pagination a:hover { border-color: var(--ink); color: var(--ink); }

.nav-reportage { display: flex; justify-content: space-between; gap: 24px; border-top: 1px solid var(--line); padding-top: 20px; font-family: var(--font-ui); }
.nav-reportage a { display: flex; flex-direction: column; gap: 4px; text-decoration: none; }
.nav-reportage a:last-child { text-align: right; margin-left: auto; }
.nav-reportage small { font-size: 11px; letter-spacing: .2em; text-transform: uppercase; color: var(--ink-soft); }
.nav-reportage strong { font-family: var(--font-display); font-weight: 400; font-size: 20px; }

/* ---------------------------------------------------------------- Lightbox */
.lightbox {
	position: fixed; inset: 0; z-index: 2147483000; /* au-dessus des widgets d’extensions (Ally, cookies) */
	display: flex; align-items: center; justify-content: center;
	padding: 80px 96px;
	background: #141210; color: #FAF6EF; font-family: var(--font-ui);
	box-shadow: var(--shadow-float);
}
.lightbox[hidden] { display: none; }
.lightbox__stage { position: absolute; inset: 80px 96px; overflow: hidden; touch-action: pan-y; user-select: none; }
/* Une photo = calque plein cadre, image centrée à sa taille (transitions : assets/js/lightbox.js). */
.lightbox__page { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; margin: 0; will-change: transform, opacity; }
.lightbox__img { display: block; width: auto; height: auto; max-width: 100%; max-height: 100%; object-fit: contain; background: transparent; -webkit-user-drag: none; }
/* Boutons sans cadre : pastille discrète, plus marquée au survol et au focus. */
.lightbox__btn {
	position: absolute; display: flex; align-items: center; justify-content: center;
	width: 48px; height: 48px; border: 0; border-radius: 50%; background: rgba(250, 246, 239, .08); color: #FAF6EF;
	transition: background-color var(--t-hover) ease;
}
.lightbox__btn:hover { background: rgba(250, 246, 239, .2); }
.lightbox__btn:focus-visible { outline: 2px solid #FAF6EF; outline-offset: 3px; }
.lightbox__btn[hidden] { display: none; }
.lightbox__close { top: 20px; right: 20px; }
.lightbox__prev { left: 24px; top: 50%; transform: translateY(-50%); }
.lightbox__next { right: 24px; top: 50%; transform: translateY(-50%); }
.lightbox__count { position: absolute; bottom: 20px; left: 0; right: 0; text-align: center; font-size: 12px; letter-spacing: .2em; color: #E9E1D5; }
@media (max-width: 600px) {
	.lightbox { padding: 72px 12px; }
	.lightbox__stage { inset: 72px 12px 72px; }
	.lightbox__prev, .lightbox__next { top: auto; bottom: 8px; transform: none; }
	.lightbox__prev { left: 12px; }
	.lightbox__next { right: 12px; }
}

/* --------------------------------------- Bandeau d'appel à l'action sombre */
.cta-band { padding: clamp(80px, 9vw, 128px) var(--gutter); background: var(--dark); color: var(--on-dark); }
.cta-band__inner { max-width: var(--wide); margin: 0 auto; display: flex; justify-content: space-between; align-items: flex-end; gap: 32px; }
.cta-band__text { display: flex; flex-direction: column; gap: 10px; }
.cta-band__script { font-family: var(--font-script); font-size: clamp(32px, 3vw, 44px); line-height: 1; }
.cta-band__title { font-family: var(--font-display); font-weight: 400; font-size: clamp(32px, 3.6vw, 52px); line-height: 1.05; color: var(--on-dark); }
.cta-band__actions { display: flex; flex-wrap: wrap; gap: 12px; }
.cta-band .btn { min-height: 56px; }
@media (max-width: 900px) {
	.cta-band__inner { flex-direction: column; align-items: stretch; }
	.cta-band__actions { flex-direction: column; }
}

/* reCAPTCHA v3 : badge flottant masqué (y compris celui des formulaires
   Elementor) ; la mention Google est affichée sous le bouton d'envoi. */

/* Carrousels : on attrape la piste à la souris pour la faire glisser. */
@media (hover: hover) and (pointer: fine) {
	[data-carousel-track] { cursor: grab; }
	[data-carousel-track].is-dragging { cursor: grabbing; }
}
[data-carousel-track].is-dragging { scroll-snap-type: none !important; scroll-behavior: auto !important; user-select: none; }
[data-carousel-track].is-dragging a, [data-carousel-track].is-dragging img { pointer-events: none; }

/* « À découvrir aussi » (template-parts/sections/decouvrir.php) */
.decouvrir { padding: var(--section) var(--gutter); }
.decouvrir__inner { max-width: var(--wide); margin: 0 auto; display: flex; flex-direction: column; gap: 40px; }
.decouvrir__head { display: flex; flex-direction: column; gap: 10px; }
.decouvrir__list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(24px, 3vw, 40px); }
.decouvrir__card { display: flex; flex-direction: column; gap: 20px; color: var(--ink); text-decoration: none; }
.decouvrir__media { display: block; overflow: hidden; }
.decouvrir__media .b-img, .decouvrir__media .ph { width: 100%; aspect-ratio: 3 / 2; object-fit: cover; transition: transform 1.2s var(--ease); }
.decouvrir__card:hover .b-img, .decouvrir__card:focus-visible .b-img { transform: scale(1.03); }
.decouvrir__body { display: flex; flex-direction: column; gap: 10px; }
.decouvrir__titre { font-family: var(--font-display); font-size: clamp(24px, 2.2vw, 32px); line-height: 1.15; }
.decouvrir__texte { font-size: 19px; line-height: 1.55; color: var(--ink-soft); }
.decouvrir__plus { display: inline-flex; align-items: center; gap: 10px; font-family: var(--font-ui); font-size: var(--fs-ui); font-weight: 500; letter-spacing: .18em; text-transform: uppercase; }
@media (max-width: 700px) { .decouvrir__list { grid-template-columns: 1fr; } }
