/* === Styles extraits de test.html === */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: #f8f9fa;
    color: #333;
    line-height: 1.5;
    font-weight: 400;
}

.simulator__container {
    /*max-width: unset !important; */
    background: #ECF0F3;
    margin: 0 auto;
    padding: 20px;
}

.breadcrumb-area {
    display: none !important;
}

.task-list ul {
    padding-left: 0 !important;
    border: 1px solid red !important;
}


.logo {
    font-family: 'Inter', sans-serif;
    font-size: 24px;
    font-weight: 700;
    color: #2c5aa0;
}

.timer {
    background: #e3f2fd;
    color: #1976d2;
    padding: 8px 16px;
    border-radius: 5px;
    font-weight: 500;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 25px;
    border: 2px solid #1976d2;
}

.timer-icon {
    width: 16px;
    height: 16px;
}

.timer.warning {
    background: #fff3cd;
    color: #856404;
    border-color: #856404;
    /*animation: pulse 1s infinite;*/
}

.timer.danger {
    background: #f8d7da;
    color: #721c24;
    border-color: #721c24;
    /*animation: pulse 0.5s infinite;*/
}

@keyframes pulse {
    0% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(255, 255, 255, 0.7);
    }

    50% {
        transform: scale(1.05);
        box-shadow: 0 0 0 10px rgba(255, 255, 255, 0);
    }

    100% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(255, 255, 255, 0);
    }
}

/* Main Layout */
.main-layout {
    display: grid;
    grid-template-columns: 250px 1fr 280px;
    gap: 20px;
    align-items: start;
    min-height: calc(100vh - 140px);
}

/* Sidebar */
.sidebar {
    background: white;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    padding: 20px;
}

.tcf-simulator-container {
    background: #ECF0F3;
}

.sidebar:last-child {
    display: flex;
    flex-direction: column;
    height: calc(100vh - 140px);
}

/* Left sidebar layout to place the alert at the bottom */
.sidebar.left-sidebar {
    display: flex;
    flex-direction: column;
    /* justify-content: space-between; */
    /* height: calc(100vh - 140px); */
}

.left-sidebar-alert {
    margin-top: 15px;
}

/* Sidebar alerts styled like the screenshot (soft card with icon) */
.sidebar.left-sidebar .left-sidebar-alert.tcf-alert {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 15px;
    border-radius: 8px;
    border: 1px solid;
    margin-bottom: 0;
    font-size: 13px;
    line-height: 1.4;
    /* override global alert left border */
    /* border-left: none; */
    flex-wrap: wrap;              /* allow wrapping of children */
    white-space: normal;          /* ensure normal wrapping */
    word-break: break-word;       /* break long words if needed */
    overflow-wrap: anywhere;      /* robust wrapping */
}

/* .sidebar.left-sidebar .left-sidebar-alert.tcf-alert::before {
    content: "";
    width: 16px;
    height: 16px;
    flex-shrink: 0;
    margin-top: 2px;
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
} */
.left-sidebar-alert p {
    font-weight: 500;
    line-height: 1.4;
    margin: 0 !important;
    font-size: 14px;
}
.tcf-alert.tcf-alert-warning p{
    color: #856404;
}
/* Force text and link to stack under the icon */
.sidebar.left-sidebar .left-sidebar-alert.tcf-alert p,
.sidebar.left-sidebar .left-sidebar-alert.tcf-alert a.left-sidebar-alert-link {
    flex: 1 1 100%;
}

.sidebar.left-sidebar .left-sidebar-alert.tcf-alert p {
    margin: 0 0 6px 0;
}

/* Simple text link styles matching the alert tone */
.sidebar.left-sidebar .left-sidebar-alert .left-sidebar-alert-link {
    text-decoration: underline;
    font-weight: 600;
    font-size: 13px;
}

.sidebar.left-sidebar .left-sidebar-alert.tcf-alert-warning .left-sidebar-alert-link {
    color: #856404;
}
.sidebar.left-sidebar .left-sidebar-alert.tcf-alert-error .left-sidebar-alert-link {
    color: #8f1d1d;
}
.sidebar.left-sidebar .left-sidebar-alert.tcf-alert-success .left-sidebar-alert-link {
    color: #0b6b3a;
}

