/* ==========================================================================
   V1 Classique — Custom CSS
   Design system for La Banque Postale BF institutional banking interface.
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. CSS Custom Properties
   -------------------------------------------------------------------------- */
:root {
  /* Color palette */
  --v1-navy:  #002868;
  --v1-royal: #004AAD;
  --v1-gold:  #D4A838;
  --v1-pearl: #F8F9FA;
  --v1-ink:   #1A1A2E;
  --v1-slate: #666666;
  --v1-deep:  #001D4A;

  /* Derived / utility */
  --v1-gold-light:       #E8C55A;
  --v1-navy-shadow:      rgba(0, 40, 104, 0.18);
  --v1-navy-shadow-lg:   rgba(0, 40, 104, 0.32);
  --v1-gold-glow:        rgba(212, 168, 56, 0.45);
  --v1-glass-bg:         rgba(255, 255, 255, 0.85);
  --v1-glass-border:     rgba(255, 255, 255, 0.55);
  --v1-glass-nav-bg:     rgba(0, 40, 104, 0.95);

  /* Spacing */
  --v1-radius-sm:  10px;
  --v1-radius-md:  16px;
  --v1-radius-lg:  20px;

  /* Easing */
  --v1-ease: cubic-bezier(0.4, 0, 0.2, 1);
}


/* --------------------------------------------------------------------------
   2. Typography
   -------------------------------------------------------------------------- */

/* Base heading class — DM Serif Display */
.v1-heading {
  font-family: 'DM Serif Display', Georgia, serif;
  font-size: clamp(1.8rem, 4vw, 3rem);
  line-height: 1.15;
  color: var(--v1-navy);
  font-weight: 400; /* DM Serif Display is naturally bold at 400 */
}

/* Hero heading — larger clamp */
.v1-heading-hero {
  font-family: 'DM Serif Display', Georgia, serif;
  font-size: clamp(2rem, 5vw, 3.2rem);
  line-height: 1.1;
  color: var(--v1-navy);
  font-weight: 400;
}

/* Stat number — gradient gold text */
.v1-stat-number {
  font-family: 'DM Serif Display', Georgia, serif;
  font-size: clamp(2.4rem, 5vw, 3.6rem);
  font-weight: 400;
  line-height: 1;
  background: linear-gradient(135deg, var(--v1-gold) 0%, var(--v1-gold-light) 60%, #C8942A 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  color: transparent; /* Fallback for non-supporting browsers */
}


/* --------------------------------------------------------------------------
   3. Glassmorphism
   -------------------------------------------------------------------------- */

/* Card / container glass */
.v1-glass {
  background: var(--v1-glass-bg);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--v1-glass-border);
  border-radius: var(--v1-radius-md);
  box-shadow: 0 4px 24px var(--v1-navy-shadow);
}

/* Navigation glass */
.v1-glass-nav {
  background: var(--v1-glass-nav-bg);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 2px 16px var(--v1-navy-shadow-lg);
}


/* --------------------------------------------------------------------------
   4. Card Hover
   -------------------------------------------------------------------------- */
.v1-card-hover {
  transition: all 0.3s var(--v1-ease);
  box-shadow: 0 2px 12px var(--v1-navy-shadow);
  border: 1px solid transparent;
  border-radius: var(--v1-radius-md);
}

.v1-card-hover:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 32px var(--v1-navy-shadow-lg);
  border-color: var(--v1-gold);
}


/* --------------------------------------------------------------------------
   5. Buttons
   -------------------------------------------------------------------------- */
.v1-btn-primary {
  transition: all 0.3s var(--v1-ease);
  cursor: pointer;
}

.v1-btn-primary:hover {
  transform: translateY(-1px) scale(1.02);
  box-shadow: 0 6px 20px var(--v1-gold-glow);
}

.v1-btn-primary:active {
  transform: translateY(0) scale(0.99);
}


/* --------------------------------------------------------------------------
   6. Navigation Link Underline Slide-In
   -------------------------------------------------------------------------- */
.v1-nav-link {
  position: relative;
  text-decoration: none;
  transition: all 0.3s var(--v1-ease);
}

.v1-nav-link::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--v1-gold);
  border-radius: 2px;
  transition: width 0.3s var(--v1-ease);
}

.v1-nav-link:hover::after,
.v1-nav-link[aria-current="page"]::after {
  width: 100%;
}


/* --------------------------------------------------------------------------
   7. Hero Glow Effect
   -------------------------------------------------------------------------- */
.v1-hero-glow {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: radial-gradient(
    ellipse 70% 60% at 50% 40%,
    rgba(0, 74, 173, 0.18) 0%,
    rgba(0, 29, 74, 0.08) 55%,
    transparent 100%
  );
  z-index: 0;
}


/* --------------------------------------------------------------------------
   8. Floating Animation
   -------------------------------------------------------------------------- */
