/* ============================================================
   CARTE CADEAU ACTIVE ROOM : l'objet (voir /assets/js/carte.js)
   Une carte au format bancaire (85,6 × 54 mm, ratio 1,586) en couches :
   fond · motif du thème · cadeau en néon · foil (là où le motif est
   imprimé) · reflet · grain · liseré · texte.
   Toutes les tailles suivent la largeur de la carte (unités cqi) :
   la même carte sert en 240 px (popup mobile) comme en 560 px (page).
   Seuls transform et opacity bougent.
   Thèmes : classique · noel · saint-valentin · fete
   ============================================================ */

.gcard {
  --gc-a: #f02ed9;            /* couleur du cadeau en néon */
  --gc-b: #22d7f5;            /* couleur secondaire (halo, motif) */
  --gc-deep: #120a31;         /* encre du fond */
  --gc-mid: #2a1463;
  --gc-r: 4.2cqi;
  position: relative; isolation: isolate;
  width: 100%; aspect-ratio: 1.586;
  container-type: inline-size;
  perspective: 1100px;
  color: #f5f3ff;
  font-family: var(--font-body, 'Space Grotesk', system-ui, sans-serif);
  -webkit-tap-highlight-color: transparent;
  user-select: none; -webkit-user-select: none;
}
.gcard[data-theme="noel"]           { --gc-a: #6fd6ff; --gc-b: #c4f1ff; --gc-deep: #070c33; --gc-mid: #163a78; --gc-tube: 1.05; --gc-tube-mix: 78%; }
.gcard[data-theme="saint-valentin"] { --gc-a: #ff5fa8; --gc-b: #f02ed9; --gc-deep: #1c0730; --gc-mid: #5a1260; }
.gcard[data-theme="fete"]           { --gc-a: #c5e832; --gc-b: #22d7f5; --gc-deep: #0b0c30; --gc-mid: #123c63; --gc-tube: 1.05; --gc-tube-mix: 72%; }

.gcard-shadow {
  position: absolute; z-index: -1; left: 8%; right: 8%; top: 22%; bottom: -9%;
  border-radius: 50%;
  background: radial-gradient(closest-side, color-mix(in srgb, var(--gc-a) 42%, rgba(0, 0, 0, 0.85)), transparent);
  filter: blur(22px); opacity: 0.7;
  pointer-events: none;
}
.gcard-tilt {
  position: absolute; inset: 0;
  transform-style: preserve-3d;
  will-change: transform;
}
.gcard-face {
  position: absolute; inset: 0; overflow: hidden;
  border-radius: var(--gc-r);
  background: var(--gc-deep);
}
.gcard-face > * { position: absolute; inset: 0; border-radius: inherit; pointer-events: none; }

.gcard-bg {
  background:
    radial-gradient(105% 95% at 92% 6%, var(--gc-mid), transparent 62%),
    radial-gradient(80% 85% at 0% 100%, color-mix(in srgb, var(--gc-a) 20%, transparent), transparent 70%),
    linear-gradient(160deg, var(--gc-deep), #07041a);
}
/* Motif : dense à droite, il s'efface sous le texte (à gauche et en bas) */
.gcard-pat {
  background: var(--gc-pat) center / cover no-repeat;
  -webkit-mask: linear-gradient(100deg, rgba(0, 0, 0, 0.14) 0%, rgba(0, 0, 0, 0.42) 40%, #000 72%);
  mask: linear-gradient(100deg, rgba(0, 0, 0, 0.14) 0%, rgba(0, 0, 0, 0.42) 40%, #000 72%);
}
/* Foil : un dégradé nacré, déplacé par l'inclinaison, visible à travers le motif */
.gcard-foil {
  overflow: hidden;
  -webkit-mask: var(--gc-pat) center / cover no-repeat;
  mask: var(--gc-pat) center / cover no-repeat;
  mix-blend-mode: color-dodge;
  opacity: 0.5;
}
.gcard-foil i {
  position: absolute; inset: -60%;
  background:
    repeating-linear-gradient(115deg,
      rgba(255, 255, 255, 0) 0%, #ffc7f1 2.5%, #fdfbff 4%, #b9efff 5.5%, rgba(255, 255, 255, 0) 8%,
      rgba(255, 255, 255, 0) 10%, #e9ffa6 12%, #fdfbff 13%, rgba(255, 255, 255, 0) 15.5%),
    rgba(200, 205, 230, 0.5);
  will-change: transform;
}

/* ---------- Le cadeau : l'icône du site en tube néon (halo coloré + cœur blanc) ---------- */
.gcard-gift {
  right: auto; bottom: auto; overflow: visible; border-radius: 0 !important;
  left: 77%; top: 47%; width: 36cqi; height: 36cqi; margin: -18cqi 0 0 -18cqi;
  filter: drop-shadow(0 0 1.6cqi var(--gc-a)) drop-shadow(0 0 5cqi color-mix(in srgb, var(--gc-a) 60%, transparent));
  will-change: transform;
}
.gcard-gift svg { display: block; width: 100%; height: 100%; overflow: visible; }
/* en classes (pas d'attribut style) : compatible avec la CSP stricte de /admin/ */
.gci-glow, .gci-core { fill: none; stroke-linecap: round; stroke-linejoin: round; }
/* Le tube : une couleur claire (vert lime, bleu glacé) se confond avec le cœur blanc et
   paraît plus épaisse qu'un magenta de même largeur. Ces thèmes ont donc un tube plus
   fin (--gc-tube) et un peu assombri (--gc-tube-mix) pour garder le même poids à l'œil. */
.gci-glow { stroke: color-mix(in srgb, var(--gc-a) var(--gc-tube-mix, 100%), #0b0626); stroke-width: var(--gc-tube, 1.5); }
.gci-core { stroke: #fff; stroke-width: 0.55; opacity: 0.95; }

.gcard-glare {
  inset: -45% !important; border-radius: 0 !important;
  background: radial-gradient(closest-side, rgba(255, 255, 255, 0.55), rgba(255, 255, 255, 0.1) 45%, transparent 70%);
  mix-blend-mode: overlay; opacity: 0.3;
  will-change: transform;
}
.gcard-grain {
  opacity: 0.16; mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='160' height='160' filter='url(%23n)'/%3E%3C/svg%3E");
}
.gcard-edge {
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.16),
    inset 0 1.5px 0 rgba(255, 255, 255, 0.3),
    inset 0 -2px 0 rgba(0, 0, 0, 0.45),
    inset 0 0 40px rgba(0, 0, 0, 0.3);
}

/* ---------- Texte ---------- */
.gcard-body {
  display: grid; grid-template-rows: auto 1fr auto;
  padding: 4.6cqi 5.4cqi 4.8cqi;
}
.gcard-logo {
  width: 21cqi; height: auto; aspect-ratio: 640 / 576;
  margin: -1.2cqi 0 0 -1.4cqi;
  filter: drop-shadow(0 0.6cqi 1.6cqi rgba(4, 2, 16, 0.7));
}
.gcard-copy { align-self: end; display: grid; gap: 1.5cqi; max-width: 64%; }
.gcard-edition {
  justify-self: start;
  font-family: var(--font-display, 'Exo 2', sans-serif); font-style: italic; font-weight: 800;
  text-transform: uppercase; letter-spacing: 0.2em; line-height: 1;
  font-size: max(7.5px, 2.15cqi);
  color: var(--gc-b);
  text-shadow: 0 1px 8px rgba(6, 4, 20, 0.9);
}
.gcard-title {
  font-family: var(--font-display, 'Exo 2', sans-serif); font-style: italic; font-weight: 900;
  text-transform: uppercase; letter-spacing: -0.02em; line-height: 0.88;
  font-size: max(18px, 11.4cqi);
  padding-right: 0.12em; /* l'italique déborde à droite */
  text-shadow: 0 2px 22px rgba(6, 4, 20, 0.95);
}
.gcard-title em {
  font-style: inherit; display: block;
  background: linear-gradient(92deg, #fff 10%, color-mix(in srgb, var(--gc-a) 55%, #fff));
  -webkit-background-clip: text; background-clip: text; color: transparent;
  padding-right: 0.12em; margin-right: -0.12em;
  text-shadow: none; filter: drop-shadow(0 2px 10px rgba(6, 4, 20, 0.8));
}
.gcard-note {
  font-weight: 600; letter-spacing: 0.01em; line-height: 1.25;
  font-size: max(8.5px, 2.5cqi);
  color: rgba(245, 243, 255, 0.82);
  text-shadow: 0 1px 8px rgba(6, 4, 20, 0.9);
}
