/* ============================================================
   CARTE LA GALERIE — CSS Premium
   Module lagalerie_giftcard — 30 mars 2026
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:ital,wght@0,300;0,400;0,500;1,400&family=Inter:wght@300;400;500;600&display=swap');

:root {
  --lg-gc-black: #1a1a1a;
  --lg-gc-gold: #c9a84c;
  --lg-gc-gold-light: #e8d5a3;
  --lg-gc-cream: #f8f6f1;
  --lg-gc-nude: #e8ddd3;
  --lg-gc-white: #ffffff;
  --lg-gc-gray: #999;
  --lg-gc-light: #f5f5f5;
  --lg-gc-serif: 'Cormorant Garamond', 'Playfair Display', Georgia, serif;
  --lg-gc-sans: 'Inter', -apple-system, sans-serif;
  --lg-gc-radius: 2px;
  --lg-gc-transition: .35s cubic-bezier(.4, 0, .2, 1);
}

/* ===== RESET & BASE ===== */
.lg-gc-page { max-width: 1200px; margin: 0 auto; padding: 0 20px 80px; }
.lg-gc-page * { box-sizing: border-box; }

/* Cacher le breadcrumb et header PS par défaut sur cette page */
.lg-gc-page ~ .breadcrumb,
body#module-lagalerie_giftcard-page .breadcrumb,
body#module-lagalerie_giftcard-page nav.breadcrumb { display: none !important; }
body#module-lagalerie_giftcard-balance .breadcrumb { display: none !important; }

/* ===== HERO ===== */
.lg-gc-hero {
  text-align: center;
  padding: 60px 20px 40px;
}
.lg-gc-hero-badge {
  font-size: 24px;
  color: var(--lg-gc-gold);
  margin-bottom: 16px;
  letter-spacing: .3em;
}
.lg-gc-hero-title {
  font-family: var(--lg-gc-serif);
  font-size: 42px;
  font-weight: 300;
  letter-spacing: .15em;
  text-transform: uppercase;
  color: var(--lg-gc-black);
  margin: 0 0 16px;
}
.lg-gc-hero-subtitle {
  font-family: var(--lg-gc-sans);
  font-size: 15px;
  font-weight: 300;
  font-style: italic;
  letter-spacing: .08em;
  color: var(--lg-gc-gray);
  margin: 0 0 24px;
}
.lg-gc-hero-line {
  width: 50px;
  height: 1px;
  background: var(--lg-gc-gold);
  margin: 0 auto;
}

/* ===== LAYOUT 2 COLONNES ===== */
.lg-gc-container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: start;
}
.lg-gc-form-col { padding-right: 20px; }
.lg-gc-preview-col { position: relative; }
.lg-gc-preview-sticky { position: sticky; top: 100px; }

/* ===== SECTIONS ===== */
.lg-gc-section { margin-bottom: 48px; }
.lg-gc-section-num {
  font-family: var(--lg-gc-serif);
  font-size: 12px;
  letter-spacing: .2em;
  color: var(--lg-gc-gold);
  margin-bottom: 8px;
}
.lg-gc-section-title {
  font-family: var(--lg-gc-serif);
  font-size: 22px;
  font-weight: 400;
  letter-spacing: .06em;
  color: var(--lg-gc-black);
  margin: 0 0 24px;
}

/* ===== MONTANTS ===== */
.lg-gc-amounts {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.lg-gc-amount-btn {
  font-family: var(--lg-gc-sans);
  font-size: 14px;
  font-weight: 500;
  letter-spacing: .04em;
  padding: 14px 24px;
  border: 1.5px solid #ddd;
  background: var(--lg-gc-white);
  color: var(--lg-gc-black);
  cursor: pointer;
  transition: all var(--lg-gc-transition);
  min-width: 90px;
  text-align: center;
}
.lg-gc-amount-btn:hover {
  border-color: var(--lg-gc-black);
}
.lg-gc-amount-btn.active {
  background: var(--lg-gc-black);
  color: var(--lg-gc-white);
  border-color: var(--lg-gc-black);
}
.lg-gc-amount-custom-btn {
  border-style: dashed;
}
.lg-gc-custom-amount {
  margin-top: 16px;
}
.lg-gc-custom-input-wrap {
  position: relative;
  display: flex;
  align-items: center;
}
.lg-gc-currency-label {
  position: absolute;
  right: 16px;
  font-family: var(--lg-gc-sans);
  font-size: 14px;
  color: var(--lg-gc-gray);
  pointer-events: none;
}
[dir="rtl"] .lg-gc-currency-label {
  right: auto;
  left: 16px;
}

/* ===== INPUTS ===== */
.lg-gc-input {
  font-family: var(--lg-gc-sans);
  font-size: 14px;
  width: 100%;
  padding: 14px 16px;
  border: 1.5px solid #e0e0e0;
  background: var(--lg-gc-white);
  color: var(--lg-gc-black);
  transition: border-color var(--lg-gc-transition);
  outline: none;
}
.lg-gc-input:focus {
  border-color: var(--lg-gc-black);
}
.lg-gc-input::placeholder {
  color: #bbb;
  font-style: italic;
}
.lg-gc-textarea { resize: vertical; min-height: 80px; }
.lg-gc-field { margin-bottom: 16px; }
.lg-gc-field label {
  font-family: var(--lg-gc-sans);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--lg-gc-black);
  display: block;
  margin-bottom: 8px;
}
.lg-gc-optional {
  font-weight: 300;
  text-transform: none;
  color: var(--lg-gc-gray);
  letter-spacing: 0;
}
.lg-gc-char-count {
  font-family: var(--lg-gc-sans);
  font-size: 11px;
  color: var(--lg-gc-gray);
  text-align: right;
  margin-top: 4px;
}
[dir="rtl"] .lg-gc-char-count { text-align: left; }

