/* =============================================================================
   H2J Homeblocks — Front CSS banners v3.17.0
   Full-width banner blocks : newsletter_banner, social_bar, payment_bar
   + footer_columns chess mode (damier CUBX alterné avec inversion au hover)
   Loaded AFTER main CSS to override theme interferences.

   v3.17.0 changes :
     - Removed legacy :nth-child(odd/even) chess rules (base bg, fade hover, buttons)
       Superseded by semantic classes from v3.16.0 (.hb-footer-col--primary/etc.)
     - swipe/diagonal transitions still use :nth-child for ::after overlays (cosmetic)

   v3.16.0 changes :
     - newsletter_banner : always 50/50 horizontal (no more vertical stack), compact mobile breakpoints
     - footer_columns chess : semantic color classes (.hb-footer-col--primary / --secondary / --accent / --light / --dark)
       mapped to h2jecosystem theme vars. Stable damier independent of viewport wrapping.

   v3.14.4 fixes (payment logos real official SVGs) :
     - Switched from custom-drawn SVG to OFFICIAL flat-rounded SVG logos.
     - Visa/Mastercard/Amex/PayPal from aaronfagan/svg-credit-card-payment-icons
       (Apache 2.0, 780x500 credit-card aspect, coloured rounded background baked in)
     - Stripe/Alma from vectorlogo.zone + worldvectorlogo (transparent bg)
     - Apple Pay/Google Pay from datatrans/payment-logos
     - Klarna from vectorlogo.zone
     Now the badge container is simply a hover wrapper — the SVG itself provides
     the visual branding. Badge enlarged to 64x40 to fit the credit-card ratio.
   v3.14.3 :
     - Payment logos maintenant chargés depuis des fichiers SVG locaux
     - Badge 52x36 au lieu de 48x32

   Scope :
     #h2j-homeblocks .hb-newsletter-banner       — newsletter banner plein-width
     #h2j-homeblocks .hb-social-bar              — social bar plein-width
     #h2j-homeblocks .hb-payment-bar             — payment bar plein-width
     #h2j-homeblocks .hb-footer-cols--chess      — chess mode enhancement
   ============================================================================= */


/* ═══════════════════════════════════════════════════════════════════════
   SHARED — Neutralize section wrappers for all 3 banner types
   ═══════════════════════════════════════════════════════════════════════ */

#h2j-homeblocks section.hb-block--newsletter_banner,
#h2j-homeblocks section.hb-block--social_bar,
#h2j-homeblocks section.hb-block--payment_bar {
    padding: 0 !important;
    margin: 0 !important;
    background: transparent !important;
    width: 100% !important;
    max-width: none !important;
}


/* ═══════════════════════════════════════════════════════════════════════
   NEWSLETTER BANNER — v3.14.0
   ═══════════════════════════════════════════════════════════════════════ */

#h2j-homeblocks .hb-newsletter-banner {
    display: flex !important;
    align-items: center;
    width: 100%;
    box-sizing: border-box;
    background: var(--hb-nb-bg, #F4EEFA) !important;
    color: var(--hb-nb-color, #2d3436) !important;
    font-family: inherit;
    gap: 32px;
}

#h2j-homeblocks .hb-newsletter-banner--pad-sm { padding: 24px 32px !important; }
#h2j-homeblocks .hb-newsletter-banner--pad-md { padding: 36px 32px !important; }
#h2j-homeblocks .hb-newsletter-banner--pad-lg { padding: 56px 32px !important; }

#h2j-homeblocks .hb-newsletter-banner--split { justify-content: center; }
#h2j-homeblocks .hb-newsletter-banner--split .hb-newsletter-banner__visual {
    flex: 0 0 auto;
    width: clamp(140px, 22%, 220px);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}
#h2j-homeblocks .hb-newsletter-banner--split .hb-newsletter-banner__content {
    flex: 1 1 auto;
    max-width: 720px;
}

#h2j-homeblocks .hb-newsletter-banner--centered {
    flex-direction: column;
    text-align: center;
}
#h2j-homeblocks .hb-newsletter-banner--centered .hb-newsletter-banner__content {
    max-width: 640px;
    margin: 0 auto;
}

#h2j-homeblocks .hb-newsletter-banner--align-left   .hb-newsletter-banner__content { text-align: left; }
#h2j-homeblocks .hb-newsletter-banner--align-center .hb-newsletter-banner__content { text-align: center; }
#h2j-homeblocks .hb-newsletter-banner--align-right  .hb-newsletter-banner__content { text-align: right; }

#h2j-homeblocks .hb-newsletter-banner__cubes {
    display: block;
    width: 100%;
    max-width: 180px;
    height: auto;
    filter: drop-shadow(0 6px 12px rgba(142, 90, 168, 0.15));
}

#h2j-homeblocks .hb-newsletter-banner__image {
    display: block;
    width: 100%;
    max-width: 220px;
    height: auto;
    object-fit: contain;
    border-radius: 12px;
}

#h2j-homeblocks .hb-newsletter-banner__badge {
    position: absolute;
    top: 10%;
    right: 5%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 64px;
    padding: 8px 14px;
    background: var(--cubx-primary, #cfa0e9);
    color: #ffffff;
    font-weight: 700;
    font-size: 1.1rem;
    letter-spacing: 0.02em;
    border-radius: 999px;
    box-shadow: 0 4px 12px rgba(142, 90, 168, 0.3);
    transform: rotate(-8deg);
    z-index: 2;
}

