/* ==========================================================================
   --- 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);
}




/* ==========================================================================
   --- 3. HERO SECTION (Modifiée avec Image et Voile 40%) ---
   ========================================================================== */
.hero {
    height: 80vh;
    display: flex;
    align-items: center;
    
    /* 1. L'IMAGE DE FOND (image_3.png) */
    /* Assure-toi que le chemin vers ton image est correct */
    background-image: url('../assets/hero-bg-clean.png'); 
    background-size: cover;    /* L'image couvre toute la zone */
    background-position: center; /* Centre l'image */
    background-repeat: no-repeat;
    
    /* Pour s'assurer que le fond est sombre si l'image charge mal */
    background-color: var(--color-bg-deep); 
    position: relative; /* Nécessaire pour placer le voile par-dessus */
}

/* 2. LE VOILE DE COULEUR (Opacité 40%) */
.hero::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    /* Utilisation de la couleur de fond profonde à 40% d'opacité */
    background-color: rgba(14, 18, 26, 0.4); 
    z-index: 1; /* Place le voile par-dessus l'image */
}

/* 3. S'assurer que le texte reste au-dessus du voile */
.hero .container {
    position: relative;
    z-index: 2; /* Plus haut que le voile (z-index: 1) */
}

.hero-content h1 {
    font-family: var(--font-serif);
    font-size: 3.5rem;
    line-height: 1.2;
    color: var(--color-text-light);
    margin-bottom: 20px;
    /* Ajout d'une ombre portée légère sur le texte pour le contraste */
    text-shadow: 0 2px 10px rgba(0,0,0,0.5); 
}

.hero-content p {
    font-size: 1.2rem;
    color: var(--color-text-muted);
    margin-bottom: 40px;
    max-width: 600px;
}

.hero-btns {
    display: flex;
    gap: 20px;
}

.btn-gold {
    background-color: var(--color-gold);
    color: #000;
    padding: 15px 30px;
    border-radius: 5px;
    font-weight: 700;
}

.btn-gold:hover {
    background-color: var(--color-gold-hover);
}

.btn-outline {
    border: 1px solid var(--color-gold);
    color: var(--color-gold);
    padding: 15px 30px;
    border-radius: 5px;
}

.btn-outline:hover {
    background-color: var(--color-gold);
    color: #000;
}



/* --- 4. SECTION SERVICES --- */
.services {
    padding: 100px 0;
    background-color: var(--color-bg-deep);
}


.gold-divider {
    width: 60px;
    height: 3px;
    background-color: var(--color-gold);
    margin: 20px auto;
}

/* GRILLE DES SERVICES */
.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

/* CARTE SERVICE (EFFET GLASSMORPHISM) */
.service-card {
    background: rgba(255, 255, 255, 0.03); /* Fond très transparent */
    border: 1px solid rgba(207, 168, 94, 0.1); /* Bordure or très fine */
    padding: 40px;
    border-radius: 15px;
    transition: all 0.4s ease;
    backdrop-filter: blur(10px); /* L'effet de flou (verre) */
    text-align: center;
}

.service-card:hover {
    transform: translateY(-10px);
    background: rgba(255, 255, 255, 0.07);
    border-color: var(--color-gold);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
}

.icon-box {
    width: 70px;
    height: 70px;
    background-color: var(--color-royal-blue);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 25px;
    font-size: 1.8rem;
    color: var(--color-gold);
    transition: 0.3s;
}

.service-card:hover .icon-box {
    background-color: var(--color-gold);
    color: var(--color-bg-deep);
}

.service-card h3 {
    font-family: var(--font-serif);
    font-size: 1.5rem;
    margin-bottom: 15px;
}

.service-card p {
    color: var(--color-text-muted);
    font-size: 0.95rem;
    margin-bottom: 25px;
}

