/* ==========================================================================
   --- VARIABLES DE COULEURS (Inspirées du Logo) ---
   ========================================================================== */
:root {
    --color-bg-deep: #0e121a;        /* Bleu nuit très foncé (le fond cuir) */
    --color-bg-navbar: #141a26;      /* Un peu plus clair pour la nav */
    --color-gold: #cfa85e;          /* L'or riche du logo */
    --color-gold-hover: #e6c17d;     /* Or plus brillant pour les survols */
    --color-royal-blue: #1c3664;    /* Le bleu à l'intérieur du blason */
    --color-text-light: #f4f1ea;     /* Un blanc crème très léger */
    --color-text-muted: #a0a0a0;     /* Gris pour les textes secondaires */
    --font-primary: 'Lato', sans-serif;
    --font-serif: 'Playfair Display', serif; /* Pour un look plus royal */
    --shadow-main: 0 4px 15px rgba(0,0,0,0.5);
}


/* ==========================================================================
   --- ROYAL BANK PRELOADER STYLES ---
   ========================================================================== */
#preloader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background-color: var(--color-bg-deep); /* Fond Bleu nuit très foncé */
    z-index: 9999; /* Toujours au-dessus de tout */
    display: flex;
    justify-content: center;
    align-items: center;
    transition: opacity 0.6s ease, visibility 0.6s ease;
}

/* Classe ajoutée en JS pour masquer le preloader */
#preloader.preloader-hidden {
    opacity: 0;
    visibility: hidden;
}

.preloader-content {
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
}

/* Style du Logo dans le preloader */
.preloader-logo {
    height: 80px; /* Plus grand que dans la nav */
    width: auto;
    /* Animation de pulsation dorée autour du logo */
    animation: logoPulse 2s infinite ease-in-out;
}

/* Style du Texte (On réutilise tes classes) */
.preloader-text .royal-title {
    font-size: 1.8rem;
    color: var(--color-gold);
}
.preloader-text .royal-est {
    display: block;
    font-size: 0.8rem;
    letter-spacing: 3px;
    color: var(--color-text-muted);
}

/* Barre de chargement discrète */
.preloader-bar {
    width: 150px;
    height: 2px;
    background-color: rgba(207, 168, 94, 0.1); /* Or très transparent */
    border-radius: 10px;
    overflow: hidden;
    margin-top: 10px;
}

.bar-progress {
    width: 0%;
    height: 100%;
    background-color: var(--color-gold);
    border-radius: 10px;
    /* Animation de chargement infini */
    animation: barLoading 2.5s infinite ease-in-out;
}

/* ==========================================================================
   --- ANIMATIONS KEYFRAMES ---
   ========================================================================== */

/* Animation 1 : Pulsation douce et lueur dorée autour du logo */
@keyframes logoPulse {
    0% {
        transform: scale(1);
        filter: drop-shadow(0 0 5px rgba(207, 168, 94, 0.2));
    }
    50% {
        transform: scale(1.03);
        filter: drop-shadow(0 0 15px rgba(207, 168, 94, 0.6));
    }
    100% {
        transform: scale(1);
        filter: drop-shadow(0 0 5px rgba(207, 168, 94, 0.2));
    }
}

/* Animation 2 : Mouvement de la barre de chargement */
@keyframes barLoading {
    0% {
        width: 0%;
        transform: translateX(-100%);
    }
    50% {
        width: 70%;
        transform: translateX(0);
    }
    100% {
        width: 100%;
        transform: translateX(100%);
    }
}

/* ==========================================================================
   --- RESET DE BASE ---
   ========================================================================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background-color: var(--color-bg-deep);
    color: var(--color-text-light);
    font-family: var(--font-primary);
    line-height: 1.6;
}

a {
    text-decoration: none;
    color: inherit;
    transition: all 0.3s ease;
}

ul {
    list-style: none;
}

/* ==========================================================================
   --- GRILLES & CONTENEUR ---
   ========================================================================== */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}


/* ==========================================================================
   --- 1. TOPBAR STYLES ---
   ========================================================================== */
.topbar {
    background-color: rgba(0,0,0,0.2);
    color: var(--color-text-muted);
    font-size: 0.85rem;
    padding: 8px 0;
    border-bottom: 1px solid rgba(255,255,255,0.05);
}

.topbar-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.topbar-left span, .topbar-right span {
    margin-right: 20px;
}

.topbar-left i, .topbar-right i {
    color: var(--color-gold);
    margin-right: 5px;
}

.topbar-right .motto {
    color: var(--color-gold);
    font-family: var(--font-serif);
    font-style: italic;
    font-weight: bold;
}

