#10b981/* Fichier: eduplatform/css/style.css - Version Nettoyée Anos-Formations */
a {
    text-decoration: none;
}
/* --- 0. RESET ET BASE --- */
html {
    height: 100%;
}

body {
    font-family: Arial, sans-serif;
    line-height: 1.6;
    margin: 0;
    padding: 0;
    color: #000;
    background-color: #8B5FD2;
    min-height: 100vh;
}

/* --- 1. AUTHENTIFICATION (Login/Register) --- */
.auth-body {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
}

.auth-card {
    background-color: white;
    padding: 40px;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1), 0 0 0 1px rgba(0, 0, 0, 0.05);
    width: 100%;
    max-width: 400px;
    text-align: center;
    margin: 20px;
}

.auth-card .auth-logo {
    max-width: 150px;
    height: auto;
    display: block;
    margin: 0 auto 20px auto;
}

/* --- 2. STRUCTURE APPLICATION --- */
.app-body {
    display: block;
}

.app-main-container {
    display: flex;
    min-height: calc(100vh - 60px);
    margin: 0 auto;
    max-width: 1400px;
}

/* --- 3. HEADER --- */
header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 30px;
    background-color: #000;
    color: white;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.logo-container {
    display: flex;
    align-items: center;
}

.site-logo {
    height: 40px;
    width: auto;
    margin-right: 15px;
    cursor: pointer;
}

header h1 {
    font-size: 1.8em;
    margin: 0;
}

nav {
    margin-top: 0;
}

nav a {
    color: white;
    text-decoration: none;
    margin-left: 15px;
    font-weight: bold;
    padding: 8px 12px;
    border-radius: 6px;
    transition: background-color 0.3s;
}

nav a:hover {
    background-color: rgba(255, 255, 255, 0.1);
}

/* --- 4. SIDEBAR --- */
.sidebar-menu {
    width: 250px;
    background-color: white;
    padding: 20px 0;
    box-shadow: 2px 0 10px rgba(0, 0, 0, 0.05);
    flex-shrink: 0;
    position: relative;
}

.sidebar-menu nav {
    width: 100%;
}

.menu-group-title {
    font-size: 0.8em;
    font-weight: bold;
    color: #999;
    padding: 15px 20px 5px 20px;
    margin: 0;
    text-transform: uppercase;
}

.menu-item {
    display: flex;
    align-items: center;
    text-decoration: none;
    color: #333;
    padding: 12px 20px;
    font-size: 1em;
    font-weight: 500;
    transition: background-color 0.2s, color 0.2s;
}

.menu-item .icon {
    margin-right: 15px;
    font-size: 1.2em;
    line-height: 0;
}

.menu-item:hover {
    background-color: #f5f5f5;
    color: #5c62e5;
}

.menu-item.active {
    background-color: #e6f7ff;
    color: #007bff;
    border-right: 3px solid #007bff;
    font-weight: bold;
}

.menu-item.sub-item {
    padding-left: 55px;
    font-size: 0.95em;
    font-weight: normal;
}

.menu-item.active-link {
    background-color: #e6f7ff;
    color: #007bff;
    border-right: 3px solid #007bff;
    font-weight: bold;
}

.menu-item.logout {
    color: #e53e3e;
    margin-top: 10px;
}
/* ===== CORRECTION SIDEBAR ESPACEMENT ===== */

/* 1. La sidebar doit utiliser flexbox */
.sidebar {
    display: flex !important;
    flex-direction: column !important;
    min-height: 100vh !important;
}

/* 2. Le menu prend tout l'espace disponible */
.sidebar nav,
.sidebar > ul {
    flex: 1 !important;
}

/* 3. Le profil utilisateur est poussé en bas */
.sidebar .user-profile,
.sidebar .profile-section,
.sidebar > div:last-child {
    
    padding-top: 30px !important;
    border-top: 2px solid rgba(255, 255, 255, 0.2) !important;
}

/* 4. Espacement des liens */
.sidebar nav a,
.sidebar ul a {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 15px !important;
    margin: 5px 0 !important;
    border-radius: 8px;
}

