/* ============================================================
   carte-cadeau.css — Page /carte-cadeau (chargée uniquement sur cette page)
   Palette du site : écorce #5C3D2E · texte #6D523B · sauge #577A5A · sable #E8DED1 · papier #FBF6EE
   Accent propre à cette page : le bleu-vert de l'eau du bassin #7FA9AD
   ============================================================ */

.gc {
  --gc-bark: #5C3D2E; --gc-text: #6D523B; --gc-ink: #3A3028;
  --gc-sage: #577A5A; --gc-sage-soft: #EEF3EC;
  --gc-sand: #E8DED1; --gc-paper: #FBF6EE; --gc-line: #E3D6C4;
  --gc-water: #7FA9AD;
  max-width: 1120px; margin: 0 auto; padding: 0 1rem;
}

/* ── En-tête de page ─────────────────────────────────────── */
.gc-hero {
  position: relative; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 300px); gap: 1.5rem; align-items: center;
  margin: 0 0 1.6rem; padding: 2rem 2rem 1.6rem; border-radius: 18px; overflow: hidden;
  background: linear-gradient(120deg, #F3EADD 0%, #FBF6EE 62%);
  border: 1px solid var(--gc-line);
}
.gc-hero h1 {
  margin: 0 0 .7rem; font-family: 'Cormorant Garamond', serif; font-weight: 600; font-size: clamp(2rem, 4.6vw, 3.1rem);
  line-height: 1.05; color: var(--gc-bark); letter-spacing: -.01em; text-align: left;
}
.gc-lead { max-width: 52ch; margin: 0 0 1.1rem; font-size: 1.05rem; line-height: 1.7; color: var(--gc-text); text-align: left; }
.gc-trust { list-style: none; display: flex; flex-wrap: wrap; gap: .5rem 1.3rem; margin: 0; padding: 0; font-size: .9rem; color: var(--gc-ink); }
.gc-trust li { display: inline-flex; align-items: center; gap: .45rem; }
.gc-trust li::before {
  content: ""; width: 1.15rem; height: 1.15rem; border-radius: 50%; flex: none;
  background: var(--gc-sage) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M4 8.4l2.6 2.6L12 5.6' fill='none' stroke='white' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 80% no-repeat;
}
.gc-hero-art { width: 100%; height: auto; justify-self: end; pointer-events: none; overflow: visible; }

