:root {
    /* --- Couleurs du Thème --- */
    --color-dark-bg: #1e1e2d;         /* Arrière-plan principal (body, fond sombre) */
    --color-card-bg: #27293d;         /* Arrière-plan des cartes/blocs (sidebar incluse) */
    --color-text-light: #f0f0f0;      /* Texte principal clair */
    --color-text-grey: #a0a2b4;       /* Texte secondaire/gris */
    --color-purple: #9b59b6;          /* Couleur principale (boutons, éléments actifs, accents) */
    --color-blue: #3498db;            /* Couleur secondaire (ex: pourcentages) */
    --color-yellow: #f1c40f;          /* Couleur d'accentuation (ex: jaune) */

    /* --- Styles des Éléments Spécifiques --- */
    --schedule-tag-mono: #505263;     /* Fond pour les tags de date "mono" (News) */
    --schedule-tag-blue: var(--color-blue); /* Fond pour les tags de date "blue" */
    --border-color-dark: rgba(255, 255, 255, 0.08); /* Bordure légère pour séparation dans le thème sombre */
}

/* Styles généraux et Reset */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";
    background-color: var(--color-dark-bg);
    color: var(--color-text-light);
    line-height: 1.6;
}

/* ------------------------------------------- */
/* II. STRUCTURE DU DASHBOARD (Layout et Menu) */
/* ------------------------------------------- */

.dashboard-container {
    display: flex;
    min-height: 100vh;
}

/* 1.1 Sidebar */
.sidebar {
    width: 250px;
    background-color: var(--color-card-bg); /* Utilisation de la couleur de carte */
    padding: 20px 0;
    flex-shrink: 0;
    display: flex; /* Ajouté pour faciliter la mise en page interne */
    flex-direction: column;
}

.logo {
    font-size: 1.5em;
    font-weight: bold;
    padding: 0 20px 30px 20px;
    color: var(--color-text-light);
}

.sidebar-nav {
    padding: 0 20px;
}

.nav-title {
    color: var(--color-text-grey);
    font-size: 0.8em;
    text-transform: uppercase;
    margin-top: 20px;
    margin-bottom: 5px;
}

.sidebar-nav ul {
    list-style: none;
}

.sidebar-nav a {
    display: flex;
    align-items: center;
    padding: 10px 15px;
    margin: 5px 0;
    text-decoration: none;
    color: var(--color-text-grey);
    border-radius: 8px;
    transition: background-color 0.2s, color 0.2s;
}

.sidebar-nav li.active a {
    background-color: var(--color-purple);
    color: var(--color-text-light);
}

.sidebar-nav a:hover:not(.active) {
    background-color: #343754;
}

.sidebar-nav a i {
    margin-right: 10px;
    width: 20px;
    text-align: center;
}

/* 1.2 Main Content et Header */
.main-content {
    flex-grow: 1;
    padding: 30px;
    background-color: var(--color-dark-bg); /* Cohérence avec le thème */
}

.top-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
}

.user-greeting h1 {
    font-size: 2em;
    margin-top: 5px;
    color: var(--color-text-light);
}

.search-profile {
    display: flex;
    align-items: center;
    color: var(--color-text-grey);
}

.profile-icon {
    width: 40px;
    height: 40px;
    background-color: var(--color-purple);
    border-radius: 50%;
    margin-left: 20px;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 1.1em;
    color: var(--color-text-light);
}

/* --------------------------------------- */
/* III. STYLES GÉNÉRAUX DES CARTES/BOUTONS */
/* --------------------------------------- */

.card {
    background-color: var(--color-card-bg);
    border-radius: 15px;
    padding: 25px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
    color: var(--color-text-light); /* Assure la couleur de texte par défaut */
}

.btn-primary, .btn-secondary {
    background-color: var(--color-purple);
    color: var(--color-text-light);
    border: none;
    padding: 12px 25px;
    border-radius: 8px;
    cursor: pointer;
    font-weight: bold;
    transition: background-color 0.2s;
}

