/* =========================================================
   VIPGPI — CSS GLOBAL UNIQUE (style + header + mega menu)
   Version: 1.1 (clean)
   ========================================================= */

/* =========================================================
   1) VARIABLES
   ========================================================= */
:root {
    --primary: #0E1030;
    --primary-dark: #0b0d26;
    --secondary: #c9a050;
    --secondary-hover: #b0883e;

    --white: #ffffff;
    --light-bg: #f8f9fa;

    --text-dark: #333333;
    --text-light: rgba(255, 255, 255, 0.9);
    --text-muted: rgba(255, 255, 255, 0.7);

    --danger: #dc3545;

    --border-radius: 8px;
    --shadow-sm: 0 5px 15px rgba(0, 0, 0, 0.05);
    --shadow-lg: 0 15px 30px rgba(0, 0, 0, 0.15);
    --transition: all 0.3s ease;

    /* NAVBAR tuning (desktop) */
    --logo-height: 62px;
    --nav-link-pad-y: 12px;
    --nav-link-pad-x: 14px;
    --nav-link-size: .86rem;
    --nav-link-letter: .06em;
    --nav-gap: .6rem;

    /* CTA bouton (navbar + CTA panel) */
    --cta-pad-y: 10px;
    --cta-pad-x: 18px;
    --cta-min-h: 42px;
}

/* =========================================================
   2) RESET + BASE
   ========================================================= */
*,
*::before,
*::after {
    box-sizing: border-box;
}

body {
    font-family: "Open Sans", system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
    color: var(--text-dark);
    background: var(--white);
    line-height: 1.6;
    overflow-x: hidden;
}

h1,
h2,
h3,
h4,
h5,
h6,
.btn,
.widget-title,
.table-list-item {
    font-family: "Montserrat", system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
}

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition);
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

section {
    padding: 80px 0;
    position: relative;
}

/* Utilitaires */
.hover-gold:hover {
    color: var(--secondary) !important;
}

.bg-light-vip {
    background-color: var(--light-bg);
}

.object-fit-cover {
    object-fit: cover;
}

/* =========================================================
   3) BOUTONS (général)
   ========================================================= */
.btn {
    border-radius: 50px;
    font-weight: 600;
    padding: 10px 25px;
    transition: var(--transition);
}

.btn-primary {
    background-color: var(--secondary);
    border-color: var(--secondary);
}

.btn-primary:hover {
    background-color: var(--secondary-hover);
    border-color: var(--secondary-hover);
}

/* =========================================================
   4) PAGE HEADER (HERO)
   ========================================================= */
.page-header {
    background-color: var(--primary);
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    width: 100%;
    min-height: 60vh;
    padding: 100px 0;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    position: relative;
    margin-top: -1px;
}

.page-header::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(rgba(14, 16, 48, 0.5), rgba(14, 16, 48, 0.8));
    z-index: 1;
}

.page-header .container {
    position: relative;
    z-index: 2;
}

.page-header h1 {
    font-size: clamp(2rem, 5vw, 3.5rem);
    font-weight: 800;
    color: var(--white);
    text-transform: uppercase;
    margin-bottom: 1rem;
    text-shadow: 0 4px 15px rgba(0, 0, 0, .5);
    line-height: 1.2;
}

.page-header .lead {
    font-size: clamp(1rem, 2vw, 1.25rem);
    color: var(--text-light);
    max-width: 800px;
    margin: 0 auto 2rem auto;
}

/* =========================================================
   5) CARTES (services + blog)
   ========================================================= */
.service-grid-card {
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    background-size: cover;
    background-position: center;
    height: 280px;
    border-radius: var(--border-radius);
    position: relative;
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
}

.service-grid-card::before {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, .3);
    transition: background .4s;
    z-index: 1;
}

.service-grid-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
    border-bottom: 5px solid var(--secondary);
}

.service-grid-content {
    position: relative;
    z-index: 2;
    padding: 20px;
    transition: opacity .3s;
}

