/* ============================================================
   AutoTunisie — Feuille de style principale
   ============================================================ */

/* ---- Variables CSS : couleurs, ombres, arrondis ---- */
:root {
    --bleu-fonce:   #1a2744;
    --bleu:         #1e3a8a;
    --bleu-clair:   #3b82f6;
    --orange:       #f59e0b;
    --orange-fonce: #d97706;
    --blanc:        #ffffff;
    --fond:         #f3f4f8;
    --gris-clair:   #e5e7eb;
    --gris:         #9ca3af;
    --texte:        #1f2937;
    --texte-leger:  #6b7280;
    --succes:       #059669;
    --danger:       #dc2626;
    --ombre:        0 4px 12px rgba(0, 0, 0, 0.08);
    --ombre-lg:     0 10px 30px rgba(0, 0, 0, 0.12);
    --rayon:        10px;
    --rayon-lg:     16px;
    --transition:   all 0.2s ease;
}

/* ---- Réinitialisation de base ---- */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, sans-serif;
    background-color: var(--fond);
    color: var(--texte);
    line-height: 1.6;
}

a {
    text-decoration: none;
    color: inherit;
}

ul {
    list-style: none;
}

img {
    max-width: 100%;
    display: block;
}

/* ---- Conteneur centré ---- */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

/* ============================================================
   EN-TÊTE ET NAVIGATION
   ============================================================ */
.header {
    background-color: var(--bleu-fonce);
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 2px 10px rgba(0,0,0,0.2);
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 70px;
    gap: 1rem;
    /* Empêche le header de déborder sur mobile */
    min-width: 0;
}

/* Logo avec icône voiture */
.logo {
    display: flex;
    align-items: center;
    gap: .6rem;
    color: var(--blanc);
}

.logo-icone {
    width: 32px;
    height: 32px;
    fill: var(--orange);
}

.logo-texte {
    font-size: 1.4rem;
    font-weight: 700;
    letter-spacing: -.5px;
    color: var(--blanc);
}

