/* Variables pour faciliter les modifications de couleurs */
:root {
    --primary-color: #d82b2b; /* Rouge/Bordeaux */
    --secondary-color: #f8f8f8; /* Arrière-plan clair */
    --text-color: #333;
    --header-bg: #343a40; /* Gris foncé */
    --white: #fff;
    --spacing: 5%;
}

/* Base Styles et Reset */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Roboto', sans-serif;
    color: var(--text-color);
    line-height: 1.6;
    background-color: var(--white);
    scroll-behavior: smooth;
}

a {
    color: var(--primary-color);
    text-decoration: none;
    transition: color 0.3s;
}

a:hover {
    color: #a82222;
}

section {
    padding: 60px var(--spacing);
    text-align: center;
}

h1, h2, h3 {
    margin-bottom: 15px;
    font-weight: 700;
}

/* Entête */
.header {
    background-color: var(--header-bg);
    color: var(--white);
    padding: 15px var(--spacing);
    display: flex;
    justify-content: space-between; 
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 1000;
}

/* Conteneur pour le logo et le titre */
.header-left {
    display: flex;
    align-items: center;
    gap: 15px; /* Espace entre le logo et le titre */
}

/* Style du logo */
.header-logo {
    height: 50px; /* Taille par défaut sur desktop */
    width: auto;
    object-fit: contain;
}

.header h1 {
    /* Styles pour la première ligne (SEO) */
    font-size: 1.4em; 
    margin-bottom: 0; 
    line-height: 1.2;
    display: block; 
    text-align: left; 
}

/* Style pour la seconde ligne (Marque) */
.header .header-brand {
    display: block; /* Force le passage à la ligne */
    font-size: 0.7em; /* Taille plus petite */
    font-weight: 400; 
    opacity: 0.8;
    margin-top: 2px;
}

/* Style pour l'icône de métro */
.header h1 .fa-subway {
    margin-left: 5px;
    font-size: 1.2em;
    color: var(--primary-color);
}


/* Style commun pour les CTA (Header, Hero et Contact) */
.cta-button {
    display: inline-block;
    background-color: var(--primary-color);
    color: var(--white);
    padding: 14px 30px;
    border-radius: 5px;
    font-weight: 700;
    transition: background-color 0.3s;
    /* Styles pour icône + numéro */
    display: flex;
    align-items: center;
    justify-content: center;
    text-transform: none; 
    font-size: 1.1em; 
}

.cta-button i {
    margin-right: 8px;
    font-size: 1em;
}

.cta-button:hover {
    background-color: #a82222;
    text-decoration: none;
}

/* Style spécifique pour le bouton d'appel dans le header */
.header .header-cta {
    background-color: var(--primary-color); 
    color: var(--white);
    padding: 12px 25px; 
    font-size: 1.1em;
    font-weight: 700;
    text-transform: none;
    transition: background-color 0.3s, transform 0.2s;
    border-radius: 5px;
}

.header .header-cta:hover {
    background-color: #a82222;
    transform: scale(1.05); 
}

/* CORRECTION D'AFFICHAGE DU NUMÉRO DE TÉLÉPHONE DANS LE HEADER */
.header .header-cta,
.header .header-cta i { 
    color: var(--white) !important; /* FORCÉ EN BLANC */
}


/* Section Hero (Fond d'image) */
.hero {
    /* ASSUREZ-VOUS QUE 'rue-fond.jpg' EXISTE AU BON ENDROIT */
    background: linear-gradient(rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0.5)), url('rue-fond.jpg') no-repeat center center/cover;
    color: var(--white);
    min-height: 60vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 80px var(--spacing);
    position: relative;
}

.hero-content {
    flex: 0 1 auto;
    max-width: 800px;
    z-index: 1;
}

.hero h2 {
    font-size: 3.5em;
    color: var(--white);
    line-height: 1.1;
    text-transform: uppercase;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.7);
}

/* Style pour l'information de prix */
.hero .price-info {
    font-size: 1.8em;
    font-weight: 700;
    color: #ffcc00; /* Couleur pour mettre en valeur le prix */
    margin-top: -20px; 
    margin-bottom: 30px;
    text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.7);
}