/* Warning style (matches screenshot colors) */
.sidebar.left-sidebar .left-sidebar-alert.tcf-alert-warning {
    background: #fff3cd; /* pale yellow */
    border-color: #ffeaa7;
    color: #856404;
}
.sidebar.left-sidebar .left-sidebar-alert.tcf-alert-warning::before {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='%23856404' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3Z'/%3E%3Cpath d='M12 9v4'/%3E%3Cpath d='m12 17 .01 0'/%3E%3C/svg%3E");
}

/* Error style (soft red card) */
.sidebar.left-sidebar .left-sidebar-alert.tcf-alert-error {
    color: #721c24;
    background-color: #f8d7da;
    border-color: #f5c6cb;
}
.sidebar.left-sidebar .left-sidebar-alert.tcf-alert-error::before {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='%238f1d1d' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3Z'/%3E%3Cpath d='M12 9v4'/%3E%3Cpath d='m12 17 .01 0'/%3E%3C/svg%3E");
}

/* Success style (soft green card) */
.sidebar.left-sidebar .left-sidebar-alert.tcf-alert-success {
    background: #d4edda;
    border-color: #bfe8cb;
    color: #0b6b3a;
}
.sidebar.left-sidebar .left-sidebar-alert.tcf-alert-success p{
    color: #155724;
}
.sidebar.left-sidebar .left-sidebar-alert.tcf-alert-success::before {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='%230b6b3a' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3Z'/%3E%3Cpath d='M12 9v4'/%3E%3Cpath d='m12 17 .01 0'/%3E%3C/svg%3E");
}

.document-card {
    background: #f8f9fa;
    display: flex;
    flex-wrap: wrap;
    padding: 15px;
    border-radius: 10px;
}

.document-card .document-title {
    font-weight: 500;
    text-transform: uppercase;
    font-size: 15px;
}

.document-card .document-content {
    font-size: 15px;
    color: #495057;
    /* font-weight: 500; */
}

.sidebar:last-child .character-grid {
    flex: none !important;
    border: 1px solid #DDD;
    padding: 10px;
    border-radius: 5px;
}

.sidebar h3 {
    font-family: 'Poppins', sans-serif;
    color: #495057;
    margin-bottom: 15px;
    font-size: 14px;
    font-weight: 600;
    text-transform: uppercase;
}

.task-list {
    list-style: none;
    padding: 0;
}

.simulator__container {
    font-family: 'Poppins', sans-serif !important;
    max-width: 1600px !important;
}

.simulator--main__container {
    width: 100%;
    background: #ECF0F3;
}

.task-item {
    /* padding: 12px 16px;
    margin-bottom: 8px;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
    border: 1px solid #DDD;
    font-size: 14px; */

    padding: 8px 15px;
    margin-bottom: 8px;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
    border: 1px solid #DDD;
    font-size: 14px;
    font-family: 'Poppins', sans-serif;
}

.task-item:hover {
    background: #f8f9fa;
    border-color: #DDD;
}

.task-item.active {
    background: #28a745;
    color: white;
    border-color: #28a745;
}

.task-item.completed {
    opacity: 0.7;
    background: #e8f5e8;
    border-color: #28a745;
}

.sidebar-note {
    margin-top: 15px;
    font-size: 12px;
    color: #6c757d;
    font-style: italic;
}

/* Main Content */
.main-content {
    background: white;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    padding: 30px;
    display: flex;
    flex-direction: column;
    min-height: calc(100vh - 140px);
}

.content-header {
    margin-bottom: 25px;
    padding-bottom: 15px;
    border-bottom: 1px solid #f1f3f4;
}

.content-header h2 {
    font-family: 'Inter', sans-serif;
    color: #2c5aa0;
    font-size: 15px;
    font-weight: 600;
    margin-bottom: 5px;
    text-transform: uppercase;
}

