/* À noter : l'IA m'a quand même réorganisé le code ; j'ajoutais une modification tout en bas dès que je trouvais nécessaire d'en mettre une. */
/* Aussi me suis-je retrouvé avec 15 mentions de "team-card" dispersées partout dans le code ; l'IA m'a absolument tout réorganisé en blocs propres et lisibles. 👍👍👍 */


/* --- ADAPTATION AU THÈME --- */

:root {
  --bg: #d9d4d4;
  --bg2: #b0b0b0;
  --text: #111111;
  --accent: #ff3b3b;
}

html { color-scheme: light dark; }

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #121212;
    --bg2: #262626;
    --text: #ffffff;
    --accent: #00ffe5;
  }
}




/* --- STRUCTURE ET TYPOGRAPHIE --- */

body {
  background: var(--bg);
  color: var(--text);
  font-family: Ubuntu, sans-serif;
  margin: 0;
  padding: 0;
}

h1 {
  font-family: Ubuntu;
  background: linear-gradient(130deg, var(--text), #ff0000);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  text-align: center;
}

h2 { 
  font-family: Ubuntu;
}

h5 { 
  text-align: center;
  margin-top: 0px; 
}

.title_box {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 5px;
  text-align: center;
}

.title_box h1 {
  margin: 0;
  white-space: nowrap;
}

.title_box .logo {
  height: 50px;
  object-fit: contain;
}

.title_box h5 { 
  text-align: center;
  width: 100%;
}




/* --- SECTIONS ET NAVIGATION --- */

.team-section {
  position: relative;
  overflow: hidden;
  padding: 0;
  margin-bottom: 10px;
}

.scroll-track {
  padding: 10px 20px;
  display: flex;
  gap: 20px;
  overflow-x: auto;
  scroll-behavior: smooth;
  padding-bottom: 10px;
}

.scroll-track img {
  height: 300px;
  object-fit: contain;
  border-radius: 15px;
  flex-shrink: 0;
}

.scroll-slider {
  width: 80%;
  margin: 10px auto 0;
  display: block;
}




/* --- DISCLAIMER --- */

.disclaimer {
    padding: 40px 20px;
    background-color: var(--bg);
    color: var(--bg2);
    text-align: center;
    font-size: 0.8rem;
    line-height: 1.5;
    border-top: 1px solid #222;
}

.disclaimer p {
    max-width: 800px;
    margin: 0 auto;
}




/* --- CARTES ET BOUTONS --- */

.team-card {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  padding: 30px;
  border-radius: 20px;
  width: 300px;
  background: color-mix(in srgb, var(--bg) 80%, transparent);
  backdrop-filter: blur(10px);
  box-shadow: 0 10px 40px rgba(0,0,0,0.2);
  z-index: 10;
}

.team-card.left { left: 2%; }
.team-card.right { right: 2%; }

button.buybutton {
  position: relative;
  z-index: 0;
  border: solid 1px #fff;
  padding: 8px 20px;
  font-size: 16px;
  font-weight: 600;
  border-radius: 15px;
  cursor: pointer;
  overflow: hidden;
  width: 100%;
  text-align: center;
  transition: color 0.3s ease;
  background: var(--bg2);
}

button.buybutton span {
  position: relative;
  z-index: 1;
  color: #000;
}

button.buybutton::before {
  content: "";
  position: absolute;
  inset: 0;
  opacity: 0;
  border-radius: 15px;
  z-index: 0;
  background: rgba(255,255,255,0.2);
  transition: opacity 0.3s ease;
}

button.buybutton:hover::before { opacity: 1; }




/* --- STYLES DES ÉQUIPES --- */

.ferrari button.buybutton { background: linear-gradient(90deg, white, #ff3b3b); }
.ferrari button.buybutton::before { background: linear-gradient(90deg, #ff3b3b, white); }

.redbull button.buybutton { background: linear-gradient(90deg, white, #001171); }
.redbull button.buybutton::before { background: linear-gradient(90deg, #001171, white); }

.mclaren button.buybutton { background: linear-gradient(90deg, white, #ff8700); }
.mclaren button.buybutton::before { background: linear-gradient(90deg, #ff8700, white); }

.astonmartin button.buybutton { background: linear-gradient(90deg, white, #006f4c); }
.astonmartin button.buybutton::before { background: linear-gradient(90deg, #006f4c, white); }

.alpine button.buybutton { background: linear-gradient(90deg, white, #ff68ed); }
.alpine button.buybutton::before { background: linear-gradient(90deg, #ff68ed, white); }

.haas button.buybutton { background: linear-gradient(90deg, white, #bd9b60); }
.haas button.buybutton::before { background: linear-gradient(90deg, #e6c87e, white); }

.kicksauber button.buybutton { background: linear-gradient(90deg, white, #2bd422); }
.kicksauber button.buybutton::before { background: linear-gradient(90deg, #2bd422, white); }

.mercedes button.buybutton { background: linear-gradient(90deg, white, #00b4a2); }
.mercedes button.buybutton::before { background: linear-gradient(90deg, #00b4a2, white); }

.vcarb button.buybutton { background: linear-gradient(90deg, white, #9a1eff); }
.vcarb button.buybutton::before { background: linear-gradient(90deg, #9a1eff, white); }

.williams button.buybutton { background: linear-gradient(90deg, white, #347bff); }
.williams button.buybutton::before { background: linear-gradient(90deg, #347bff, white); }




/* --- SECTION ROUES ET PNEUS --- */

.wheels-section {
  display: flex;
  flex-direction: column;
  gap: 40px;
  margin-top: 60px;
}

.wheel-row {
  display: flex;
  align-items: center;
  gap: 20px;
  overflow: hidden;
}

.wheel-row.reverse {
  flex-direction: row-reverse;
}

.wheel-row .scroll-track {
  flex: 1 1 auto;
  min-width: 0;
}

.wheel-row.reverse .scroll-track {
  display: flex;
  transform: scaleX(-1);
}

.wheel-row.reverse .scroll-track img,
.wheel-row.reverse .scroll-track .wheel-card{
  transform: scaleX(-1);
}

.wheel-card {
  flex-shrink: 0;
  width: 250px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 10px;
  padding: 20px;
  border-radius: 20px;
  background: color-mix(in srgb, var(--bg) 80%, transparent);
  backdrop-filter: blur(10px);
  box-shadow: 0 10px 30px rgba(0,0,0,0.2);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  cursor: pointer;
}

.soft .wheel-card { border: 2px solid #ff2b2b; }
.soft .buybutton { background: linear-gradient(90deg, white, #ff2b2b); }
.soft .buybutton:hover { background: linear-gradient(90deg, #ff2b2b, white); }

.medium .wheel-card { border: 2px solid #ffd000; }
.medium .buybutton { background: linear-gradient(90deg, white, #ffd000); }
.medium .buybutton:hover { background: linear-gradient(90deg, #ffd000, white); }

.hard .wheel-card { border: 2px solid #aaaaaa; }
.hard .buybutton { background: linear-gradient(90deg, white, #aaaaaa); }
.hard .buybutton:hover { background: linear-gradient(90deg, #aaaaaa, white); }

.inter .wheel-card { border: 2px solid #00c853; }
.inter .buybutton { background: linear-gradient(90deg, white, #00c853); }
.inter .buybutton:hover { background: linear-gradient(90deg, #00c853, white); }

.wet .wheel-card { border: 2px solid #0077ff; }
.wet .buybutton { background: linear-gradient(90deg, white, #0077ff); }
.wet .buybutton:hover { background: linear-gradient(90deg, #0077ff, white);}




/* --- ADAPTATION MOBILE --- */

@media (max-width: 768px) {
  .scroll-track img { height: 200px; }

  .team-card {
    position: static;
    transform: none;
    margin: 20px auto 0;
    width: 90%;
    text-align: center;
  }

  .wheel-row {
    flex-direction: column;
    align-items: center;
  }

  .wheel-card {
    width: 200px;
    height: auto;
    min-height: 250px;
  }

  .scroll-track img {
    height: 250px;
  }
