/* Couleurs adoucies et variables globales */
:root {
    --primary-color: #3d5f9e; /* Bleu plus doux que #4154f1 */
    --primary-light: rgba(61, 95, 158, 0.08);
    --primary-hover: #3556a0;
    --secondary-color: #6c757d;
    --success-color: #2dce89;
    --warning-color: #ffc107;
    --danger-color: #f5365c;
    --info-color: #11cdef;

    --text-dark: #2c384e;
    --text-muted: #6c757d;
    --text-light: #8898aa;

    --bg-light: #f8f9fa;
    --bg-white: #ffffff;
    --border-color: #e9ecef;

    --card-radius: 0.75rem;
    --btn-radius: 0.5rem;
    --card-shadow: 0 0 15px rgba(0, 0, 0, 0.03);
    --card-shadow-hover: 0 5px 20px rgba(0, 0, 0, 0.05);
    --section-shadow: 0 7px 14px rgba(50, 50, 93, 0.1), 0 3px 6px rgba(0, 0, 0, 0.08);

    --transition-time: 0.2s;
    --transition-curve: cubic-bezier(0.4, 0, 0.2, 1);
}

/* Styles globaux améliorés */
body {
    background-color: #f7fafc;
    color: var(--text-dark);
}

/* Espacement lettrages et typographie */
.ls-1 { letter-spacing: 1px; }
.fs-sm { font-size: 0.875rem; }
.fw-medium { font-weight: 500; }
.fw-semibold { font-weight: 600; }
.text-gradient {
    background: linear-gradient(45deg, var(--primary-color), #5e7fb9);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* En-tête du tableau de bord amélioré */
.dashboard-header {
    background-color: var(--bg-white);
    border-radius: var(--card-radius);
    padding: 1.5rem;
    border-left: 5px solid var(--primary-color);
    margin-bottom: 1.5rem;
    box-shadow: var(--section-shadow);
    position: relative;
    overflow: hidden;
}

.dashboard-header:before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 150px;
    height: 100%;
    background: transparent;
    /* background: linear-gradient(135deg, rgba(61, 95, 158, 0.05) 0%, rgba(255, 255, 255, 0) 100%);*/
    z-index: -200;
}

.dashboard-header h1 {
    color: var(--text-dark);
    font-weight: 700;
    margin: 0;
    font-size: 1.75rem;
    position: relative;
    z-index: 1;
}

.dashboard-header p {
    position: relative;
    z-index: 1;
}

/* Cartes de statistiques améliorées */
.stat-card {
    border-radius: var(--card-radius);
    overflow: hidden;
    transition: all var(--transition-time) var(--transition-curve);
    height: 100%;
    border: none;
    background-color: var(--bg-white);
    border-top: 3px solid var(--primary-color);
    box-shadow: var(--card-shadow);
    position: relative;
}

.stat-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--card-shadow-hover);
}

.stat-card:after {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    height: 100%;
    width: 5px;
    background: linear-gradient(to bottom, var(--primary-color), transparent);
    opacity: 0;
    transition: opacity var(--transition-time) var(--transition-curve);
}

.stat-card:hover:after {
    opacity: 1;
}

.stat-card .card-body {
    padding: 1.5rem;
    background: linear-gradient(to bottom right, var(--bg-white) 70%, rgba(61, 95, 158, 0.02) 100%);
}

.stat-card .stat-value {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--text-dark);
    line-height: 1.2;
    margin-bottom: 0.5rem;
}

.stat-card .stat-label {
    color: var(--text-muted);
    font-size: 0.95rem;
    font-weight: 500;
    position: relative;
}

/* Table de données améliorée */
.data-table {
    border-radius: var(--card-radius);
    overflow: hidden;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.02);
}

.data-table thead th {
    background: linear-gradient(to right, var(--bg-light), rgba(248, 249, 250, 0.7));
    color: var(--text-dark);
    font-weight: 600;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-bottom: 2px solid var(--border-color);
    padding-top: 1rem;
    padding-bottom: 1rem;
}

.data-table tbody tr {
    transition: background-color var(--transition-time) var(--transition-curve);
}

.data-table tbody tr:hover {
    background-color: rgba(248, 249, 250, 0.7);
}

.data-table td {
    padding: 1rem 0.75rem;
    vertical-align: middle;
}

/* Barre de progression stylisée */
.progress {
    height: 0.65rem;
    border-radius: 1rem;
    background-color: rgba(233, 236, 239, 0.5);
    box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.05);
    overflow: hidden;
}

.progress-bar {
    border-radius: 1rem;
    position: relative;
    overflow: hidden;
}

.progress-bar:after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(45deg, rgba(255,255,255,0.15) 25%, transparent 25%, transparent 50%, rgba(255,255,255,0.15) 50%, rgba(255,255,255,0.15) 75%, transparent 75%, transparent);
    background-size: 1rem 1rem;
    opacity: 0.1;
}

/* Boutons d'action raffinés */
.action-btn {
    padding: 0.4rem 0.8rem;
    font-size: 0.85rem;
    border-radius: var(--btn-radius);
    transition: all var(--transition-time) ease;
    box-shadow: 0 1px 3px rgba(50, 50, 93, 0.15), 0 1px 0 rgba(0, 0, 0, 0.02);
    border-width: 1px !important;
}

.action-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 6px rgba(50, 50, 93, 0.1), 0 1px 3px rgba(0, 0, 0, 0.08);
}

