/* ============================================================
   MEGA MENU CLASSIFIEDS — .header-right UNIQUEMENT
   #sp-menu est réservé au menu Joomla standard (World Guide etc.)
============================================================ */

/* Masquer dropdowns dupliqués */
#sp-top-bar .sp-dropdown,
.header-modules .sp-dropdown,
.offcanvas-menu .sp-dropdown,
.position-left .sp-dropdown,
.position-debug .sp-dropdown {
    display: none !important;
    visibility: hidden !important;
}

/* Dropdown CLASSIFIEDS — header-right seulement */
.header-right .sp-megamenu-parent > .sp-dropdown {
    display: none;
    position: absolute !important;
    top: 100% !important;
    left: 50% !important;
    transform: translateX(-50%) !important;
    background: white !important;
    border-radius: 12px !important;
    box-shadow: 0 10px 40px rgba(0,0,0,0.12) !important;
    padding: 24px !important;
    margin-top: 5px !important;
    min-width: 750px !important;
    z-index: 9999 !important;
}
.header-right .sp-megamenu-parent:hover > .sp-dropdown {
    display: block !important;
    visibility: visible !important;
}

/* Bouton CLASSIFIEDS */
.header-right .sp-megamenu-parent > a {
    color: #1A2F6F !important;
    background: rgba(26,47,111,0.06) !important;
    padding: 10px 20px !important;
    border-radius: 6px !important;
    font-weight: 600 !important;
    text-transform: uppercase !important;
    transition: all 0.2s ease !important;
    border: 1.5px solid transparent !important;
}
.header-right .sp-megamenu-parent > a:hover {
    background: #1A2F6F !important;
    color: white !important;
    border-color: #1A2F6F !important;
}

/* Grid 3 colonnes — CLASSIFIEDS seulement */
.header-right .sp-dropdown-inner {
    display: grid !important;
    grid-template-columns: repeat(3, 1fr) !important;
    gap: 12px !important;
    list-style: none !important;
    padding: 0 !important;
    margin: 0 !important;
}

.header-right .sp-dropdown-inner > .sp-menu-item {
    margin: 0 !important;
    padding: 0 !important;
    list-style: none !important;
}

.header-right .sp-dropdown-inner > .sp-menu-item > a {
    display: flex !important;
    align-items: center !important;
    gap: 12px !important;
    padding: 12px 14px !important;
    border-radius: 8px !important;
    text-decoration: none !important;
    transition: all 0.2s ease !important;
    border: 1px solid #EEF0F8 !important;
    background: white !important;
    color: #1A1A1A !important;
    font-size: 14px !important;
    font-weight: 600 !important;
}
.header-right .sp-dropdown-inner > .sp-menu-item > a:hover {
    background: #EEF0F8 !important;
    border-color: #1A2F6F !important;
    color: #1A2F6F !important;
    transform: translateX(3px) !important;
}

/* Icônes FA — CLASSIFIEDS seulement */
.header-right .sp-dropdown-inner > .sp-menu-item > a::before {
    content: '';
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    width: 40px !important;
    height: 40px !important;
    border-radius: 8px !important;
    font-family: 'Font Awesome 6 Free', 'Font Awesome 5 Free', 'FontAwesome' !important;
    font-weight: 900 !important;
    font-size: 18px !important;
    flex-shrink: 0 !important;
    background: #EEF0F8 !important;
    color: #1A2F6F !important;
}

/* Icônes par catégorie */
.header-right .sp-dropdown-inner > .sp-menu-item:nth-child(1) > a::before  { content: '\f1b9' !important; }
.header-right .sp-dropdown-inner > .sp-menu-item:nth-child(2) > a::before  { content: '\f015' !important; }
.header-right .sp-dropdown-inner > .sp-menu-item:nth-child(3) > a::before  { content: '\f0b1' !important; }
.header-right .sp-dropdown-inner > .sp-menu-item:nth-child(4) > a::before  { content: '\f3cd' !important; }
.header-right .sp-dropdown-inner > .sp-menu-item:nth-child(5) > a::before  { content: '\f553' !important; }
.header-right .sp-dropdown-inner > .sp-menu-item:nth-child(6) > a::before  { content: '\f4d6' !important; }
.header-right .sp-dropdown-inner > .sp-menu-item:nth-child(7) > a::before  { content: '\f11b' !important; }
.header-right .sp-dropdown-inner > .sp-menu-item:nth-child(8) > a::before  { content: '\f1b0' !important; }
.header-right .sp-dropdown-inner > .sp-menu-item:nth-child(9) > a::before  { content: '\f53f' !important; }
.header-right .sp-dropdown-inner > .sp-menu-item:nth-child(10) > a::before { content: '\f77c' !important; }
.header-right .sp-dropdown-inner > .sp-menu-item:nth-child(11) > a::before { content: '\f466' !important; }
.header-right .sp-dropdown-inner > .sp-menu-item:nth-child(12) > a::before { content: '\f521' !important; }