@keyframes v1-float {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-4px);
  }
}

.v1-float {
  animation: v1-float 3s ease-in-out infinite;
}


/* --------------------------------------------------------------------------
   9. Icon Rotate on Parent Hover
   -------------------------------------------------------------------------- */
.v1-card-hover:hover .v1-icon-rotate,
*:hover > .v1-icon-rotate {
  transform: rotate(5deg) scale(1.05);
  transition: transform 0.3s var(--v1-ease);
}

.v1-icon-rotate {
  transition: transform 0.3s var(--v1-ease);
  display: inline-block;
}

/* ---- Quick access icon hover: bg goes navy, icon goes white ---- */
.v1-qa-icon {
  transition: all 0.3s var(--v1-ease);
}
.v1-qa-icon svg {
  transition: color 0.3s var(--v1-ease);
}
.group:hover .v1-qa-icon {
  background-color: var(--v1-navy) !important;
  box-shadow: 0 4px 12px var(--v1-navy-shadow);
  transform: scale(1.08);
}
.group:hover .v1-qa-icon svg {
  color: white !important;
}


/* --------------------------------------------------------------------------
   10. Accessibility
   -------------------------------------------------------------------------- */

/* Skip-to-content link */
.v1-skip-link {
  position: absolute;
  top: -100%;
  left: 1rem;
  z-index: 9999;
  padding: 0.75rem 1.25rem;
  background: var(--v1-gold);
  color: var(--v1-ink);
  font-family: 'Inter', sans-serif;
  font-weight: 600;
  font-size: 0.9rem;
  border-radius: var(--v1-radius-sm);
  text-decoration: none;
  transition: top 0.2s var(--v1-ease);
}

.v1-skip-link:focus {
  top: 1rem;
  outline: 2px solid var(--v1-navy);
  outline-offset: 2px;
}

/* Focus ring for interactive elements */
.v1-focus:focus-visible {
  outline: 2px solid var(--v1-gold);
  outline-offset: 3px;
  border-radius: 4px;
}


/* --------------------------------------------------------------------------
   11. Leaflet Marker Fix
   -------------------------------------------------------------------------- */
.bpbf-marker {
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
}


/* --------------------------------------------------------------------------
   12. Range Slider
   -------------------------------------------------------------------------- */
input[type="range"].v1-range {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 6px;
  border-radius: 3px;
  background: linear-gradient(
    to right,
    var(--v1-gold) 0%,
    var(--v1-gold) var(--range-progress, 50%),
    #D1D5DB var(--range-progress, 50%),
    #D1D5DB 100%
  );
  outline: none;
  cursor: pointer;
  transition: background 0.2s var(--v1-ease);
}

input[type="range"].v1-range::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--v1-navy);
  border: 2px solid var(--v1-gold);
  box-shadow: 0 2px 8px var(--v1-navy-shadow);
  cursor: pointer;
  transition: transform 0.2s var(--v1-ease), box-shadow 0.2s var(--v1-ease);
}

input[type="range"].v1-range::-moz-range-thumb {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--v1-navy);
  border: 2px solid var(--v1-gold);
  box-shadow: 0 2px 8px var(--v1-navy-shadow);
  cursor: pointer;
  transition: transform 0.2s var(--v1-ease), box-shadow 0.2s var(--v1-ease);
}

input[type="range"].v1-range::-webkit-slider-thumb:hover {
  transform: scale(1.15);
  box-shadow: 0 4px 14px var(--v1-gold-glow);
}

input[type="range"].v1-range::-moz-range-thumb:hover {
  transform: scale(1.15);
  box-shadow: 0 4px 14px var(--v1-gold-glow);
}

input[type="range"].v1-range:focus-visible {
  outline: 2px solid var(--v1-gold);
  outline-offset: 4px;
  border-radius: 4px;
}


/* --------------------------------------------------------------------------
   13. Section Alternation
   -------------------------------------------------------------------------- */
.v1-section-alt {
  background-color: var(--v1-pearl);
}


/* --------------------------------------------------------------------------
   14. Logo Contrast on Dark Backgrounds
   -------------------------------------------------------------------------- */
/* Logo on dark backgrounds — subtle drop-shadow lifts dark elements */
.v1-logo-on-dark {
  filter: drop-shadow(0 1px 2px rgba(0,0,0,0.3));
}



/* --------------------------------------------------------------------------
   15. 2026 Depth & Polish System
   -------------------------------------------------------------------------- */

/* ---- Hero depth layers ---- */
.v1-hero-depth {
  position: relative;
}
.v1-hero-depth::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 80% 50% at 20% 80%, rgba(0,40,104,0.6) 0%, transparent 70%),
    radial-gradient(ellipse 60% 40% at 80% 20%, rgba(212,168,56,0.08) 0%, transparent 60%);
  pointer-events: none;
  z-index: 0;
}

