/* Couleurs personnalisées basées sur l'image */
:root {
    --aidachat-blue-dark: #001f3f;
    --aidachat-dark: #222d4f; /* Bleu très foncé pour le texte */
    --aidachat-red: #dc3545;
    /* Rouge pour le bouton principal et éléments actifs */
    --aidachat-gold: #ffc107;
    /* Jaune or pour les étoiles */
    --aidachat-gray: #6c757d;
    /* Gris pour les étoiles non remplies */
    --aidachat-dark-bg: #001730;
    /* Le bleu foncé de la Hero section et Avantages */
    --aidachat-light-bg: #f8f8f2;
    /* Fond crème/blanc cassé de la section étapes */
    --aidachat-card-bg: #fff;
    --aidachat-text-dark: #202020;
}

html {
    /* Assure un défilement doux lorsque l'utilisateur clique sur un lien */
    scroll-behavior: smooth;
}

body {
    font-family: Arial, sans-serif;
    background-color: var(--aidachat-card-bg);
    color: var(--aidachat-text-dark);
    padding-top: 69px;
}

.navbar-custom {
    background-color: var(--aidachat-dark-bg); /* Utilise la couleur sombre de la Hero section */
    border-bottom: 1px solid rgba(255, 255, 255, 0.1); /* Ligne de séparation subtile */
}

/* Assurer le bon style des liens (active et hover) */
.navbar-custom .nav-link {
    color: #fff;
    padding-left: 15px;
    padding-right: 15px;
    transition: color 0.2s;
}

.navbar-custom .nav-link:hover {
    color: var(--aidachat-red); /* La couleur rouge est votre accent */
}

.navbar-custom .nav-link.active {
    color: var(--aidachat-red); 
    font-weight: bold;
}

/* Ajustement du bouton de la navbar pour le rendre visible */
.navbar-toggler {
    border-color: rgba(255, 255, 255, 0.5);
}
.navbar-toggler-icon {
    /* Rendre l'icône de burger blanche */
    filter: invert(1);
}

/* --- Section Header / Hero --- */
.hero-section {
    position: relative; /* ESSENTIEL pour positionner le bouton */
    background-color: var(--aidachat-dark-bg);
    /* Laissez le CSS de l'image de fond pour l'effet de carte */
    background-image: linear-gradient(rgba(0, 0, 0, 0.7), rgba(0, 0, 0, 0.7)), url('../images/dep.jpg');
    background-size: cover;
    background-position: center;
    overflow: hidden; /* Pour s'assurer que rien ne dépasse si le bouton est trop près du bord */
}

/* --- Section Comment ça marche ? (Design linéaire) --- */
.how-it-works-section {
    background-color: var(--aidachat-light-bg);
    /* Fond crème */
    color: var(--aidachat-dark);
}

/* --- Section Nos avantages --- */
.advantages-section {
    background-color: var(--aidachat-dark-bg);
}

.advantage-card.border-warning {
    border: 2px solid var(--aidachat-gold) !important;
}

.advantage-card .text-warning {
    color: var(--aidachat-gold) !important;
}

.star-rating .gold-star {
    color: var(--aidachat-gold);
}

.star-rating .gray-star {
    color: var(--aidachat-gray);
}

.small-logos {
    border-top: 1px solid #eee;
    padding-top: 15px;
    margin-top: 20px !important;
    color: #999;
    justify-content: flex-start !important;
    gap: 20px;
}

.card:hover {
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    transform: translateY(-5px);
    transition: all 0.3s ease-in-out;
    border-color: var(--bs-primary);
}

.supplier-item:hover{
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    transform: translateY(-5px);
    transition: all 0.3s ease-in-out;
    border-color: var(--bs-primary);
}

.small-logo-item {
    border-bottom: 1px dotted #999;
}

@keyframes scroll {
    0% {
        transform: translateX(0);
    }

    100% {
        transform: translateX(calc(-290px * 4));
    }
}

.profile-dropdown-container {
    top: 50px; /* Position verticale */
    right: 50px; /* Position horizontale */
    z-index: 1000; /* Assure qu'il est au-dessus de tout */
}

/* Style du bouton déclencheur (le cercle de profil) */
.profile-dropdown-btn {
    border-radius: 50%;
    padding: 0;
    overflow: auto;
    cursor: pointer;
    transition: all 0.2s ease-in-out;
    line-height: 1; /* Assure que le contenu est centré */
}

.profile-dropdown-btn:hover {
    border-color: #fff;
    transform: scale(1.05);
}

.profile-dropdown-btn .profile-img {
    width: 20%;
    height: 50%;
    object-fit: cover;
}

/* Style du menu déroulant */
.profile-menu {
    border-radius: 8px;
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.2);
}

/* Authentifcation */
.auth-body {
    /* 1. Configuration de la position pour le pseudo-élément */
    position: relative; 
    background-color: var(--aidachat-dark-bg);
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: 20px;
    overflow: hidden;
}

.auth-body::before {
    content: '';
    position: absolute;
    top: -20px;
    left: -20px;
    right: -20px;
    bottom: -20px;
    background-image: linear-gradient(rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0.5)), url('../images/dep.jpg'); 
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    filter: blur(5px); 
    
    z-index: -1; 
}
.auth-wrapper {
    max-width: 420px; 
    width: 100%;
    z-index: 1; 
}