.hero p {
    font-size: 2em;
    margin-bottom: 30px;
    font-weight: 400;
    text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.7);
}
/* Réajustement pour le premier <p> dans hero */
.hero-content p:first-of-type {
    font-size: 2em;
    margin-bottom: 30px;
    font-weight: 400;
    text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.7);
}


/* Section Caractéristiques */
.features {
    background-color: var(--white);
    display: flex;
    justify-content: space-around;
    gap: 30px;
}

.feature-item {
    flex: 1;
    /* Augmenter la taille des items */
    max-width: 350px; /* Plus large */
    padding: 40px; /* Plus de padding */
    border-radius: 8px;
    border: 1px solid #ddd;
    transition: box-shadow 0.3s;
}
.feature-item:hover {
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

.feature-item .icon {
    font-size: 4em; /* Plus grosse icône */
    display: block;
    margin-bottom: 20px;
}

.feature-item h3 {
    font-size: 1.5em; /* Titre plus gros */
}

.feature-item p {
    font-size: 1.1em; /* Texte plus gros */
}


/* Section Galerie (Grille Simple) */
.gallery {
    background-color: var(--secondary-color);
}

.gallery-grid {
    display: grid;
    /* 3 colonnes sur desktop, s'adapte au minimum 280px */
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
    margin: 30px auto;
    max-width: 1200px; /* Limiter la largeur de la grille */
}

/* Le lien <a> autour de l'image est aussi un bloc */
.gallery-grid a {
    display: block;
    line-height: 0; /* Élimine l'espace sous l'image causé par le lien */
}

.gallery-grid img {
    width: 100%;
    height: 250px;
    object-fit: cover;
    border-radius: 6px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s;
    cursor: pointer;
}

.gallery-grid img:hover {
    transform: scale(1.02);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
}

/* Section Contact (Style Amélioré) */
.contact-section {
    background-color: var(--white);
    box-shadow: 0 -5px 15px rgba(0, 0, 0, 0.05); 
}

.contact-content {
    display: flex;
    justify-content: center;
    gap: 50px;
    margin-top: 30px;
    flex-wrap: wrap; 
    padding-bottom: 40px;
}

.contact-details, .contact-form {
    text-align: left;
    max-width: 400px;
    padding: 20px;
    border: 1px solid #ddd;
    border-radius: 8px;
    background-color: #fcfcfc;
}

.phone-number a {
    /* ANCIENNE RÈGLE À NE PLUS UTILISER : color: var(--primary-color); */
    font-size: 1.6em;
    font-weight: 700;
}

.contact-details p {
    margin-bottom: 5px;
}

.contact-form {
    background-color: var(--secondary-color);
    text-align: center;
    border: none;
}

.map-container {
    width: 100%;
    margin-top: 20px;
}

.map-container h3 {
    margin-bottom: 20px;
    color: var(--primary-color);
}

.map-container iframe {
    width: 100%;
    height: 450px;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

/* Pied de page (Style Amélioré) */
footer {
    background-color: var(--header-bg);
    color: var(--white);
    text-align: center;
    padding: 25px var(--spacing);
    font-size: 0.9em;
    border-top: 5px solid var(--primary-color);
}

footer a {
    color: var(--white);
    font-weight: 700;
}

/* Style pour la note de prix */
.disclaimer-price {
    font-size: 0.8em;
    margin-top: 5px;
    margin-bottom: 10px;
    color: #cccccc; 
}


/* -------------------------------------- */
/* STYLE DE LA MODALE / LIGHTBOX */
/* -------------------------------------- */

.modal {
  display: none; 
  position: fixed; 
  z-index: 2000; 
  padding-top: 50px; 
  left: 0;
  top: 0;
  width: 100%; 
  height: 100%; 
  overflow: auto; 
  background-color: rgba(0,0,0,0.9); 
}

.modal-content {
  margin: auto;
  display: block;
  width: 90%;
  max-width: 900px;
  position: relative;
}

#modalImage {
  width: 100%;
  height: auto;
  max-height: 80vh;
  object-fit: contain;
}

#caption {
  margin: auto;
  display: block;
  width: 80%;
  max-width: 700px;
  text-align: center;
  color: #ccc;
  padding: 10px 0;
  height: 50px;
}

