@import url('components.css');
@import url('form.css');

/* =====================================================
   MOORA MOTORS — CYBER-MOTO DARK DESIGN SYSTEM
   ===================================================== */

:root {
  /* === Core Dark Palette === */
  --bg-primary: #08080E;
  --bg-secondary: #0F0F1A;
  --bg-tertiary: #141423;
  --bg-card: #0D0D1C;
  --bg-glass: rgba(13, 13, 28, 0.8);

  /* === Accent Colors === */
  --accent-primary: #FF1E3A;
  --accent-secondary: #00D4FF;
  --accent-gold: #FFB800;

  /* === Text === */
  --text-primary: #F0F0FF;
  --text-secondary: #8892A4;
  --text-muted: #4A5568;

  /* === Borders & Glow === */
  --border-color: rgba(255, 30, 58, 0.15);
  --border-glass: rgba(255, 255, 255, 0.06);
  --glow-red: 0 0 20px rgba(255, 30, 58, 0.4), 0 0 60px rgba(255, 30, 58, 0.15);
  --glow-blue: 0 0 20px rgba(0, 212, 255, 0.3);
  --glow-soft: 0 4px 24px rgba(255, 30, 58, 0.12);

  /* === Shadows === */
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.4);
  --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.5);
  --shadow-lg: 0 20px 60px rgba(0, 0, 0, 0.6);
  --shadow-glow: var(--glow-red);

  /* === Spacing === */
  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 16px;

  /* === Transitions === */
  --transition-fast: all 0.2s ease;
  --transition-med: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-slow: all 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

/* =====================================================
   BASE RESET & GLOBALS
   ===================================================== */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  font-family: 'Space Grotesk', 'Inter', sans-serif;
  color: var(--text-primary);
  background-color: var(--bg-primary);
  font-size: 16px;
}

body {
  overflow-x: hidden;
  line-height: 1.6;
  background-color: var(--bg-primary);
}

/* Custom scrollbar */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--bg-secondary); }
::-webkit-scrollbar-thumb {
  background: var(--accent-primary);
  border-radius: 3px;
}

h1, h2, h3, h4, h5, h6 {
  font-family: 'Barlow Condensed', 'Rajdhani', sans-serif;
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: 0.02em;
  color: var(--text-primary);
  margin-bottom: 1rem;
}

h1 { font-size: clamp(2.8rem, 6vw, 5rem); text-transform: uppercase; }
h2 { font-size: clamp(2rem, 4vw, 3.2rem); text-transform: uppercase; }
h3 { font-size: clamp(1.4rem, 2.5vw, 1.9rem); }

p {
  font-family: 'Space Grotesk', 'Montserrat', sans-serif;
  margin-bottom: 1rem;
  color: var(--text-secondary);
  font-size: 1rem;
}

