/* EasyWeb Studio – Cartes Cadeaux — styles front (v1.1.0) */

:root {
	--ews-gc-accent: #c47f6a;
	--ews-gc-accent-dark: #ad6a56;
	--ews-gc-ink: #5b3a2c;
	--ews-gc-text: #5f4a41;
	--ews-gc-muted: #8f7a71;
	--ews-gc-cream: #fbf4f0;
	--ews-gc-blush: #f5e2d8;
	--ews-gc-line: #eed8cd;
	--ews-gc-white: #ffffff;
	--ews-gc-radius: 18px;
	--ews-gc-shadow: 0 1px 2px rgba(91, 58, 44, .04), 0 12px 32px rgba(91, 58, 44, .07);
	--ews-gc-font-title: "Cormorant Garamond", Georgia, serif;
	--ews-gc-font-ui: "DM Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
}

/* ---------- Bouton d'en-tête (shortcode [ews_gift_card_button]) ---------- */
.ews-gc-header-btn {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	padding: 8px 16px;
	border: 1px solid var(--ews-gc-accent);
	border-radius: 999px;
	color: var(--ews-gc-accent) !important;
	background: transparent;
	font-family: var(--ews-gc-font-ui);
	font-size: 14px;
	font-weight: 500;
	line-height: 1.2;
	text-decoration: none !important;
	white-space: nowrap;
	transition: background-color .2s ease, color .2s ease;
}
.ews-gc-header-btn:hover,
.ews-gc-header-btn:focus-visible {
	background: var(--ews-gc-accent);
	color: var(--ews-gc-white) !important;
}
.ews-gc-header-btn__icon { font-size: 1.05em; line-height: 1; }

/* ---------- Page Carte cadeau ---------- */
.ews-gc {
	color: var(--ews-gc-text);
	font-family: var(--ews-gc-font-ui);
	max-width: 1140px;
	margin: 0 auto;
	padding: 8px 0 56px;
}
.ews-gc *, .ews-gc *::before, .ews-gc *::after { box-sizing: border-box; }
.ews-gc .ews-gc-icon { width: 20px; height: 20px; flex: 0 0 auto; }

/* En-tête */
.ews-gc__hero { text-align: center; max-width: 680px; margin: 0 auto 40px; }
.ews-gc__eyebrow {
	margin: 0 0 8px;
	color: var(--ews-gc-accent);
	font-size: 12px;
	letter-spacing: .32em;
	text-transform: uppercase;
	font-weight: 600;
}
.ews-gc__title {
	margin: 0;
	color: var(--ews-gc-ink);
	font-family: var(--ews-gc-font-title);
	font-weight: 500;
	font-size: clamp(38px, 5.5vw, 60px);
	line-height: 1.05;
	letter-spacing: -.01em;
}
.ews-gc__divider {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 14px;
	margin: 16px auto 18px;
	max-width: 280px;
	color: var(--ews-gc-accent);
	font-size: 13px;
	line-height: 1;
}
.ews-gc__divider::before,
.ews-gc__divider::after { content: ""; flex: 1 1 auto; height: 1px; background: var(--ews-gc-line); }
.ews-gc__intro { margin: 0; font-size: 16px; line-height: 1.7; color: var(--ews-gc-text); }

.ews-gc__notices { margin-bottom: 24px; }

.ews-gc__layout {
	display: grid;
	grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr);
	gap: 44px;
	align-items: start;
}

/* Formulaire */
.ews-gc__form {
	background: var(--ews-gc-white);
	border: 1px solid var(--ews-gc-line);
	border-radius: var(--ews-gc-radius);
	box-shadow: var(--ews-gc-shadow);
	padding: 36px 36px 30px;
}

