@import url('https://fonts.googleapis.com/css2?family=Roboto:wght@400;500;700&family=Poppins:wght@400;500;700&display=swap');

/* ---------- RESET + BASE ---------- */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --main: #F54927;
  --accent: #ff6745;
}

body {
  font-family: 'Poppins', sans-serif;
  background: #121212;
  color: #fff;
  min-height: 100vh;
  overflow-x: hidden;
}

/* ---------- HEADER ---------- */
header {
  position: sticky;
  top: 0;
  width: 100%;
  background: #1e1e1e;
  display: grid;
  grid-template-columns: auto 1fr auto; /* logo | search | nav */
  align-items: center;
  column-gap: 20px;
  padding: 12px 30px;
  box-shadow: 0 3px 8px rgba(0,0,0,0.4);
  z-index: 1000;
}

/* Logo */
.logo a {
  font-size: 1rem;
  text-decoration: none;
  color: deeppink;
  text-transform: uppercase;
  letter-spacing: 10px;
  white-space: nowrap;
}
.logo a span {
  font-size: 2rem;
  text-decoration: none;
  color: white;
}

/* ---------- SEARCH BAR ---------- */
.search-bar {
  justify-self: center;
  width: 100%;
  max-width: 350px;
}
.search-bar form {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #2a2a2a;
  border-radius: 25px;
  padding: 3px 8px;
  box-shadow: 0 0 5px rgba(255,255,255,0.1);
}
.search-bar input {
  flex: 1;
  background: none;
  border: none;
  outline: none;
  color: #fff;
  padding: 8px 10px;
  font-size: 15px;
}
.search-bar button {
  background: var(--main);
  border: none;
  border-radius: 50%;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 16px;
  cursor: pointer;
  transition: background 0.2s;
}
.search-bar button:hover {
  background: var(--accent);
}

/* ---------- NAVIGATION ---------- */
nav {
  justify-self: end;
  transition: all 0.3s ease;
  font-family: 'Roboto', sans-serif;
}
nav ul {
  list-style: none;
  display: flex;
  align-items: center;
  gap: 25px;
}
nav ul li a {
  text-decoration: none;
  color: #fff;
  font-weight: 500;
  transition: 0.3s;
}
nav ul li a:hover {
  color: var(--main);
}

/* ======================================================
   ==========  SECTION "NOS MODÈLES"  ==========
====================================================== */
#modeles-section {
  z-index: 999;
  background: rgba(18, 18, 18, 0.95);
  backdrop-filter: blur(6px);
  box-shadow: 0 2px 10px rgba(0,0,0,0.6);
  border-bottom: 1px solid rgba(255,255,255,0.05);
  padding: 10px 0;
  overflow: hidden;
  position: relative; /* base : normal, scrollable */
}

/* ---------- WRAPPER DU CARROUSEL ---------- */
.modeles-wrapper {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  max-width: 100%;
  margin: 0 auto;
  overflow: hidden;
}

/* ---------- LISTE HORIZONTALE ---------- */
.submenu-models {
  display: flex;
  gap: 15px;
  overflow-x: auto;
  scroll-behavior: smooth;
  padding: 5px 40px;
  list-style: none;
  margin: 0;
  -webkit-overflow-scrolling: touch;
  scroll-snap-type: x mandatory;
}
.submenu-models::-webkit-scrollbar {
  display: none;
}

/* ---------- CARTES MODÈLES ---------- */
.submenu-models li a {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  background: #2a2a2a;
  color: #fff;
  border-radius: 10px;
  width: 105px;
  height: 125px;
  transition: all 0.3s ease;
  box-shadow: 0 3px 8px rgba(0,0,0,0.4);
  scroll-snap-align: center;
}
.submenu-models li a:hover {
  background: var(--main);
  transform: translateY(-5px);
}

/* ---------- IMAGES ---------- */
.submenu-models img {
  width: 100px;
  height: 100px;
  border-radius: 50%;
  object-fit: cover;
  margin-bottom: 0px;
  border: 2px solid rgba(255,255,255,0.15);
  transition: all 0.3s ease;
}
.submenu-models li a:hover img {
  border-color: #fff;
  transform: scale(1.08);
}

