
.main-nav {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    /* position: fixed; */
    /* top: 0; */
    width: 100%;
    z-index: 1000;
}

.main-nav-epreuve{
    background: linear-gradient(135deg, #eac566 0%, #a28f4b 100%);
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    /* position: fixed; */
    /* top: 0; */
    width: 100%;
    z-index: 1000;
}

.main-nav-corrige {
    background: linear-gradient(135deg, #127227 0%, #4ba255 100%);
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    /* position: fixed; */
    /* top: 0; */
    width: 100%;
    z-index: 1000;
}
.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 20px;
    height: 70px;
}

.logo h1 {
    color: white;
    font-size: 1.8rem;
    font-weight: 700;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 30px;
}

.nav-link {
    color: white;
    text-decoration: none;
    font-weight: 500;
    padding: 10px 20px;
    border-radius: 25px;
    transition: all 0.3s ease;
}

.nav-link:hover,
.nav-link.active {
    background: rgba(255,255,255,0.2);
    backdrop-filter: blur(10px);
}

/* Pages */
.page {
    /* display: none; */
    padding-top: 90px;
    min-height: 100vh;
}

.page.active {
    display: block;
}

/* Hero Section */
.hero {
    text-align: center;
    padding: 80px 0;
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    border-radius: 20px;
    margin: 20px 0;
}

.hero h2 {
    font-size: 3rem;
    margin-bottom: 20px;
    color: #2c3e50;
}

.hero p {
    font-size: 1.2rem;
    color: #7f8c8d;
    margin-bottom: 40px;
}

.hero-buttons {
    display: flex;
    gap: 20px;
    justify-content: center;
    flex-wrap: wrap;
}

/* Boutons */
.btn {
    padding: 12px 30px;
    border: none;
    border-radius: 25px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-block;
}

.btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.4);
}

.btn-secondary {
    background: #ecf0f1;
    color: #2c3e50;
}

.btn-secondary:hover {
    background: #d5dbdb;
    transform: translateY(-2px);
}

.btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none !important;
}

/* En-têtes de page */
.page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    padding: 20px 0;
}

.page-header h2 {
    font-size: 2.5rem;
    color: #2c3e50;
}

/* Toggle de vue */
.view-toggle {
    display: flex;
    background: white;
    border-radius: 25px;
    padding: 5px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.toggle-btn {
    padding: 10px 20px;
    border: none;
    background: transparent;
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 500;
}

.toggle-btn.active {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

/* Vues de contenu */
.content-view {
    display: none;
}

.content-view.active {
    display: block;
}

/* Styles des cours - Vue liste */
.course-item {
    background: white;
    border-radius: 15px;
    padding: 25px;
    margin-bottom: 20px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.08);
    display: flex;
    align-items: center;
    gap: 25px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.course-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0,0,0,0.15);
}

.course-image {
    flex-shrink: 0;
}

.placeholder-image {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.5rem;
    font-weight: bold;
}

.course-info {
    flex: 1;
}

.course-info h3 {
    font-size: 1.5rem;
    margin-bottom: 10px;
    color: #2c3e50;
}

.course-description  *{
    white-space:normal ;
}

    .course-description {
    color: #7f8c8d;
    margin-bottom: 15px;
}

.course-meta {
    display: flex;
    gap: 20px;
    margin-bottom: 15px;
    flex-wrap: wrap;
}

.course-meta span {
    background: #ecf0f1;
    padding: 5px 12px;
    border-radius: 15px;
    font-size: 0.9rem;
    color: #2c3e50;
}

.course-progress {
    display: flex;
    align-items: center;
    gap: 15px;
}

.progress-bar {
    flex: 1;
    height: 8px;
    background: #ecf0f1;
    border-radius: 4px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 4px;
    transition: width 0.3s ease;
}

.progress-text {
    font-size: 0.9rem;
    color: #7f8c8d;
    white-space: nowrap;
}

.course-actions {
    flex-shrink: 0;
}

/* Vue grille */
.grid-view {
    display: none;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 25px;
}

.grid-view.active {
    display: grid;
}

.course-card, .exam-card {
    background: white;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 5px 20px rgba(0,0,0,0.08);
    cursor: pointer;
    transition: all 0.3s ease;
}

.course-card:hover, .exam-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0,0,0,0.15);
}

.card-image {
    height: 150px;
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
}

.card-image .placeholder-image {
    width: 60px;
    height: 60px;
    font-size: 1.2rem;
}

.card-content {
    padding: 20px;
}

.card-content h3 {
    font-size: 1.3rem;
    margin-bottom: 10px;
    color: #2c3e50;
}

.card-content p {
    color: #7f8c8d;
    margin-bottom: 15px;
}

.card-meta {
    display: flex;
    gap: 10px;
    margin-bottom: 15px;
}

.card-meta span {
    background: #ecf0f1;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 0.8rem;
    color: #2c3e50;
}

/* Styles des épreuves */
.exam-item {
    background: white;
    border-radius: 15px;
    padding: 25px;
    margin-bottom: 20px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.08);
    display: flex;
    align-items: center;
    gap: 25px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.exam-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0,0,0,0.15);
}

.exam-icon {
    flex-shrink: 0;
}

