@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700&family=Inter:wght@300;400;500;600&display=swap');

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Poppins', 'Inter', sans-serif;
    background: #f8fafc;
    min-height: 100vh;
    color: #2d3748;
    overflow-x: hidden;
}

.background-pattern {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at 20% 80%, rgba(120, 119, 198, 0.08) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(255, 119, 198, 0.08) 0%, transparent 50%);
    z-index: -1;
}

.wrapper__container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 1.5rem;
}

#results__container {
    background: white !important;
    box-shadow: none !important;
    border: 0 !important;
    padding: 20px 50px !important
}

/* Header Section */
#results__container .header {
    text-align: center;
}

#results__container .header h1 {
    font-size: 30px;
    font-weight: 700;
    color: #1e293b;
    font-family: 'Poppins', sans-serif;
    margin-bottom: 0.5rem;
    text-transform: uppercase;
    margin-top: 30px;
}

#results__container .header p {
    color: #64748b;
    font-size: 1.1rem;
    font-weight: 400;
}

.score-content {
    position: relative;
    z-index: 1;
    margin-bottom: 50px;
}

.main-score {
    font-size: 4.5rem;
    font-weight: 700;
    background-clip: text;
    -webkit-background-clip: text;
    margin-bottom: 0.5rem;
    font-family: 'Poppins', sans-serif;
    color: #2563EB;
}

@keyframes scoreGlow {
    from {
        filter: drop-shadow(0 0 5px rgba(59, 130, 246, 0.3));
    }

    to {
        filter: drop-shadow(0 0 15px rgba(59, 130, 246, 0.6));
    }
}

.btn-show-correction {
    margin-top: 5px;
    background: #2980b9 !important;
}

.btn-show-correction:hover {
    background: #3498db;
}

.score-subtitle {
    font-size: 1rem;
    color: #64748b;
    margin-bottom: 1.5rem;
    font-weight: 500;
}

.btn-hide-correction {
    background: #e74c3c !important;
    border: 0 !important;
    margin-top: 5px !important;
}

.btn-hide-correction:hover {
    background: #c0392b;
    border: 0 !important;
}

.level-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: #EFF6FF;
    /* background: linear-gradient(135deg, rgba(59, 130, 246, 0.15) 0%, rgba(139, 92, 246, 0.15) 100%); */
    padding: 0.6rem 1.5rem;
    border-radius: 50px;
    font-size: 0.9rem;
    font-weight: 600;
    color: #3b82f6;
    /* border: 2px solid rgba(59, 130, 246, 0.2); */
    /* backdrop-filter: blur(10px); */
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.level-badge svg{
    height: 20px;
}

.level-badge::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
    transition: left 0.5s ease;
}

.level-badge:hover::before {
    left: 100%;
}

.level-badge:hover {
    transform: scale(1.05);
    border-color: rgba(59, 130, 246, 0.4);
    box-shadow: 0 8px 25px rgba(59, 130, 246, 0.3);
}

/* Stats Section */
.stats-section {
    margin-bottom: 2rem;
}

.section-title {
    display: none;
    font-size: 1.4rem;
    font-weight: 700;
    color: #1e293b;
    margin-bottom: 1.5rem;
    align-items: center;
    gap: 0.75rem;
    font-family: 'Poppins', sans-serif;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.section-title i {
    color: #3b82f6;
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.1) 0%, rgba(139, 92, 246, 0.1) 100%);
    padding: 0.5rem;
    border-radius: 0.75rem;
    border: 1px solid rgba(59, 130, 246, 0.2);
}

.stats-grid {
    height: 250px;
    display: flex;
    justify-content: center;
    gap: 25px;
    display: none;
}

.stat-card {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 1rem;
    padding: 2rem 1.5rem;
    text-align: center;
    transition: all 0.3s ease;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    position: relative;
    overflow: hidden;
    width: 200px;
    height: 200px;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
}

.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.05) 0%, rgba(139, 92, 246, 0.05) 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.stat-card:hover::before {
    opacity: 1;
}

.stat-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    border-color: #3b82f6;
}

.stat-icon {
    width: 40px;
    height: 40px;
    margin: 0 auto 1rem;
    background: linear-gradient(135deg, #3b82f6 0%, #8b5cf6 100%);
    border-radius: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    position: relative;
    transition: all 0.3s ease;
}

.stat-icon i {
    font-size: 1.25rem;
    font-weight: 600;
}

.stat-card:hover .stat-icon {
    transform: scale(1.1) rotate(5deg);
    box-shadow: 0 8px 25px 0 rgba(59, 130, 246, 0.4);
}

.stat-title {
    font-size: 0.9rem;
    color: #64748b;
    margin-bottom: 0.5rem;
    font-weight: 600;
    letter-spacing: 0.025em;
    position: relative;
    z-index: 1;
    line-height: 1.3;
}

.buttons__bloc {
    width: 100%;
    background: #061E43;
    padding: 20px;
    display: flex;
    justify-content: center;
    gap: 15px;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 999;
    flex-wrap: wrap;
}

.main__wrapper {
    width: 100%;
    height: 100%;
    position: relative;
}

.stat-value {
    font-size: 1.75rem;
    font-weight: 700;
    background: linear-gradient(135deg, #1e293b 0%, #3b82f6 100%);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    font-family: 'Poppins', sans-serif;
    position: relative;
    z-index: 1;
}

.stat-max {
    font-size: 0.7rem;
    color: #9ca3af;
    line-height: 5;
}

.progress-bar {
    width: 100%;
    height: 6px;
    background: rgba(0, 0, 0, 0.1);
    border-radius: 3px;
    margin-top: 1rem;
    overflow: hidden;
    position: relative;
    backdrop-filter: blur(10px);
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #3b82f6 0%, #8b5cf6 50%, #ec4899 100%);
    border-radius: 3px;
    transition: width 1.2s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.progress-fill::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.6), transparent);
    animation: progressShine 2s infinite;
}

