/* --- CONFIGURATION GÉNÉRALE --- */
* { margin: 0; padding: 0; box-sizing: border-box; }

body {
  font-family: 'Poppins', sans-serif;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  cursor: url('pneu.png'), auto;
}

#background {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: url("fond.jpg") no-repeat center center fixed;
  background-size: cover;
  z-index: -1;
}

/* --- HEADER --- */
header {
  width: 100%;
  min-height: 150px;
  background: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(15px); 
  display: flex;
  align-items: center;      
  justify-content: space-between; 
  padding: 0 50px;       
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.6);
  z-index: 1000;
}

#logo { height: 110px; width: auto; }

.navigation .nav-button {
  color: white;
  text-decoration: none;
  font-weight: 600;
  font-size: 14px;
  margin: 0 15px;
  padding: 10px 20px;
  border: 2px solid transparent;
  transition: 0.3s;
}

.navigation .nav-button:hover {
  border-color: white;
  background: rgba(255, 255, 255, 0.1);
}

/* --- RÉSEAUX SOCIAUX (COULEURS D'ORIGINE) --- */
.social-icons {
    display: flex;
    gap: 20px;
    align-items: center;
}

.social-link img {
    width: 35px;
    height: 35px;
    object-fit: contain;
    transition: transform 0.3s ease;
    /* Ce filtre magique enlève le fond blanc s'il y en a un */
    mix-blend-mode: screen; 
}

.social-link:hover img {
    transform: scale(1.2);
}

/* --- GRILLE CENTRALE --- */
.accueil-container {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
}

.main-action-grid {
  display: grid;
  grid-template-columns: repeat(2, 300px);
  gap: 30px;
}

.glass-button {
  text-decoration: none;
  background: rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(12px);
  border: 2px solid rgba(255, 255, 255, 0.2);
  border-radius: 15px;
  padding: 40px 20px;
  transition: 0.4s;
}

.glass-button:hover {
  transform: translateY(-8px);
  background: rgba(255, 255, 255, 0.15);
  border-color: #0066FF;
}

.button-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  color: white;
}

.icon { font-size: 35px; margin-bottom: 10px; }

.button-text {
  font-size: 16px;
  font-weight: 300;
  letter-spacing: 1px;
  text-transform: uppercase;
}

/* --- PAGES STOCKS --- */
/* --- AMÉLIORATION LISIBILITÉ STOCKS --- */

/* Titre principal "NOS STOCKS" */
.content-container h1 {
    color: #ffffff !important; 
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.8);
    text-align: center;
    margin-bottom: 40px;
    text-transform: uppercase;
}

.car-grid {
    display: flex; 
    flex-wrap: wrap; 
    justify-content: center;
    gap: 30px; 
    margin-top: 50px;
}

.car-card {
    background: rgba(0, 0, 0, 0.8) !important; /* Plus sombre pour lire le blanc */
    border: 1px solid rgba(255, 255, 255, 0.1);
    width: 350px; 
    border-radius: 10px; 
    overflow: hidden;
    backdrop-filter: blur(5px);
}

.car-card img { 
    width: 100%; 
    height: 180px; 
    object-fit: cover; 
}

/* Infos de la voiture (Titre et texte) */
.car-info {
    padding: 20px;
}

.car-info h3 {
    color: #ffffff !important; /* Nom de la voiture en blanc */
    margin-bottom: 10px;
}

.car-info p {
    color: #cccccc !important; /* Descriptif en gris clair */
    font-size: 0.9rem;
}

.price { 
    color: #0066FF !important; 
    font-weight: 800; 
    padding: 15px;
    font-size: 1.2rem;
    display: block;
}

/*//////////////////////////////////////////////////////////////////////////////////


a, button { cursor: url('pneu.png'), pointer !important; }


/* --- DESIGN SERVICES HARMONISÉ --- */

.sales-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 20px;
  margin-top: 40px;
  padding: 0 5%;
}

.sales-card {
  background: rgba(20, 20, 20, 0.85); /* Noir profond moins agressif */
  border: 1px solid rgba(255, 255, 255, 0.1); /* Bordure très fine */
  padding: 30px;
  border-radius: 12px;
  transition: 0.3s ease;
  text-align: left;
}

.sales-card:hover {
  border-color: #0066FF; /* Rappel du bleu uniquement au survol */
  background: rgba(30, 30, 30, 0.95);
  transform: translateY(-5px);
}

.sales-card .icon {
  color: #0066FF; /* Chiffre bleu */
  font-size: 24px;
  font-weight: 600;
  margin-bottom: 15px;
  font-family: 'Poppins', sans-serif;
}

