/* =========================================================
 * BDDGend — Site Blue Visual
 * Source : bddgend-site-blue-visual.php
 * Bloc CSS #1
 * CSS externalisé — Phase 7F
 * ========================================================= */

:root {
    --bdd-blue-950:#15406f;
    --bdd-blue-900:#164f8f;
    --bdd-blue-850:#0f5fab;
    --bdd-blue-800:#0b6fd8;
    --bdd-blue-700:#147ee8;
    --bdd-blue-600:#2f95f4;
    --bdd-blue-500:#5ab0ff;
    --bdd-blue-400:#8ac8ff;
    --bdd-blue-200:#bfdbfe;
    --bdd-blue-100:#dbeafe;
    --bdd-blue-50:#eff6ff;

    --bdd-bg-top:#d7e4f2;
    --bdd-bg-mid:#c5d4e6;
    --bdd-bg-bottom:#b4c5da;
    --bdd-bg-shadow:rgba(7,84,174,.18);

    --bdd-card:#ffffff;
    --bdd-border:#d8e7ff;
    --bdd-text:#0f172a;
    --bdd-muted:#64748b;

    --bdd-radius-lg:20px;
    --bdd-radius-xl:28px;
    --bdd-shadow:0 18px 50px rgba(7,84,174,.18),0 6px 18px rgba(15,23,42,.08);
    --bdd-shadow-soft:0 8px 24px rgba(7,84,174,.12),0 2px 8px rgba(15,23,42,.06);
}

/* =========================================================
   FOND GLOBAL BDDGEND
   Objectif :
   - remplacer le gris OceanWP
   - garder un fond cohérent sur toutes les pages publiques
   - ne pas modifier l'intérieur des documents procéduraux
========================================================= */

html,
body {
    min-height:100%;
}

body {
    min-height:100vh !important;
}

#outer-wrap,
#wrap {
    min-height:100vh !important;
    display:flex !important;
    flex-direction:column !important;
}

#main {
    flex:1 0 auto !important;
}

#footer,
#footer-wrap,
#footer-bottom,
#footer-widgets {
    flex-shrink:0 !important;
}

html body,
body,
#outer-wrap,
#wrap,
#main,
#content-wrap,
#primary,
.content-area,
.site-main {
    background:
        radial-gradient(circle at top left, rgba(47,149,244,.22), transparent 34%),
        radial-gradient(circle at bottom right, rgba(15,64,111,.20), transparent 40%),
        linear-gradient(180deg, var(--bdd-bg-top) 0%, var(--bdd-bg-mid) 45%, var(--bdd-bg-bottom) 100%) !important;
    background-attachment:fixed !important;
}

/* Conteneurs OceanWP : transparents pour laisser apparaître le fond global */
#outer-wrap,
#wrap,
#main,
#content-wrap,
#primary,
.content-area,
.site-main,
#content,
.site-content,
.container,
.content-wrap {
    background:transparent !important;
}

/* Articles/pages : transparents par défaut, sauf blocs internes spécifiques */
article,
.entry-content {
    background:transparent !important;
}

/* =========================================================
   CLASSES DE PAGE BDDGEND
========================================================= */

body.bddgend-ui-dashboard,
body.bddgend-ui-profile,
body.bddgend-ui-admin,
body.bddgend-ui-login,
body.bddgend-ui-reset,
body.bddgend-2fa-page,
body.bddgend-procedural-page {
    background:
        radial-gradient(circle at top left, rgba(47,149,244,.22), transparent 34%),
        radial-gradient(circle at bottom right, rgba(15,64,111,.20), transparent 40%),
        linear-gradient(180deg, var(--bdd-bg-top) 0%, var(--bdd-bg-mid) 45%, var(--bdd-bg-bottom) 100%) !important;
    background-attachment:fixed !important;
}

/* Wrappers WordPress / OceanWP transparents sur pages BDDGend */
body.bddgend-ui-dashboard #outer-wrap,
body.bddgend-ui-dashboard #wrap,
body.bddgend-ui-dashboard #main,
body.bddgend-ui-dashboard #content-wrap,
body.bddgend-ui-dashboard #primary,
body.bddgend-ui-dashboard .content-area,
body.bddgend-ui-dashboard .site-main,
body.bddgend-ui-dashboard article,
body.bddgend-ui-dashboard .entry-content,

body.bddgend-ui-profile #outer-wrap,
body.bddgend-ui-profile #wrap,
body.bddgend-ui-profile #main,
body.bddgend-ui-profile #content-wrap,
body.bddgend-ui-profile #primary,
body.bddgend-ui-profile .content-area,
body.bddgend-ui-profile .site-main,
body.bddgend-ui-profile article,
body.bddgend-ui-profile .entry-content,

body.bddgend-ui-admin #outer-wrap,
body.bddgend-ui-admin #wrap,
body.bddgend-ui-admin #main,
body.bddgend-ui-admin #content-wrap,
body.bddgend-ui-admin #primary,
body.bddgend-ui-admin .content-area,
body.bddgend-ui-admin .site-main,
body.bddgend-ui-admin article,
body.bddgend-ui-admin .entry-content,

body.bddgend-ui-login #outer-wrap,
body.bddgend-ui-login #wrap,
body.bddgend-ui-login #main,
body.bddgend-ui-login #content-wrap,
body.bddgend-ui-login #primary,
body.bddgend-ui-login .content-area,
body.bddgend-ui-login .site-main,
body.bddgend-ui-login article,
body.bddgend-ui-login .entry-content,