/* View All */
.header-right .sp-dropdown-inner > .sp-menu-item:last-child {
    grid-column: 1 / -1 !important;
    border-top: 1px solid #E2E0DB !important;
    padding-top: 16px !important;
    margin-top: 12px !important;
}
.header-right .sp-dropdown-inner > .sp-menu-item:last-child > a {
    justify-content: center !important;
    color: #1A2F6F !important;
    border: none !important;
    background: #EEF0F8 !important;
}
.header-right .sp-dropdown-inner > .sp-menu-item:last-child > a::before {
    content: '\f00a' !important;
}

/* World Guide et autres menus Joomla standard — aucun override de grille */
#sp-menu .sp-megamenu-parent > a {
    color: #1A2F6F !important;
    font-weight: 600 !important;
}
#sp-menu .sp-megamenu-parent > a:hover {
    color: #122254 !important;
}

/* ══ SSG REGISTER PAGE REDESIGN ══════════════════════════════════════════ */

body.com-comprofiler.view-registers #sp-component {
    background: linear-gradient(135deg, #fff7ed 0%, #fef3c7 50%, #fff7ed 100%) !important;
    padding: 40px 16px !important;
    min-height: 70vh;
}

body.com-comprofiler.view-registers .cbRegistration {
    font-family: sans-serif;
    background: #fff;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 8px 40px rgba(0,0,0,.14);
    max-width: 640px;
    margin: 0 auto;
}