.content-subtitle {
    color: #6c757d;
    font-size: 12px;
    font-style: italic;
    font-weight: 500;
}

.instruction-text {
    background: #f8f9fa;
    padding: 20px 25px;
    border-radius: 6px;
    margin-bottom: 20px;
    border-left: 4px solid #28a745;
    font-size: 14px;
    color: #495057;
    font-weight: 500;
}

.documents-section {
    margin-bottom: 25px;
}

.documents-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 25px;
}

.document {
    border: 1px solid #e9ecef;
    border-radius: 6px;
    padding: 20px;
    background: #fafbfc;
}

.document h4 {
    font-family: 'Inter', sans-serif;
    color: #2c5aa0;
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 12px;
}

.document p {
    color: #495057;
    font-size: 17px;
    line-height: 1.6;
}

.response-area {
    margin-bottom: 20px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.text-input::placeholder {
    font-size: 14px;
}

.text-input {
    width: 100%;
    min-height: 300px;
    height: 100%;
    padding: 15px;
    border: 1px solid #ced4da;
    border-radius: 6px;
    font-family: 'Poppins', sans-serif;
    font-size: 15px !important;
    resize: vertical;
    background: white;
    font-weight: 400;
    flex: 1;
}


.text-input:focus {
    outline: none;
    border-color: #2c5aa0;
    border: 2px;
    box-shadow: 0 0 0 2px rgba(44, 90, 160, 0.1);
}

.text-input:disabled {
    background: #f8f9fa;
    color: #6c757d;
    cursor: not-allowed;
}

/* Character Panel */
.character-panel h3 {
    font-family: 'Inter', sans-serif;
    color: #495057;
    margin-bottom: 15px;
    font-size: 16px;
    font-weight: 600;
}

.character-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 4px;
    margin-bottom: 20px;
}

