/* Style général */
body {
    font-family: 'Arial', sans-serif;
    background-color: #f7f8fa;
    color: #333;
    margin: 0;
    padding: 0;
    line-height: 1.6;
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
}

a {
    text-decoration: none; /* Supprimer la décoration de texte (souligné) */
    color: inherit; /* Conserver la couleur du bouton au lieu de la couleur du lien */
}

a:visited {
    color: inherit; /* Supprimer l'effet de lien visité */
}


/* Style de l'entête */
header {
    width: 100vw; /* Utilise la largeur totale de la fenêtre */
    padding: 40px 0;
    margin: 0;
    background-color: #0072bc;
    color: white;
    text-align: center;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

header h1 {
    font-size: 2.8rem;
    margin: 0;
}

header p {
    margin: 10px 0 20px;
    font-size: 1.2rem;
}

.submit-button {
    background-color: #0072bc;
    color: white;
    padding: 10px 20px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 1rem;
}

.submit-button:hover {
    background-color: #005a99;
}

table img {
    border-radius: 50%;
    width: 50px;
    height: 50px;
}

.admin-button {
    display: inline-block;
    margin-top: 20px; /* Ajuster selon le besoin */
    background-color: #0072bc;
    color: white;
    padding: 10px 15px;
    text-decoration: none;
    border-radius: 5px;
    font-size: 1rem;
    font-weight: bold;
    transition: background-color 0.3s ease-in-out;
    text-align: center;
}

.admin-button:hover {
    background-color: #005a99;
}

/* Style du bouton de vote */
.vote-button a {
    text-decoration: none; /* Supprime le soulignement du lien */
}

.home-button {
    position: fixed; /* Assure que le bouton reste toujours en haut à gauche */
    top: 20px;       /* Distance depuis le haut de la page */
    left: 20px;      /* Distance depuis la gauche de la page */
    background-color: #0072bc;
    color: white;
    padding: 10px 15px;
    text-decoration: none;
    border-radius: 5px;
    font-size: 1rem;
    font-weight: bold;
    transition: background-color 0.3s ease-in-out;
    z-index: 1000; /* Assure que le bouton est au-dessus des autres éléments */
}

.home-button:hover {
    background-color: #005a99;
}


/* Bouton de vote en bas à droite */
button.fixed-bottom-right {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background-color: #0072bc;
    color: white;
    padding: 15px 30px;
    border: none;
    border-radius: 50px;
    font-size: 1.2rem;
    font-weight: bold;
    transition: all 0.3s ease-in-out;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    cursor: pointer;
    z-index: 1000; /* Assure que le bouton est au-dessus des autres éléments */
}

button.fixed-bottom-right:hover {
    background-color: #005a99;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
    transform: translateY(-3px);
}

button.fixed-bottom-right:active {
    transform: translateY(2px);
}


/* Centrage des éléments */
section, .vote-button {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
    width: 100%;
}

/* Style du tableau de classement */

section {
    margin: 40px auto;
    padding: 20px;
    background-color: #fff;
    border-radius: 10px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    max-width: 70vw;
}

h2 {
    text-align: center;
    margin-bottom: 20px;
    font-size: 2rem;
    color: #333;
}

table {
    width: 100%;
    border-collapse: collapse;
    margin: 20px 0;
    border-radius: 10px;
    overflow: hidden;
}

th, td {
    padding: 15px;
    text-align: center;
    border-bottom: 1px solid #ddd;
}

th {
    background-color: #e0f0ff; /* Bleu clair pour les en-têtes */
    color: #333;
}

tr:nth-child(even) {
    background-color: #f9f9f9;
}

/* Style spécifique pour la carte du TOP TILT */
.top-tilt-section {
    text-align: center;
    margin-bottom: 40px;
}

.top-tilt-card {
    border: 0.3vw solid gold;
    font-size: 1.8em;
    font-weight: bold;
    box-shadow: 0 4px 10px rgba(255, 215, 0, 0.5);
    width: 300px;
    margin-bottom: 30px;
    background-image: linear-gradient(45deg, #ffeb3b, #fbc02d);
    padding: 15px;
    position: relative;
    animation: slideIn 1s ease-out;
}

/* Badge Top 1 */
.top-tilt-card::before {
    content: "Top #1";
    position: absolute;
    top: -10px;
    right: -10px;
    background-color: #ffcc00; /* Couleur dorée */
    color: white;
    padding: 10px 20px;
    font-size: 1.2rem;
    border-radius: 50px;
    box-shadow: 0 0 10px rgba(255, 204, 0, 0.8), 
                0 0 20px rgba(255, 204, 0, 0.6),
                5px 5px 15px rgba(0, 0, 0, 0.5); /* Ombre externe */
    text-shadow: 2px 2px 5px rgba(0, 0, 0, 0.5); /* Effet de texte en relief */
    transform: rotate(-15deg);
    z-index: 500;
    animation: pulse 2s infinite; /* Animation pour l'effet dynamique */
}


.top-tilt-card img {
    width: 100%;
    height: auto;
    border-radius: 8px;
    object-fit: cover;
}

.other-members-section {
    text-align: center;
}

.rank {
    background-color: #0072bc;
    color: white;
    font-size: 1.2rem;
    font-weight: bold;
    padding: 5px 10px;
    border-radius: 50%;
    position: absolute;
    top: -10px;
    left: -10px;
    width: 40px;
    height: 40px;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 10; /* Assure que le rank reste visible en toutes circonstances */
}

.card {
    position: relative; /* Important pour positionner correctement le numéro */
}



/* Conteneur des cartes */
.cards-container {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 20px;
}

/* Style des autres cartes */
.card {
    background-color: #fff;
    border: 1px solid #ddd;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    padding: 20px;
    text-align: center;
    transition: transform 0.2s ease-in-out;
    width: 200px; /* Taille plus petite pour les autres cartes */
}

.card:hover {
    transform: scale(1.05);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.15);
}

/* Style des images dans les cartes */
.card img {
    width: 100%;
    height: auto;
    border-radius: 8px;
    object-fit: cover;
    max-width: 150px; /* Taille par défaut */
}

.top-tilt-card img {
    max-width: 200px; /* Image plus grande pour le TOP TILT */
}


/* Effet hover sur le tableau */
tr:hover {
    background-color: #f1f1f1;
}

/* Style spécifique pour le numéro 1 */
tr.top-one {
    background-color: #f1c40f;  /* Couleur de fond dorée pour le numéro 1 */
    font-size: 1.5rem;          /* Taille de texte plus grande pour le numéro 1 */
    font-weight: bold;          /* Texte en gras */
    color: white;               /* Texte en blanc */
}

tr.top-one td {
    padding: 20px;              /* Plus de padding pour le numéro 1 */
}

tr.top-one:hover {
    background-color: #f39c12;  /* Couleur plus foncée au survol */
}

.vote-counter {
    position: fixed;
    bottom: 20px;
    left: 20px;
    background-color: #0072bc;
    color: white;
    padding: 10px 15px;
    border-radius: 5px;
    font-size: 1rem;
    font-weight: bold;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    z-index: 1000;
}



.vote-section {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 20px;
    padding: 20px;
}

/* Style des cartes */
.vote-card {
    background-color: white;
    border: 1px solid #ddd;
    border-radius: 10px;
    padding: 20px;
    width: 200px;
    text-align: center;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease-in-out, box-shadow 0.3s ease-in-out;
}

.vote-card:hover {
    transform: scale(1.05);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.2);
}