/* Hero banner via ::before on the form wrapper */
body.com-comprofiler.view-registers .cbRegistration::before {
    content: '';
    display: block;
    background: linear-gradient(135deg, #fb923c 0%, #ea7318 55%, #ff294a 100%);
    padding: 28px 28px 22px;
    text-align: center;
}

/* Hero text overlay using the page title header */
body.com-comprofiler.view-registers .cb-page-header,
body.com-comprofiler.view-registers .cbRegistrationHeader {
    background: linear-gradient(135deg, #fb923c 0%, #ea7318 55%, #ff294a 100%) !important;
    border: none !important;
    border-radius: 0 !important;
    padding: 28px 28px 22px !important;
    margin: 0 !important;
    text-align: center !important;
}

body.com-comprofiler.view-registers .cb-page-header-title,
body.com-comprofiler.view-registers .cbRegistrationTitle {
    font-family: sans-serif !important;
    font-size: 24px !important;
    font-weight: 700 !important;
    color: #fff !important;
    letter-spacing: .4px !important;
    margin: 0 0 4px !important;
    padding: 0 !important;
    border: none !important;
}

body.com-comprofiler.view-registers .cb-page-header-description,
body.com-comprofiler.view-registers .cbRegistrationIntro {
    font-family: sans-serif !important;
    font-size: 13px !important;
    color: rgba(255,255,255,.85) !important;
    margin: 0 !important;
}

/* Subtitle injected when there's no intro message configured */
body.com-comprofiler.view-registers .cb-page-header::after {
    content: 'Your worldwide marketplace \2014 buy, sell & connect';
    display: block;
    font-family: sans-serif;
    font-size: 13px;
    color: rgba(255,255,255,.85);
    margin-top: 4px;
}

/* Form body padding */
body.com-comprofiler.view-registers .cbRegistrationDiv {
    padding: 24px 28px 16px !important;
}

/* Field rows */
body.com-comprofiler.view-registers .cb_form .form-group,
body.com-comprofiler.view-registers .cb_form .control-group {
    margin-bottom: 14px !important;
}

/* Labels */
body.com-comprofiler.view-registers .cb_form .control-label,
body.com-comprofiler.view-registers .cb_form label {
    font-family: sans-serif !important;
    font-size: 11px !important;
    font-weight: 700 !important;
    color: #6b7280 !important;
    text-transform: uppercase !important;
    letter-spacing: .6px !important;
}

/* Inputs */
body.com-comprofiler.view-registers .cb_form .form-control,
body.com-comprofiler.view-registers .cb_form input[type=text],
body.com-comprofiler.view-registers .cb_form input[type=email],
body.com-comprofiler.view-registers .cb_form input[type=password],
body.com-comprofiler.view-registers .cb_form select {
    width: 100% !important;
    box-sizing: border-box !important;
    border: 2px solid #e5e7eb !important;
    border-radius: 10px !important;
    padding: 11px 14px !important;
    font-family: sans-serif !important;
    font-size: 14px !important;
    color: #1e293b !important;
    background: #f8fafc !important;
    transition: border-color .2s, box-shadow .2s !important;
    outline: none !important;
}

body.com-comprofiler.view-registers .cb_form .form-control:focus,
body.com-comprofiler.view-registers .cb_form input[type=text]:focus,
body.com-comprofiler.view-registers .cb_form input[type=email]:focus,
body.com-comprofiler.view-registers .cb_form input[type=password]:focus {
    border-color: #fb923c !important;
    background: #fff !important;
    box-shadow: 0 0 0 3px rgba(251,146,60,.12) !important;
}

/* Submit button */
body.com-comprofiler.view-registers .cbRegistrationSubmit,
body.com-comprofiler.view-registers .cbRegistrationButtons .btn-primary {
    background: linear-gradient(135deg, #fb923c, #ea7318) !important;
    color: #fff !important;
    border: none !important;
    border-radius: 11px !important;
    padding: 13px 20px !important;
    font-family: sans-serif !important;
    font-size: 15px !important;
    font-weight: 700 !important;
    width: 100% !important;
    cursor: pointer !important;
    box-shadow: 0 4px 14px rgba(234,115,24,.3) !important;
    transition: opacity .2s, transform .2s, box-shadow .2s !important;
    margin-top: 8px !important;
}

body.com-comprofiler.view-registers .cbRegistrationSubmit:hover,
body.com-comprofiler.view-registers .cbRegistrationButtons .btn-primary:hover {
    opacity: .9 !important;
    transform: translateY(-1px) !important;
    box-shadow: 0 6px 18px rgba(234,115,24,.4) !important;
}

/* Required field star */
body.com-comprofiler.view-registers .cb_form .required-mark,
body.com-comprofiler.view-registers .cb_form .star {
    color: #fb923c !important;
}

/* Checkbox/radio */
body.com-comprofiler.view-registers .cb_form input[type=checkbox],
body.com-comprofiler.view-registers .cb_form input[type=radio] {
    accent-color: #fb923c !important;
}

/* Footer conclusion */
body.com-comprofiler.view-registers .cbRegistrationConclusion {
    padding: 0 28px 20px !important;
    font-family: sans-serif !important;
    font-size: 13px !important;
    color: #6b7280 !important;
    text-align: center !important;
    background: none !important;
    border: none !important;
}

@media (max-width: 479px) {
    body.com-comprofiler.view-registers .cbRegistrationDiv {
        padding: 18px 16px 8px !important;
    }
}

/* ══ END SSG REGISTER REDESIGN ════════════════════════════════════════════ */

/* Masquer "Powered by Community Builder" sur toutes les pages CB */
.cbPoweredBy {
    display: none !important;
}

/* Responsive */
@media (max-width: 1024px) {
    .header-right .sp-dropdown-inner,
    #sp-menu .sp-dropdown-inner {
        grid-template-columns: repeat(2, 1fr) !important;
    }
    
    .header-right .sp-megamenu-parent > .sp-dropdown,
    #sp-menu .sp-megamenu-parent > .sp-dropdown {
        min-width: 500px !important;
    }
}

@media (max-width: 768px) {
    .header-right .sp-dropdown-inner,
    #sp-menu .sp-dropdown-inner {
        grid-template-columns: 1fr !important;
    }
    
    .header-right .sp-megamenu-parent > .sp-dropdown,
    #sp-menu .sp-megamenu-parent > .sp-dropdown {
        min-width: 90vw !important;
        left: 5vw !important;
        transform: none !important;
    }
}