.close {
  position: absolute;
  top: 15px;
  right: 35px;
  color: #f1f1f1;
  font-size: 40px;
  font-weight: bold;
  transition: 0.3s;
  z-index: 2001;
}

.close:hover,
.close:focus {
  color: #bbb;
  text-decoration: none;
  cursor: pointer;
}

.prev, .next {
  cursor: pointer;
  position: absolute;
  top: 50%;
  width: auto;
  padding: 16px;
  margin-top: -50px;
  color: white;
  font-weight: bold;
  font-size: 20px;
  transition: 0.6s ease;
  border-radius: 0 3px 3px 0;
  user-select: none;
  -webkit-user-select: none;
}

.next {
  right: 0;
  border-radius: 3px 0 0 3px;
}

.prev:hover, .next:hover {
  background-color: rgba(0, 0, 0, 0.8);
}


/* -------------------------------------- */
/* RÉACTIVITÉ (RESPONSIVE)        */
/* -------------------------------------- */

@media (max-width: 900px) {
    /* Entête */
    .header {
        flex-direction: column;
        padding: 10px var(--spacing); 
        /* Enlève le centrage principal, mais le flex-direction: column le centre horizontalement par défaut */
        align-items: center; 
    }
    
    /* Conteneur logo + titre sur mobile/tablette */
    .header-left {
        /* Force les éléments à s'aligner à GAUCHE */
        width: 100%; 
        display: flex;
        flex-direction: row; /* Force le logo et le titre à rester l'un à côté de l'autre */
        align-items: center;
        justify-content: flex-start; /* Aligne le groupe à gauche */
        gap: 10px; /* Petit espace entre le logo et le texte */
        order: 2; 
        margin-top: 5px;
    }

    .header-logo {
        height: 40px; /* Taille ajustée du logo */
    }

    .header h1 {
        /* Le H1 doit maintenant se comporter comme un bloc aligné à gauche */
        font-size: 1.2em;
        text-align: left; /* Aligne le texte à gauche */
        width: auto; /* Permet au h1 de ne prendre que l'espace nécessaire */
        margin-bottom: 0;
    }
    .header .header-brand {
        display: block; 
        font-size: 0.6em; 
    }
    
    /* Positionnement du CTA */
    .header .header-cta {
        order: 1; 
        margin-bottom: 10px;
        font-size: 1em;
        width: auto;
    }
    
    /* Caractéristiques */
    .features {
        flex-direction: column;
        align-items: center;
    }
    .feature-item {
        max-width: 90%;
        margin-bottom: 20px;
    }
    
    /* Autres sections inchangées pour 900px */
    .hero h2 { font-size: 2.8em; }
    .hero p { font-size: 1.6em; }
    .hero .price-info { font-size: 1.4em; }
    .gallery-grid { grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); }
    .contact-content { flex-direction: column; align-items: center; gap: 40px; }
    .contact-details, .contact-form { max-width: 90%; text-align: center; }
    .contact-details p { text-align: center; }
    .prev, .next { top: 60%; }
}

@media (max-width: 500px) {
    /* Entête sur très petit écran */
    .header {
        padding: 8px var(--spacing); 
    }
    
    /* Conteneur logo + titre (assure l'alignement à gauche) */
    .header-left {
        gap: 8px;
    }
    
    .header h1 {
        font-size: 0.9em; 
        margin-bottom: 0; 
        margin-top: 5px;
    }
    .header .header-brand {
        font-size: 0.5em; 
    }
    .header-logo {
        height: 30px; /* Encore plus petit sur les très petits écrans */
    }
    .header .header-cta {
        font-size: 0.9em;
        padding: 8px 10px; 
        margin-bottom: 5px; /* Réduire la marge */
    }
    
    /* Caractéristiques: taille adaptée au mobile */
    .feature-item {
        padding: 30px 20px;
    }
    .feature-item .icon {
        font-size: 3em;
        margin-bottom: 15px;
    }
    .feature-item h3 {
        font-size: 1.4em; 
    }
    .feature-item p {
        font-size: 1em; 
    }

    /* Autres sections inchangées pour 500px */
    section { padding: 40px var(--spacing); }
    .hero h2 { font-size: 2em; }
    .hero p { font-size: 1.2em; }
    .hero .price-info { font-size: 1.2em; }
    .gallery-grid { grid-template-columns: 1fr; }
    .prev, .next { top: 65%; font-size: 16px; padding: 10px; }
}

