/* ==========================================================================
   Calculateurs Moteurs & BSI - Roubaix (59100)
   Feuille de style - Thème ROUGE & NOIR (Performance & Électronique Auto)
   ========================================================================== */

:root {
  --primary-red: #dc2626;
  --primary-red-hover: #ef4444;
  --primary-red-dark: #991b1b;
  --primary-red-glow: rgba(220, 38, 38, 0.45);
  
  --bg-deep-black: #08080a;
  --bg-carbon: #101014;
  --bg-card: #15151a;
  --bg-card-hover: #1c1c24;
  
  --border-subtle: rgba(255, 255, 255, 0.08);
  --border-red: rgba(220, 38, 38, 0.35);
  --border-red-glow: rgba(239, 68, 68, 0.6);
  
  --text-main: #f4f4f5;
  --text-muted: #a1a1aa;
}

/* Custom Scrollbar Rouge & Noir */
::-webkit-scrollbar {
  width: 9px;
}
::-webkit-scrollbar-track {
  background: #08080a;
}
::-webkit-scrollbar-thumb {
  background: #27272a;
  border-radius: 4px;
  border: 2px solid #08080a;
}
::-webkit-scrollbar-thumb:hover {
  background: #dc2626;
}

/* Base resets & typography */
html {
  scroll-behavior: smooth;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

body {
  background-color: var(--bg-deep-black);
  color: var(--text-main);
  overflow-x: hidden;
}

/* Fond texture carbone et micro-grille rouge */
.bg-carbon-pattern {
  background-color: #08080a;
  background-image: 
    radial-gradient(circle at 10% 20%, rgba(220, 38, 38, 0.12) 0%, transparent 45%),
    radial-gradient(circle at 90% 80%, rgba(185, 28, 28, 0.09) 0%, transparent 50%),
    linear-gradient(to right, rgba(255, 255, 255, 0.015) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(255, 255, 255, 0.015) 1px, transparent 1px);
  background-size: 100% 100%, 100% 100%, 36px 36px, 36px 36px;
}

/* Effets de lueur rouge */
.glow-text-red {
  text-shadow: 0 0 20px rgba(239, 68, 68, 0.6);
}

.glow-border-red {
  border: 1px solid var(--border-red);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.glow-border-red:hover {
  border-color: var(--border-red-glow);
  box-shadow: 0 10px 30px -10px rgba(220, 38, 38, 0.35);
  transform: translateY(-3px);
}

.glow-box-red {
  box-shadow: 0 0 35px -5px rgba(220, 38, 38, 0.35);
}

/* Panels en verre fumé noir */
.glass-panel-dark {
  background: rgba(18, 18, 23, 0.88);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid var(--border-subtle);
}

.glass-nav-dark {
  background: rgba(10, 10, 14, 0.94);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border-bottom: 1px solid rgba(220, 38, 38, 0.2);
}

/* Indicateur pulse rouge */
@keyframes pulse-red {
  0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.7); }
  70% { transform: scale(1); box-shadow: 0 0 0 8px rgba(239, 68, 68, 0); }
  100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(239, 68, 68, 0); }
}

.pulse-indicator-red {
  animation: pulse-red 2s infinite;
}

/* Badges Rouge & Carbone */
.badge-red {
  background: rgba(220, 38, 38, 0.15);
  border: 1px solid rgba(239, 68, 68, 0.35);
  color: #f87171;
}

.badge-dark {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #e4e4e7;
}

/* Boutons de filtre */
.filter-btn {
  transition: all 0.2s ease;
}

.filter-btn.active {
  background: #dc2626 !important;
  color: #ffffff !important;
  border-color: #ef4444 !important;
  box-shadow: 0 4px 15px -3px rgba(220, 38, 38, 0.5) !important;
}

/* ==========================================================================
   GRAND BANDEAU DÉFILANT / SLIDER HERO PLEINE LARGEUR (Style ABRITES France)
   ========================================================================== */