.icon-placeholder {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, #ff9a9e 0%, #fecfef 100%);
    border-radius: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
}

.exam-info {
    flex: 1;
}

.exam-info h3 {
    font-size: 1.5rem;
    margin-bottom: 10px;
    color: #2c3e50;
}

.exam-description {
    color: #7f8c8d;
    margin-bottom: 15px;
}

.exam-meta {
    display: flex;
    gap: 20px;
    margin-bottom: 15px;
    flex-wrap: wrap;
}

.exam-meta span {
    background: #ecf0f1;
    padding: 5px 12px;
    border-radius: 15px;
    font-size: 0.9rem;
    color: #2c3e50;
}

.exam-stats {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
}

.exam-stats span {
    font-size: 0.9rem;
    color: #7f8c8d;
}

.exam-actions {
    flex-shrink: 0;
}

/* Cartes d'épreuves */
.card-header {
    padding: 20px 20px 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.card-header .exam-icon {
    font-size: 2rem;
}

.difficulty-badge {
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 0.8rem;
    font-weight: 600;
}

.difficulty-badge.beginner {
    background: #d4edda;
    color: #155724;
}

.difficulty-badge.intermediate {
    background: #fff3cd;
    color: #856404;
}

.difficulty-badge.advanced {
    background: #f8d7da;
    color: #721c24;
}

.score-display {
    text-align: center;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 10px;
}

.score {
    display: block;
    font-size: 1.5rem;
    font-weight: bold;
    color: #667eea;
}

.score-label {
    font-size: 0.8rem;
    color: #7f8c8d;
}

.exam-card.locked {
    opacity: 0.7;
}

.exam-card.locked .score {
    color: #7f8c8d;
}

/* Modales */
.modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.5);
    backdrop-filter: blur(5px);
}

.modal-content {
    background-color: white;
    margin: 5% auto;
    padding: 0;
    border-radius: 15px;
    width: 90%;
    max-width: 800px;
    max-height: 80vh;
    overflow-y: auto;
    position: relative;
    animation: modalSlideIn 0.3s ease;
}

@keyframes modalSlideIn {
    from {
        transform: translateY(-50px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.close {
    position: absolute;
    right: 20px;
    top: 20px;
    font-size: 2rem;
    font-weight: bold;
    cursor: pointer;
    color: #7f8c8d;
    z-index: 10;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: #f8f9fa;
    transition: all 0.3s ease;
}

.close:hover {
    background: #e9ecef;
    color: #2c3e50;
}

.detail-header {
    padding: 40px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    text-align: center;
}

.detail-header h2 {
    font-size: 2.5rem;
    margin-bottom: 15px;
}

.detail-header p {
    font-size: 1.1rem;
    opacity: 0.9;
}

.detail-content {
    padding: 40px;
}

.detail-section {
    margin-bottom: 30px;
}

.detail-section h3 {
    font-size: 1.5rem;
    margin-bottom: 15px;
    color: #2c3e50;
}

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

.detail-item {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 10px;
    text-align: center;
}

.detail-item .label {
    font-size: 0.9rem;
    color: #7f8c8d;
    margin-bottom: 5px;
}

.detail-item .value {
    font-size: 1.2rem;
    font-weight: bold;
    color: #2c3e50;
}

.chapter-list {
    list-style: none;
}

.chapter-item {
    background: #f8f9fa;
    padding: 15px 20px;
    margin-bottom: 10px;
    border-radius: 10px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.chapter-item .chapter-title {
    font-weight: 500;
    color: #2c3e50;
}

.chapter-item .chapter-duration {
    color: #7f8c8d;
    font-size: 0.9rem;
}

.question-preview {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 10px;
    margin-bottom: 15px;
}

.question-preview h4 {
    color: #2c3e50;
    margin-bottom: 10px;
}

.question-preview p {
    color: #7f8c8d;
}

/* Responsive Design */
@media (max-width: 768px) {
    .nav-container {
        flex-direction: column;
        height: auto;
        padding: 15px 20px;
    }

    .nav-menu {
        margin-top: 15px;
        gap: 15px;
    }

    .page {
        padding-top: 120px;
    }

    .hero h2 {
        font-size: 2rem;
    }

    .hero-buttons {
        flex-direction: column;
        align-items: center;
    }

    .page-header {
        flex-direction: column;
        gap: 20px;
        text-align: center;
    }

    .course-item, .exam-item {
        flex-direction: column;
        text-align: center;
    }

    .course-meta, .exam-meta, .exam-stats {
        justify-content: center;
    }

    .course-progress {
        flex-direction: column;
        gap: 10px;
    }

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

    .modal-content {
        width: 95%;
        margin: 10% auto;
    }

    .detail-header {
        padding: 30px 20px;
    }

    .detail-content {
        padding: 30px 20px;
    }

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

@media (max-width: 480px) {
    .container {
        padding: 0 15px;
    }

    .hero {
        padding: 40px 20px;
    }

    .hero h2 {
        font-size: 1.8rem;
    }

    .course-item, .exam-item {
        padding: 20px;
    }

    .placeholder-image, .icon-placeholder {
        width: 60px;
        height: 60px;
        font-size: 1.2rem;
    }
}