.ews-gc fieldset.ews-gc__step { border: 0; margin: 0 0 30px; padding: 0; min-width: 0; background: none; }
.ews-gc legend.ews-gc__step-title { background: none; width: 100%; float: none; border: 0; }
.ews-gc__step-title {
	display: flex;
	align-items: center;
	gap: 12px;
	margin: 0 0 16px;
	padding: 0;
	color: var(--ews-gc-ink);
	font-family: var(--ews-gc-font-title);
	font-size: 26px;
	font-weight: 500;
	line-height: 1.2;
}
.ews-gc__step-num {
	display: inline-grid;
	place-items: center;
	flex: 0 0 30px;
	width: 30px;
	height: 30px;
	border-radius: 50%;
	background: var(--ews-gc-blush);
	color: var(--ews-gc-accent-dark);
	font-family: var(--ews-gc-font-ui);
	font-size: 13px;
	font-weight: 600;
}
.ews-gc__optional { font-family: var(--ews-gc-font-ui); font-size: 13px; color: var(--ews-gc-muted); font-weight: 400; }

/* Montants */
.ews-gc__amounts {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
	gap: 10px;
}
.ews-gc__amount { position: relative; margin: 0; cursor: pointer; }
.ews-gc__amount input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.ews-gc__amount span {
	display: flex;
	align-items: center;
	justify-content: center;
	min-height: 56px;
	padding: 10px 8px;
	border: 1px solid var(--ews-gc-line);
	border-radius: 12px;
	background: var(--ews-gc-cream);
	color: var(--ews-gc-ink);
	font-family: var(--ews-gc-font-title);
	font-size: 22px;
	font-weight: 600;
	text-align: center;
	transition: border-color .18s ease, background-color .18s ease, color .18s ease, box-shadow .18s ease, transform .18s ease;
}
.ews-gc__amount--custom span { font-family: var(--ews-gc-font-ui); font-size: 14px; font-weight: 500; }
.ews-gc__amount:hover span { border-color: var(--ews-gc-accent); background: var(--ews-gc-white); transform: translateY(-1px); }
.ews-gc__amount input:checked + span {
	background: var(--ews-gc-accent);
	border-color: var(--ews-gc-accent);
	color: var(--ews-gc-white);
	box-shadow: 0 8px 18px rgba(196, 127, 106, .3);
	transform: translateY(-1px);
}
.ews-gc__amount input:focus-visible + span { outline: 2px solid var(--ews-gc-ink); outline-offset: 2px; }

.ews-gc__custom { margin-top: 14px; max-width: 280px; }
.ews-gc__custom[hidden] { display: none; }
.ews-gc__input-money { position: relative; }
.ews-gc__input-money .ews-gc__input { padding-right: 36px; }
.ews-gc__currency { position: absolute; right: 14px; top: 50%; transform: translateY(-50%); color: var(--ews-gc-muted); pointer-events: none; }