a {
  text-decoration: none;
  color: inherit;
  transition: var(--transition-fast);
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

/* =====================================================
   UTILITIES
   ===================================================== */
.container {
  width: 100%;
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 2rem;
}

.text-center { text-align: center; }
.text-accent { color: var(--accent-primary); }
.text-cyan   { color: var(--accent-secondary); }
.text-gold   { color: var(--accent-gold); }

.section-padding { padding: 6rem 0; }

/* Section Title */
.section-title {
  text-align: center;
  margin-bottom: 1rem;
  position: relative;
  display: inline-block;
  width: 100%;
}

.section-title::before {
  content: attr(data-label);
  display: block;
  font-family: 'Space Grotesk', sans-serif;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 4px;
  text-transform: uppercase;
  color: var(--accent-primary);
  margin-bottom: 0.5rem;
}

.section-title::after {
  content: '';
  display: block;
  width: 50px;
  height: 3px;
  background: linear-gradient(90deg, var(--accent-primary), transparent);
  margin: 1rem auto 0;
}

.section-subtitle {
  text-align: center;
  color: var(--text-secondary);
  font-size: 1.05rem;
  margin-bottom: 4rem;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

/* =====================================================
   BUTTONS
   ===================================================== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.85rem 2rem;
  font-family: 'Barlow Condensed', sans-serif;
  font-weight: 700;
  font-size: 1.1rem;
  text-transform: uppercase;
  letter-spacing: 2px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: var(--transition-med);
  border: none;
  gap: 0.5rem;
  position: relative;
  overflow: hidden;
}

.btn::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(255,255,255,0.12) 0%, transparent 60%);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.btn:hover::before { opacity: 1; }

.btn-primary {
  background: linear-gradient(135deg, #FF1E3A 0%, #CC0022 100%);
  color: #fff;
  box-shadow: 0 4px 15px rgba(255, 30, 58, 0.35);
  clip-path: polygon(0 0, calc(100% - 10px) 0, 100% 10px, 100% 100%, 10px 100%, 0 calc(100% - 10px));
}

.btn-primary:hover {
  transform: translateY(-3px);
  box-shadow: var(--glow-red);
}

.btn-secondary {
  background: transparent;
  color: var(--text-primary);
  border: 1px solid rgba(255, 255, 255, 0.2);
  clip-path: polygon(0 0, calc(100% - 10px) 0, 100% 10px, 100% 100%, 10px 100%, 0 calc(100% - 10px));
}

.btn-secondary:hover {
  border-color: var(--accent-primary);
  color: var(--accent-primary);
  box-shadow: var(--glow-soft);
  transform: translateY(-3px);
}

/* =====================================================
   NAVBAR
   ===================================================== */
header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
  transition: var(--transition-slow);
  padding: 1.5rem 0;
}

header.scrolled {
  padding: 0.75rem 0;
  background: rgba(8, 8, 14, 0.92);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(255, 30, 58, 0.2);
  box-shadow: 0 4px 30px rgba(0, 0, 0, 0.5);
}

.nav-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo img {
  height: 48px;
  transition: var(--transition-med);
  filter: drop-shadow(0 0 8px rgba(255, 30, 58, 0.3));
}

header.scrolled .logo img {
  height: 38px;
}

/* Nav links */
.nav-menu {
  display: flex;
  list-style: none;
  align-items: center;
  gap: 0.25rem;
}

.nav-menu li { position: relative; }

.nav-link {
  font-family: 'Barlow Condensed', sans-serif;
  font-weight: 600;
  font-size: 1rem;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: rgba(240, 240, 255, 0.85);
  display: flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.5rem 0.9rem;
  border-radius: var(--radius-sm);
  position: relative;
  transition: var(--transition-fast);
}

.nav-link:hover {
  color: var(--accent-primary);
  background: rgba(255, 30, 58, 0.08);
}

.nav-link.active {
  color: var(--accent-primary);
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0.9rem;
  right: 0.9rem;
  height: 2px;
  background: var(--accent-primary);
  transform: scaleX(0);
  transition: transform 0.3s ease;
  box-shadow: 0 0 8px var(--accent-primary);
}

.nav-link:hover::after,
.nav-link.active::after {
  transform: scaleX(1);
}

/* Dropdown */
.dropdown-content {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  min-width: 200px;
  background: rgba(13, 13, 28, 0.97);
  backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 30, 58, 0.2);
  border-radius: var(--radius-md);
  padding: 0.5rem 0;
  opacity: 0;
  visibility: hidden;
  transform: translateY(8px);
  transition: var(--transition-med);
  box-shadow: var(--shadow-lg);
}

.nav-item-dropdown:hover .dropdown-content {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.dropdown-content li { padding: 0; }

.dropdown-content a {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.65rem 1.2rem;
  font-family: 'Barlow Condensed', sans-serif;
  font-weight: 600;
  font-size: 0.95rem;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--text-secondary);
  transition: var(--transition-fast);
}

.dropdown-content a::before {
  content: '›';
  color: var(--accent-primary);
  font-size: 1.2rem;
  opacity: 0;
  transform: translateX(-4px);
  transition: var(--transition-fast);
}

.dropdown-content a:hover {
  color: var(--text-primary);
  background: rgba(255, 30, 58, 0.08);
}

.dropdown-content a:hover::before {
  opacity: 1;
  transform: translateX(0);
}

/* Dark Mode Toggle */
.dark-mode-toggle {
  background: rgba(255, 30, 58, 0.1);
  border: 1px solid rgba(255, 30, 58, 0.2);
  color: var(--accent-primary);
  font-size: 1rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  transition: var(--transition-fast);
}

.dark-mode-toggle:hover {
  background: rgba(255, 30, 58, 0.2);
  box-shadow: var(--glow-soft);
}

/* Mobile Menu Toggle */
.mobile-toggle {
  display: none;
  background: none;
  border: 1px solid rgba(255, 30, 58, 0.3);
  color: var(--text-primary);
  font-size: 1.25rem;
  cursor: pointer;
  padding: 0.4rem 0.75rem;
  border-radius: var(--radius-sm);
  transition: var(--transition-fast);
}

