/* ============================================================
   DMCards — Thème global dark SaaS premium
   Palette : fond #070B14 / surfaces #0D1424, #111827, #1A2235
   Accent : gradient indigo→violet (#7322E6 → #A855F7)
   Typo : Inter (body) + Syne (display)
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&family=Plus+Jakarta+Sans:wght@600;700;800&display=swap');

/* ============================================================
   1. TOKENS & VARIABLES
   ============================================================ */
:root {
  /* Palette */
  --dm-bg:          #FFFFFF;
  --dm-surface:     #FFFFFF;
  --dm-surface-2:   #F5F5F7;
  --dm-surface-3:   #EFEFF2;
  --dm-border:      rgba(15, 23, 42, 0.08);
  --dm-border-2:    rgba(15, 23, 42, 0.14);

  /* Texte */
  --dm-text:        #141414;
  --dm-text-muted:  #6B7280;
  --dm-text-soft:   #4B5563;

  /* Accent */
  --dm-accent-1:    #7322E6; /* hsl(265, 80%, 58%) */
  --dm-accent-2:    #E28BF4; /* hsl(288, 92%, 76%) */
  --dm-accent-3:    #9E3CF2; /* hsl(272, 82%, 62%) */
  --dm-gradient:    linear-gradient(135deg, var(--dm-accent-1) 0%, var(--dm-accent-2) 100%);
  --dm-gradient-2:  linear-gradient(135deg, var(--dm-accent-2) 0%, var(--dm-accent-3) 100%);
  --dm-glow:        0 0 40px rgba(115, 34, 230, 0.25);

  /* Misc */
  --dm-radius:      1rem;
  --dm-radius-sm:   .6rem;
  --dm-radius-lg:   1.5rem;
  --dm-shadow:      0 8px 32px rgba(0,0,0,0.4);
  --dm-shadow-lg:   0 20px 60px rgba(0,0,0,0.5);
}

/* ============================================================
   2. RESET & BASE
   ============================================================ */
*, *::before, *::after { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: 'Plus Jakarta Sans', 'Inter', system-ui, -apple-system, sans-serif !important;
}

body.site-body {
  font-size: 16px;
  line-height: 1.65;
  background:
    radial-gradient(ellipse 120% 50% at 80% -20%, rgba(115,34,230,0.06) 0%, transparent 70%),
    radial-gradient(ellipse 80% 40% at -10% 60%, rgba(226,139,244,0.05) 0%, transparent 70%),
    var(--dm-bg);
  color: var(--dm-text);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

main { flex: 1; }

/* ============================================================
   3. NAVBAR
   ============================================================ */
.site-navbar {
  background: rgba(7,11,20,0.65);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 100px;
  position: sticky;
  top: 1rem;
  z-index: 1000;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
  margin: 1rem auto;
  padding: 0.5rem 1rem !important;
  max-width: 1140px;
}

.site-navbar .navbar-brand {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-weight: 800;
  font-size: 1.25rem;
  color: #fff;
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: .5rem;
}

.brand-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: var(--dm-gradient);
  color: #fff;
  font-size: 1rem;
  box-shadow: 0 4px 16px rgba(115,34,230,0.5);
  flex-shrink: 0;
}

.site-navbar .nav-link {
  color: var(--dm-text-soft);
  font-weight: 500;
  font-size: .92rem;
  padding: .5rem 1rem !important;
  border-radius: 100px;
  transition: all .2s cubic-bezier(0.4, 0, 0.2, 1);
  margin: 0 2px;
}
.site-navbar .nav-link:hover,
.site-navbar .nav-link.active {
  color: #fff;
  background: rgba(255, 255, 255, 0.1);
}

/* ============================================================
   4. PREMIUM BUTTONS & NAV
   ============================================================ */