/* Cartes de contenu améliorées */
.content-card {
    border-radius: var(--card-radius);
    overflow: hidden;
    box-shadow: var(--section-shadow);
    border: none;
    margin-bottom: 1.5rem;
    background-color: var(--bg-white);
    transition: all var(--transition-time) var(--transition-curve);
}

.content-card:hover {
    box-shadow: 0 15px 35px rgba(50, 50, 93, 0.1), 0 5px 15px rgba(0, 0, 0, 0.07);
}

.content-card .card-header {
    background: linear-gradient(45deg, var(--primary-color), #526fa8);
    color: white;
    padding: 1rem 1.5rem;
    font-weight: 600;
    border: none;
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: relative;
}

.content-card .card-header i {
    filter: drop-shadow(0 2px 5px rgba(0, 0, 0, 0.2));
}

.content-card .card-header:after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 5px;
    background: rgba(0, 0, 0, 0.1);
}

.content-card .card-body {
    padding: 1.5rem;
}

.content-card .card-footer {
    background-color: rgba(248, 249, 250, 0.5);
    border-top: 1px solid var(--border-color);
    padding: 0.75rem 1.5rem;
}

/* Lignes d'information utilisateur améliorées */
.user-info-row {
    padding: 0.75rem 0;
    border-bottom: 1px solid var(--border-color);
    transition: background-color var(--transition-time) var(--transition-curve);
}

.user-info-row:last-child {
    border-bottom: none;
}

.user-info-row:hover {
    background-color: rgba(248, 249, 250, 0.7);
}

.user-info-label {
    font-weight: 500;
    color: var(--text-dark);
    display: flex;
    align-items: center;
}

.user-info-label i {
    color: var(--primary-color);
    margin-right: 0.5rem;
    font-size: 0.9rem;
}

.user-info-value {
    color: var(--text-dark);
    font-weight: 500;
}

/* Cercles de progression améliorés */
.progress-circle {
    transition: all 0.3s ease;
    width: 150px;
    height: 150px;
    position: relative;
    background-color: rgba(248, 249, 250, 0.7);
    border-radius: 50%;
    box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.1);
}

/* Réduction de taille des cercles de progression sur mobile/tablette */
@media (max-width: 991px) {
    .progress-circle {
        width: 110px;
        height: 110px;
        font-size: 1.5rem;
    }

    .progress-circle-left .progress-circle-bar,
    .progress-circle-right .progress-circle-bar,
    .progress-circle-left,
    .progress-circle-right {
        clip: rect(0px, 55px, 110px, 0px);
    }

    .progress-circle-right .progress-circle-bar {
        clip: rect(0px, 110px, 110px, 55px);
    }

    .stat-card .card-body {
        padding: 0.75rem;
    }

    .stat-value {
        font-size: 1.5rem;
    }

    .stat-label {
        font-size: 1.25rem;
        font-weight: 600;
    }

    .stat-card .stat-label {
        font-size: 0.8rem;
    }

    /* Styles pour la liste des informations utilisateur sur mobile */
    .user-info-mobile .list-group-item {
        padding-left: 0;
        padding-right: 0;
    }

    .user-info-mobile-label {
        color: #6c757d;
        font-size: 0.85rem;
        margin-bottom: 0.25rem;
        display: flex;
        align-items: center;
    }

    .user-info-mobile-value {
        color: #2c384e;
        font-size: 0.95rem;
        word-break: break-word;
    }

    .user-info-mobile .badge {
        font-size: 0.75rem;
    }
}

/* Styles pour les cartes de thème sur mobile/tablette */
.theme-card {
    border-radius: 0.75rem;
    overflow: hidden;
    box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075), 0 0.0625rem 0.125rem rgba(0, 0, 0, 0.05);
    transition: all 0.2s ease;
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.theme-card:hover {
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.1), 0 0.125rem 0.25rem rgba(0, 0, 0, 0.08);
    transform: translateY(-2px);
}

.module-card {
    transition: background-color 0.2s ease;
}

.module-card:hover {
    background-color: rgba(248, 249, 250, 0.7) !important;
}

.fs-sm {
    font-size: 0.875rem;
}

.comment-content {
    font-size: 0.85rem;
    background-color: rgba(248, 249, 250, 0.5);
    border-radius: 0.5rem;
    padding: 0.5rem;
}

.progress-circle:hover {
    transform: scale(1.02);
}

.progress-circle-left, .progress-circle-right {
    width: 100%;
    height: 100%;
    position: absolute;
    top: 0;
    left: 0;
    border-radius: 50%;
    clip: rect(0px, 75px, 150px, 0px);
}

.progress-circle-bar {
    width: 100%;
    height: 100%;
    position: absolute;
    border-width: 8px;
    border-style: solid;
    border-color: transparent;
    border-radius: 50%;
    clip: rect(0px, 75px, 150px, 0px);
    transform: rotate(0deg);
    transition: transform 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
    box-shadow: 0 0 5px rgba(0, 0, 0, 0.15);
}

.progress-circle-left .progress-circle-bar {
    clip: rect(0px, 75px, 150px, 0px);
}

.progress-circle-right .progress-circle-bar {
    clip: rect(0px, 150px, 150px, 75px);
}

.progress-circle-value {
    position: absolute;
    top: 0;
    left: 0;
    background-color: white;
    font-family: sans-serif;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.04);
    border: 1px solid rgba(0, 0, 0, 0.03);
}
