/* ============================================================
   ECURIE-PERFORMANCE.CH — style.css
   Surcouche Bootstrap 5 — NE PAS modifier l'ordre de chargement
   Charger Bootstrap AVANT ce fichier.
   ============================================================ */


/* ────────────────────────────────────────────────────────────
   1. VARIABLES
   ──────────────────────────────────────────────────────────── */

:root {
  /* Palette Ecurie Performance */
  --ep-red:          #CC0000;
  --ep-red-dark:     #990000;
  --ep-red-bright:   #FF1A1A;
  --ep-black:        #0A0A0A;
  --ep-black-soft:   #141414;
  --ep-black-mid:    #1E1E1E;
  --ep-white-off:    #F5F5F0;
  --ep-gray-light:   #E8E8E8;
  --ep-gray-mid:     #AAAAAA;
  --ep-checker-dark: #111111;

  /* Typographie */
  --ep-font-display: 'Bebas Neue', 'Impact', sans-serif;
  --ep-font-heading: 'Racing Sans One', 'Oswald', sans-serif;
  --ep-font-sub:     'Oswald', sans-serif;
  --ep-font-body:    'Barlow Condensed', 'Arial Narrow', sans-serif;

  /* Override variables Bootstrap */
  --bs-body-font-family:  var(--ep-font-body);
  --bs-body-font-size:    1rem;
  --bs-body-line-height:  1.6;
  --bs-link-color:        var(--ep-red);
  --bs-link-hover-color:  var(--ep-red-bright);
}


/* ────────────────────────────────────────────────────────────
   2. BASE BODY
   ──────────────────────────────────────────────────────────── */

body {
  background-color: #fff;
  color: var(--ep-black);
  overflow-x: hidden;
}


/* ────────────────────────────────────────────────────────────
   3. UTILITAIRES DÉCORATIFS
   ──────────────────────────────────────────────────────────── */

/* Filet racing en haut de page */
.ep-top-stripe {
  width: 100%;
  height: 6px;
  background: linear-gradient(
    90deg,
    var(--ep-black) 0%,
    var(--ep-red)   40%,
    var(--ep-red)   60%,
    var(--ep-black) 100%
  );
}

/* Bandes damier */
.ep-checker {
  height: 18px;
  background-image: repeating-conic-gradient(
    var(--ep-checker-dark) 0% 25%,
    #EEEEEE 0% 50%
  );
  background-size: 18px 18px;
}

.ep-checker--red {
  background-image: repeating-conic-gradient(
    var(--ep-red) 0% 25%,
    var(--ep-red-dark) 0% 50%
  );
}

.ep-checker--thin {
  height: 10px;
  background-size: 10px 10px;
}

/* Séparateur oblique rouge */
.ep-divider {
  height: 50px;
  background: var(--ep-red);
  transform: skewY(-3deg);
  transform-origin: left;
  margin: 1rem 0;
  position: relative;
  overflow: hidden;
}

.ep-divider::before {
  content: '';
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(
    90deg,
    transparent 0px,
    transparent 30px,
    rgba(0, 0, 0, 0.12) 30px,
    rgba(0, 0, 0, 0.12) 32px
  );
}

/* Trait rouge sous titre de section */
.ep-section-rule {
  width: 60px;
  height: 4px;
  background: var(--ep-red);
  margin-bottom: 2rem;
}


/* ────────────────────────────────────────────────────────────
   4. TYPOGRAPHIE DE SECTION
   ──────────────────────────────────────────────────────────── */

.ep-section-title {
  font-family: var(--ep-font-display);
  font-size: clamp(2.2rem, 5vw, 3.8rem);
  letter-spacing: 3px;
  text-transform: uppercase;
  line-height: 1;
  margin-bottom: 0.4rem;
}

.ep-section-title .accent {
  color: var(--ep-red);
}


/* ────────────────────────────────────────────────────────────
   5. HEADER & NAVBAR
   ──────────────────────────────────────────────────────────── */

.ep-header {
  background-color: var(--ep-black);
  position: relative;
  overflow: visible;
}