.nav-link-premium {
  color: var(--dm-text-soft);
  font-weight: 500;
  font-size: .95rem;
  padding: .5rem 1.25rem !important;
  border-radius: 100px;
  transition: all .3s cubic-bezier(0.16, 1, 0.3, 1);
  text-decoration: none;
}
.nav-link-premium:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.05);
}

.btn-premium-primary {
  background: linear-gradient(135deg, #1E1B4B 0%, #312E81 100%);
  color: #E0E7FF;
  border: 1px solid rgba(99, 102, 241, 0.4);
  font-weight: 600;
  font-size: .95rem;
  transition: all .3s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 4px 14px 0 rgba(0, 0, 0, 0.39);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.btn-premium-primary:hover {
  background: linear-gradient(135deg, #312E81 0%, #4338CA 100%);
  color: #fff;
  border-color: rgba(99, 102, 241, 0.8);
  box-shadow: 0 6px 20px rgba(99, 102, 241, 0.23);
  transform: translateY(-1px);
}

.btn-premium-secondary {
  background: rgba(255, 255, 255, 0.03);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.1);
  font-weight: 500;
  font-size: .95rem;
  transition: all .3s cubic-bezier(0.16, 1, 0.3, 1);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.btn-premium-secondary:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.2);
}

.brand-text {
  font-family: 'Syne', sans-serif;
  font-weight: 800;
  font-size: 1.3rem;
  letter-spacing: -0.02em;
  color: #fff;
}

/* ============================================================
   5. BOUTONS (LEGACY)
   ============================================================ */
.btn-gradient {
  background: var(--dm-gradient);
  color: #fff;
  border: none;
  font-weight: 600;
  border-radius: var(--dm-radius-sm);
  box-shadow: 0 4px 20px rgba(115,34,230,0.4);
  transition: transform .15s ease, box-shadow .15s ease, opacity .15s;
  position: relative;
  overflow: hidden;
}
.btn-gradient::after {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(255,255,255,0);
  transition: background .15s;
}
.btn-gradient:hover {
  color: #fff;
  transform: translateY(-2px);
  box-shadow: 0 8px 32px rgba(115,34,230,0.55);
}
.btn-gradient:hover::after { background: rgba(255,255,255,0.08); }
.btn-gradient:active { transform: translateY(0); }

.btn-outline-brand {
  color: var(--dm-accent-1);
  border: 1px solid rgba(115,34,230,0.4);
  background: rgba(115,34,230,0.06);
  font-weight: 500;
  border-radius: var(--dm-radius-sm);
  transition: all .2s;
}
.btn-outline-brand:hover {
  background: rgba(115,34,230,0.14);
  color: #ffffff;
  background-color: var(--dm-accent-1);
  border-color: var(--dm-accent-1);
}

.btn-outline-light {
  border-radius: var(--dm-radius-sm);
  font-weight: 500;
  border-color: var(--dm-border-2);
  color: var(--dm-text-soft);
  transition: all .2s;
}
.btn-outline-light:hover {
  background: var(--dm-surface-2);
  border-color: var(--dm-border-2);
  color: var(--dm-text);
}

.btn-dark-dm {
  background: var(--dm-surface-3);
  border: 1px solid var(--dm-border-2);
  color: var(--dm-text);
  font-weight: 500;
  border-radius: var(--dm-radius-sm);
  transition: all .2s;
}
.btn-dark-dm:hover { background: var(--dm-surface-2); color: var(--dm-text); }

/* ============================================================
   5. CARDS / GLASSMORPHISM & CHROME
   ============================================================ */
.glass-card {
  background: var(--dm-surface);
  border: 1px solid var(--dm-border);
  border-radius: var(--dm-radius);
  box-shadow: 0 1px 2px rgba(15,23,42,0.04), 0 6px 20px -6px rgba(15,23,42,0.10);
  transition: border-color .2s ease, box-shadow .2s ease;
}
.glass-card:hover { border-color: var(--dm-border-2); }

.chrome-surface {
  background: linear-gradient(180deg, hsl(0 0% 32%) 0%, hsl(0 0% 14%) 100%);
  box-shadow:
    0 1px 0 0 hsl(0 0% 100% / 0.08) inset,
    0 -1px 0 0 hsl(0 0% 0% / 0.3) inset,
    0 2px 6px -2px hsl(0 0% 0% / 0.35);
  border: 1px solid hsl(0 0% 26%);
  border-radius: var(--dm-radius);
}

/* Section "alternée" claire, remplace l'ancien bg-black bg-opacity-25 hérité du
   thème sombre (invisible/illisible depuis le passage au thème clair). Même
   teinte que --section-alt de la landing (frontend/main.css) pour rester
   cohérent avec la page d'accueil. */
.section-alt-bg {
  background: var(--dm-surface-2);
}


/* ============================================================
   6. HERO
   ============================================================ */
.hero-section {
  padding: 7rem 0 5rem;
  position: relative;
  overflow: hidden;
}

.hero-section::before {
  content: '';
  position: absolute;
  top: -40%;
  left: 50%;
  transform: translateX(-50%);
  width: 900px;
  height: 700px;
  background: radial-gradient(ellipse, rgba(115,34,230,0.15) 0%, transparent 70%);
  pointer-events: none;
  z-index: 0;
}

.hero-section > .container { position: relative; z-index: 1; }

.hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  padding: .4rem 1rem;
  border-radius: 100px;
  background: rgba(115,34,230,0.10);
  border: 1px solid rgba(115,34,230,0.28);
  color: var(--dm-accent-1);
  font-size: .82rem;
  font-weight: 600;
  letter-spacing: .03em;
  margin-bottom: 2rem;
}