.nav {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.nav-lien {
    color: rgba(255,255,255,.8);
    font-weight: 500;
    font-size: .95rem;
    padding: .4rem 0;
    border-bottom: 2px solid transparent;
    transition: var(--transition);
}

.nav-lien:hover,
.nav-lien.actif {
    color: var(--blanc);
    border-bottom-color: var(--orange);
}

/* Bouton "Administration" dans le nav */
.btn-admin {
    background-color: var(--orange);
    color: var(--bleu-fonce) !important;
    padding: .45rem 1.1rem !important;
    border-radius: 6px;
    font-weight: 600;
    border-bottom: none !important;
}

.btn-admin:hover {
    background-color: var(--orange-fonce);
}

.main {
    min-height: calc(100vh - 70px - 250px);
}

/* ============================================================
   SECTION HÉROS
   ============================================================ */
.hero {
    background: linear-gradient(135deg, var(--bleu-fonce) 0%, var(--bleu) 60%, #1d4ed8 100%);
    color: var(--blanc);
    padding: 5rem 0 4rem;
    text-align: center;
    position: relative;
    overflow: hidden;
}

/* Cercle décoratif en arrière-plan */
.hero::before {
    content: '';
    position: absolute;
    top: -100px;
    right: -100px;
    width: 400px;
    height: 400px;
    background: rgba(255,255,255,.04);
    border-radius: 50%;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: .5rem;
    background: rgba(245,158,11,.2);
    border: 1px solid rgba(245,158,11,.4);
    color: var(--orange);
    padding: .35rem 1rem;
    border-radius: 50px;
    font-size: .85rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
    letter-spacing: .5px;
}

/* Drapeau SVG inline — petite taille avec coins arrondis */
.drapeau-svg {
    width: 22px;
    height: 15px;
    border-radius: 2px;
    flex-shrink: 0;
    display: block;
}

.hero h1 {
    font-size: clamp(1.8rem, 4vw, 3rem);
    font-weight: 800;
    line-height: 1.2;
    margin-bottom: 1rem;
}

.hero p {
    font-size: 1.1rem;
    color: rgba(255,255,255,.75);
    margin-bottom: 2rem;
}

/* Badge saison actuelle */
.saison-badge {
    display: inline-block;
    background: rgba(255,255,255,.12);
    border: 1px solid rgba(255,255,255,.2);
    color: var(--blanc);
    padding: .6rem 1.4rem;
    border-radius: 50px;
    font-size: .9rem;
    backdrop-filter: blur(4px);
}

/* ============================================================
   FILTRES PAR MARQUE
   ============================================================ */
.filtres-section {
    background-color: var(--blanc);
    border-bottom: 1px solid var(--gris-clair);
    padding: 1rem 0;
}

.filtres {
    display: flex;
    gap: .6rem;
    flex-wrap: wrap;
    align-items: center;
}

.filtre-btn {
    background: none;
    border: 2px solid var(--gris-clair);
    color: var(--texte-leger);
    padding: .45rem 1.1rem;
    border-radius: 50px;
    font-size: .88rem;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
}

.filtre-btn:hover {
    border-color: var(--bleu-clair);
    color: var(--bleu-clair);
}

/* Bouton de filtre actif */
.filtre-btn.actif {
    background-color: var(--bleu-fonce);
    border-color: var(--bleu-fonce);
    color: var(--blanc);
}

/* ============================================================
   SECTION VOITURES — GRILLE ET CARTES
   ============================================================ */
.voitures-section {
    padding: 3rem 0 4rem;
}

.section-titre {
    font-size: 1.6rem;
    font-weight: 700;
    margin-bottom: 2rem;
    display: flex;
    align-items: baseline;
    gap: 1rem;
}

.section-compte {
    font-size: .9rem;
    font-weight: 400;
    color: var(--texte-leger);
}

/* Grille responsive des cartes voiture */
.grille-voitures {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(290px, 1fr));
    gap: 1.5rem;
}

/* Carte individuelle d'une voiture */
.carte-voiture {
    background: var(--blanc);
    border-radius: var(--rayon-lg);
    box-shadow: var(--ombre);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    transition: var(--transition);
    animation: fadeIn .3s ease;
}

.carte-voiture:hover {
    transform: translateY(-4px);
    box-shadow: var(--ombre-lg);
}

/* Zone image de la carte */
.carte-image {
    position: relative;
    height: 200px;
    background-color: #e8ecf4;
    overflow: hidden;
}

.carte-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .4s ease;
}

.carte-voiture:hover .carte-image img {
    transform: scale(1.04);
}

/* Placeholder quand il n'y a pas de photo */
.image-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #dde3f0, #c8d0e8);
}

.image-placeholder span {
    font-size: 4rem;
    font-weight: 800;
    color: rgba(26,39,68,.25);
    line-height: 1;
}

.image-placeholder.grande {
    height: 280px;
    border-radius: var(--rayon);
}

/* Badge disponible/indisponible en overlay sur l'image */
.badge-overlay {
    position: absolute;
    top: .75rem;
    left: .75rem;
}

/* Corps de la carte */
.carte-corps {
    padding: 1.2rem;
    flex: 1;
}

.carte-titre {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: .2rem;
}

.carte-annee {
    font-size: .85rem;
    color: var(--texte-leger);
    display: block;
    margin-bottom: .8rem;
}

/* Specs (carburant, transmission, places) */
.carte-specs {
    display: flex;
    flex-wrap: wrap;
    gap: .5rem;
    margin-bottom: 1rem;
}

.carte-specs span {
    font-size: .8rem;
    background-color: var(--fond);
    padding: .25rem .65rem;
    border-radius: 50px;
    color: var(--texte-leger);
}

/* Zone prix */
.carte-prix {
    border-top: 1px solid var(--gris-clair);
    padding-top: .9rem;
}

