body {
    background: linear-gradient(to right, #6a11cb, #2575fc);
    font-family: 'Montserrat', sans-serif;
}

.header {
    text-align: center;
}

.navbar {
    background-color: #1e90ff;
    overflow: hidden;
    position: sticky; /* Changement de relative à sticky */
    top: 0; /* ajout Reste en haut de la fenêtre lors du défilement */
    /*z-index: 1;*/
    z-index: 1000; /* ajout Assure qu'il est au-dessus des autres contenus */
    display: flex;
    flex-wrap: wrap;
    width: 100%; /* ajout Prend toute la largeur */
    border-left: 1px solid #555; /* Bordure à gauche */
    border-top: 1px solid #555; /* Bordure en haut */
    border-bottom: 1px solid #555; /* Bordure en bas */
    border-right: 1px solid #555; /* Bordure à droite */
}

.navbar a {
    color: #f8d74a;
    text-align: center;
    padding: 14px 16px;
    text-decoration: none;
    transition: background-color 0.3s;
    flex-grow: 1; /* Permet aux liens de prendre autant d'espace que possible */
    border-left: 1px solid #555; /* Bordure à gauche */
    border-top: 1px solid #555; /* Bordure en haut */
    border-bottom: 1px solid #555; /* Bordure en bas */
    border-right: 1px solid #555; /* Bordure à droite */
}

/* Animation de respiration */
@keyframes breathing {
    0% {
        transform: scale(1); /* Taille normale */
        background-color: #4ea6ff; /* Couleur de base */
    }
    50% {
        transform: scale(1.05); /* Légèrement agrandi */
        background-color: #6bb3ff; /* Couleur plus claire */
    }
    100% {
        transform: scale(1); /* Retour à la taille normale */
        background-color: #4ea6ff; /* Retour à la couleur de base */
    }
}

.navbar a:hover {
    background-color: #4ea6ff;
    color: yellow;
    animation: breathing 1.5s infinite; /* Applique l'animation en boucle */
}

.navbar a.active {
    background-color: #4ea6ff;
    color: yellow;
}

.navbar ul {
    list-style-type: none;
    margin: 0;
    padding: 0;
    display: flex;
    justify-content: space-around;
    width: 100%; /* Assure que la liste prend toute la largeur */
}

.navbar li {
    position: relative;
    flex-grow: 1; /* Permet aux éléments de prendre autant d'espace que possible */
}

.navbar li a {
    display: block;
    padding: 14px 16px;
    color: #f8d74a;
    text-decoration: none;
    transition: background-color 0.3s;
}

.navbar li a:hover {
    background-color: #4ea6ff;
    color: #f8d74a;
}

.navbar li a.active {
    background-color: #4ea6ff;
    color: #f8d74a;
}

.navbar span {
    display: block;
    padding: 14px 16px;
    color: #f8d74a;
    cursor: default;
    transition: background-color 0.3s;
}

.navbar span:hover {
    background-color: #4ea6ff;
    color: #f8d74a;
}

.navbar span.active {
    background-color: #4ea6ff;
    color: #f8d74a;
}

.hdv-table, .gdc-table, .dons-table, .attaques-table, .trophes-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
}

.hdv-table th, .hdv-table td, .gdc-table th, .gdc-table td, .dons-table th, .dons-table td, .attaques-table th, .attaques-table td, .trophes-table th, .trophes-table td {
    border: 1px solid #ddd;
    padding: 8px;
    text-align: center;
}

.hdv-table th, .gdc-table th, .dons-table th, .attaques-table th, .trophes-table th {
    background-color: #1e90ff;
    font-weight: bold;
}

.hdv-table tr:nth-child(even), .gdc-table tr:nth-child(even), .dons-table tr:nth-child(even), .attaques-table tr:nth-child(even), .trophes-table tr:nth-child(even) {
    background-color: #f9f9f9;
}

.hdv-table tr:hover, .gdc-table tr:hover, .dons-table tr:hover, .attaques-table tr:hover, .trophes-table tr:hover {
    background-color: #f5f5f5;
}

@media screen and (max-width: 800px) {
    .container {
        width: 95%;
        padding: 10px;
    }

    .header {
        flex-direction: column;
        align-items: center;
    }

    .clan-name {
        font-size: 1.5em;
        margin-bottom: 10px;
    }

    .logo-container {
        width: 80px;
        height: 80px;
    }

    .rotating-logo {
        width: 80px;
        height: 80px;
    }

    h1 {
        font-size: 1.5em;
    }

    .war-form {
        padding: 10px;
    }

    .war-form img {
        width: 40px;
        height: 40px;
    }

    .form-group {
        margin-bottom: 10px;
    }

    .form-group label {
        font-size: 0.9em;
    }

    .form-group input,
    .form-group textarea {
        font-size: 0.9em;
        padding: 5px;
    }

    .submit-btn {
        font-size: 0.9em;
        padding: 8px 15px;
    }

    .clan-copyright {
        font-size: 0.8em;
    }
}

/* Media query pour les petits écrans */
@media (max-width: 768px) {
    .navbar a {
        width: 50%; /* Affiche deux boutons par ligne */
        box-sizing: border-box; /* Inclut le padding dans la largeur */
        border-bottom: 1px solid #555; /* Ajoute une ligne de séparation */
    }

    .navbar a:nth-child(even) {
        border-left: 1px solid #555; /* Ajoute une ligne de séparation entre les boutons */
    }

    .navbar a:last-child {
        /*border-bottom: none; /* Retire la ligne de séparation du dernier lien */
    }
    
    .navbar {
        position: relative; /* Changement de sticky a relative */
    }
}

/* Media query pour les très petits écrans (smartphones en mode portrait) */
@media (max-width: 480px) {
    .navbar a {
        width: 50%; /* Affiche deux boutons par ligne sur les très petits écrans */
        /*border-left: none; /* Retire la ligne de séparation */
        padding: 8px 10px; /* Réduit l'espace autour des liens */
        font-size: 12px; /* Réduit la taille de la police */
    }
    
    .navbar {
    position: relative; /* Changement de relative à sticky */
}
}