.char-button {
    background: white;
    border: 0.5px solid #e0e0e0;
    border-radius: 3px;
    padding: 6px 4px;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.2s ease;
    color: #495057;
    font-family: 'Poppins', sans-serif;
    font-weight: 500;
    min-width: 25px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.char-button:hover {
    background: #f8f9fa;
    border-color: #2c5aa0;
    color: #2c5aa0;
}

.char-button:active {
    transform: scale(0.95);
}

/* Warning Alert */
.warning-alert {
    background: #fff3cd;
    border: 1px solid #ffeaa7;
    border-radius: 6px;
    padding: 12px;
    margin-bottom: 15px;
    font-size: 12px;
    color: #856404;
    line-height: 1.4;
    display: flex;
    align-items: flex-start;
    gap: 8px;
}

.warning-alert::before {
    content: "";
    width: 16px;
    height: 16px;
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='%23856404' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3Z'/%3E%3Cpath d='M12 9v4'/%3E%3Cpath d='m12 17 .01 0'/%3E%3C/svg%3E") no-repeat center;
    background-size: contain;
    flex-shrink: 0;
    margin-top: 1px;
}

/* Download Button */
.download-section {
    margin-top: auto;
    padding-top: 15px;
    border-top: 1px solid #e9ecef;
    flex-shrink: 0;
}

.btn-download {
    background: #28a745;
    color: white;
    border-color: #28a745;
    width: 100%;
    padding: 12px 16px;
    font-size: 14px;
    font-weight: 500;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
    border: 1px solid;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    max-width: 280px;
    border: 0;
}

.btn-download:hover {
    background: #218838;
    border-color: #1e7e34;
    color: white !important;
}

.btn-correct {
    background: #f39c12 !important;
    color: black;
    border: 0;
    margin-top: 5px;
}

.btn-correct:hover {
    background: #e67e22 !important;
    color: black !important;
}

.btn-toggle-correction {
    background: #31ADDA !important;
    color: white;
    margin-top: 5px;
}

.btn-show-correction {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
    border: none;
    margin-top: 10px;
    transition: all 0.3s ease;
}

.btn-show-correction:hover {
    background: linear-gradient(135deg, #059669 0%, #047857 100%);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(16, 185, 129, 0.4);
}

.btn-hide-correction {
    background: linear-gradient(135deg, #6b7280 0%, #4b5563 100%);
    color: white;
    border: none;
    margin-top: 10px;
    transition: all 0.3s ease;
}

.btn-hide-correction:hover {
    background: linear-gradient(135deg, #4b5563 0%, #374151 100%);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(107, 114, 128, 0.4);
}

/* Download section pour mobile */
.mobile-download-section {
    display: none;
    margin-top: 50px !important;
    padding: 15px;
    background: white;
    border: 1px solid #e9ecef;
    border-radius: 8px;
}

/* Navigation */
.navigation {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 20px;
    border-top: 1px solid #e9ecef;
}

.word-counter {
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    padding: 8px 12px;
    border-radius: 4px;
    font-size: 13px;
    color: #495057;
    font-weight: 500;
}
.nav-buttons {
    display: flex;
    gap: 10px;
}
.nav-buttons .btn {
    padding: 12px 20px !important;
}
.btn {
    padding: 15px 20px !important;
    border: 1px solid #ced4da;
    border-radius: 6px;
    background: white;
    color: #495057;
    cursor: pointer;
    font-size: 13px !important;
    font-weight: 500;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 6px;
}

.btn-icon {
    width: 16px;
    height: 16px;
}

.btn:hover {
    background: #f8f9fa;
    border-color: #adb5bd;
}

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    color: #adb5bd;
}

.btn,
.btn-download {
    font-family: 'Poppins', sans-serif;
}

.btn-primary {
    background: #1363DF;
    color: white;
    border-color: #1363DF;
}

.btn-primary:hover {
    background: #1e3d72;
    border-color: #1e3d72;
}


.popup-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.3);
    z-index: 1000;
    display: none;
}

.popup-container {
    position: absolute;
    background: white;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    width: 500px;
    padding: 24px;
    z-index: 1001;
    display: none;
}

.popup-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.popup-title {
    font-size: 16px;
    text-transform: uppercase;
    font-weight: 600;
    color: #333;
    margin: 0;
}

.close-btn {
    background: none;
    border: none;
    font-size: 20px;
    cursor: pointer;
    color: #666;
    padding: 0;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.close-btn:hover {
    color: #333;
}

.features-list {
    list-style: none;
    padding: 0;
    margin: 0 0 24px 0;
}

.feature-item p {
    font-weight: 500;
    margin-bottom: 10px;
}

.feature-item {
    display: flex;
    align-items: center;
    margin-bottom: 12px;
    color: #333;
    font-size: 14px;
    display: flex;
    flex-wrap: wrap;
}

.feature-item:last-child {
    margin-bottom: 0;
}

.checkmark {
    width: 16px;
    height: 16px;
    background-color: #4CAF50;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 12px;
    flex-shrink: 0;
}

.checkmark::after {
    content: "✓";
    color: white;
    font-size: 10px;
    font-weight: bold;
}

.premium-btn {
    width: 100%;
    background: linear-gradient(45deg, #FFA500, #FF8C00);
    color: white;
    border: none;
    padding: 14px 20px;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
}

.premium-btn:hover {
    background: linear-gradient(45deg, #FF8C00, #FF7F00);
    transform: translateY(-1px);
}

.popup-arrow {
    position: absolute;
    width: 0;
    height: 0;
    border-style: solid;
}

.popup-arrow.top {
    border-left: 8px solid transparent;
    border-right: 8px solid transparent;
    border-bottom: 8px solid white;
    top: -8px;
    left: 50%;
    transform: translateX(-50%);
}

.popup-arrow.bottom {
    border-left: 8px solid transparent;
    border-right: 8px solid transparent;
    border-top: 8px solid white;
    bottom: -8px;
    left: 50%;
    transform: translateX(-50%);
}

.popup-arrow.left {
    border-top: 8px solid transparent;
    border-bottom: 8px solid transparent;
    border-right: 8px solid white;
    left: -8px;
    top: 50%;
    transform: translateY(-50%);
}

.popup-arrow.right {
    border-top: 8px solid transparent;
    border-bottom: 8px solid transparent;
    border-left: 8px solid white;
    right: -8px;
    top: 50%;
    transform: translateY(-50%);
}



/* Responsive */
@media (max-width: 1024px) {
    .main-layout {
        grid-template-columns: 1fr;
        gap: 15px;
    }

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

    .navigation {
        flex-direction: column;
        gap: 15px;
        align-items: stretch;
    }

    .nav-buttons {
        justify-content: center;
    }
}

@media (max-width: 768px) {
    .header {
        flex-direction: column;
        gap: 10px;
        text-align: center;
    }

    .text-input {
        min-height: 500px;
    }

    .popup-container {
        width: 350px;
    }

    .task-item {
        padding: 10px 15px;
    }

    .simulator__container {
        padding: 15px;
    }

    .mobile__timer,
    .timer {
        display: flex !important;
        justify-content: center;
        border: 2px solid #1976d2;
    }

    .character-grid-mobile {
        display: grid !important;
    }

    .main-content {
        padding: 20px;
    }

    .character-grid {
        grid-template-columns: repeat(6, 1fr);
    }

    /* Réorganisation sur mobile */
    .main-layout {
        display: block;
        grid-template-areas:
            "sidebar-left"
            "sidebar-right"
            "main-content";
        grid-template-columns: 1fr;
    }

    .sidebar:first-child {
        grid-area: sidebar-left;
    }

    .sidebar:last-child {
        grid-area: sidebar-right;
        height: auto;
        flex-direction: column;
        display: none;
    }

    /* Reset left sidebar height on mobile */
    .sidebar.left-sidebar {
        height: auto;
    }

    .main-content {
        grid-area: main-content;
    }

    /* Déplacer le tableau de caractères dans le contenu principal */
    .character-section {
        margin-bottom: 20px;
        padding: 15px;
        background: white;
        border: 1px solid #e9ecef;
        border-radius: 8px;
    }

    .character-section h3 {
        font-family: 'Inter', sans-serif;
        color: #495057;
        margin-bottom: 15px;
        font-size: 14px;
        font-weight: 600;
        text-transform: uppercase;
    }

    /* Masquer le tableau de caractères dans la sidebar sur mobile */
    .sidebar:last-child .character-grid {
        display: none;
    }

    .sidebar:last-child h3:first-of-type {
        display: none;
    }

    /* Masquer la section de téléchargement de la sidebar sur mobile */
    .sidebar:last-child .download-section {
        display: none;
    }

    /* Afficher la section de téléchargement mobile */
    .mobile-download-section {
        display: block;
        margin-top: 50px !important;
        margin-bottom: 20px;
    }

    /* Ajuster le word-counter sur mobile */
    .word-counter {
        width: auto;
        min-width: fit-content;
    }

    /* Réorganiser la navigation sur mobile */
    .navigation {
        flex-direction: row;
        gap: 15px;
        align-items: center;
        justify-content: space-between;
        flex-wrap: wrap;
        justify-content: center;
    }

    .nav-buttons {
        justify-content: flex-end;
        height: 40px;
    }
}

/* === Styles pour l'interface de correction === */

/* Container des résultats */
#results__container {
    min-height: 100vh;
    display: block;
    background: white !important;
    box-shadow: none !important;
    border: 0 !important;
    padding: 20px 50px !important
}


/* Score Hero Section */
.score-hero {
    background: #ffffff !important;
    border-radius: 1.5rem;
    text-align: center;
    margin-bottom: 2rem;
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
}

.score-hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: white !important;
    pointer-events: none;
}

.correction-details {
    border-top: 1px solid rgba(0, 0, 0, 0.05);
    margin-top: 40px;
    padding: 20px 0 0 0 !important;
}

/* En-tête des résultats - NOUVEAU DESIGN PLUS FIN ET ÉLÉGANT */
#results__container .header {
    text-align: center;
    /* margin-bottom: 40px; */
    /* padding: 30px 40px; */
    /* background: linear-gradient(135deg, #667eea 0%, #764ba2 100%); */
    /* border-radius: 20px; */
    /* box-shadow: 0 12px 35px rgba(102, 126, 234, 0.2); */
    position: relative;
    overflow: hidden;
}

#results__container .header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="grain" width="100" height="100" patternUnits="userSpaceOnUse"><circle cx="25" cy="25" r="1" fill="rgba(255,255,255,0.1)"/><circle cx="75" cy="75" r="1" fill="rgba(255,255,255,0.1)"/><circle cx="50" cy="10" r="0.5" fill="rgba(255,255,255,0.1)"/><circle cx="10" cy="60" r="0.5" fill="rgba(255,255,255,0.1)"/><circle cx="90" cy="40" r="0.5" fill="rgba(255,255,255,0.1)"/></pattern></defs><rect width="100" height="100" fill="url(%23grain)"/></svg>');
    opacity: 0.2;
}