#h2j-homeblocks .hb-newsletter-banner__title {
    margin: 0 0 8px !important;
    padding: 0 !important;
    font-size: clamp(1.5rem, 3vw, 2rem);
    font-weight: 700;
    line-height: 1.2;
    color: inherit !important;
    background: transparent !important;
}
#h2j-homeblocks .hb-newsletter-banner__subtitle {
    margin: 0 0 16px !important;
    padding: 0 !important;
    font-size: clamp(0.95rem, 1.4vw, 1.05rem);
    line-height: 1.5;
    opacity: 0.8;
}

#h2j-homeblocks .hb-newsletter-banner__form { margin: 0; }
#h2j-homeblocks .hb-newsletter-banner__row {
    display: flex;
    gap: 8px;
    align-items: stretch;
    background: #ffffff;
    border-radius: 999px;
    padding: 6px;
    max-width: 500px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}
#h2j-homeblocks .hb-newsletter-banner--align-center .hb-newsletter-banner__row { margin: 0 auto; }
#h2j-homeblocks .hb-newsletter-banner--align-right  .hb-newsletter-banner__row { margin-left: auto; }

#h2j-homeblocks .hb-newsletter-banner__input {
    flex: 1 1 auto;
    min-width: 0;
    padding: 10px 20px !important;
    border: none !important;
    background: transparent !important;
    color: #2d3436 !important;
    font-size: 0.95rem;
    font-family: inherit;
    outline: none !important;
    box-shadow: none !important;
}
#h2j-homeblocks .hb-newsletter-banner__input::placeholder { opacity: 0.55; }

#h2j-homeblocks .hb-newsletter-banner__cta {
    flex: 0 0 auto;
    padding: 10px 28px !important;
    border: none !important;
    border-radius: 999px !important;
    background: var(--hb-nb-cta-bg, #cfa0e9) !important;
    color: var(--hb-nb-cta-color, #ffffff) !important;
    font-weight: 600;
    font-size: 0.95rem;
    font-family: inherit;
    cursor: pointer;
    transition: transform .15s, box-shadow .15s, filter .15s;
    text-transform: none !important;
    line-height: 1.4 !important;
}
#h2j-homeblocks .hb-newsletter-banner__cta:hover:not(:disabled) {
    transform: translateY(-1px);
    box-shadow: 0 6px 14px rgba(142, 90, 168, 0.3);
    filter: brightness(1.05);
}
#h2j-homeblocks .hb-newsletter-banner__form--disabled .hb-newsletter-banner__row { opacity: 0.6; }
#h2j-homeblocks .hb-newsletter-banner__form--disabled input,
#h2j-homeblocks .hb-newsletter-banner__form--disabled button { cursor: not-allowed; }

#h2j-homeblocks .hb-newsletter-banner__gdpr {
    display: inline-flex;
    align-items: flex-start;
    gap: 8px;
    margin: 10px 0 0;
    font-size: 0.8rem;
    line-height: 1.4;
    opacity: 0.75;
    cursor: pointer;
}
#h2j-homeblocks .hb-newsletter-banner__gdpr input[type="checkbox"] {
    margin-top: 2px;
    accent-color: var(--cubx-primary, #cfa0e9);
}
#h2j-homeblocks .hb-newsletter-banner__gdpr a {
    color: inherit;
    text-decoration: underline;
}

