/* =========================================================
   GLOBAL — TITRES, BASE & RESET PDSE
========================================================= */

/* Titres généraux PDSE */
h1, h2, h3, h4 {
    font-family: system-ui, Inter, sans-serif !important;
    font-weight: 900 !important;
    letter-spacing: 0.03em;
}

/* Liens globaux */
a {
    transition: opacity .2s ease;
}
a:hover {
    opacity: .8;
}

/* =========================================================
   HEADER FIXE — Compatible Astra
========================================================= */

.site-header,
.ast-primary-header-bar,
.main-header-bar {
    position: sticky !important;
    top: 0 !important;
    z-index: 9999 !important;
    background: #ffffff !important;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    box-shadow: 0 2px 14px rgba(0,0,0,0.06);
}

/* Retire la marge WordPress admin pour éviter un espace blanc */
#wpadminbar { display: none !important; }
html { margin-top: 0 !important; }

/* =========================================================
   FIXES GÉNÉRAUX (classes utilitaires)
========================================================= */

/* Empêche les débordements inattendus */
img, video {
    max-width: 100%;
    height: auto;
}

/* Boutons globaux PDSE */
.pdse-btn,
.wp-block-button__link {
    border-radius: 999px !important;
    font-weight: 600 !important;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* =========================================================
   RESPONSIVE GLOBAL
========================================================= */

@media (max-width: 768px) {
    body {
        padding-left: 0;
        padding-right: 0;
    }
}/* ======================================================
   DARK MODE COMPLET — PRIMEURS DU SUD-EST
   Version PRO — propre, consolidée, sans doublons
   À copier-coller telle quelle
====================================================== */

@media (prefers-color-scheme: dark) {

    /* ======================================================
       1) FOND GÉNÉRAL
    ======================================================= */
    body, html, .site, .site-content {
        background: #000 !important;
        color: #e6e6e6 !important;
    }

    /* ======================================================
       2) HEADER / MENU DESKTOP
    ======================================================= */
    .site-header,
    .main-header-bar,
    .ast-primary-header-bar,
    .ast-above-header-bar,
    .ast-below-header-bar,
    .site-header .ast-container {
        background: #000 !important;
    }

    .main-header-menu a,
    .ast-menu-item a {
        color: #fff !important;
    }

    /* Logo version sombre */
    .custom-logo,
    .site-branding img {
        content: url("https://primeursdusudest.fr/wp-content/uploads/2025/12/9810a078-7910-4bf5-9829-5153fc1f3fbf-scaled.png") !important;
    }

    /* Sous-menus desktop */
    .main-header-menu .sub-menu,
    .ast-desktop .main-header-menu .sub-menu {
        background: #111 !important;
        border: 1px solid #222 !important;
    }
    .main-header-menu .sub-menu a {
        color: #e6e6e6 !important;
    }
    .main-header-menu .sub-menu a:hover {
        background: #1a1a1a !important;
        color: #fff !important;
    }

    /* ======================================================
       3) MENUS MOBILES (fix total Astra 4+)
    ======================================================= */

    /* Fond du popup + conteneurs */
    #ast-mobile-popup,
    #ast-mobile-popup *,
    .ast-mobile-popup,
    .ast-mobile-popup-inner,
    .ast-mobile-popup-content,
    .ast-off-canvas-overlay,
    .ast-mobile-header-content,
    .ast-mobile-header-wrap,
    .ast-header-break-point .main-navigation,
    .ast-header-break-point .main-header-menu,
    .ast-builder-menu-mobile,
    .ast-builder-menu-mobile .main-header-menu {
        background: #000 !important;
        color: #fff !important;
    }

    /* Items */
    .ast-header-break-point .main-header-menu li,
    .ast-builder-menu-mobile .menu-item {
        background: #000 !important;
        border-color: #222 !important;
    }

    /* Liens */
    .ast-header-break-point .main-header-menu a,
    .ast-builder-menu-mobile .main-header-menu a,
    #ast-mobile-popup a {
        color: #fff !important;
    }

    /* Hover */
    .ast-header-break-point .main-header-menu a:hover,
    #ast-mobile-popup a:hover {
        background: #1a1a1a !important;
        color: #fff !important;
    }

    /* Sous-menus mobile */
    .ast-header-break-point .main-header-menu .sub-menu,
    .ast-builder-menu-mobile .sub-menu,
    #ast-mobile-popup .sub-menu {
        background: #111 !important;
        border: 1px solid #222 !important;
    }
    #ast-mobile-popup .sub-menu a,
    .ast-builder-menu-mobile .sub-menu a {
        color: #e6e6e6 !important;
    }

    /* Icônes flèches */
    .ast-menu-toggle,
    .ast-header-break-point .menu-toggle,
    #ast-mobile-popup .ast-menu-toggle {
        color: #fff !important;
        background: transparent !important;
    }

    /* ======================================================
       4) CARTES / BLOCS CONTENU (fond sombre + texte NOIR)
    ======================================================= */

    .pdse-card,
    .client-card,
    .client-help,
    .contact-coordonnees,
    .contact-horaires,
    .contact-localisation,
    .contact-logistique,
    .contact-formulaire,
    .contact-rgpd,
    .pdse-profil-wrapper,
    .client-page > *:first-child {
        background: #141414 !important;
        color: #000 !important;
        box-shadow: 0 8px 20px rgba(0,0,0,0.5) !important;
    }

    /* Titres des cartes */
    .pdse-card h1, .pdse-card h2,
    .client-card h1, .client-card h2,
    .client-help h2,
    .contact-page h2 {
        color: #000 !important;
    }

    /* Textes */
    .pdse-card p,
    .client-card p,
    .client-help p,
    .contact-page p,
    .pdse-profil-wrapper p {
        color: #000 !important;
    }

    /* Liens */
    .pdse-card a,
    .client-card a,
    .client-help a {
        color: #000 !important;
    }

    /* ======================================================
       5) FOOTER (fix complet + page d’accueil)
    ======================================================= */

    footer,
    .site-footer,
    .site-footer *:not(a),
    .ast-footer-wrap,
    .ast-small-footer,
    .site-primary-footer-wrap,
    .site-primary-footer-inner-wrap,
    .footer-adv-overlay,
    .site-info {
        background: #000 !important;
        color: #e6e6e6 !important;
    }

    .site-footer a {
        color: #fff !important;
    }

    /* Spécifique page d'accueil */
    .home footer,
    .home .site-footer,
    .home .ast-small-footer,
    .home .ast-footer-wrap,
    .home .site-primary-footer-wrap {
        background: #000 !important;
        color: #e6e6e6 !important;
    }
}/* ======================================================
   PATCH FINAL — MENU MOBILE DARK MODE ASTRA
   (fond blanc / vert corrigé)
====================================================== */
@media (prefers-color-scheme: dark) {

    /* Conteneur du menu mobile (drawer) */
    #ast-mobile-popup,
    .ast-mobile-popup,
    .ast-mobile-popup-inner,
    .ast-mobile-popup-content,
    .ast-mobile-header-wrap,
    .ast-mobile-header-content,
    .ast-header-break-point .main-navigation {
        background: #000 !important;
        color: #fff !important;
    }

    /* Liste principale du menu */
    .ast-header-break-point .main-header-menu,
    .ast-header-break-point .main-header-menu > li,
    .ast-builder-menu-mobile .main-header-menu,
    .ast-builder-menu-mobile .main-header-menu > li {
        background: #000 !important;
        border-color: #222 !important;
    }

    /* LIENS de premier niveau (évite le vert clair d’Astra) */
    .ast-header-break-point .main-header-menu > li > a,
    .ast-builder-menu-mobile .main-header-menu > li > a {
        background: #000 !important;
        color: #fff !important;
    }

    /* État “page active” (Accueil / Espace Clients…) */
    .ast-header-break-point .main-header-menu > li.current-menu-item > a,
    .ast-header-break-point .main-header-menu > li.current-menu-ancestor > a,
    .ast-builder-menu-mobile .main-header-menu > li.current-menu-item > a,
    .ast-builder-menu-mobile .main-header-menu > li.current-menu-ancestor > a {
        background: #111 !important;
        color: #fff !important;
    }

    /* SOUS-MENUS (les blocs blancs que tu vois) */
    .ast-header-break-point .main-header-menu .sub-menu,
    .ast-header-break-point .main-header-menu .sub-menu li,
    .ast-builder-menu-mobile .sub-menu,
    .ast-builder-menu-mobile .sub-menu li {
        background: #000 !important;
        border-color: #222 !important;
    }

    .ast-header-break-point .main-header-menu .sub-menu a,
    .ast-builder-menu-mobile .sub-menu a {
        background: #000 !important;
        color: #e6e6e6 !important;
    }

    /* Hover / appui sur mobile */
    .ast-header-break-point .main-header-menu a:hover,
    .ast-header-break-point .main-header-menu .sub-menu a:hover,
    .ast-builder-menu-mobile .main-header-menu a:hover,
    .ast-builder-menu-mobile .sub-menu a:hover {
        background: #1a1a1a !important;
        color: #fff !important;
    }

    /* Icônes de dépliage (les petites flèches) */
    .ast-header-break-point .ast-menu-toggle,
    #ast-mobile-popup .ast-menu-toggle {
        color: #fff !important;
        background: transparent !important;
        border-color: #444 !important;
    }
}/* ======================================================
   DARK MODE — Correction titres page L’Entreprise
====================================================== */
@media (prefers-color-scheme: dark) {

    .pdse-entreprise h1,
    .pdse-entreprise h2,
    .pdse-entreprise h3 {
        color: #f2f2f2 !important; /* blanc doux, lisible */
    }/* ======================================================
   DARK MODE — Titres NOIRS dans les cartes (page Entreprise)
====================================================== */
@media (prefers-color-scheme: dark) {

    /* Titres des encarts */
    .pdse-entreprise .encart h1,
    .pdse-entreprise .encart h2,
    .pdse-entreprise .encart h3,
    .pdse-entreprise .encart h4 {
        color: #000 !important;
    }

    /* Texte des encarts (au cas où) */
    .pdse-entreprise .encart p,
    .pdse-entreprise .encart li {
        color: #000 !important;
    }
}

}