/* ===== DESIGNS ===== */
.lg-gc-designs {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}
.lg-gc-design-option {
  cursor: pointer;
  position: relative;
}
.lg-gc-design-option input { display: none; }
.lg-gc-design-card {
  aspect-ratio: 1.6 / 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  border: 2px solid transparent;
  transition: all var(--lg-gc-transition);
  position: relative;
  overflow: hidden;
}
.lg-gc-design-option.active .lg-gc-design-card,
.lg-gc-design-option input:checked + .lg-gc-design-card {
  border-color: var(--lg-gc-black);
}
.lg-gc-design-logo {
  font-family: var(--lg-gc-serif);
  font-size: 11px;
  letter-spacing: .25em;
  text-transform: uppercase;
  margin-bottom: 6px;
}
.lg-gc-design-label {
  font-family: var(--lg-gc-sans);
  font-size: 9px;
  letter-spacing: .1em;
  text-transform: uppercase;
  opacity: .7;
}

/* Design variations */
.lg-gc-design-noir-or {
  background: linear-gradient(135deg, #1a1a1a 0%, #2a2a2a 50%, #1a1a1a 100%);
  color: var(--lg-gc-gold);
}
.lg-gc-design-nude {
  background: linear-gradient(135deg, #e8ddd3 0%, #f0e8df 50%, #e8ddd3 100%);
  color: var(--lg-gc-black);
}
.lg-gc-design-blanc {
  background: linear-gradient(135deg, #fff 0%, #f8f8f8 50%, #fff 100%);
  color: var(--lg-gc-black);
  border: 1px solid #eee;
}

/* ===== SHIMMER ANIMATION ===== */
.lg-gc-design-shimmer,
.lg-gc-card-shimmer {
  position: absolute;
  top: 0; left: -100%; width: 50%; height: 100%;
  background: linear-gradient(90deg, transparent 0%, rgba(255,255,255,.15) 50%, transparent 100%);
  animation: lgGcShimmer 3s ease-in-out infinite;
  pointer-events: none;
}
.lg-gc-design-nude .lg-gc-design-shimmer,
.lg-gc-design-blanc .lg-gc-design-shimmer {
  background: linear-gradient(90deg, transparent 0%, rgba(201,168,76,.12) 50%, transparent 100%);
}
@keyframes lgGcShimmer {
  0% { left: -100%; }
  50%, 100% { left: 150%; }
}

/* ===== DELIVERY OPTIONS ===== */
.lg-gc-delivery-options {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 20px;
}
.lg-gc-delivery-opt { cursor: pointer; }
.lg-gc-delivery-opt input { display: none; }
.lg-gc-delivery-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  padding: 24px 16px;
  border: 1.5px solid #e0e0e0;
  transition: all var(--lg-gc-transition);
  text-align: center;
}
.lg-gc-delivery-card span {
  font-family: var(--lg-gc-sans);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: .04em;
}
.lg-gc-delivery-card svg { color: var(--lg-gc-gray); transition: color var(--lg-gc-transition); }
.lg-gc-delivery-opt.active .lg-gc-delivery-card,
.lg-gc-delivery-opt input:checked + .lg-gc-delivery-card {
  border-color: var(--lg-gc-black);
  background: var(--lg-gc-black);
  color: var(--lg-gc-white);
}
.lg-gc-delivery-opt.active .lg-gc-delivery-card svg,
.lg-gc-delivery-opt input:checked + .lg-gc-delivery-card svg {
  color: var(--lg-gc-white);
}

/* ===== SUBMIT BUTTON ===== */
.lg-gc-btn-submit {
  width: 100%;
  padding: 18px 32px;
  background: var(--lg-gc-black);
  color: var(--lg-gc-white);
  border: 2px solid var(--lg-gc-black);
  font-family: var(--lg-gc-sans);
  font-size: 14px;
  font-weight: 600;
  letter-spacing: .12em;
  text-transform: uppercase;
  cursor: pointer;
  transition: all var(--lg-gc-transition);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
}
.lg-gc-btn-submit:hover:not(:disabled) {
  background: var(--lg-gc-white);
  color: var(--lg-gc-black);
}
.lg-gc-btn-submit:disabled {
  opacity: .4;
  cursor: not-allowed;
}
.lg-gc-btn-price {
  font-weight: 300;
  font-size: 13px;
  opacity: .8;
}
.lg-gc-reassurance {
  font-family: var(--lg-gc-sans);
  font-size: 11px;
  color: var(--lg-gc-gray);
  text-align: center;
  margin-top: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}
.lg-gc-balance-link {
  display: block;
  text-align: center;
  margin-top: 16px;
  font-family: var(--lg-gc-sans);
  font-size: 12px;
  color: var(--lg-gc-gray);
  text-decoration: none;
  transition: color var(--lg-gc-transition);
}
.lg-gc-balance-link:hover { color: var(--lg-gc-black); }

/* ===== LIVE PREVIEW — CARD 3D FLIP ===== */
.lg-gc-card-scene {
  perspective: 1200px;
  width: 100%;
  max-width: 420px;
  margin: 0 auto;
}
.lg-gc-card {
  position: relative;
  width: 100%;
  aspect-ratio: 1.6 / 1;
  transform-style: preserve-3d;
  transition: transform .8s cubic-bezier(.4, 0, .2, 1);
  cursor: pointer;
}
.lg-gc-card.flipped {
  transform: rotateY(180deg);
}
.lg-gc-card-face {
  position: absolute;
  top: 0; left: 0; width: 100%; height: 100%;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  box-shadow: 0 20px 60px rgba(0,0,0,.15), 0 4px 16px rgba(0,0,0,.08);
}
.lg-gc-card-front {
  z-index: 2;
}
.lg-gc-card-back {
  transform: rotateY(180deg);
  background: var(--lg-gc-white);
  border: 1px solid #eee;
}
.lg-gc-card-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  z-index: 1;
  position: relative;
}
.lg-gc-card-badge {
  font-family: var(--lg-gc-sans);
  font-size: 9px;
  letter-spacing: .3em;
  text-transform: uppercase;
  opacity: .7;
}
.lg-gc-card-logo {
  font-family: var(--lg-gc-serif);
  font-size: 28px;
  letter-spacing: .3em;
  text-transform: uppercase;
  line-height: 1.1;
  text-align: center;
}
.lg-gc-card-amount {
  font-family: var(--lg-gc-sans);
  font-size: 22px;
  font-weight: 300;
  letter-spacing: .1em;
  margin-top: 4px;
}

/* Card back */
.lg-gc-card-back-content {
  padding: 30px;
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
}
.lg-gc-card-for {
  font-family: var(--lg-gc-sans);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: .1em;
  color: var(--lg-gc-gray);
  margin: 0 0 4px;
}
.lg-gc-card-for span {
  color: var(--lg-gc-black);
  font-weight: 500;
}
.lg-gc-card-message {
  font-family: var(--lg-gc-serif);
  font-size: 16px;
  font-style: italic;
  color: var(--lg-gc-black);
  margin: 12px 0;
  line-height: 1.5;
  max-height: 60px;
  overflow: hidden;
}
.lg-gc-card-from {
  font-family: var(--lg-gc-sans);
  font-size: 11px;
  letter-spacing: .1em;
  color: var(--lg-gc-gray);
  margin: 0;
}
.lg-gc-card-from span { color: var(--lg-gc-black); font-weight: 500; }
.lg-gc-card-divider {
  width: 30px;
  height: 1px;
  background: var(--lg-gc-gold);
  margin: 16px auto;
}
.lg-gc-card-code {
  font-family: 'Courier New', monospace;
  font-size: 11px;
  letter-spacing: .15em;
  color: var(--lg-gc-gray);
}
.lg-gc-card-footer {
  font-family: var(--lg-gc-sans);
  font-size: 9px;
  letter-spacing: .15em;
  color: #ccc;
  margin-top: 8px;
}

/* Flip button */
.lg-gc-flip-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin: 20px auto 0;
  padding: 10px 20px;
  background: none;
  border: 1px solid #e0e0e0;
  font-family: var(--lg-gc-sans);
  font-size: 11px;
  letter-spacing: .06em;
  color: var(--lg-gc-gray);
  cursor: pointer;
  transition: all var(--lg-gc-transition);
}
.lg-gc-flip-btn:hover {
  border-color: var(--lg-gc-black);
  color: var(--lg-gc-black);
}

