/* Ocade Gift Cards : aperçu de la carte, formulaire d'achat et lignes du panier.
   Polices et couleurs de texte héritées du thème ; --ogc-accent (couleur de la carte) sert aux éléments choisis. */

/* ---------- Aperçu de la carte ---------- */
.ogc-preview { width: 440px; max-width: 100%; margin: 0 auto 1.5em; box-sizing: border-box; }
.ogc-preview-card {
	position: relative; overflow: hidden; box-sizing: border-box;
	display: flex; flex-direction: column; justify-content: space-between;
	aspect-ratio: 1.586; width: 100%; padding: 6% 7%;
	border-radius: 18px; color: var(--ogc-ink, #fff);
	background: var(--ogc-card, #1f3a5f);
	background-image:
		radial-gradient(120% 90% at 100% 0%, rgba(255, 255, 255, .22) 0%, rgba(255, 255, 255, 0) 55%),
		radial-gradient(90% 80% at 0% 100%, rgba(0, 0, 0, .28) 0%, rgba(0, 0, 0, 0) 60%);
	box-shadow: 0 18px 40px -18px rgba(0, 0, 0, .55), 0 2px 6px rgba(0, 0, 0, .12);
	transform: rotate(-2deg);
	transition: transform .3s ease;
}
.ogc-preview-card:hover { transform: rotate(0deg) translateY(-3px); }
.ogc-preview-card::after { /* reflet */
	content: ""; position: absolute; inset: -40% -10% auto auto; width: 70%; height: 120%;
	border-radius: 50%; border: 1px solid rgba(255, 255, 255, .18); pointer-events: none;
}
.ogc-preview-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 1em; }
.ogc-preview-logo { display: block; max-height: 56px; max-width: 55%; width: auto; height: auto; object-fit: contain; }
.ogc-preview-brand { font-weight: 700; font-size: 1.1em; line-height: 1.2; }
.ogc-preview-kind { font-size: .72em; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; opacity: .9; white-space: nowrap; padding-top: .3em; }
.ogc-preview-amount { font-size: clamp(2.2rem, 9vw, 3.4rem); font-weight: 800; line-height: 1; letter-spacing: -.01em; }
.ogc-preview-bottom { display: flex; justify-content: space-between; align-items: flex-end; gap: 1em; font-size: .85em; line-height: 1.35; }
.ogc-preview-people { display: flex; flex-direction: column; min-width: 0; }
.ogc-preview-people span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; opacity: .9; }
.ogc-preview-people span[hidden] { display: none; }
.ogc-preview-code { font-family: "Courier New", Courier, monospace; font-size: .85em; letter-spacing: .08em; opacity: .75; white-space: nowrap; }
.ogc-preview-perks { list-style: none; margin: 1.8em 0 0; padding: 0; display: grid; gap: .55em; }
.ogc-preview-perks li { position: relative; display: block; list-style: none; padding-left: 1.7em; margin: 0; line-height: 1.4; }
.ogc-preview-perks li::before {
	content: "" !important; display: block !important; position: absolute; left: 0; top: .15em; width: 1.1em; height: 1.1em; border-radius: 50%;
	background: var(--ogc-card, #1f3a5f) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M4 8.5l2.5 2.5L12 5.5' fill='none' stroke='%23fff' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 75% no-repeat;
}

/* ---------- Formulaire ---------- */
.ogc-fields { --ogc-accent: #1f3a5f; margin: 0 0 1.2em; }
.ogc-fields fieldset { border: 0; margin: 0 0 1.6em; padding: 0; min-width: 0; }
.ogc-fields legend { display: flex; align-items: center; gap: .55em; font-weight: 700; margin-bottom: .8em; padding: 0; }
.ogc-fields .ogc-step {
	display: inline-flex; align-items: center; justify-content: center; flex: 0 0 auto;
	width: 1.7em; height: 1.7em; border-radius: 50%; font-size: .85em; line-height: 1;
	background: var(--ogc-accent); color: #fff;
}
.ogc-fields .ogc-optional { font-weight: 400; opacity: .7; }
.ogc-fields label { display: block; }
.ogc-fields p { margin: 0 0 .8em; }
.ogc-fields input[type="text"],
.ogc-fields input[type="email"],
.ogc-fields input[type="date"],
.ogc-fields input[type="number"],
.ogc-fields textarea { width: 100%; box-sizing: border-box; border-radius: 8px; }

/* Montants : tuiles de même taille. */
.ogc-pills { display: grid; grid-template-columns: repeat(auto-fill, minmax(4.6em, 1fr)); gap: .5em; }
.ogc-pill { position: relative; display: block !important; cursor: pointer; margin: 0; }
.ogc-pill input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.ogc-pill .ogc-pill-label {
	display: flex; align-items: center; justify-content: center; min-height: 2.9em; box-sizing: border-box;
	padding: .4em .6em; border: 1.5px solid rgba(0, 0, 0, .18); border-radius: 10px; background: #fff;
	font-weight: 600; line-height: 1.15; text-align: center; transition: border-color .15s, background-color .15s, color .15s;
}
.ogc-pill:hover .ogc-pill-label { border-color: var(--ogc-accent); }
.ogc-pill input:checked + .ogc-pill-label { background: var(--ogc-accent); border-color: var(--ogc-accent); color: #fff; }
.ogc-pill input:focus-visible + .ogc-pill-label { outline: 2px solid var(--ogc-accent); outline-offset: 2px; }
.ogc-pill:has(input[data-ogc-custom-toggle]) { grid-column: span 2; }
.ogc-custom { margin-top: .9em !important; }
.ogc-input-euro { display: inline-flex; align-items: center; gap: .4em; }
.ogc-input-euro input { width: 9em !important; }

/* Mode d'envoi : deux cartes cliquables. */
.ogc-choices { display: grid; gap: .6em; }
@media (min-width: 480px) { .ogc-choices { grid-template-columns: 1fr 1fr; } }
.ogc-choice {
	position: relative; display: block !important; cursor: pointer; margin: 0; height: 100%; box-sizing: border-box;
	padding: .9em 1em .9em 2.6em; border: 1.5px solid rgba(0, 0, 0, .18); border-radius: 12px; background: #fff;
	line-height: 1.35; transition: border-color .15s, box-shadow .15s;
}
.ogc-choice:hover { border-color: var(--ogc-accent); }
.ogc-choice input { position: absolute; left: 1em; top: 1.05em; margin: 0; accent-color: var(--ogc-accent); }
.ogc-choice small { display: block; margin-top: .25em; opacity: .75; }
.ogc-choice br { display: none; }
.ogc-choice:has(input:checked) { border-color: var(--ogc-accent); box-shadow: inset 0 0 0 1px var(--ogc-accent); }

/* Personnalisation : deux colonnes sur grand écran. */
.ogc-people { display: grid; column-gap: 1em; }
@media (min-width: 480px) {
	.ogc-people { grid-template-columns: 1fr 1fr; }
	.ogc-people .ogc-wide, .ogc-people legend { grid-column: 1 / -1; }
}
.ogc-people p { margin: 0 0 .9em; }
.ogc-help { display: block; opacity: .7; margin-top: .25em; font-size: .85em; }

/* Conditions. */
.ogc-note { padding: .9em 1.1em; border-radius: 10px; background: rgba(0, 0, 0, .04); border-left: 3px solid var(--ogc-accent); }
.ogc-terms { font-size: .88em; opacity: .85; margin: 0 0 .4em !important; }
.ogc-note .ogc-terms:last-child { margin-bottom: 0 !important; }

/* Achat. */
.ogc-buy { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 1em; }
.ogc-buy .ogc-qty { margin: 0; }
.ogc-buy .ogc-qty input { width: 5em; }
.ogc-buy .ogc-submit { flex: 1 1 12em; }
.ogc-js .ogc-fields [data-ogc-hidden] { display: none; }

/* Panier. */
.ogc-row .ogc-remove { font-size: .85em; margin-left: .4em; }
.ogc-row-note { opacity: .75; }

@media (prefers-reduced-motion: reduce) {
	.ogc-preview-card, .ogc-preview-card:hover { transform: none; transition: none; }
}
