/* ═══════════════════════════════════════════════════════════════
   BATINNOV68 — Surcharges et variables CSS
   Ne jamais modifier les fichiers Crafto. Toutes les surcharges ici.
   ═══════════════════════════════════════════════════════════════ */

/* ─── Variables globales ─────────────────────────────────────── */
:root {
    /* Couleurs de marque */
    --brand-primary:        #1A2A40;   /* bleu foncé bâtiment */
    --brand-accent:         #C8972A;   /* doré (repris du logo) */
    --brand-accent-dark:    #A67820;   /* doré foncé (hover + texte sur fond clair) */
    --brand-text:           #2B2E33;
    --brand-text-muted:     #4F5358;   /* AA sur blanc, remplace le #707070 Crafto */
    --brand-bg:             #FFFFFF;
    --brand-bg-alt:         #F8F7F4;   /* beige clair */
    --brand-border:         #E5E7EB;

    /* Surcharge des variables Crafto (style.css + logistics.css) */
    --medium-gray:          #54575C;   /* texte courant : contraste AA (7:1) */
    --light-gray:           #C9CDD4;   /* texte secondaire sur fond sombre */

    /* Espacements sections */
    --space-section:        6rem;
    --space-section-mobile: 3rem;

    /* Containers */
    --container-max:        1280px;
    --container-padding:    1.5rem;
}

/* ─── Couleur d'accent Crafto → doré BATINNOV68 ─────────────── */
.bg-base-color,
.bg-base-color:not([class*="opacity"]) {
    background-color: var(--brand-accent) !important;
}
.text-base-color {
    color: var(--brand-accent) !important;
}
/* Sur fond clair, le doré pur manque de contraste pour du texte : version foncée */
.bg-white .text-base-color,
.bg-very-light-gray .text-base-color,
section:not([class*="bg-dark"]):not(.cover-background) h3.text-base-color {
    color: var(--brand-accent-dark) !important;
}
.border-color-base-color {
    border-color: var(--brand-accent) !important;
}
.btn-base-color {
    background-color: var(--brand-accent) !important;
    border-color: var(--brand-accent) !important;
    color: #ffffff !important;
}
.btn-base-color:hover,
.btn-base-color:focus {
    background-color: var(--brand-accent-dark) !important;
    border-color: var(--brand-accent-dark) !important;
    color: #ffffff !important;
}
/* Crafto écrase .btn:hover { background-color: inherit } → casse les btn-outline Bootstrap */
.btn-outline-dark:hover,
.btn-outline-dark:focus {
    background-color: var(--brand-primary) !important;
    border-color: var(--brand-primary) !important;
    color: #ffffff !important;
}

/* ─── Icônes prestations « ligne » (SVG, stroke hérité currentColor) ─ */
.svc-icon {
    display: inline-block;
    vertical-align: middle;
    flex-shrink: 0;
}

/* ─── Bandeau réassurance home : réduit le chevauchement du héro ─
   Crafto remonte le bloc de -205px, ce qui recouvre les CTA du héro.
   On réduit l'overlap (≥992px) pour qu'il « dépasse » le héro sans le cacher. */
@media (min-width: 992px) {
    .outside-box-top-205px {
        margin-top: -90px;
    }
}

/* ─── Feature-box home : icône en filigrane de fond ──────────── */
.feature-overlay .feature-watermark {
    position: absolute;
    right: -12px;
    bottom: -14px;
    line-height: 0;
    color: var(--brand-accent);
    opacity: .12;
    pointer-events: none;
}

/* ─── Cartes Leaflet : tuiles en nuances de gris ─────────────────
   Le filtre porte sur les tuiles uniquement → le marqueur de marque
   (doré/bleu) reste en couleur et ressort sur le fond gris. */
.leaflet-tile-pane {
    filter: grayscale(1) contrast(1.02);
}

/* ─── Checkbox RGPD du formulaire contact ────────────────────────
   Le thème étire les inputs sur toute la largeur → la case n'est plus
   carrée. On la force à un carré natif aligné avec le label. */
.form-check-input[type="checkbox"] {
    -webkit-appearance: auto;
    appearance: auto;
    width: 17px;
    height: 17px;
    min-width: 17px;
    flex: 0 0 17px;
    padding: 0;
    margin-top: 3px;
    border-radius: 3px;
    accent-color: var(--brand-accent);
    cursor: pointer;
}

/* ─── Lien « Découvrir » des cartes prestations (home) ───────── */
.link-service {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-size: 15px;
    font-weight: 700;
    letter-spacing: .2px;
    color: var(--brand-primary);
    text-decoration: none;
    transition: color .25s ease, gap .25s ease;
}
.link-service .link-service-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background-color: rgba(200, 151, 42, .14);
    color: var(--brand-accent-dark);
    font-size: 13px;
    transition: transform .25s ease, background-color .25s ease, color .25s ease;
}
.link-service:hover,
.link-service:focus-visible {
    color: var(--brand-accent-dark);
    gap: 14px;
}
.link-service:hover .link-service-icon,
.link-service:focus-visible .link-service-icon {
    background-color: var(--brand-accent);
    color: #ffffff;
    transform: translateX(2px);
}
/* Au survol de la carte entière, le lien s'anime aussi */
.hover-box:hover .link-service {
    color: var(--brand-accent-dark);
}
.hover-box:hover .link-service .link-service-icon {
    background-color: var(--brand-accent);
    color: #ffffff;
}

