/* ============================================
   01 : Base : reset local, shell de page, filets anti-conflit
   Modèle "page vierge" (Elementor + BuddyX dequeue en bloc).
   ============================================ */

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body.pxd-discover-page {
    margin: 0;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    background: var(--pixidia-bg, #f0f4f4);
    color: var(--pixidia-text, #1a2e2e);
    font-family: 'Urbanist', system-ui, -apple-system, 'Segoe UI', sans-serif;
    font-size: 16px;
    line-height: 1.5;
    /* PAS d'overflow:hidden (contrairement à l'app-shell itinéraire) : page scrollable. */
}

body.pxd-discover-page img { max-width: 100%; height: auto; }

/* text-decoration seulement : NE PAS imposer color:inherit sur `body.pxd-discover-page a`
   (spécificité 0,1,2 qui écraserait les couleurs de boutons-liens comme .pxd-disc-preview).
   La couleur des liens vient des règles de composant, ou de `a{color:inherit}` bas niveau. */
body.pxd-discover-page a { text-decoration: none; }
a:where(.pxd-discover-page a) { color: inherit; }

/* Le <main> occupe l'espace disponible -> le footer reste en bas même sur page courte. */
body.pxd-discover-page #pxd-discover-app { flex: 1 0 auto; }

/* --- Header sticky (le plugin source fixe le header via un app-shell CSS Grid
       100vh/overflow:hidden ; ici, page en flux normal -> vrai sticky). --- */
body.pxd-discover-page .pxd-site-header {
    position: sticky;
    top: 0;
    z-index: 200;
}

/* --- Filet admin-bar : le fix PHP masque la barre (maybeHideAdminBar), ce filet
       couvre le cas où le filtre serait contourné. --- */
body.pxd-discover-page.admin-bar { margin-top: 0 !important; }
@media screen and (max-width: 782px) {
    body.pxd-discover-page.admin-bar { margin-top: 0 !important; }
}

/* --- GTranslate (P11) : widget flottant injecté en wp_footer, jamais
       dequeue-able par handle -> masquage CSS. --- */
body.pxd-discover-page #gt_float_wrapper,
body.pxd-discover-page .gt_float_switcher,
body.pxd-discover-page div[class*="gt_float"] {
    display: none !important;
    visibility: hidden !important;
}

/* --- Focus visible (design system : outline secondary, jamais nu). --- */
body.pxd-discover-page :focus-visible {
    outline: 2px solid var(--pixidia-green, #208D3E);
    outline-offset: 2px;
}
body.pxd-discover-page :focus:not(:focus-visible) { outline: none; }

/* --- Skip link a11y. --- */
.pxd-disc-skip {
    position: absolute;
    left: -9999px;
    top: 0;
    z-index: 1000;
    padding: 10px 16px;
    background: var(--pixidia-white, #fff);
    border-radius: 0 0 var(--radius-sm, 8px) 0;
    box-shadow: var(--shadow-md);
    font-weight: 600;
}
.pxd-disc-skip:focus { left: 0; }

/* --- prefers-reduced-motion global. --- */
@media (prefers-reduced-motion: reduce) {
    body.pxd-discover-page *,
    body.pxd-discover-page *::before,
    body.pxd-discover-page *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}

.pxd-visually-hidden {
    position: absolute !important;
    width: 1px; height: 1px;
    padding: 0; margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap; border: 0;
}