/* Anti-CLS: reserve space for lazy-loaded images */
img:not([width]):not([height]) { aspect-ratio: auto; }
.sppb-img-container img,
.djcf_list_item img,
.djcf_item_image img { width: 100%; height: auto; }

/* Anti-CLS: prevent Tawk.to chat widget from shifting content */
#tawk-bubble-container { position: fixed !important; }

/* Force font-display:swap on all FA webfonts variants (Joomla vendor + template) */
@font-face{font-family:"Font Awesome 6 Free";font-style:normal;font-weight:400;font-display:swap;src:url(/media/vendor/fontawesome-free/webfonts/fa-regular-400.woff2) format("woff2")}
@font-face{font-family:"Font Awesome 6 Free";font-style:normal;font-weight:900;font-display:swap;src:url(/media/vendor/fontawesome-free/webfonts/fa-solid-900.woff2) format("woff2")}
@font-face{font-family:"Font Awesome 6 Brands";font-style:normal;font-weight:400;font-display:swap;src:url(/media/vendor/fontawesome-free/webfonts/fa-brands-400.woff2) format("woff2")}

/* FIX: Joomla joomla-fontawesome.min.css overrides FA icon content via --fa:"" (empty var).
   Scoped to .sg-nav only — forces ::before content directly, bypasses the broken variable.
   Uses SPB FA6 webfonts (correct). Single selector block, minimal CSS weight. */
