/*
Theme Name:   BimBamBoom WP Child
Theme URI:    https://bimbamboom.club
Description:  Child theme — applique la charte graphique BBB (rouge / bleu ciel / jaune soleil) et transforme l'accueil en one-page avec ancres.
Author:       Gayakoa pour Step Up Marketing
Author URI:   https://gayakoa.com
Template:     BimBamBoom-WP-Fixed
Version:      0.1.0
Text Domain:  bimbamboom-child
*/

/* =========================================================
   Charte BBB — couleurs officielles
   ========================================================= */
:root {
    /* Couleurs charte */
    --bbb-red:        #e30613;
    --bbb-blue-sky:   #49c1e9;
    --bbb-yellow-sun: #ffed00;
    --bbb-black:      #000000;
    --bbb-white:      #ffffff;

    /* Aliases utilisés par le thème parent (override des variables existantes) */
    --color-primary:  var(--bbb-red);       /* était #3b5d50 (vert) */
    --color-secondary:var(--bbb-blue-sky);  /* était #f9bf29 (jaune) */
    --color-text:     #1a1a1a;
    --color-text-muted: #5a5a5a;
    --color-bg:       #ffffff;              /* était #eff2f1 (gris-vert) */
    --color-white:    #ffffff;

    /* Tailles */
    --header-height:  104px;
    --container-max:  1280px;
}

/* =========================================================
   HEADER — bandeau blanc sticky avec onglets bleu/rouge
   ========================================================= */
.site-header {
    background: var(--bbb-white) !important;
    box-shadow: 0 2px 12px rgba(0,0,0,0.08);
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    min-height: var(--header-height);
    display: flex;
    align-items: center;
    padding: 12px 0;
}

.site-header .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    max-width: var(--container-max);
}

.site-branding .site-logo a,
.site-branding .site-logo img {
    color: var(--bbb-red);
    font-weight: 900;
    text-decoration: none;
    max-height: 64px;
    width: auto;
}

/* Navigation principale */
#site-navigation ul {
    list-style: none;
    display: flex;
    gap: 28px;
    margin: 0;
    padding: 0;
}

#site-navigation a {
    color: var(--bbb-blue-sky);
    font-family: var(--font-heading, 'Roboto', sans-serif);
    font-weight: 700;
    font-size: 1rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 8px 4px;
    border-bottom: 3px solid transparent;
    transition: color .2s, border-color .2s;
}

#site-navigation a:hover,
#site-navigation li.current-menu-item a,
#site-navigation li.current_page_item a,
#site-navigation li.is-active a {
    color: var(--bbb-red);
    border-bottom-color: var(--bbb-red);
}

/* =========================================================
   BOUTONS — CTA rouge BBB
   ========================================================= */
.btn,
.wp-block-button__link {
    border-radius: 999px !important;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 14px 32px;
    transition: transform .2s, box-shadow .2s;
}

.btn-primary,
.btn.btn-primary {
    background: var(--bbb-red) !important;
    color: var(--bbb-white) !important;
    border: none;
}

.btn-primary:hover {
    background: #c00510 !important;
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(227,6,19,0.35);
}

.btn-outline {
    background: transparent !important;
    color: var(--bbb-white) !important;
    border: 2px solid var(--bbb-white) !important;
}

.btn-outline:hover {
    background: var(--bbb-white) !important;
    color: var(--bbb-red) !important;
}

/* =========================================================
   BODY & TYPOGRAPHIE
   ========================================================= */
body {
    background: var(--bbb-white);
    color: var(--color-text);
}

h1, h2, h3, h4, h5, h6 {
    color: var(--color-text);
}

a {
    color: var(--bbb-red);
}

a:hover {
    color: var(--bbb-blue-sky);
}

/* =========================================================
   FOOTER
   ========================================================= */
.site-footer {
    background: var(--bbb-black) !important;
    color: var(--bbb-white);
    padding: 32px 0;
}

.site-footer a {
    color: var(--bbb-blue-sky);
}

/* =========================================================
   PARTENAIRES — 3 blocs Premium / Distribution / Contributeurs
   ========================================================= */
.partners-block {
    margin-bottom: 48px;
}

.partners-block-title {
    text-align: center;
    color: var(--bbb-red);
    font-size: 1.5rem;
    text-transform: uppercase;
    margin-bottom: 24px;
    letter-spacing: 1px;
}

.partners-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 24px;
    align-items: center;
}

.partner-card {
    background: var(--bbb-white);
    border: 1px solid #eee;
    border-radius: 12px;
    padding: 24px;
    text-align: center;
    transition: transform .2s, box-shadow .2s;
}

