/* Réinitialisation et base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Comic Sans MS', 'Arial', sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    padding: 20px;
    color: #333;
}

.container {
    max-width: 900px;
    margin: 0 auto;
    background: white;
    border-radius: 20px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.2);
    overflow: hidden;
}

/* Header */
header {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    color: white;
    padding: 30px;
    text-align: center;
    position: relative;
}

header h1 {
    font-size: 2em;
    margin-bottom: 10px;
}

.subtitle {
    font-size: 1.1em;
    opacity: 0.9;
}

.btn-retour {
    position: absolute;
    top: 20px;
    left: 20px;
    background: rgba(255,255,255,0.3);
    color: white;
    padding: 10px 20px;
    border-radius: 20px;
    text-decoration: none;
    font-weight: bold;
    transition: all 0.3s;
}

.btn-retour:hover {
    background: rgba(255,255,255,0.5);
    transform: translateX(-5px);
}

/* Main content */
main {
    padding: 40px;
}

/* Page d'accueil */
.home .niveau-selection {
    display: flex;
    gap: 20px;
    margin-bottom: 40px;
    flex-wrap: wrap;
    justify-content: center;
}

.niveau-card {
    flex: 1;
    min-width: 200px;
    background: white;
    border: 3px solid #ddd;
    border-radius: 15px;
    padding: 30px;
    text-align: center;
    text-decoration: none;
    color: #333;
    transition: all 0.3s;
    cursor: pointer;
}

.niveau-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 10px 30px rgba(0,0,0,0.15);
}