/* ─── Lisibilité : textes atténués (remplace les opacity-7/8 illisibles) */
.text-dark-gray.opacity-7,
.text-dark-gray.opacity-8,
p.opacity-7:not(.text-white):not(.text-light-gray),
p.opacity-8:not(.text-white):not(.text-light-gray) {
    opacity: 1 !important;
    color: var(--brand-text-muted) !important;
}
.text-white.opacity-7,
.text-white.opacity-8,
.text-light-gray.opacity-7,
.text-light-gray.opacity-8 {
    opacity: 0.92 !important;
}
.text-light-gray.opacity-6 {
    opacity: 0.8 !important;
}

/* ─── Separator — label de section ───────────────────────────── */
.separator {
    font-size: 14px;
    line-height: 20px;
    font-weight: 700;
    text-transform: uppercase;
    display: inline-block;
    border-bottom: 2px solid var(--brand-accent);
    margin-bottom: 20px;
    padding-bottom: 6px;
    letter-spacing: 2px;
}
.separator-dark {
    color: var(--brand-accent-dark);
}
.separator-light {
    color: var(--brand-accent);
}

/* ─── Typographie ────────────────────────────────────────────── */
body {
    color: var(--medium-gray);
}

/* ─── Skip link accessibilité ───────────────────────────────── */
.skip-link {
    position: absolute;
    top: -100px;
    left: 1rem;
    z-index: 9999;
    background: var(--brand-primary);
    color: #fff;
    padding: 0.5rem 1rem;
    border-radius: 0 0 4px 4px;
    font-size: 0.875rem;
    font-weight: 600;
    text-decoration: none;
    transition: top 0.2s;
}
.skip-link:focus {
    top: 0;
}

/* ─── Header ─────────────────────────────────────────────────── */
.header-top-bar .h-45px { height: 36px !important; }
.header-top-bar a:hover {
    color: var(--brand-accent) !important;
}
.navbar-brand img {
    height: 54px;
    width: auto;
    transform: scale(1.45);
    transform-origin: left center;
}
/* Réserve l'espace réel du logo scalé pour que le menu ne chevauche pas */
.navbar .col-auto.menu-order {
    padding-left: 80px;
}
@media (max-width: 991px) {
    .navbar-brand img {
        height: 40px;
        transform: scale(1.3);
    }
    .navbar .col-auto.menu-order {
        padding-left: 40px;
    }
}

/* ─── Hero slider ────────────────────────────────────────────── */
/* Dégradé gauche→droite : texte lisible sans assombrir toute la photo */
.hero-overlay {
    position: absolute;
    inset: 0;
    z-index: 0;
    background: linear-gradient(90deg, rgba(13, 18, 28, 0.82) 0%, rgba(13, 18, 28, 0.55) 45%, rgba(13, 18, 28, 0.25) 100%);
}
/* Le contenu du slide doit passer AU-DESSUS de l'overlay
   (un élément positionné se peint sinon au-dessus des siblings statiques) */
.hero-overlay ~ .container {
    position: relative;
    z-index: 1;
}
/* ≥1200px : le bandeau réassurance chevauche le bas du hero (-205px),
   on remonte le contenu pour garder les CTA dégagés */
@media (min-width: 1200px) {
    .hero-overlay ~ .container .row {
        padding-bottom: 130px;
    }
}
.hero-title {
    font-size: 4.375rem;
    line-height: 1.05;
    font-weight: 700;
    letter-spacing: -2px;
    color: #fff;
}
@media (max-width: 1199px) {
    .hero-title { font-size: 3.4rem; letter-spacing: -1px; }
}
@media (max-width: 767px) {
    .hero-title { font-size: 2.4rem; letter-spacing: -0.5px; }
}