/* Style des photos */
.member-photo {
    width: 150px; /* Taille de l'image */
    height: 150px; /* Même hauteur et largeur pour un carré */
    object-fit: cover; /* Ajuste l'image pour qu'elle remplisse le carré sans déformation */
    border-radius: 0; /* Supprime les bords arrondis */
    border: 2px solid #0072bc; /* Ajoute une bordure visible autour de l'image */
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2); /* Ajoute une ombre pour plus de visibilité */
}


/* Style des boutons de vote */
.vote-button {
    background-color: #0072bc;
    color: white;
    padding: 10px 20px;
    border: none;
    border-radius: 5px;
    font-size: 1rem;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.vote-button:hover {
    background-color: #005a99;
}

.table-members {
    width: 100%; /* Utiliser toute la largeur disponible */
    border-collapse: collapse; /* Fusionner les bordures pour un look propre */
    margin-top: 20px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1); /* Ajoute une ombre légère autour du tableau */
}

.table-members th, .table-members td {
    padding: 15px; /* Ajouter de l'espace autour du contenu pour respirer */
    text-align: center; /* Centrer le texte et les images */
    border-bottom: 1px solid #ddd; /* Ligne de séparation discrète entre les lignes */
}

.table-members th {
    background-color: #f8f8f8; /* Couleur de fond plus claire pour les en-têtes */
    font-weight: bold;
    font-size: 1.1rem;
}

.table-members td img {
    display: block;
    margin: 0 auto; /* Centrer l'image dans la cellule */
    width: 100px; /* Taille ajustée pour correspondre à la taille du tableau */
    height: 100px;
    object-fit: cover;
}

.table-members tr:hover {
    background-color: #f1f1f1; /* Survol agréable sur une ligne pour accentuer le focus */
}

.cards-container {
    display: flex;
    justify-content: center;
    align-items: flex-start;
    flex-wrap: wrap;
    gap: 20px;
    margin-top: 20px;
}

.card {
    background-color: #fff;
    border: 1px solid #ddd;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    padding: 20px;
    text-align: center;
    transition: transform 0.2s ease-in-out;
}

