/* ================================================================
   css/pages.css — Styles partagés pour toutes les pages de service
   Remplace les blocs <style> dupliqués dans :
     automobile.php · moto.php · nautique.php
     utilitaire.php · autres-services.php · mentions-legales.php
   Chargé via header.php (ajout d'un <link> conditionnel ou systématique).
   ================================================================ */

/* ── Tokens locaux (complémentaires aux tokens du header) ── */
:root {
    --color-text:       #555;
    --color-text-light: #777;
    --color-heading:    #222;
    --color-card-bg:    #fff;
    --color-section-bg: #f9f9f9;
    --card-radius:      8px;
    --card-shadow:      0 4px 15px rgba(0,0,0,.06);
}

/* ── Utilitaire a11y ── */
.sr-only {
    position: absolute; width: 1px; height: 1px;
    padding: 0; margin: -1px; overflow: hidden;
    clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}

/* ================================================================
   HERO — image de fond plein écran
   bg-image défini par attribut style inline sur chaque page hero
   (seul cas légitime de style inline : valeur dynamique par page).
   ================================================================ */
.page-hero {
    position: relative;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    min-height: 55vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 0;
}
/* Overlay sombre */
.page-hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.38);
    z-index: 0;
}
/* Le contenu passe par-dessus l'overlay */
.page-hero .row { position: relative; z-index: 1; }

.page-hero__eyebrow {
    color: #fff;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 3px;
    margin: 0 0 10px;
    font-weight: 700;
    text-shadow: 0 2px 8px rgba(0,0,0,.8);
}
.page-hero__title {
    font-size: clamp(36px, 8vw, 60px);
    color: #fff;
    margin: 0;
    line-height: 1.2;
    font-weight: 800;
    text-shadow: 0 4px 15px rgba(0,0,0,.9);
}

/* Hero variante — fond gris clair (pages sans photo, ex: mentions légales) */
.page-hero--light {
    background-color: #f2f2f2;
    min-height: auto;
    padding: 80px 0 50px;
}
.page-hero--light::before { display: none; }
.page-hero--light .page-hero__eyebrow { color: var(--scf-accent); text-shadow: none; }
.page-hero--light .page-hero__title   { color: var(--color-heading); text-shadow: none; }

/* ================================================================
   SECTION INTRO
   ================================================================ */
.intro-section { background-color: #fff; padding: 80px 0; }
.intro-section__body {
    max-width: 900px;
    margin: 0 auto;
    text-align: center;
}
.intro-section__body .lead {
    color: var(--color-text);
    font-size: clamp(15px, 4vw, 18px);
    line-height: 1.8;
    margin: 0 0 24px;
}
.intro-section__body .lead:last-child { margin-bottom: 0; }

/* Sous-titre de section dans l'intro (autres-services.php) */
.intro-section__subtitle {
    color: var(--scf-accent);
    font-size: 15px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 2px;
    margin: 0 0 12px;
    display: block;
}

/* ================================================================
   EN-TÊTE DE SECTION GALERIE
   ================================================================ */
.section-header { text-align: center; margin-bottom: 48px; width: 100%; }
.section-header__eyebrow {
    color: var(--scf-accent);
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 2px;
    font-weight: 700;
    margin: 0 0 8px;
}
.section-header__title {
    color: var(--color-heading);
    font-size: clamp(24px, 6vw, 36px);
    margin: 0 0 12px;
    line-height: 1.2;
}
.section-header__desc {
    color: var(--color-text);
    font-size: 16px;
    max-width: 700px;
    margin: 0 auto 8px;
    line-height: 1.6;
}
.section-header__hint {
    color: var(--color-text-light);
    font-size: 14px;
    font-style: italic;
    margin: 0;
}

/* ================================================================
   GALERIE — grille responsive mobile-first
   ================================================================ */
.gallery-section { background-color: var(--color-section-bg); padding: 80px 0; }

.realisations-grid {
    list-style: none;
    margin: 0 0 40px;
    padding: 0;
    display: grid;
    grid-template-columns: 1fr;
    gap: 28px;
}
@media (min-width: 640px)  { .realisations-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .realisations-grid { grid-template-columns: repeat(3, 1fr); } }

/* ── Carte de réalisation ── */
.realisation-card article {
    display: flex;
    flex-direction: column;
    background: var(--color-card-bg);
    border-radius: var(--card-radius);
    box-shadow: var(--card-shadow);
    overflow: hidden;
    height: 100%;
    text-align: center;
    transition: box-shadow .35s ease, transform .35s ease;
}
.realisation-card article:hover {
    box-shadow: 0 8px 28px rgba(0,0,0,.11);
    transform: translateY(-4px);
}

/* ── Bouton image — déclencheur lightbox ── */
.img-zoom-container {
    /* Reset bouton */
    display: block;
    border: none;
    padding: 0;
    margin: 0;
    /* Dimensions */
    width: 100%;
    height: 250px;
    flex-shrink: 0;
    /* Visuel */
    background: #111;
    overflow: hidden;
    cursor: zoom-in;
    /* Pas de border-radius ici (la carte gère l'overflow) */
    border-radius: 0;
}
.img-zoom-container:focus-visible {
    outline: 3px solid var(--scf-accent);
    outline-offset: -3px;
}
.img-zoom-container img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform .45s ease, opacity .45s ease;
    pointer-events: none; /* évite drag parasite */
}
.img-zoom-container:hover img,
.img-zoom-container:focus-visible img {
    transform: scale(1.06);
    opacity: .88;
}

/* ── Corps de carte ── */
.realisation-card__body { padding: 20px 16px 22px; flex: 1; }
.realisation-card__title {
    color: #333;
    font-size: 20px;
    margin: 0 0 8px;
    line-height: 1.3;
}
.realisation-card__desc {
    color: var(--color-text-light);
    font-size: 14px;
    line-height: 1.55;
    margin: 0;
}

/* ── CTA en bas de galerie ── */
.gallery-cta { text-align: center; margin-top: 10px; }

/* ================================================================
   BOUTONS
   ================================================================ */
.btn {
    display: inline-block;
    padding: 14px 28px;
    border-radius: 5px;
    font-weight: 700;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 1px;
    text-decoration: none;
    transition: background-color .25s ease, transform .2s ease;
    cursor: pointer;
    border: none;
}
.btn:focus-visible { outline: 3px solid var(--scf-accent); outline-offset: 3px; }
.btn--primary { background-color: var(--scf-accent); color: #fff; }
.btn--primary:hover,
.btn--primary:focus-visible { background-color: var(--scf-accent-dark); transform: translateY(-2px); }
.btn--primary:active { transform: translateY(0); }

/* ================================================================
   PAGE MENTIONS LÉGALES — contenu éditorial
   ================================================================ */
.legal-content {
    max-width: 860px;
    margin: 0 auto;
    color: #444;
    line-height: 1.8;
    font-size: 16px;
}
.legal-content h2 {
    color: #111;
    font-size: 20px;
    margin: 0 0 14px;
    padding-top: 40px;
}
.legal-content h2:first-child { padding-top: 0; }
.legal-content p  { margin: 0 0 16px; }
.legal-content hr { margin: 0; border: none; border-top: 1px solid #eee; }
.legal-content a  { color: var(--scf-accent); text-decoration: none; }
.legal-content a:hover { text-decoration: underline; }
