/*
Fichier : style.css
Date : 19/12/2025
Auteur : Goga Yll
Description : tous les styles
*/

/* ==================== STYLES GLOBAUX ==================== */

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: "Segoe UI", "Roboto", "Helvetica Neue", "Arial", sans-serif;
  overflow-x: hidden;
}

/* ==================== HEADER (Toutes les pages) ==================== */

header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  padding: 15px 50px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  z-index: 1000;
  box-shadow: 0 2px 20px rgba(0, 0, 0, 0.3);
}

.logo {
  font-size: 24px;
  font-weight: bold;
  color: white;
  transition: transform 0.3s ease;
}

.logo:hover {
  transform: scale(1.05);
}

.logo img {
  height: 55px;
  width: auto;
  max-width: 200px;
  object-fit: contain;
  filter: drop-shadow(0 2px 8px rgba(255, 255, 255, 0.2));
}

nav ul {
  display: flex;
  list-style: none;
  gap: 10px;
}

nav a {
  text-decoration: none;
  color: white;
  font-size: 15px;
  font-weight: 500;
  padding: 10px 20px;
  transition: all 0.3s ease;
  position: relative;
  letter-spacing: 0.5px;
  background: transparent;
}

nav a::before {
  content: "";
  position: absolute;
  bottom: 0;
  left: 50%;
  width: 0;
  height: 2px;
  background: linear-gradient(90deg, #0066b1, #00a8ff);
  transform: translateX(-50%);
  transition: width 0.3s ease;
}

nav a:hover {
  transform: translateY(-2px);
}

nav a:hover::before {
  width: 80%;
}

nav a:active {
  transform: translateY(0);
}

/* Menu burger */
.burger {
  display: none;
  flex-direction: column;
  cursor: pointer;
  gap: 5px;
}

.burger span {
  width: 25px;
  height: 3px;
  background-color: white;
  transition: 0.3s;
}

/* ==================== FOOTER (Toutes les pages) ==================== */

footer {
  background-color: #2c2c2c;
  color: white;
  padding: 40px 20px;
  margin-top: 80px;
}

.footer-content {
  max-width: 100%;
  margin: 0 auto;
  text-align: center;
}

.footer-content p {
  margin: 10px 0;
  font-size: 14px;
  color: #ccc;
}

/* ==================== PAGE D'ACCUEIL ==================== */

/* Slider plein écran */
.slider-container {
  position: relative;
  width: 100%;
  height: 100vh;
  overflow: hidden;
}

.slider {
  display: flex;
  transition: transform 0.5s ease;
  height: 100%;
}

.slide {
  min-width: 100%;
  height: 100%;
  position: relative;
}

/* Lien cliquable sur tout le slide */
.slide-link {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: flex-end;
  justify-content: flex-start;
  text-decoration: none;
  color: white;
  transition: transform 0.3s;
}

.slide-link:hover {
  transform: scale(1.02);
}

/* Texte en bas à gauche du slide */
.slide-text {
  padding: 80px 50px;
  z-index: 10;
}

.slide-text h1 {
  font-size: 48px;
  margin-bottom: 10px;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
}

.slide-text p {
  font-size: 24px;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
}

/* Backgrounds avec images pour chaque slide */
.slide-histoire {
  background: url("../assets/a.jpg") center/cover no-repeat;
}

.slide-modele {
  background: url("../assets/b.jpg") center/cover no-repeat;
}

.slide-technologies {
  background: url("../assets/motor.jpg") center/cover no-repeat;
}

.slide-performances {
  background: url("../assets/sport.jpg") center/cover no-repeat;
}

/* Flèches du slider */
.slider-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background-color: rgba(255, 255, 255, 0.3);
  backdrop-filter: blur(5px);
  border: none;
  color: white;
  font-size: 24px;
  padding: 15px 20px;
  cursor: pointer;
  transition: 0.3s;
  border-radius: 4px;
}

.slider-arrow:hover {
  background-color: rgba(255, 255, 255, 0.5);
}

.slider-arrow.prev {
  left: 20px;
}

.slider-arrow.next {
  right: 20px;
}

/* Navigation du slider */
.slider-nav {
  position: absolute;
  bottom: 40px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 10px;
}

