/* ============================================
   RACE-AFRICA/CDY — Africa Eco Race
   Thème : Rallye-raid africain, aventure, désert
   ============================================ */

/* ----- Variables ----- */
:root {
  --color-bg: #0f0f0f;
  --color-text: #ffffff;
  --color-primary: #d4a017;
  --color-secondary: #b22222;
  --color-accent: #f5a623;
  --font-heading: 'Oswald', sans-serif;
  --font-body: 'Lato', sans-serif;
  --hero-height: 100vh;
  --nav-height: 70px;
}

/* ----- Reset & Base ----- */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: var(--font-body);
  background: var(--color-bg);
  color: #ffffff;
  line-height: 1.7;
  overflow-x: hidden;
}

a {
  color: var(--color-primary);
  text-decoration: none;
  transition: color 0.3s;
}
a:hover { color: var(--color-accent); }

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

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

.section {
  padding: 100px 0;
}

.section-title {
  font-family: var(--font-heading);
  font-size: clamp(2rem, 5vw, 3.5rem);
  text-transform: uppercase;
  letter-spacing: 3px;
  margin-bottom: 20px;
  color: var(--color-primary);
  text-align: center;
}

.section-subtitle {
  font-size: 1.15rem;
  color: #e0d8c8;
  text-align: center;
  max-width: 700px;
  margin: 0 auto 60px;
  line-height: 1.8;
}

/* ----- Navigation ----- */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: var(--nav-height);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 40px;
  transition: background 0.4s, box-shadow 0.4s;
}

.nav--scrolled {
  background: rgba(15, 15, 15, 0.95);
  box-shadow: 0 2px 20px rgba(0,0,0,0.5);
}

.nav__logo {
  font-family: var(--font-heading);
  font-size: 1.6rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 4px;
  color: var(--color-primary);
}

.nav__logo span {
  color: var(--color-secondary);
}

.nav__links {
  display: flex;
  list-style: none;
  gap: 30px;
}

.nav__links a {
  color: #ffffff;
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 2px;
  font-weight: 400;
  position: relative;
  padding-bottom: 4px;
}

.nav__links a::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--color-primary);
  transition: width 0.3s;
}

.nav__links a:hover::after,
.nav__links a.active::after {
  width: 100%;
}

.nav__hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  background: none;
  border: none;
  padding: 5px;
}

.nav__hamburger span {
  width: 28px;
  height: 2px;
  background: var(--color-primary);
  transition: all 0.3s;
}

/* ----- Hero avec carrousel ----- */
.hero {
  position: relative;
  height: var(--hero-height);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.hero__carousel {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
}

.hero__slide {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-size: cover;
  background-position: center;
  opacity: 0;
  transition: opacity 1.5s ease-in-out;
}

.hero__slide--active {
  opacity: 1;
}

.hero__overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, rgba(0,0,0,0.85) 0%, rgba(0,0,0,0.4) 50%, rgba(0,0,0,0.7) 100%);
  z-index: 1;
}

.hero__content {
  position: relative;
  z-index: 2;
  text-align: center;
  padding: 0 20px;
  max-width: 900px;
}

.hero__badge {
  display: inline-block;
  font-family: var(--font-heading);
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 4px;
  color: var(--color-primary);
  border: 1px solid var(--color-primary);
  padding: 8px 20px;
  margin-bottom: 30px;
  animation: fadeInDown 1s ease 0.3s both;
}

.hero__title {
  font-family: var(--font-heading);
  font-size: clamp(3rem, 8vw, 6rem);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 6px;
  line-height: 1.1;
  color: #ffffff;
  margin-bottom: 20px;
  animation: fadeInUp 1s ease 0.5s both;
  text-shadow: 0 2px 20px rgba(0,0,0,0.8);
}

.hero__title span {
  color: var(--color-primary);
}