.hero-title {
  font-family: 'Syne', sans-serif;
  font-size: clamp(2.4rem, 6vw, 4.2rem);
  font-weight: 900;
  line-height: 1.08;
  letter-spacing: -0.03em;
  max-width: 850px;
  color: var(--dm-text);
}

.hero-subtitle {
  font-size: 1.15rem;
  color: var(--dm-text-soft);
  max-width: 580px;
  line-height: 1.7;
}

.text-gradient {
  background: var(--dm-gradient);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.text-gradient-2 {
  background: var(--dm-gradient-2);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* .text-gradient-icon : utilisée sur des icônes et le n° de membre, jamais
   définie nulle part -> couleur héritée imprévisible (texte invisible sur
   certains fonds). Couleur pleine (pas de background-clip) pour rester
   lisible dans tous les contextes. */
.text-gradient-icon { color: #7322E6; }

/* Cartes "statistique" (stat-card / stat-icon / stat-value / stat-label) :
   utilisées dans de nombreuses vues (clients, admin, templates, support...)
   mais jamais stylées -> texte sans couleur ni mise en forme, invisible sur
   certains fonds. */
.stat-card {
  background: var(--dm-surface, #fff);
  border: 1px solid var(--dm-border, rgba(15,23,42,0.08));
  border-radius: 14px;
  padding: 1.1rem 1.25rem;
}
.stat-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border-radius: 12px;
  font-size: 1.1rem;
  background: rgba(115,34,230,0.1);
  color: #7322E6;
  flex-shrink: 0;
}
.stat-value {
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--dm-text);
  line-height: 1.2;
}
.stat-label {
  font-size: .8rem;
  color: var(--dm-text-soft);
}

/* Hero — mockup wallet 3D */
.hero-mockup-wrapper {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem 0;
}

.hero-wallet-scene {
  perspective: 900px;
  display: inline-block;
}

.hero-wallet-card {
  width: 320px;
  border-radius: 20px;
  box-shadow:
    0 30px 80px rgba(0,0,0,0.6),
    0 0 0 1px rgba(255,255,255,0.08),
    0 0 60px rgba(115,34,230,0.25);
  transform: rotateY(-18deg) rotateX(6deg);
  animation: walletFloat 6s ease-in-out infinite;
  transform-origin: center;
  transform-style: preserve-3d;
  transition: transform .5s ease;
}

.hero-wallet-card:hover {
  transform: rotateY(-5deg) rotateX(2deg) scale(1.02);
}

@keyframes walletFloat {
  0%, 100% { transform: rotateY(-18deg) rotateX(6deg) translateY(0); }
  50%       { transform: rotateY(-15deg) rotateX(4deg) translateY(-14px); }
}

/* ============================================================
   7. SECTIONS COMMUNES
   ============================================================ */
.section-eyebrow {
  display: inline-block;
  font-size: .75rem;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--dm-accent-1);
  margin-bottom: .75rem;
}

h1, h2, h3, h4, h5, h6, .hero-title, .section-title {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-weight: 800;
  font-size: clamp(1.8rem, 4vw, 2.6rem);
  letter-spacing: -0.02em;
  line-height: 1.15;
  color: var(--dm-text);
}

/* ============================================================
   8. FEATURE CARDS
   ============================================================ */
.feature-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 52px;
  height: 52px;
  border-radius: 14px;
  background: var(--dm-gradient);
  color: #fff;
  font-size: 1.4rem;
  box-shadow: 0 6px 24px rgba(115,34,230,0.4);
  flex-shrink: 0;
}