.btn-primary:hover, .btn-secondary:hover {
    background-color: #8e44ad; /* Teinte plus sombre du purple */
}

/* ---------------------------------------- */
/* IV. MISE EN PAGE FLEXBOX DES LIGNES (Clé) */
/* ---------------------------------------- */

.content-row {
    display: flex;
    gap: 30px; /* Espace entre les cartes */
    margin-bottom: 30px;
    align-items: stretch; /* Les cartes ont la même hauteur dans la ligne */
}

/* --------------------------------------- */
/* V. STYLES DES SECTIONS SPÉCIFIQUES      */
/* --------------------------------------- */

/* 1. Banner Card */
.banner-card {
    /* Le style de fond a été conservé tel quel */
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 30px;
    margin-bottom: 30px;
    position: relative;
    overflow: hidden;
}

.banner-card h2 {
    font-size: 1.8em;
    margin-bottom: 5px;
}

.banner-card p {
    color: var(--color-text-grey);
    margin-bottom: 20px;
}

.banner-image {
    /* Remplacement du style radial-gradient par un style simple pour l'image */
    position: absolute;
    top: 0;
    right: 0;
    height: 100%;
    width: 35%; /* Taille pour l'image 3D */
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 1; /* L'image doit être visible */
}

.banner-image img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
}

.banner-content {
    z-index: 1;
    position: relative;
}

/* 2. NEWS (Anciennement Schedules List) */
.schedules-list {
    flex-basis: 350px; /* Largeur fixe pour la section News */
    flex-shrink: 0;
    padding: 20px; /* Ajusté à 20px pour un padding propre */
}

.schedules-list h3 {
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.2em;
}