#results__container .header-content {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
    position: relative;
    z-index: 2;
}

#results__container .header-icon {
    background: rgba(255, 255, 255, 0.15);
    border-radius: 50%;
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

#results__container .header-icon i {
    width: 28px;
    height: 28px;
    color: white;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.1));
}

#results__container .header-text {
    text-align: left;
}

#results__container .header-text h1 {
    font-size: 2rem;
    font-weight: 700;
    color: white;
    margin: 0 0 6px 0;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    letter-spacing: -0.3px;
    line-height: 1.2;
}

#results__container .header-text p {
    font-size: 1rem;
    color: rgba(255, 255, 255, 0.85);
    margin: 0;
    font-weight: 400;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
    line-height: 1.4;
}

#results__container .header-decoration {
    position: absolute;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

#results__container .decoration-circle {
    width: 8px;
    height: 8px;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    animation: pulse 2s infinite;
}

#results__container .decoration-line {
    width: 2px;
    height: 30px;
    background: linear-gradient(to bottom, rgba(255, 255, 255, 0.4), transparent);
    border-radius: 1px;
}

/* Amélioration des boutons de tâches actifs */
.task-tab.active {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-color: #667eea;
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.4);
    transform: translateY(-2px);
    position: relative;
}

.task-tab.active::before {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 18px 18px 0 0;
    z-index: -1;
    opacity: 0.3;
    animation: pulse 2s infinite;
}