.hero__subtitle {
  font-size: clamp(1rem, 2vw, 1.3rem);
  color: #ffffff;
  margin-bottom: 40px;
  letter-spacing: 2px;
  animation: fadeInUp 1s ease 0.7s both;
  text-shadow: 0 2px 10px rgba(0,0,0,0.8);
}

.hero__cta {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-heading);
  font-size: 1rem;
  text-transform: uppercase;
  letter-spacing: 3px;
  color: #ffffff;
  background: var(--color-secondary);
  padding: 16px 40px;
  border: none;
  cursor: pointer;
  transition: all 0.3s;
  animation: fadeInUp 1s ease 0.9s both;
}

.hero__cta:hover {
  background: #8b0000;
  transform: translateY(-3px);
  box-shadow: 0 10px 30px rgba(178, 34, 34, 0.4);
}

.hero__cta--secondary {
  background: transparent;
  border: 2px solid var(--color-primary);
  margin-left: 15px;
}

.hero__cta--secondary:hover {
  background: var(--color-primary);
  color: #0f0f0f;
}

.hero__arrows {
  position: absolute;
  bottom: 40px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 3;
  display: flex;
  gap: 15px;
}

.hero__arrow {
  width: 50px;
  height: 50px;
  border: 2px solid rgba(255,255,255,0.3);
  background: rgba(0,0,0,0.3);
  color: #ffffff;
  font-size: 1.5rem;
  cursor: pointer;
  transition: all 0.3s;
  display: flex;
  align-items: center;
  justify-content: center;
}

.hero__arrow:hover {
  border-color: var(--color-primary);
  background: rgba(212, 160, 23, 0.2);
}

.hero__scroll-indicator {
  position: absolute;
  bottom: 100px;
  right: 40px;
  z-index: 3;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  color: rgba(255,255,255,0.4);
  font-size: 0.7rem;
  letter-spacing: 2px;
  text-transform: uppercase;
  writing-mode: vertical-rl;
  animation: bounceDown 2s infinite;
}

/* ----- About Section ----- */
.about {
  background: #141414;
  position: relative;
}

.about__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: center;
}

.about__image {
  border-radius: 50% 50% 0 0;
  overflow: hidden;
  height: 500px;
  clip-path: polygon(0 0, 100% 0, 100% 90%, 50% 100%, 0 90%);
}

.about__image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.about__content h2 {
  font-family: var(--font-heading);
  font-size: clamp(1.8rem, 4vw, 2.8rem);
  text-transform: uppercase;
  letter-spacing: 3px;
  color: var(--color-primary);
  margin-bottom: 25px;
}

.about__content p {
  margin-bottom: 20px;
  color: #ffffff;
  font-size: 1.05rem;
  line-height: 1.8;
}

.about__content p strong {
  color: var(--color-primary);
}

.about__stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin-top: 40px;
}

.about__stat {
  text-align: center;
  padding: 20px;
  border: 1px solid rgba(212, 160, 23, 0.2);
}

.about__stat-number {
  font-family: var(--font-heading);
  font-size: 2.5rem;
  color: var(--color-primary);
  font-weight: 700;
}

.about__stat-label {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: #e0d8c8;
  margin-top: 5px;
}

/* ----- Parcours Section ----- */
.parcours {
  background: #0a0a0a;
}

.parcours__timeline {
  position: relative;
  max-width: 800px;
  margin: 0 auto;
  padding-left: 50px;
}

.parcours__timeline::before {
  content: '';
  position: absolute;
  left: 20px;
  top: 0;
  bottom: 0;
  width: 2px;
  background: linear-gradient(to bottom, var(--color-primary), var(--color-secondary));
}

.parcours__step {
  position: relative;
  margin-bottom: 50px;
  padding-left: 40px;
}

.parcours__step::before {
  content: '';
  position: absolute;
  left: -30px;
  top: 5px;
  width: 20px;
  height: 20px;
  background: var(--color-primary);
  border-radius: 50%;
  border: 3px solid #0a0a0a;
  box-shadow: 0 0 0 2px var(--color-primary);
}