/* ===== ENVELOPE ANIMATION ===== */
.lg-gc-envelope-overlay {
  position: fixed;
  top: 0; left: 0; width: 100%; height: 100%;
  background: rgba(0,0,0,.6);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  z-index: 99999;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity .5s ease;
}
.lg-gc-envelope-overlay.visible { opacity: 1; }

.lg-gc-envelope-scene {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 30px;
}
.lg-gc-envelope {
  width: 320px;
  height: 200px;
  position: relative;
}
.lg-gc-envelope-body {
  position: absolute;
  bottom: 0; left: 0;
  width: 100%; height: 60%;
  background: var(--lg-gc-cream);
  border-radius: 0 0 4px 4px;
  box-shadow: 0 10px 40px rgba(0,0,0,.2);
}
.lg-gc-envelope-flap {
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 50%;
  background: var(--lg-gc-cream);
  clip-path: polygon(0 0, 50% 100%, 100% 0);
  transform-origin: top center;
  transition: transform .6s cubic-bezier(.4, 0, .2, 1);
  z-index: 3;
}
.lg-gc-envelope.open .lg-gc-envelope-flap {
  transform: rotateX(180deg);
}
.lg-gc-envelope-card {
  position: absolute;
  top: 30%; left: 10%; right: 10%;
  height: 65%;
  background: var(--lg-gc-black);
  color: var(--lg-gc-gold);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  z-index: 2;
  transition: transform .6s cubic-bezier(.4, 0, .2, 1) .3s;
  box-shadow: 0 4px 20px rgba(0,0,0,.2);
}
.lg-gc-envelope.open .lg-gc-envelope-card {
  transform: translateY(-80px);
}
.lg-gc-envelope-logo {
  font-family: var(--lg-gc-serif);
  font-size: 14px;
  letter-spacing: .3em;
}
.lg-gc-envelope-text {
  font-family: var(--lg-gc-sans);
  font-size: 13px;
  font-weight: 300;
  letter-spacing: .06em;
  color: var(--lg-gc-white);
}
.lg-gc-goto-cart {
  font-family: var(--lg-gc-sans);
  font-size: 14px;
  font-weight: 500;
  letter-spacing: .08em;
  color: var(--lg-gc-white);
  text-decoration: none;
  padding: 14px 40px;
  border: 1.5px solid rgba(255,255,255,.4);
  transition: all var(--lg-gc-transition);
  opacity: 0;
  transform: translateY(20px);
}
.lg-gc-envelope-overlay.visible .lg-gc-goto-cart {
  opacity: 1;
  transform: translateY(0);
  transition-delay: 1.2s;
}
.lg-gc-goto-cart:hover {
  background: var(--lg-gc-white);
  color: var(--lg-gc-black);
  border-color: var(--lg-gc-white);
}