.read-more {
    color: var(--color-gold);
    font-weight: 700;
    font-size: 0.9rem;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.read-more:hover {
    letter-spacing: 1px;
}

/* RESPONSIVE */
@media (max-width: 768px) {
    .section-header h2 {
        font-size: 2rem;
    }
}

/* --- 5. SECTION CHIFFRES & ENGAGEMENT --- */
.stats-engagement {
    padding: 120px 0;
    background-color: var(--color-bg-deep); /* Fond très sombre */
    position: relative;
    overflow: hidden;
    margin-top: -80px;
}

.stats-container {
    display: grid;
    grid-template-columns: 1fr 1.2fr; /* Asymétrie : le panneau d'engagement est plus large */
    gap: 60px;
    align-items: center;
}

/* --- CÔTÉ GAUCHE : STATS --- */
.stats-visual {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 30px;
}

.stat-item {
    background: rgba(20, 26, 38, 0.6); /* Fond légèrement plus clair */
    padding: 40px;
    border-radius: 10px;
    text-align: center;
    border: 1px solid rgba(255, 255, 255, 0.03);
    transition: transform 0.3s ease;
}

.stat-item:hover {
    transform: translateY(-5px);
    border-color: rgba(207, 168, 94, 0.2);
}

.stat-item.gold-highlight {
    background-color: var(--color-royal-blue); /* Rappel du bleu du logo */
    border: 1px solid rgba(207, 168, 94, 0.4);
}

.stat-number {
    font-family: var(--font-serif);
    font-size: 3rem;
    color: var(--color-gold);
    font-weight: 800;
    display: block;
    margin-bottom: 10px;
}

.gold-highlight .stat-number {
    color: var(--color-text-light); /* Contraste sur fond bleu */
}

.stat-label {
    color: var(--color-text-muted);
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 700;
}

.gold-highlight .stat-label {
    color: rgba(244, 241, 234, 0.7);
}

/* --- CÔTÉ DROIT : PANNEAU D'ENGAGEMENT --- */
.engagement-panel {
    position: relative;
    background-color: #141a26; /* Couleur de la nav pour le panneau */
    padding: 60px;
    border-radius: 20px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.6);
    border: 1px solid rgba(207, 168, 94, 0.1);
}

/* Pseudo-élément pour la texture subtile (comme l'image du Hero mais très voilée) */
.engagement-panel::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    /* Utilise une image de texture sombre ou l'image_3.png avec une opacité extrême */
    background-image: url('../assets/hero-bg-clean.jpg'); 
    background-size: cover;
    background-position: center;
    opacity: 0.05; /* TRÈS SUBTILE, juste une texture */
    border-radius: 20px;
}

.panel-content {
    position: relative; /* Pour être au-dessus de la texture */
    z-index: 2;
}

.engagement-panel .subtitle {
    color: var(--color-gold);
    text-transform: uppercase;
    letter-spacing: 3px;
    font-size: 0.9rem;
    font-weight: 700;
    display: block;
    margin-bottom: 15px;
}

.engagement-panel h2 {
    font-family: var(--font-serif);
    font-size: 2.8rem;
    line-height: 1.2;
    margin-bottom: 25px;
}

.engagement-panel .gold-divider {
    width: 80px;
    height: 3px;
    background-color: var(--color-gold);
    margin: 0 0 25px 0; /* Aligné à gauche */
}

.engagement-panel p {
    color: var(--color-text-muted);
    font-size: 1.1rem;
    margin-bottom: 30px;
    line-height: 1.8;
}

.motto-quote {
    font-family: var(--font-serif);
    font-style: italic;
    font-size: 1.5rem;
    color: var(--color-gold);
    font-weight: bold;
    margin-bottom: 40px;
    display: block;
    padding-left: 20px;
    border-left: 3px solid var(--color-gold);
}

.btn-outline-gold {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    border: 2px solid var(--color-gold);
    color: var(--color-gold);
    padding: 12px 25px;
    border-radius: 5px;
    font-weight: 700;
    text-transform: uppercase;
    font-size: 0.9rem;
    letter-spacing: 1px;
}

.btn-outline-gold i {
    font-size: 1.1rem;
}

.btn-outline-gold:hover {
    background-color: var(--color-gold);
    color: #000;
}

/* --- RESPONSIVE CHIFFRES & ENGAGEMENT --- */
@media (max-width: 992px) {
    .stats-container {
        grid-template-columns: 1fr; /* On passe sur une seule colonne */
        gap: 40px;
    }
    
    .stats-visual {
        order: 2; /* Les stats passent en bas */
    }
    
    .engagement-panel {
        order: 1; /* Le texte passe en haut */
        padding: 40px;
    }
    
    .engagement-panel h2 {
        font-size: 2.2rem;
    }
}