/* ---------- NOM DU MODÈLE ---------- */
.submenu-models span {
  font-size: 13px;
  text-align: center;
  font-family: 'Roboto', sans-serif;
}

/* ---------- FLÈCHES ---------- */
.scroll-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(245,73,39,0.9);
  border: none;
  color: #fff;
  font-size: 22px;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
  z-index: 5;
}
.scroll-btn:hover {
  background: var(--accent);
  transform: translateY(-50%) scale(1.1);
}
.scroll-btn.left { left: 5px; }
.scroll-btn.right { right: 5px; }

/* ---------- EFFETS DE BORD ---------- */
#modeles-section::before,
#modeles-section::after {
  content: "";
  position: absolute;
  top: 0;
  width: 50px;
  height: 100%;
  z-index: 3;
  pointer-events: none;
}
#modeles-section::before {
  left: 0;
  background: linear-gradient(to right, #121212 60%, transparent);
}
#modeles-section::after {
  right: 0;
  background: linear-gradient(to left, #121212 60%, transparent);
}

/* ---------- ANIMATION APPARITION ---------- */
.fade-section {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 0.6s, transform 0.6s;
}
.fade-section.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ---------- LIVE SEARCH RESULTS ---------- */
.search-results {
  position: absolute;
  top: 60px;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: 350px;
  background: #1c1c1c;
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 10px;
  box-shadow: 0 4px 10px rgba(0,0,0,0.5);
  display: none;
  z-index: 2000;
  overflow: hidden;
}
.search-results .search-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  color: #fff;
  text-decoration: none;
  transition: background 0.3s;
}
.search-results .search-item:hover {
  background: #F54927;
}
.search-results img {
  width: 45px;
  height: 45px;
  object-fit: cover;
  border-radius: 50%;
  border: 2px solid #333;
}
.search-results .info {
  display: flex;
  flex-direction: column;
}
.search-results .info strong {
  font-size: 14px;
  font-weight: 600;
}
.search-results .info span {
  font-size: 12px;
  color: #ccc;
}
.search-results .no-result {
  padding: 10px;
  text-align: center;
  font-size: 13px;
  color: #aaa;
}

/* Surbrillance du texte */
mark {
  background: none;
  color: #F54927;
  font-weight: 600;
}

/* ---------- BURGER MENU ---------- */
.burger {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  width: 28px;
  height: 22px;
  justify-content: center;
  align-items: center;
  transition: all 0.3s ease;
  z-index: 1100;
}
.burger span {
  width: 100%;
  height: 3px;
  background: white;
  border-radius: 5px;
  transition: all 0.3s ease;
}
.burger.open span:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
}
.burger.open span:nth-child(2) {
  opacity: 0;
}
.burger.open span:nth-child(3) {
  transform: rotate(-45deg) translate(6px, -6px);
}

/* ===========================
   FOOTER WIKIX
=========================== */
.site-footer {
  background: #111;
  border-top: 1px solid rgba(255,255,255,0.05);
  color: #ddd;
  margin-top: 40px;
  padding: 30px 25px 15px;
  font-family: 'Poppins', sans-serif;
}

.site-footer a {
  color: #ccc;
  text-decoration: none;
  transition: color 0.2s ease, transform 0.2s ease;
}
.site-footer a:hover {
  color: #F54927;
  transform: translateX(2px);
}

/* Top */
.footer-top {
  max-width: 1200px;
  margin: 0 auto 15px;
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1.4fr;
  gap: 25px;
  align-items: flex-start;
}

/* Colonnes */
.footer-col h4 {
  font-size: 16px;
  margin-bottom: 10px;
  color: #F54927;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.footer-col ul {
  list-style: none;
  padding: 0;
  margin: 0;
}
.footer-col ul li {
  margin-bottom: 6px;
  font-size: 14px;
}

/* Logo + slogan */
.footer-logo p {
  font-size: 3rem;
  text-decoration: none;
  color: deeppink;
  text-transform: uppercase;
  letter-spacing: 10px;
}
.footer-logo span {
  font-size: 3.5rem;
  text-decoration: none;
  color: white;
}
.footer-slogan {
  font-size: 13px;
  color: #bbb;
  line-height: 1.5;
}