.parcours__step h3 {
  font-family: var(--font-heading);
  font-size: 1.3rem;
  color: var(--color-primary);
  text-transform: uppercase;
  letter-spacing: 2px;
  margin-bottom: 8px;
}

.parcours__step p {
  color: #ffffff;
  font-size: 0.95rem;
  line-height: 1.7;
}

.parcours__step .parcours__date {
  font-size: 0.8rem;
  color: var(--color-secondary);
  text-transform: uppercase;
  letter-spacing: 2px;
  margin-bottom: 5px;
}

/* ----- Galerie Section ----- */
.galerie {
  background: #141414;
}

.galerie__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 15px;
}

.galerie__item {
  position: relative;
  overflow: hidden;
  height: 280px;
  cursor: pointer;
}

.galerie__item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s;
}

.galerie__item:hover img {
  transform: scale(1.1);
}

.galerie__item-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 20px;
  background: linear-gradient(transparent, rgba(0,0,0,0.8));
  color: #ffffff;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  opacity: 0;
  transition: opacity 0.3s;
}

.galerie__item:hover .galerie__item-overlay {
  opacity: 1;
}

.galerie__item--tall {
  grid-row: span 2;
  height: auto;
}

/* ----- Partenaires Section ----- */
.partenaires {
  background: #0a0a0a;
}

.partenaires__grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 30px;
  align-items: center;
}

.partenaire__card {
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(212, 160, 23, 0.1);
  padding: 30px;
  text-align: center;
  transition: all 0.3s;
}

.partenaire__card:hover {
  border-color: var(--color-primary);
  background: rgba(212, 160, 23, 0.05);
  transform: translateY(-5px);
}

.partenaire__card h4 {
  font-family: var(--font-heading);
  color: var(--color-primary);
  text-transform: uppercase;
  letter-spacing: 2px;
  font-size: 1rem;
}

.partenaire__card p {
  font-size: 0.8rem;
  color: #e0d8c8;
  margin-top: 8px;
}

/* ----- Contact Section ----- */
.contact {
  background: #141414;
  position: relative;
}

.contact__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
}

.contact__info h3 {
  font-family: var(--font-heading);
  font-size: 1.5rem;
  color: var(--color-primary);
  text-transform: uppercase;
  letter-spacing: 2px;
  margin-bottom: 25px;
}

.contact__info p {
  color: #ffffff;
  margin-bottom: 15px;
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 1.05rem;
}

.contact__info .icon {
  width: 20px;
  height: 20px;
  fill: var(--color-primary);
  flex-shrink: 0;
}

.contact__form {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.contact__form input,
.contact__form textarea,
.contact__form select {
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.1);
  padding: 15px 20px;
  color: #ffffff;
  font-family: var(--font-body);
  font-size: 1rem;
  transition: border-color 0.3s;
}

.contact__form input:focus,
.contact__form textarea:focus,
.contact__form select:focus {
  outline: none;
  border-color: var(--color-primary);
}

.contact__form textarea {
  min-height: 120px;
  resize: vertical;
}

.contact__form button {
  font-family: var(--font-heading);
  font-size: 1rem;
  text-transform: uppercase;
  letter-spacing: 3px;
  color: #ffffff;
  background: var(--color-secondary);
  padding: 16px 40px;
  border: none;
  cursor: pointer;
  transition: all 0.3s;
  align-self: flex-start;
}

.contact__form button:hover {
  background: #8b0000;
  transform: translateY(-2px);
}

/* ----- Footer ----- */
.footer {
  background: #080808;
  padding: 60px 0 30px;
  border-top: 1px solid rgba(212, 160, 23, 0.1);
}

.footer__grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 40px;
  margin-bottom: 40px;
}