@media (max-width: 576px) {
    .stats-visual {
        grid-template-columns: 1fr; /* Stats en colonne unique sur mobile */
    }
    
    .stat-number {
        font-size: 2.5rem;
    }
}

/* --- AMÉLIORATIONS POUR L'ACCENT SUR LES PRÊTS --- */

/* La liste des avantages du prêt */
.loan-features {
    margin-bottom: 30px;
    padding-left: 0;
}

.loan-features li {
    display: flex;
    align-items: center;
    gap: 12px;
    color: var(--color-text-light);
    font-size: 0.95rem;
    margin-bottom: 12px;
    font-weight: 500;
}

.loan-features li i {
    color: var(--color-gold); /* Les icônes de validation en Or */
    font-size: 1.1rem;
}

/* Alignement des boutons en bas du panneau */
.panel-actions {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
}

/* On réutilise le style du bouton Gold qu'on avait créé pour le Hero */
.panel-actions .btn-gold {
    padding: 12px 25px;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* RESPONSIVE POUR LES BOUTONS */
@media (max-width: 576px) {
    .panel-actions {
        flex-direction: column;
    }
    .panel-actions a {
        text-align: center;
        width: 100%;
    }
}

.stat-icon {
    font-size: 1.5rem;
    color: var(--color-gold);
    margin-bottom: 10px;
    opacity: 0.8;
}

.gold-highlight .stat-icon {
    color: var(--color-text-light); /* Blanc sur le fond bleu royal */
}

.stat-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.highlighted-card {
    border: 1px solid var(--color-gold) !important;
    background: rgba(207, 168, 94, 0.05) !important;
    box-shadow: 0 10px 30px rgba(207, 168, 94, 0.1);
}

.highlighted-card .icon-box {
    background-color: var(--color-gold);
    color: var(--color-bg-deep);
}

/* --- AMÉLIORATIONS HERO --- */

.hero-badge {
    display: inline-block;
    color: var(--color-gold);
    border: 1px solid var(--color-gold);
    padding: 5px 15px;
    border-radius: 50px;
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-bottom: 20px;
    background: rgba(207, 168, 94, 0.1);
}

.hero-trust {
    margin-top: 40px;
    display: flex;
    gap: 30px;
    font-size: 0.9rem;
    color: var(--color-text-muted);
}

.hero-trust span {
    display: flex;
    align-items: center;
    gap: 10px;
}

.hero-trust i {
    color: var(--color-gold);
}

/* Ajustement pour mobile */
@media (max-width: 768px) {
    .hero-trust {
        flex-direction: column;
        gap: 15px;
    }
}



/* --- 6. SECTION TÉMOIGNAGES --- */
.testimonials {
    padding: 100px 0;
    background-color: var(--color-bg-navbar); /* Fond légèrement différent pour séparer */
}

.testimonial-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 40px;
    margin-bottom: 80px;
}

.testimonial-card {
    background: var(--color-bg-deep);
    padding: 50px;
    border-radius: 5px; /* Carré pour un look plus sérieux/institutionnel */
    position: relative;
    border-left: 4px solid transparent;
    transition: 0.3s;
}

.testimonial-card.highlighted {
    border-left-color: var(--color-gold);
    box-shadow: 0 15px 40px rgba(0,0,0,0.3);
}

.quote-icon {
    color: var(--color-gold);
    font-size: 2rem;
    margin-bottom: 20px;
    opacity: 0.5;
}

.testimonial-card p {
    font-family: var(--font-serif);
    font-size: 1.2rem;
    font-style: italic;
    color: var(--color-text-light);
    margin-bottom: 30px;
    line-height: 1.6;
}