@container h2jhb (max-width: 699px) {
    /* v3.16.0 : stay horizontal even on narrow containers — compact 50/50 */
    #h2j-homeblocks .hb-newsletter-banner {
        gap: 16px;
        text-align: left;
    }
    #h2j-homeblocks .hb-newsletter-banner--pad-sm { padding: 16px 16px !important; }
    #h2j-homeblocks .hb-newsletter-banner--pad-md { padding: 20px 18px !important; }
    #h2j-homeblocks .hb-newsletter-banner--pad-lg { padding: 28px 20px !important; }
    #h2j-homeblocks .hb-newsletter-banner--split .hb-newsletter-banner__visual {
        width: clamp(80px, 22%, 140px);
    }
    #h2j-homeblocks .hb-newsletter-banner__cubes { max-width: 120px; }
    #h2j-homeblocks .hb-newsletter-banner__image  { max-width: 140px; }
    #h2j-homeblocks .hb-newsletter-banner__badge {
        min-width: 44px;
        padding: 4px 8px;
        font-size: 0.75rem;
    }
    #h2j-homeblocks .hb-newsletter-banner__title    { font-size: clamp(1rem, 2.4vw, 1.25rem); margin-bottom: 4px !important; }
    #h2j-homeblocks .hb-newsletter-banner__subtitle { font-size: 0.8rem; margin-bottom: 8px !important; display: none; } /* hide subtitle on narrow */
    #h2j-homeblocks .hb-newsletter-banner__gdpr     { display: none; }
    #h2j-homeblocks .hb-newsletter-banner__input    { padding: 8px 12px !important; font-size: 0.85rem; }
    #h2j-homeblocks .hb-newsletter-banner__cta      { padding: 8px 16px !important; font-size: 0.85rem; }
}
@media (max-width: 767px) {
    /* v3.16.0 : stay horizontal even on mobile — compact 50/50 */
    #h2j-homeblocks .hb-newsletter-banner {
        gap: 16px;
        text-align: left;
    }
    #h2j-homeblocks .hb-newsletter-banner--pad-sm { padding: 16px 16px !important; }
    #h2j-homeblocks .hb-newsletter-banner--pad-md { padding: 20px 18px !important; }
    #h2j-homeblocks .hb-newsletter-banner--pad-lg { padding: 28px 20px !important; }
    #h2j-homeblocks .hb-newsletter-banner--split .hb-newsletter-banner__visual {
        width: clamp(80px, 22%, 140px);
    }
    #h2j-homeblocks .hb-newsletter-banner__cubes { max-width: 120px; }
    #h2j-homeblocks .hb-newsletter-banner__image  { max-width: 140px; }
    #h2j-homeblocks .hb-newsletter-banner__badge {
        min-width: 44px;
        padding: 4px 8px;
        font-size: 0.75rem;
    }
    #h2j-homeblocks .hb-newsletter-banner__title    { font-size: clamp(1rem, 4vw, 1.25rem); margin-bottom: 4px !important; }
    #h2j-homeblocks .hb-newsletter-banner__subtitle { font-size: 0.8rem; margin-bottom: 8px !important; display: none; }
    #h2j-homeblocks .hb-newsletter-banner__gdpr     { display: none; }
    #h2j-homeblocks .hb-newsletter-banner__input    { padding: 8px 12px !important; font-size: 0.85rem; }
    #h2j-homeblocks .hb-newsletter-banner__cta      { padding: 8px 16px !important; font-size: 0.85rem; }
    #h2j-homeblocks .hb-newsletter-banner__row      { max-width: 100%; }
}
@media (max-width: 479px) {
    /* v3.16.0 : ultra-compact phone — hide title to save space, keep visual+form */
    #h2j-homeblocks .hb-newsletter-banner { gap: 12px; }
    #h2j-homeblocks .hb-newsletter-banner--pad-sm,
    #h2j-homeblocks .hb-newsletter-banner--pad-md,
    #h2j-homeblocks .hb-newsletter-banner--pad-lg { padding: 14px 14px !important; }
    #h2j-homeblocks .hb-newsletter-banner--split .hb-newsletter-banner__visual {
        width: 70px;
    }
    #h2j-homeblocks .hb-newsletter-banner__cubes { max-width: 70px; }
    #h2j-homeblocks .hb-newsletter-banner__image  { max-width: 70px; }
    #h2j-homeblocks .hb-newsletter-banner__badge  {
        min-width: 36px;
        padding: 3px 6px;
        font-size: 0.65rem;
        top: 5%;
        right: 0%;
    }
    #h2j-homeblocks .hb-newsletter-banner__title { font-size: 0.95rem; }
    #h2j-homeblocks .hb-newsletter-banner__row { padding: 4px; }
    #h2j-homeblocks .hb-newsletter-banner__input { padding: 6px 10px !important; font-size: 0.8rem; }
    #h2j-homeblocks .hb-newsletter-banner__cta   { padding: 6px 12px !important; font-size: 0.8rem; }
}


/* ═══════════════════════════════════════════════════════════════════════
   SOCIAL BAR — v3.14.2 (paddings réduits + structure h2j-social.css)
   ═══════════════════════════════════════════════════════════════════════ */

#h2j-homeblocks .hb-social-bar {
    display: flex !important;
    align-items: center;
    width: 100%;
    box-sizing: border-box;
    background: var(--hb-sb-bg, #FAF8F5) !important;
    color: var(--hb-sb-color, #2d3436) !important;
    gap: 20px;
}

#h2j-homeblocks .hb-social-bar--pad-sm { padding: 8px 32px !important; }
#h2j-homeblocks .hb-social-bar--pad-md { padding: 16px 32px !important; }
#h2j-homeblocks .hb-social-bar--pad-lg { padding: 28px 32px !important; }

#h2j-homeblocks .hb-social-bar--stacked { flex-direction: column; gap: 8px; }
#h2j-homeblocks .hb-social-bar--stacked .hb-social-bar__title { margin-bottom: 0; }

#h2j-homeblocks .hb-social-bar--inline { flex-direction: row; flex-wrap: wrap; }
#h2j-homeblocks .hb-social-bar--inline > .h2j-social { margin-left: auto; }

#h2j-homeblocks .hb-social-bar--stacked.hb-social-bar--align-left   { align-items: flex-start; }
#h2j-homeblocks .hb-social-bar--stacked.hb-social-bar--align-center { align-items: center; }
#h2j-homeblocks .hb-social-bar--stacked.hb-social-bar--align-right  { align-items: flex-end; }
#h2j-homeblocks .hb-social-bar--inline.hb-social-bar--align-left   { justify-content: flex-start; }
#h2j-homeblocks .hb-social-bar--inline.hb-social-bar--align-right  { justify-content: flex-end; }

#h2j-homeblocks .hb-social-bar__title {
    font-size: clamp(1rem, 1.5vw, 1.2rem);
    font-weight: 600;
    letter-spacing: 0.01em;
    color: inherit !important;
    margin: 0 !important;
    padding: 0 !important;
    background: transparent !important;
}

@container h2jhb (max-width: 599px) {
    #h2j-homeblocks .hb-social-bar--inline { flex-direction: column; align-items: center; }
    #h2j-homeblocks .hb-social-bar--inline > .h2j-social { margin-left: 0; }
}
@media (max-width: 767px) {
    #h2j-homeblocks .hb-social-bar--inline { flex-direction: column; align-items: center; }
    #h2j-homeblocks .hb-social-bar--inline > .h2j-social { margin-left: 0; }
}