.footer__brand h3 {
  font-family: var(--font-heading);
  font-size: 1.5rem;
  color: var(--color-primary);
  text-transform: uppercase;
  letter-spacing: 3px;
  margin-bottom: 15px;
}

.footer__brand p {
  color: #e0d8c8;
  font-size: 0.9rem;
  max-width: 300px;
}

.footer__col h4 {
  font-family: var(--font-heading);
  font-size: 0.9rem;
  color: var(--color-primary);
  text-transform: uppercase;
  letter-spacing: 2px;
  margin-bottom: 20px;
}

.footer__col ul {
  list-style: none;
}

.footer__col ul li {
  margin-bottom: 10px;
  color: #e0d8c8;
}

.footer__col ul a {
  color: #e0d8c8;
  font-size: 0.9rem;
  transition: color 0.3s;
}

.footer__col ul a:hover {
  color: var(--color-primary);
}

.footer__social {
  display: flex;
  gap: 15px;
  margin-top: 20px;
}

.footer__social a {
  width: 40px;
  height: 40px;
  border: 1px solid rgba(212, 160, 23, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s;
}

.footer__social a:hover {
  border-color: var(--color-primary);
  background: rgba(212, 160, 23, 0.1);
}

.footer__social svg {
  width: 18px;
  height: 18px;
  fill: #e0d8c8;
}

.footer__bottom {
  border-top: 1px solid rgba(255,255,255,0.05);
  padding-top: 30px;
  text-align: center;
  color: #999;
  font-size: 0.85rem;
}

/* ----- Lightbox ----- */
.lightbox {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.95);
  z-index: 2000;
  display: none;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.lightbox--open {
  display: flex;
}

.lightbox img {
  max-width: 90%;
  max-height: 90%;
  object-fit: contain;
}

.lightbox__close {
  position: absolute;
  top: 30px;
  right: 40px;
  color: #ffffff;
  font-size: 2rem;
  cursor: pointer;
  background: none;
  border: none;
}

/* ----- Animations ----- */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(40px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeInDown {
  from {
    opacity: 0;
    transform: translateY(-30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes bounceDown {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(10px); }
}

/* ----- Reveal animations ----- */
[data-reveal] {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 0.8s ease, transform 0.8s ease;
}

[data-reveal].revealed {
  opacity: 1;
  transform: translateY(0);
}

/* ----- Responsive ----- */
@media (max-width: 1024px) {
  .about__grid {
    grid-template-columns: 1fr;
    gap: 40px;
  }
  .about__image {
    height: 350px;
  }
  .galerie__grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .footer__grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 768px) {
  .nav__links {
    position: fixed;
    top: 0;
    right: -100%;
    width: 70%;
    height: 100vh;
    background: rgba(15, 15, 15, 0.98);
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 30px;
    transition: right 0.4s;
    z-index: 999;
  }

  .nav__links--open {
    right: 0;
  }

  .nav__hamburger {
    display: flex;
    z-index: 1001;
  }

  .hero__title {
    font-size: clamp(2rem, 10vw, 3.5rem);
    letter-spacing: 3px;
  }

  .hero__cta--secondary {
    margin-left: 0;
    margin-top: 15px;
  }

  .hero__scroll-indicator {
    display: none;
  }

  .section {
    padding: 60px 0;
  }

  .about__stats {
    grid-template-columns: 1fr;
  }

  .galerie__grid {
    grid-template-columns: 1fr;
  }

  .galerie__item--tall {
    grid-row: span 1;
  }

  .partenaires__grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .contact__grid {
    grid-template-columns: 1fr;
  }

  .footer__grid {
    grid-template-columns: 1fr;
  }

  .parcours__timeline {
    padding-left: 30px;
  }
}

@media (max-width: 480px) {
  .nav {
    padding: 0 20px;
  }
  .hero__badge {
    font-size: 0.7rem;
    padding: 6px 14px;
  }
  .partenaires__grid {
    grid-template-columns: 1fr;
  }
}
