header {
    position: relative;
}

.compte-coin {
    position: absolute;
    top: 12px;
    right: 16px;
    display: inline-flex;
    align-items: center;
    gap: 9px;
    max-width: 60%;
    padding: 4px 16px 4px 4px;
    border-radius: 999px;
    background: rgba(0, 0, 0, 0.35);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.25);
    color: #fff;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    font-size: 15px;
    font-weight: bold;
    line-height: 1;
    text-decoration: none;
    transition: background 0.3s, color 0.3s;
}

.compte-coin:hover {
    background: rgba(0, 0, 0, 0.6);
    color: #FECB00;
}

.compte-avatar {
    flex: none;
    display: block;
    width: 38px;
    height: 38px;
    border: 2px solid #fff;
    border-radius: 50%;
    background: #c9d3e6;
    overflow: hidden;
}

.compte-avatar svg {
    display: block;
    width: 100%;
    height: 100%;
    fill: #fff;
}

.compte-avatar img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.compte-nom {
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}

@media (min-width: 901px) {
    header h1 {
        padding: 0 190px;
    }
}

@media (max-width: 900px) {
    header {
        padding-top: 64px !important;
    }

    .compte-coin {
        top: 10px;
        right: 10px;
        font-size: 14px;
    }
}

@media (max-width: 600px) {
    header {
        padding: 54px 14px 14px !important;
    }

    header h1 {
        font-size: 24px !important;
        line-height: 1.2;
    }

    header p {
        margin: 6px 0 0 !important;
        font-size: 13px;
        line-height: 1.4;
    }

    header p:empty {
        display: none;
    }

    .compte-coin {
        top: 8px;
        right: 8px;
        gap: 7px;
        padding: 3px 12px 3px 3px;
        font-size: 13px;
    }

    .compte-avatar {
        width: 32px;
        height: 32px;
    }
}

.coin-droit {
    position: absolute;
    top: 12px;
    right: 16px;
    display: flex;
    align-items: center;
    gap: 10px;
    max-width: 75%;
}

.coin-droit .compte-coin {
    position: static;
    max-width: none;
    min-width: 0;
}

.notif-cloche {
    position: relative;
    flex: none;
    display: grid;
    place-items: center;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.35);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.25);
    color: #fff;
    transition: background 0.3s, color 0.3s;
}

.notif-cloche:hover {
    background: rgba(0, 0, 0, 0.6);
    color: #FECB00;
}

.notif-cloche svg {
    width: 22px;
    height: 22px;
}

.notif-nombre {
    position: absolute;
    top: -4px;
    right: -4px;
    box-sizing: border-box;
    min-width: 20px;
    height: 20px;
    padding: 0 5px;
    border: 2px solid #fff;
    border-radius: 999px;
    background: #C8102E;
    color: #fff;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    font-size: 11px;
    font-weight: bold;
    line-height: 16px;
    text-align: center;
}

@media (min-width: 901px) {
    header h1 {
        padding: 0 250px;
    }
}

@media (max-width: 900px) {
    .coin-droit {
        top: 10px;
        right: 10px;
    }
}

.fenetre-classe {
    position: fixed;
    inset: 0;
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
    padding: 16px;
    background: rgba(0, 20, 50, 0.55);
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

.fenetre-classe-boite {
    box-sizing: border-box;
    width: 100%;
    max-width: 460px;
    max-height: 100%;
    overflow-y: auto;
    padding: 24px 22px 18px;
    border-top: 6px solid #FECB00;
    border-radius: 16px;
    background: #fff;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.3);
    color: #1f2633;
    text-align: center;
}

.fenetre-classe-icone {
    font-size: 44px;
    line-height: 1;
}

.fenetre-classe-boite h2 {
    margin: 10px 0 6px;
    color: #002664;
    font-size: 22px;
}

.fenetre-classe-texte {
    margin: 0 0 6px;
    color: #555;
    font-size: 15px;
    line-height: 1.45;
}

.fenetre-classe-groupe {
    margin: 14px 0 6px;
    color: #002664;
    font-size: 13px;
    font-weight: bold;
    text-align: left;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.fenetre-classe-grille {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(118px, 1fr));
    gap: 8px;
}

.fenetre-classe-grille button {
    box-sizing: border-box;
    width: 100%;
    margin: 0;
    padding: 11px 8px;
    border: 2px solid #002664;
    border-radius: 10px;
    background: #fff;
    color: #002664;
    font: bold 15px 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    cursor: pointer;
    transition: background 0.2s, color 0.2s;
}

.fenetre-classe-grille button:hover,
.fenetre-classe-grille button.choisi {
    background: #002664;
    color: #FECB00;
}

.fenetre-classe-grille button:disabled:not(.choisi) {
    opacity: 0.5;
    cursor: default;
}

.fenetre-classe-erreur {
    margin: 12px 0 0;
    color: #c62828;
    font-weight: bold;
}

.fenetre-classe-erreur[hidden] {
    display: none;
}

.fenetre-classe-tard {
    margin: 16px 0 0;
    padding: 6px 12px;
    border: 0;
    background: none;
    color: #777;
    font: 14px 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    text-decoration: underline;
    cursor: pointer;
}

@media (max-width: 600px) {
    .coin-droit {
        top: 8px;
        right: 8px;
        gap: 8px;
    }

    .notif-cloche {
        width: 38px;
        height: 38px;
    }

    .notif-cloche svg {
        width: 20px;
        height: 20px;
    }
}