@keyframes progressShine {
    0% {
        left: -100%;
    }

    100% {
        left: 100%;
    }
}

/* Tasks Section */
.tasks-section {
    margin-bottom: 2rem;
}

.task-buttons {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1rem;
    flex-wrap: wrap;
}

.task-button {
    border-color: white !important;
    padding: 6px 1.5rem;
    font-size: 0.9rem;
    font-weight: 600;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    background: #ffffff;
    color: #64748b;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: 'Poppins', sans-serif;
    position: relative;
    overflow: hidden;
}

.task-button::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(59, 130, 246, 0.1), transparent);
    transition: left 0.5s ease;
}

.task-button:hover::before {
    left: 100%;
}

.task-button.active {
    background: #0086C2;
    color: #ffffff;
    border-color: #3b82f6;
}

.task-button:hover:not(.active) {
    background: #f8fafc;
    border-color: #3b82f6;
    color: #3b82f6;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.task-card {
    background: #ffffff;
    border-top: 1px solid #e2e8f0;
    margin-top: 40px;
    padding-top: 40px;
    transition: all 0.3s ease;
    display: none;
    margin-top: 20px !important;
    padding-top: 20px !important;
}

.task-card.active {
    display: block;
}

.task-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem !important;
}

.task-title {
    font-size: 1rem;
    font-weight: 600;
    color: #2d3748;
}

.task-status {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.3rem 0.7rem;
    border-radius: 0.5rem;
    font-size: 0.75rem;
    font-weight: 500;
}

.status-success {
    background: rgba(34, 197, 94, 0.1);
    color: #22c55e;
    border: 1px solid rgba(34, 197, 94, 0.15);
}

.status-error {
    background: rgba(239, 68, 68, 0.1);
    color: #ef4444;
    border: 1px solid rgba(239, 68, 68, 0.15);
}

.status-warning {
    background: rgba(245, 158, 11, 0.1);
    color: #f59e0b;
    border: 1px solid rgba(245, 158, 11, 0.15);
}

.task-message {
    color: #6b7280;
    font-size: 0.85rem;
    line-height: 1.4;
    margin-bottom: 0.75rem;
    padding: 15px 20px;
}

.no-response-message {
    background: rgba(245, 158, 11, 0.05);
    border-left: 3px solid #f59e0b;
    color: #92400e;
}

/* Styles pour le contenu des tâches sans réponse */
.no-response-content {
    margin-top: 1.5rem;
    padding: 1.5rem;
    background: rgba(59, 130, 246, 0.02);
    border-radius: 0.75rem;
    border: 1px solid rgba(59, 130, 246, 0.1);
}

.task-info-content {
    margin-bottom: 1.5rem;
}

.task-description,
.task-limits,
.task-methodology {
    margin-bottom: 1rem;
}

.task-description strong,
.task-limits strong,
.task-methodology strong {
    color: #1e293b;
    font-weight: 600;
}

.task-methodology ul {
    margin-left: 1.5rem;
    margin-top: 0.5rem;
}

.task-methodology li {
    margin-bottom: 0.25rem;
    color: #4b5563;
    line-height: 1.5;
}

.no-response-notice {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    padding: 1rem;
    background: rgba(245, 158, 11, 0.05);
    border: 1px solid rgba(245, 158, 11, 0.15);
    border-radius: 0.5rem;
    color: #92400e;
    font-size: 0.9rem;
    line-height: 1.5;
}

.no-response-notice i {
    flex-shrink: 0;
    margin-top: 0.1rem;
    color: #f59e0b;
}

.task-details {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    margin: 25px;
    margin-bottom: 65px;
    display: none !important;
}

.detail-item {
    background: rgba(0, 0, 0, 0.03);
    padding: 15px 25px;
    border-radius: 0.4rem;
    text-align: center;
    border: 1px solid rgba(0, 0, 0, 0.05);
    max-width: 300px;
}

.detail-label {
    font-size: 13px;
    color: #6b7280;
    margin-bottom: 0.2rem;
    font-weight: 500;
    text-transform: uppercase;
}

.detail-value {
    font-size: 15px;
    font-weight: 400;
    color: #2d3748;
}