.service-grid-content h3 {
    color: var(--white);
    font-size: 1.5rem;
    font-weight: 700;
    text-transform: uppercase;
    text-shadow: 0 2px 5px rgba(0, 0, 0, .8);
    margin: 0;
}

.service-overlay {
    position: absolute;
    inset: 0;
    background: rgba(14, 16, 48, .95);
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 20px;
    opacity: 0;
    transition: all .4s ease;
    transform: translateY(20px);
    z-index: 3;
    color: var(--white);
    font-size: .95rem;
}

.service-grid-card:hover .service-overlay {
    opacity: 1;
    transform: translateY(0);
}

.service-grid-card:hover .service-grid-content {
    opacity: 0;
}

/* Blog */
.blog-card {
    background: var(--white);
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
    height: 100%;
    display: flex;
    flex-direction: column;
    border: 1px solid rgba(0, 0, 0, .03);
}

.blog-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.blog-thumb {
    width: 100%;
    height: 220px;
    position: relative;
    overflow: hidden;
    background-color: #f0f0f0;
}

.blog-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .5s ease;
}

.blog-card:hover .blog-thumb img {
    transform: scale(1.05);
}

.blog-thumb .badge {
    position: absolute;
    top: 15px;
    right: 15px;
    z-index: 10;
    box-shadow: 0 2px 5px rgba(0, 0, 0, .2);
}

.blog-content {
    padding: 1.5rem;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.blog-title {
    font-size: 1.2rem;
    font-weight: 700;
    line-height: 1.4;
    margin-bottom: 1rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.blog-title a {
    color: var(--text-dark);
}

.blog-title a:hover {
    color: var(--secondary);
}

.blog-content p {
    color: #666;
    font-size: .9rem;
    flex-grow: 1;
    margin-bottom: 1.5rem;
}

/* =========================================================
   6) TOP BAR + NAVBAR + MEGA MENU
   ========================================================= */

/* ---------- TOP BAR ---------- */
.vip-topbar {
    background: var(--primary-dark);
    color: rgba(255, 255, 255, .92);
    border-bottom: 1px solid rgba(255, 255, 255, .08);
    font-size: .95rem;
}

.vip-topbar a {
    color: rgba(255, 255, 255, .92);
    text-decoration: none;
}

.vip-topbar a:hover {
    opacity: .92;
}

/* ---------- NAVBAR ---------- */
.vip-navbar {
    background-color: var(--primary);
    position: relative;
    z-index: 3000;
}

.vip-navbar .vip-logo {
    height: var(--logo-height);
    width: auto;
    object-fit: contain;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, .3));
}

.vip-navbar .navbar-brand {
    margin-right: 24px;
}

.vip-navbar .navbar-collapse {
    justify-content: flex-end;
}

/* Menu UL */
.vip-navbar .navbar-nav {
    width: auto !important;
    justify-content: flex-end !important;
    gap: var(--nav-gap);
    flex-wrap: nowrap;
    margin-left: 16px;
}

.vip-navbar .navbar-nav .nav-item {
    flex: 0 0 auto !important;
}

/* Liens */
.vip-navbar .nav-link {
    font-weight: 700;
    color: rgba(255, 255, 255, .92) !important;
    padding: var(--nav-link-pad-y) var(--nav-link-pad-x);
    text-transform: uppercase;
    letter-spacing: var(--nav-link-letter);
    font-size: var(--nav-link-size);
}

.vip-navbar .nav-link:hover,
.vip-navbar .nav-link.active,
.vip-navbar .active-gold {
    color: var(--secondary) !important;
}

.vip-navbar .nav-link.dropdown-toggle {
    background: transparent !important;
    border: 0 !important;
    box-shadow: none !important;
    position: relative;
}

.vip-navbar .dropdown-toggle::after {
    display: none !important;
}

.vip-navbar .nav-link.dropdown-toggle:focus {
    outline: none !important;
    box-shadow: none !important;
}

