/* ============================================================
   SITE PUBLIC VO (Mod_site_vo) — feuille de style AUTONOME.

   Écrite à la main, sans dépendance aux bundles Tailwind/LDS du
   back-office : un site public doit rester stable même quand les
   bundles internes évoluent, et une classe absente d'un bundle
   pré-compilé est ignorée EN SILENCE (règle projet).

   La couleur d'accent est injectée par base_public.html :
       :root { --sv-accent: #1f4e79; }   (ConfigurationSiteVO)
   ============================================================ */

:root {
    --sv-accent: #1f4e79;            /* écrasée par la config du site */
    --sv-fond: #f6f7f9;
    --sv-surface: #ffffff;
    --sv-encre: #1c2430;
    --sv-encre-douce: #5b6472;
    --sv-trait: #e3e6ea;
    --sv-succes-fond: #eef8f0;
    --sv-succes-trait: #bfe3c8;
    --sv-erreur-fond: #fdf1f0;
    --sv-erreur-trait: #f0c4c0;
    --sv-rayon: 10px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
    margin: 0;
    background: var(--sv-fond);
    color: var(--sv-encre);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
                 "Helvetica Neue", Arial, sans-serif;
    font-size: 16px;                 /* < 16px : iOS zoome au focus (règle projet) */
    line-height: 1.6;
}

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

a { color: var(--sv-accent); }

/* ---------- Structure ---------- */

.sv-conteneur {
    max-width: 1120px;
    margin: 0 auto;
    padding: 0 20px;
}

.sv-conteneur-etroit { max-width: 720px; }

.sv-section { padding: 40px 0; }

.sv-centre { text-align: center; }

/* ---------- En-tête ---------- */

.sv-header {
    background: var(--sv-surface);
    border-bottom: 1px solid var(--sv-trait);
    position: sticky;
    top: 0;
    z-index: 50;
}

.sv-header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    min-height: 64px;
}

.sv-marque { text-decoration: none; display: flex; align-items: center; }

.sv-marque-logo { max-height: 40px; width: auto; }

.sv-marque-nom {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--sv-accent);
    letter-spacing: 0.2px;
}

.sv-nav { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; }

.sv-nav a {
    text-decoration: none;
    color: var(--sv-encre);
    font-weight: 500;
    padding: 6px 2px;
}

.sv-nav a:hover { color: var(--sv-accent); }

.sv-nav-cta {
    background: var(--sv-accent);
    color: #ffffff !important;
    padding: 8px 16px !important;
    border-radius: 999px;
}

/* ---------- Boutons ---------- */

.sv-btn {
    display: inline-block;
    padding: 11px 22px;
    border-radius: 8px;
    border: 1px solid transparent;
    font-size: 1rem;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
}