/* Réseaux sociaux */
.footer-social-links {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 8px;
}
.footer-social-links a {
  font-size: 14px;
}
.footer-disclaimer {
  font-size: 11px;
  color: #888;
  line-height: 1.4;
}

/* Bas de footer */
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.06);
  margin-top: 10px;
  padding-top: 10px;
  text-align: center;
  font-size: 12px;
  color: #777;
}

/* ---------- TABLETTE (max 1024px) ---------- */
@media (max-width: 1024px) {
  header {
    padding: 10px 20px;
  }

  .logo a {
    font-size: 2.3rem;
    letter-spacing: 7px;
  }
  .logo a span {
    font-size: 2.6rem;
  }

  .footer-top {
    grid-template-columns: 1.5fr 1fr 1fr;
    gap: 20px;
  }
}

/* ---------- MOBILE / TABLETTE (max 900px) ---------- */
@media (max-width: 900px) {

  /* header en colonne */
  header {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    padding: 10px 15px;
    gap: 10px;
  }

  /* Ligne 1 : logo à gauche, burger à droite */
  .header-top {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
  }

  .logo {
    flex: 1;
  }
  .logo a {
    font-size: 2rem;
    letter-spacing: 5px;
  }
  .logo a span {
    font-size: 2.3rem;
  }

  /* Burger visible */
  .burger {
    display: flex;
  }

  /* Ligne 2 : search full width */
  .search-bar {
    width: 100%;
    max-width: none;
    margin: 0;
    order: 2;
  }

  /* Menu déroulant sous le header */
  nav {
    position: relative;
    top: 0;
    width: 100%;
    background: #1e1e1e;
    border-top: 1px solid deeppink;
    display: flex;              /* ← ajout pour que flex-direction/align-items fonctionnent */
    flex-direction: column;
    align-items: center;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.35s ease, padding 0.35s ease;
    padding: 0;
    box-shadow: 0 4px 10px rgba(0,0,0,0.6);
  }
  nav.active {
    max-height: 320px;
    padding: 20px 0;
  }
  nav ul {
    flex-direction: column;
    gap: 25px;
  }

  .submenu-models {
    padding: 5px 20px;
  }

  .site-footer {
    padding: 24px 18px 12px;
  }
  .footer-top {
    grid-template-columns: 1fr 1fr;
    gap: 18px;
  }
}

/* ---------- MOBILE (max 600px) ---------- */
@media (max-width: 600px) {

  header {
    padding: 8px 12px;
  }

  .logo a {
    font-size: 1.6rem;
    letter-spacing: 3px;
  }
  .logo a span {
    font-size: 1.9rem;
  }

  .search-bar form {
    padding: 2px 6px;
  }
  .search-bar input {
    font-size: 14px;
    padding: 6px 8px;
  }
  .search-bar button {
    width: 32px;
    height: 32px;
    font-size: 14px;
  }

  /* Barre modèles sticky sous le header sur mobile */
  #modeles-section {
    position: sticky;
    top: 120px;
  }

  #modeles-section h2 {
    font-size: 20px;
    margin-bottom: 6px;
  }

  .submenu-models {
    gap: 10px;
    padding: 5px 12px;
  }
  .submenu-models li a {
    width: 90px;
    height: 110px;
  }
  .submenu-models img {
    width: 80px;
    height: 80px;
  }
  .submenu-models span {
    font-size: 12px;
  }

  .scroll-btn {
    display: none;
  }
  #modeles-section::before,
  #modeles-section::after {
    width: 25px;
  }

  .search-results {
    top: 52px;
    max-width: 95vw;
  }

  .site-footer {
    padding: 20px 15px 10px;
  }
  .footer-top {
    grid-template-columns: 1fr;
  }
  .footer-logo p {
    font-size: 2.2rem;
    letter-spacing: 6px;
    text-align: center;
  }
  .footer-logo span {
    font-size: 2.5rem;
  }
  .footer-slogan {
    text-align: center;
  }
  .footer-bottom {
    font-size: 11px;
  }
}

/* Très petit mobile */
@media (max-width: 400px) {
  .logo a {
    font-size: 1.4rem;
    letter-spacing: 2px;
  }
  .logo a span {
    font-size: 1.6rem;
  }

  .submenu-models li a {
    width: 80px;
    height: 100px;
  }
}
