/*
 * ── LES CARTES CADEAUX, À LA CHARTE DE 2016 RAFRAÎCHIE ────────────────────
 *
 * La carte vert tilleul inclinée de la maquette (maquettes/home-2026-10/v1,
 * onglet « À offrir »), le formulaire d'achat, la consultation du solde et
 * l'onglet « Mes cartes cadeaux ».
 *
 * Les jetons viennent de charte-v1.css (--gv-*), chacun avec sa valeur de
 * repli : le module reste lisible si le thème change. Tout est préfixé gvc-,
 * aucun élément nu n'est restylé hors de nos blocs. Pas de rem (le thème met
 * html à 62,5 %). Le tilleul porte toujours l'ardoise (5,6:1), jamais du
 * blanc ; le vert foncé n'écrit jamais de texte sur fond clair (2,3:1).
 */

.gvc-achat, .gvc-solde, .gvc-compte, .gvc-fiche {
	--gvc-ardoise: var(--gv-ardoise, #304559);
	--gvc-ardoise-doux: var(--gv-ardoise-doux, #5d6e7e);
	--gvc-tilleul: var(--gv-tilleul, #B6CE35);
	--gvc-tilleul-clair: var(--gv-tilleul-clair, #c3da45);
	--gvc-tilleul-fonce: var(--gv-tilleul-fonce, #9AB720);
	--gvc-tilleul-pale: var(--gv-tilleul-pale, #eef4cf);
	--gvc-gris: var(--gv-gris, #f3f4f6);
	--gvc-gris-2: var(--gv-gris-2, #e6e9ec);
	--gvc-filet: var(--gv-filet, rgba(48, 69, 89, .14));
	--gvc-bord: #7d8a97;                 /* 3,5:1 sur blanc : un champ se voit */
	--gvc-alerte: var(--gv-alerte, #b54708);
	--gvc-alerte-fond: #fdf1e8;
	--gvc-alerte-texte: #7a2e06;
	--gvc-ombre: var(--gv-ombre, 0 18px 50px -24px rgba(48, 69, 89, .38));
	--gvc-rayon: var(--gv-rayon, 14px);
	--gvc-rayon-grand: var(--gv-rayon-grand, 20px);
	--gvc-police: var(--gv-police, "Raleway", "Helvetica Neue", Arial, sans-serif);
	--gvc-vif: var(--gv-vif, 320ms cubic-bezier(.2, .8, .2, 1));
	font-family: var(--gvc-police);
	font-size: 16px;
	line-height: 1.5;
	color: var(--gvc-ardoise);
}
.gvc-achat *, .gvc-achat *::before, .gvc-achat *::after,
.gvc-solde *, .gvc-solde *::before, .gvc-solde *::after,
.gvc-compte *, .gvc-compte *::before, .gvc-compte *::after { box-sizing: border-box; }

/* ── La carte ────────────────────────────────────────────────────────────── */

.gvc-carte {
	position: relative;
	width: min(440px, 100%);
	aspect-ratio: 1.586;
	border-radius: 22px;
	background: linear-gradient(135deg, #c4dc49 0%, var(--gvc-tilleul, #B6CE35) 45%, #a3be26 100%);
	color: var(--gvc-ardoise, #304559);
	padding: 6.5% 7%;
	display: flex;
	flex-direction: column;
	justify-content: space-between;
	box-shadow: 0 40px 70px -30px rgba(48, 69, 89, .6), inset 0 1px 0 rgba(255, 255, 255, .5);
	overflow: hidden;
	isolation: isolate;
	container-type: inline-size;
	font-family: var(--gvc-police);
}
.gvc-carte--inclinee {
	transform: rotateX(var(--gvc-rx, 8deg)) rotateY(var(--gvc-ry, -14deg)) rotateZ(-2deg);
	transition: transform 500ms cubic-bezier(.2, .8, .2, 1);
}
.gvc-carte--inclinee::after {
	content: "";
	position: absolute;
	inset: 0;
	z-index: 2;
	pointer-events: none;
	background: linear-gradient(115deg, transparent 30%, rgba(255, 255, 255, .38) 48%, transparent 62%);
	transform: translateX(var(--gvc-reflet, -30%));
	transition: transform 500ms ease;
}
.gvc-carte__haut { position: relative; z-index: 1; display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.gvc-carte__haut img { display: block; width: 38%; max-width: 170px; height: auto; margin: 0; }
.gvc-carte__haut span { font-size: 11px; font-size: clamp(9px, 2.6cqi, 12px); font-weight: 700; letter-spacing: .14em; text-transform: uppercase; padding-top: 2px; white-space: nowrap; }
.gvc-carte__accroche { position: relative; z-index: 1; margin: 0; max-width: 15ch; font-size: 26px; font-size: clamp(17px, 6.6cqi, 30px); font-weight: 900; line-height: 1.08; color: inherit; }
.gvc-carte__accroche em { font-style: italic; font-weight: 400; }
.gvc-carte__pied { position: relative; z-index: 1; display: flex; justify-content: space-between; align-items: flex-end; gap: 10px; }
.gvc-carte__pour { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 14px; font-size: clamp(11px, 3.4cqi, 16px); font-weight: 700; }
.gvc-carte__pour b { font-weight: 900; }
.gvc-carte__pour b.est-exemple { font-style: italic; font-weight: 700; opacity: .6; }
.gvc-carte__montant { flex: none; font-size: 34px; font-size: clamp(19px, 8.4cqi, 40px); font-weight: 900; line-height: 1; letter-spacing: -.01em; white-space: nowrap; font-variant-numeric: tabular-nums; }
.gvc-carte__feuille { position: absolute; right: -8%; bottom: -12%; z-index: 0; width: 46%; height: auto; aspect-ratio: 1; color: rgba(48, 69, 89, .12); transform: rotate(18deg); pointer-events: none; }
.gvc-carte--mini { border-radius: 14px; box-shadow: 0 18px 30px -20px rgba(48, 69, 89, .6), inset 0 1px 0 rgba(255, 255, 255, .5); }

/* ── Le formulaire d'achat ───────────────────────────────────────────────── */

.gvc-achat { display: grid; gap: 28px; width: 100%; max-width: 1180px; margin-inline: auto; }
@media (min-width: 900px) {
	.gvc-achat { grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); gap: clamp(36px, 5vw, 72px); align-items: start; }
	.gvc-achat__formulaire { order: 1; }
	.gvc-achat__apercu { order: 2; position: sticky; top: 120px; }
}

/* L'aperçu */
.gvc-achat__apercu {
	display: grid;
	justify-items: center;
	gap: 18px;
	padding: 22px 16px 26px;
	padding: clamp(18px, 4vw, 36px) clamp(14px, 3vw, 32px) clamp(22px, 4vw, 34px);
	border-radius: var(--gvc-rayon-grand);
	background: radial-gradient(120% 90% at 30% 15%, #ffffff 0%, var(--gvc-tilleul-pale) 72%);
}
.gvc-achat__etiquette { justify-self: start; margin: 0; font-size: 12px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--gvc-ardoise-doux); }
.gvc-scene { display: grid; place-items: center; width: 100%; padding: 8px 0 4px; perspective: 1100px; }
.gvc-mot {
	position: relative;
	width: min(400px, 94%);
	padding: 16px 20px 16px 22px;
	border-left: 4px solid var(--gvc-tilleul);
	border-radius: var(--gvc-rayon);
	background: #fff;
	box-shadow: var(--gvc-ombre);
	transform: rotate(1.2deg);
}
.gvc-mot__texte { margin: 0; font-size: 16px; font-style: italic; line-height: 1.5; white-space: pre-line; overflow-wrap: anywhere; }
.gvc-mot.est-vide .gvc-mot__texte { font-size: 14px; font-style: normal; color: var(--gvc-ardoise-doux); }
.gvc-mot__signature { margin: 8px 0 0; font-size: 14px; font-weight: 700; overflow-wrap: anywhere; }
.gvc-mot__signature[hidden] { display: none; }
.gvc-achat__validite { margin: 0; max-width: 40ch; font-size: 13.5px; text-align: center; color: var(--gvc-ardoise-doux); }

/* Le formulaire */
.gvc-achat__formulaire { display: grid; gap: 28px; min-width: 0; margin: 0; container-type: inline-size; }
.gvc-groupe { display: grid; gap: 16px; min-width: 0; margin: 0; padding: 0; border: 0; }
.gvc-groupe__titre { float: none; width: auto; margin: 0 0 14px; padding: 0; border: 0; font-size: 20px; font-weight: 900; line-height: 1.2; color: var(--gvc-ardoise); }

.gvc-montants { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.gvc-pastille { position: relative; display: block; margin: 0; cursor: pointer; }
.gvc-pastille--autre { grid-column: 1 / -1; }
@container (min-width: 430px) {
	.gvc-montants { grid-template-columns: repeat(4, minmax(0, 1fr)); }
	.gvc-pastille--autre { grid-column: span 2; }
}
.gvc-pastille input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; }
.gvc-pastille span {
	display: flex;
	align-items: baseline;
	justify-content: center;
	gap: 3px;
	min-height: 52px;
	padding: 13px 12px;
	border: 2px solid var(--gvc-bord);
	border-radius: 999px;
	background: #fff;
	font-size: 18px;
	font-weight: 900;
	line-height: 1.1;
	text-align: center;
	color: var(--gvc-ardoise);
	font-variant-numeric: tabular-nums;
	transition: background var(--gvc-vif), border-color var(--gvc-vif), box-shadow var(--gvc-vif), transform var(--gvc-vif);
}
.gvc-pastille span small { font-size: 12px; font-weight: 700; }
.gvc-pastille--autre span { align-items: center; font-size: 15px; font-weight: 700; }
.gvc-pastille:hover span { border-color: var(--gvc-ardoise); transform: translateY(-1px); }
.gvc-pastille input:checked + span { background: var(--gvc-tilleul); border-color: var(--gvc-tilleul-fonce); box-shadow: 0 8px 20px -12px rgba(154, 183, 32, .9); }
.gvc-pastille input:focus-visible + span { outline: 3px solid var(--gvc-ardoise); outline-offset: 3px; }

/* Le format : numérique, ou physique quand elle sera disponible. */
.gvc-formats { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.gvc-pastille--format span { flex-direction: column; align-items: center; gap: 4px; border-radius: 18px; font-size: 16px; }
.gvc-pastille--format span small { font-size: 12.5px; font-weight: 600; line-height: 1.3; }
.gvc-pastille.est-indisponible { cursor: not-allowed; }
.gvc-pastille.est-indisponible input { cursor: not-allowed; }
.gvc-pastille.est-indisponible span { border-style: dashed; background: transparent; color: var(--gvc-ardoise-doux); }
.gvc-pastille.est-indisponible:hover span { border-color: var(--gvc-bord); transform: none; }

/* « Autre montant » : visible sans script ; avec le script, seulement quand on l'a choisi. */
.gvc-achat.est-active:not(.a-autre) .gvc-autre { display: none; }
.gvc-autre__saisie { position: relative; max-width: 240px; }
.gvc-autre__saisie .gvc-champ__saisie { padding-right: 60px; font-weight: 700; -moz-appearance: textfield; }
.gvc-autre__saisie .gvc-champ__saisie::-webkit-inner-spin-button,
.gvc-autre__saisie .gvc-champ__saisie::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }
.gvc-autre__devise { position: absolute; top: 50%; right: 18px; transform: translateY(-50%); font-weight: 700; color: var(--gvc-ardoise-doux); pointer-events: none; }

.gvc-champ { display: grid; gap: 7px; min-width: 0; }
.gvc-champ__libelle { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 10px; margin: 0; font-size: 15px; font-weight: 700; line-height: 1.35; color: var(--gvc-ardoise); }
.gvc-facultatif { font-size: 11.5px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--gvc-ardoise-doux); }
.gvc-requis { color: var(--gvc-alerte); }
.gvc-champ__saisie {
	display: block;
	width: 100%;
	min-height: 50px;
	margin: 0;
	padding: 12px 16px;
	border: 1.5px solid var(--gvc-bord);
	border-radius: 12px;
	background: #fff;
	box-shadow: none;
	font-family: var(--gvc-police);
	font-size: 16px;            /* 16 px : iOS ne zoome pas au focus */
	line-height: 1.4;
	color: var(--gvc-ardoise);
	-webkit-appearance: none;
	appearance: none;
	transition: border-color var(--gvc-vif), box-shadow var(--gvc-vif);
}
.gvc-champ__saisie::placeholder { color: #6f7d8a; opacity: 1; }
.gvc-champ__saisie:hover { border-color: var(--gvc-ardoise-doux); }
.gvc-champ__saisie:focus { outline: none; border-color: var(--gvc-ardoise); box-shadow: 0 0 0 4px rgba(182, 206, 53, .6); }
.gvc-champ__saisie[aria-invalid="true"] { border-color: var(--gvc-alerte); }
.gvc-champ__saisie--texte { min-height: 124px; resize: vertical; }
.gvc-champ__aide { margin: 0; font-size: 13.5px; line-height: 1.45; color: var(--gvc-ardoise-doux); }
.gvc-champ__aide--compteur { display: flex; justify-content: space-between; gap: 12px; }
.gvc-compteur { flex: none; font-variant-numeric: tabular-nums; }
.gvc-compteur.est-proche { font-weight: 700; color: var(--gvc-alerte); }
.gvc-champ__erreur { margin: 0; font-size: 14px; font-weight: 700; color: var(--gvc-alerte); }

.gvc-conditions { margin: 0; }
.gvc-conditions p { margin: 0; font-size: 14.5px; line-height: 1.5; }
.gvc-conditions__feuille { flex: none; width: 22px; height: 22px; margin-top: 1px; color: var(--gvc-tilleul-fonce); }

.gvc-achat__bouton { width: 100%; min-height: 56px; font-size: 15px; white-space: normal; text-align: center; }
.gvc-achat__total { font-variant-numeric: tabular-nums; white-space: nowrap; }
.gvc-achat__total::before { content: ""; display: inline-block; width: 1px; height: 1em; margin-right: 10px; vertical-align: -2px; background: currentColor; opacity: .35; }
.gvc-achat__total:empty { display: none; }
@container (min-width: 430px) {
	.gvc-achat__bouton { justify-self: start; width: auto; min-width: 300px; }
}

/* Les avis de WooCommerce (erreurs de saisie), dans nos couleurs */
.gvc-avis ul, .gvc-avis .woocommerce-error, .gvc-avis .woocommerce-message, .gvc-avis .woocommerce-info { margin: 0 0 4px; padding: 14px 18px; list-style: none; border: 0; border-left: 4px solid var(--gvc-alerte); border-radius: 12px; background: var(--gvc-alerte-fond); color: var(--gvc-alerte-texte); font-size: 15px; font-weight: 700; }
.gvc-avis .woocommerce-error::before, .gvc-avis .woocommerce-message::before, .gvc-avis .woocommerce-info::before { display: none; }
.gvc-avis .woocommerce-message, .gvc-avis .woocommerce-info { border-left-color: var(--gvc-tilleul-fonce); background: var(--gvc-tilleul-pale); color: var(--gvc-ardoise); }
.gvc-avis li { margin: 0; padding: 0; }
.gvc-avis [tabindex="-1"]:focus { outline: none; }   /* WooCommerce y porte le focus pour l'annoncer */
.gvc-avis li + li { margin-top: 6px; }

/* La fiche produit */
.gvc-fiche { clear: both; grid-column: 1 / -1; width: 100%; margin: 56px 0 64px; }   /* la fiche du thème est une grille à deux colonnes */
.gvc-fiche__renvoi { margin: 18px 0; }
.gvc-fiche__renvoi .gv-btn svg { width: 16px; height: 16px; }

/* ── La consultation du solde ────────────────────────────────────────────── */

.gvc-solde { display: grid; gap: 14px; width: 100%; max-width: 560px; }
* + .gvc-solde, .gvc-achat + p:empty + .gvc-solde { margin-top: 48px; }
.gvc-solde__titre { margin: 0; font-size: 24px; font-size: clamp(20px, 2.4vw, 26px); font-weight: 900; line-height: 1.15; color: var(--gvc-ardoise); }
.gvc-solde__formulaire { display: grid; gap: 8px; margin: 0; }
.gvc-solde__ligne { display: flex; flex-wrap: wrap; gap: 10px; }
.gvc-solde__code { flex: 999 1 200px; width: auto; font-family: ui-monospace, Menlo, Consolas, monospace; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
.gvc-solde__code::placeholder { font-weight: 400; }
.gvc-solde__bouton { flex: 1 0 auto; min-height: 50px; }
.gvc-solde__resultat:empty { display: none; }
.gvc-solde__reponse { padding: 16px 20px; border-radius: var(--gvc-rayon); }
.gvc-solde__reponse p { margin: 0; }
.gvc-solde__reponse p + p { margin-top: 4px; }
.gvc-solde__reponse--ok { background: var(--gvc-tilleul-pale); }
.gvc-solde__reponse--epuisee { background: var(--gvc-gris); }
.gvc-solde__reponse--erreur { border-left: 4px solid var(--gvc-alerte); background: var(--gvc-alerte-fond); color: var(--gvc-alerte-texte); font-weight: 700; }
.gvc-solde__chiffre { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; }
.gvc-solde__chiffre span { font-size: 12px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; }
.gvc-solde__chiffre b { font-size: 30px; font-weight: 900; line-height: 1.1; font-variant-numeric: tabular-nums; }
.gvc-solde__chiffre small { font-size: 14px; font-weight: 700; color: var(--gvc-ardoise-doux); }

/* ── Mon compte ──────────────────────────────────────────────────────────── */

.gvc-compte { display: grid; gap: 30px; container-type: inline-size; }
.gvc-compte .gv-btn { white-space: normal; text-align: center; }
.gvc-compte .gvc-compte__section { display: grid; gap: 14px; margin: 0; padding: 0; }   /* le thème donne 40 px de marge à <section> */
.gvc-compte .gvc-compte__titre { margin: 0; }   /* taille et police : celles des titres de « Mon compte » */
.gvc-compte__liste { display: grid; gap: 16px; }
.gvc-ma-carte { display: grid; gap: 18px; padding: 18px; border: 1px solid var(--gvc-filet); border-radius: var(--gvc-rayon-grand); background: #fff; box-shadow: var(--gvc-ombre); }
.gvc-ma-carte__visuel .gvc-carte { width: 100%; max-width: 280px; }
.gvc-ma-carte--epuisee .gvc-carte, .gvc-ma-carte--expiree .gvc-carte, .gvc-ma-carte--annulee .gvc-carte { filter: grayscale(.85); opacity: .7; }
.gvc-ma-carte__infos { min-width: 0; }
.gvc-ma-carte__titre { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; margin: 0 0 12px; font-size: 17px; line-height: 1.3; }
.gvc-etat { display: inline-flex; align-items: center; padding: 5px 11px; border-radius: 999px; font-size: 11.5px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; }
.gvc-etat--active { background: var(--gvc-tilleul); color: var(--gvc-ardoise); }
.gvc-etat--epuisee, .gvc-etat--versee { background: var(--gvc-gris-2); color: var(--gvc-ardoise); }
.gvc-etat--expiree, .gvc-etat--annulee { background: var(--gvc-alerte-fond); color: var(--gvc-alerte-texte); }
.gvc-ma-carte__chiffres { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 18px; margin: 0 0 12px; }
.gvc-ma-carte__chiffres div { min-width: 0; }
.gvc-ma-carte__chiffres dt { margin: 0; font-size: 11.5px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--gvc-ardoise-doux); }
.gvc-ma-carte__chiffres dd { margin: 2px 0 0; font-size: 16px; font-weight: 700; font-variant-numeric: tabular-nums; }
.gvc-code { display: inline-block; padding: 3px 8px; border-radius: 6px; background: var(--gvc-gris); font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 14px; letter-spacing: .04em; white-space: nowrap; color: var(--gvc-ardoise); }
.gvc-ma-carte__note { margin: 0 0 12px; font-size: 14px; color: var(--gvc-ardoise-doux); overflow-wrap: anywhere; }
.gvc-ma-carte__renvoi { margin: 0; }
@container (min-width: 600px) {
	.gvc-ma-carte { grid-template-columns: 220px minmax(0, 1fr); align-items: center; gap: 24px; padding: 20px 24px; }
	.gvc-ma-carte__chiffres { grid-template-columns: repeat(4, minmax(0, max-content)); gap: 12px 28px; }
}
.gvc-compte__vide { display: grid; gap: 14px; padding: 26px; border-radius: var(--gvc-rayon-grand); background: var(--gvc-tilleul-pale); }
.gvc-compte__vide p { margin: 0; }
.gvc-compte__actions { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 24px; margin: 0; }
.gvc-compte__lien { min-height: 44px; }
.gvc-compte__conditions { margin: 0; font-size: 13.5px; color: var(--gvc-ardoise-doux); }

/* ── Le panier : le solde qui restera ────────────────────────────────────── */

.gvc-reste { display: inline-block; margin-top: 2px; font-size: 13px; font-weight: 400; color: #5d6e7e; }

/* ── Mouvement réduit ────────────────────────────────────────────────────── */

@media (prefers-reduced-motion: reduce) {
	.gvc-carte--inclinee, .gvc-carte--inclinee::after,
	.gvc-pastille span, .gvc-champ__saisie { transition: none; }
	.gvc-pastille:hover span { transform: none; }
}