/* ===== CONFETTI ===== */
.lg-gc-confetti {
  position: fixed;
  top: 0; left: 0; width: 100%; height: 100%;
  pointer-events: none;
  z-index: 100000;
}
.lg-gc-confetti-piece {
  position: absolute;
  width: 8px;
  height: 8px;
  opacity: 0;
  animation: lgGcConfetti 2.5s ease-out forwards;
}
@keyframes lgGcConfetti {
  0% { opacity: 1; transform: translateY(0) rotate(0deg); }
  100% { opacity: 0; transform: translateY(100vh) rotate(720deg); }
}

/* ===== REVEAL ANIMATION ===== */
.lg-gc-reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity .7s cubic-bezier(.4, 0, .2, 1), transform .7s cubic-bezier(.4, 0, .2, 1);
}
.lg-gc-reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ===== BALANCE PAGE ===== */
.lg-gc-balance-page { max-width: 600px; margin: 0 auto; padding: 0 20px 80px; }
.lg-gc-balance-form { margin-top: 40px; }
.lg-gc-balance-input-wrap {
  display: flex;
  gap: 12px;
}
.lg-gc-balance-input {
  flex: 1;
  font-family: 'Courier New', monospace !important;
  font-size: 16px !important;
  letter-spacing: .12em;
  text-transform: uppercase;
  text-align: center;
}
.lg-gc-balance-btn {
  width: auto !important;
  min-width: 120px;
}
.lg-gc-balance-result { margin-top: 32px; }
.lg-gc-balance-card {
  border: 1px solid #eee;
  padding: 32px;
  text-align: center;
}
.lg-gc-balance-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 24px;
}
.lg-gc-balance-logo {
  font-family: var(--lg-gc-serif);
  font-size: 14px;
  letter-spacing: .25em;
  color: var(--lg-gc-black);
}
.lg-gc-balance-status {
  font-family: var(--lg-gc-sans);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .06em;
  text-transform: uppercase;
  padding: 4px 12px;
}
.lg-gc-balance-status.active {
  background: #e8f5e9;
  color: #2e7d32;
}
.lg-gc-balance-status.expired,
.lg-gc-balance-status.used {
  background: #fce4ec;
  color: #c62828;
}
.lg-gc-balance-amount {
  font-family: var(--lg-gc-serif);
  font-size: 48px;
  font-weight: 300;
  color: var(--lg-gc-black);
  margin: 16px 0 24px;
}
.lg-gc-balance-details { border-top: 1px solid #eee; padding-top: 20px; }
.lg-gc-balance-row {
  display: flex;
  justify-content: space-between;
  padding: 8px 0;
  font-family: var(--lg-gc-sans);
  font-size: 13px;
  color: var(--lg-gc-gray);
}
.lg-gc-balance-row span:last-child { color: var(--lg-gc-black); font-weight: 500; }
.lg-gc-balance-error {
  margin-top: 20px;
  text-align: center;
  font-family: var(--lg-gc-sans);
  font-size: 14px;
  color: #c62828;
  padding: 16px;
  background: #fce4ec;
}

/* ===== ADMIN LIST ===== */
.lg-gc-admin-list { margin-top: 30px; }
.lg-gc-admin-list table { width: 100%; border-collapse: collapse; }
.lg-gc-admin-list th { text-align: left; padding: 10px; border-bottom: 2px solid #333; font-size: 12px; text-transform: uppercase; }
.lg-gc-admin-list td { padding: 10px; border-bottom: 1px solid #eee; font-size: 13px; }
.lg-gc-admin-list .badge { padding: 2px 8px; border-radius: 3px; font-size: 11px; }
.lg-gc-admin-list .badge-success { background: #e8f5e9; color: #2e7d32; }
.lg-gc-admin-list .badge-warning { background: #fff3e0; color: #e65100; }

/* ===== RESPONSIVE ===== */
@media (max-width: 991px) {
  .lg-gc-container {
    grid-template-columns: 1fr;
    gap: 40px;
  }
  .lg-gc-form-col { padding-right: 0; order: 2; }
  .lg-gc-preview-col { order: 1; }
  .lg-gc-preview-sticky { position: relative; top: 0; }
  .lg-gc-hero-title { font-size: 32px; }
}

@media (max-width: 575px) {
  .lg-gc-hero { padding: 40px 10px 30px; }
  .lg-gc-hero-title { font-size: 26px; letter-spacing: .1em; }
  .lg-gc-hero-subtitle { font-size: 13px; }
  .lg-gc-amounts { gap: 8px; }
  .lg-gc-amount-btn { padding: 12px 16px; font-size: 13px; min-width: 70px; }
  .lg-gc-designs { grid-template-columns: repeat(3, 1fr); gap: 8px; }
  .lg-gc-delivery-options { grid-template-columns: 1fr 1fr; gap: 8px; }
  .lg-gc-delivery-card { padding: 16px 10px; }
  .lg-gc-card-logo { font-size: 22px; }
  .lg-gc-card-amount { font-size: 18px; }
  .lg-gc-section-title { font-size: 18px; }
  .lg-gc-envelope { width: 260px; height: 160px; }
  .lg-gc-envelope-scene { gap: 24px; padding: 0 20px; }
  .lg-gc-envelope-logo { font-size: 12px; }
  .lg-gc-envelope-text { font-size: 12px; }
  .lg-gc-goto-cart { padding: 12px 28px; font-size: 13px; }
  .lg-gc-balance-input-wrap { flex-direction: column; }
  .lg-gc-balance-btn { width: 100% !important; }
  .lg-gc-balance-amount { font-size: 36px; }
}

/* ===== RTL SUPPORT ===== */
[dir="rtl"] .lg-gc-form-col { padding-right: 0; padding-left: 20px; }
[dir="rtl"] .lg-gc-card-from,
[dir="rtl"] .lg-gc-card-for { direction: rtl; }