/* Lignes diagonales décoratives — z-index 0 pour rester derrière tout */
.ep-header::before {
  content: '';
  position: absolute;
  top: 0;
  left: -10%;
  width: 120%;
  height: 100%;
  z-index: 0;
  background: repeating-linear-gradient(
    105deg,
    transparent 0px,
    transparent 38px,
    rgba(204, 0, 0, 0.04) 38px,
    rgba(204, 0, 0, 0.04) 40px
  );
  pointer-events: none;
}

.ep-header .navbar {
  padding-top: 0;
  padding-bottom: 0;
  min-height: 90px;
  position: relative;
  z-index: 10;
}

.ep-header .navbar-brand img {
  height: 56px;
  width: auto;
  filter: brightness(1.1);
}

/* Toggler hamburger — au-dessus du ::before décoratif */
.ep-header .navbar-toggler {
  border-color: rgba(255, 255, 255, 0.3);
  position: relative;
  z-index: 20;
}

.ep-header .navbar-toggler-icon {
  filter: invert(1);
}

/* Menu déroulant mobile — au-dessus de tout */
.ep-header .navbar-collapse {
  position: relative;
  z-index: 20;
}

/* Override nav-link Bootstrap */
.ep-header .nav-link {
  font-family: var(--ep-font-sub);
  font-weight: 600;
  font-size: 13px;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--ep-white-off) !important;
  padding: 0.6rem 1.1rem !important;
  position: relative;
  transition: color 0.2s;
}

.ep-header .nav-link::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  right: 50%;
  height: 3px;
  background: var(--ep-red);
  transition: left 0.25s, right 0.25s;
}

.ep-header .nav-link:hover,
.ep-header .nav-link:focus {
  color: #fff !important;
}

.ep-header .nav-link:hover::after,
.ep-header .nav-link.active::after {
  left: 0.5rem;
  right: 0.5rem;
}

.ep-header .nav-link.active {
  color: var(--ep-red-bright) !important;
}


/* ────────────────────────────────────────────────────────────
   6. HERO
   ──────────────────────────────────────────────────────────── */

.ep-hero {
  background-color: var(--ep-black-soft);
  position: relative;
  overflow: hidden;
  padding: 5rem 2rem 4.5rem;
  text-align: center;
}

.ep-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(
    100deg,
    transparent 0px,
    transparent 60px,
    rgba(255, 255, 255, 0.015) 60px,
    rgba(255, 255, 255, 0.015) 62px
  );
  pointer-events: none;
}

.ep-hero::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 8px;
  height: 100%;
  background: var(--ep-red);
}

.ep-hero__eyebrow {
  font-family: var(--ep-font-sub);
  font-weight: 600;
  font-size: 12px;
  letter-spacing: 5px;
  text-transform: uppercase;
  color: var(--ep-red);
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
}

.ep-hero__eyebrow span {
  display: inline-block;
  width: 40px;
  height: 2px;
  background: var(--ep-red);
}

.ep-hero__title {
  font-family: var(--ep-font-display);
  font-size: clamp(3.5rem, 10vw, 8rem);
  letter-spacing: 4px;
  color: #fff;
  line-height: 0.9;
  margin-bottom: 1.5rem;
  text-transform: uppercase;
}

.ep-hero__title em {
  color: var(--ep-red);
  font-style: normal;
}

.ep-hero__subtitle {
  font-family: var(--ep-font-body);
  font-size: 1.2rem;
  color: var(--ep-gray-mid);
  letter-spacing: 2px;
  margin-bottom: 2.5rem;
  font-style: italic;
}

/* Bouton CTA — préfixé ep- pour ne pas entrer en conflit avec .btn Bootstrap */
.ep-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  background: var(--ep-red);
  color: #fff !important;
  font-family: var(--ep-font-sub);
  font-weight: 700;
  font-size: 13px;
  letter-spacing: 2px;
  text-transform: uppercase;
  text-decoration: none;
  padding: 1rem 2.5rem;
  border: none;
  clip-path: polygon(8px 0%, 100% 0%, calc(100% - 8px) 100%, 0% 100%);
  transition: background 0.2s, transform 0.15s;
}