.sv-btn-principal { background: var(--sv-accent); color: #ffffff; }
.sv-btn-principal:hover { filter: brightness(1.08); }

.sv-btn-secondaire {
    background: var(--sv-surface);
    color: var(--sv-accent);
    border-color: var(--sv-accent);
}

.sv-btn-bloc { display: block; text-align: center; width: 100%; }

/* ---------- Accueil ---------- */

.sv-hero {
    background: linear-gradient(180deg, var(--sv-surface) 0%, var(--sv-fond) 100%);
    border-bottom: 1px solid var(--sv-trait);
    padding: 56px 0 48px;
    text-align: center;
}

.sv-hero-titre { font-size: 2.2rem; margin: 0 0 8px; color: var(--sv-accent); }

.sv-hero-slogan { font-size: 1.15rem; color: var(--sv-encre-douce); margin: 0 0 16px; }

.sv-hero-texte { max-width: 680px; margin: 0 auto 20px; color: var(--sv-encre-douce); }

.sv-section-titre { font-size: 1.4rem; margin: 0 0 18px; }

.sv-section-confiance { background: var(--sv-surface); border-block: 1px solid var(--sv-trait); }

.sv-confiance-liste {
    list-style: none;
    padding: 0;
    margin: 0;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 12px;
}

.sv-confiance-liste li {
    background: var(--sv-fond);
    border: 1px solid var(--sv-trait);
    border-radius: var(--sv-rayon);
    padding: 14px 16px;
    font-weight: 500;
}

.sv-confiance-liste li::before { content: "✓ "; color: var(--sv-accent); font-weight: 700; }

/* ---------- Grille d'annonces ---------- */

.sv-grille-cards {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 20px;
    margin-bottom: 28px;
}

.sv-card {
    background: var(--sv-surface);
    border: 1px solid var(--sv-trait);
    border-radius: var(--sv-rayon);
    overflow: hidden;
    text-decoration: none;
    color: var(--sv-encre);
    display: flex;
    flex-direction: column;
    transition: box-shadow 0.15s ease, transform 0.15s ease;
}

.sv-card:hover { box-shadow: 0 6px 18px rgba(0, 0, 0, 0.08); transform: translateY(-2px); }

.sv-card-photo {
    aspect-ratio: 4 / 3;
    background: var(--sv-fond);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.sv-card-photo img { width: 100%; height: 100%; object-fit: cover; }

.sv-card-photo-vide { color: var(--sv-encre-douce); font-size: 0.9rem; }

.sv-card-corps { padding: 14px 16px 16px; display: flex; flex-direction: column; gap: 4px; }

.sv-card-titre { margin: 0; font-size: 1.05rem; }

.sv-card-version {
    margin: 0;
    color: var(--sv-encre-douce);
    font-size: 0.88rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.sv-card-details {
    margin: 4px 0 0;
    display: flex;
    flex-wrap: wrap;
    gap: 6px 14px;
    color: var(--sv-encre-douce);
    font-size: 0.85rem;
}

.sv-card-prix { margin: 8px 0 0; font-size: 1.15rem; font-weight: 700; color: var(--sv-accent); }

.sv-card-prix-ttc { font-size: 0.8rem; font-weight: 500; color: var(--sv-encre-douce); }

/* ---------- Liste : filtres, pagination, état vide ---------- */

.sv-page-titre { font-size: 1.7rem; margin: 0 0 4px; }

.sv-page-sous-titre { color: var(--sv-encre-douce); margin: 0 0 20px; }

.sv-filtres {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    align-items: flex-end;
    background: var(--sv-surface);
    border: 1px solid var(--sv-trait);
    border-radius: var(--sv-rayon);
    padding: 16px;
    margin-bottom: 24px;
}

.sv-filtres label { display: flex; flex-direction: column; gap: 4px; font-size: 0.85rem; font-weight: 600; }

.sv-filtres select,
.sv-filtres input {
    font-size: 16px;                 /* anti-zoom iOS */
    padding: 9px 10px;
    border: 1px solid var(--sv-trait);
    border-radius: 8px;
    background: var(--sv-surface);
    min-width: 150px;
}

.sv-pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 18px;
    margin-top: 8px;
}

.sv-pagination a { font-weight: 600; text-decoration: none; }

.sv-pagination-etat { color: var(--sv-encre-douce); }

.sv-vide {
    background: var(--sv-surface);
    border: 1px dashed var(--sv-trait);
    border-radius: var(--sv-rayon);
    padding: 36px 20px;
    text-align: center;
    color: var(--sv-encre-douce);
}

/* ---------- Fiche véhicule ---------- */

.sv-fil-ariane { font-size: 0.85rem; color: var(--sv-encre-douce); margin: 0 0 14px; }
.sv-fil-ariane a { text-decoration: none; }

.sv-detail-entete {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: flex-start;
    gap: 16px;
    margin-bottom: 18px;
}

.sv-detail-prix { text-align: right; }

.sv-prix-valeur { font-size: 1.8rem; font-weight: 700; color: var(--sv-accent); display: block; }

.sv-prix-ttc { color: var(--sv-encre-douce); font-size: 0.85rem; }

.sv-badge-garantie {
    display: inline-block;
    margin-top: 6px;
    background: var(--sv-succes-fond);
    border: 1px solid var(--sv-succes-trait);
    border-radius: 999px;
    padding: 3px 12px;
    font-size: 0.82rem;
    font-weight: 600;
}

.sv-galerie { margin-bottom: 28px; }

.sv-galerie-principale {
    border-radius: var(--sv-rayon);
    overflow: hidden;
    border: 1px solid var(--sv-trait);
    background: var(--sv-surface);
    position: relative;              /* ancre les flèches de navigation */
}

/* Flèches précédent/suivant, de part et d'autre de la grande photo. */
.sv-galerie-fleche {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 44px;
    height: 44px;
    border: none;
    border-radius: 50%;
    background: rgba(20, 26, 36, 0.55);
    color: #ffffff;
    font-size: 1.2rem;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.15s ease;
}

.sv-galerie-fleche:hover { background: var(--sv-accent); }

.sv-galerie-prec { left: 12px; }
.sv-galerie-suiv { right: 12px; }

.sv-vignette-active {
    outline: 3px solid var(--sv-accent);
    outline-offset: -3px;
}

.sv-galerie-principale img { width: 100%; max-height: 520px; object-fit: cover; }

.sv-galerie-vignettes {
    margin-top: 10px;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 10px;
}

.sv-galerie-vignettes img {
    width: 100%;
    aspect-ratio: 4 / 3;
    object-fit: cover;
    border-radius: 8px;
    border: 1px solid var(--sv-trait);
    cursor: pointer;                 /* cliquer une vignette l'affiche en grand */
    transition: opacity 0.15s ease;
}

.sv-galerie-vignettes img:hover { opacity: 0.85; }

.sv-galerie-vide {
    background: var(--sv-surface);
    border: 1px dashed var(--sv-trait);
    border-radius: var(--sv-rayon);
    padding: 42px 20px;
    text-align: center;
    color: var(--sv-encre-douce);
}

.sv-detail-colonnes {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 320px;
    gap: 28px;
    align-items: start;
}

.sv-caracteristiques {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 10px 20px;
    margin: 0 0 26px;
}

.sv-caracteristiques div {
    background: var(--sv-surface);
    border: 1px solid var(--sv-trait);
    border-radius: 8px;
    padding: 10px 12px;
}

.sv-caracteristiques dt { font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.4px; color: var(--sv-encre-douce); }

.sv-caracteristiques dd { margin: 2px 0 0; font-weight: 600; }

.sv-liste-points-forts,
.sv-liste-equipements {
    columns: 2;
    column-gap: 28px;
    padding-left: 20px;
    margin: 0 0 26px;
}

.sv-liste-points-forts li::marker { color: var(--sv-accent); }

.sv-detail-cta { position: sticky; top: 84px; }

.sv-encart-contact {
    background: var(--sv-surface);
    border: 1px solid var(--sv-trait);
    border-radius: var(--sv-rayon);
    padding: 20px;
}

.sv-encart-contact h2 { margin: 0 0 10px; font-size: 1.1rem; }

.sv-encart-tel { font-size: 1.3rem; font-weight: 700; color: var(--sv-accent); margin: 0 0 12px; }

.sv-encart-horaires { margin: 12px 0 0; color: var(--sv-encre-douce); font-size: 0.88rem; }

/* ---------- Contact ---------- */

.sv-contact-vehicule {
    background: var(--sv-surface);
    border: 1px solid var(--sv-trait);
    border-left: 4px solid var(--sv-accent);
    border-radius: 8px;
    padding: 12px 16px;
    margin-bottom: 20px;
}

.sv-contact-vehicule p { margin: 0; }

.sv-contact-vehicule-nom { font-weight: 700; }

.sv-formulaire { display: flex; flex-direction: column; gap: 14px; }

.sv-formulaire label { display: flex; flex-direction: column; gap: 5px; font-weight: 600; font-size: 0.92rem; }

.sv-formulaire input,
.sv-formulaire textarea {
    font-size: 16px;                 /* anti-zoom iOS */
    padding: 10px 12px;
    border: 1px solid var(--sv-trait);
    border-radius: 8px;
    font-family: inherit;
    background: var(--sv-surface);
}

.sv-formulaire input:focus,
.sv-formulaire textarea:focus { outline: 2px solid var(--sv-accent); outline-offset: 1px; }

.sv-champ-erreur { color: #b3261e; font-style: normal; font-size: 0.83rem; }

/* Honeypot : hors écran (les robots le remplissent, pas les humains). */
.sv-hp { position: absolute !important; left: -9999px !important; width: 1px; height: 1px; overflow: hidden; }

.sv-rgpd-note { font-size: 0.83rem; color: var(--sv-encre-douce); margin: 2px 0 6px; }

.sv-message-succes {
    background: var(--sv-succes-fond);
    border: 1px solid var(--sv-succes-trait);
    border-radius: var(--sv-rayon);
    padding: 18px 20px;
}

.sv-message-erreur {
    background: var(--sv-erreur-fond);
    border: 1px solid var(--sv-erreur-trait);
    border-radius: var(--sv-rayon);
    padding: 14px 16px;
}

/* ---------- Texte long / légal ---------- */

.sv-texte-long p { margin: 0 0 12px; }

/* ---------- Pied de page ---------- */

.sv-footer {
    background: var(--sv-encre);
    color: #d8dde3;
    margin-top: 48px;
    padding: 32px 0;
}

.sv-footer a { color: #ffffff; }

.sv-footer-grille {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 20px;
}

.sv-footer-titre { font-weight: 700; color: #ffffff; margin: 0 0 8px; }

.sv-footer-texte { margin: 0 0 6px; font-size: 0.9rem; }

/* ---------- Responsive ---------- */

@media (max-width: 860px) {
    .sv-detail-colonnes { grid-template-columns: 1fr; }
    .sv-detail-cta { position: static; }
    .sv-detail-prix { text-align: left; }
}

@media (max-width: 640px) {
    .sv-hero { padding: 36px 0 32px; }
    .sv-hero-titre { font-size: 1.7rem; }
    .sv-header-inner { flex-direction: column; align-items: flex-start; padding: 10px 0; }
    .sv-liste-points-forts, .sv-liste-equipements { columns: 1; }
    .sv-filtres label { flex: 1 1 100%; }
    .sv-filtres select, .sv-filtres input { min-width: 0; width: 100%; }
    .sv-filtres button { width: 100%; }
}