.prix-principal {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: .3rem;
}

.prix-etiquette {
    font-size: .8rem;
    color: var(--texte-leger);
    font-weight: 500;
}

.prix-montant {
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--bleu);
}

.prix-montant small {
    font-size: .75rem;
    font-weight: 400;
    color: var(--texte-leger);
}

.prix-secondaire {
    font-size: .78rem;
    color: var(--texte-leger);
}

/* Pied de carte avec bouton */
.carte-pied {
    padding: 1rem 1.2rem;
    border-top: 1px solid var(--gris-clair);
}

/* ============================================================
   BADGES DE DISPONIBILITÉ
   ============================================================ */
.badge {
    display: inline-block;
    padding: .3rem .8rem;
    border-radius: 50px;
    font-size: .78rem;
    font-weight: 600;
    letter-spacing: .3px;
}

.badge-disponible {
    background-color: #d1fae5;
    color: #065f46;
}

.badge-indisponible {
    background-color: #fee2e2;
    color: #991b1b;
}

/* ============================================================
   BOUTONS
   ============================================================ */
.btn {
    display: inline-block;
    padding: .6rem 1.4rem;
    border-radius: 8px;
    font-size: .9rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    border: none;
    text-align: center;
}

.btn-principal {
    background-color: var(--bleu);
    color: var(--blanc);
}

.btn-principal:hover {
    background-color: var(--bleu-fonce);
    color: var(--blanc);
}

.btn-secondaire {
    background-color: var(--gris-clair);
    color: var(--texte);
}

.btn-secondaire:hover {
    background-color: #d1d5db;
}

.btn-danger {
    background-color: #fee2e2;
    color: var(--danger);
}

.btn-danger:hover {
    background-color: #fecaca;
}

/* Bouton qui occupe toute la largeur */
.btn-plein {
    display: block;
    width: 100%;
}

.btn:disabled {
    opacity: .45;
    cursor: not-allowed;
}

/* ============================================================
   PAGE DÉTAIL VOITURE
   ============================================================ */
.lien-retour {
    display: inline-block;
    margin: 2rem 0 1.5rem;
    color: var(--texte-leger);
    font-size: .9rem;
    transition: var(--transition);
}

.lien-retour:hover {
    color: var(--bleu);
}

/* Layout deux colonnes */
.detail-voiture {
    display: grid;
    grid-template-columns: 1fr 400px;
    gap: 2.5rem;
    padding-bottom: 4rem;
    align-items: start;
}

.detail-image {
    border-radius: var(--rayon-lg);
    overflow: hidden;
    background-color: #e8ecf4;
    height: 300px;
}

.detail-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.detail-titre {
    font-size: 1.8rem;
    font-weight: 800;
    margin: 1.5rem 0 .5rem;
}

.detail-annee {
    font-size: 1rem;
    font-weight: 400;
    color: var(--texte-leger);
}

.detail-description {
    color: var(--texte-leger);
    margin-bottom: 1.5rem;
    line-height: 1.7;
}

/* Grille des specs techniques */
.specs-grille {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: .8rem;
    margin-bottom: 2rem;
}

.spec-item {
    background: var(--blanc);
    border-radius: var(--rayon);
    padding: .9rem 1rem;
    display: flex;
    flex-direction: column;
    gap: .25rem;
    box-shadow: var(--ombre);
}

.spec-icone { font-size: 1.3rem; }

.spec-label {
    font-size: .75rem;
    color: var(--texte-leger);
    text-transform: uppercase;
    letter-spacing: .5px;
}

.spec-valeur {
    font-weight: 600;
    font-size: .95rem;
}

/* Boîte des tarifs */
.tarifs-box {
    background: var(--blanc);
    border-radius: var(--rayon);
    padding: 1.2rem;
    box-shadow: var(--ombre);
}

.tarifs-box h3 {
    margin-bottom: 1rem;
    font-size: 1rem;
    font-weight: 700;
}