.card img {
    width: 100px; /* Largeur du rectangle */
    height: 130px; /* Hauteur du rectangle */
    border-radius: 10px; /* Coins légèrement arrondis */
    object-fit: cover; /* Ajuste l'image pour qu'elle remplisse le cadre sans déformation */
    margin-bottom: 10px;
    border: 2px solid #0072bc; /* Ajoute une bordure pour mieux délimiter l'image */
}


.card h3 {
    margin: 10px 0 5px;
    font-size: 1.2rem;
}

.card p {
    margin: 0;
    font-size: 1rem;
    color: #333;
}

.card:hover {
    transform: scale(1.05); /* Zoom léger sur la carte au survol */
}

/* Spécifique pour le premier membre */
.card.first {
    flex-basis: 100%;
    max-width: 350px; /* Plus grand pour la première carte */
}

.card.first img {
    max-width: 200px; /* Image plus grande pour le premier */
}

/* Les autres membres plus petits */
.card.other {
    flex-basis: calc(25% - 20px);
    max-width: 200px;
}

/* Animation d'entrée */
@keyframes pulse {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.1);
    }
    100% {
        transform: scale(1);
    }
}

.delete-button {
    color: red; /* Couleur rouge pour la croix */
    font-size: 1.5rem; /* Taille de la croix */
    text-decoration: none; /* Supprimer le soulignement */
    margin-top: 10px;
    display: inline-block;
    transition: color 0.3s ease;
}

.delete-button:hover {
    color: darkred; /* Couleur plus sombre au survol */
}

.message-success {
    background-color: #dff0d8;
    color: #3c763d;
    padding: 15px;
    border-radius: 5px;
    border: 1px solid #d6e9c6;
    font-size: 1.1rem;
    display: flex;
    align-items: center;
}

.message-error {
    background-color: #f2dede;
    color: #a94442;
    padding: 15px;
    border-radius: 5px;
    border: 1px solid #ebccd1;
    font-size: 1.1rem;
    display: flex;
    align-items: center;
}

.message-success i, .message-error i {
    margin-right: 10px;
    font-size: 1.5rem;
}

/* Icon styles */
i.success-icon {
    content: "\2714"; /* Checkmark symbol */
    color: #3c763d;
}

i.error-icon {
    content: "\2716"; /* Cross symbol */
    color: #a94442;
}

.message-container {
    margin-top: 40px;
}

.search-bar {
    padding: 10px;
    font-size: 1rem;
    border-radius: 5px;
    border: 1px solid #ddd;
    width: 65vw;
    margin-bottom: 20px;
}

.search-button {
    background-color: #0072bc;
    color: white;
    padding: 10px 15px;
    border: none;
    border-radius: 5px;
    font-size: 1rem;
    cursor: pointer;
}

.search-button:hover {
    background-color: #005a99;
}

.music-control {
    position: fixed;
    bottom: 20px;
    left: 20px;
    z-index: 1000;
}

/* Style du bouton play/pause */
.play-pause-button {
    background-color: #0072bc;
    color: white;
    border: none;
    padding: 15px;
    border-radius: 50%;
    font-size: 1.5rem;
    cursor: pointer;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    transition: background-color 0.3s ease, transform 0.2s ease;
}

.play-pause-button:hover {
    background-color: #005a99;
    transform: scale(1.1);
}

.play-pause-button:active {
    transform: scale(0.9);
}

.countdown-timer {
    position: fixed;
    top: 20px;
    right: 20px;
    background-color: #0072bc;
    color: white;
    padding: 10px 20px;
    border-radius: 5px;
    font-size: 1.2rem;
    font-weight: bold;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    z-index: 2000;
}



/* Réactivité et alignement sur mobile */
@media (max-width: 600px) {
    header h1 {
        font-size: 1.8rem; /* Ajuste la taille de la police */
        padding: 20px 0; /* Réduit le padding */
    }

    .top-tilt-card {
        margin: 2vw auto;
        padding: 0.1vw;
        width: 60vw;
    }

    .top-tilt-card img{
        padding-top: 4vw;
    }

    .fixed-bottom-right {
        font-size: 1rem;
        padding: 10px 20px;
        bottom: 10px;
        right: 10px;
    }

    .other-members-section h2 {
        font-size: 1.8rem;
        margin-bottom: 10px;
    }
    .admin-button {
        top: 10px; /* Ajuste la distance par rapport au haut */
        left: 10px; /* Ajuste la distance par rapport à la gauche */
        z-index: 1; /* S'assure qu'il ne gêne pas le contenu */
        font-size: 0.9rem; /* Réduit la taille de la police pour mobile */
    }

    /* Ajuste le bouton de vote pour s'adapter à la taille de l'écran */
    button.fixed-bottom-right {
        padding: 10px 20px;
        font-size: 1rem;
    }
}
