.qm-wrap {
    max-width: 640px;
    margin: 0 auto;
    font-family: sans-serif;
    color: #1e2a35;
}

#qm-login {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 24px;
}

#qm-login input {
    width: 100% !important;
    padding: 10px 14px !important;
    border: 2px solid #d0dce8 !important;
    border-radius: 8px !important;
    font-size: 14px !important;
    color: #1e2a35 !important;
    box-sizing: border-box !important;
    display: block !important;
    float: none !important;
}

#qm-login input:focus {
    outline: none;
    border-color: #2e7d9e;
}

#qm-login button {
    background: #1a3a5c;
    color: #fff;
    border: none;
    border-radius: 6px;
    padding: 12px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
}

#qm-login button:hover { background: #2e7d9e; }

#qm-login-erreur {
    color: #e74c3c;
    font-size: 13px;
    margin: 0;
}


.qm-section-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 12px;
    margin-top: 8px;
}

.qm-section-btn {
    background: #fff;
    border: 2px solid #d0dce8;
    border-radius: 8px;
    padding: 16px;
    font-size: 14px;
    font-weight: 600;
    color: #1a3a5c;
    cursor: pointer;
    text-align: left;
    width: 100%;
    transition: border-color 0.2s, box-shadow 0.2s;
}
.qm-section-btn:hover { border-color: #2e7d9e; box-shadow: 0 2px 8px rgba(46,125,158,0.15); }


.qm-section { display: none; }
.qm-quizz   { display: none; }
.qm-quizz.active { display: block; }

.qm-header { display: flex; align-items: center; gap: 10px; margin-bottom: 20px; }

.qm-back-btn {
    background: none;
    border: 1px solid #ccd6e0;
    border-radius: 6px;
    padding: 5px 10px;
    font-size: 13px;
    color: #5a7a94;
    cursor: pointer;
}
.qm-back-btn:hover { background: #f0f5fa; }

.qm-section-name  { font-size: 18px; font-weight: 600; color: #1a3a5c; }
.qm-question-num  { font-size: 12px; color: #2e7d9e; font-weight: 600; text-transform: uppercase; margin-bottom: 8px; }
.qm-question-img  { max-width: 100%; border-radius: 6px; display: block; margin: 0 auto 16px auto; } 
.qm-question-text { font-size: 18px; font-weight: 500; margin-bottom: 20px; }


.qm-reponses { display: flex; flex-direction: column; gap: 8px; margin-bottom: 20px; }

.qm-rep-btn {
    display: flex;
    align-items: center;
    gap: 12px;
    background: #fff;
    border: 2px solid #d0dce8;
    border-radius: 8px;
    padding: 12px 16px;
    font-size: 14px;
    color: #1e2a35;
    cursor: pointer;
    text-align: left;
    width: 100%;
    transition: border-color 0.2s, background 0.2s;
}
.qm-rep-btn:not(:disabled):hover { border-color: #2e7d9e; background: #f5fafd; }
.qm-rep-btn:disabled { cursor: default; }

.qm-rep-lettre {
    width: 26px; height: 26px;
    border-radius: 50%;
    background: #e8eef4;
    color: #1a3a5c;
    font-weight: 700;
    font-size: 12px;
    display: flex; align-items: center; justify-content: center;
    flex-shrink: 0;
}

.qm-rep-btn.correct { border-color: #27ae60; background: #f0faf4; }
.qm-rep-btn.correct .qm-rep-lettre { background: #27ae60; color: #fff; }
.qm-rep-btn.wrong   { border-color: #e74c3c; background: #fdf3f2; }
.qm-rep-btn.wrong   .qm-rep-lettre { background: #e74c3c; color: #fff; }
.qm-feedback {
    display: none;
    background: #f8fafc;
    border: 1px solid #d0dce8;
    border-radius: 8px;
    padding: 16px;
    margin-bottom: 16px;
}
.qm-feedback-texte { font-weight: 600; font-size: 14px; margin-bottom: 10px; }
.qm-feedback-texte.ok { color: #27ae60; }
.qm-feedback-texte.ko { color: #e74c3c; }
.qm-feedback img, .qm-feedback video { max-width: 100%; border-radius: 6px; display: block; margin: 0 auto; }
.qm-wrap img { max-width: 100%; height: auto; }
.qm-explication { font-size: 14px; color: #3d5166; line-height: 1.6; margin: 0; }

.qm-suivant-btn, .qm-rejouer-btn {
    background: #1a3a5c;
    color: #fff;
    border: none;
    border-radius: 6px;
    padding: 10px 22px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
}
.qm-suivant-btn:hover, .qm-rejouer-btn:hover { background: #2e7d9e; }

.qm-fin {
    display: none;
    text-align: center;
    padding: 32px 20px;
    border: 2px solid #d0dce8;
    border-radius: 10px;
}
.qm-fin-emoji   { font-size: 40px; margin-bottom: 10px; }
.qm-fin h3      { font-size: 20px; color: #1a3a5c; margin-bottom: 6px; }
.qm-fin p       { color: #5a7a94; font-size: 14px; margin-bottom: 16px; }
.qm-score-num   { font-size: 42px; font-weight: 700; color: #1a3a5c; }
.qm-score-total { font-size: 18px; color: #5a7a94; }
.qm-rejouer-btn { margin-top: 16px; }