.ep-btn:hover {
  background: var(--ep-red-bright);
  transform: scale(1.04);
}

.ep-btn svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.5;
}


/* ────────────────────────────────────────────────────────────
   7. BARRE DE STATISTIQUES
   ──────────────────────────────────────────────────────────── */

.ep-stats {
  background: var(--ep-black);
  padding: 2.5rem 2rem;
  position: relative;
  overflow: hidden;
}

.ep-stats::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--ep-red), #ff6600, var(--ep-red));
}

.ep-stat__value {
  font-family: var(--ep-font-display);
  font-size: 3.5rem;
  color: var(--ep-red);
  letter-spacing: 2px;
  line-height: 1;
}

.ep-stat__label {
  font-family: var(--ep-font-sub);
  font-size: 11px;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: var(--ep-gray-mid);
  margin-top: 0.3rem;
}


/* ────────────────────────────────────────────────────────────
   8. CARDS PILOTES
   Utilise .ep-card pour éviter le conflit avec .card Bootstrap
   ──────────────────────────────────────────────────────────── */

.ep-card {
  background: var(--ep-black);
  color: #fff;
  position: relative;
  overflow: hidden;
  transition: transform 0.2s;
  border-radius: 0 !important;
  border: none !important;
}

.ep-card:hover {
  transform: translateY(-4px);
}

.ep-card__media {
  width: 100%;
  height: 200px;
  background: var(--ep-black-mid);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--ep-font-display);
  font-size: 4rem;
  color: rgba(255, 255, 255, 0.05);
  letter-spacing: 4px;
  position: relative;
  overflow: hidden;
}

.ep-card__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.ep-card__media::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: var(--ep-red);
}

.ep-card__number {
  position: absolute;
  top: 12px;
  right: 12px;
  font-family: var(--ep-font-display);
  font-size: 3.5rem;
  color: rgba(204, 0, 0, 0.3);
  line-height: 1;
}

.ep-card__body {
  padding: 1.2rem 1.4rem 1.4rem;
  clip-path: polygon(0 8px, 8px 0, 100% 0, 100% 100%, 0 100%);
  background: var(--ep-black-soft);
  border-left: 3px solid var(--ep-red);
}

.ep-card__label {
  font-family: var(--ep-font-sub);
  font-size: 10px;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: var(--ep-red);
  margin-bottom: 0.3rem;
}

.ep-card__name {
  font-family: var(--ep-font-heading);
  font-size: 1.4rem;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: #fff;
  line-height: 1.1;
  margin-bottom: 0.5rem;
}

.ep-card__desc {
  font-size: 13px;
  color: var(--ep-gray-mid);
  line-height: 1.5;
}


/* ────────────────────────────────────────────────────────────
   9. SECTION SOMBRE (fond noir)
   ──────────────────────────────────────────────────────────── */

.ep-section-dark {
  background: var(--ep-black-soft);
  color: #fff;
}

.ep-section-dark .ep-section-title {
  color: #fff;
}


/* ────────────────────────────────────────────────────────────
   10. SPONSORS
   ──────────────────────────────────────────────────────────── */

.ep-sponsor__name {
  font-family: var(--ep-font-sub);
  font-size: 22px;
  font-weight: 600;
  letter-spacing: 2px;
  color: var(--ep-gray-mid);
  text-transform: uppercase;
  transition: color 0.2s;
  cursor: default;
}

.ep-sponsor__name:hover {
  color: var(--ep-red);
}


/* ────────────────────────────────────────────────────────────
   11. FOOTER
   ──────────────────────────────────────────────────────────── */

.ep-footer {
  background: var(--ep-black);
  color: #fff;
  position: relative;
  overflow: hidden;
}

.ep-footer::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: var(--ep-red);
}

.ep-footer__brand img {
  height: 40px;
  width: auto;
  margin-bottom: 1rem;
  filter: brightness(1.1);
}

.ep-footer__brand p {
  font-size: 13px;
  color: var(--ep-gray-mid);
  line-height: 1.6;
}

.ep-footer__col-title {
  font-family: var(--ep-font-sub);
  font-size: 12px;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: var(--ep-red);
  margin-bottom: 1rem;
}