.feature-icon-sm {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 10px;
  font-size: 1.1rem;
  flex-shrink: 0;
}

/* ============================================================
   9. STEP / HOW IT WORKS
   ============================================================ */
.step-number {
  font-family: 'Syne', sans-serif;
  font-size: 3.5rem;
  font-weight: 900;
  line-height: 1;
  background: var(--dm-gradient);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  opacity: .35;
  letter-spacing: -0.04em;
}

/* ============================================================
   10. PRICING
   ============================================================ */
.pricing-card {
  position: relative;
  transition: transform .25s ease, box-shadow .25s ease;
}
.pricing-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 24px 60px rgba(0,0,0,0.5);
}

.pricing-popular {
  border: 1px solid rgba(115,34,230,0.5) !important;
  box-shadow:
    0 0 0 1px rgba(115,34,230,0.2),
    0 20px 60px rgba(115,34,230,0.2) !important;
  /* .chrome-surface met overflow:hidden (pour ses effets de dégradé/brillance
     dans les coins arrondis) : ça rognait le badge "Le plus populaire" qui
     dépasse au-dessus de la carte (top:-14px). On ré-autorise le débordement
     uniquement sur les cartes "populaires". */
  overflow: visible !important;
}

.popular-badge {
  position: absolute;
  top: -14px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--dm-gradient);
  color: #fff;
  font-size: .7rem;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
  padding: .35rem 1.1rem;
  border-radius: 100px;
  white-space: nowrap;
  box-shadow: 0 4px 16px rgba(115,34,230,0.45);
  z-index: 20;
}

.pricing-price {
  font-family: 'Syne', sans-serif;
  font-size: 2.8rem;
  font-weight: 900;
  line-height: 1;
  color: #fff;
}

/* .pricing-per / .pricing-list vivent TOUJOURS à l'intérieur d'une carte .chrome-surface
   (fond charbon fixe, cf. plus haut) — donc texte clair, indépendant du thème de la page. */
.pricing-per {
  font-size: .85rem;
  color: rgba(255,255,255,0.55);
  font-weight: 400;
}

.pricing-check {
  color: #6EE7B7;
  flex-shrink: 0;
}

.pricing-list li {
  display: flex;
  align-items: flex-start;
  gap: .6rem;
  padding: .35rem 0;
  font-size: .9rem;
  color: rgba(255,255,255,0.7);
}

/* Ligne "Tout Essentiel, et en plus :" — séparateur sans icône entre le tronc
   commun et les fonctionnalités additionnelles d'un plan. */