.tarifs-grille {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: .8rem;
}

.tarif-item {
    border: 2px solid var(--gris-clair);
    border-radius: var(--rayon);
    padding: .9rem;
    display: flex;
    flex-direction: column;
    gap: .3rem;
    font-size: .88rem;
    color: var(--texte-leger);
    position: relative;
}

/* Mise en avant du tarif de la saison actuelle */
.tarif-actif {
    border-color: var(--orange);
    background-color: #fffbeb;
}

.tarif-actif strong {
    color: var(--orange-fonce);
}

.tarif-courant-label {
    font-size: .72rem;
    font-weight: 600;
    color: var(--orange-fonce);
    background-color: #fef3c7;
    padding: .15rem .5rem;
    border-radius: 50px;
    align-self: flex-start;
}

/* ---- En-tête du formulaire : titre + badge côte à côte ---- */
.reservation-entete {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: .8rem;
    margin-bottom: 1rem;
    flex-wrap: wrap;
}

.reservation-entete h2 {
    font-size: 1.2rem;
    font-weight: 700;
}

/* ---- Formulaire de réservation ---- */
.formulaire-reservation {
    background: var(--blanc);
    border-radius: var(--rayon-lg);
    padding: 1.8rem;
    box-shadow: var(--ombre-lg);
    position: sticky;
    top: 90px;
}

.formulaire-reservation h2 {
    font-size: 1.2rem;
    font-weight: 700;
    margin-bottom: 1rem;
}

/* Champs de formulaire */
.champ-formulaire {
    margin-bottom: 1rem;
}

.champ-formulaire label {
    display: block;
    font-size: .85rem;
    font-weight: 600;
    color: var(--texte);
    margin-bottom: .4rem;
}

.champ-formulaire input,
.champ-formulaire select,
.champ-formulaire textarea {
    width: 100%;
    padding: .65rem .9rem;
    border: 1.5px solid var(--gris-clair);
    border-radius: 8px;
    font-size: .9rem;
    color: var(--texte);
    background: var(--blanc);
    transition: var(--transition);
    font-family: inherit;
}

.champ-formulaire input:focus,
.champ-formulaire select:focus,
.champ-formulaire textarea:focus {
    outline: none;
    border-color: var(--bleu-clair);
    box-shadow: 0 0 0 3px rgba(59,130,246,.15);
}

/* Résumé du prix calculé en JS */
.resume-prix {
    background: #f0f7ff;
    border: 1.5px solid #bfdbfe;
    border-radius: var(--rayon);
    padding: 1rem;
    margin: 1rem 0;
}

.resume-prix h4 {
    font-size: .9rem;
    margin-bottom: .7rem;
    color: var(--bleu);
}

.resume-ligne {
    display: flex;
    justify-content: space-between;
    font-size: .88rem;
    padding: .3rem 0;
    color: var(--texte-leger);
    border-bottom: 1px solid #e0eeff;
}

.resume-ligne.total {
    padding-top: .5rem;
    margin-top: .2rem;
    border-bottom: none;
    font-size: 1rem;
    font-weight: 700;
    color: var(--texte);
}

.resume-note {
    font-size: .75rem;
    color: var(--texte-leger);
    margin-top: .5rem;
    font-style: italic;
}

/* ---- Boîte de caution ---- */
.depot-box {
    display: flex;
    gap: 1rem;
    align-items: flex-start;
    background: #fff8e1;
    border: 1.5px solid #ffe082;
    border-radius: var(--rayon);
    padding: 1.2rem;
    margin-bottom: 1.5rem;
}

.depot-icone {
    font-size: 2rem;
    flex-shrink: 0;
    line-height: 1;
}

.depot-contenu h4 {
    font-size: .95rem;
    font-weight: 700;
    color: #7c5c00;
    margin-bottom: .3rem;
}