.slider-nav button {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  border: 2px solid white;
  background-color: transparent;
  cursor: pointer;
  transition: 0.3s;
}

.slider-nav button.active {
  background-color: white;
  transform: scale(1.3);
}

/* ==================== PAGES DE CONTENU (Histoire, Technologies, Performances) ==================== */

/* Contenu principal */
.content {
  max-width: 1400px;
  margin: 0 auto;
  margin-top: 90px;
  padding: 0 50px;
}

/* Bannière en haut */
.banner {
  width: 100%;
  height: 300px;
  margin-top: 70px;
  overflow: hidden;
}

.banner img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Section introduction */
.intro-section {
  text-align: center;
  margin-bottom: 50px;
  padding: 0 20px;
}

.intro-section h1 {
  font-size: 42px;
  color: #2c2c2c;
  margin-bottom: 20px;
}

.intro-section p {
  font-size: 18px;
  line-height: 1.8;
  color: #555;
}

/* Section avec image encadrée */
.highlight-section {
  margin: 50px 20px;
  padding: 20px;
  border: 3px solid #2c2c2c;
  border-radius: 10px;
}

.highlight-section img {
  width: 100%;
  height: 400px;
  object-fit: cover;
  border-radius: 5px;
}

/* Bloc de texte simple */
.text-block {
  margin: 40px 0;
  padding: 0 50px;
}

.text-block p {
  font-size: 16px;
  line-height: 1.8;
  color: #555;
  text-align: justify;
}

/* Sections avec image + texte */
.content-row {
  display: flex;
  gap: 40px;
  margin: 60px 20px;
  align-items: center;
}

.content-row.reverse {
  flex-direction: row-reverse;
}

.content-image {
  flex: 1;
}