.pricing-list-heading {
  padding: .6rem 0 .1rem !important;
  font-size: .78rem !important;
  font-weight: 700;
  color: rgba(255,255,255,0.55) !important;
  text-transform: uppercase;
  letter-spacing: .04em;
}

/* Fonctionnalité NON incluse dans le plan (ex: Essentiel) — grisée + barrée,
   avec une croix plutôt qu'un check, pour reproduire fidèlement la maquette. */
.pricing-item-excluded {
  color: rgba(255,255,255,0.35) !important;
  text-decoration: line-through;
}
.pricing-check-excluded {
  color: rgba(255,255,255,0.35);
  flex-shrink: 0;
}

/* Cartes tarifs (pricing-cards.ejs) : "Parfait pour…" utilise .text-secondary (Bootstrap) —
   sur le fond charbon de .chrome-surface, il faut un gris clair, pas le gris sombre par défaut. */
.pricing-card.chrome-surface .text-secondary { color: rgba(255,255,255,0.55) !important; }

/* ============================================================
   11. ACCORDION FAQ
   ============================================================ */
.glass-accordion .accordion-item {
  background: var(--dm-surface);
  border: 1px solid var(--dm-border) !important;
  margin-bottom: .6rem;
  border-radius: var(--dm-radius) !important;
  overflow: hidden;
}
.glass-accordion .accordion-button {
  background: transparent;
  color: var(--dm-text);
  font-weight: 600;
  font-size: .95rem;
  box-shadow: none !important;
  border-radius: var(--dm-radius) !important;
}
.glass-accordion .accordion-button:not(.collapsed) { color: var(--dm-accent-1); background: rgba(115,34,230,0.05); }
.glass-accordion .accordion-body { color: var(--dm-text-soft); font-size: .9rem; }

/* ============================================================
   12. CTA PANEL
   ============================================================ */
.cta-panel {
  background:
    radial-gradient(ellipse 100% 200% at 50% -30%, rgba(115,34,230,0.08) 0%, transparent 70%),
    var(--dm-surface);
  border: 1px solid rgba(115,34,230,0.18);
  border-radius: var(--dm-radius-lg);
  box-shadow: 0 0 60px rgba(115,34,230,0.06);
}

/* ============================================================
   13. FOOTER
   ============================================================ */