body.bddgend-ui-reset #outer-wrap,
body.bddgend-ui-reset #wrap,
body.bddgend-ui-reset #main,
body.bddgend-ui-reset #content-wrap,
body.bddgend-ui-reset #primary,
body.bddgend-ui-reset .content-area,
body.bddgend-ui-reset .site-main,
body.bddgend-ui-reset article,
body.bddgend-ui-reset .entry-content,

body.bddgend-2fa-page #outer-wrap,
body.bddgend-2fa-page #wrap,
body.bddgend-2fa-page #main,
body.bddgend-2fa-page #content-wrap,
body.bddgend-2fa-page #primary,
body.bddgend-2fa-page .content-area,
body.bddgend-2fa-page .site-main,
body.bddgend-2fa-page article,
body.bddgend-2fa-page .entry-content {
    background:transparent !important;
}

/* =========================================================
   LOGIN / RESET
========================================================= */

.bg-auth-page,
body.bddgend-ui-login .bg-auth-page,
body.bddgend-ui-reset .bg-auth-page {
    background:
        radial-gradient(circle at top left, rgba(47,149,244,.22), transparent 34%),
        radial-gradient(circle at bottom right, rgba(15,64,111,.20), transparent 40%),
        linear-gradient(180deg, var(--bdd-bg-top) 0%, var(--bdd-bg-mid) 45%, var(--bdd-bg-bottom) 100%) !important;
}

.bg-auth-page::before,
body.bddgend-ui-login .bg-auth-page::before,
body.bddgend-ui-reset .bg-auth-page::before {
    display:none !important;
}

/* =========================================================
   HERO / CARTES / BOUTONS
========================================================= */

.bg-hero,
.bddgend-hero,
body.bddgend-ui-admin .entry-content > h1:first-child,
body.bddgend-ui-admin .entry-content > h2:first-child {
    background:
        radial-gradient(circle at 12% 8%, rgba(138,200,255,.30), transparent 34%),
        linear-gradient(135deg,var(--bdd-blue-950) 0%,var(--bdd-blue-850) 45%,var(--bdd-blue-700) 100%) !important;
    box-shadow:var(--bdd-shadow) !important;
}

body.bddgend-ui-admin .entry-content form,
body.bddgend-ui-admin .entry-content table,
body.bddgend-ui-admin .entry-content .bddgend-card,
body.bddgend-ui-admin .entry-content .bg-card,
.bg-card,
.bg-auth-card,
.bddgend-login-card,
.bddgend-card,
.bddgend-2fa-card {
    background:rgba(255,255,255,.97) !important;
    border:1px solid var(--bdd-border) !important;
    border-radius:22px !important;
    box-shadow:var(--bdd-shadow-soft) !important;
}

.bg-btn-primary,
.bg-form button,
.bg-reset-wrap input[type="submit"],
.bg-reset-wrap button,
.bddgend-form button,
.bddgend-btn:not(.bddgend-btn-light):not(.bddgend-btn-ghost):not(.bddgend-btn-soft):not(.bddgend-btn-danger-soft),
body.bddgend-ui-admin button,
body.bddgend-ui-admin input[type="submit"],
body.bddgend-ui-admin input[type="button"],
body.bddgend-ui-admin .button,
body.bddgend-ui-admin a.button {
    background:linear-gradient(135deg,var(--bdd-blue-700),var(--bdd-blue-500)) !important;
    color:#fff !important;
    border:0 !important;
    border-radius:14px !important;
    box-shadow:0 8px 22px rgba(20,126,232,.24) !important;
    font-weight:800 !important;
}

.bg-btn-secondary,
.bddgend-btn-light,
.bddgend-btn-soft {
    background:#fff !important;
    color:var(--bdd-blue-800) !important;
    border:1px solid var(--bdd-blue-100) !important;
}

/* Titres hero */
.bg-hero h1,
.bddgend-hero h1,
body.bddgend-ui-profile .bg-hero h1,
body.bddgend-ui-profile .bddgend-hero h1,
body.bddgend-ui-dashboard .bg-hero h1,
body.bddgend-ui-dashboard .bddgend-hero h1,
body.bddgend-ui-admin .bg-hero h1,
body.bddgend-ui-admin .bddgend-hero h1,
body.bddgend-ui-admin .entry-content > h1:first-child,
body.bddgend-ui-admin .entry-content > h2:first-child {
    color:#ffffff !important;
    text-shadow:0 2px 10px rgba(0,0,0,.18) !important;
}

/* Masquer le bouton Déconnexion uniquement dans le bloc hero "Bienvenue" */
.bg-hero a[href*="action=logout"],
.bddgend-hero a[href*="action=logout"] {
    display:none !important;
}

/* =========================================================
   PAGES PROCÉDURALES
   Important : on conserve le document blanc et imprimable.
========================================================= */

body.bddgend-procedural-page div#pageGlobale {
    background:#ffffff !important;
    border:1px solid rgba(216,231,255,.95) !important;
    box-shadow:
        0 22px 60px var(--bdd-bg-shadow),
        0 8px 24px rgba(15,23,42,.10) !important;
}

/* Protection documents procéduraux */
div.contenuePage,
div.contenuePage table,
div.contenuePage td,
div.contenuePage th {
    box-shadow:none !important;
}

/* =========================================================
   IMPRESSION
========================================================= */

@media print {
    html body,
    body,
    #outer-wrap,
    #wrap,
    #main,
    #content-wrap,
    #primary,
    .content-area,
    .site-main,
    article,
    .entry-content {
        background:#ffffff !important;
        background-image:none !important;
        box-shadow:none !important;
    }

    body.bddgend-procedural-page div#pageGlobale {
        border:0 !important;
        box-shadow:none !important;
    }
}