/* Correction Details */

.main__wrapper {
    margin: 25px auto !important;
}

.correction-subtitle {
    font-size: 0.9rem;
    font-weight: 600;
    color: #2c5aa0;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 0.4rem;
    margin-top: 35px
}

.correction-subtitle>svg {
    color: #2c5aa0;
    width: 20px;
}

.correction-subtitle:first-child {
    margin-top: 0;
}

.task-message {
    max-width: 700px;
    margin: 0 auto;
    padding: 20px 30px;
    background: rgba(239, 68, 68, 0.1);
    color: #ef4444;
    border: 1px solid rgba(239, 68, 68, 0.15);
    display: flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.3rem 0.7rem;
    border-radius: 0.5rem;
    font-size: 0.75rem;
    font-weight: 500;
    margin-bottom: 50px;
}

.error-item {
    background: rgba(239, 68, 68, 0.08);
    border: 1px solid rgba(239, 68, 68, 0.1);
    border-radius: 0.4rem;
    padding: 20px;
    margin-bottom: 0.5rem;
}

.error-title {
    font-weight: 600;
    color: #ef4444;
    font-size: 0.85rem !important;
    margin-bottom: 0.2rem !important;
    text-transform: unset !important;
}

.error-explanation {
    color: #6b7280;
    font-size: 14px;
    margin-bottom: 0.2rem;
    font-weight: 500;
}

.error-correction {
    color: #22c55e;
    font-size: 14px;
    font-weight: 500;
}

.correction-text {
    background: rgba(255, 255, 255, 0.9);
    border-color: rgba(34, 197, 94, 0.3);
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(34, 197, 94, 0.1);
    font-size: 15px;
    font-weight: 500;
    color: #004085;
}

.points-forts,
.conseils {
    background: rgba(34, 197, 94, 0.08);
    border: 1px solid rgba(34, 197, 94, 0.1);
    border-radius: 0.4rem;
    padding: 20px;
    margin: 0.5rem 0;
}

.points-forts ul,
.conseils ul {
    list-style: none;
    padding: 0;
}

.points-forts li,
.conseils li {
    color: #6b7280;
    font-size: 14px;
    margin-bottom: 0.4rem;
    padding-left: 1.2rem;
    position: relative;
    font-weight: 500;
}

.main-content {
    max-width: 1200px;
    margin: 0 auto;
}

.points-forts li::before,
.conseils li::before {
    content: '✓';
    position: absolute;
    left: 0;
    color: #22c55e;
    font-weight: bold;
    margin-right: 10px;
}

/* Style pour le message d'absence de commentaires */
.no-comments-message {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 1rem 1.5rem;
    background: rgba(59, 130, 246, 0.05);
    border: 1px solid rgba(59, 130, 246, 0.15);
    border-radius: 0.5rem;
    color: #3b82f6;
    font-size: 0.9rem;
    font-weight: 500;
    margin-bottom: 1rem;
}

.no-comments-message i {
    color: #3b82f6;
    flex-shrink: 0;
}

.comment-link a {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    color: #3b82f6;
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: 500;
    padding: 0.25rem 0.5rem;
    border-radius: 0.25rem;
    transition: all 0.2s ease;
    background: rgba(59, 130, 246, 0.05);
    border: 1px solid rgba(59, 130, 246, 0.1);
}

.comment-link a:hover {
    background: rgba(59, 130, 246, 0.1);
    border-color: rgba(59, 130, 246, 0.2);
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(59, 130, 246, 0.1);
}

.comment-link a i {
    width: 14px;
    height: 14px;
    color: #3b82f6;
}

/* Responsive Design */
@media (max-width: 768px) {
    .wrapper__container {
        padding: 1rem;
    }
    #results__container{
        padding: 20px !important
    }
    .level-badge{
        gap:0;
    }
    .score-hero {
        margin-bottom: 0;
    }

    .stats-grid {
        height: unset !important;
        flex-wrap: wrap;
        display: none;
    }

    .header h1 {
        font-size: 2rem;
    }

    .main-score {
        font-size: 3.5rem;
    }

    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .task-details {
        flex-direction: column;
        align-items: center;
        display: none !important;
    }
}

@media (max-width: 480px) {
    .stats-grid {
        height: unset !important;
        flex-wrap: wrap;
    }

    .score-hero {
        margin-bottom: 0;
    }

    .main-score {
        font-size: 3rem;
    }

    .header h1 {
        font-size: 1.75rem;
    }

    .task-header {
        flex-direction: column;
        gap: 0.5rem;
        align-items: flex-start;
    }

    .task-button {
        flex: 1;
        text-align: center;
    }
}

/* Animations */
.fade-in {
    opacity: 0;
    transform: translateY(8px);
    animation: fadeIn 0.4s ease-out forwards;
}

@keyframes fadeIn {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.slide-in {
    opacity: 0;
    transform: translateX(-8px);
    animation: slideIn 0.4s ease-out forwards;
}

@keyframes slideIn {
    to {
        opacity: 1;
        transform: translateX(0);
    }
}