.site-footer {
  background: var(--dm-surface);
  border-top: 1px solid var(--dm-border);
  font-size: .88rem;
}
.footer-brand {
  font-family: 'Syne', sans-serif;
  font-size: 1.1rem;
  font-weight: 800;
  color: #fff;
}
.footer-links a {
  color: var(--dm-text-soft);
  text-decoration: none;
  transition: color .2s;
  display: inline-block;
  padding: .15rem 0;
}
.footer-links a:hover { color: #fff; }
.footer-divider { opacity: .4; }
.footer-copy { color: var(--dm-text-muted); font-size: .8rem; }

/* ============================================================
   14. FORMULAIRES
   ============================================================ */
.form-control, .form-select {
  background: var(--dm-surface);
  border: 1px solid var(--dm-border-2);
  color: var(--dm-text);
  border-radius: var(--dm-radius-sm);
  padding: .65rem 1rem;
  transition: border-color .15s, box-shadow .15s;
}
.form-control:focus, .form-select:focus {
  background: var(--dm-surface);
  border-color: var(--dm-accent-1);
  color: var(--dm-text);
  box-shadow: 0 0 0 3px rgba(115,34,230,0.18);
}
.form-control::placeholder { color: var(--dm-text-muted); }
.form-label { font-weight: 500; color: var(--dm-text-soft); font-size: .88rem; margin-bottom: .35rem; }
.input-group-text {
  background: var(--dm-surface-2);
  border: 1px solid var(--dm-border-2);
  color: var(--dm-text-soft);
}

/* ============================================================
   15. FLASH MESSAGES
   ============================================================ */
.flash-bar {
  position: fixed;
  top: 1rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: .5rem;
  align-items: center;
  pointer-events: none;
  width: max-content;
  max-width: calc(100vw - 2rem);
}

.flash-toast {
  display: flex;
  align-items: center;
  gap: .75rem;
  padding: .7rem 1.25rem;
  border-radius: 100px;
  font-size: .88rem;
  font-weight: 500;
  pointer-events: auto;
  backdrop-filter: blur(16px);
  animation: toastIn .3s ease;
  box-shadow: 0 8px 32px rgba(0,0,0,0.4);
  white-space: nowrap;
}
.flash-toast.success { background: #ECFDF5; border: 1px solid #A7F3D0; color: #047857; }
.flash-toast.error   { background: #FEF2F2; border: 1px solid #FECACA; color: #B91C1C; }
.flash-toast.info    { background: #F5F3FF; border: 1px solid #DDD6FE; color: #6D28D9; }
.flash-toast.warning { background: #FFFBEB; border: 1px solid #FDE68A; color: #B45309; }

@keyframes toastIn {
  from { opacity: 0; transform: translateY(-12px) scale(.95); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

/* ============================================================
   16. BADGES & STATUS
   ============================================================ */
.badge-status {
  display: inline-flex;
  align-items: center;
  gap: .35rem;
  padding: .25rem .7rem;
  border-radius: 100px;
  font-size: .72rem;
  font-weight: 600;
  letter-spacing: .03em;
}
.badge-status::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  flex-shrink: 0;
}
.badge-green  { background: #ECFDF5; color: #047857; border: 1px solid #A7F3D0; }
.badge-green::before  { background: #10B981; }
.badge-yellow { background: #FFFBEB; color: #B45309; border: 1px solid #FDE68A; }
.badge-yellow::before { background: #EAB308; }
.badge-gray   { background: #F3F4F6; color: #4B5563; border: 1px solid #E5E7EB; }
.badge-gray::before   { background: #64748B; }
.badge-red    { background: #FEF2F2; color: #B91C1C; border: 1px solid #FECACA; }
.badge-red::before    { background: #EF4444; }
.badge-purple { background: #F5F3FF; color: #6D28D9; border: 1px solid #DDD6FE; }
.badge-purple::before { background: #7322E6; }
/* Alias utilisés dans les vues (badge-active/badge-warning/badge-inactive) :
   jamais définis, ce qui laissait ces pastilles sans fond ni couleur de
   texte propre (texte invisible selon le fond parent). */
.badge-active   { background: #ECFDF5; color: #047857; border: 1px solid #A7F3D0; }
.badge-active::before   { background: #10B981; }
.badge-warning  { background: #FFFBEB; color: #B45309; border: 1px solid #FDE68A; }
.badge-warning::before  { background: #EAB308; }
.badge-inactive { background: #F3F4F6; color: #4B5563; border: 1px solid #E5E7EB; }
.badge-inactive::before { background: #9CA3AF; }

/* ============================================================
   17. APPLE WALLET PREVIEW — recto
   (Conforme Apple Wallet Human Interface Guidelines)
   ============================================================ */
.wallet-preview-container {
  perspective: 1200px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.wallet-card-flipper {
  width: 340px;
  position: relative;
  transition: transform .7s cubic-bezier(.4,0,.2,1);
  transform-style: preserve-3d;
}

.wallet-card-flipper.flipped { transform: rotateY(180deg); }

.wallet-card-front,
.wallet-card-back {
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  width: 100%;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 24px 60px rgba(0,0,0,0.6);
}

.wallet-card-back {
  position: absolute;
  top: 0;
  left: 0;
  transform: rotateY(180deg);
}

/* Recto */
.pass-card {
  background: var(--pass-bg, #1E293B);
  color: var(--pass-fg, #fff);
  border-radius: 16px;
  padding: 16px;
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";
  font-size: 14px;
  user-select: none;
  position: relative;
  overflow: hidden;
}

/* Formes 100% fidèles Apple Wallet (inspirées par PassSlot) */
.pass-card[data-style="EVENTTICKET"],
.pass-back[data-style="EVENTTICKET"] {
  /* PassSlot: border-radius: 0 */
  border-radius: 0 0 12px 12px; /* Gardons un léger arrondi en bas pour faire propre */
  /* PassSlot utilise un width 70px, top 0, margin-top -18px -> rayon 35px décalé de 18px vers le haut */
  mask-image: radial-gradient(circle at 50% -18px, transparent 35px, black 36px);
  -webkit-mask-image: radial-gradient(circle at 50% -18px, transparent 35px, black 36px);
}

.pass-card[data-style="BOARDINGPASS"],
.pass-back[data-style="BOARDINGPASS"] {
  /* PassSlot: encoches latérales à 55px du haut, hauteur 20px (rayon 10px) largeur 5px */
  mask-image: radial-gradient(circle at 0 60px, transparent 10px, black 11px),
              radial-gradient(circle at 100% 60px, transparent 10px, black 11px);
  mask-composite: intersect;
  -webkit-mask-image: radial-gradient(circle at 0 60px, transparent 10px, black 11px),
                      radial-gradient(circle at 100% 60px, transparent 10px, black 11px);
  -webkit-mask-composite: destination-in;
}

.pass-card[data-style="COUPON"],
.pass-back[data-style="COUPON"] {
  /* PassSlot n'a pas de zigzag par défaut, mais gardons l'effet Apple s'il n'y a pas d'encoche */
  border-radius: 12px;
}

.pass-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 10px;
  min-height: 44px;
}

.pass-logo-zone {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 1;
  min-width: 0;
}

.pass-logo-zone img {
  max-height: 50px;
  max-width: 160px;
  object-fit: contain;
}

.pass-logo-text {
  font-weight: 700;
  font-size: 1.05rem;
  color: var(--pass-fg, #fff);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.pass-header-fields {
  display: flex;
  gap: 14px;
  flex-shrink: 0;
}

.pass-field {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.pass-field-label {
  font-size: .6rem;
  font-weight: 700;
  letter-spacing: .07em;
  text-transform: uppercase;
  color: var(--pass-label, #94A3B8);
}

.pass-field-value {
  font-size: .9rem;
  font-weight: 600;
  color: var(--pass-fg, #fff);
}

.pass-field-value.large {
  font-size: 1.45rem;
  font-weight: 700;
  line-height: 1.1;
}

/* Strip image */
.pass-strip {
  margin: 14px -16px;
  height: 112px;
  overflow: hidden;
}
.pass-strip img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Primary zone */
.pass-primary-zone { margin: 16px 0 10px; }

/* Secondary + Auxiliary rows */
.pass-secondary-row,
.pass-auxiliary-row {
  display: flex;
  gap: 16px;
  margin: 8px 0;
}
.pass-secondary-row .pass-field,
.pass-auxiliary-row .pass-field { flex: 1; min-width: 0; }
.pass-text-right { text-align: right; }

/* Stamp grid (TAMPON) */
.stamp-grid {
  display: grid;
  gap: 8px;
  margin: 16px 0;
  padding: 4px;
}

/* La forme (rond / carré / losange / aucun) et le fond de chaque case sont
   entièrement pilotés par les réglages "Personnalisation avancée" de
   l'éditeur (rendus en inline-style, cf. partials/pass-preview.ejs) : cette
   classe ne doit donc plus imposer son propre fond/bordure/arrondi, sinon un
   carré arrondi reste visible derrière la forme choisie par le commerçant. */
.stamp-cell {
  aspect-ratio: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  background: transparent;
  border: none;
  transition: transform .3s cubic-bezier(.34,1.56,.64,1);
}

.stamp-cell.stamped {
  transform: scale(1.04);
}

/* Barcode zone */
.pass-barcode-zone {
  background: transparent !important;
  border-radius: 12px;
  padding: 14px 12px 10px;
  margin-top: 16px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.pass-qr {
  margin: 0 auto 6px;
  background: transparent !important;
  border: 3px solid #ffffff;
  padding: 0;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  box-shadow: none !important;
}

.pass-qr img {
  display: block;
  margin: 0 auto;
  object-fit: contain;
  object-position: center;
  box-shadow: none !important;
}

.pass-barcode-alt-text {
  color: #ffffff !important;
  font-size: .68rem;
  letter-spacing: .12em;
  font-family: 'Courier New', monospace;
}

/* Verso */
.pass-back {
  background: #f5f5f5;
  border-radius: 16px;
  padding: 20px 16px;
  min-height: 300px;
}

.pass-back-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid #e0e0e0;
}

.pass-back-logo { max-height: 28px; }
.pass-back-title { font-size: .8rem; font-weight: 600; color: #333; }

.pass-back-field { padding: 10px 0; border-bottom: 1px solid #e8e8e8; }
.pass-back-field:last-child { border-bottom: none; }
.pass-back-label { font-size: .65rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: #888; margin-bottom: 3px; }
.pass-back-value { font-size: .88rem; color: #222; line-height: 1.5; }

/* Flip button */
.flip-pass-btn {
  display: flex;
  align-items: center;
  gap: .4rem;
  font-size: .78rem;
  color: var(--dm-text-soft);
  background: none;
  border: 1px solid var(--dm-border-2);
  border-radius: 100px;
  padding: .3rem .8rem;
  cursor: pointer;
  transition: all .2s;
  margin: .75rem auto 0;
}
.flip-pass-btn:hover { color: #E9C6FA; border-color: rgba(115,34,230,0.45); }

/* ============================================================
   18. TABLES
   ============================================================ */
.table-dark-soft {
  color: var(--dm-text);
  border-color: var(--dm-border);
}
.table-dark-soft thead th {
  background: rgba(13,20,36,0.6);
  font-size: .75rem;
  font-weight: 600;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--dm-text-soft);
  border-bottom: 1px solid var(--dm-border-2);
  padding: .85rem 1rem;
}
.table-dark-soft tbody td {
  border-bottom: 1px solid var(--dm-border);
  padding: .9rem 1rem;
  vertical-align: middle;
}
.table-dark-soft tbody tr:last-child td { border-bottom: none; }
.table-dark-soft tbody tr:hover td { background: rgba(255,255,255,0.02); }

/* ============================================================
   19. RESPONSIVE
   ============================================================ */
@media (max-width: 768px) {
  .hero-section { padding: 5rem 0 3rem; }
  .hero-title { font-size: 2.2rem; }
  .hero-wallet-card { width: 260px; }
  .wallet-card-flipper { width: 280px; }

  /* Navbar mobile */
  .site-navbar {
    border-radius: 0;
    margin: 0;
    top: 0;
    width: 100%;
    max-width: 100%;
    padding: 0.4rem 0.75rem !important;
  }

  /* Réduction padding sections */
  section { padding-top: 3rem !important; padding-bottom: 3rem !important; }

  /* Footer mobile */
  .site-footer .row { gap: 1.5rem; }
}

@media (max-width: 576px) {
  .hero-title { font-size: 1.9rem; }
  .hero-subtitle { font-size: 1rem; }
  
  /* Boutons pleine largeur sur xs */
  .hero-section .d-flex { flex-direction: column !important; }
  .hero-section .d-flex .btn,
  .hero-section .d-flex a { width: 100% !important; text-align: center; }

  /* Wallet preview plus petit */
  .hero-wallet-card { width: 220px; }
  .wallet-card-flipper { width: 240px; }

  /* Pricing cards scroll horizontal */
  .pricing-row-overflow {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 1rem;
  }
  
  /* Flash toasts plus petits */
  .flash-toast { font-size: 0.82rem; padding: 0.6rem 1rem; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}
