:root {
    --bleu-nuit: #123a4d;
    --bleu-teal: #1c7c8c;
    --teal-clair: #e4f4f3;
    --corail: #ef7d5c;
    --corail-clair: #fdece5;
    --rouge: #c0392b;
    --rouge-clair: #fdecea;
    --gris-texte: #3c4a52;
    --blanc: #ffffff;
    --ombre: 0 8px 24px rgba(18, 58, 77, 0.10);
    --rayon: 18px;
}

* { box-sizing: border-box; }

body {
    margin: 0;
    font-family: 'Poppins', 'Segoe UI', system-ui, sans-serif;
    background: linear-gradient(180deg, #f4faf9 0%, #eaf3f2 100%);
    color: var(--gris-texte);
    min-height: 100vh;
}

.entete {
    background: linear-gradient(120deg, var(--bleu-nuit), var(--bleu-teal));
    color: var(--blanc);
    padding: 16px 20px 28px;
    text-align: center;
    position: relative;
}

.entete h1 {
    margin: 0 0 4px;
    font-size: 1.35rem;
    letter-spacing: 0.3px;
}

.entete .soustitre {
    opacity: 0.9;
    font-size: 0.85rem;
    margin: 0;
    max-width: 520px;
    margin: 0 auto;
}

.entete .pastille {
    display: inline-block;
    background: rgba(255,255,255,0.18);
    border-radius: 999px;
    padding: 3px 12px;
    font-size: 0.72rem;
    letter-spacing: 1px;
    text-transform: uppercase;
    margin-bottom: 6px;
}

.conteneur {
    max-width: 780px;
    margin: -14px auto 40px;
    padding: 0 18px;
}

.bloc-aide {
    margin-bottom: 14px;
    text-align: center;
}

.texte-aide {
    background: var(--teal-clair);
    color: var(--bleu-nuit);
    border-radius: 12px;
    padding: 14px 16px;
    margin-top: 10px;
    font-size: 0.88rem;
    line-height: 1.55;
    text-align: left;
}

.barre-compte {
    background: var(--blanc);
    border-radius: var(--rayon);
    box-shadow: var(--ombre);
    padding: 14px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 22px;
    flex-wrap: wrap;
    gap: 10px;
}

.barre-compte .infos-compte {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 600;
    color: var(--bleu-nuit);
}

.barre-compte .actions-compte {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.avatar-rond {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: var(--corail);
    color: var(--blanc);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
}

.points-badge {
    background: var(--teal-clair);
    color: var(--bleu-teal);
    padding: 4px 12px;
    border-radius: 999px;
    font-size: 0.85rem;
    font-weight: 700;
}

.bouton {
    border: none;
    border-radius: 12px;
    padding: 10px 18px;
    font-weight: 600;
    cursor: pointer;
    font-size: 0.92rem;
    transition: transform 0.1s ease, box-shadow 0.15s ease;
}
.bouton:active { transform: scale(0.97); }

.bouton-principal {
    background: var(--corail);
    color: var(--blanc);
}
.bouton-principal:hover { box-shadow: 0 4px 14px rgba(239,125,92,0.4); }

.bouton-discret {
    background: transparent;
    color: var(--bleu-teal);
    border: 1.5px solid var(--bleu-teal);
}

.bouton-discret:hover { background: var(--teal-clair); }

.bouton-danger {
    background: transparent;
    color: var(--rouge);
    border: 1.5px solid var(--rouge);
}
.bouton-danger:hover { background: var(--rouge-clair); }

.carte {
    background: var(--blanc);
    border-radius: var(--rayon);
    box-shadow: var(--ombre);
    padding: 24px;
    margin-bottom: 22px;
}

.carte h2 {
    margin-top: 0;
    color: var(--bleu-nuit);
    font-size: 1.25rem;
}

.champ {
    width: 100%;
    padding: 11px 14px;
    border-radius: 10px;
    border: 1.5px solid #d6e4e2;
    font-size: 0.95rem;
    margin-bottom: 12px;
    font-family: inherit;
}
.champ:focus { outline: none; border-color: var(--bleu-teal); }

.ligne-onglets {
    display: flex;
    gap: 8px;
    margin-bottom: 16px;
}

.onglet {
    flex: 1;
    text-align: center;
    padding: 9px;
    border-radius: 10px;
    background: var(--teal-clair);
    color: var(--bleu-teal);
    font-weight: 600;
    cursor: pointer;
    font-size: 0.88rem;
}

.onglet.actif {
    background: var(--bleu-teal);
    color: var(--blanc);
}

.enonce-cas {
    background: var(--corail-clair);
    border-left: 4px solid var(--corail);
    padding: 14px 16px;
    border-radius: 10px;
    line-height: 1.55;
    font-size: 0.98rem;
}

.liste-indices {
    list-style: none;
    padding: 0;
    margin: 14px 0;
}

.liste-indices li {
    background: var(--teal-clair);
    border-radius: 10px;
    padding: 10px 14px;
    margin-bottom: 8px;
    font-size: 0.9rem;
    color: var(--bleu-nuit);
}

.liste-indices li::before {
    content: "💡 ";
}

.pastilles-tentatives {
    display: flex;
    gap: 6px;
    margin-bottom: 14px;
}

.pastille-tentative {
    width: 26px; height: 26px;
    border-radius: 50%;
    background: #e6ecec;
    display: flex; align-items: center; justify-content: center;
    font-size: 0.75rem;
    color: #90a3a3;
}
.pastille-tentative.utilisee { background: var(--corail); color: var(--blanc); }
.pastille-tentative.reussie { background: #3fae6a; color: var(--blanc); }

.retour {
    margin-top: 12px;
    padding: 12px 16px;
    border-radius: 10px;
    font-size: 0.92rem;
    line-height: 1.5;
}
.retour.succes { background: #e8f7ee; color: #256d43; border-left: 4px solid #3fae6a; }
.retour.echec { background: #fdecec; color: #a03c34; border-left: 4px solid #e15c50; }
.retour.info { background: var(--teal-clair); color: var(--bleu-nuit); border-left: 4px solid var(--bleu-teal); }

table.classement {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.92rem;
}

table.classement th {
    text-align: left;
    color: #7f9494;
    font-weight: 600;
    font-size: 0.78rem;
    text-transform: uppercase;
    padding: 6px 8px;
    border-bottom: 2px solid #eef3f2;
}

table.classement td {
    padding: 9px 8px;
    border-bottom: 1px solid #f1f5f4;
}

table.classement tr.moi td { background: var(--corail-clair); font-weight: 700; }

.rang-medaille { font-size: 1.05rem; }

.message-vide {
    text-align: center;
    color: #8fa0a0;
    padding: 20px 0;
    font-size: 0.9rem;
}

.pied-page {
    text-align: center;
    font-size: 0.78rem;
    color: #93a3a3;
    padding: 10px 0 30px;
}

.masque { display: none !important; }

@media (max-width: 480px) {
    .entete h1 { font-size: 1.15rem; }
    .entete .soustitre { font-size: 0.8rem; }
    .carte { padding: 18px; }
}
