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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    padding: 20px;
}

.container {
    max-width: 1000px;
    margin: 0 auto;
    background: white;
    border-radius: 15px;
    padding: 30px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

header {
    text-align: center;
    margin-bottom: 30px;
}

header h1 {
    color: #333;
    font-size: 2.5em;
    margin-bottom: 10px;
}

header p {
    color: #666;
    font-size: 1.1em;
}

.progress-bar {
    width: 100%;
    height: 10px;
    background-color: #e0e0e0;
    border-radius: 5px;
    margin-bottom: 30px;
    overflow: hidden;
}

.progress {
    height: 100%;
    background: linear-gradient(90deg, #4CAF50, #45a049);
    border-radius: 5px;
    transition: width 0.3s ease;
    width: 0%;
}

.exercise-container {
    background: #f8f9fa;
    border-radius: 10px;
    padding: 25px;
    margin-bottom: 25px;
    min-height: 400px;
}

.exercise {
    display: none;
}

.exercise.active {
    display: block;
}

.exercise h2 {
    color: #333;
    margin-bottom: 20px;
    text-align: center;
    font-size: 1.8em;
}

.exercise-description {
    background: #e3f2fd;
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 20px;
    border-left: 4px solid #2196F3;
}

.truth-table {
    margin: 20px auto;
    border-collapse: collapse;
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.truth-table th,
.truth-table td {
    padding: 12px 20px;
    text-align: center;
    border: 1px solid #ddd;
    font-size: 1.1em;
}

.truth-table th {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    font-weight: bold;
}

.truth-table tr:nth-child(even) {
    background-color: #f8f9fa;
}

.truth-table tr:hover {
    background-color: #fff3e0;
}

.checkbox-cell {
    position: relative;
}

.checkbox-cell input[type="checkbox"] {
    width: 20px;
    height: 20px;
    cursor: pointer;
    transform: scale(1.3);
}

.checkbox-cell input[type="checkbox"]:checked {
    accent-color: #4CAF50;
}

.navigation {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 30px;
}

.navigation button {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    border: none;
    padding: 12px 25px;
    border-radius: 25px;
    cursor: pointer;
    font-size: 1em;
    font-weight: bold;
    transition: all 0.3s ease;
}

.navigation button:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.navigation button:disabled {
    background: #ccc;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

#exerciseNumber {
    font-weight: bold;
    font-size: 1.1em;
    color: #333;
}

.results {
    text-align: center;
    padding: 30px;
    background: #f8f9fa;
    border-radius: 10px;
}

.results h2 {
    color: #333;
    margin-bottom: 20px;
    font-size: 2em;
}

.score-item {
    background: white;
    margin: 10px 0;
    padding: 15px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.score-correct {
    border-left: 4px solid #4CAF50;
}

.score-incorrect {
    border-left: 4px solid #f44336;
}

.correction-exercise {
    margin-bottom: 20px;
    background: white;
    padding: 15px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.correction-table {
    margin-top: 10px;
    font-size: 0.85em !important;
}

.incorrect-row {
    background-color: #ffebee !important;
}

.help-panel {
    background: #fff3e0;
    border-radius: 10px;
    padding: 20px;
    margin-top: 20px;
    border: 2px solid #ff9800;
}

.help-panel h3 {
    color: #333;
    margin-bottom: 15px;
    text-align: center;
}

.logic-reminders {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 15px;
}

.reminder {
    background: white;
    padding: 12px;
    border-radius: 6px;
    border-left: 3px solid #ff9800;
    font-size: 0.9em;
}

.reminder strong {
    color: #333;
}

/* Responsive design */
@media (max-width: 768px) {
    .container {
        padding: 20px;
        margin: 10px;
    }
    
    header h1 {
        font-size: 2em;
    }
    
    .truth-table th,
    .truth-table td {
        padding: 8px 12px;
        font-size: 1em;
    }
    
    .logic-reminders {
        grid-template-columns: 1fr;
    }
    
    .navigation {
        flex-direction: column;
        gap: 15px;
    }
}

/* Animation pour les réponses correctes/incorrectes */
.correct-answer {
    animation: correctPulse 0.6s ease-in-out;
}

.incorrect-answer {
    animation: incorrectShake 0.6s ease-in-out;
}

@keyframes correctPulse {
    0% { background-color: #c8e6c9; }
    50% { background-color: #4CAF50; }
    100% { background-color: #c8e6c9; }
}

@keyframes incorrectShake {
    0%, 100% { background-color: #ffcdd2; }
    25% { background-color: #f44336; transform: translateX(-5px); }
    75% { background-color: #f44336; transform: translateX(5px); }
}