.client-info strong {
    display: block;
    color: var(--color-gold);
    font-size: 1.1rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.client-info span {
    color: var(--color-text-muted);
    font-size: 0.9rem;
}

/* LOGOS PARTENAIRES */
.partners-logos {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 60px;
    flex-wrap: wrap;
    opacity: 0.6;
    filter: grayscale(1);
}

.partner {
    font-size: 1.5rem;
    color: var(--color-text-muted);
    font-weight: 700;
}

.partner i {
    margin-right: 10px;
}

.partner:hover {
    filter: grayscale(0);
    color: var(--color-gold);
    opacity: 1;
}

/* RESPONSIVE */
@media (max-width: 768px) {
    .testimonial-grid {
        grid-template-columns: 1fr;
    }
}

/* --- AJUSTEMENTS POUR LE HEADER DE SECTION --- */

.section-header {
    text-align: center;
    margin-bottom: 70px; /* Plus d'espace pour laisser respirer les chiffres */
}

.section-header .subtitle {
    color: var(--color-gold);
    text-transform: uppercase;
    letter-spacing: 4px;
    font-size: 0.85rem;
    font-weight: 700;
    display: block;
    margin-bottom: 10px;
}

.section-header h2 {
    font-family: var(--font-serif);
    font-size: 2.8rem;
    color: var(--color-text-light);
    margin-bottom: 20px;
}

.section-header .gold-divider {
    width: 80px;
    height: 3px;
    background-color: var(--color-gold);
    margin: 0 auto 25px;
}

.header-description {
    max-width: 700px;
    margin: 0 auto;
    color: var(--color-text-muted);
    font-size: 1.1rem;
    line-height: 1.6;
}

/* RESPONSIVE */
@media (max-width: 768px) {
    .section-header h2 {
        font-size: 2.2rem;
    }
    .header-description {
        font-size: 1rem;
    }
}


/* --- OPTIMISATION PARTENAIRES --- */
.partners-logos {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 40px;
    margin-top: 50px;
    align-items: center;
    text-align: center;
    opacity: 0.6;
    filter: grayscale(1);
    transition: 0.5s;
}

.partners-logos:hover {
    opacity: 0.9;
    filter: grayscale(0.5); /* On laisse un peu de gris pour le côté "sobre" */
}

.partner {
    font-size: 1.1rem;
    color: var(--color-text-muted);
    font-weight: 600;
    white-space: nowrap;
}

.partner i {
    font-size: 1.4rem;
    margin-right: 8px;
    vertical-align: middle;
    color: var(--color-gold); /* Les icônes restent dorées pour le rappel du logo */
}

/* Ajustement de la grille des témoignages pour 3 éléments */
@media (min-width: 1200px) {
    .testimonial-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* --- ANIMATION DE DÉFILEMENT INFINI --- */
.marquee-wrapper {
    width: 100%;
    overflow: hidden;
    padding: 40px 0;
    position: relative;
    mask-image: linear-gradient(to right, transparent, black 10%, black 90%, transparent);
}

.marquee-content {
    display: flex;
    gap: 30px;
    width: max-content; /* S'adapte à la longueur totale des cartes */
}

/* Animation pour les témoignages (Plus lent) */
.testimonials-track {
    animation: scrollTestimonials 120s linear infinite;
}

/* Animation pour les partenaires (Plus rapide) */
.partners-track {
    animation: scrollPartners 80s linear infinite;
}

@keyframes scrollTestimonials {
    from { transform: translateX(0); }
    to { transform: translateX(-50%); } /* On défile de moitié car on double les éléments en JS ou HTML */
}

@keyframes scrollPartners {
    from { transform: translateX(0); }
    to { transform: translateX(-50%); }
}

/* --- STYLES DES CARTES DANS LE MARQUEE --- */
.testimonials-infinite .testimonial-card {
    flex: 0 0 350px; /* Largeur fixe pour chaque témoignage */
    background: var(--color-bg-navbar);
    padding: 30px;
    border-radius: 8px;
    border: 1px solid rgba(207, 168, 94, 0.1);
}

.partners-wrapper {
    background: rgba(207, 168, 94, 0.03);
    margin-top: 50px;
}

.partners-track .partner {
    flex: 0 0 200px;
    font-size: 1.1rem;
    color: var(--color-text-muted);
    display: flex;
    align-items: center;
    gap: 10px;
}

/* Pause au survol pour que l'utilisateur puisse lire */
.marquee-wrapper:hover .marquee-content {
    animation-play-state: paused;
}