.depot-montant {
    font-size: 1.5rem;
    font-weight: 800;
    color: #d97706;
    margin-bottom: .3rem;
}

.depot-note {
    font-size: .82rem;
    color: #92680a;
    line-height: 1.5;
}

/* ---- Boîte des conditions de location ---- */
.notes-box {
    background: #f0f9ff;
    border: 1.5px solid #bae6fd;
    border-radius: var(--rayon);
    padding: 1.2rem;
    margin-bottom: 2rem;
}

.notes-box h4 {
    font-size: .95rem;
    font-weight: 700;
    color: #0369a1;
    margin-bottom: .8rem;
}

.notes-liste {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: .5rem;
}

.notes-liste li {
    font-size: .85rem;
    color: #0c4a6e;
    line-height: 1.5;
    padding-left: .2rem;
}

/* ---- Ligne caution dans le résumé du formulaire ---- */
.resume-caution {
    border-top: 1.5px dashed #fbbf24 !important;
    background: #fffbeb;
    font-weight: 600;
    color: #d97706 !important;
    border-radius: 0 0 6px 6px;
    padding: .5rem .2rem !important;
}

/* ============================================================
   PAGE CONFIRMATION
   ============================================================ */
.confirmation-box {
    max-width: 600px;
    margin: 3rem auto 4rem;
    background: var(--blanc);
    border-radius: var(--rayon-lg);
    padding: 2.5rem;
    box-shadow: var(--ombre-lg);
    text-align: center;
}

.confirmation-icone {
    font-size: 4rem;
    margin-bottom: 1rem;
}

.confirmation-box h1 {
    font-size: 1.6rem;
    margin-bottom: .5rem;
}

.confirmation-sous-titre {
    color: var(--texte-leger);
    margin-bottom: 2rem;
}

.recap {
    background: var(--fond);
    border-radius: var(--rayon);
    padding: 1.5rem;
    margin-bottom: 2rem;
    text-align: left;
}

.recap h3 {
    margin-bottom: 1rem;
    font-size: 1rem;
}

.tableau-recap {
    width: 100%;
    border-collapse: collapse;
}

.tableau-recap td {
    padding: .55rem .5rem;
    font-size: .9rem;
    border-bottom: 1px solid var(--gris-clair);
}

.tableau-recap td:first-child {
    color: var(--texte-leger);
    width: 45%;
}

/* Ligne du total mise en évidence */
.ligne-total td {
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--bleu);
    border-bottom: none;
    padding-top: .8rem;
}

/* Ligne de la caution dans le récapitulatif de confirmation */
.ligne-caution td {
    font-size: 1rem;
    font-weight: 700;
    color: #d97706;
    border-bottom: none;
    padding-top: .4rem;
}

/* Note explicative sur la caution en bas du récap */
.recap-note-caution {
    background: #fffbeb;
    border: 1px solid #fde68a;
    border-radius: var(--rayon);
    padding: .9rem 1rem;
    margin-top: 1rem;
    font-size: .85rem;
    color: #92400e;
    line-height: 1.6;
}

/* ============================================================
   BANDEAU AVIS CLIENTS DÉFILANTS
   ============================================================ */