/* ==========================================================================
   --- 2. NAVBAR STYLES ---
   ========================================================================== */
.main-header {
    background-color: var(--color-bg-navbar);
    padding: 15px 0;
    box-shadow: var(--shadow-main);
    position: sticky; /* Reste en haut au défilement */
    top: 0;
    z-index: 1000;
}

.navbar-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* LOGO SECTION */
.logo {
    display: flex;
    align-items: center;
    gap: 15px;
}

.bank-logo {
    height: 50px; /* Ajustez selon votre image */
}

.logo-text {
    display: flex;
    flex-direction: column;
}

.royal-title {
    font-family: var(--font-serif);
    font-size: 1.5rem;
    color: var(--color-gold);
    font-weight: 800;
    letter-spacing: 1px;
}

.royal-est {
    font-size: 0.7rem;
    color: var(--color-text-muted);
    letter-spacing: 2px;
}

/* NAV MENU */
.nav-menu ul {
    display: flex;
    gap: 25px;
}

.nav-menu a {
    font-weight: 700;
    font-size: 0.95rem;
    padding: 5px 0;
    position: relative;
}

.nav-menu a::after { /* Effet de soulignement au survol */
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: -3px;
    left: 0;
    background-color: var(--color-gold);
    transition: width 0.3s;
}

.nav-menu a:hover, .nav-menu a.active {
    color: var(--color-gold);
}

.nav-menu a:hover::after, .nav-menu a.active::after {
    width: 100%;
}

/* NAV ACTIONS */
.nav-actions {
    display: flex;
    align-items: center;
    gap: 15px;
}

.btn-search {
    color: var(--color-text-muted);
    font-size: 1.2rem;
}

.btn-search:hover {
    color: var(--color-gold);
}

/* BOUTON ESPACE CLIENT (Le bouton 'Blue Royal') */
.btn-login {
    background-color: var(--color-royal-blue);
    color: var(--color-text-light);
    padding: 10px 20px;
    border-radius: 5px;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 10px;
    border: 1px solid transparent;
}

.btn-login i {
    color: var(--color-gold);
}

.btn-login:hover {
    background-color: transparent;
    border-color: var(--color-royal-blue);
    color: var(--color-royal-blue);
}

/* Bouton mobile (caché par défaut) */
.mobile-menu-toggle {
    display: none;
    background: none;
    border: none;
    color: var(--color-gold);
    font-size: 1.5rem;
    cursor: pointer;
}

/* ==========================================================================
   --- RESPONSIVE BASIQUE ---
   ========================================================================== */
/* ==========================================================================
   --- CORRECTIF MENU MOBILE ---
   ========================================================================== */
@media (max-width: 992px) {
    /* 1. Bouton Toggle */
    .mobile-menu-toggle {
        display: block !important; /* On force l'apparition */
        z-index: 1100;
        position: relative;
    }

    /* 2. Le panneau du menu */
    .nav-menu {
        position: fixed;
        top: 0;
        right: -100%; /* Caché hors écran */
        width: 100%;  /* Prend toute la largeur sur mobile */
        height: 100vh;
        background-color: var(--color-bg-navbar);
        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        transition: 0.5s cubic-bezier(0.77,0.2,0.05,1.0);
        z-index: 1000;
        visibility: hidden; /* Évite les clics fantômes quand caché */
    }

    /* 3. L'état ACTIF (Quand on clique sur le bouton) */
    .nav-menu.active {
        right: 0;
        visibility: visible;
    }

    /* 4. IMPORTANT : On force l'affichage de la liste <ul> */
    /* Ton code précédent avait "display: none" qui bloquait tout */
    .nav-menu ul {
        display: flex !important; 
        flex-direction: column;
        align-items: center;
        gap: 35px;
    }

    .nav-menu a {
        font-size: 1.8rem; /* Plus grand pour le confort tactile */
        font-family: var(--font-serif);
    }

    /* 5. Ajustements visuels annexes */
    .topbar-right .motto, 
    .topbar-left span:last-child,
    .btn-login span {
        display: none;
    }

    .nav-actions {
        gap: 10px;
    }
}

.nav-highlight {
    color: var(--color-gold) !important;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Style spécial pour mettre en avant le lien de financement */
.nav-menu ul li:nth-child(2) a {
    color: var(--color-gold);
    font-weight: 800;
}

/* On peut même ajouter un petit badge "Nouveau" ou "Top" si tu veux */
.nav-menu ul li:nth-child(2) a::before {
    content: 'ANGEBOT';
    position: absolute;
    top: -15px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 0.6rem;
    background: var(--color-gold);
    color: #000;
    padding: 1px 5px;
    border-radius: 3px;
    letter-spacing: 1px;
}