.content-image img {
  width: 100%;
  height: 350px;
  object-fit: cover;
  border-radius: 10px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.content-image video {
  width: 100%;
  height: 350px;
  object-fit: cover;
  border-radius: 10px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.content-text {
  flex: 1;
}

.content-text h2 {
  font-size: 28px;
  color: #2c2c2c;
  margin-bottom: 20px;
}

.content-text p {
  font-size: 16px;
  line-height: 1.8;
  color: #555;
  margin-bottom: 15px;
  text-align: justify;
}

/* ==================== PAGE MODÈLES ==================== */

/* Sélecteur de modèle */
.model-selector-section {
  text-align: center;
  margin: 50px auto;
  max-width: 600px;
}

.model-selector-section label {
  display: block;
  font-size: 20px;
  font-weight: 600;
  color: #2c2c2c;
  margin-bottom: 15px;
}

.model-selector-section select {
  width: 100%;
  padding: 15px 20px;
  font-size: 16px;
  font-family: "Segoe UI", "Roboto", "Helvetica Neue", "Arial", sans-serif;
  border: 2px solid #2c2c2c;
  border-radius: 10px;
  background-color: white;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.model-selector-section select:hover {
  border-color: #000;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.model-selector-section select:focus {
  outline: none;
  border-color: #2c2c2c;
  box-shadow: 0 0 0 3px rgba(44, 44, 44, 0.1);
}

/* Affichage du modèle */
.model-display {
  margin: 60px 20px;
  animation: fadeIn 0.5s ease;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.model-image {
  width: 100%;
  margin-bottom: 40px;
  border-radius: 15px;
  overflow: hidden;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
}

.model-image img {
  width: 100%;
  height: 500px;
  object-fit: cover;
}

.model-info h2 {
  font-size: 36px;
  color: #2c2c2c;
  margin-bottom: 20px;
  text-align: center;
}

.model-info > p {
  font-size: 18px;
  line-height: 1.8;
  color: #555;
  text-align: center;
  margin-bottom: 40px;
  padding: 0 20px;
}

/* Motorisation en pleine largeur */
.model-motor-full {
  background: linear-gradient(135deg, #2c2c2c 0%, #434343 100%);
  padding: 30px;
  border-radius: 15px;
  margin-bottom: 30px;
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.2);
}

.model-motor-full h3 {
  font-size: 24px;
  color: white;
  margin-bottom: 15px;
  font-weight: 600;
  text-align: center;
}

.model-motor-full p {
  font-size: 16px;
  color: #f0f0f0;
  line-height: 1.8;
  text-align: center;
}

/* Spécifications du modèle */
.model-specs {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 30px;
  margin-top: 40px;
}

.spec-item {
  background: linear-gradient(135deg, #f5f7fa 0%, #e8edf2 100%);
  padding: 30px;
  border-radius: 15px;
  text-align: center;
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.spec-item:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.15);
}

.spec-item h3 {
  font-size: 20px;
  color: #2c2c2c;
  margin-bottom: 15px;
  font-weight: 600;
}

.spec-item p {
  font-size: 18px;
  color: #333;
  font-weight: 500;
}

/* ==================== RESPONSIVE ==================== */

@media (max-width: 768px) {
  /* Header responsive */
  header {
    padding: 15px 20px;
  }

  nav ul {
    position: fixed;
    top: 70px;
    right: -100%;
    flex-direction: column;
    background: rgba(0, 0, 0, 0.9);
    backdrop-filter: blur(10px);
    width: 250px;
    height: calc(100vh - 70px);
    padding: 30px;
    transition: right 0.3s;
    gap: 20px;
  }

  nav ul.active {
    right: 0;
  }

  .burger {
    display: flex;
  }

  /* Slider responsive */
  .slide-text {
    padding: 60px 20px;
  }

  .slide-text h1 {
    font-size: 32px;
  }

  .slide-text p {
    font-size: 18px;
  }

  .slider-arrow {
    padding: 10px 15px;
    font-size: 18px;
  }

  .slider-arrow.prev {
    left: 10px;
  }

  .slider-arrow.next {
    right: 10px;
  }

  /* Footer responsive */
  footer {
    padding: 30px 20px;
  }

  /* Pages de contenu responsive */
  .content {
    padding: 0 20px;
  }

  .text-block {
    padding: 0 20px;
  }

  .content-row {
    flex-direction: column;
    gap: 20px;
    margin: 40px 20px;
  }

  .content-row.reverse {
    flex-direction: column;
  }

  /* CORRECTION : Forcer l'ordre image puis texte sur mobile */
  .content-row .content-image {
    order: 1;
  }

  .content-row .content-text {
    order: 2;
  }

  /* Pour les .reverse aussi, même ordre sur mobile */
  .content-row.reverse .content-image {
    order: 1;
  }

  .content-row.reverse .content-text {
    order: 2;
  }

  /* Espacement entre les sections */
  .content-row + .content-row {
    margin-top: 50px;
  }

  .content-image {
    padding: 0;
    margin-bottom: 25px;
  }

  .content-image img,
  .content-image video {
    border-radius: 10px;
    margin: 0;
  }

  .content-text {
    padding: 0 20px;
    margin-bottom: 20px;
  }

  .content-text h2 {
    font-size: 24px;
    text-align: center;
  }

  .content-text p {
    font-size: 15px;
  }

  /* Section intro responsive */
  .intro-section {
    padding: 0 20px;
    margin-bottom: 40px;
  }

  .intro-section h1 {
    font-size: 32px;
  }

  .intro-section p {
    font-size: 16px;
  }

  /* Highlight section responsive */
  .highlight-section {
    margin: 30px 20px;
    padding: 15px;
  }

  .highlight-section img {
    height: 250px;
  }

  /* Banner responsive */
  .banner {
    height: 200px;
  }

  /* Page Modèles responsive */
  .model-selector-section {
    margin: 30px 20px;
    padding: 0 20px;
  }

  .model-selector-section select {
    font-size: 15px;
    padding: 12px 15px;
  }

  .model-display {
    margin: 40px 0;
    padding: 0 20px;
  }

  .model-image {
    margin-bottom: 30px;
  }

  .model-image img {
    height: 300px;
  }

  .model-info h2 {
    font-size: 28px;
  }

  .model-info > p {
    font-size: 16px;
  }

  .model-motor-full {
    margin: 0 0 20px 0;
    padding: 20px;
  }

  .model-motor-full h3 {
    font-size: 20px;
  }

  .model-motor-full p {
    font-size: 15px;
  }

  .model-specs {
    grid-template-columns: 1fr;
    gap: 20px;
    margin-top: 30px;
  }

  .spec-item {
    padding: 20px;
  }

  .spec-item h3 {
    font-size: 18px;
  }

  .spec-item p {
    font-size: 16px;
  }
}