/* --- Import police --- */
@import url('https://fonts.googleapis.com/css2?family=Rubik:wght@400;700&display=swap');

/* --- Base --- */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}
html, body {
    font-family: 'Rubik', sans-serif;
    background: #0f0f0f url('images/fond.png') center/cover no-repeat;
    color: #f0f0f0;
    line-height: 1.6;
    overflow-x: hidden;
}
a {
    text-decoration: none;
    color: inherit;
}

/* --- Header --- */
header {
    background: rgba(0,0,0,0.9);
    padding: 20px;
    text-align: center;
    border-bottom: 3px solid #3a3aff;
}
header h1 {
    font-size: 2.5em;
    color: #3a3aff;
}
header h2 {
    color: #ccc;
    font-weight: normal;
    margin-top: 5px;
}

/* --- Navigation --- */
#nav-menu a {
    position: relative;
    font-weight: 500;
    color: #f0f0f0;
    padding: 5px 10px;
    transition: color 0.3s ease;
}
#nav-menu a::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: -5px;
    width: 0;
    height: 2px;
    background-color: #3a3aff;
    transition: width 0.3s ease;
}
#nav-menu a:hover {
    color: #3a3aff;
    text-shadow: 0 0 8px #3a3aff;
}
#nav-menu a:hover::after {
    width: 100%;
}

/* --- Layout --- */
.page-container {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}
main {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    background-color: rgba(0, 0, 0, 0.9);
    padding: 40px 20px;
}

/* --- Sections --- */
.trois-encadres {
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 40px;
    padding: 40px;
    flex-wrap: wrap;
}
.encadre {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 20px;
    padding: 20px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.2);
    text-align: center;
}
.encadre.gauche, .encadre.droite {
    width: 60px;
    min-height: 300px;
    background: rgba(255, 255, 255, 0.07);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 20px;
    border-radius: 20px;
}
.encadre.centre {
    max-width: 800px;
    background: rgba(255, 255, 255, 0.07);
    padding: 40px;
    border-radius: 20px;
    text-align: center;
    flex: 1;
}

/* Logos */
.encadre.gauche a, .encadre.droite a {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 48px;
    height: 48px;
    background: #333;
    border-radius: 50%;
    font-size: 24px;
    color: white;
    transition: transform 0.3s, opacity 0.3s;
}
.encadre.gauche a:hover, .encadre.droite a:hover {
    transform: scale(1.1);
    opacity: 0.8;
}

/* Logos des streamers */
.streamer-logo {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    transition: transform 0.3s ease;
}
.streamer-logo:hover {
    transform: scale(1.1);
    opacity: 0.8;
}

/* Bouton-lien avec texte au survol */
.bouton-lien {
    position: relative;
    display: inline-block;
    overflow: hidden;
    border-radius: 8px;
}
.bouton-lien .streamer-logo {
    display: block;
    width: 100%;
    transition: opacity 0.3s ease;
}
.bouton-lien .hover-text {
  position: absolute;
  bottom: 100%; /* au-dessus */
  left: 50%;
  transform: translateX(-50%);
  background-color: rgba(0, 0, 0, 0.7);
  color: white;
  font-family: Rubik;
  font-size: 14px;
  padding: 4px 8px;
  border-radius: 6px;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
  z-index: 2;
  margin-bottom: 8px;
}
.bouton-lien:hover .hover-text {
    opacity: 1;
}
.bouton-lien:hover .streamer-logo {
    opacity: 0.3;
}

/* Bloc infos streamers */
.infos-streamers {
    margin: 50px auto;
    padding: 30px;
    background-color: rgba(0, 0, 0, 0.85);
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.5);
    border-radius: 15px;
    max-width: 800px;
    text-align: center;
    color: #fff;
    line-height: 1.8;
}

/* --- Footer --- */
footer {
    background: rgba(0,0,0,0.9);
    text-align: center;
    padding: 15px;
    border-top: 3px solid #3a3aff;
    font-size: 0.9em;
    color: #999;
}

/* --- Boutons --- */
button, .bouton-demande, .bouton-classement, .login-button, .account-btn {
    background: #3a3aff;
    color: white;
    padding: 12px 24px;
    font-weight: bold;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: background-color 0.3s;
}
button:hover, .bouton-demande:hover, .bouton-classement:hover, .login-button:hover, .account-btn:hover {
    background: #2a2ad4;
}

/* --- Formulaires --- */
form {
    display: flex;
    flex-direction: column;
    gap: 15px;
}
form input[type="text"], form textarea {
    background-color: #1e1e1e;
    color: #ffffff;
    border: 1px solid #444;
    border-radius: 8px;
    padding: 10px;
    width: 100%;
    box-sizing: border-box;
    font-family: 'Rubik', sans-serif;
}
form input[type="text"]:focus, form textarea:focus {
    border: 1px solid #3a3aff;
    outline: none;
    background-color: #1b1b1b;
}