/* ═══════════════════════════════════════════════════════════════════════
   PAYMENT BAR — v3.14.4 (real official SVG logos)

   Les logos sont des SVG officiels hétérogènes :
     • Cartes (visa, mastercard, amex, paypal) : ratio 780x500, fond
       coloré arrondi intégré dans le SVG → pas de wrapper visuel
       nécessaire, on affiche le SVG directement avec hauteur fixe.
     • Portefeuilles (stripe, alma, apple_pay, google_pay, klarna) :
       logos sur fond transparent → on ajoute un fond blanc arrondi
       comme wrapper pour la cohérence visuelle.

   Approche : toujours un wrapper .hb-pay-logo de taille fixe, mais
   pour les cartes on retire le fond blanc (le SVG a le sien), et pour
   les wallets on garde le fond blanc + bordure subtile.
   ═══════════════════════════════════════════════════════════════════════ */

#h2j-homeblocks .hb-payment-bar {
    display: flex !important;
    align-items: center;
    width: 100%;
    box-sizing: border-box;
    background: var(--hb-pb-bg, #FAF8F5) !important;
    color: var(--hb-pb-color, #64748b) !important;
    gap: 20px;
    flex-wrap: wrap;
}

#h2j-homeblocks .hb-payment-bar--pad-sm { padding: 14px 32px !important; }
#h2j-homeblocks .hb-payment-bar--pad-md { padding: 28px 32px !important; }
#h2j-homeblocks .hb-payment-bar--pad-lg { padding: 44px 32px !important; }

#h2j-homeblocks .hb-payment-bar--align-left   { justify-content: flex-start; }
#h2j-homeblocks .hb-payment-bar--align-center { justify-content: center; }
#h2j-homeblocks .hb-payment-bar--align-right  { justify-content: flex-end; }

#h2j-homeblocks .hb-payment-bar__title {
    font-size: 0.9rem;
    font-weight: 500;
    letter-spacing: 0.01em;
    color: inherit !important;
    margin: 0 !important;
    padding: 0 !important;
    background: transparent !important;
    white-space: nowrap;
}

#h2j-homeblocks .hb-payment-bar__logos {
    display: flex;
    flex-wrap: wrap;
    gap: 12px 14px;
    align-items: center;
}

/* Base badge — height fixe, width auto (ratio libre selon le logo) */
#h2j-homeblocks .hb-pay-logo {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 40px;
    transition: transform .15s, filter .15s;
    box-sizing: border-box;
}
#h2j-homeblocks .hb-pay-logo:hover {
    transform: translateY(-1px);
    filter: drop-shadow(0 3px 8px rgba(0, 0, 0, 0.12));
}

#h2j-homeblocks .hb-pay-logo__img {
    display: block;
    height: 40px;
    width: auto;
    max-width: 70px;
    object-fit: contain;
}

/* ── Cartes avec fond coloré intégré (ratio 780x500) ──
   Visa, Mastercard, Amex, PayPal : le SVG fournit déjà le fond
   coloré arrondi. On dimensionne à 62x40 (≈ ratio 780x500). */
#h2j-homeblocks .hb-pay-logo--visa,
#h2j-homeblocks .hb-pay-logo--mastercard,
#h2j-homeblocks .hb-pay-logo--amex,
#h2j-homeblocks .hb-pay-logo--paypal {
    width: 62px;
    height: 40px;
    padding: 0;
    background: transparent;
    border: none;
    border-radius: 0;
}
#h2j-homeblocks .hb-pay-logo--visa .hb-pay-logo__img,
#h2j-homeblocks .hb-pay-logo--mastercard .hb-pay-logo__img,
#h2j-homeblocks .hb-pay-logo--amex .hb-pay-logo__img,
#h2j-homeblocks .hb-pay-logo--paypal .hb-pay-logo__img {
    width: 62px;
    height: 40px;
    max-width: none;
}

/* ── Wallets / logos sur transparent : fond blanc wrapper ──
   Stripe, Alma, Apple Pay, Google Pay, Klarna : le SVG est un logo
   seul sur fond transparent. On ajoute un badge blanc arrondi pour
   la cohérence visuelle avec les cartes. */
#h2j-homeblocks .hb-pay-logo--stripe,
#h2j-homeblocks .hb-pay-logo--alma,
#h2j-homeblocks .hb-pay-logo--apple_pay,
#h2j-homeblocks .hb-pay-logo--google_pay,
#h2j-homeblocks .hb-pay-logo--klarna {
    min-width: 62px;
    height: 40px;
    padding: 6px 10px;
    background-color: #ffffff;
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-radius: 6px;
}
#h2j-homeblocks .hb-pay-logo--stripe .hb-pay-logo__img,
#h2j-homeblocks .hb-pay-logo--alma .hb-pay-logo__img,
#h2j-homeblocks .hb-pay-logo--apple_pay .hb-pay-logo__img,
#h2j-homeblocks .hb-pay-logo--google_pay .hb-pay-logo__img,
#h2j-homeblocks .hb-pay-logo--klarna .hb-pay-logo__img {
    max-height: 28px;
    width: auto;
    height: auto;
    max-width: 80px;
}