.avis-section {
    background: linear-gradient(90deg, var(--bleu-fonce) 0%, #162040 100%);
    padding: .6rem 0 .8rem;
    overflow: hidden;
    position: relative;
}

/* Titre centré au-dessus du bandeau défilant */
.avis-titre {
    text-align: center;
    font-size: .72rem;
    font-weight: 800;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    color: var(--orange);
    margin-bottom: .5rem;
}

/* Dégradés sur les bords pour un effet d'entrée/sortie doux */
.avis-defilant {
    overflow: hidden;
    /* Fondu sur les bords gauche et droit */
    -webkit-mask-image: linear-gradient(to right, transparent 0, black 80px, black calc(100% - 80px), transparent 100%);
    mask-image: linear-gradient(to right, transparent 0, black 80px, black calc(100% - 80px), transparent 100%);
    cursor: default;
}

/* Piste — animation infinie, pause au survol */
.avis-piste {
    display: inline-flex;
    gap: 1rem;
    animation: avisDefile 40s linear infinite;
    white-space: nowrap;
}

.avis-section:hover .avis-piste {
    animation-play-state: paused;
}

/* Mode statique : pas assez de cartes pour défiler → centré, pas d'animation */
.avis-defilant.statique {
    overflow: visible;
    -webkit-mask-image: none;
    mask-image: none;
}
.avis-defilant.statique .avis-piste {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    animation: none;
    white-space: normal;
}

@keyframes avisDefile {
    from { transform: translateX(0); }
    to   { transform: translateX(-50%); }
}

/* Carte individuelle dans le bandeau */
.avis-carte {
    display: inline-flex;
    flex-direction: column;
    gap: .3rem;
    background: rgba(255, 255, 255, .08);
    border: 1px solid rgba(255, 255, 255, .12);
    border-radius: 10px;
    padding: .75rem 1.2rem;
    min-width: 320px;
    max-width: 320px;
    white-space: normal;
    vertical-align: top;
    transition: background .2s ease, transform .2s ease;
    flex-shrink: 0;
}

.avis-section:hover .avis-carte:hover {
    background: rgba(255, 255, 255, .16);
    transform: translateY(-2px);
}

/* Étoiles dans le bandeau */
.avis-etoiles {
    font-size: .9rem;
    line-height: 1;
}

.avis-etoiles .etoiles-pleines { color: var(--orange); }
.avis-etoiles .etoiles-vides   { color: rgba(255, 255, 255, .2); }

/* Commentaire (2 lignes max) */
.avis-commentaire {
    font-size: .78rem;
    color: rgba(255, 255, 255, .8);
    line-height: 1.4;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    font-style: italic;
}

/* Auteur et véhicule */
.avis-auteur {
    font-size: .72rem;
    color: rgba(255, 255, 255, .45);
    font-weight: 500;
    margin-top: .1rem;
}

/* ============================================================
   PAGE AVIS — FORMULAIRE DE NOTATION
   ============================================================ */
.avis-form-box {
    max-width: 560px;
    margin: 3rem auto 4rem;
    background: var(--blanc);
    border-radius: var(--rayon-lg);
    padding: 2.5rem;
    box-shadow: var(--ombre-lg);
}

.avis-form-box h1 {
    font-size: 1.6rem;
    margin-bottom: .4rem;
}

.avis-voiture {
    font-size: .9rem;
    color: var(--texte-leger);
    margin-bottom: 1.8rem;
}

/* Sélecteur d'étoiles interactif */
.etoiles-select {
    display: flex;
    gap: .2rem;
    margin-bottom: .4rem;
}

.etoile {
    font-size: 2.8rem;
    color: var(--gris-clair);
    cursor: pointer;
    transition: color .12s ease, transform .1s ease;
    line-height: 1;
    user-select: none;
}

.etoile:hover,
.etoile.active {
    color: var(--orange);
}

.etoile:hover {
    transform: scale(1.15);
}

.etoile-label {
    font-size: .85rem;
    color: var(--texte-leger);
    min-height: 1.4em;
    margin-bottom: .4rem;
    font-style: italic;
}

/* ---- Remerciement après soumission ---- */
.avis-merci {
    text-align: center;
}

.avis-merci-icone {
    font-size: 4rem;
    margin-bottom: 1rem;
}

.avis-merci h1 {
    font-size: 1.5rem;
    margin-bottom: .5rem;
}

/* Note affichée après soumission */
.avis-note-affichee {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: .6rem;
    font-size: 1.6rem;
    margin: 1rem 0 .5rem;
}

.avis-note-affichee .etoiles-pleines { color: var(--orange); }
.avis-note-affichee .etoiles-vides   { color: var(--gris-clair); }

.avis-note-chiffre {
    font-size: .95rem;
    font-weight: 700;
    color: var(--texte-leger);
}

.avis-commentaire-soumis {
    background: var(--fond);
    border-left: 3px solid var(--orange);
    border-radius: 0 var(--rayon) var(--rayon) 0;
    padding: .8rem 1.2rem;
    margin: .8rem 0;
    font-size: .9rem;
    color: var(--texte-leger);
    font-style: italic;
    text-align: left;
}

/* ============================================================
   BOÎTE LIEN AVIS — PAGE CONFIRMATION
   ============================================================ */
.avis-lien-box {
    background: #f0fdf4;
    border: 1.5px solid #bbf7d0;
    border-radius: var(--rayon);
    padding: 1.2rem 1.4rem;
    margin-bottom: 1.5rem;
    display: flex;
    gap: 1rem;
    align-items: flex-start;
    text-align: left;
}

.avis-lien-icone {
    font-size: 1.8rem;
    flex-shrink: 0;
    line-height: 1;
}

.avis-lien-box h4 {
    font-size: .95rem;
    font-weight: 700;
    color: #065f46;
    margin-bottom: .3rem;
}

.avis-lien-box p {
    font-size: .85rem;
    color: #047857;
    margin-bottom: .2rem;
}

.avis-lien-note {
    font-size: .78rem !important;
    color: var(--texte-leger) !important;
    font-style: italic;
    margin-top: .5rem !important;
}

/* ============================================================
   MESSAGES D'ERREUR ET DE SUCCÈS
   ============================================================ */
.message-erreur {
    background: #fef2f2;
    border: 1px solid #fecaca;
    color: #991b1b;
    padding: 1rem 1.2rem;
    border-radius: var(--rayon);
    margin-bottom: 1.5rem;
    font-size: .9rem;
}

.message-erreur ul {
    padding-left: 1.2rem;
    list-style: disc;
    margin-top: .3rem;
}

.message-succes {
    background: #f0fdf4;
    border: 1px solid #bbf7d0;
    color: #065f46;
    padding: 1rem 1.2rem;
    border-radius: var(--rayon);
    margin-bottom: 1.5rem;
    font-size: .9rem;
}

.message-vide {
    text-align: center;
    padding: 3rem;
    color: var(--texte-leger);
}

/* ============================================================
   PIED DE PAGE
   ============================================================ */
.footer {
    background-color: var(--bleu-fonce);
    color: rgba(255,255,255,.75);
    padding: 3rem 0 1rem;
    margin-top: auto;
}

.footer-contenu {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer-logo {
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--blanc);
    display: block;
    margin-bottom: .7rem;
}

.footer-marque p,
.footer-info p {
    font-size: .88rem;
    line-height: 1.7;
    margin-bottom: .3rem;
}

.footer-info h4 {
    color: var(--blanc);
    font-size: .95rem;
    margin-bottom: .7rem;
}

.footer-bas {
    border-top: 1px solid rgba(255,255,255,.1);
    padding-top: 1rem;
    text-align: center;
    font-size: .82rem;
    color: rgba(255,255,255,.5);
}

/* ============================================================
   ANIMATIONS
   ============================================================ */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(12px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* ============================================================
   RESPONSIVE — Tablettes (≤ 900px) et mobiles (≤ 600px)
   ============================================================ */

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

    /* La page détail passe d'un layout 2 colonnes à 1 colonne */
    .detail-voiture {
        grid-template-columns: 1fr;
    }

    /* Le formulaire de réservation n'est plus sticky sur tablette */
    .formulaire-reservation {
        position: static;
    }

    /* Le footer passe à 2 colonnes */
    .footer-contenu {
        grid-template-columns: 1fr 1fr;
    }

    /* La grille des specs passe à 2x2 pour gagner de la place */
    .specs-grille {
        grid-template-columns: 1fr 1fr;
    }
}

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

    /* Empêche tout débordement horizontal sur le site */
    body {
        overflow-x: hidden;
    }

    /* ---- Header ---- */
    /* On cache les liens de nav sauf le bouton admin */
    .nav .nav-lien:not(.btn-admin) {
        display: none;
    }

    /* Le bouton admin est plus compact sur mobile */
    .btn-admin {
        font-size: .8rem !important;
        padding: .4rem .8rem !important;
    }

    /* ---- Hero ---- */
    .hero {
        padding: 2.5rem 0 2rem;
    }

    .hero p {
        font-size: .95rem;
    }

    .saison-badge {
        font-size: .82rem;
        padding: .5rem 1rem;
    }

    /* ---- Filtres — défilement horizontal plutôt que retour à la ligne ---- */
    /* Évite que les boutons occupent 3-4 lignes sur mobile */
    .filtres {
        flex-wrap: nowrap;
        overflow-x: auto;
        padding-bottom: .4rem;
        /* Cache la scrollbar mais garde le défilement au doigt */
        scrollbar-width: none;
        -ms-overflow-style: none;
    }
    .filtres::-webkit-scrollbar { display: none; }

    .filtre-btn {
        white-space: nowrap;
        flex-shrink: 0;
    }

    /* ---- Grille des voitures — 1 colonne sur mobile ---- */
    .grille-voitures {
        grid-template-columns: 1fr;
    }

    .section-titre {
        font-size: 1.25rem;
        flex-direction: column;
        align-items: flex-start;
        gap: .2rem;
    }

    /* ---- Page détail voiture ---- */
    .detail-titre {
        font-size: 1.4rem;
    }

    .detail-image {
        height: 220px;
    }

    .image-placeholder.grande {
        height: 220px;
    }

    /* Specs en 2 colonnes sur mobile (4 items → 2x2) */
    .specs-grille {
        grid-template-columns: 1fr 1fr;
        gap: .6rem;
    }

    /* Tarifs en 1 colonne pour avoir plus de place pour le texte */
    .tarifs-grille {
        grid-template-columns: 1fr;
    }

    /* ---- Formulaire de réservation ---- */
    .formulaire-reservation {
        padding: 1.2rem;
        border-radius: var(--rayon);
    }

    .reservation-entete h2 {
        font-size: 1.1rem;
    }

    /* ---- Boîte caution et notes ---- */
    .depot-box {
        flex-direction: column;
        gap: .6rem;
    }

    /* ---- Page de confirmation ---- */
    .confirmation-box {
        margin: 1rem;
        padding: 1.5rem 1rem;
        border-radius: var(--rayon);
    }

    .confirmation-box h1 {
        font-size: 1.3rem;
    }

    .tableau-recap td {
        font-size: .82rem;
        padding: .45rem .3rem;
    }

    .tableau-recap td:first-child {
        width: 40%;
    }

    /* ---- Footer — 1 colonne ---- */
    .footer-contenu {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .footer {
        padding: 2rem 0 1rem;
    }

    /* ---- Boutons — cibles tactiles plus grandes ---- */
    .btn {
        padding: .7rem 1.4rem;
        font-size: .92rem;
    }

    /* ---- Lien de retour ---- */
    .lien-retour {
        margin: 1.2rem 0 1rem;
    }

    /* ---- Bandeau avis sur mobile ---- */
    .avis-defilant {
        -webkit-mask-image: linear-gradient(to right, transparent 0, black 40px, black calc(100% - 40px), transparent 100%);
        mask-image: linear-gradient(to right, transparent 0, black 40px, black calc(100% - 40px), transparent 100%);
    }

    .avis-carte {
        min-width: 240px;
        max-width: 240px;
        padding: .5rem .8rem;
    }

    /* ---- Formulaire avis ---- */
    .avis-form-box {
        margin: 1rem;
        padding: 1.5rem 1rem;
    }

    .etoile {
        font-size: 2.2rem;
    }
}