.sidebar nav a:hover,
.sidebar ul a:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: translateX(5px);
}/* Profil sidebar */
.sidebar-profile {
    position: absolute;
    bottom: 0;
    width: 250px;
    padding: 20px;
    background-color: #f9f9f9;
    border-top: 1px solid #eee;
    box-sizing: border-box;
}

.sidebar-profile .user-info {
    display: flex;
    align-items: center;
    margin-bottom: 10px;
}

.sidebar-profile .avatar {
    width: 45px;
    height: 45px;
    background-color: #5c62e5;
    color: white;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    font-weight: bold;
    font-size: 1em;
    margin-right: 15px;
}

.sidebar-profile .details p {
    margin: 0;
    line-height: 1.2;
    font-size: 0.9em;
}

.sidebar-profile .details .name {
    font-weight: bold;
    color: #333;
}

.sidebar-profile .details .role-points {
    color: #999;
}

/* --- 5. CONTENU PRINCIPAL --- */
.main-content {
    flex-grow: 1;
    padding: 30px;
    background-color: #f9f9f9;
    min-height: calc(100vh - 60px);
}

.main-card {
    background-color: white;
    padding: 40px;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1), 0 0 0 1px rgba(0, 0, 0, 0.05);
    width: 90%;
    text-align: center;
    margin: 20px auto;
}

/* --- 6. FORMULAIRES --- */
label {
    display: block;
    text-align: left;
    margin-bottom: 5px;
    margin-top: 15px;
    font-weight: 600;
    color: #555;
    font-size: 0.9em;
}

input[type="text"],
input[type="email"],
input[type="password"],
input[type="tel"],
input[type="date"],
input[type="color"],
textarea,
select {
    width: 100%;
    padding: 12px;
    background-color: #ffffff;
    border: 1px solid #c0c0c0;
    border-radius: 8px;
    box-sizing: border-box;
    font-size: 1em;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.15);
    transition: border-color 0.3s, box-shadow 0.3s;
}

input:focus,
textarea:focus,
select:focus {
    border-color: #aa00ff;
    outline: none;
    box-shadow: 0 0 0 2px rgba(170, 0, 255, 0.1), inset 0 2px 4px rgba(0, 0, 0, 0.15);
}

.form-row {
    display: flex;
    gap: 20px;
    margin-bottom: 10px;
}

.form-row > div {
    flex: 1;
    min-width: 0;
}

fieldset {
    border: 1px solid #ddd;
    padding: 20px;
    margin-bottom: 25px;
    border-radius: 10px;
}

legend {
    font-weight: bold;
    font-size: 1.2em;
    color: #5c62e5;
    padding: 0 10px;
    margin-left: -10px;
}

/* --- 7. BOUTONS --- */
button[type="submit"],
.primary-action-btn {
    width: 80%;
    padding: 15px;
    margin-top: 30px;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    font-size: 1.1em;
    font-weight: bold;
    color: white;
    background: linear-gradient(90deg, #5c62e5 0%, #a854e4 100%);
    box-shadow: 0 5px 15px rgba(100, 50, 200, 0.4);
    transition: transform 0.2s, box-shadow 0.2s;
}

button[type="submit"]:hover,
.primary-action-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 7px 18px rgba(100, 50, 200, 0.5);
}