.mobile-toggle:hover {
  border-color: var(--accent-primary);
  color: var(--accent-primary);
}

/* =====================================================
   FOOTER
   ===================================================== */
footer {
  background: var(--bg-secondary);
  border-top: 1px solid rgba(255, 30, 58, 0.15);
  padding: 5rem 0 2rem;
  position: relative;
  overflow: hidden;
}

footer::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--accent-primary), transparent);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr;
  gap: 3rem;
  margin-bottom: 4rem;
}

.footer-logo {
  height: 55px;
  margin-bottom: 1.5rem;
  filter: drop-shadow(0 0 10px rgba(255, 30, 58, 0.3));
}

.footer-col > p {
  color: var(--text-muted);
  font-size: 0.9rem;
  line-height: 1.8;
}

.footer-col h4 {
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 1.1rem;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: var(--accent-primary);
  margin-bottom: 1.5rem;
  position: relative;
  padding-bottom: 0.75rem;
}

.footer-col h4::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 30px;
  height: 2px;
  background: var(--accent-primary);
  box-shadow: 0 0 8px var(--accent-primary);
}

.footer-links { list-style: none; }

.footer-links li {
  margin-bottom: 0.85rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--text-muted);
  font-size: 0.9rem;
}

.footer-links li i {
  color: var(--accent-primary);
  width: 16px;
}

.footer-links a {
  color: var(--text-muted);
  transition: var(--transition-fast);
  position: relative;
}

.footer-links a::before {
  content: '›';
  margin-right: 0.4rem;
  color: var(--accent-primary);
  opacity: 0;
  transition: var(--transition-fast);
}

.footer-links a:hover {
  color: var(--accent-primary);
  padding-left: 0.4rem;
}

.footer-links a:hover::before {
  opacity: 1;
}

.social-links {
  display: flex;
  gap: 0.75rem;
  margin-top: 1.75rem;
}

.social-links a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: var(--text-secondary);
  font-size: 1rem;
  transition: var(--transition-med);
}

.social-links a:hover {
  background: var(--accent-primary);
  border-color: var(--accent-primary);
  color: #fff;
  transform: translateY(-4px);
  box-shadow: var(--glow-red);
}

.footer-bottom {
  text-align: center;
  padding-top: 2rem;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  font-size: 0.85rem;
  color: var(--text-muted);
}

.footer-bottom span {
  color: var(--accent-primary);
}

/* =====================================================
   RESPONSIVE NAVBAR
   ===================================================== */
@media (max-width: 992px) {
  .nav-menu {
    position: fixed;
    top: 0;
    right: -100%;
    width: 300px;
    height: 100vh;
    background: rgba(8, 8, 14, 0.98);
    backdrop-filter: blur(20px);
    flex-direction: column;
    align-items: flex-start;
    padding: 5rem 2rem 2rem;
    border-left: 1px solid rgba(255, 30, 58, 0.2);
    box-shadow: -20px 0 60px rgba(0, 0, 0, 0.6);
    transition: right 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    gap: 0;
  }

  .nav-menu.active { right: 0; }

  .nav-link {
    width: 100%;
    padding: 0.9rem 0.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
  }

  .mobile-toggle { display: flex; align-items: center; }

  .dropdown-content {
    position: static;
    opacity: 1;
    visibility: visible;
    transform: none;
    box-shadow: none;
    border: none;
    background: rgba(255, 30, 58, 0.05);
    padding-left: 1rem;
    display: none;
    backdrop-filter: none;
    border-radius: 0;
    margin-top: 0;
  }

  .nav-item-dropdown.active .dropdown-content { display: block; }

  .footer-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
}

@media (max-width: 768px) {
  .container { padding: 0 1.25rem; }
  .section-padding { padding: 4rem 0; }
  h1 { font-size: 2.5rem; }
  h2 { font-size: 1.9rem; }
}

/* =====================================================
   COLOR DISPLAY DOT (non-cliquable, page accueil)
   ===================================================== */
.color-display-dot {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.15);
  display: inline-block;
  cursor: default;
  flex-shrink: 0;
  transition: transform 0.2s ease;
}

.color-display-dot:hover {
  transform: scale(1.1);
  border-color: rgba(255, 255, 255, 0.35);
}

/* =====================================================
   COLOR SELECTOR INTERACTIVE (pages moto)
   ===================================================== */
.color-selector-interactive .color-dot {
  position: relative;
}

/* Pulse animation to indicate interactivity */
.color-selector-interactive .color-dot:not(.active) {
  animation: dot-hint 3s ease-in-out infinite;
}