.sales-card h3 {
  color: #ffffff;
  margin-bottom: 10px;
  font-size: 1.1rem;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.sales-card p {
  color: #bbbbbb; /* Gris clair pour le texte pour un aspect premium */
  font-size: 0.9rem;
  line-height: 1.6;
}

.contact-section {
  text-align: center;
  padding: 60px 20px;
  margin-top: 40px;
}

.contact-button {
  display: inline-block;
  background: transparent;
  color: white;
  border: 2px solid white;
  padding: 15px 35px;
  text-decoration: none;
  font-weight: 600;
  margin-top: 20px;
  transition: 0.3s;
}

.contact-button:hover {
  background: white;
  color: black;
}

/* --- MODALE CONTACT --- */
.modal {
    display: none; 
    position: fixed;
    z-index: 2000;
    left: 0; top: 0;
    width: 100%; height: 100%;
    background-color: rgba(0,0,0,0.8);
    backdrop-filter: blur(8px);
}

.modal-content {
    background: rgba(20, 20, 20, 0.95);
    margin: 15% auto;
    padding: 40px;
    border: 1px solid #0066FF;
    border-radius: 15px;
    width: 350px;
    text-align: center;
    color: white;
    position: relative;
    box-shadow: 0 0 30px rgba(0, 102, 255, 0.3);
}

.close-button {
    position: absolute;
    right: 20px; top: 10px;
    color: #aaa;
    font-size: 28px;
    cursor: pointer;
}

.close-button:hover { color: white; }

.contact-info p { margin: 20px 0; font-size: 1.1rem; }
.contact-info a { color: #0066FF; text-decoration: none; font-weight: bold; }

.availability { font-size: 0.8rem; color: #888; margin-top: 20px; }

/* Style spécifique pour le texte des mentions légales */
/* --- CORRECTION FENÊTRE MODALE --- */
.modal-content {
    background: rgba(20, 20, 20, 0.95);
    margin: 5% auto; /* Réduit la marge du haut pour laisser plus de place */
    padding: 30px;
    border: 1px solid #0066FF;
    border-radius: 15px;
    width: 90%; /* Prend plus de largeur sur mobile */
    max-width: 600px;
    color: white;
    position: relative;
    box-shadow: 0 0 30px rgba(0, 102, 255, 0.3);
    
    /* Empêche la fenêtre de déborder de l'écran */
    max-height: 85vh; 
    overflow-y: auto; /* Active le scroll automatique si le texte est trop long */
}

/* On s'assure que le contenu des mentions légales s'adapte bien */
.legal-scroll {
    margin-top: 20px;
    padding-right: 10px;
}

/* Personnalisation de la barre de défilement pour rester "Pro" */
.modal-content::-webkit-scrollbar {
    width: 6px;
}
.modal-content::-webkit-scrollbar-thumb {
    background: #0066FF;
    border-radius: 10px;
}

/* --- ADAPTATION MOBILES (Écrans de moins de 768px) --- */
@media screen and (max-width: 768px) {
  
  /* 1. Ajustement du Header (Menu) */
  header {
    flex-direction: column; /* Aligne le logo, le menu et les réseaux les uns sous les autres */
    padding: 15px;
    min-height: auto;
    gap: 15px;
  }

  #logo {
    height: 70px; /* Réduit un peu le logo pour gagner de la place */
  }

  .navigation {
    display: flex;
    flex-wrap: wrap; /* Permet aux boutons de revenir à la ligne proprement si besoin */
    justify-content: center;
    gap: 5px;
  }

  .navigation .nav-button {
    margin: 0;
    padding: 6px 12px;
    font-size: 12px; /* Évite que le texte soit trop gros */
  }

  .social-icons {
    gap: 15px;
  }

  .social-link img {
    width: 28px; /* Réduit légèrement les icônes Insta / TikTok */
    height: 28px;
  }

  /* 2. Ajustement de la Grille de Boutons (Accueil) */
  .main-action-grid {
    grid-template-columns: 1fr; /* Passe d'un tableau à 2 colonnes à 1 seule colonne verticale */
    gap: 15px;
    width: 100%;
    padding: 0 20px; /* Ajoute de l'espace sur les côtés pour ne pas coller aux bords de l'écran */
  }

  .glass-button {
    padding: 25px 15px; /* Réduit la hauteur des boutons pour qu'ils prennent moins de place */
    width: 100%;
  }

  .button-text {
    font-size: 14px; /* Rentre le texte de manière fluide */
    text-align: center;
  }
  
  /* 3. Ajustement de la page des Stocks */
  .content-container h1 {
    font-size: 1.5rem;
    margin-bottom: 20px;
    padding: 0 10px;
  }

  .car-card {
    width: 90%; /* Les cartes de voitures prennent presque toute la largeur sur mobile */
    max-width: 350px;
  }
}