.view-button {
    display: block;
    width: 100%;
    padding: 12px 20px;
    border-radius: 10px;
    text-align: center;
    text-decoration: none;
    font-weight: bold;
    font-size: 1em;
    background: linear-gradient(90deg, #a854e4 0%, #7F00FF 100%);
    color: white;
    border: none;
    box-shadow: 0 4px 10px rgba(168, 84, 228, 0.4);
    transition: all 0.3s ease;
    margin: 0;
}

.view-button:hover {
    opacity: 0.9;
    transform: translateY(-2px);
}

.action-btn {
    padding: 10px 16px;
    text-align: center;
    color: white;
    text-decoration: none;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.9em;
    transition: all 0.2s ease;
    border: none;
    cursor: pointer;
    background-color: #EA0B0B;
}

.action-btn:hover {
    opacity: 0.9;
    transform: translateY(-2px);
}
.btn-enrolled {
    background: linear-gradient(90deg, #10b981 0%, #52c752 100%) !important;
    color: white !important;
    padding: 15px;
    text-align: center;
    border-radius: 10px;
    font-weight: bold;
    display: block;
    margin-top: 20px;
    cursor: default;
    box-shadow: 0 2px 8px rgba(68, 174, 68, 0.3);
}
/*.edit-btn {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
.manage-courses-btn {
    background: linear-gradient(135deg, #5c62e5 0%, #a854e4 100%);
}

.delete-btn {
    background: linear-gradient(135deg, #dc3545 0%, #c82333 100%);
}*/


/* Actions rapides dashboard */
.quick-actions-grid {
    display: flex;
    gap: 15px;
    margin-top: 20px;
    margin-bottom: 40px;
}

.action-btn-quick {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-grow: 1;
    padding: 15px 20px;
    border-radius: 12px;
    text-decoration: none;
    font-weight: bold;
    font-size: 1em;
    color: white;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    transition: transform 0.2s, box-shadow 0.2s, opacity 0.2s;
}

.action-btn-quick:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.15);
    opacity: 0.95;
}

.action-btn-quick .action-icon {
    font-size: 1.3em;
    margin-right: 10px;
    line-height: 1;
}

.action-btn-quick.primary-action {
    background-color: #007bff;
}

.action-btn-quick.secondary-action {
    background-color: #00b894;
}

.action-btn-quick.tertiary-action {
    background-color: #ff9f43;
}

/* --- 8. MESSAGES --- */
.message-error {
    color: #e53e3e;
    background-color: #fee2e2;
    border: 1px solid #fc8181;
    padding: 10px;
    border-radius: 8px;
    margin-bottom: 15px;
    font-weight: 500;
}

.message-success {
    background-color: #e6ffed;
    color: #00b894;
    border: 1px solid #00b894;
    padding: 12px;
    border-radius: 8px;
    margin-bottom: 20px;
    text-align: center;
    font-weight: bold;
}

.message-info {
    background-color: #f0f8ff;
    color: #4682b4;
    border: 1px solid #4682b4;
    padding: 15px;
    border-radius: 8px;
}

/* --- 9. GRILLES ET CARTES --- */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin-bottom: 40px;
}

.stat-card {
   /* display: flex;*/
    flex-direction: column;
    align-items: flex-start;
    padding: 25px;
    background-color: white;
    border-radius: 15px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
    text-decoration: none;
    color: #333;
    transition: transform 0.2s, box-shadow 0.2s;
    border-left: 5px solid transparent;
}

.stat-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
}

.stat-icon {
    font-size: 1.8em;
    margin-bottom: 10px;
    line-height: 1;
}

.stat-value {
    font-size: 2.5em;
    font-weight: bold;
    margin-bottom: 5px;
}

.stat-label {
    font-size: 0.9em;
    color: #777;
    text-transform: uppercase;
    font-weight: 500;
}

.stat-card.formation-stat {
    border-left-color: #007bff;
}

.stat-card.course-stat {
    border-left-color: #00b894;
}

.stat-card.user-stat {
    border-left-color: #ff9f43;
}

/* Grille des formations */
.teacher-formations-grid,
.catalogue-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 30px;
    padding-top: 20px;
}

/* CARTES DE FORMATION - AVEC IMAGE ET OVERLAY */
.formation-block-card,
.catalogue-card {
    position: relative;
    overflow: hidden;
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
    padding: 0;
    min-height: 420px;
}

.formation-block-card:hover,
.catalogue-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.15);
}

.formation-block-card:hover .formation-image {
    filter: brightness(0.6);
}

/* Badge catégorie sur l'image */
.category-tag {
    position: absolute;
    top: 15px;
    left: 15px;
    z-index: 10;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 0.75em;
    font-weight: 600;
    color: white;
    text-transform: uppercase;
    backdrop-filter: blur(5px);
    text-shadow: 0 1px 2px rgba(0,0,0,0.3);
}

/* Image de formation */
.formation-image {
    width: 100%;
    height: 220px;
    object-fit: cover;
    border-radius: 12px 12px 0 0;
    transition: filter 0.3s ease;
    display: block;
}

