/* === 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%, 100% { opacity: 1; }
    50% { opacity: 0.7; }
}

/* 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;
}

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

.sidebar:last-child .character-grid {
    flex: 1;
    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;
}

/* 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;
}
/*.mobile__timer {*/
/*    position: absolute;*/
/*    top: 50px;*/
/*    width: 100%;*/
/*}*/
.nav-buttons {
    display: flex;
    gap: 10px;
}

.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;
}
.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;
    }

    .main-content {
        padding: 20px;
    }

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

    /* Réorganisation sur mobile */
    .main-layout {
        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;
    }

    .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;
    }
} 