.auth-card {
    background-color: var(--aidachat-card-bg); 
    color: var(--aidachat-text-dark); 
    padding: 40px;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4); 
}

.auth-logo {
    font-size: 24px;
    font-weight: bold;
    color: var(--aidachat-red);
    margin-bottom: 5px;
}

.auth-title {
    font-size: 24px;
    font-weight: 600;
    margin-bottom: 20px;
}

.form-label {
    font-size: 0.9em;
    font-weight: 500;
}

.auth-link {
    color: var(--aidachat-blue-dark);
    text-decoration: none;
}

.auth-link:hover {
    color: #c82333;
    text-decoration: underline;
}

.auth-card .form-control {
    border-color: #ccc;
}
.auth-card .form-control:focus {
    border-color: var(--aidachat-red);
    box-shadow: 0 0 0 0.25rem rgba(220, 53, 69, 0.25); /* Ombre rouge */
}

@media (max-width: 992px) {
    /* --- SECTION COMMENT ÇA MARCHE ? --- */
    .how-it-works-section .container {
        padding-left: 0;
        padding-right: 0;
    }


    /* --- SECTION NOS AVANTAGES --- */
    /* Aligner le titre au centre et mettre les tabs sur une ligne séparée */
    .advantages-section .d-flex.align-items-center {
        flex-direction: column;
        text-align: center;
    }
    
    .advantages-section h2 {
        /* Retirer la marge large et centrer */
        margin-right: 0 !important; 
        margin-bottom: 20px;
    }

    /* Rendre les tabs réactives (défilement horizontal) */
    .advantages-section .nav-pills {
        flex-wrap: nowrap;
        overflow-x: auto;
        padding-bottom: 10px;
        justify-content: flex-start !important;
        width: 100%;
    }
    
    .advantages-section .nav-item {
        flex-shrink: 0; /* Empêche les éléments de se rétrécir */
    }

    /* --- SECTION FOURNISSEURS VÉRIFIÉS --- */
    .suppliers-section .d-flex.justify-content-between {
        flex-direction: column;
        align-items: center !important;
    }

    .suppliers-section h2 {
        text-align: center;
        width: 100%;
    }

    /* Rendre les tabs fournisseurs réactives (défilement horizontal) */
    .suppliers-section .nav-pills {
        flex-wrap: nowrap;
        overflow-x: auto;
        padding-bottom: 10px;
        justify-content: flex-start !important;
        width: 100%;
        margin-bottom: 0 !important;
    }
    
    .suppliers-section .nav-item {
        flex-shrink: 0;
    }
    
    /* Centrer la ligne de petits logos */
    .small-logos {
        justify-content: center !important;
    }
    
}

.profile-page {
    /* Utilise le layout 2 colonnes : 2/3 pour la gauche, 1/3 pour la droite */
    grid-template-columns: 2fr 1fr; 
}
@media (max-width: 992px) {
    .profile-page {
        grid-template-columns: 1fr; /* Empilement sur mobile */
    }
}

/* Carte d'en-tête (Avatar) */
.profile-avatar-area {
    position: relative;
    flex-shrink: 0;
}

.profile-avatar {
    width: 90px;
    height: 90px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid var(--accent); /* Bordure d'accentuation */
}

.upload-btn {
    position: absolute;
    bottom: 0;
    right: 0;
    border-radius: 50%;
    width: 32px;
    height: 32px;
    padding: 0;
    line-height: 1;
    font-size: 14px;
    /* Style du bouton accent */
    background-color: var(--accent);
    color: var(--bg);
}

.profile-info-details h2 {
    font-size: 24px;
    font-weight: 700;
}

.status-verified {
    display: inline-block;
    padding: 3px 8px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 600;
    background-color: rgba(94, 234, 212, 0.2); 
    color: var(--accent);
}

/* Affichage des Détails (mode lecture seule) */
.detail-label {
    font-size: 12px;
    font-weight: 500;
    color: var(--muted);
    margin-bottom: 2px;
    text-transform: uppercase;
}

.detail-value {
    font-size: 16px;
    font-weight: 700;
    color: #fff;
    margin-bottom: 0;
}

/* Sécurité / Actions rapides */
.security-item {
    padding: 10px 0;
    border-bottom: 1px solid var(--glass);
}
.security-item:last-child {
    border-bottom: none;
}

/* KPIs Simples (Colonne de droite) */
.kpi-small {
    display: flex;
    align-items: center;
    gap: 15px;
}
.kpi-small i {
    font-size: 20px;
}
.kpi-value-small {
    font-size: 20px;
    font-weight: 700;
    line-height: 1.2;
}
.kpi-label-small {
    font-size: 12px;
    color: var(--muted);
}


/* Styles pour les Modals (pour le thème sombre) */
.modal-dark {
    background-color: var(--card) !important;
    border: 1px solid var(--glass);
    color: #e6eef6;
}
.modal-header, .modal-footer {
    border-color: var(--glass);
}

.modal-header {
    background-color: var(--aidachat-blue-dark);
    color: #fff;
}

.modal-footer {
    justify-content: left;
}

/* --- Footer --- */

.footer {
    background-color: var(--aidachat-dark-bg);
}