/* Schedules Items (Conservé, mais harmonisé avec les variables) */
.schedule-item {
    display: flex;
    align-items: center;
    padding: 15px;
    background-color: var(--color-dark-bg);
    border-radius: 10px;
    margin-bottom: 15px;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.schedule-item:hover {
    background-color: #343754; /* Un peu plus clair au survol */
}

.schedule-item .fa-chevron-right {
    margin-left: auto;
    color: var(--color-text-grey);
    font-size: 0.8em;
}

.date-tag {
    /* Conserve la structure verticale du jour/numéro */
    width: 50px;
    height: 50px; /* Rendu plus carré */
    border-radius: 8px;
    margin-right: 15px;
    flex-shrink: 0;
    color: var(--color-text-light);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.date-tag .day {
    font-size: 0.7em;
    text-transform: uppercase;
    font-weight: 500;
}

.date-tag .number {
    font-size: 1.2em;
    font-weight: bold;
    margin-top: -3px;
}

/* Couleurs spécifiques aux jours (harmonisation avec le nouveau :root) */
.schedule-item.mono .date-tag { background-color: var(--schedule-tag-mono); }
.schedule-item.tue .date-tag { background-color: var(--schedule-tag-blue); }

.details .title {
    font-weight: bold;
}

.details .subtitle {
    font-size: 0.8em;
    color: var(--color-text-grey);
}

/* Style de l'heure en temps réel */
.details .time {
    font-size: 0.8em;
    color: var(--color-purple); /* Accentuation de l'heure */
    display: flex;
    align-items: center;
    gap: 5px;
}

/* 3. NOS PARTENAIRES (Anciennement Timeline Card) */
.timeline-card, .partner-card {
    flex: 1; /* Prend tout l'espace restant */
    min-width: 0;
    display: flex;
    flex-direction: column;
}

.partner-card h3 {
    margin-top: 0;
    margin-bottom: 20px;
    color: var(--color-text-light);
    display: flex;
    align-items: center;
    gap: 10px;
}

.partner-item {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 10px 0;
    border-bottom: 1px solid var(--border-color-dark);
}
.partner-item:last-child {
    border-bottom: none;
}

.partner-thumbnail {
    width: 50px;
    height: 50px;
    background-color: var(--schedule-tag-mono); /* Couleur du tag mono pour l'icône */
    border-radius: 8px;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 20px;
    color: var(--color-text-light);
    flex-shrink: 0;
}

.partner-details {
    flex-grow: 1;
}

.partner-details .title {
    font-weight: bold;
    margin: 0;
    color: var(--color-text-light);
}

.partner-details .description {
    font-size: 12px;
    color: var(--color-text-grey);
    margin: 2px 0 0;
}

.btn-profile {
    padding: 8px 15px;
    background: var(--color-purple); /* Utilisation de la variable */
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    cursor: pointer;
    white-space: nowrap;
    transition: background-color 0.2s ease;
    flex-shrink: 0;
}

.btn-profile:hover {
    background-color: #8e44ad;
}

/* 4. OFFRES SPÉCIALES (Anciennement Icon Progress Card) */
.icon-progress-card {
    flex-basis: 350px; /* Conservé la largeur de la liste News */
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
}

.icon-progress-card h3 {
    margin-top: 0;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.2em;
}

/* Le .progress-item est maintenant le conteneur des offres */
.progress-item {
    display: flex;
    align-items: center;
    padding: 10px 0;
    /* Suppression du style de cercle pour l'image */
}

/* Style de l'image principale pour les offres */
.icon-progress-card .progress-item:first-of-type {
    display: block;
    text-align: center;
    padding: 0 0 20px 0;
    border-bottom: 1px solid var(--border-color-dark);
    margin-bottom: 20px;
}

.icon-progress-card .progress-item img {
    max-width: 100%;
    border-radius: 8px;
    margin-bottom: 10px;
    height: 150px; /* Hauteur définie */
    object-fit: cover;
}

/* Style des autres offres */
.icon-progress-card .progress-item:not(:first-of-type) {
    margin-bottom: 10px;
}

.icon-progress-card .progress-item:not(:first-of-type) img {
    width: 60px;
    height: 60px;
    flex-shrink: 0;
}

.icon-progress-card .text {
    flex-grow: 1;
}

.icon-progress-card .title { font-weight: bold; }
.icon-progress-card .subtitle { font-size: 0.8em; color: var(--color-text-grey); }

/* 5. PROMOTIONS (Anciennement Recent Earning Card) */
.recent-earning-card {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.recent-earning-card h3 {
    margin-top: 0;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.2em;
}

.recent-earning-card .earning-list {
    text-align: center;
    margin-bottom: 15px;
}

.recent-earning-card .earning-list img {
    max-width: 100%;
    height: 150px; /* Hauteur définie */
    object-fit: cover;
    border-radius: 8px;
    margin-bottom: 15px;
}

.recent-earning-card .earning-chart {
    text-align: center;
    margin-top: 10px;
}

.recent-earning-card .chart-visual {
    color: var(--color-blue);
    font-weight: bold;
    margin-bottom: 5px;
}

.recent-earning-card .chart-date {
    font-size: 0.8em;
    color: var(--color-text-grey);
    margin-bottom: 15px;
}

.recent-earning-card .btn-new {
    /* Bouton d'action pour la promo */
    display: block;
    width: 100%;
    padding: 10px;
    background: var(--color-purple);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 1em;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.recent-earning-card .btn-new:hover {
    background-color: #8e44ad;
}

.recent-earning-card .tabs {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: 20px;
    padding-top: 10px;
    border-top: 1px solid var(--border-color-dark);
}

.recent-earning-card .tabs button {
    background-color: var(--schedule-tag-mono); /* Fond de bouton plus sombre */
    color: var(--color-text-grey);
    border: none;
    padding: 8px 15px;
    border-radius: 6px;
    cursor: pointer;
    transition: background-color 0.2s ease, color 0.2s ease;
}

.recent-earning-card .tabs button.active {
    background-color: var(--color-purple);
    color: white;
}

/* 6. PIED DE PAGE (Copyright) */
.dashboard-footer {
    text-align: center;
    margin-top: 40px;
    padding-top: 20px;
    border-top: 1px solid var(--border-color-dark);
    color: var(--color-text-grey);
    font-size: 13px;
}

.dashboard-footer p {
    margin: 0;
}