.task-tab.active::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #667eea 0%, #764ba2 100%);
    border-radius: 2px;
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.3);
    animation: glow 2s ease-in-out infinite alternate;
}

.task-tab.active .tab-number {
    background: rgba(255, 255, 255, 0.3);
    border: 2px solid rgba(255, 255, 255, 0.5);
    animation: pulse 2s infinite;
    box-shadow: 0 0 15px rgba(255, 255, 255, 0.4);
}

/* Animation de lueur pour les boutons actifs */
@keyframes glow {
    from {
        box-shadow: 0 2px 8px rgba(102, 126, 234, 0.3);
    }

    to {
        box-shadow: 0 2px 15px rgba(102, 126, 234, 0.6);
    }
}

/* Amélioration des couleurs des rubriques d'évaluation - MEILLEURE LISIBILITÉ */
.evaluation-item {
    background: linear-gradient(145deg, #ffffff 0%, #f8f9fa 100%);
    border: 2px solid #e9ecef;
    border-radius: 18px;
    padding: 28px;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    margin-bottom: 20px;
}

.evaluation-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 5px;
    background: linear-gradient(90deg, #667eea 0%, #764ba2 100%);
    border-radius: 18px 18px 0 0;
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.3);
}

.evaluation-item:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.12);
    border-color: #667eea;
}

.evaluation-name {
    font-size: 1.2rem;
    font-weight: 700;
    color: #1a202c;
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 15px;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
    letter-spacing: -0.2px;
}

.evaluation-name i {
    width: 24px;
    height: 24px;
    color: #667eea;
    filter: drop-shadow(0 2px 4px rgba(102, 126, 234, 0.2));
}