.vip-navbar .nav-link.dropdown-toggle:focus-visible {
    outline: 3px solid rgba(201, 160, 80, .85) !important;
    outline-offset: 6px;
    border-radius: 12px;
}

/* Bouton gold */
.vip-navbar .vip-btn-gold {
    background: linear-gradient(45deg, #b88b4a, #e6c67c) !important;
    color: #0d0e12 !important;
    border: none !important;
    font-weight: 900;
    border-radius: 999px !important;
    box-shadow: 0 10px 26px rgba(0, 0, 0, .22);
    white-space: nowrap;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    line-height: 1 !important;
    padding: var(--cta-pad-y) var(--cta-pad-x) !important;
    min-height: var(--cta-min-h) !important;
}

.vip-navbar .vip-btn-gold:hover {
    filter: brightness(1.05);
}

.slide_vip .vip-btn-gold {
    background: linear-gradient(45deg, #b88b4a, #e6c67c) !important;
}

.slide_vip .vip-btn-gold:hover {
    filter: brightness(1.05);
}

/* ---------- MEGA MENU ---------- */
.vip-navbar .dropdown-menu.vip-mega-menu {
    position: absolute;
    top: calc(100% - 2px);
    left: 50%;
    transform: translateX(-50%) translateY(8px);
    width: min(920px, calc(100vw - 56px));
    max-width: calc(100vw - 56px);
    margin-top: 0 !important;
    padding: 0 !important;
    border: 0 !important;
    border-radius: 18px;
    background: transparent;
    box-shadow: 0 18px 55px rgba(0, 0, 0, .22);
    z-index: 4000;
    overflow: visible;

    opacity: 0;
    visibility: hidden;
    pointer-events: none;

    transition: opacity 160ms ease, transform 160ms ease, visibility 160ms ease;
    will-change: opacity, transform;
}

.vip-navbar .dropdown-menu.vip-mega-menu.show {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: translateX(-50%) translateY(0);
}

/* Shell + watermark */
.vip-mega-menu .vip-mega-shell {
    position: relative;
    overflow: hidden;
    background: #fff;
    border-radius: 18px;
    padding: 16px;
}

.vip-mega-menu .vip-mega-shell::after {
    content: "";
    position: absolute;
    inset: 0;
    background-image: url("/assets/img/menu/background_nos_services.jpg");
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    opacity: 0.10;
    filter: contrast(1.15) saturate(1.1);
    pointer-events: none;
}

.vip-mega-menu .vip-mega-shell::before {
    content: "";
    position: absolute;
    inset: 0;
    background: rgba(255, 255, 255, .80);
    pointer-events: none;
}

.vip-mega-menu .vip-mega-shell>* {
    position: relative;
    z-index: 1;
}

/* Panels */
.vip-navbar .vip-mega-panel {
    border-radius: 16px;
    background: linear-gradient(180deg, rgba(201, 160, 80, .12), rgba(201, 160, 80, .06));
    border: 1px solid rgba(201, 160, 80, .25);
    padding: 14px;
    backdrop-filter: blur(6px);
}

/* Pills gauche */
.vip-navbar .vip-mega-pills .nav-link {
    text-align: left;
    border-radius: 14px;
    padding: 12px 12px;
    color: #14151a !important;
    background: transparent !important;
    font-weight: 900;
    letter-spacing: .02em;
    text-transform: none;
    font-size: .98rem;
}

.vip-navbar .vip-mega-pills .nav-link:hover {
    background: rgba(0, 0, 0, .04) !important;
}

.vip-navbar .vip-mega-pills .nav-link.active {
    background: linear-gradient(45deg, #b88b4a, #e6c67c) !important;
    color: #14151a !important;
    box-shadow: 0 12px 24px rgba(0, 0, 0, .12);
}

/* Contenu droite */
.vip-navbar .vip-mega-content {
    max-height: 420px;
    overflow-y: auto;
    padding-right: 10px;
}

.vip-navbar .vip-mega-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
    align-items: stretch;
}

.vip-navbar .vip-mega-card {
    min-height: 220px;
}

.vip-navbar .vip-mega-link {
    display: block;
    width: 100%;
    text-decoration: none;
    color: #101217;
    font-weight: 800;
    padding: 10px 12px;
    border-radius: 12px;
    white-space: normal;
    line-height: 1.25;
    transition: background 120ms ease, transform 120ms ease;
}

.vip-navbar .vip-mega-link:hover {
    background: rgba(201, 160, 80, .22);
    transform: translateY(-1px);
}

.vip-navbar .vip-mega-link:focus-visible {
    outline: 3px solid rgba(201, 160, 80, .95);
    outline-offset: 2px;
}

/* CTA panel (dans mega menu) */
.vip-mega-cta {
    display: flex;
    flex-direction: column;
    gap: 8px;
    min-height: 180px;
}

.vip-mega-cta .vip-mega-cta-sub {
    line-height: 1.35;
    margin: 0;
}

/* bouton au bas de la carte CTA */
.vip-mega-cta .vip-btn-gold {
    margin-top: auto !important;
    display: inline-flex !important;
    justify-content: center;
    align-items: center;
    text-align: center;
    white-space: normal !important;
    font-size: .9rem !important;
    min-height: 40px !important;
    padding: 9px 12px !important;
}

/* Bridge hover stable */
@media (min-width:1200px) {
    .vip-navbar .nav-link.dropdown-toggle::after {
        content: "";
        position: absolute;
        left: -18px;
        right: -18px;
        bottom: -34px;
        height: 70px;
        background: transparent;
    }
}

/* Mega menu sizing < 1400 */
@media (max-width: 1400px) {
    .vip-navbar .dropdown-menu.vip-mega-menu {
        width: min(860px, calc(100vw - 40px));
        max-width: calc(100vw - 40px);
    }
}

/* =========================================================
   7) RESPONSIVE GLOBAL
   ========================================================= */
@media (max-width: 991.98px) {
    section {
        padding: 60px 0;
    }
}

@media (max-width: 767.98px) {
    .page-header {
        min-height: 40vh;
        padding: 60px 0;
    }

    .service-grid-card {
        height: 220px;
    }

    .service-grid-content h3 {
        font-size: 1.25rem;
    }

    .blog-thumb {
        height: 180px;
    }

    .blog-content {
        padding: 1.25rem;
    }

    .featured-image-wrapper {
        height: 250px;
    }
}

/* =========================================================
   8) FIX OVERFLOW NAVBAR < 1400px (compression)
   ========================================================= */
@media (max-width: 1399.98px) {
    :root {
        --logo-height: 48px;
        --nav-link-pad-y: 8px;
        --nav-link-pad-x: 8px;
        --nav-link-size: .78rem;
        --nav-link-letter: .04em;
        --nav-gap: .2rem;
        --cta-pad-y: 8px;
        --cta-pad-x: 12px;
        --cta-min-h: 40px;
    }
}

/* =========================================================
   9) MOBILE (<1200px) — styles mega menu
   ========================================================= */
@media (max-width:1199.98px) {
    .vip-navbar .navbar-collapse {
        max-height: 80vh;
        overflow-y: auto;
        background-color: var(--primary);
    }

    .vip-navbar .dropdown-menu.vip-mega-menu {
        position: static !important;
        transform: none !important;
        width: 100% !important;
        max-width: 100% !important;
        opacity: 1 !important;
        visibility: visible !important;
        pointer-events: auto !important;
        background: rgba(255, 255, 255, 0.05);
        padding: 12px 10px !important;
        box-shadow: none !important;
    }

    .vip-mega-menu .vip-mega-shell {
        background: transparent;
        padding: 0 !important;
    }

    .vip-navbar .vip-mega-content {
        max-height: none;
        overflow: visible;
        padding-right: 0;
    }

    .vip-navbar .vip-mega-grid {
        grid-template-columns: 1fr;
    }
}