/* Contenu de la carte sous l'image */
.formation-content {
    padding: 20px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.formation-content h4,
.catalogue-card h3 {
    font-size: 1.3em;
    margin: 0 0 15px 0;
    color: #2c3e50;
    line-height: 1.3;
}

.formation-content p,
.catalogue-card > div > p {
    color: #666;
    font-size: 0.95em;
    margin: 10px 0;
    line-height: 1.5;
}

/* Métadonnées de la formation */
.formation-meta {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px;
    background-color: #f8f9fa;
    border-radius: 8px;
    margin-bottom: 15px;
    font-size: 0.9em;
}

.formation-meta strong {
    color: #5c62e5;
}

.formation-meta-info {
    font-size: 0.85em;
    color: #666;
    margin-top: 10px;
    border-top: 1px solid #eee;
    padding-top: 10px;
}

.formation-meta-info p {
    margin: 5px 0;
    display: flex;
    align-items: center;
    gap: 5px;
}

/* OVERLAY DES BOUTONS (pour manage_formations et dashboard) */
.action-buttons-overlay {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: calc(100% - 40px);
    display: block;
    grid-template-columns: 1fr 1fr;
    grid-template-rows: auto auto;
    gap: 10px;
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
    z-index: 5;
}

.formation-block-card:hover .action-buttons-overlay {
    opacity: 1;
    pointer-events: auto;
}

.action-buttons-overlay .action-btn {
    padding: 12px 20px;
    text-align: center;
    color: white;
    text-decoration: none;
    border-radius: 25px;
    font-weight: 600;
    font-size: 0.9em;
    transition: all 0.2s ease;
    border: none;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    white-space: nowrap;
    background-color: #EA0B0B;
       }

.action-buttons-overlay .action-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.4);
}

/* Bouton Voir - prend toute la largeur en haut */
.action-buttons-overlay .action-btn:nth-child(1) {
    grid-column: 1 / -1;
    background: linear-gradient(135deg, #5c62e5 0%, #a854e4 100%);
}

.action-buttons-overlay .action-btn:nth-child(1):hover {
    background: linear-gradient(135deg, #4a50d3 0%, #9642d2 100%);
}

/* Bouton Modifier - en bas à gauche */

.action-buttons-overlay .action-btn:nth-child(2) {
    grid-column: 1;
    grid-row: 2;
    background-color: #10b981;
}
.action-buttons-overlay .action-btn:nth-child(2):hover {
    background-color: #10b981;
}

/* Bouton Gérer - en bas à droite */
.action-buttons-overlay .action-btn:nth-child() {
    grid-column: 2;
    grid-row: 2;
    background-color: #EA0B0B;
}

.action-buttons-overlay .action-btn:nth-child():hover {
    background-color: #EA0B0B
}
/* Bouton Supprimer - en bas à droite */
.action-buttons-overlay .action-btn:nth-child(3) {
    grid-column: 2;
    grid-row: 2;
    background-color: #EA0B0B;
}

.action-buttons-overlay .action-btn:nth-child(3):hover {
    background-color: #EA0B0B
}


/* Prix */
.price-display {
    font-size: 1.8em;
    font-weight: 700;
    color: #28a745;
    margin-bottom: 15px;
    text-align: center;
}

/* --- 10. TABLEAUX --- */
.data-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
    background-color: white;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.05);
    border-radius: 8px;
    overflow: hidden;
}

.data-table th,
.data-table td {
    padding: 12px 15px;
    text-align: left;
    border-bottom: 1px solid #ddd;
}

.data-table th {
    background-color: #f5f5f5;
    font-weight: bold;
    color: #333;
    text-transform: uppercase;
    font-size: 0.9em;
}

.data-table tbody tr:hover {
    background-color: #f9f9f9;
}

.actions-cell {
    white-space: nowrap;
    text-align: right;
}

.status-badge {
    display: inline-block;
    padding: 5px 10px;
    border-radius: 20px;
    font-size: 0.85em;
    font-weight: bold;
    color: white;
    text-align: center;
}

.status-badge.teacher {
    background-color: #5c62e5;
}

.status-badge.student {
    background-color: #00b894;
}

.status-badge.completed {
    background-color: #4CAF50;
}

