/* Variables globales */
:root {
    /*--primary-color: #4C51BF;*/
    --primary-color: #1d5985;
    --primary-light: #DDD6FE;
    --secondary-color: #0EA5E9;
    --success-color: #84ac6e;
    --warning-color: #F59E0B;
    --danger-color: #EF4444;
    --info-color: #4299E1;

    /*boutton*/
    --btn-view-color : #8fba8a;
    --btn-edit-color : #6eb2df;
    --btn-trash-color : #d25a47;

    /* Nouvelle couleur personnalisée */
    --custom-primary: #24689f;
    /* Une teinte plus claire pour le survol (ajustez si besoin) */
    --custom-primary-light: #43729e;
    --custom-secondary-light: #619ca5;

    /* Texte */
    --text-primary: #1F2937;
    --text-secondary: #6B7280;
    --text-muted: #9CA3AF;

    /* Arrière-plans */
    --bg-primary: #F9FAFB;
    --bg-secondary: #dedcdc3b;
    --bg-card: rgb(255, 255, 255);
    /* --bg-secondary: #F3F4F6; */
    /* --bg-secondary: #ebe4e452; */
    --bg-tertiary: #E5E7EB;
    --bg-datatble-header : #4d7391;
    --bg-filter: #ECEFF1;

    /* Layout */
    --sidebar-width: 260px;
    --sidebar-width-collapsed: 80px;
    --topbar-height: 70px;
    --border-radius: 0.5rem;
    --transition-speed: 0.3s;

    /* Ombres */
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
}

/* Reset et base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", "Liberation Sans", sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";
    background-color: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.5;
}

/* Layout principal */
.main-container {
    display: flex;
    min-height: 100vh;
}

.content-wrapper {
    flex: 1;
    margin-left: var(--sidebar-width);
    transition: margin-left var(--transition-speed);
}

/* Typographie */
h1, h2, h3, h4, h5, h6 {
    color: var(--text-primary);
    font-weight: 600;
    line-height: 1.2;
}

h1 { font-size: 1.75rem; }
h2 { font-size: 1.50rem; }
h3 { font-size: 1.25rem; }
h4 { font-size: 1rem; }
h5 { font-size: 1.875rem; }
h6 { font-size: 0.75rem; }

/* Liens */
a {
    color: var(--primary-color);
    text-decoration: none;
    transition: color var(--transition-speed);
}

a:hover {
    color: #6D28D9;
}

.my-divider {
    border: none;
    border-top: 1px solid #0EA5E9; /* couleur du trait */
    margin: 2rem 0; /* espace au-dessus et en-dessous */
}

/* Utilitaires */
.text-primary { color: var(--text-primary); }
.text-secondary { color: var(--text-secondary); }
.text-muted { color: var(--text-muted); }

.bg-primary { background-color: var(--primary-color); }
.bg-secondary { background-color: var(--secondary-color); }
.bg-success { background-color: var(--success-color); }
.bg-warning { background-color: var(--warning-color); }
.bg-danger { background-color: var(--danger-color); }
.bg-info { background-color: var(--info-color); }

.font-bold { font-weight: 700; }
.font-semibold { font-weight: 600; }
.font-medium { font-weight: 500; }

.text-sm { font-size: 0.675rem; }
.text-base { font-size: 0.8rem; }
.text-lg { font-size: 0.875rem; }
.text-xl { font-size: 1rem; }

/* Animations */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideInRight {
    from { transform: translateX(-100%); }
    to { transform: translateX(0); }
}

@keyframes slideInUp {
    from { transform: translateY(20px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

/* Responsive Design */
@media (max-width: 1024px) {
    :root {
        --sidebar-width: var(--sidebar-width-collapsed);
    }

    .content-wrapper {
        margin-left: var(--sidebar-width-collapsed);
    }
}

@media (max-width: 768px) {
    .content-wrapper {
        margin-left: 0;
    }

    .main-container {
        flex-direction: column;
    }
}

/* Scrollbar personnalisée */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: var(--bg-secondary);
}

::-webkit-scrollbar-thumb {
    background: var(--text-muted);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--text-secondary);
}

/* Focus Styles */
:focus {
    outline: none;
    box-shadow: 0 0 0 3px var(--primary-light);
}

/* Sélection de texte */
::selection {
    background-color: var(--primary-light);
    color: var(--primary-color);
}

/* Accessibilité */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* Conteneurs */
.container {
    width: 100%;
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 1rem;
}

/* Admin Dashboard Styles */
.dashboard-container {
    margin-left: var(--sidebar-width);
    padding: calc(var(--topbar-height) + 2rem) 2rem 2rem;
    min-height: 100vh;
    background-color: var(--bg-primary);
}

/* Dashboard Header */
.dashboard-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.3rem;
    flex-wrap: wrap;
}

.dashboard-title {
    font-size: 1.3rem;
    font-weight: 600;
    color: var(--text-primary);
}

.quick-actions {
    display: flex;
    gap: 1rem;
}


/* Table des données */
.content-card {
    background: white;
    border-radius: 0.5rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    margin-bottom: 1.5rem;
}

.table-responsive {
    overflow-x: auto;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
}

.data-table th,
.data-table td {
    padding: 1rem;
    text-align: left;
    border-bottom: 1px solid var(--bg-secondary);
}

.data-table th {
    background: var(--bg-secondary);
    font-weight: 600;
    color: var(--text-primary);
}

.data-table tbody tr:hover {
    background: var(--bg-secondary);
}

/* Liste des courses, homeworks ...*/
.pagination {
    margin-top: 0.5rem;
}
.pagination .page-item .page-link {
    padding: 0.25rem 0.75rem;
}

.pagination .page-item.active .page-link {
    background: var(--primary-color);
    color: #fff; /* si besoin, pour que le texte reste lisible */
}


/* Grille */
.grid {
    display: grid;
    gap: 1.5rem;
}

.grid-cols-2 { grid-template-columns: repeat(2, 1fr); }
.grid-cols-3 { grid-template-columns: repeat(3, 1fr); }
.grid-cols-4 { grid-template-columns: repeat(4, 1fr); }

@media (max-width: 1024px) {
    .grid-cols-4 { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 768px) {
    .content-wrapper {
        margin-left: 0;
    }

    .dashboard-container {
        margin-left: 0;
    }

    .main-container {
        flex-direction: column;
    }
}

@media (max-width: 640px) {
    .grid-cols-2, .grid-cols-3, .grid-cols-4 { grid-template-columns: 1fr; }

    .content-wrapper {
        margin-left: 0;
    }

    .dashboard-container {
        margin-left: 0;
    }
}