/* ── Logo custom uploadé par le user ── */
#h2j-homeblocks .hb-pay-logo--custom {
    min-width: 62px;
    height: 40px;
    padding: 6px 10px;
    background-color: #ffffff;
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-radius: 6px;
}
#h2j-homeblocks .hb-pay-logo--custom .hb-pay-logo__img {
    max-height: 28px;
    width: auto;
    height: auto;
    max-width: 80px;
}


/* ═══════════════════════════════════════════════════════════════════════
   FOOTER COLUMNS — CHESS MODE v3.14.0
   Damier lavande/blanc alterné avec inversion au hover.
   ═══════════════════════════════════════════════════════════════════════ */

:root {
    --hb-chess-lavender: #cfa0e9;
    --hb-chess-white: #ffffff;
    --hb-chess-transition-duration: 0.3s;
}

#h2j-homeblocks .hb-footer-cols--chess {
    gap: 0 !important;
    padding: 0 !important;
}

#h2j-homeblocks .hb-footer-cols--chess .hb-footer-col {
    position: relative;
    padding: 40px 32px !important;
    isolation: isolate;
    overflow: hidden;
}

#h2j-homeblocks .hb-footer-cols--chess .hb-footer-col::before {
    content: '';
    position: absolute;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    background: var(--hb-cell-bg, var(--hb-chess-white));
    transition: background var(--hb-chess-transition-duration) ease;
}

#h2j-homeblocks .hb-footer-cols--chess .hb-footer-col > * {
    position: relative;
    z-index: 1;
}

/* v3.17.0 : legacy :nth-child(odd/even) base backgrounds removed — superseded by
   semantic classes (.hb-footer-col--primary/--secondary/--light/--dark/--accent).
   See "FOOTER COLUMNS — CHESS MODE v3.16.0" section below. */

/* v3.17.0 : legacy fade hover rules based on :nth-child removed — superseded by
   semantic-class hover rules (.hb-footer-col--primary:hover, etc.) in v3.16.0 section. */

/* SWIPE transition */
#h2j-homeblocks .hb-footer-cols--chess-swipe .hb-footer-col::after {
    content: '';
    position: absolute;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    transform: translateY(100%);
    transition: transform var(--hb-chess-transition-duration) ease;
}
#h2j-homeblocks .hb-footer-cols--chess-swipe .hb-footer-col:nth-child(odd)::after  { background: var(--hb-chess-white); }
#h2j-homeblocks .hb-footer-cols--chess-swipe .hb-footer-col:nth-child(even)::after { background: var(--hb-chess-lavender); }
#h2j-homeblocks .hb-footer-cols--chess-swipe .hb-footer-col:hover::after { transform: translateY(0); }
#h2j-homeblocks .hb-footer-cols--chess-swipe .hb-footer-col:nth-child(odd):hover { color: var(--hb-chess-lavender); }
#h2j-homeblocks .hb-footer-cols--chess-swipe .hb-footer-col:nth-child(odd):hover .hb-footer-col__title,
#h2j-homeblocks .hb-footer-cols--chess-swipe .hb-footer-col:nth-child(odd):hover a,
#h2j-homeblocks .hb-footer-cols--chess-swipe .hb-footer-col:nth-child(odd):hover .hb-footer-col__text,
#h2j-homeblocks .hb-footer-cols--chess-swipe .hb-footer-col:nth-child(odd):hover .hb-footer-col__subtitle,
#h2j-homeblocks .hb-footer-cols--chess-swipe .hb-footer-col:nth-child(odd):hover .hb-footer-col__gdpr,
#h2j-homeblocks .hb-footer-cols--chess-swipe .hb-footer-col:nth-child(odd):hover .hb-footer-col__contact li,
#h2j-homeblocks .hb-footer-cols--chess-swipe .hb-footer-col:nth-child(odd):hover i.material-icons {
    color: var(--hb-chess-lavender) !important;
}
#h2j-homeblocks .hb-footer-cols--chess-swipe .hb-footer-col:nth-child(even):hover { color: var(--hb-chess-white); }
#h2j-homeblocks .hb-footer-cols--chess-swipe .hb-footer-col:nth-child(even):hover .hb-footer-col__title,
#h2j-homeblocks .hb-footer-cols--chess-swipe .hb-footer-col:nth-child(even):hover a,
#h2j-homeblocks .hb-footer-cols--chess-swipe .hb-footer-col:nth-child(even):hover .hb-footer-col__text,
#h2j-homeblocks .hb-footer-cols--chess-swipe .hb-footer-col:nth-child(even):hover .hb-footer-col__subtitle,
#h2j-homeblocks .hb-footer-cols--chess-swipe .hb-footer-col:nth-child(even):hover .hb-footer-col__gdpr,
#h2j-homeblocks .hb-footer-cols--chess-swipe .hb-footer-col:nth-child(even):hover .hb-footer-col__contact li,
#h2j-homeblocks .hb-footer-cols--chess-swipe .hb-footer-col:nth-child(even):hover i.material-icons {
    color: var(--hb-chess-white) !important;
}