.hero-slider-container {
  position: relative;
  width: 100%;
  overflow: hidden;
  border-radius: 0; /* Pleine largeur d'un bout à l'autre sans arrondis */
  border-top: 1px solid rgba(220, 38, 38, 0.25);
  border-bottom: 1px solid rgba(220, 38, 38, 0.4);
  border-left: none;
  border-right: none;
  box-shadow: 0 15px 35px -10px rgba(0, 0, 0, 0.85);
  background: #08080a;
}

.hero-slider-track {
  display: flex;
  transition: transform 0.6s cubic-bezier(0.25, 1, 0.5, 1);
  width: 100%;
}

.hero-slide {
  min-width: 100%;
  width: 100%;
  box-sizing: border-box;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 540px;
  padding: 3.5rem 1.5rem;
  background-size: cover;
  background-position: center;
}

@media (min-width: 1024px) {
  .hero-slide {
    min-height: 600px;
    padding: 4rem 2.5rem;
  }
}

@media (max-width: 768px) {
  .hero-slide {
    padding: 3rem 1.25rem 4.5rem 1.25rem;
    min-height: 560px;
  }
}

/* Navigation chevrons du slider pleine largeur bord à bord */
.slider-arrow-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 25;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: rgba(12, 12, 16, 0.88);
  backdrop-filter: blur(10px);
  border: 1.5px solid rgba(220, 38, 38, 0.5);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.25s ease;
}

.slider-arrow-btn:hover {
  background: #dc2626;
  border-color: #ef4444;
  box-shadow: 0 0 25px rgba(239, 68, 68, 0.7);
  transform: translateY(-50%) scale(1.1);
}

.slider-arrow-prev {
  left: 1.5rem;
}

.slider-arrow-next {
  right: 1.5rem;
}

@media (max-width: 768px) {
  .slider-arrow-prev { left: 0.5rem; }
  .slider-arrow-next { right: 0.5rem; }
  .slider-arrow-btn { width: 40px; height: 40px; }
}

/* Indicateurs / Puces en bas du slider */
.slider-dots-container {
  position: absolute;
  bottom: 1.25rem;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 0.5rem;
  z-index: 20;
}

.slider-dot {
  width: 10px;
  height: 10px;
  border-radius: 9999px;
  background: rgba(255, 255, 255, 0.25);
  border: 1px solid transparent;
  cursor: pointer;
  transition: all 0.3s ease;
}

.slider-dot.active {
  width: 32px;
  background: #dc2626;
  border-color: #f87171;
  box-shadow: 0 0 10px rgba(220, 38, 38, 0.7);
}

/* ==========================================================================
   DÉFILEMENT INFINI MARQUES & MODULES (Marquee Ticker)
   ========================================================================== */
@keyframes marquee-scroll {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

.marquee-wrapper {
  overflow: hidden;
  position: relative;
  mask-image: linear-gradient(to right, transparent 0%, black 10%, black 90%, transparent 100%);
  -webkit-mask-image: linear-gradient(to right, transparent 0%, black 10%, black 90%, transparent 100%);
}

.marquee-track {
  display: flex;
  width: max-content;
  animation: marquee-scroll 50s linear infinite;
}

.marquee-track:hover {
  animation-play-state: paused;
}

/* Inputs personnalisés sombres */
.custom-input {
  background: #141418;
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #ffffff;
  transition: all 0.2s ease;
}

.custom-input:focus {
  border-color: #dc2626;
  outline: none;
  box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.25);
  background: #181820;
}

/* Modales */
.modal-backdrop {
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

.modal-content-box {
  transition: transform 0.3s ease, opacity 0.3s ease;
}

.modal-backdrop.hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.modal-backdrop:not(.hidden) {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.modal-backdrop.hidden .modal-content-box {
  transform: scale(0.95) translateY(20px);
}

.modal-backdrop:not(.hidden) .modal-content-box {
  transform: scale(1) translateY(0);
}

/* Barre mobile tactile */
@media (max-width: 768px) {
  .mobile-cta-bar {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 40;
    padding: 0.75rem 1rem;
    background: rgba(10, 10, 14, 0.96);
    backdrop-filter: blur(14px);
    border-top: 1px solid rgba(220, 38, 38, 0.3);
  }
}