/* -------------------------------------- */
/* STYLE DU FORMULAIRE DE CONTACT (formulaire.php) */
/* -------------------------------------- */

/* Styles des champs, y compris le champ Remarques et textarea */
input[type="text"], 
input[type="email"], 
input[type="tel"], 
select, 
input[type="date"],
textarea { /* Inclusion de textarea pour le style */
    width: 100%; 
    padding: 10px; 
    border: 1px solid #ccc; 
    border-radius: 4px; 
    box-sizing: border-box; 
    font-size: 16px;
    resize: vertical; /* Permet de redimensionner verticalement seulement */
}

.form-section {
    /* Utilise la classe 'section' pour les marges, nous fixons juste le fond */
    background-color: var(--secondary-color); 
}

.form-section h2 {
    color: var(--primary-color);
}

.form-section p {
    margin-bottom: 20px;
}

.form-section form {
    max-width: 600px;
    margin: 30px auto;
    padding: 30px;
    background-color: var(--white); 
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
    text-align: left;
}

.form-group { 
    margin-bottom: 20px; 
}

.form-group label { 
    display: block; 
    margin-bottom: 5px; 
    font-weight: 700; 
    color: var(--text-color); 
}

/* Groupes de radios (Type de véhicule) */
.radio-group {
    display: flex;
    flex-wrap: wrap;
    gap: 15px; 
}

.radio-group label {
    font-weight: 400; 
    display: inline-flex;
    align-items: center;
    cursor: pointer;
}

/* Case à cocher (Autorisation) */
.checkbox-group {
    display: flex;
    align-items: flex-start;
    margin-top: 30px;
}

.checkbox-group input[type="checkbox"] {
    flex-shrink: 0;
    margin-top: 3px;
    width: auto;
}

.checkbox-group label {
    margin-left: 10px;
    font-weight: 400;
    line-height: 1.4;
    text-align: left;
    font-size: 0.9em;
}


/* Bouton d'envoi */
.form-section button[type="submit"] {
    width: 100%;
    margin-top: 20px;
    /* Utilise le style du CTA principal de votre site */
    background-color: var(--primary-color); 
    color: var(--white);
    padding: 14px 30px;
    border-radius: 5px;
    font-weight: 700;
    transition: background-color 0.3s;
    border: none;
    font-size: 1.1em; 
    cursor: pointer;
}

/* Messages de statut (Succès/Erreur) */
.message-success { 
    background-color: #d4edda; 
    color: #155724; 
    padding: 20px; 
    border-radius: 5px; 
    border: 1px solid #c3e6cb; 
    margin: 30px auto; 
    max-width: 600px;
    text-align: left;
}

.message-error { 
    background-color: #f8d7da; 
    color: #721c24; 
    padding: 20px; 
    border-radius: 5px; 
    border: 1px solid #f5c6cb; 
    margin: 30px auto; 
    max-width: 600px;
    text-align: left;
}

/* Réactivité pour le formulaire */
@media (max-width: 600px) {
    .form-section form {
        padding: 20px;
    }
    .radio-group {
        flex-direction: column; 
        gap: 8px;
    }
}
/* -------------------------------------- */
/* STYLE BOUTON CTA SECONDAIRE (index.html) */
/* -------------------------------------- */

.cta-button.cta-secondary {
    /* Style secondaire: fond blanc/gris, texte couleur primaire */
    background-color: var(--white);
    color: var(--primary-color);
    border: 2px solid var(--primary-color);
    padding: 12px 25px; /* Légèrement moins gros que le CTA d'appel principal */
    font-size: 1em;
}

.cta-button.cta-secondary:hover {
    background-color: var(--secondary-color); /* Léger fond gris au survol */
    color: var(--primary-color);
    transform: scale(1.05);
    border-color: #a82222;
}

/* Assurer la cohérence du positionnement pour les deux CTA */
.contact-details .cta-button {
    width: 100%; /* S'assurer que les deux boutons prennent la même largeur */
    max-width: 300px; /* Limiter la largeur totale du CTA */
    margin: 0 auto;
}