body {
    background: #0f1115;
    color: #e5e5e5;
    font-family: Arial, sans-serif;
    margin: 20px;
}

h1, h2, h3, h4 {
    color: #f0f0f0;
    margin-bottom: 10px;
}

hr {
    border: none;
    border-top: 1px solid #333;
    margin: 20px 0;
}

.top-controls {
    margin-bottom: 15px;
}

select {
    background: #1f2937;
    color: #e5e5e5;
    border: 1px solid #3a4758;
    padding: 8px;
    border-radius: 6px;
    margin-left: 10px;
}

/* TOP ROW : 3 cartes */
.top-row {
    display: flex;
    gap: 20px;
    align-items: flex-start;
}

.card-section {
    flex: 1;
    background: #1b1f27;
    padding: 15px;
    border-radius: 10px;
    box-shadow: 0 0 12px rgba(0,0,0,0.4);
    min-height: 200px;
}

.card-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.card-list button {
    background: #242b38;
    color: #e5e5e5;
    border: 1px solid #3a4758;
    padding: 8px 10px;
    border-radius: 6px;
    cursor: pointer;
    text-align: left;
    transition: 0.2s;
}

.card-list button:hover {
    background: #2f3b4f;
    border-color: #4ea1d3;
}

/* PLAYER CARD (prioritaire + grille) */
.player-card {
    background: #1b1f27;
    padding: 15px;
    border-radius: 10px;
    box-shadow: 0 0 8px rgba(0,0,0,0.3);
    margin-bottom: 10px;
}

.player-name {
    font-size: 1.3em;
    font-weight: bold;
    margin-bottom: 5px;
}

.player-meta {
    font-size: 0.95em;
    color: #c7c7c7;
    margin-bottom: 4px;
}

/* Barre de points */
.points-bar {
    background: #2a3548;
    height: 10px;
    border-radius: 6px;
    margin: 10px 0;
    overflow: hidden;
}

.points-bar-inner {
    background: #4ea1d3;
    height: 100%;
    width: 100%;
}

/* Pénalités */
.penalty-box {
    margin-top: 10px;
    padding: 10px;
    background: #242b38;
    border-radius: 6px;
}

.penalty-box h4 {
    margin: 0 0 8px 0;
    font-size: 1em;
}

.penalty-buttons button {
    margin: 3px;
    padding: 5px 9px;
    border: none;
    border-radius: 4px;
    background: #4ea1d3;
    color: white;
    cursor: pointer;
    font-size: 0.85em;
    transition: 0.2s;
}

.penalty-buttons button:hover {
    background: #6ec2f0;
}

/* Bouton d'attribution */
.assign-btn {
    margin-top: 12px;
    width: 100%;
    padding: 10px;
    background: #3b8c3b;
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 1em;
    cursor: pointer;
    transition: 0.2s;
}

.assign-btn:hover {
    background: #4caf50;
}

/* Grille du roster */
.grid {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
}

.grid .player-card {
    width: 230px;
}

/* Responsive */
@media (max-width: 900px) {
    .top-row {
        flex-direction: column;
    }
    .grid .player-card {
        width: 100%;
    }
}

/* Bouton principal (Historique) */
.top-controls button {
    background-color: #4a6cf7;
    color: white;
    border: none;
    padding: 10px 18px;
    border-radius: 6px;
    font-size: 15px;
    cursor: pointer;
    font-weight: 600;
    transition: background-color 0.2s ease, transform 0.1s ease;
    box-shadow: 0 2px 4px rgba(0,0,0,0.15);
}

/* Hover */
.top-controls button:hover {
    background-color: #3d5be0;
    transform: translateY(-1px);
}

/* Active (clic) */
.top-controls button:active {
    background-color: #334ec0;
    transform: translateY(0);
}

/* Pour espacer si tu ajoutes d'autres boutons */
.top-controls button + button {
    margin-left: 10px;
}

/* Conteneur du bouton */
.login-box {
    text-align: right;
    margin: 10px 20px;
}

/* Bouton Se connecter */
.login-btn {
    background-color: #4a6cf7;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 6px;
    font-size: 14px;
    cursor: pointer;
    font-weight: 600;
    transition: background-color 0.2s ease;
}

.login-btn:hover {
    background-color: #3d5be0;
}

/* Bouton Déconnexion */
.logout-btn {
    background-color: #d9534f;
    color: white;
    padding: 8px 16px;
    border-radius: 6px;
    text-decoration: none;
    font-weight: 600;
}

.logout-btn:hover {
    background-color: #c9302c;
}

/* Formulaire de login sombre */
.login-form {
    position: fixed;
    top: 20%;
    left: 50%;
    transform: translateX(-50%);
    background: #1e1e1e; /* fond sombre */
    padding: 25px 30px;
    border-radius: 10px;
    box-shadow: 0 8px 25px rgba(0,0,0,0.6);
    width: 320px;
    z-index: 999;
    color: #f0f0f0; /* texte clair */
    border: 1px solid #333;
}

.login-form h3 {
    margin-top: 0;
    text-align: center;
    color: #ffffff;
}

.login-form label {
    font-size: 14px;
    color: #cccccc;
}

.login-form input {
    width: 100%;
    padding: 10px;
    margin: 6px 0 14px;
    border-radius: 6px;
    border: 1px solid #444;
    background: #2a2a2a;
    color: #fff;
}

.login-form input:focus {
    border-color: #4a6cf7;
    outline: none;
}

/* Bouton Connexion */
.login-submit {
    width: 100%;
    background-color: #4a6cf7;
    color: white;
    border: none;
    padding: 10px;
    border-radius: 6px;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.login-submit:hover {
    background-color: #3d5be0;
}

/* Bouton Annuler */
.login-cancel {
    margin-top: 10px;
    width: 100%;
    background-color: #555;
    color: white;
    border: none;
    padding: 8px;
    border-radius: 6px;
    cursor: pointer;
}

.login-cancel:hover {
    background-color: #666;
}

/* Container du switch */
.switch {
    user-select: none;
    position: relative;
    display: inline-block;
    width: 48px;
    height: 24px;
    margin-top: 10px;
}

/* Cacher la checkbox */
.switch input {
    pointer-events: auto;
    opacity: 0;
    width: 0;
    height: 0;
}

/* Slider */
.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #555; /* gris = absent */
    transition: 0.3s;
    border-radius: 24px;
}

/* Le rond */
.slider:before {
    position: absolute;
    content: "";
    height: 18px;
    width: 18px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    border-radius: 50%;
    transition: 0.3s;
}
.switch-label {
    margin-left: 8px;
    font-size: 14px;
    color: #ccc;
}

/* Quand activé (présent) */
.switch input:checked + .slider {
    background-color: #4a6cf7; /* bleu = présent */
}

/* Déplacement du rond */
.switch input:checked + .slider:before {
    transform: translateX(24px);
}

/* Effet focus */
.switch input:focus + .slider {
    box-shadow: 0 0 3px #4a6cf7;
}
.switch .slider { 
    pointer-events: none;
}