/* Champs */
.ews-gc__row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.ews-gc__field { margin: 0; position: relative; }
.ews-gc__label { display: block; margin: 0 0 6px; font-size: 14px; font-weight: 500; color: var(--ews-gc-text); }
.ews-gc__label abbr { color: var(--ews-gc-accent); text-decoration: none; border: 0; }
.ews-gc .ews-gc__input {
	display: block;
	width: 100%;
	min-height: 50px;
	padding: 12px 15px;
	border: 1px solid var(--ews-gc-line);
	border-radius: 12px;
	background: var(--ews-gc-white);
	color: var(--ews-gc-text);
	font-family: var(--ews-gc-font-ui);
	font-size: 16px; /* évite le zoom iOS */
	line-height: 1.4;
	box-shadow: none;
	transition: border-color .15s ease, box-shadow .15s ease, background-color .15s ease;
}
.ews-gc .ews-gc__input::placeholder { color: #b9a69d; opacity: 1; }
.ews-gc .ews-gc__input:hover { border-color: #e2c3b5; }
.ews-gc .ews-gc__input:focus {
	outline: none;
	border-color: var(--ews-gc-accent);
	box-shadow: 0 0 0 4px rgba(196, 127, 106, .14);
}
.ews-gc .ews-gc__textarea { min-height: 116px; resize: vertical; }
.ews-gc__counter { display: block; text-align: right; font-size: 12px; color: var(--ews-gc-muted); margin-top: 4px; }
.ews-gc__help { margin: 8px 0 0; font-size: 13px; color: var(--ews-gc-muted); line-height: 1.55; }

.ews-gc__hp { position: absolute !important; left: -9999px !important; width: 1px; height: 1px; overflow: hidden; }

/* Validation */
.ews-gc__submit { border-top: 1px solid var(--ews-gc-line); padding-top: 26px; }
.ews-gc .ews-gc__button,
.ews-gc button.ews-gc__button.button.alt {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 10px;
	width: 100%;
	min-height: 58px;
	padding: 14px 24px;
	border: 0;
	border-radius: 999px;
	background: var(--ews-gc-accent);
	color: var(--ews-gc-white);
	font-family: var(--ews-gc-font-ui);
	font-size: 15px;
	font-weight: 600;
	letter-spacing: .08em;
	text-transform: uppercase;
	cursor: pointer;
	box-shadow: 0 10px 22px rgba(196, 127, 106, .28);
	transition: background-color .2s ease, transform .12s ease, box-shadow .2s ease;
}
.ews-gc button.ews-gc__button.button.alt:hover,
.ews-gc .ews-gc__button:hover { background: var(--ews-gc-accent-dark); color: var(--ews-gc-white); box-shadow: 0 12px 26px rgba(173, 106, 86, .32); }
.ews-gc .ews-gc__button:active { transform: translateY(1px); }
.ews-gc .ews-gc__button:focus-visible { outline: 2px solid var(--ews-gc-ink); outline-offset: 3px; }
.ews-gc__button-amount:not(:empty)::before { content: "·"; margin-right: 10px; opacity: .7; }

.ews-gc__reassurance {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 8px 22px;
	margin: 16px 0 0;
	padding: 0;
	list-style: none;
	font-size: 13px;
	color: var(--ews-gc-muted);
}
.ews-gc__reassurance li { display: inline-flex; align-items: center; gap: 6px; margin: 0; }
.ews-gc__reassurance .ews-gc-icon { width: 17px; height: 17px; color: var(--ews-gc-accent); }

/* ---------- Aperçu de la carte ---------- */
.ews-gc__sticky { position: sticky; top: 24px; }
.ews-gc__preview-label {
	margin: 0 0 12px;
	text-align: center;
	font-size: 11px;
	letter-spacing: .3em;
	text-transform: uppercase;
	color: var(--ews-gc-muted);
}
.ews-gc-card {
	position: relative;
	overflow: hidden;
	aspect-ratio: 1.586 / 1;
	min-height: min-content; /* la carte s'agrandit si le contenu dépasse (nom long, message) */
	padding: 22px 26px 20px;
	border-radius: 22px;
	border: 1px solid rgba(255, 255, 255, .6);
	background:
		radial-gradient(circle at 88% 12%, rgba(255, 255, 255, .7) 0, rgba(255, 255, 255, 0) 42%),
		radial-gradient(circle at 6% 100%, rgba(232, 190, 172, .55) 0, rgba(232, 190, 172, 0) 45%),
		linear-gradient(135deg, #faece5 0%, #f3dbcf 55%, #ebc6b5 100%);
	color: var(--ews-gc-ink);
	box-shadow: 0 24px 48px rgba(91, 58, 44, .16), 0 2px 6px rgba(91, 58, 44, .06);
	display: flex;
	flex-direction: column;
	animation: ews-gc-rise .6s cubic-bezier(.2, .7, .2, 1) both;
}
.ews-gc-card::after {
	content: "";
	position: absolute;
	right: -60px;
	bottom: -70px;
	width: 220px;
	height: 220px;
	border-radius: 50%;
	border: 1px solid rgba(255, 255, 255, .6);
	pointer-events: none;
}
.ews-gc-card__top { position: relative; z-index: 1; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.ews-gc-card__logo { width: 58px; height: 58px; object-fit: contain; border-radius: 50%; background: rgba(255, 255, 255, .85); padding: 3px; box-shadow: 0 4px 12px rgba(91, 58, 44, .1); }
.ews-gc-card__brand { font-family: var(--ews-gc-font-title); font-size: 20px; }
.ews-gc-card__kicker { font-size: 11px; letter-spacing: .32em; text-transform: uppercase; font-weight: 600; color: var(--ews-gc-accent-dark); }
.ews-gc-card__body { position: relative; z-index: 1; margin-top: auto; }
.ews-gc-card__value-label { display: block; font-size: 10px; letter-spacing: .28em; text-transform: uppercase; color: var(--ews-gc-ink); opacity: .75; }
.ews-gc-card__amount { margin-top: 2px; font-family: var(--ews-gc-font-title); font-weight: 600; font-size: clamp(40px, 5vw, 56px); line-height: 1; transition: opacity .2s ease; }
.ews-gc-card__people { display: flex; flex-wrap: wrap; gap: 2px 16px; margin-top: 10px; font-size: 13px; }
.ews-gc-card__people strong { font-weight: 600; }
.ews-gc-card__message {
	margin: 6px 0 0;
	font-family: var(--ews-gc-font-title);
	font-style: italic;
	font-size: 17px;
	line-height: 1.3;
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
}
.ews-gc-card__message[hidden] { display: none; }
.ews-gc-card__code {
	position: relative;
	z-index: 1;
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 10px;
	margin-top: 12px;
	padding: 7px 12px;
	border: 1px dashed rgba(173, 106, 86, .55);
	border-radius: 10px;
	background: rgba(255, 255, 255, .45);
	font-family: "Courier New", monospace;
	font-size: 13px;
	letter-spacing: .14em;
	color: var(--ews-gc-ink);
}
.ews-gc-card__code-label { font-family: var(--ews-gc-font-ui); font-size: 10px; letter-spacing: .22em; text-transform: uppercase; color: var(--ews-gc-accent-dark); }

.ews-gc__how {
	margin-top: 26px;
	padding: 24px 26px;
	border-radius: var(--ews-gc-radius);
	background: var(--ews-gc-cream);
	border: 1px solid var(--ews-gc-line);
}
.ews-gc__how-title { margin: 0 0 14px; font-family: var(--ews-gc-font-title); font-size: 24px; font-weight: 500; color: var(--ews-gc-ink); }
.ews-gc__how-list { margin: 0; padding: 0; list-style: none; counter-reset: ews; }
.ews-gc__how-list li {
	position: relative;
	margin: 0 0 12px;
	padding-left: 36px;
	font-size: 14px;
	line-height: 1.55;
	counter-increment: ews;
}
.ews-gc__how-list li:last-child { margin-bottom: 0; }
.ews-gc__how-list li::before {
	content: counter(ews);
	position: absolute;
	left: 0;
	top: 0;
	width: 24px;
	height: 24px;
	border-radius: 50%;
	background: var(--ews-gc-accent);
	color: var(--ews-gc-white);
	font-size: 12px;
	font-weight: 600;
	display: grid;
	place-items: center;
}

/* Bandeau de valeurs */
.ews-gc__values {
	display: grid;
	grid-template-columns: repeat(4, minmax(0, 1fr));
	margin: 48px 0 0;
	padding: 28px 0 0;
	list-style: none;
	border-top: 1px solid var(--ews-gc-line);
}
.ews-gc__values li {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 10px;
	margin: 0;
	padding: 0 14px;
	text-align: center;
	font-size: 12px;
	line-height: 1.5;
	letter-spacing: .14em;
	text-transform: uppercase;
	color: var(--ews-gc-accent-dark);
}
.ews-gc__values li + li { border-left: 1px solid var(--ews-gc-line); }
.ews-gc__values .ews-gc-icon { width: 30px; height: 30px; color: var(--ews-gc-accent); }

@keyframes ews-gc-rise {
	from { opacity: 0; transform: translateY(10px); }
	to { opacity: 1; transform: none; }
}
@media (prefers-reduced-motion: reduce) {
	.ews-gc-card { animation: none; }
	.ews-gc__amount span, .ews-gc .ews-gc__button { transition: none; }
}

/* Tablette */
@media (max-width: 960px) {
	.ews-gc__layout { grid-template-columns: 1fr; gap: 30px; }
	.ews-gc__aside { order: -1; }
	.ews-gc__sticky { position: static; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 24px; align-items: center; }
	.ews-gc__preview-label { grid-column: 1 / -1; margin-bottom: -10px; }
	.ews-gc__how { margin-top: 0; }
	.ews-gc__values { grid-template-columns: repeat(2, minmax(0, 1fr)); row-gap: 24px; }
	.ews-gc__values li:nth-child(3) { border-left: 0; }
}

/* Mobile */
@media (max-width: 640px) {
	.ews-gc { padding-bottom: 36px; }
	.ews-gc__hero { margin-bottom: 26px; }
	.ews-gc__intro { font-size: 15px; }
	.ews-gc__form { padding: 24px 18px; border-radius: 14px; }
	.ews-gc__row { grid-template-columns: 1fr; }
	.ews-gc__amounts { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
	.ews-gc__amount span { min-height: 50px; font-size: 20px; }
	.ews-gc__amount--custom { grid-column: 1 / -1; }
	.ews-gc__amount--custom span { font-size: 15px; }
	.ews-gc__custom { max-width: none; }
	.ews-gc__sticky { grid-template-columns: 1fr; }
	.ews-gc__preview-label { margin-bottom: 0; }
	.ews-gc-card { max-width: 400px; width: 100%; margin: 0 auto; padding: 18px 20px 16px; }
	.ews-gc-card__logo { width: 48px; height: 48px; }
	.ews-gc__how { display: none; }
	.ews-gc__step-title { font-size: 23px; }
	.ews-gc__values { margin-top: 34px; }
	.ews-gc__values li { padding: 0 8px; font-size: 11px; }
}

/* ---------- Panier / commande ---------- */
.ews-gc-redeem { margin: 0 0 1.2em; }
.ews-gc-redeem--cart {
	padding: 18px;
	border: 1px dashed #e2c3b5;
	border-radius: 14px;
	background: var(--ews-gc-cream);
}
.ews-gc-redeem__title { margin: 0 0 10px; font-weight: 600; color: var(--ews-gc-ink); }
.ews-gc-redeem__title::before { content: "🎁"; margin-right: 8px; }
.ews-gc-redeem__box { display: flex; flex-wrap: wrap; gap: 8px; align-items: stretch; }
.ews-gc-redeem__box[hidden] { display: none; }
.ews-gc-redeem--checkout .ews-gc-redeem__box {
	padding: 18px;
	border: 1px solid var(--ews-gc-line);
	border-radius: 12px;
	background: var(--ews-gc-cream);
	margin-bottom: 1.5em;
}
.ews-gc-redeem .ews-gc-redeem__input {
	flex: 1 1 200px;
	min-width: 0;
	text-transform: uppercase;
	letter-spacing: .08em;
	font-family: "Courier New", monospace;
	border-radius: 10px;
}
.ews-gc-redeem .ews-gc-redeem__input:focus { border-color: var(--ews-gc-accent); box-shadow: 0 0 0 3px rgba(196, 127, 106, .14); outline: none; }
.ews-gc-redeem__apply { flex: 0 0 auto; }
.ews-gc-redeem__feedback { flex: 1 0 100%; margin: 4px 0 0; font-size: 14px; }
.ews-gc-redeem__feedback:empty { display: none; }
.ews-gc-redeem__feedback.is-error { color: #b32d2e; }
.ews-gc-redeem__feedback.is-success { color: #2f7d4f; }
.ews-gc-redeem.is-loading { opacity: .6; pointer-events: none; }

.ews-gc-total-row th { font-weight: 600; }
.ews-gc-total-row__code { display: block; font-weight: 400; font-size: .85em; font-family: "Courier New", monospace; opacity: .8; }
.ews-gc-total-row__balance { display: block; margin-top: 2px; opacity: .75; }
.ews-gc-remove { margin-left: 6px; font-size: .9em; }

img.ews-gc-thumb { background: var(--ews-gc-cream); border-radius: 6px; }