/* ─── Compteurs statiques (stats) ────────────────────────────── */
.stat-number {
    font-size: 4.375rem;
    line-height: 1;
    font-weight: 800;
    letter-spacing: -3px;
    color: var(--dark-gray, #232323);
    position: relative;
    display: inline-block;
    z-index: 0;
}
.stat-number .text-highlight {
    position: absolute;
    bottom: 8px;
    left: 0;
    width: 100%;
    z-index: -1;
}
.stat-number .text-highlight span {
    display: block;
    height: 12px;
    background-color: var(--brand-accent);
    opacity: 0.35;
}
@media (max-width: 991px) {
    .stat-number { font-size: 3.2rem; letter-spacing: -2px; }
}

/* ─── Bandeau CTA commun ─────────────────────────────────────── */
.cta-bandeau {
    background-color: var(--brand-accent) !important;
}
.cta-bandeau p {
    color: rgba(20, 20, 20, 0.85) !important;
    opacity: 1 !important;
}

/* ─── Services box — bordure accent au hover ────────────────── */
.services-box-style-02:hover,
.services-box-style-03:hover {
    border-color: var(--brand-accent);
}
.card.hover-box {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.card.hover-box:hover {
    transform: translateY(-5px);
}
.card.hover-box .card-image img {
    transition: transform 0.4s ease;
}
.card.hover-box:hover .card-image img {
    transform: scale(1.04);
}

/* ─── Placeholder TODO visible ──────────────────────────────── */
.todo {
    display: inline-block;
    background-color: #FEF3C7;
    color: #92400E;
    border: 1px dashed #D97706;
    border-radius: 3px;
    padding: 2px 6px;
    font-size: 0.8em;
    font-style: italic;
}

/* ─── Page titre hero ────────────────────────────────────────── */
/* Le header (topbar + navbar) est en position: fixed (offset Crafto :
   136px desktop / 116px tablette / 76px mobile). Les pages internes
   doivent donc dégager cette hauteur en plus de leur respiration visuelle,
   sinon le haut du titre passe sous la navigation. */
.page-title-hero {
    background-color: var(--brand-primary);
    padding: 196px 0 60px;
}
@media (max-width: 991px) {
    .page-title-hero {
        padding: 166px 0 50px;
    }
}
/* ≤767px : la topbar est masquée, seule la navbar (~74px) reste fixe */
@media (max-width: 767px) {
    .page-title-hero {
        padding: 112px 0 40px;
    }
}
.page-title-hero h1 {
    color: #ffffff;
}
.page-title-hero .breadcrumb-item,
.page-title-hero .breadcrumb-item a {
    color: rgba(255, 255, 255, 0.75);
}
.page-title-hero .breadcrumb-item.active {
    color: var(--brand-accent);
}

/* ─── Sections alternées ────────────────────────────────────── */
.section-alt {
    background-color: var(--brand-bg-alt);
}

/* ─── Section investisseurs highlight ───────────────────────── */
.investisseurs-highlight {
    background-color: var(--brand-primary);
    color: #ffffff;
}
.investisseurs-highlight h2,
.investisseurs-highlight h3 {
    color: #ffffff;
}
.investisseurs-highlight .feature-label {
    color: var(--brand-accent);
}

/* ─── Galerie réalisations ───────────────────────────────────── */
.portfolio-item-overlay {
    background: linear-gradient(to top, rgba(26, 42, 64, 0.85) 0%, transparent 60%);
}

/* ─── FAQ accordéon ─────────────────────────────────────────── */
.faq-accordion .accordion-header a {
    color: var(--brand-text);
    font-weight: 600;
}
.faq-accordion .accordion-header a:hover {
    color: var(--brand-accent-dark);
}

/* ─── Formulaire contact ─────────────────────────────────────── */
.contact-form-style-01 input:focus,
.contact-form-style-01 select:focus,
.contact-form-style-01 textarea:focus {
    border-color: var(--brand-accent);
    box-shadow: 0 0 0 3px rgba(200, 151, 42, 0.15);
}

/* ─── Footer ────────────────────────────────────────────────── */
.footer-dark {
    background-color: var(--brand-primary) !important;
}
footer .footer-top-area {
    padding-top: 90px !important;
    padding-bottom: 70px !important;
}
footer .footer-logo img {
    height: 44px;
    width: auto;
}
@media (max-width: 767px) {
    footer .footer-top-area {
        padding-top: 50px !important;
        padding-bottom: 40px !important;
    }
}

/* ─── Responsive utilities ───────────────────────────────────── */
@media (max-width: 767px) {
    /* .page-title-hero exclu : il doit garder son dégagement du header fixe */
    section:not(.p-0):not(.page-title-hero) {
        padding-top: var(--space-section-mobile) !important;
        padding-bottom: var(--space-section-mobile) !important;
    }
    h1 { font-size: clamp(1.75rem, 6vw, 2.5rem); }
    h2 { font-size: clamp(1.5rem, 5vw, 2rem); }
}

/* ─── Formulaire contact : erreurs de validation Symfony ─────── */
.contact-form-style-01 .form-control.is-invalid,
.contact-form-style-01 .form-check-input.is-invalid {
    border-color: #C0392B;
}
.contact-form-style-01 .form-check-input.is-invalid {
    outline: 2px solid rgba(192, 57, 43, .35);
}
.contact-form-style-01 ul,
.form-global-errors ul {
    list-style: none;
    margin: 0;
    padding: 0;
}
.contact-form-style-01 ul li,
.form-global-errors ul li {
    color: #C0392B;
    font-size: 13px;
    line-height: 1.5;
    margin-top: 6px;
}
.form-global-errors {
    background: #FDF2F0;
    border-left: 4px solid #C0392B;
    border-radius: 0 6px 6px 0;
    color: #7B241C;
    font-size: 15px;
    padding: 15px 20px;
}

/* ─── reCAPTCHA v3 : masquer le badge flottant ─────────────── */
/* Google autorise de le cacher si une mention textuelle est présente dans le formulaire. */
.grecaptcha-badge { visibility: hidden !important; }