/* DIAGONAL transition */
#h2j-homeblocks .hb-footer-cols--chess-diagonal .hb-footer-col::after {
    content: '';
    position: absolute;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    clip-path: polygon(0 0, 0 0, 0 100%, 0 100%);
    transition: clip-path var(--hb-chess-transition-duration) ease;
}
#h2j-homeblocks .hb-footer-cols--chess-diagonal .hb-footer-col:nth-child(odd)::after  { background: var(--hb-chess-white); }
#h2j-homeblocks .hb-footer-cols--chess-diagonal .hb-footer-col:nth-child(even)::after { background: var(--hb-chess-lavender); }
#h2j-homeblocks .hb-footer-cols--chess-diagonal .hb-footer-col:hover::after {
    clip-path: polygon(0 0, 100% 0, 100% 100%, 0 100%);
}
#h2j-homeblocks .hb-footer-cols--chess-diagonal .hb-footer-col:nth-child(odd):hover { color: var(--hb-chess-lavender); }
#h2j-homeblocks .hb-footer-cols--chess-diagonal .hb-footer-col:nth-child(odd):hover .hb-footer-col__title,
#h2j-homeblocks .hb-footer-cols--chess-diagonal .hb-footer-col:nth-child(odd):hover a,
#h2j-homeblocks .hb-footer-cols--chess-diagonal .hb-footer-col:nth-child(odd):hover .hb-footer-col__text,
#h2j-homeblocks .hb-footer-cols--chess-diagonal .hb-footer-col:nth-child(odd):hover .hb-footer-col__subtitle,
#h2j-homeblocks .hb-footer-cols--chess-diagonal .hb-footer-col:nth-child(odd):hover .hb-footer-col__gdpr,
#h2j-homeblocks .hb-footer-cols--chess-diagonal .hb-footer-col:nth-child(odd):hover .hb-footer-col__contact li,
#h2j-homeblocks .hb-footer-cols--chess-diagonal .hb-footer-col:nth-child(odd):hover i.material-icons {
    color: var(--hb-chess-lavender) !important;
}
#h2j-homeblocks .hb-footer-cols--chess-diagonal .hb-footer-col:nth-child(even):hover { color: var(--hb-chess-white); }
#h2j-homeblocks .hb-footer-cols--chess-diagonal .hb-footer-col:nth-child(even):hover .hb-footer-col__title,
#h2j-homeblocks .hb-footer-cols--chess-diagonal .hb-footer-col:nth-child(even):hover a,
#h2j-homeblocks .hb-footer-cols--chess-diagonal .hb-footer-col:nth-child(even):hover .hb-footer-col__text,
#h2j-homeblocks .hb-footer-cols--chess-diagonal .hb-footer-col:nth-child(even):hover .hb-footer-col__subtitle,
#h2j-homeblocks .hb-footer-cols--chess-diagonal .hb-footer-col:nth-child(even):hover .hb-footer-col__gdpr,
#h2j-homeblocks .hb-footer-cols--chess-diagonal .hb-footer-col:nth-child(even):hover .hb-footer-col__contact li,
#h2j-homeblocks .hb-footer-cols--chess-diagonal .hb-footer-col:nth-child(even):hover i.material-icons {
    color: var(--hb-chess-white) !important;
}

/* NONE transition */
#h2j-homeblocks .hb-footer-cols--chess-none .hb-footer-col::before { transition: none; }

/* Buttons inside chess cells — v3.17.0 : simplified, no :nth-child dependency.
   Uses currentColor which inherits from the semantic class on the parent cell. */
#h2j-homeblocks .hb-footer-cols--chess .hb-footer-col button {
    background: rgba(255, 255, 255, 0.2) !important;
    color: inherit !important;
    border: 1px solid currentColor !important;
}
#h2j-homeblocks .hb-footer-cols--chess .hb-footer-col button:hover:not(:disabled) {
    background: currentColor !important;
    color: var(--hb-cell-bg, var(--hb-chess-white)) !important;
}

#h2j-homeblocks .hb-footer-cols--chess .hb-newsletter-row {
    background: rgba(255, 255, 255, 0.2) !important;
}

@container h2jhb (max-width: 499px) {
    #h2j-homeblocks .hb-footer-cols--chess .hb-footer-col { padding: 28px 20px !important; }
}
@media (max-width: 767px) {
    #h2j-homeblocks .hb-footer-cols--chess .hb-footer-col { padding: 28px 20px !important; }
}


/* ═════════════════════════════════════════════════════════════════════════
   FOOTER COLUMNS — CHESS MODE v3.16.0
   Semantic color classes driven by h2jecosystem theme variables.
   Each column gets one of :
     .hb-footer-col--primary    background: var(--h2j-primary)     dark text by default (light bg)
     .hb-footer-col--secondary  background: var(--h2j-secondary)   light text (dark bg)
     .hb-footer-col--accent     background: var(--h2j-accent)      dark text by default
     .hb-footer-col--light      background: var(--h2j-bg-card)     dark text
     .hb-footer-col--dark       background: var(--h2j-text)        light text (dark bg)

   These classes take priority over the legacy :nth-child(odd/even) rules,
   giving a stable damier that does not depend on viewport wrapping.
   ═════════════════════════════════════════════════════════════════════════ */