.ep-footer__links {
  list-style: none;
  padding: 0;
  margin: 0;
}

.ep-footer__links li {
  margin-bottom: 0.5rem;
}

.ep-footer__links a {
  font-size: 13px;
  color: var(--ep-gray-mid);
  text-decoration: none;
  transition: color 0.2s;
}

.ep-footer__links a:hover {
  color: #fff;
}

.ep-footer__bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  padding: 1.2rem 0;
}

.ep-footer__copyright {
  font-size: 12px;
  color: var(--ep-gray-mid);
  letter-spacing: 1px;
  margin: 0;
}

.ep-footer__copyright strong {
  color: var(--ep-red);
}

.ep-footer__legal {
  display: flex;
  gap: 1.5rem;
  flex-wrap: wrap;
}

.ep-footer__legal a {
  font-size: 12px;
  color: var(--ep-gray-mid);
  text-decoration: none;
  letter-spacing: 0.5px;
  transition: color 0.2s;
}

.ep-footer__legal a:hover {
  color: #fff;
}


/* ────────────────────────────────────────────────────────────
   12. CONTENU CRM INJECTÉ VIA {{content}}
   Styles pour le HTML généré par Bootstrap dans le CRM
   ──────────────────────────────────────────────────────────── */

.ep-section-dark .ep-crm-content {
  color: #fff;
}

.ep-section-dark .ep-crm-content h1,
.ep-section-dark .ep-crm-content h2,
.ep-section-dark .ep-crm-content h3,
.ep-section-dark .ep-crm-content h4,
.ep-section-dark .ep-crm-content h5,
.ep-section-dark .ep-crm-content h6 {
  color: #fff;
}

.ep-section-dark .ep-crm-content p,
.ep-section-dark .ep-crm-content li {
  color: var(--ep-gray-mid);
}

.ep-section-dark .ep-crm-content a {
  color: var(--ep-red-bright);
}

/* Boutons Bootstrap générés par le CRM — override couleur */
.ep-crm-content .btn-primary {
  --bs-btn-bg:                 var(--ep-red);
  --bs-btn-border-color:       var(--ep-red);
  --bs-btn-hover-bg:           var(--ep-red-bright);
  --bs-btn-hover-border-color: var(--ep-red-bright);
  --bs-btn-active-bg:          var(--ep-red-dark);
  border-radius: 0;
  font-family: var(--ep-font-sub);
  letter-spacing: 1.5px;
  text-transform: uppercase;
}

.ep-crm-content .btn-outline-primary {
  --bs-btn-color:              var(--ep-red);
  --bs-btn-border-color:       var(--ep-red);
  --bs-btn-hover-bg:           var(--ep-red);
  --bs-btn-hover-border-color: var(--ep-red);
  border-radius: 0;
  font-family: var(--ep-font-sub);
  letter-spacing: 1.5px;
  text-transform: uppercase;
}

/* Cards Bootstrap dans le contenu CRM */
.ep-crm-content .card {
  border-radius: 0;
  border-color: rgba(255, 255, 255, 0.1);
}

.ep-section-dark .ep-crm-content .card {
  background: var(--ep-black-mid);
  border-color: rgba(255, 255, 255, 0.08);
  color: #fff;
}

/* Badges Bootstrap */
.ep-crm-content .badge.bg-primary {
  background-color: var(--ep-red) !important;
}