/* --- Popup --- */
.popup {
    display: none;
    position: fixed;
    top: 0; left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.7);
    justify-content: center;
    align-items: center;
    z-index: 1000;
}
.popup-content {
    background: #1e1e1e;
    margin: 5% auto;
    padding: 30px;
    border-radius: 10px;
    width: fit-content;
    max-width: 90vw;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 0 15px rgba(0,0,0,0.5);
}
.close-btn {
    position: absolute;
    top: 10px; right: 10px;
    font-size: 1.5em;
    cursor: pointer;
}

/* --- Dropdown Account --- */
.account-dropdown {
    position: fixed;
    top: 20px;
    right: 30px;
    z-index: 9999;
}
.account-menu {
    position: absolute;
    top: 100%;
    right: 0;
    background: #1a1a1a;
    border: 1px solid #444;
    border-radius: 8px;
    min-width: 160px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s;
}
.account-menu a {
    display: block;
    padding: 12px 16px;
    color: white;
}
.account-menu a:hover {
    background: #2a2ad4;
}
.account-dropdown:hover .account-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

/* --- Calendrier --- */
.mois {
    background: rgba(0,0,0,0.7);
    padding: 20px;
    border-radius: 15px;
    margin: 20px auto;
    max-width: 900px;
}
.jours {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 8px;
}
.jour {
    background: #1e1e1e;
    padding: 10px;
    border-radius: 8px;
    text-align: center;
    min-height: 80px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}
.jour.tournoi {
    background: #3a3aff;
    color: white;
    font-weight: bold;
}
.date {
    font-size: 1.8em;
    margin-bottom: 5px;
}
.numero-tournoi {
    font-size: 1em;
}

/* --- Responsive --- */
@media (max-width: 900px) {
    .trois-encadres {
        flex-direction: column;
        align-items: center;
    }
    .encadre {
        width: 90%;
        margin: 10px auto;
    }
    main {
        padding: 20px 10px;
    }
    header h1 { font-size: 1.8em; }
    header h2 { font-size: 1.1em; }
    .jours {
        grid-template-columns: repeat(4, 1fr);
        gap: 8px;
    }
    .jour {
        min-height: 100px;
        padding: 10px;
    }
    .date {
        font-size: 1.5em;
    }
    .numero-tournoi {
        font-size: 0.9em;
    }
}
@media (max-width: 500px) {
    .jours {
        grid-template-columns: repeat(2, 1fr);
        gap: 6px;
    }
    .jour {
        min-height: 100px;
        padding: 8px;
    }
    .date {
        font-size: 1.2em;
    }
    .numero-tournoi {
        font-size: 0.8em;
    }
}

/* --- Animations --- */
@keyframes slideDown {
    from { opacity: 0; transform: translateY(-20px); }
    to { opacity: 1; transform: translateY(0); }
}

.logo-link {
  position: relative;
  display: inline-block;
  overflow: visible;
}

.logo-link .streamer-logo {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  display: block;
  transition: opacity 0.3s ease;
}

.logo-link .hover-text {
  position: absolute;
  bottom: 100%;
  left: 50%;
  transform: translateX(-50%);
  background-color: rgba(0, 0, 0, 0.7);
  color: white;
  padding: 4px 10px;
  font-size: 14px;
  font-family: Rubik, sans-serif;
  border-radius: 6px;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  margin-bottom: 6px;
  transition: opacity 0.3s ease;
  z-index: 10;
}

.logo-link:hover .hover-text {
  opacity: 1;
}

.logo-link:hover .streamer-logo {
  opacity: 0.3;
}

.profile-section, .admin-section {
            background-color: rgba(255, 255, 255, 0.05);
            border-radius: 20px;
            padding: 20px;
            box-shadow: 0 0 10px rgba(0, 0, 0, 0.2);
            text-align: center;
        }
        img.avatar {
            width: 100px;
            border-radius: 50%;
            box-shadow: 0 0 10px rgba(0,0,0,0.5);
            margin-bottom: 15px;
        }
        .admin-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    max-width: 800px;
    margin: auto;
    padding: 30px 20px;
}

 table.planning {
            width: 100%;
            border-collapse: collapse;
            text-align: center;
        }
        table.planning th, table.planning td {
            border: 1px solid #888;
            padding: 6px;
            min-width: 120px;
            vertical-align: top;
            height: 50px;
            position: relative;
        }
        .event {
            color: #fff;
            padding: 4px;
            border-radius: 5px;
            font-size: 13px;
            font-weight: bold;
        }
        .filter-roster {
            margin-bottom: 20px;
            text-align: center;
        }
        .week-nav {
            margin: 20px 0;
            text-align: center;
        }
        .week-nav a {
            margin: 0 10px;
        }