.partner-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0,0,0,0.1);
}

.partner-card a { display: block; }
.partner-logo { max-width: 140px; max-height: 80px; margin: 0 auto; object-fit: contain; }

/* =========================================================
   FAQ — onglet actif rouge déjà bien dans parent, on harmonise
   ========================================================= */
.faq-accordion-btn:hover,
.faq-accordion-btn.active {
    background-color: #fff5f6 !important;
    color: var(--bbb-red) !important;
    border-left: 4px solid var(--bbb-red);
}

/* Admin bar WordPress : décaler le header fixe */
.admin-bar .site-header {
    top: 32px;
}
.admin-bar #site-navigation ul {
    top: calc(32px + var(--header-height));
}
@media screen and (max-width: 782px) {
    .admin-bar .site-header {
        top: 46px;
    }
    .admin-bar #site-navigation ul {
        top: calc(46px + var(--header-height));
    }
}

/* Compense le header fixe sur les pages secondaires (FAQ, Contact, etc.) */
body:not(.home) .site-main {
    padding-top: calc(var(--header-height) + 40px);
}
.admin-bar body:not(.home) .site-main {
    padding-top: calc(32px + var(--header-height) + 40px);
}
@media screen and (max-width: 782px) {
    .admin-bar body:not(.home) .site-main {
        padding-top: calc(46px + var(--header-height) + 40px);
    }
}

/* =========================================================
   HEADER LOGO
   ========================================================= */
.header-logo-link { display: flex; align-items: center; }
.header-logo { max-height: 80px; width: auto; display: block; }

/* =========================================================
   TITRE MOBILE (entre logo et burger)
   ========================================================= */
.header-mobile-title {
    display: none;
}

/* =========================================================
   BURGER MOBILE
   ========================================================= */
.mobile-menu-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
    flex-direction: column;
    gap: 5px;
    z-index: 110;
}

.burger-bar {
    display: block;
    width: 26px;
    height: 2px;
    background: var(--bbb-red);
    border-radius: 2px;
    transition: transform .25s, opacity .25s;
}

/* Animation burger → croix — piloté par .is-active sur le bouton lui-même */
.mobile-menu-toggle.is-active .burger-bar:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.mobile-menu-toggle.is-active .burger-bar:nth-child(2) { opacity: 0; }
.mobile-menu-toggle.is-active .burger-bar:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* =========================================================
   MENU — filet de sécurité : liens ancres jamais rouges
   hors homepage (WordPress peut mal détecter l'item actif)
   ========================================================= */
body:not(.home) #site-navigation a[href*="#"] {
    color: var(--bbb-blue-sky) !important;
    border-bottom-color: transparent !important;
}

/* =========================================================
   RESPONSIVE
   ========================================================= */
@media (max-width: 900px) {
    .header-mobile-title {
        display: block;
        flex: 1;
        text-align: center;
        font-family: var(--font-heading, 'Roboto', sans-serif);
        font-weight: 900;
        font-size: 1rem;
        letter-spacing: 1px;
        color: var(--bbb-red);
        white-space: nowrap;
        padding: 0 8px;
    }

    /* Override complet du parent : le nav est toujours rendu (display:block),
       mais sans espace ni fond. La visibilité du menu est gérée par is-open sur le ul. */
    #site-navigation {
        display: block !important;   /* bypass le display:none du thème parent */
        position: static !important; /* bypass le position:absolute du thème parent */
        width: 0 !important;
        min-width: 0 !important;
        overflow: visible;
        background: transparent !important;
        padding: 0 !important;
        border: none !important;
    }

    #site-navigation ul {
        flex-direction: column;
        gap: 0;
        background: var(--bbb-white);
        position: fixed;
        top: var(--header-height);
        right: 0;
        left: 0;
        padding: 16px;
        box-shadow: 0 4px 12px rgba(0,0,0,0.1);
        display: none;
        z-index: 1001; /* au-dessus du header (1000) */
    }
    #site-navigation.is-open ul { display: flex; }
    #site-navigation a {
        display: block;
        padding: 14px 8px;
        border-bottom: 1px solid #f0f0f0;
    }
    .mobile-menu-toggle { display: flex !important; }
}

/* Admin bar mobile : compenser le décalage du header sur la position du menu */
.admin-bar #site-navigation ul {
    top: calc(32px + var(--header-height));
}
@media screen and (max-width: 782px) {
    .admin-bar #site-navigation ul {
        top: calc(46px + var(--header-height));
    }
}