.sg-nav .fas::before,.sg-nav .far::before,.sg-nav .fab::before{
  font-family:"Font Awesome 6 Free"!important;
  font-weight:900!important;
}
.sg-nav .fa-car::before{content:"\f1b9"!important}
.sg-nav .fa-home::before{content:"\f015"!important}
.sg-nav .fa-briefcase::before{content:"\f0b1"!important}
.sg-nav .fa-mobile-alt::before,.sg-nav .fa-mobile::before{content:"\f3cd"!important}
.sg-nav .fa-tshirt::before{content:"\f553"!important}
.sg-nav .fa-couch::before{content:"\f4b8"!important}
.sg-nav .fa-paw::before{content:"\f1b0"!important}
.sg-nav .fa-palette::before{content:"\f53f"!important}
.sg-nav .fa-tags::before{content:"\f02c"!important}
.sg-nav .fa-th::before{content:"\f00a"!important}
.sg-nav .fa-arrow-right::before{content:"\f061"!important}
.sg-nav .fa-car-side::before{content:"\f5e4"!important}
.sg-nav .fa-motorcycle::before{content:"\f21c"!important}
.sg-nav .fa-ship::before{content:"\f21a"!important}
.sg-nav .fa-bicycle::before{content:"\f206"!important}
.sg-nav .fa-truck::before{content:"\f0d1"!important}
.sg-nav .fa-cogs::before{content:"\f085"!important}
.sg-nav .fa-tractor::before{content:"\f722"!important}
.sg-nav .fa-building::before{content:"\f1ad"!important}
.sg-nav .fa-key::before{content:"\f084"!important}
.sg-nav .fa-city::before{content:"\f64f"!important}
.sg-nav .fa-tools::before{content:"\f7d9"!important}
.sg-nav .fa-laptop::before{content:"\f109"!important}
.sg-nav .fa-tablet-alt::before{content:"\f3fa"!important}
.sg-nav .fa-camera::before{content:"\f030"!important}
.sg-nav .fa-plug::before{content:"\f1e6"!important}
.sg-nav .fa-blender::before{content:"\f517"!important}
.sg-nav .fa-tv::before{content:"\f26c"!important}
.sg-nav .fa-gem::before{content:"\f3a5"!important}
.sg-nav .fa-seedling::before{content:"\f4d8"!important}
.sg-nav .fa-hammer::before{content:"\f6e3"!important}
.sg-nav .fa-paint-brush::before{content:"\f1fc"!important}
.sg-nav .fa-fish::before{content:"\f578"!important}
.sg-nav .fa-child::before{content:"\f1ae"!important}
.sg-nav .fa-percentage::before{content:"\f541"!important}
.sg-nav .fa-fire::before{content:"\f06d"!important}
.sg-nav .fa-shopping-bag::before{content:"\f290"!important}
.sg-nav .fa-heart::before{content:"\f004"!important}
.sg-nav .fa-puzzle-piece::before{content:"\f12e"!important}
.sg-nav .fa-baby::before{content:"\f77c"!important}
.sg-nav .fa-baby-carriage::before{content:"\f77d"!important}
.sg-nav .fa-door-open::before{content:"\f52b"!important}
.sg-nav .fa-store::before{content:"\f54e"!important}
.sg-nav .fa-umbrella-beach::before{content:"\f5ca"!important}
.sg-nav .fa-calculator::before{content:"\f1ec"!important}
.sg-nav .fa-laptop-code::before{content:"\f5fc"!important}
.sg-nav .fa-chalkboard-teacher::before{content:"\f51c"!important}
.sg-nav .fa-hard-hat::before{content:"\f807"!important}
.sg-nav .fa-bullhorn::before{content:"\f0a1"!important}
.sg-nav .fa-heartbeat::before{content:"\f21e"!important}
.sg-nav .fa-gavel::before{content:"\f0e3"!important}
.sg-nav .fa-broom::before{content:"\f51a"!important}
.sg-nav .fa-shipping-fast::before{content:"\f48b"!important}
.sg-nav .fa-language::before{content:"\f1ab"!important}
.sg-nav .fa-guitar::before{content:"\f7a6"!important}
.sg-nav .fa-running::before{content:"\f70c"!important}
.sg-nav .fa-campground::before{content:"\f6bb"!important}
.sg-nav .fa-stamp::before{content:"\f5bf"!important}
.sg-nav .fa-chess::before{content:"\f439"!important}
.sg-nav .fa-hands::before{content:"\f4c2"!important}
.sg-nav .fa-drumstick-bite::before{content:"\f6d7"!important}
.sg-nav .fa-bone::before{content:"\f5d7"!important}
.sg-nav .fa-cut::before{content:"\f0c4"!important}
.sg-nav .fa-horse::before{content:"\f6f0"!important}
.sg-nav .fa-medkit::before{content:"\f0fa"!important}
.sg-nav .fa-eye::before{content:"\f06e"!important}
.sg-nav .fa-monument::before{content:"\f5a6"!important}
.sg-nav .fa-drafting-compass::before{content:"\f568"!important}
.sg-nav .fa-pen-nib::before{content:"\f5ad"!important}
.sg-nav .fa-horse-head::before{content:"\f7ab"!important}
.sg-nav .fa-chair::before{content:"\f6c0"!important}
.sg-nav .fa-cube::before{content:"\f1b2"!important}
.sg-nav .fa-bath::before{content:"\f2cd"!important}
.sg-nav .fa-gift::before{content:"\f06b"!important}
.sg-nav .fa-warehouse::before{content:"\f494"!important}
.sg-nav .fa-paint-roller::before{content:"\f5aa"!important}
.sg-nav .fa-watch::before{content:"\f017"!important}
.sg-nav .fa-headphones::before{content:"\f025"!important}
.sg-nav .fa-lightbulb::before{content:"\f0eb"!important}
.sg-nav .fa-rocket::before{content:"\f135"!important}
.sg-nav .fa-spa::before{content:"\f5bb"!important}
.sg-nav .fa-skating::before{content:"\f7c5"!important}
.sg-nav .fa-wallet::before{content:"\f555"!important}
.sg-nav .fa-map::before{content:"\f279"!important}
.sg-nav .fa-users::before{content:"\f0c0"!important}
.sg-nav .fa-bed::before{content:"\f236"!important}
.sg-nav .fa-female::before{content:"\f182"!important}
.sg-nav .fa-male::before{content:"\f183"!important}
.sg-nav .fa-door-closed::before{content:"\f52a"!important}
.sg-nav .fa-gamepad::before{content:"\f11b"!important}
.sg-nav .fa-map-marker-alt::before{content:"\f3c5"!important}
.sg-nav .fa-sign-in-alt::before{content:"\f2f6"!important}