/* Semantic role backgrounds — use h2jecosystem theme vars with sensible fallbacks */
#h2j-homeblocks .hb-footer-cols--chess .hb-footer-col.hb-footer-col--primary {
    --hb-cell-bg: var(--h2j-primary, #cfa0e9);
}
#h2j-homeblocks .hb-footer-cols--chess .hb-footer-col.hb-footer-col--secondary {
    --hb-cell-bg: var(--h2j-secondary, #536dfe);
}
#h2j-homeblocks .hb-footer-cols--chess .hb-footer-col.hb-footer-col--accent {
    --hb-cell-bg: var(--h2j-accent, #b388ff);
}
#h2j-homeblocks .hb-footer-cols--chess .hb-footer-col.hb-footer-col--light {
    --hb-cell-bg: var(--h2j-bg-card, #ffffff);
}
#h2j-homeblocks .hb-footer-cols--chess .hb-footer-col.hb-footer-col--dark {
    --hb-cell-bg: var(--h2j-text, #1a1f2c);
}

/* Text color rules :
   - light bg (primary/accent/light) → use preset text color (dark by default)
   - dark bg  (secondary/dark)       → force white text for readability
   The .hb-footer-col--dark-bg class is added by the template when chess_is_dark == 1. */
#h2j-homeblocks .hb-footer-cols--chess .hb-footer-col.hb-footer-col--primary,
#h2j-homeblocks .hb-footer-cols--chess .hb-footer-col.hb-footer-col--accent,
#h2j-homeblocks .hb-footer-cols--chess .hb-footer-col.hb-footer-col--light {
    color: var(--h2j-text, #2d3436);
}
#h2j-homeblocks .hb-footer-cols--chess .hb-footer-col.hb-footer-col--primary .hb-footer-col__title,
#h2j-homeblocks .hb-footer-cols--chess .hb-footer-col.hb-footer-col--accent  .hb-footer-col__title,
#h2j-homeblocks .hb-footer-cols--chess .hb-footer-col.hb-footer-col--light   .hb-footer-col__title {
    color: var(--h2j-text, #2d3436) !important;
}
#h2j-homeblocks .hb-footer-cols--chess .hb-footer-col.hb-footer-col--primary a,
#h2j-homeblocks .hb-footer-cols--chess .hb-footer-col.hb-footer-col--primary i.material-icons,
#h2j-homeblocks .hb-footer-cols--chess .hb-footer-col.hb-footer-col--accent  a,
#h2j-homeblocks .hb-footer-cols--chess .hb-footer-col.hb-footer-col--accent  i.material-icons,
#h2j-homeblocks .hb-footer-cols--chess .hb-footer-col.hb-footer-col--light   a,
#h2j-homeblocks .hb-footer-cols--chess .hb-footer-col.hb-footer-col--light   i.material-icons {
    color: var(--h2j-text, #2d3436) !important;
}

/* Dark backgrounds → white text */
#h2j-homeblocks .hb-footer-cols--chess .hb-footer-col.hb-footer-col--secondary,
#h2j-homeblocks .hb-footer-cols--chess .hb-footer-col.hb-footer-col--dark {
    color: #ffffff;
}
#h2j-homeblocks .hb-footer-cols--chess .hb-footer-col.hb-footer-col--secondary .hb-footer-col__title,
#h2j-homeblocks .hb-footer-cols--chess .hb-footer-col.hb-footer-col--dark      .hb-footer-col__title,
#h2j-homeblocks .hb-footer-cols--chess .hb-footer-col.hb-footer-col--secondary a,
#h2j-homeblocks .hb-footer-cols--chess .hb-footer-col.hb-footer-col--secondary i.material-icons,
#h2j-homeblocks .hb-footer-cols--chess .hb-footer-col.hb-footer-col--secondary .hb-footer-col__text,
#h2j-homeblocks .hb-footer-cols--chess .hb-footer-col.hb-footer-col--secondary .hb-footer-col__subtitle,
#h2j-homeblocks .hb-footer-cols--chess .hb-footer-col.hb-footer-col--secondary .hb-footer-col__gdpr,
#h2j-homeblocks .hb-footer-cols--chess .hb-footer-col.hb-footer-col--secondary .hb-footer-col__contact li,
#h2j-homeblocks .hb-footer-cols--chess .hb-footer-col.hb-footer-col--dark a,
#h2j-homeblocks .hb-footer-cols--chess .hb-footer-col.hb-footer-col--dark i.material-icons,
#h2j-homeblocks .hb-footer-cols--chess .hb-footer-col.hb-footer-col--dark .hb-footer-col__text,
#h2j-homeblocks .hb-footer-cols--chess .hb-footer-col.hb-footer-col--dark .hb-footer-col__subtitle,
#h2j-homeblocks .hb-footer-cols--chess .hb-footer-col.hb-footer-col--dark .hb-footer-col__gdpr,
#h2j-homeblocks .hb-footer-cols--chess .hb-footer-col.hb-footer-col--dark .hb-footer-col__contact li {
    color: #ffffff !important;
}