/* Liens dans le CRM */
.ep-crm-content a:not(.btn) {
  color: var(--ep-red);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.ep-crm-content a:not(.btn):hover {
  color: var(--ep-red-bright);
}


/* ────────────────────────────────────────────────────────────
   13. RESPONSIVE
   ──────────────────────────────────────────────────────────── */

@media (max-width: 991.98px) {

  .ep-header .navbar {
    min-height: 70px;
  }

  /* Menu mobile déroulé — fond noir, bien visible */
  .ep-header .navbar-collapse {
    background: var(--ep-black-soft);
    padding: 1rem;
    margin-top: 0.5rem;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
  }

  /* Pas de soulignement animé sur mobile */
  .ep-header .nav-link::after {
    display: none;
  }

  /* Espacement vertical des liens sur mobile */
  .ep-header .nav-link {
    padding: 0.75rem 0.5rem !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  }

  .ep-header .nav-item:last-child .nav-link {
    border-bottom: none;
  }
}

@media (max-width: 767.98px) {
  .ep-footer__legal {
    justify-content: center;
  }
}


/* ────────────────────────────────────────────────────────────
   14. PRINT
   ──────────────────────────────────────────────────────────── */

@media print {
  .ep-checker,
  .ep-divider {
    display: none;
  }
}


/* ────────────────────────────────────────────────────────────
   15. ALIAS — COMPATIBILITÉ CLASSES CRM
   Le CRM peut générer des noms de classes sans préfixe ep-.
   Ces alias garantissent que le design s'applique quoi qu'il arrive.
   ──────────────────────────────────────────────────────────── */

/* Hero sans préfixe */
.hero-eyebrow          { font-family: var(--ep-font-sub); font-weight: 600; font-size: 12px; letter-spacing: 5px; text-transform: uppercase; color: var(--ep-red); margin-bottom: 1rem; display: flex; align-items: center; justify-content: center; gap: 1rem; }
.hero-eyebrow span     { display: inline-block; width: 40px; height: 2px; background: var(--ep-red); }
.hero-title            { font-family: var(--ep-font-display); font-size: clamp(3.5rem, 10vw, 8rem); letter-spacing: 4px; color: #fff; line-height: 0.9; margin-bottom: 1.5rem; text-transform: uppercase; }
.hero-title em         { color: var(--ep-red); font-style: normal; }
.hero-subtitle         { font-family: var(--ep-font-body); font-size: 1.2rem; color: var(--ep-gray-mid); letter-spacing: 2px; margin-bottom: 2.5rem; font-style: italic; }

/* Bouton CTA sans préfixe */
.hero-cta {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  background: var(--ep-red);
  color: #fff !important;
  font-family: var(--ep-font-sub);
  font-weight: 700;
  font-size: 13px;
  letter-spacing: 2px;
  text-transform: uppercase;
  text-decoration: none;
  padding: 1rem 2.5rem;
  border: none;
  clip-path: polygon(8px 0%, 100% 0%, calc(100% - 8px) 100%, 0% 100%);
  transition: background 0.2s, transform 0.15s;
}
.hero-cta:hover        { background: var(--ep-red-bright); transform: scale(1.04); }
.hero-cta svg          { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2.5; }

/* Séparateur oblique sans préfixe */
.red-divider {
  height: 50px;
  background: var(--ep-red);
  transform: skewY(-3deg);
  transform-origin: left;
  margin: 1rem 0;
  position: relative;
  overflow: hidden;
}
.red-divider::before {
  content: '';
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(
    90deg,
    transparent 0px,
    transparent 30px,
    rgba(0, 0, 0, 0.12) 30px,
    rgba(0, 0, 0, 0.12) 32px
  );
}

/* Damier sans préfixe */
.checker-band {
  height: 18px;
  background-image: repeating-conic-gradient(var(--ep-checker-dark) 0% 25%, #EEEEEE 0% 50%);
  background-size: 18px 18px;
}
.checker-band.red  { background-image: repeating-conic-gradient(var(--ep-red) 0% 25%, var(--ep-red-dark) 0% 50%); }
.checker-band.thin { height: 10px; background-size: 10px 10px; }

/* Section hero sans préfixe — fond noir avec lignes de vitesse */
.ep-hero,
section.hero {
  background-color: var(--ep-black-soft);
  position: relative;
  overflow: hidden;
  padding: 5rem 2rem 4.5rem;
  text-align: center;
}

/* Quand le hero est dans un .container Bootstrap,
   on retire le padding container pour qu'il prenne toute la largeur */
.container > .ep-hero,
.container > section.hero,
.container-xl > .ep-hero {
  margin-left: calc(-50vw + 50%);
  margin-right: calc(-50vw + 50%);
  width: 100vw;
  max-width: 100vw;
}