.evaluation-score {
    font-size: 1.6rem;
    font-weight: 800;
    color: #1a202c;
    background: linear-gradient(135deg, #e3f2fd 0%, #bbdefb 100%);
    padding: 10px 20px;
    border-radius: 25px;
    border: 2px solid #2196f3;
    box-shadow: 0 4px 12px rgba(33, 150, 243, 0.25);
    display: inline-block;
    margin-bottom: 20px;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

.evaluation-analysis {
    list-style: none;
    padding: 0;
    margin: 0;
    background: rgba(248, 249, 250, 0.5);
    border-radius: 12px;
    padding: 20px;
    border: 1px solid rgba(233, 236, 239, 0.5);
}

.evaluation-analysis li {
    padding: 16px 0;
    border-bottom: 1px solid rgba(241, 243, 244, 0.8);
    display: flex;
    align-items: flex-start;
    gap: 15px;
    font-size: 1rem;
    line-height: 1.7;
    color: #2d3748;
    font-weight: 500;
    transition: all 0.2s ease;
}

.evaluation-analysis li:hover {
    background: rgba(255, 255, 255, 0.8);
    border-radius: 8px;
    padding-left: 10px;
    padding-right: 10px;
    margin-left: -10px;
    margin-right: -10px;
}

.evaluation-analysis li:last-child {
    border-bottom: none;
}

.evaluation-analysis li::before {
    content: '✓';
    color: #27ae60;
    font-weight: bold;
    flex-shrink: 0;
    margin-top: 3px;
    background: linear-gradient(135deg, #d5f4e6 0%, #a8e6cf 100%);
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
    box-shadow: 0 3px 8px rgba(39, 174, 96, 0.25);
    border: 2px solid rgba(39, 174, 96, 0.2);
}

/* Bouton "Voir la correction" - DESIGN AMÉLIORÉ */
.btn-view-correction {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 14px 28px;
    border-radius: 14px;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.3);
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 15px;
    width: 100%;
    justify-content: center;
    position: relative;
    overflow: hidden;
    font-family: 'Poppins', sans-serif;
    letter-spacing: 0.3px;
}

.btn-view-correction::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s ease;
}

.btn-view-correction:hover::before {
    left: 100%;
}

.btn-view-correction:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 30px rgba(102, 126, 234, 0.5);
    background: linear-gradient(135deg, #5a6fd8 0%, #6a4190 100%);
}

.btn-view-correction:active {
    transform: translateY(-1px);
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
}

.btn-view-correction i {
    width: 20px;
    height: 20px;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.1));
    transition: transform 0.3s ease;
}

.btn-view-correction:hover i {
    transform: scale(1.1);
}

/* Responsive design pour l'en-tête */
@media (max-width: 768px) {
    #results__container .header {
        padding: 25px 20px;
        margin-bottom: 30px;
    }

    #results__container .header-content {
        flex-direction: column;
        gap: 15px;
        text-align: center;
    }

    #results__container .header-icon {
        width: 50px;
        height: 50px;
    }

    #results__container .header-icon i {
        width: 24px;
        height: 24px;
    }

    #results__container .header-text {
        text-align: center;
    }

    #results__container .header-text h1 {
        font-size: 1.6rem;
    }

    #results__container .header-text p {
        font-size: 0.95rem;
    }

    #results__container .header-decoration {
        display: none;
    }

    .task-tab.active::after {
        height: 3px;
    }

    .evaluation-item {
        padding: 20px;
        margin-bottom: 15px;
    }

    .evaluation-name {
        font-size: 1.1rem;
        gap: 10px;
    }

    .evaluation-name i {
        width: 20px;
        height: 20px;
    }

    .evaluation-score {
        font-size: 1.3rem;
        padding: 8px 16px;
    }

    .evaluation-analysis {
        padding: 15px;
    }

    .evaluation-analysis li {
        padding: 12px 0;
        font-size: 0.95rem;
        gap: 12px;
    }

    .btn-view-correction {
        padding: 12px 20px;
        font-size: 0.95rem;
    }

    .btn-view-correction i {
        width: 18px;
        height: 18px;
    }
}