/* Hover inversion (fade transition, default) — swap background to its complement */
#h2j-homeblocks .hb-footer-cols--chess-fade .hb-footer-col.hb-footer-col--primary:hover,
#h2j-homeblocks .hb-footer-cols--chess:not(.hb-footer-cols--chess-fade):not(.hb-footer-cols--chess-swipe):not(.hb-footer-cols--chess-diagonal):not(.hb-footer-cols--chess-none) .hb-footer-col.hb-footer-col--primary:hover {
    --hb-cell-bg: var(--h2j-bg-card, #ffffff);
    color: var(--h2j-primary, #cfa0e9);
}
#h2j-homeblocks .hb-footer-cols--chess-fade .hb-footer-col.hb-footer-col--light:hover,
#h2j-homeblocks .hb-footer-cols--chess:not(.hb-footer-cols--chess-fade):not(.hb-footer-cols--chess-swipe):not(.hb-footer-cols--chess-diagonal):not(.hb-footer-cols--chess-none) .hb-footer-col.hb-footer-col--light:hover {
    --hb-cell-bg: var(--h2j-primary, #cfa0e9);
    color: #ffffff;
}
#h2j-homeblocks .hb-footer-cols--chess-fade .hb-footer-col.hb-footer-col--secondary:hover,
#h2j-homeblocks .hb-footer-cols--chess:not(.hb-footer-cols--chess-fade):not(.hb-footer-cols--chess-swipe):not(.hb-footer-cols--chess-diagonal):not(.hb-footer-cols--chess-none) .hb-footer-col.hb-footer-col--secondary:hover {
    --hb-cell-bg: var(--h2j-bg-card, #ffffff);
    color: var(--h2j-secondary, #536dfe);
}
#h2j-homeblocks .hb-footer-cols--chess-fade .hb-footer-col.hb-footer-col--accent:hover,
#h2j-homeblocks .hb-footer-cols--chess:not(.hb-footer-cols--chess-fade):not(.hb-footer-cols--chess-swipe):not(.hb-footer-cols--chess-diagonal):not(.hb-footer-cols--chess-none) .hb-footer-col.hb-footer-col--accent:hover {
    --hb-cell-bg: var(--h2j-bg-card, #ffffff);
    color: var(--h2j-accent, #b388ff);
}
#h2j-homeblocks .hb-footer-cols--chess-fade .hb-footer-col.hb-footer-col--dark:hover,
#h2j-homeblocks .hb-footer-cols--chess:not(.hb-footer-cols--chess-fade):not(.hb-footer-cols--chess-swipe):not(.hb-footer-cols--chess-diagonal):not(.hb-footer-cols--chess-none) .hb-footer-col.hb-footer-col--dark:hover {
    --hb-cell-bg: var(--h2j-bg-card, #ffffff);
    color: var(--h2j-text, #1a1f2c);
}

/* Hover : invert title and links colors along with the background */
#h2j-homeblocks .hb-footer-cols--chess-fade .hb-footer-col.hb-footer-col--primary:hover .hb-footer-col__title,
#h2j-homeblocks .hb-footer-cols--chess-fade .hb-footer-col.hb-footer-col--primary:hover a,
#h2j-homeblocks .hb-footer-cols--chess-fade .hb-footer-col.hb-footer-col--primary:hover i.material-icons {
    color: var(--h2j-primary, #cfa0e9) !important;
}
#h2j-homeblocks .hb-footer-cols--chess-fade .hb-footer-col.hb-footer-col--light:hover .hb-footer-col__title,
#h2j-homeblocks .hb-footer-cols--chess-fade .hb-footer-col.hb-footer-col--light:hover a,
#h2j-homeblocks .hb-footer-cols--chess-fade .hb-footer-col.hb-footer-col--light:hover i.material-icons {
    color: #ffffff !important;
}
#h2j-homeblocks .hb-footer-cols--chess-fade .hb-footer-col.hb-footer-col--secondary:hover .hb-footer-col__title,
#h2j-homeblocks .hb-footer-cols--chess-fade .hb-footer-col.hb-footer-col--secondary:hover a,
#h2j-homeblocks .hb-footer-cols--chess-fade .hb-footer-col.hb-footer-col--secondary:hover i.material-icons,
#h2j-homeblocks .hb-footer-cols--chess-fade .hb-footer-col.hb-footer-col--secondary:hover .hb-footer-col__text,
#h2j-homeblocks .hb-footer-cols--chess-fade .hb-footer-col.hb-footer-col--secondary:hover .hb-footer-col__subtitle,
#h2j-homeblocks .hb-footer-cols--chess-fade .hb-footer-col.hb-footer-col--secondary:hover .hb-footer-col__contact li {
    color: var(--h2j-secondary, #536dfe) !important;
}
#h2j-homeblocks .hb-footer-cols--chess-fade .hb-footer-col.hb-footer-col--accent:hover .hb-footer-col__title,
#h2j-homeblocks .hb-footer-cols--chess-fade .hb-footer-col.hb-footer-col--accent:hover a,
#h2j-homeblocks .hb-footer-cols--chess-fade .hb-footer-col.hb-footer-col--accent:hover i.material-icons {
    color: var(--h2j-accent, #b388ff) !important;
}
#h2j-homeblocks .hb-footer-cols--chess-fade .hb-footer-col.hb-footer-col--dark:hover .hb-footer-col__title,
#h2j-homeblocks .hb-footer-cols--chess-fade .hb-footer-col.hb-footer-col--dark:hover a,
#h2j-homeblocks .hb-footer-cols--chess-fade .hb-footer-col.hb-footer-col--dark:hover i.material-icons,
#h2j-homeblocks .hb-footer-cols--chess-fade .hb-footer-col.hb-footer-col--dark:hover .hb-footer-col__text,
#h2j-homeblocks .hb-footer-cols--chess-fade .hb-footer-col.hb-footer-col--dark:hover .hb-footer-col__subtitle,
#h2j-homeblocks .hb-footer-cols--chess-fade .hb-footer-col.hb-footer-col--dark:hover .hb-footer-col__contact li {
    color: var(--h2j-text, #1a1f2c) !important;
}