/* Ruban de cadeau sur l'angle haut gauche du cadre d'en-tête (le nœud dépasse du cadre) */
.gc-hero { padding-top: 3.3rem; padding-left: 3.5rem; overflow: visible; }
.gc-hero::before {
  content: ""; position: absolute; z-index: 1; pointer-events: none; top: 0; left: 0; width: 120px; height: 120px; border-top-left-radius: 18px;
  background: linear-gradient(135deg, transparent 0, transparent 23px, #B8934F 23px, #CDA55E 25px, #E8D3A0 33px, #F1E2B8 40px, #E1C285 47px, #CDA55E 54px, #B8934F 56px, transparent 56px);
}
.gc-hero-bow { position: absolute; z-index: 2; top: -22px; left: -30px; width: 116px; height: auto; transform: rotate(-9deg); filter: drop-shadow(0 3px 3px rgba(92, 61, 46, .32)); pointer-events: none; }

.gc-banner {
  max-width: 760px; margin: 0 auto 1.4rem; padding: .8rem 1.1rem; border-radius: 10px;
  background: #F4ECE0; border: 1px solid #E0D2BE; text-align: center; font-size: .95rem;
}
.gc-banner--test { background: #FBE9E7; border-color: #E8B4AE; color: #8A2D22; font-weight: 600; }

/* ── Mise en page : étapes à gauche, carte + commande à droite ── */
.gc-layout { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 2rem; align-items: start; }

.gc-step { border: 0; border-top: 1px solid var(--gc-line); background: transparent; padding: 1.3rem 0 1.5rem; margin: 0; min-width: 0; }
.gc-step:first-child { border-top: 0; padding-top: .2rem; }
.gc-step legend {
  float: left; width: 100%; padding: 0; margin: 0 0 .9rem;
  font-family: 'Cormorant Garamond', serif; font-weight: 600; font-size: 1.55rem; line-height: 1.2; color: var(--gc-bark);
}
.gc-step legend + * { clear: both; }
.gc-step legend small { display: block; margin-top: .15rem; font-family: 'Inter', sans-serif; font-weight: 400; font-size: .85rem; color: #8a7862; }
.gc-num {
  display: inline-flex; align-items: center; justify-content: center; width: 1.8rem; height: 1.8rem; vertical-align: .15rem;
  border-radius: 50%; background: var(--gc-sage); color: #fff; font: 600 .95rem 'Inter', sans-serif; margin-right: .5rem;
}

/* Cartes à cocher (période, chambre) */
.gc-cards { display: grid; gap: .8rem; }
.gc-cards--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.gc-cards--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.gc-card { position: relative; display: block; cursor: pointer; }
.gc-card input { position: absolute; opacity: 0; inset: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; }
.gc-card-body {
  display: flex; flex-direction: column; gap: .3rem; height: 100%;
  border: 1.5px solid var(--gc-line); border-radius: 12px; padding: 1rem 1.05rem; background: #fff;
  transition: border-color .15s, background .15s, box-shadow .15s;
}
.gc-card:hover .gc-card-body { border-color: #C9B79F; }
.gc-card input:checked + .gc-card-body { border-color: var(--gc-sage); background: var(--gc-sage-soft); box-shadow: 0 0 0 3px rgba(87, 122, 90, .16); }
.gc-card input:focus-visible + .gc-card-body { outline: 3px solid var(--gc-sage); outline-offset: 2px; }
.gc-card-title { font-family: 'Cormorant Garamond', serif; font-weight: 700; font-size: 1.3rem; line-height: 1.15; color: var(--gc-bark); }
.gc-card-text { font-size: .88rem; line-height: 1.5; }
.gc-card-from { font-size: .85rem; margin-top: auto; padding-top: .35rem; color: var(--gc-sage); min-height: 1.4em; }
.gc-card-from strong { color: var(--gc-bark); }
.gc-card--small .gc-card-body { padding: .85rem .9rem; }
.gc-card--small .gc-card-title { font-size: 1.2rem; }

/* Champs */
.gc-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .9rem 1rem; margin-top: 1rem; }
.gc-row.is-off { opacity: .45; pointer-events: none; }
.gc-field { display: flex; flex-direction: column; gap: .35rem; margin-top: 1rem; font-size: .88rem; font-weight: 600; color: var(--gc-text); }
.gc-field[hidden] { display: none; }
.gc-row .gc-field { margin-top: 0; }
.gc-field input[type="text"], .gc-field input[type="email"], .gc-field textarea {
  width: 100%; border: 1px solid #D9CBB8; border-radius: 10px; padding: .7rem .8rem; font: inherit; font-weight: 400;
  background: #fff; color: var(--gc-ink);
}
.gc-field textarea { resize: vertical; min-height: 5rem; line-height: 1.5; }
.gc-field input:focus, .gc-field textarea:focus { outline: 2px solid var(--gc-sage); border-color: var(--gc-sage); }
.gc-field ::placeholder { color: #B3A491; }
.gc-count { align-self: flex-end; font-weight: 400; color: #8a7862; }
.gc-hint { font-size: .82rem; color: #8a7862; margin: .8rem 0 0; line-height: 1.5; }
.gc-check { display: flex; gap: .65rem; align-items: flex-start; margin-top: 1rem; font-size: .92rem; cursor: pointer; line-height: 1.45; }
.gc-check input { margin-top: .22rem; width: 1.1rem; height: 1.1rem; accent-color: var(--gc-sage); flex: none; }
.gc-hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* Sélecteur + / − */
.gc-stepper { display: inline-flex; align-items: stretch; width: 100%; max-width: 190px; border: 1px solid #D9CBB8; border-radius: 10px; background: #fff; overflow: hidden; }
.gc-stepper input {
  flex: 1; min-width: 0; width: 100%; border: 0; border-radius: 0; text-align: center; font: 600 1.1rem 'Inter', sans-serif;
  color: var(--gc-ink); background: transparent; padding: .55rem 0; -moz-appearance: textfield; appearance: textfield;
}
.gc-stepper input::-webkit-outer-spin-button, .gc-stepper input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.gc-stepper:focus-within { outline: 2px solid var(--gc-sage); border-color: var(--gc-sage); }
.gc-stepper input:focus { outline: none; }
.gc-step-btn { flex: none; width: 2.8rem; border: 0; background: #F7F1E8; color: var(--gc-bark); font: 500 1.4rem/1 'Inter', sans-serif; cursor: pointer; transition: background .12s; }
.gc-step-btn:hover:not(:disabled) { background: var(--gc-sand); }
.gc-step-btn:disabled { color: #C9BBA8; cursor: default; }
.gc-step-btn:focus-visible { outline: 2px solid var(--gc-sage); outline-offset: -3px; }

/* ── Colonne de droite : carte (aperçu) + commande ─────────── */
.gc-side {
  position: sticky; top: var(--gc-top, 5rem); display: flex; flex-direction: column; gap: 1.1rem;
  padding: .35rem .35rem .6rem; margin: -.35rem;
}
/* Colonne trop haute pour l'écran : on la réduit (JS) plutôt que de la faire défiler ; défilement seulement en dernier recours */
.gc-side.is-tiny { max-height: calc(100vh - var(--gc-top, 5rem) - .6rem); overflow-y: auto; scrollbar-width: thin; }

/* L'aperçu : la carte telle qu'elle sera imprimée */
.gc-preview { perspective: 900px; flex: none; }
.pv-paper {
  position: relative; overflow: hidden; padding: 1rem 1.3rem .8rem; border-radius: 10px; color: var(--gc-ink);
  background: var(--gc-paper); border: 1px solid #D8CBB8;
  box-shadow: 0 1px 0 #fff inset, 0 10px 26px -10px rgba(92, 61, 46, .35), 0 2px 5px rgba(92, 61, 46, .12);
  transform: rotate(-1.2deg); transition: transform .35s ease, border-color .3s;
}
.pv-paper::before { /* filet intérieur, comme sur un carton gravé */
  content: ""; position: absolute; inset: 6px; border-radius: 6px; border: 1px solid var(--pv-accent, #C9B79F); opacity: .7; pointer-events: none; transition: border-color .3s;
}
.pv-paper::after { /* bandeau de couleur selon la période */
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 6px; background: var(--pv-accent, #D9CBB8); transition: background .3s;
}
.gc-preview { --pv-accent: #C9B79F; }
.gc-preview[data-formula="all"] { --pv-accent: var(--gc-sage); }
.gc-preview[data-formula="off"] { --pv-accent: #8A6E53; }
.gc-preview:hover .pv-paper { transform: rotate(0deg); }
.pv-wist { overflow: visible; position: absolute; top: 6px; right: 10px; width: 38%; height: auto; pointer-events: none; }
.pv-brand { position: relative; margin: 0; font: 600 .78rem 'Inter', sans-serif; letter-spacing: .04em; color: var(--pv-accent); transition: color .3s; }
.pv-title { position: relative; margin: .1rem 0 .55rem; font-family: 'Cormorant Garamond', serif; font-weight: 600; font-style: italic; font-size: 2rem; line-height: 1; color: var(--gc-bark); }
.pv-to { position: relative; max-width: 64%; margin: 0 0 .5rem; font-size: .84rem; color: var(--gc-text); }
.pv-to b { font: 600 1.02rem 'Cormorant Garamond', serif; color: var(--gc-ink); overflow-wrap: anywhere; }
.pv-to b.is-empty { font-weight: 400; font-style: italic; color: #A8998A; }
.pv-items { position: relative; list-style: none; margin: 0 0 .55rem; padding: 0; font-size: .84rem; line-height: 1.45; min-height: 2.9em; }
.pv-items li { padding-left: 1rem; position: relative; }
.pv-items li::before { content: ""; position: absolute; left: .1rem; top: .55em; width: .4rem; height: .4rem; border-radius: 50%; background: var(--pv-accent); transition: background .3s; }
.pv-items li.is-empty { padding-left: 0; font-style: italic; color: #A8998A; }
.pv-items li.is-empty::before { display: none; }
.pv-msg { position: relative; margin: 0 0 .5rem; font: italic 1rem/1.35 'Cormorant Garamond', serif; color: var(--gc-bark); overflow-wrap: anywhere; }
.pv-msg.is-long { font-size: .9rem; line-height: 1.3; }
.pv-fromwho { position: relative; margin: 0 0 .5rem; text-align: right; font-size: .84rem; color: var(--gc-text); }
.pv-fromwho b { font: 600 1.02rem 'Cormorant Garamond', serif; color: var(--gc-ink); overflow-wrap: anywhere; }
.pv-fromwho b.is-empty { font-weight: 400; font-style: italic; color: #A8998A; }
.pv-msg:empty { display: none; }
.pv-msg:not(:empty)::before { content: "« "; } .pv-msg:not(:empty)::after { content: " »"; }
.pv-foot { position: relative; display: flex; justify-content: space-between; align-items: baseline; gap: .6rem; margin: 0; padding: .55rem 0 .35rem; border-top: 1px dashed #D3C4AE; font-size: .76rem; color: var(--gc-text); }
.pv-foot code { font: 600 .82rem 'Courier New', monospace; letter-spacing: .08em; color: var(--gc-bark); background: none; padding: 0; white-space: nowrap; }

/* Récapitulatif */
.gc-summary { background: #fff; border: 1px solid var(--gc-line); border-radius: 14px; padding: 1.1rem 1.2rem 1.2rem; box-shadow: 0 6px 20px -12px rgba(92, 61, 46, .3); flex: none; }
.gc-summary h2 { margin: 0 0 .6rem; font-family: 'Cormorant Garamond', serif; font-weight: 700; font-size: 1.45rem; color: var(--gc-bark); }
.gc-empty { margin: 0 0 .6rem; font-size: .92rem; color: #8a7862; }
.gc-lines { list-style: none; margin: 0 0 .5rem; padding: 0; }
.gc-lines li { display: flex; justify-content: space-between; gap: .8rem; padding: .4rem 0; border-bottom: 1px dashed var(--gc-line); font-size: .88rem; }
.gc-lines li strong { white-space: nowrap; color: var(--gc-ink); }
.gc-total { display: flex; justify-content: space-between; align-items: baseline; margin: .4rem 0 .1rem; font-size: 1rem; }
.gc-total strong { font-family: 'Cormorant Garamond', serif; font-weight: 700; font-size: 2.1rem; line-height: 1; color: var(--gc-bark); }
.gc-rule { margin: 0 0 .4rem; font-size: .82rem; color: var(--gc-text); min-height: 1.2em; }
.gc-check--cgv { font-size: .78rem; margin-top: .6rem; line-height: 1.4; }
.gc-error { margin: .8rem 0 0; padding: .6rem .8rem; border-radius: 8px; background: #FBE9E7; color: #8A2D22; font-size: .9rem; }
.gc-pay { width: 100%; margin-top: .9rem; padding: .9rem 1rem; font-size: 1.05rem; cursor: pointer; border: 0; }
.gc-pay:disabled { opacity: .6; cursor: wait; }
.gc-secure { margin: .7rem 0 0; font-size: .78rem; color: #8a7862; text-align: center; line-height: 1.5; }

/* Bon à savoir : questions dépliables */
.gc-notes { margin: 2.4rem auto 0; max-width: 820px; }
.gc-notes h2 { margin: 0 0 .6rem; font-family: 'Cormorant Garamond', serif; font-weight: 600; font-size: 1.7rem; color: var(--gc-bark); }
.gc-notes details { border-top: 1px solid var(--gc-line); }
.gc-notes details:last-of-type { border-bottom: 1px solid var(--gc-line); }
.gc-notes summary { display: flex; justify-content: space-between; align-items: center; gap: 1rem; padding: .95rem .2rem; cursor: pointer; list-style: none; font-weight: 600; color: var(--gc-ink); }
.gc-notes summary::-webkit-details-marker { display: none; }
.gc-notes summary::after { content: "+"; flex: none; font-size: 1.4rem; font-weight: 400; line-height: 1; color: var(--gc-sage); transition: transform .2s; }
.gc-notes details[open] summary::after { transform: rotate(45deg); }
.gc-notes summary:focus-visible { outline: 2px solid var(--gc-sage); outline-offset: 2px; border-radius: 4px; }
.gc-notes details p { margin: 0 0 1rem; padding: 0 .2rem; font-size: .93rem; line-height: 1.7; max-width: 70ch; }
.gc-contact { margin: 1.1rem .2rem 0; font-size: .93rem; }

/* Page de remerciement */
.gc-thanks { text-align: center; max-width: 560px; margin: 0 auto; padding: 3rem 1.5rem; }
.gc-thanks-ico { font-size: 3rem; margin: 0 0 .8rem; }
.gc-thanks h1 { font-family: 'Cormorant Garamond', serif; font-weight: 600; font-size: clamp(1.8rem, 4vw, 2.5rem); color: var(--gc-bark, #5C3D2E); margin: 0 0 1rem; }
.gc-thanks p { line-height: 1.7; margin: 0 0 1rem; }

@media (max-width: 980px) {
  .gc-layout { grid-template-columns: minmax(0, 1fr) 320px; gap: 1.4rem; }
}
@media (max-width: 880px) {
  /* Une seule colonne : la carte passe en haut pour qu'on la voie se dessiner */
  .gc-layout { grid-template-columns: minmax(0, 1fr); }
  .gc-side { display: contents; }
  .gc-preview { order: -1; max-width: 420px; width: 100%; margin: 0 auto .6rem; }
  .gc-steps { order: 0; }
  .gc-summary { order: 1; }
  .gc-hero { grid-template-columns: minmax(0, 1fr); padding: 2.7rem 1.2rem 1.2rem 2rem; }
  .gc-hero-bow { width: 80px; top: -12px; left: -10px; }
  .gc-hero-art { display: none; }
  .gc-hero h1, .gc-lead { position: relative; }
}
@media (max-width: 560px) {
  .gc-cards--2, .gc-cards--3, .gc-row { grid-template-columns: minmax(0, 1fr); }
  .gc-stepper { max-width: none; }
  .pv-title { font-size: 1.9rem; }
}
@media (prefers-reduced-motion: reduce) {
  .pv-paper, .pv-paper::before, .pv-paper::after, .gc-card-body { transition: none; }
}
@media print { .gc-summary, .gc-notes { display: none; } }

/* Éléments manquants au moment de payer */
.gc-missing { outline: 2px solid #C0553F; outline-offset: 5px; border-radius: 12px; background: #FFF4F0; animation: gc-nudge .5s ease 2; }
.gc-cards.gc-missing .gc-card-body { border-color: #C0553F; }
.gc-field.gc-missing > span, label.gc-missing { color: #8A2D22; }
.gc-error ul { margin: .35rem 0 0 1.1rem; padding: 0; }
.gc-error li { margin: .15rem 0; }
@keyframes gc-nudge { 0%,100% { transform: translateX(0); } 25% { transform: translateX(-5px); } 75% { transform: translateX(5px); } }
@media (prefers-reduced-motion: reduce) { .gc-missing { animation: none; } }