/* Mesh gradient overlay for hero */
.v1-hero-mesh {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 15% 85%, rgba(0,74,173,0.35) 0%, transparent 50%),
    radial-gradient(circle at 85% 15%, rgba(212,168,56,0.12) 0%, transparent 40%),
    radial-gradient(circle at 50% 50%, rgba(0,40,104,0.1) 0%, transparent 70%);
  pointer-events: none;
  z-index: 0;
}

/* ---- Phone mockup glow ---- */
.v1-phone-glow {
  position: relative;
}
.v1-phone-glow::before {
  content: '';
  position: absolute;
  inset: -20px;
  background: radial-gradient(circle, rgba(212,168,56,0.15) 0%, transparent 70%);
  border-radius: 50%;
  z-index: -1;
  animation: v1-phone-pulse 4s ease-in-out infinite;
}
@keyframes v1-phone-pulse {
  0%, 100% { opacity: 0.4; transform: scale(1); }
  50% { opacity: 0.7; transform: scale(1.05); }
}

/* ---- Elevated card with layered shadows ---- */
.v1-card-elevated {
  box-shadow:
    0 1px 2px rgba(0,0,0,0.04),
    0 4px 8px rgba(0,40,104,0.06),
    0 12px 24px rgba(0,40,104,0.08),
    0 24px 48px rgba(0,40,104,0.04);
  transition: all 0.4s var(--v1-ease);
}
.v1-card-elevated:hover {
  box-shadow:
    0 1px 2px rgba(0,0,0,0.04),
    0 8px 16px rgba(0,40,104,0.1),
    0 20px 40px rgba(0,40,104,0.12),
    0 32px 64px rgba(0,40,104,0.06);
  transform: translateY(-6px);
  border-color: var(--v1-gold);
}

/* ---- Glass card with stronger frost ---- */
.v1-glass-strong {
  background: rgba(255,255,255,0.92);
  backdrop-filter: blur(24px) saturate(180%);
  -webkit-backdrop-filter: blur(24px) saturate(180%);
  border: 1px solid rgba(255,255,255,0.6);
  box-shadow:
    0 4px 16px rgba(0,40,104,0.08),
    0 12px 40px rgba(0,40,104,0.06),
    inset 0 1px 0 rgba(255,255,255,0.8);
}

/* ---- Section separator gradient ---- */
.v1-section-glow-top {
  position: relative;
}
.v1-section-glow-top::before {
  content: '';
  position: absolute;
  top: 0;
  left: 10%;
  right: 10%;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(212,168,56,0.3), transparent);
}

/* ---- Stats bar depth ---- */
.v1-stats-depth {
  position: relative;
  overflow: hidden;
}
.v1-stats-depth::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 50% 80% at 20% 50%, rgba(0,74,173,0.3) 0%, transparent 70%),
    radial-gradient(ellipse 40% 80% at 80% 50%, rgba(0,74,173,0.2) 0%, transparent 70%);
  pointer-events: none;
}
.v1-stats-depth::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(212,168,56,0.4), transparent);
}

/* ---- Newsletter section depth ---- */
.v1-newsletter-depth {
  position: relative;
  overflow: hidden;
}
.v1-newsletter-depth::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 30% 50%, rgba(0,74,173,0.25) 0%, transparent 60%),
    radial-gradient(circle at 70% 30%, rgba(212,168,56,0.06) 0%, transparent 50%);
  pointer-events: none;
}

/* ---- Gold accent line (used above sections) ---- */
.v1-gold-line {
  width: 60px;
  height: 3px;
  background: linear-gradient(90deg, var(--v1-gold), var(--v1-gold-light));
  border-radius: 3px;
  margin: 0 auto 1.5rem;
}

/* ---- Offer card image overlay for depth ---- */
.v1-offer-overlay {
  position: relative;
}
.v1-offer-overlay::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 40%;
  background: linear-gradient(to top, rgba(0,0,0,0.3), transparent);
  pointer-events: none;
}

/* ---- Footer depth ---- */
.v1-footer-depth {
  position: relative;
}
.v1-footer-depth::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(212,168,56,0.25), transparent);
}

/* ---- Subtle noise texture (for premium feel) ---- */
.v1-noise {
  position: relative;
}
.v1-noise::after {
  content: '';
  position: absolute;
  inset: 0;
  opacity: 0.02;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  pointer-events: none;
  z-index: 1;
}

/* ---- Button glow ring ---- */
.v1-btn-glow {
  position: relative;
}
.v1-btn-glow::after {
  content: '';
  position: absolute;
  inset: -3px;
  border-radius: inherit;
  background: linear-gradient(135deg, rgba(212,168,56,0.4), transparent 60%);
  opacity: 0;
  transition: opacity 0.3s var(--v1-ease);
  z-index: -1;
  filter: blur(8px);
}
.v1-btn-glow:hover::after {
  opacity: 1;
}