@keyframes dot-hint {
  0%, 100% { box-shadow: 0 0 0 0 rgba(255, 255, 255, 0.2); }
  50% { box-shadow: 0 0 0 5px rgba(255, 255, 255, 0.05); }
}

.color-selector-interactive .color-dot:hover {
  /* Suppression de l'effet hover pour les cercles de couleurs */
}

/* =====================================================
   MOBILE MENU — Burger right + X close
   ===================================================== */
.nav-container {
  position: relative;
}

/* Burger always right on mobile */
@media (max-width: 992px) {
  .mobile-toggle {
    display: flex;
    align-items: center;
    margin-left: auto;
    order: 3;
  }

  .logo { order: 1; }
  nav { order: 2; }

  .nav-container {
    display: flex;
    align-items: center;
  }

  /* Full-screen backdrop when menu open */
  .nav-menu::before {
    content: '';
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.55);
    backdrop-filter: blur(4px);
    z-index: -1;
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
  }

  .nav-menu.active::before {
    opacity: 1;
    pointer-events: auto;
  }

  /* Close button inside mobile menu */
  .mobile-close-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    position: absolute;
    top: 1.25rem;
    right: 1.25rem;
    width: 36px;
    height: 36px;
    background: rgba(255, 30, 58, 0.12);
    border: 1px solid rgba(255, 30, 58, 0.3);
    border-radius: 50%;
    color: var(--accent-primary);
    font-size: 1rem;
    cursor: pointer;
    transition: background 0.2s;
  }

  .mobile-close-btn:hover {
    background: rgba(255, 30, 58, 0.25);
  }
}

@media (min-width: 993px) {
  .mobile-close-btn { display: none; }
}

/* =====================================================
   COLOR SHOWCASE PANELS
   ===================================================== */
.color-showcase-panel {
  display: none;
  grid-template-columns: 1fr 1.2fr;
  gap: 3rem;
  align-items: flex-start;
  margin-top: 2.5rem;
  padding: 2.5rem;
  background: var(--bg-card);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-lg);
  animation: fadeInPanel 0.4s ease forwards;
}

.color-showcase-panel.active {
  display: grid;
}

@keyframes fadeInPanel {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: translateY(0); }
}

.color-showcase-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.4rem 1rem;
  border: 1px solid;
  border-radius: 999px;
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 2px;
  text-transform: uppercase;
  margin-bottom: 1rem;
}

.color-showcase-badge span {
  display: inline-block;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
}

.color-showcase-info h3 {
  font-size: clamp(1.5rem, 3vw, 2.2rem);
  margin-bottom: 1rem;
  line-height: 1.15;
}

.color-showcase-info p {
  font-size: 0.95rem;
  line-height: 1.8;
  color: var(--text-secondary);
}

/* =====================================================
   CAROUSEL
   ===================================================== */
.color-carousel {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  aspect-ratio: 4/3;
  background: var(--bg-secondary);
}

.carousel-track {
  position: relative;
  width: 100%;
  height: 100%;
}

.carousel-slide {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity 0.5s ease;
  display: block;
}

.carousel-slide.active {
  opacity: 1;
}

.carousel-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 5;
  background: rgba(8, 8, 14, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #fff;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.9rem;
  transition: var(--transition-fast);
  backdrop-filter: blur(8px);
}

.carousel-btn:hover {
  background: var(--accent-primary);
  border-color: var(--accent-primary);
  box-shadow: var(--glow-soft);
}

.carousel-btn-prev { left: 0.75rem; }
.carousel-btn-next { right: 0.75rem; }

.carousel-dots {
  position: absolute;
  bottom: 0.75rem;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 0.4rem;
  z-index: 5;
}

.carousel-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.35);
  cursor: pointer;
  transition: var(--transition-fast);
}

.carousel-dot.active {
  background: var(--accent-primary);
  box-shadow: 0 0 6px var(--accent-primary);
  transform: scale(1.3);
}

/* =====================================================
   COLOR SHOWCASE — RESPONSIVE
   ===================================================== */
@media (max-width: 900px) {
  .color-showcase-panel {
    grid-template-columns: 1fr;
    padding: 1.5rem;
    gap: 1.5rem;
  }
}

@media (max-width: 600px) {
  .color-carousel {
    aspect-ratio: 3/2;
  }
  .gallery-tabs {
    gap: 0.4rem;
  }
  .gallery-tab {
    font-size: 0.75rem;
    padding: 0.4rem 0.7rem;
  }
}