.status-badge.pending {
    background-color: #ff9f43;
}

/* --- 11. LIENS --- */
.alt-link {
    display: block;
    margin-top: 20px;
    font-size: 0.9em;
}

.alt-link a,
.auth-card p a {
    color: #aa00ff;
    text-decoration: none;
    font-weight: 600;
}

.back-link {
    display: inline-block;
    margin: 20px;
    color: #3f51b5;
    text-decoration: none;
    font-weight: bold;
}

.back-link:hover {
    text-decoration: underline;
}

/* --- 12. FOOTER --- */
footer {
    width: 100%;
    color: #333;
    padding: 20px 0;
    text-align: center;
    font-size: 0.9em;
    background-color: white;
    box-shadow: 0 -2px 5px rgba(0, 0, 0, 0.1);
    margin-top: 40px;
}

footer p {
    margin: 0;
}

/* --- 13. ANIMATIONS --- */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.catalogue-card {
    animation: fadeInUp 0.5s ease-out;
}

.catalogue-card:nth-child(1) { animation-delay: 0.1s; }
.catalogue-card:nth-child(2) { animation-delay: 0.2s; }
.catalogue-card:nth-child(3) { animation-delay: 0.3s; }
.catalogue-card:nth-child(4) { animation-delay: 0.4s; }
.catalogue-card:nth-child(5) { animation-delay: 0.5s; }
.catalogue-card:nth-child(6) { animation-delay: 0.6s; }

/* --- 14. RECHERCHE ET FILTRES --- */
.search-filter-container {
    background: white;
    padding: 25px;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    margin-bottom: 30px;
    transition: box-shadow 0.3s ease;
}

.search-filter-container:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.search-filter-container input[type="text"] {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 1em;
    transition: border-color 0.3s ease;
}

.search-filter-container input[type="text"]:focus {
    outline: none;
    border-color: #007bff;
    box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.1);
}

.search-filter-container button[type="submit"] {
    padding: 12px 30px;
    background-color: #007bff;
    color: white;
    border: none;
    border-radius: 8px;
    font-weight: bold;
    cursor: pointer;
    white-space: nowrap;
    transition: background-color 0.3s ease, transform 0.1s ease;
}

.search-filter-container button[type="submit"]:hover {
    background-color: #0056b3;
    transform: translateY(-1px);
}

.search-filter-container select {
    width: 100%;
    padding: 10px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    background-color: white;
    cursor: pointer;
    transition: border-color 0.3s ease;
}

.search-filter-container select:focus {
    outline: none;
    border-color: #007bff;
    box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.1);
}

.search-filter-container label {
    display: block;
    margin-bottom: 5px;
    font-weight: bold;
    color: #555;
    font-size: 0.9em;
}

.filter-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    margin-bottom: 15px;
}

/* --- 15. NOTIFICATION MESSAGES NON LUS --- */
.unread-badge {
    display: inline-block;
    min-width: 20px;
    padding: 2px 6px;
    margin-left: 10px;
    background-color: #e74c3c;
    color: white;
    border-radius: 10px;
    font-size: 0.85em;
    font-weight: bold;
    text-align: center;
    line-height: 1.2;
    vertical-align: top;
}

/* --- 16. RESPONSIVE --- */
@media (max-width: 768px) {
    .app-main-container {
        flex-direction: column;
    }

    .sidebar-menu {
        width: 100%;
        position: relative;
    }

    .sidebar-profile {
        position: relative;
        width: 100%;
    }

    .stats-grid {
        grid-template-columns: 1fr;
    }

    .teacher-formations-grid,
    .catalogue-grid {
        grid-template-columns: 1fr;
    }

    .search-filter-container {
        padding: 15px;
    }

    .quick-actions-grid {
        flex-direction: column;
    }
}
* Amélioration du scroll de la sidebar */
.sidebar-menu nav::-webkit-scrollbar {
    width: 6px;
}

.sidebar-menu nav::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 3px;
}

.sidebar-menu nav::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 3px;
}

.sidebar-menu nav::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.3);
}

/* Assurer que le profil reste visible */
.sidebar-profile {
    flex-shrink: 0;
}