.niveau-card.ce2 {
    border-color: #ff6b6b;
    background: linear-gradient(135deg, #fff5f5 0%, #ffe0e0 100%);
}

.niveau-card.cm1 {
    border-color: #4ecdc4;
    background: linear-gradient(135deg, #f0ffff 0%, #d0f5f3 100%);
}

.niveau-card.cm2 {
    border-color: #feca57;
    background: linear-gradient(135deg, #fffef0 0%, #fff4d0 100%);
}

.niveau-card .icon {
    font-size: 3em;
    display: block;
    margin-bottom: 10px;
}

.niveau-card h2 {
    font-size: 1.8em;
    margin-bottom: 5px;
}

.niveau-card p {
    color: #666;
}

.info-box {
    background: #f8f9fa;
    border-left: 5px solid #667eea;
    padding: 20px;
    border-radius: 10px;
}

.info-box h3 {
    margin-bottom: 15px;
    color: #667eea;
}

.info-box ol {
    margin-left: 20px;
}

.info-box li {
    margin-bottom: 10px;
    line-height: 1.6;
}

/* Page exercice */
.texte-box {
    background: #fff9e6;
    border: 3px solid #ffd93d;
    border-radius: 15px;
    padding: 25px;
    margin-bottom: 30px;
}

.texte-box h2 {
    color: #f39c12;
    margin-bottom: 15px;
}

.texte-contenu {
    font-size: 1.15em;
    line-height: 1.8;
    color: #2c3e50;
}

.questions-container h2 {
    color: #e74c3c;
    margin-bottom: 20px;
}

.question-box {
    background: #f8f9fa;
    border: 2px solid #dee2e6;
    border-radius: 12px;
    padding: 20px;
    margin-bottom:
	20px;
}
.question-numero {
font-weight: bold;
color: #667eea;
font-size: 0.9em;
margin-bottom: 8px;
}
.question-texte {
font-size: 1.1em;
margin-bottom: 15px;
color: #2c3e50;
font-weight: bold;
}
/* QCM */
.qcm-choix {
display: flex;
flex-direction: column;
gap: 10px;
}
.choix-item {
display: flex;
align-items: center;
background: white;
border: 2px solid #dee2e6;
border-radius: 10px;
padding: 15px;
cursor: pointer;
transition: all 0.3s;
}
.choix-item:hover {
border-color: #667eea;
background: #f8f9ff;
}
.choix-item input[type="radio"] {
margin-right: 12px;
width: 20px;
height: 20px;
cursor: pointer;
}
.choix-item span {
font-size: 1em;
}
/* Questions ouvertes */
textarea {
width: 100%;
padding: 15px;
border: 2px solid #dee2e6;
border-radius: 10px;
font-family: 'Comic Sans MS', Arial, sans-serif;
font-size: 1em;
resize: vertical;
transition: border-color 0.3s;
}
textarea:focus {
outline: none;
border-color: #667eea;
}
/* Boutons */
.btn-submit {
width: 100%;
background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
color: white;
border: none;
padding: 18px;
border-radius: 12px;
font-size: 1.2em;
font-weight: bold;
cursor: pointer;
margin-top: 20px;
transition: all 0.3s;
}
.btn-submit:hover {
transform: translateY(-3px);
box-shadow: 0 10px 25px rgba(102, 126, 234, 0.4);
}
.btn-submit:active {
transform: translateY(0);
}
/* Page résultats */
.score-global {
text-align: center;
background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
color: white;
padding: 40px;
border-radius: 15px;
margin-bottom: 30px;
}
.score-global h2 {
font-size: 1.5em;
margin-bottom: 20px;
}
.score-circle {
display: inline-block;
background: white;
color: #f5576c;
border-radius: 50%;
width: 150px;
height: 150px;
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
margin: 20px auto;
box-shadow: 0 5px 20px rgba(0,0,0,0.2);
}
.score-valeur {
font-size: 2.5em;
font-weight: bold;
}
.score-pourcentage {
font-size: 1.2em;
opacity: 0.8;
}
.message-felicitations {
font-size: 1.3em;
margin-top: 15px;
font-weight: bold;
}
/* Corrections */
.corrections-detail h3 {
color: #667eea;
margin-bottom: 20px;
}
.correction-item {
background: #f8f9fa;
border-left: 5px solid #dee2e6;
border-radius: 10px;
padding: 20px;
margin-bottom: 20px;
}
.correction-item.correct {
border-left-color: #28a745;
background: #f0fff4;
}
.correction-item.incorrect {
border-left-color: #dc3545;
background: #fff5f5;
}
.correction-header {
display: flex;
justify-content: space-between;
align-items: center;
margin-bottom: 12px;
}
.correction-numero {
font-weight: bold;
color: #667eea;
}
.correction-statut {
font-weight: bold;
font-size: 1.1em;
}
.correction-question {
font-weight: bold;
margin-bottom: 12px;
color: #2c3e50;
}
.correction-reponses {
margin-bottom: 12px;
}
.correction-reponses p {
margin-bottom: 8px;
line-height: 1.6;
}
.correction-explication {
font-style: italic;
color: #555;
padding: 10px;
background: white;
border-radius: 8px;
}
/* Actions */
.actions {
display: flex;
gap: 15px;
margin-top: 30px;
flex-wrap: wrap;
}
.btn-primary, .btn-secondary {
flex: 1;
min-width: 200px;
padding: 15px 30px;
border-radius: 10px;
text-align: center;
text-decoration: none;
font-weight: bold;
font-size: 1.1em;
transition: all 0.3s;
}
.btn-primary {
background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
color: white;
}
.btn-primary:hover {
transform: translateY(-3px);
box-shadow: 0 8px 20px rgba(102, 126, 234, 0.4);
}
.btn-secondary {
background: #f8f9fa;
color: #333;
border: 2px solid #dee2e6;
}
.btn-secondary:hover {
background: #e9ecef;
border-color: #adb5bd;
}
/* Page admin */
.stats-grid {
display: grid;
grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
gap: 20px;
margin-bottom: 40px;
}
.stat-card {
background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
color: white;
padding: 25px;
border-radius: 12px;
text-align: center;
box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}
.stat-card h3 {
font-size: 1.1em;
margin-bottom: 15px;
opacity: 0.9;
}
.stat-number {
font-size: 2.5em;
font-weight: bold;
margin-bottom: 5px;
}
.stat-detail {
font-size: 0.9em;
opacity: 0.8;
}
/* Tableau admin */
.recent-scores h2 {
color: #667eea;
margin-bottom: 20px;
}
table {
width: 100%;
border-collapse: collapse;
background: white;
border-radius: 10px;
overflow: hidden;
}
thead {
background: #667eea;
color: white;
}
th, td {
padding: 15px;
text-align: left;
}
tbody tr {
border-bottom: 1px solid #dee2e6;
}
tbody tr:hover {
background: #f8f9fa;
}
tbody tr:last-child {
border-bottom: none;
}
/* Footer */
footer {
background: #f8f9fa;
padding: 20px;
text-align: center;
color: #666;
border-top: 1px solid #dee2e6;
}
footer a {
color: #667eea;
text-decoration: none;
font-weight: bold;
}
footer a:hover {
text-decoration: underline;
}
/* Responsive tablette */
@media (max-width: 768px) {
body {
padding: 10px;
}
.container {
    border-radius: 15px;
}

header h1 {
    font-size: 1.5em;
}

main {
    padding: 20px;
}

.niveau-selection {
    flex-direction: column;
}

.niveau-card {
    min-width: auto;
}

.btn-retour {
    position: static;
    display: inline-block;
    margin-bottom: 15px;
}

.score-circle {
    width: 120px;
    height: 120px;
}

.score-valeur {
    font-size: 2em;
}

.actions {
    flex-direction: column;
}

.btn-primary, .btn-secondary {
    min-width: auto;
}

.stats-grid {
    grid-template-columns: 1fr;
}

table {
    font-size: 0.9em;
}

th, td {
    padding: 10px;
}
}
/* Responsive smartphone */
@media (max-width: 480px) {
header h1 {
font-size: 1.3em;
}
.subtitle {
    font-size: 0.95em;
}

.texte-contenu {
    font-size: 1em;
}

.question-texte {
    font-size: 1em;
}

.choix-item {
    padding: 12px;
}

.btn-submit {
    font-size: 1.1em;
    padding: 15px;
}

.message-felicitations {
    font-size: 1.1em;
}
}