/**
 * Page d'accueil CBP - Maquette Figma (plein écran)
 * Fond dégradé, logo CBP, titre, boutons, illustration.
 * Cette page occupe tout l'écran, sans header/footer Electro.
 */

/* Roboto chargée via <link> dans functions.php (cbp_enqueue_roboto_font) */

/* Variables couleurs maquette */
:root {
    --cbp-cyan: #00acc1;
    --cbp-cyan-dark: #0097a7;
    --cbp-bg-light: #f8fcff;
    --cbp-bg-blue: #e3f2fd;
    --cbp-text: #181818;
    --cbp-cmyk-cyan: #00bcd4;
    --cbp-cmyk-magenta: #e91e63;
    --cbp-cmyk-yellow: #ffeb3b;
    --cbp-cmyk-black: #212121;
}

/* Plein écran : pas de header Electro, fond maquette partout, police Roboto */
body.cbp-landing-page {
    margin: 0;
    padding: 0;
    min-height: 100vh;
    overflow-x: hidden;
    background: linear-gradient(135deg, var(--cbp-bg-light) 0%, var(--cbp-bg-blue) 50%, #b3e5fc 100%);
    font-family: 'Roboto', sans-serif;
}

body.cbp-landing-page.admin-bar .cbp-landing-page-wrap {
    min-height: calc(100vh - 32px);
}

@media screen and (max-width: 782px) {
    body.cbp-landing-page.admin-bar .cbp-landing-page-wrap {
        min-height: calc(100vh - 46px);
    }
}

.cbp-landing-page-wrap {
    min-height: 100vh;
    width: 100%;
    margin: 0;
    padding: 0;
}

/* Conteneur principal : annuler les contraintes du thème Electro */
body.cbp-landing-page #primary,
body.cbp-landing-page #main,
body.cbp-landing-page .cbp-landing-wrap {
    padding: 0;
    margin: 0;
    max-width: none;
    width: 100%;
    float: none;
}

/* Hero plein écran — contenu aligné en haut pour logo en haut */
.cbp-landing-hero {
    position: relative;
    min-height: 100vh;
    min-height: 100dvh;
    display: flex;
    align-items: flex-start;
    overflow: hidden;
    background-color: var(--cbp-bg-light);
}

/* Illustration uniquement en arrière-plan (sans dégradé) */
.cbp-landing-hero.cbp-landing-has-bg-image {
    background-image: var(--cbp-bg-image);
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

/* Fond : ligne ondulée + cercle (au-dessus du contenu, pas de l'image) */
.cbp-landing-bg {
    position: absolute;
    inset: 0;
    pointer-events: none;
}

.cbp-landing-wave {
    display: none;
    /* courbe ondulée désactivée */
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 40%;
    min-height: 200px;
}

.cbp-landing-wave svg {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Cercle bas gauche avec icône – masqué (demande client) */
.cbp-landing-circle {
    display: none !important;
}

.cbp-landing-circle-icon {
    font-size: 2rem;
    color: #fff;
    font-weight: bold;
    text-shadow: 0 0 2px rgba(0, 0, 0, 0.2);
}

/* Logo au-dessus de « Bienvenue » : espacement 147px, aligné à gauche */
.cbp-landing-logo-corner {
    margin-bottom: 147px;
}

/* Logo PNG : taille réduite, légère rotation anti-horaire comme sur la maquette */
.cbp-landing-logo-img {
    display: block;
    max-width: 80px;
    max-height: 80px;
    width: auto;
    height: auto;
    object-fit: contain;
    transform: rotate(-12deg);
}

/* Conteneur : logo en haut + titre + boutons */
.cbp-landing-container {
    position: relative;
    z-index: 2;
    width: 100%;
    max-width: 1320px;
    margin: 0 auto;
    padding: 32px 2.5rem 2.5rem 24px;
}

.cbp-landing-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    align-items: center;
}

/* Bloc contenu (logo, titre, boutons) — largeur limitée pour laisser l’illustration visible à droite */
/* Bloc gauche : logo, texte et boutons alignés à gauche (bord aligné avec le logo) */
.cbp-landing-left {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 1.5rem;
    max-width: 620px;
}

/* Logo CBP : carré cyan légèrement tourné + cbp + barres CMYK */
.cbp-landing-logo {
    display: block;
}

.cbp-logo-square {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 72px;
    height: 72px;
    background: var(--cbp-cyan);
    border-radius: 12px;
    transform: rotate(-12deg);
    box-shadow: 0 4px 12px rgba(0, 172, 193, 0.35);
    padding: 12px 8px 8px;
}

.cbp-logo-text {
    font-size: 1.5rem;
    font-weight: 700;
    color: #fff;
    text-transform: lowercase;
    letter-spacing: 0.02em;
    line-height: 1.1;
}

.cbp-logo-bars {
    display: flex;
    gap: 4px;
    margin-top: 6px;
}

.cbp-logo-bars .bar {
    width: 14px;
    height: 4px;
    border-radius: 2px;
}

.cbp-logo-bars .bar.cyan {
    background: var(--cbp-cmyk-cyan);
}

.cbp-logo-bars .bar.magenta {
    background: var(--cbp-cmyk-magenta);
}

.cbp-logo-bars .bar.yellow {
    background: var(--cbp-cmyk-yellow);
}

.cbp-logo-bars .bar.black {
    background: var(--cbp-cmyk-black);
}

/* Titre */
.cbp-landing-title {
    margin: 0;
    padding: 0;
    font-family: inherit;
    font-weight: 400;
    color: var(--cbp-text);
    line-height: 1.2;
    text-align: left;
}

/* Ligne 1 : « Bienvenue au » — plus petit, regular */
.cbp-landing-intro {
    display: block;
    font-size: 3.75rem;
    margin-bottom: 0.35em;
}

/* Lignes 2 et 3 : « COMPTOIR BÉNINOIS » / « DU PAPIERS » — plus gros, bold, majuscules */
.cbp-landing-main {
    display: block;
    font-size: clamp(3.75rem, 4vw, 2.75rem);
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.02em;
}

/* Boutons CTA */
.cbp-landing-ctas {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
}

/* Boutons : texte blanc, pas d'animation (priorité sur le thème) */
body.cbp-landing-page .cbp-btn {
    display: inline-block;
    padding: 0.75rem 1.75rem;
    font-size: 1rem;
    font-weight: 600;
    text-decoration: none;
    border-radius: 8px;
    color: #fff !important;
    transition: none !important;
    transform: none !important;
}

body.cbp-landing-page .cbp-btn-primary {
    background: var(--cbp-cyan);
    color: #fff !important;
    border: none;
}

body.cbp-landing-page .cbp-btn-primary:hover,
body.cbp-landing-page .cbp-btn-primary:focus {
    background: var(--cbp-cyan-dark);
    color: #fff !important;
    transform: none !important;
}

/* Colonne droite : illustration */
.cbp-landing-right {
    display: flex;
    justify-content: center;
    align-items: center;
}

.cbp-landing-illustration {
    width: 100%;
    max-width: 600px;
}

.cbp-landing-illustration img {
    width: 100%;
    height: auto;
    display: block;
}

.cbp-landing-illustration-placeholder {
    background: rgba(255, 255, 255, 0.6);
    border: 2px dashed var(--cbp-cyan);
    border-radius: 12px;
    padding: 2rem;
    text-align: center;
    font-size: 0.9rem;
    color: #555;
}

.cbp-landing-illustration-placeholder code {
    display: block;
    margin-top: 0.5rem;
    font-size: 0.8rem;
    word-break: break-all;
}

/* Illustration en avant-plan : visible uniquement sur mobile (cachée tablette/desktop) */
.cbp-landing-illustration-mobile {
    display: none;
}

/* Responsive — tablette et au-dessus : disposition inchangée (même layout que desktop) */

/* Mobile uniquement : disposition selon maquette (logo haut gauche sans rotation, illustration en avant-plan, texte et boutons centrés) */
@media (max-width: 767px) {
    .cbp-landing-illustration-mobile {
        display: block;
        width: 100%;
        max-width: 100%;
        margin: 0.75rem 0 1rem;
    }

    .cbp-landing-illustration-mobile img {
        width: 100%;
        height: auto;
        display: block;
    }

    /* En mobile : image d'arrière-plan dédiée si fournie, sinon pas de fond (illustration dans le flux) */
    .cbp-landing-hero.cbp-landing-has-mobile-bg {
        background-image: var(--cbp-bg-image-mobile) !important;
        background-size: cover;
        background-position: center 20%;
        background-repeat: no-repeat;
    }

    /* Avec image de fond mobile : ne pas afficher l'illustration dans le flux (une seule image) */
    .cbp-landing-hero.cbp-landing-has-mobile-bg .cbp-landing-illustration-mobile {
        display: none !important;
    }

    .cbp-landing-hero.cbp-landing-has-bg-image:not(.cbp-landing-has-mobile-bg) {
        background-image: none !important;
    }

    /* Hero mobile : flux (illustration → texte → boutons), pas de centrage vertical, bloc vers le bas */
    .cbp-landing-hero {
        display: flex;
        flex-direction: column;
        justify-content: flex-end;
        align-items: center;
        min-height: 100vh;
        min-height: 100dvh;
        padding: 0 0 2rem;
    }

    .cbp-landing-container {
        width: 100%;
        box-sizing: border-box;
        padding: 0 1rem;
        display: flex;
        flex-direction: column;
        align-items: center;
    }

    .cbp-landing-left {
        display: flex;
        flex-direction: column;
        align-items: center;
        width: 100%;
        max-width: 100%;
        margin-left: 0;
        gap: 0;
    }

    /* Logo fixé en haut à gauche (hors flux), le texte reste centré au milieu */
    .cbp-landing-logo-corner {
        position: fixed;
        top: 54px;
        left: 24px;
        z-index: 10;
        margin-bottom: 0;
    }

    .cbp-landing-logo-img {
        transform: none;
        max-width: 62px;
        max-height: 52px;
    }

    .cbp-landing-logo-corner .cbp-logo-square {
        width: 48px;
        height: 48px;
        padding: 8px 6px 6px;
    }

    .cbp-landing-logo-corner .cbp-logo-text {
        font-size: 1rem;
    }

    /* Illustration : en haut, puis espace avant le texte (comme maquette) */
    .cbp-landing-illustration-mobile {
        margin-bottom: 1.25rem;
    }

    /* Titre : centré horizontalement, dans le flux sous l’illustration */
    .cbp-landing-title {
        text-align: center;
        margin: 0 0 1rem;
        padding: 0 0.5rem;
        font-size: 1rem;
        width: 100%;
        max-width: 320px;
        box-sizing: border-box;
    }

    /* Même taille pour les deux lignes : "Bienvenue au" fin, "COMPTOIR BÉNINOIS DU PAPIERS" gras */
    .cbp-landing-intro {
        display: block;
        font-size: clamp(1.125rem, 4.5vw, 1.35rem);
        font-weight: 400;
        margin-bottom: 0.25em;
    }

    .cbp-landing-main {
        display: block;
        font-size: clamp(1.125rem, 4.5vw, 1.35rem);
        font-weight: 700;
    }

    /* Boutons : côte à côte, centrés horizontalement (comme maquette) */
    .cbp-landing-ctas {
        display: flex;
        flex-direction: row;
        justify-content: center;
        align-items: center;
        gap: 0.75rem;
        flex-wrap: nowrap;
        margin: 0;
    }

    .cbp-landing-ctas .cbp-btn {
        text-transform: uppercase;
        padding: 0.5rem 1rem;
        font-size: 0.8125rem;
        font-weight: 600;
        color: #fff !important;
        transition: none !important;
        transform: none !important;
    }

    .cbp-landing-circle {
        width: 80px;
        height: 80px;
        bottom: 3%;
        left: 1%;
    }

    .cbp-landing-circle-icon {
        font-size: 1.5rem;
    }
}

/* Responsive (grille si utilisée) — tablette */
@media (max-width: 992px) {
    .cbp-landing-grid {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .cbp-landing-ctas {
        flex-wrap: wrap;
    }

    .cbp-landing-illustration {
        max-width: 100%;
    }
}

@media (max-width: 576px) {
    .cbp-landing-container {
        padding: 1.5rem;
    }

    .cbp-landing-hero {
        min-height: 100vh;
        min-height: 100dvh;
        padding: 2rem 0;
    }

    .cbp-landing-circle {
        width: 80px;
        height: 80px;
        bottom: 3%;
        left: 1%;
    }

    .cbp-landing-circle-icon {
        font-size: 1.5rem;
    }
}

/* Masquer TOUS les éléments du thème Electro sur cette page (header, barre jaune, toggle, panier flottant) */
body.cbp-landing-page .top-bar,
body.cbp-landing-page .navbar,
body.cbp-landing-page .header,
body.cbp-landing-page header[role="banner"],
body.cbp-landing-page .electro-header,
body.cbp-landing-page .handheld-toolbar,
body.cbp-landing-page .sticky-cart,
body.cbp-landing-page .electro-sticky-cart,
body.cbp-landing-page [class*="sticky-cart"],
body.cbp-landing-page #electro-sticky-cart,
body.cbp-landing-page .electro-mode-switcher,
body.cbp-landing-page [class*="mode-switcher"],
body.cbp-landing-page .site-header,
body.cbp-landing-page #masthead,
body.cbp-landing-page .footer,
body.cbp-landing-page footer {
    display: none !important;
}

/* ==========================================================================
   Section IMPRIMERIE : titre bleu + items circulaires (image + libellé)
   ========================================================================== */

.cbp-imprimerie {
    background: #fff;
    padding: 3rem 24px 4rem;
}

.cbp-imprimerie__inner {
    max-width: 1100px;
    margin: 0 auto;
}

.cbp-imprimerie__title {
    display: inline-block;
    background: #28b3e3;
    color: #fff;
    font-size: 1rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.02em;
    padding: 0.75rem 2rem;
    border-radius: 24px;
    margin: 0 0 2.5rem;
    text-align: center;
}

.cbp-imprimerie__items {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 2rem 2.5rem;
}

.cbp-imprimerie__item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-decoration: none;
    color: inherit;
    max-width: 180px;
}

.cbp-imprimerie__item:hover {
    color: inherit;
}

.cbp-imprimerie__item-circle {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 140px;
    height: 140px;
    border-radius: 50%;
    background: #e8e8e8;
    overflow: hidden;
    flex-shrink: 0;
}

.cbp-imprimerie__item-circle img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.cbp-imprimerie__item-label {
    display: block;
    margin-top: 1rem;
    font-size: 0.9375rem;
    font-weight: 400;
    color: #000;
    text-align: center;
    line-height: 1.3;
}

@media (max-width: 767px) {
    .cbp-imprimerie__items {
        gap: 1.5rem;
    }

    .cbp-imprimerie__item-circle {
        width: 120px;
        height: 120px;
    }
}