* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --black: #000000;
    --dark-gray: #1d1d1f;
    --gray: #86868b;
    --light-gray: #f5f5f7;
    --white: #ffffff;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background-color: var(--white);
    color: var(--dark-gray);
    line-height: 1.6;
    min-height: 100vh;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

/* Header */
header {
    background-color: var(--dark-gray);
    color: var(--white);
    padding: 15px 0;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
    backdrop-filter: blur(20px);
}

header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

header h1 {
    font-size: 1.5rem;
    font-weight: 600;
    letter-spacing: -0.5px;
}

nav {
    display: flex;
    gap: 20px;
    align-items: center;
}

nav a {
    color: var(--light-gray);
    text-decoration: none;
    font-size: 0.95rem;
    transition: var(--transition);
    padding: 8px 15px;
    border-radius: 20px;
}

nav a:hover {
    color: var(--white);
    background-color: rgba(255,255,255,0.1);
}

nav a.active {
    color: var(--white);
    background-color: rgba(255,255,255,0.15);
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 12px 30px;
    border: none;
    border-radius: 25px;
    cursor: pointer;
    font-size: 0.95rem;
    font-weight: 500;
    text-decoration: none;
    transition: var(--transition);
    text-align: center;
}

.btn-primary {
    background-color: var(--black);
    color: var(--white);
}

.btn-primary:hover {
    background-color: var(--dark-gray);
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.2);
}

.btn-secondary {
    background-color: var(--light-gray);
    color: var(--black);
}

.btn-secondary:hover {
    background-color: var(--gray);
    color: var(--white);
    transform: translateY(-2px);
}

.btn-danger {
    background-color: #ff3b30;
    color: var(--white);
}

.btn-danger:hover {
    background-color: #d62f24;
    transform: translateY(-2px);
}

.btn-small {
    padding: 8px 20px;
    font-size: 0.85rem;
}

/* Forms */
.auth-box {
    max-width: 450px;
    margin: 80px auto;
    padding: 50px;
    background-color: var(--white);
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.1);
    animation: fadeIn 0.6s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.auth-box h1 {
    font-size: 2rem;
    margin-bottom: 30px;
    text-align: center;
    font-weight: 600;
    letter-spacing: -1px;
}

.form-group {
    margin-bottom: 25px;
}

label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    font-size: 0.9rem;
    color: var(--dark-gray);
}

input[type="text"],
input[type="password"],
input[type="number"],
input[type="file"],
select,
textarea {
    width: 100%;
    padding: 15px;
    border: 2px solid var(--light-gray);
    border-radius: 12px;
    font-size: 1rem;
    transition: var(--transition);
    background-color: var(--light-gray);
}

input:focus,
select:focus,
textarea:focus {
    outline: none;
    border-color: var(--black);
    background-color: var(--white);
}

/* Alerts */
.alert {
    padding: 15px 20px;
    border-radius: 12px;
    margin-bottom: 20px;
    animation: slideDown 0.3s ease;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.alert-success {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.alert-error {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.alert-info {
    background-color: #d1ecf1;
    color: #0c5460;
    border: 1px solid #bee5eb;
}

/* Games Grid */
.games-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 30px;
    margin-top: 30px;
}

.game-card {
    background-color: var(--white);
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0,0,0,0.08);
    transition: var(--transition);
    cursor: pointer;
    position: relative;
}

.game-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(0,0,0,0.15);
}

.game-card img {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.game-card-content {
    padding: 20px;
}

.game-card h3 {
    font-size: 1.1rem;
    margin-bottom: 10px;
    font-weight: 600;
}

.vote-count {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--gray);
    font-size: 0.9rem;
}

.vote-btn {
    width: 100%;
    margin-top: 15px;
}

.voted {
    background-color: var(--black);
    color: var(--white);
}

/* Teams */
.teams-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 25px;
    margin-top: 30px;
}

.team-card {
    background-color: var(--light-gray);
    padding: 25px;
    border-radius: 20px;
    transition: var(--transition);
}

.team-card:hover {
    background-color: var(--dark-gray);
    color: var(--white);
    transform: translateY(-5px);
}

.team-name {
    font-size: 1.3rem;
    font-weight: 600;
    margin-bottom: 15px;
}

.team-points {
    font-size: 2rem;
    font-weight: 700;
    margin: 15px 0;
}

.team-players {
    font-size: 0.9rem;
    color: var(--gray);
    margin-bottom: 15px;
}

.team-card:hover .team-players {
    color: var(--light-gray);
}

/* Table */
table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 30px;
    background-color: var(--white);
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0,0,0,0.08);
}

thead {
    background-color: var(--dark-gray);
    color: var(--white);
}

th, td {
    padding: 20px;
    text-align: left;
}

tbody tr {
    border-bottom: 1px solid var(--light-gray);
    transition: var(--transition);
}

tbody tr:hover {
    background-color: var(--light-gray);
}

tbody tr:last-child {
    border-bottom: none;
}

/* Admin Actions */
.admin-actions {
    display: flex;
    gap: 10px;
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.7);
    z-index: 2000;
    animation: fadeIn 0.3s ease;
}

.modal-content {
    position: relative;
    background-color: var(--white);
    margin: 50px auto;
    padding: 40px;
    max-width: 600px;
    border-radius: 20px;
    animation: slideDown 0.3s ease;
}

.close {
    position: absolute;
    top: 20px;
    right: 25px;
    font-size: 30px;
    cursor: pointer;
    color: var(--gray);
}

.close:hover {
    color: var(--black);
}

/* Section Title */
.section-title {
    font-size: 2.5rem;
    font-weight: 700;
    margin: 40px 0 20px 0;
    letter-spacing: -1.5px;
}

.section-subtitle {
    color: var(--gray);
    font-size: 1.1rem;
    margin-bottom: 30px;
}

/* Vote Limit Info */
.vote-info {
    background-color: var(--light-gray);
    padding: 20px;
    border-radius: 15px;
    margin-bottom: 30px;
    text-align: center;
}

.vote-info strong {
    font-size: 1.2rem;
    color: var(--black);
}

/* Responsive */
@media (max-width: 768px) {
    .games-grid,
    .teams-grid {
        grid-template-columns: 1fr;
    }
    
    .auth-box {
        margin: 40px auto;
        padding: 30px;
    }
    
    header .container {
        flex-direction: column;
        gap: 15px;
    }
    
    nav {
        flex-wrap: wrap;
        justify-content: center;
    }
    
    table {
        font-size: 0.85rem;
    }
    
    th, td {
        padding: 10px;
    }
}

/* Loading Animation */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid var(--light-gray);
    border-radius: 50%;
    border-top-color: var(--black);
    animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Image Preview */
.image-preview {
    max-width: 200px;
    margin-top: 10px;
    border-radius: 10px;
}

/* Footer */
footer {
    background-color: var(--dark-gray);
    color: var(--light-gray);
    text-align: center;
    padding: 30px 20px;
    margin-top: 80px;
}

/* ========================================
   PROFIL UTILISATEUR
======================================== */

.profile-container {
    max-width: 600px;
    margin: 3rem auto;
    background: var(--white);
    padding: 3rem;
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.1);
    text-align: center;
    animation: fadeIn 0.6s ease;
}

.profile-header {
    margin-bottom: 2rem;
}

.profile-header h1 {
    font-size: 2rem;
    font-weight: 600;
    letter-spacing: -1px;
    margin-bottom: 0.5rem;
}

.profile-subtitle {
    color: var(--gray);
    font-size: 0.95rem;
}

.avatar-section {
    margin: 2.5rem 0;
}

.avatar-preview {
    width: 150px;
    height: 150px;
    border-radius: 50%;
    object-fit: cover;
    border: 5px solid var(--light-gray);
    margin: 0 auto 1.5rem;
    display: block;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    transition: var(--transition);
}

.avatar-preview:hover {
    transform: scale(1.05);
    box-shadow: 0 15px 40px rgba(0,0,0,0.15);
}

.username-display {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--dark-gray);
    margin-top: 1rem;
}

.upload-form {
    background: var(--light-gray);
    padding: 2rem;
    border-radius: 15px;
    margin-top: 2rem;
}

.file-input-wrapper {
    position: relative;
    margin-bottom: 1.5rem;
}

.file-input-label {
    display: inline-block;
    padding: 12px 30px;
    background: var(--black);
    color: var(--white);
    border-radius: 25px;
    cursor: pointer;
    font-size: 0.95rem;
    font-weight: 500;
    transition: var(--transition);
}

.file-input-label:hover {
    background: var(--dark-gray);
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.2);
}

input[type="file"] {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.file-name {
    margin: 1rem 0;
    color: var(--gray);
    font-size: 0.9rem;
    min-height: 20px;
}

.btn-upload {
    width: 100%;
    padding: 15px;
    background: var(--black);
    color: var(--white);
    border: none;
    border-radius: 25px;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
}

.btn-upload:hover {
    background: var(--dark-gray);
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.2);
}

.btn-upload:active {
    transform: translateY(0);
}

.message {
    padding: 15px 20px;
    border-radius: 12px;
    margin-bottom: 1.5rem;
    animation: slideDown 0.3s ease;
    font-weight: 500;
}

.message.success {
    background-color: #d4edda;
    color: #155724;
    border: 2px solid #c3e6cb;
}

.message.error {
    background-color: #f8d7da;
    color: #721c24;
    border: 2px solid #f5c6cb;
}

.back-link {
    display: inline-block;
    margin-top: 2rem;
    color: var(--gray);
    text-decoration: none;
    font-size: 0.95rem;
    transition: var(--transition);
    padding: 8px 15px;
    border-radius: 20px;
}

.back-link:hover {
    color: var(--black);
    background: var(--light-gray);
}

/* Avatar dans le header */
.user-info {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 5px 12px;
    border-radius: 25px;
    transition: var(--transition);
}

.user-info:hover {
    background-color: rgba(255,255,255,0.1);
}

.user-avatar {
    width: 35px;
    height: 35px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--light-gray);
    transition: var(--transition);
}

.user-info:hover .user-avatar {
    border-color: var(--white);
    transform: scale(1.1);
}

/* Responsive Profil */
@media (max-width: 768px) {
    .profile-container {
        margin: 2rem auto;
        padding: 2rem 1.5rem;
    }

    .profile-header h1 {
        font-size: 1.5rem;
    }

    .avatar-preview {
        width: 120px;
        height: 120px;
    }

    .username-display {
        font-size: 1.2rem;
    }

    .upload-form {
        padding: 1.5rem;
    }
}

/* Animation pour le changement d'avatar */
@keyframes avatarChange {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}

.avatar-preview.updated {
    animation: avatarChange 0.5s ease;
}

/* Info formats acceptés */
.file-info {
    font-size: 0.85rem;
    color: var(--gray);
    margin-top: 0.5rem;
}

/* === PROFILS CLIQUABLES === */
.team-players a {
    color: #667eea;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
    position: relative;
}

.team-players a::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, #667eea 0%, #764ba2 100%);
    transition: width 0.3s ease;
}

.team-players a:hover {
    color: #764ba2;
}

.team-players a:hover::after {
    width: 100%;
}

/* === PAGE DE PROFIL PUBLIC === */
.profile-header {
    position: relative;
    overflow: hidden;
}

.profile-header::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: repeating-linear-gradient(
        45deg,
        transparent,
        transparent 10px,
        rgba(255,255,255,0.05) 10px,
        rgba(255,255,255,0.05) 20px
    );
    animation: shimmer 20s linear infinite;
}

@keyframes shimmer {
    0% { transform: translate(0, 0); }
    100% { transform: translate(50%, 50%); }
}

/* ================================
   LISTE DES PARTICIPANTS
================================ */

.participants-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
    margin-top: 40px;
}

.participant-card {
    background-color: var(--white);
    border: 1px solid var(--light-gray);
    border-radius: 18px;
    padding: 30px;
    text-align: center;
    text-decoration: none;
    color: var(--dark-gray);
    transition: var(--transition);
    display: block;
}

.participant-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 40px rgba(0,0,0,0.1);
    border-color: var(--black);
}

.participant-avatar {
    width: 120px;
    height: 120px;
    margin: 0 auto 20px;
    position: relative;
}

.participant-avatar img {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--light-gray);
}

.you-badge {
    position: absolute;
    top: 0;
    right: 0;
    background-color: var(--black);
    color: var(--white);
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 0.7rem;
    font-weight: 600;
}

.participant-name {
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 12px;
    letter-spacing: -0.5px;
}

.participant-team {
    background-color: var(--light-gray);
    padding: 8px 16px;
    border-radius: 20px;
    display: inline-block;
    font-size: 0.9rem;
    margin-bottom: 10px;
}

.participant-team-name {
    font-weight: 600;
    color: var(--black);
}

.participant-team-points {
    color: var(--gray);
    margin-left: 5px;
}

.participant-votes {
    color: var(--gray);
    font-size: 0.85rem;
    margin-top: 8px;
}

.participant-votes strong {
    color: var(--black);
}

/* ================================
   STATISTIQUES
================================ */

.participants-stats {
    background-color: var(--dark-gray);
    color: var(--white);
    border-radius: 18px;
    padding: 50px;
    margin-top: 60px;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 40px;
}

.stat-box {
    text-align: center;
}

.stat-number {
    font-size: 3.5rem;
    font-weight: 700;
    margin-bottom: 8px;
    letter-spacing: -2px;
}

.stat-label {
    font-size: 0.85rem;
    color: var(--light-gray);
    text-transform: uppercase;
    letter-spacing: 1.5px;
    font-weight: 500;
}

/* ================================
   RESPONSIVE
================================ */

@media (max-width: 768px) {
    .participants-grid {
        grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
        gap: 15px;
    }

    .participant-card {
        padding: 25px;
    }

    .participant-avatar {
        width: 100px;
        height: 100px;
    }

    .participants-stats {
        padding: 40px 25px;
        gap: 30px;
    }

    .stat-number {
        font-size: 2.8rem;
    }
}

@media (max-width: 480px) {
    .participants-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }

    .participant-card {
        padding: 20px;
    }

    .participant-avatar {
        width: 80px;
        height: 80px;
    }

    .participant-name {
        font-size: 1rem;
    }

    .participants-stats {
        grid-template-columns: 1fr;
        padding: 30px 20px;
        gap: 25px;
    }
}

/* ================================
   PARTICIPANT INFO
================================ */
.participant-no-team {
    color: #ff9800;
    font-size: 0.85rem;
    margin-top: 8px;
}

.participant-points {
    color: var(--gray);
    font-size: 0.85rem;
    margin-top: 5px;
}

.admin-badge {
    position: absolute;
    top: -5px;
    right: -5px;
    font-size: 1.2rem;
}

/* ================================
   VIDEO IFRAME
================================ */
.video-container {
    display: flex;
    justify-content: center;
    margin: 40px 0;
}

.video-container iframe {
    width: 100%;
    max-width: 560px;
}

/* ================================
   COUNTDOWN TIMER
================================ */
#countdown-container {
    text-align: center;
    margin: 50px 0;
}

.countdown-wrapper {
    background: #000;
    padding: 40px;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
    max-width: 800px;
    margin: 0 auto;
    border: 2px solid #333;
}

.countdown-title {
    color: #fff;
    font-size: 2.5rem;
    font-weight: bold;
    margin-bottom: 20px;
}

.countdown-subtitle {
    font-size: 1.3rem;
    color: #f0f0f0;
    margin-bottom: 10px;
}

.countdown-event-title {
    color: #fff;
    font-size: 1.8rem;
    margin-bottom: 15px;
}

.countdown-event-dates {
    color: #f0f0f0;
    font-size: 1.2rem;
    margin-bottom: 25px;
}

.countdown-label-text {
    color: #ffd700;
    font-size: 1.3rem;
    margin-bottom: 10px;
    font-weight: bold;
}

#countdown-timer {
    display: flex;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap;
}

.countdown-block {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border-radius: 15px;
    padding: 20px;
    min-width: 100px;
    transition: all 0.3s ease;
}

.countdown-block:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.3);
}

.countdown-number {
    font-size: 3rem;
    font-weight: bold;
    color: #ffd700;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
    margin-bottom: 5px;
}

.countdown-label {
    font-size: 1rem;
    color: #f0f0f0;
    text-transform: uppercase;
    letter-spacing: 2px;
}

.countdown-footer {
    color: #f0f0f0;
    font-size: 1rem;
    margin-top: 20px;
    opacity: 0.9;
}

@media (max-width: 768px) {
    .countdown-number {
        font-size: 2rem;
    }

    .countdown-block {
        min-width: 70px;
        padding: 15px;
    }

    .countdown-wrapper {
        padding: 30px 20px !important;
    }
}

/* ================================
   TEAM RANKING
================================ */
.team-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.team-ranking-number {
    font-size: 2rem;
    opacity: 0.3;
}

.team-medal {
    font-size: 2rem;
}

.team-player-link {
    color: #667eea;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s;
}

.team-player-link:hover {
    color: #764ba2;
    text-decoration: underline;
}

/* ================================
   GAMES SECTION
================================ */
.game-selected-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    background: #ffd700;
    color: #000;
    padding: 5px 15px;
    border-radius: 20px;
    font-weight: bold;
    font-size: 1.1rem;
    z-index: 10;
}

.game-card.selected {
    border: 3px solid #ffd700;
    box-shadow: 0 4px 15px rgba(255, 215, 0, 0.3);
}

.game-placeholder {
    height: 200px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
}

.game-selected-status {
    margin-top: 10px;
    padding: 8px;
    background: #d4edda;
    color: #155724;
    border-radius: 5px;
    font-weight: bold;
}

.game-vote-emoji {
    font-size: 1.5rem;
}

.games-warning {
    color: #e74c3c;
    font-weight: bold;
}

.section-title-spacing {
    margin-top: 60px;
}

/* ================================
   CSS EXTRAIT DE vote.php
================================ */
.voting-closed {
    text-align: center;
    font-size: 1.2rem;
}

.vote-emoji {
    font-size: 1.5rem;
}

/* ================================
   CSS EXTRAIT DE profile/index.php
================================ */
.profile-share-section {
    margin-top: 30px;
    text-align: center;
    padding: 20px;
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.1) 0%, rgba(118, 75, 162, 0.1) 100%);
    border-radius: 15px;
}

.profile-share-text {
    margin-bottom: 15px;
    font-size: 1.1rem;
}

.profile-share-buttons {
    display: flex;
    gap: 10px;
    justify-content: center;
    flex-wrap: wrap;
}

/* ================================
   CSS EXTRAIT DE profile/view.php
================================ */
.profile-view-container {
    max-width: 900px;
    margin-top: 40px;
}

.profile-view-header {
    background-color: var(--dark-gray);
    border-radius: 18px;
    padding: 50px 40px;
    text-align: center;
    color: var(--white);
    margin-bottom: 30px;
}

.profile-view-avatar-wrapper {
    margin-bottom: 25px;
}

.profile-view-avatar {
    width: 140px;
    height: 140px;
    border-radius: 50%;
    border: 3px solid var(--white);
    object-fit: cover;
}

.profile-view-username {
    font-size: 2.2rem;
    margin: 15px 0 10px 0;
    font-weight: 600;
    letter-spacing: -1px;
}

.profile-view-admin-badge {
    background-color: var(--white);
    color: var(--black);
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 0.8rem;
    margin-left: 10px;
    font-weight: 600;
}

.profile-view-team {
    font-size: 1.1rem;
    color: var(--light-gray);
    margin-top: 15px;
}

.profile-view-team-name {
    color: var(--white);
}

.profile-view-team-points {
    color: var(--gray);
}

.profile-view-no-team {
    font-size: 1rem;
    color: var(--gray);
    margin-top: 15px;
}

.profile-view-edit-btn {
    margin-top: 25px;
    display: inline-block;
    background-color: var(--white);
    color: var(--black);
}

.profile-view-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 40px;
}

.profile-view-stat-card {
    background-color: var(--white);
    border: 1px solid var(--light-gray);
    padding: 30px;
    border-radius: 18px;
    text-align: center;
}

.profile-view-stat-number {
    font-size: 3rem;
    font-weight: 700;
    color: var(--black);
    margin-bottom: 5px;
    letter-spacing: -2px;
}

.profile-view-stat-date {
    font-size: 1.3rem;
    font-weight: 600;
    color: var(--black);
    margin-bottom: 5px;
}

.profile-view-stat-label {
    font-size: 0.85rem;
    color: var(--gray);
    text-transform: uppercase;
    letter-spacing: 1.5px;
    font-weight: 500;
}

.profile-view-votes-section {
    background-color: var(--white);
    border: 1px solid var(--light-gray);
    padding: 40px;
    border-radius: 18px;
}

.profile-view-votes-title {
    margin-bottom: 30px;
    font-size: 1.5rem;
    font-weight: 600;
    letter-spacing: -0.5px;
}

.profile-view-no-votes {
    text-align: center;
    padding: 60px 20px;
    color: var(--gray);
}

.profile-view-no-votes p {
    font-size: 1.1rem;
}

.profile-view-votes-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 20px;
}

.profile-view-vote-card {
    background-color: var(--white);
    border: 1px solid var(--light-gray);
    border-radius: 15px;
    overflow: hidden;
    transition: var(--transition);
    cursor: pointer;
}

.profile-view-vote-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 30px rgba(0,0,0,0.1);
    border-color: var(--black);
}

.profile-view-vote-image {
    width: 100%;
    height: 120px;
    object-fit: cover;
}

.profile-view-vote-placeholder {
    width: 100%;
    height: 120px;
    background-color: var(--light-gray);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
}

.profile-view-vote-info {
    padding: 15px;
    text-align: center;
}

.profile-view-vote-name {
    font-weight: 600;
    margin-bottom: 5px;
    font-size: 0.95rem;
    color: var(--dark-gray);
}

.profile-view-vote-date {
    font-size: 0.8rem;
    color: var(--gray);
}

.profile-view-back {
    text-align: center;
    margin: 40px 0 60px 0;
}

/* ================================
   CSS EXTRAIT DE register.php et login.php
================================ */
.btn-full-width {
    width: 100%;
}

.btn-margin-top {
    margin-top: 10px;
}

.auth-link-text {
    text-align: center;
    margin-top: 20px;
    color: var(--gray);
}

.auth-link {
    color: var(--black);
    font-weight: 500;
}

/* ================================
   CSS EXTRAIT DE overlay_download.php
================================ */
.security-note {
    margin-top: 30px;
}

.download-hero {
    text-align: center;
    padding: 60px 20px 40px;
    background: var(--dark-gray);
    border-radius: 20px;
    color: white;
    margin-bottom: 50px;
}

.download-title {
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 15px;
    letter-spacing: -2px;
}

.download-subtitle {
    font-size: 1.2rem;
    opacity: 0.95;
}

.download-preview {
    margin-bottom: 60px;
}

.preview-card {
    background: var(--light-gray);
    border-radius: 20px;
    padding: 40px;
    margin-bottom: 40px;
}

.preview-features h2 {
    font-size: 1.8rem;
    margin-bottom: 25px;
    text-align: center;
}

.features-list {
    list-style: none;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 15px;
    font-size: 1.1rem;
}

.features-list li {
    padding: 15px;
    background: white;
    border-radius: 12px;
    transition: var(--transition);
}

.features-list li:hover {
    transform: translateX(5px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.download-section {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
    margin-bottom: 60px;
}

.download-card {
    background: white;
    border-radius: 20px;
    padding: 40px 30px;
    text-align: center;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    transition: var(--transition);
}

.download-card:not(.disabled):hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(0,0,0,0.15);
}

.download-card.disabled {
    opacity: 0.5;
}

.download-icon {
    font-size: 4rem;
    margin-bottom: 20px;
}

.download-card h3 {
    font-size: 1.5rem;
    margin-bottom: 10px;
}

.download-card p {
    color: var(--gray);
    margin-bottom: 25px;
}

.btn-download {
    font-size: 1.1rem;
    padding: 15px 40px;
    margin-bottom: 15px;
}

.instructions-section,
.usage-section,
.faq-section {
    margin-bottom: 60px;
}

.steps-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
    margin-top: 30px;
}

.step-card {
    background: var(--light-gray);
    padding: 30px;
    border-radius: 15px;
    text-align: center;
    transition: var(--transition);
}

.step-card:hover {
    transform: translateY(-5px);
    background: var(--dark-gray);
    color: white;
}

.step-number {
    width: 60px;
    height: 60px;
    background: var(--black);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    font-weight: 700;
    margin: 0 auto 20px;
}

.step-card h3 {
    font-size: 1.3rem;
    margin-bottom: 10px;
}

code {
    background: var(--light-gray);
    padding: 3px 8px;
    border-radius: 5px;
    font-family: monospace;
    color: var(--black);
}

.usage-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 25px;
    margin-top: 30px;
}

.usage-card {
    background: white;
    padding: 30px;
    border-radius: 15px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.08);
}

.usage-card h3 {
    font-size: 1.2rem;
    margin-bottom: 15px;
}

.usage-card ul {
    list-style: none;
    padding-left: 0;
}

.usage-card ul li {
    padding: 8px 0;
    padding-left: 25px;
    position: relative;
}

.usage-card ul li:before {
    content: "▸";
    position: absolute;
    left: 0;
    color: var(--black);
    font-weight: bold;
}

.shortcuts-table {
    width: 100%;
}

.shortcuts-table td {
    padding: 12px 0;
    border-bottom: 1px solid var(--light-gray);
}

.shortcuts-table tr:last-child td {
    border-bottom: none;
}

kbd {
    background: var(--dark-gray);
    color: white;
    padding: 4px 8px;
    border-radius: 5px;
    font-size: 0.9rem;
    font-family: monospace;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
}

.faq-list {
    margin-top: 30px;
}

.faq-item {
    background: white;
    padding: 25px;
    border-radius: 15px;
    margin-bottom: 20px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.08);
}

.faq-item h3 {
    font-size: 1.1rem;
    margin-bottom: 10px;
    color: var(--dark-gray);
}

.back-section {
    text-align: center;
    margin-top: 60px;
    padding-top: 40px;
    border-top: 2px solid var(--light-gray);
}

@media (max-width: 768px) {
    .download-title {
        font-size: 2rem;
    }

    .features-list {
        grid-template-columns: 1fr;
    }

    .download-section,
    .steps-grid,
    .usage-grid {
        grid-template-columns: 1fr;
    }
}

/* ================================
   CSS EXTRAIT DE includes/spotify_player.php
================================ */
/* Bulle flottante */
.spotify-bubble {
    position: fixed;
    bottom: 30px;
    right: 30px;
    z-index: 9998;
}

.spotify-bubble-button {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: linear-gradient(135deg, #1DB954 0%, #1ed760 100%);
    border: 3px solid var(--white);
    color: var(--white);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 20px rgba(29, 185, 84, 0.4);
    position: relative;
    overflow: visible;
}

.spotify-bubble-button:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 30px rgba(29, 185, 84, 0.6);
}

.spotify-bubble-button:active {
    transform: scale(0.95);
}

.spotify-pulse {
    position: absolute;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background: rgba(29, 185, 84, 0.4);
    animation: spotifyPulse 2s infinite;
    pointer-events: none;
}

@keyframes spotifyPulse {
    0% {
        transform: scale(1);
        opacity: 1;
    }
    100% {
        transform: scale(1.5);
        opacity: 0;
    }
}

/* Container du lecteur */
.spotify-player-container {
    position: fixed;
    bottom: 100px;
    right: 30px;
    width: 400px;
    background: var(--white);
    border-radius: 16px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px) scale(0.9);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    overflow: hidden;
    z-index: 9997;
}

.spotify-player-container.active {
    opacity: 1;
    visibility: visible;
    transform: translateY(0) scale(1);
}

.spotify-player-header {
    background: linear-gradient(135deg, #1DB954 0%, #1ed760 100%);
    color: var(--white);
    padding: 15px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.spotify-header-content h4 {
    margin: 0 0 4px 0;
    font-size: 1rem;
    font-weight: 600;
}

.spotify-status {
    font-size: 0.75rem;
    opacity: 0.9;
    display: flex;
    align-items: center;
}

.spotify-status::before {
    content: '';
    width: 6px;
    height: 6px;
    background: var(--white);
    border-radius: 50%;
    margin-right: 6px;
    animation: blink 2s infinite;
}

@keyframes blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.3; }
}

.spotify-close {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: var(--white);
    font-size: 1.8rem;
    cursor: pointer;
    padding: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.2s ease;
    line-height: 1;
}

.spotify-close:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: rotate(90deg);
}

.spotify-player-body {
    padding: 0;
    background: #121212;
}

.spotify-player-body iframe {
    display: block;
    border-radius: 0 !important;
}

.spotify-footer {
    padding: 15px 20px;
    background: linear-gradient(to top, #f8f8f8, var(--white));
    border-top: 1px solid #e0e0e0;
    text-align: center;
}

.spotify-link {
    color: #1DB954;
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 600;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
}

.spotify-link:hover {
    color: #1ed760;
    transform: translateY(-1px);
}

/* Responsive Spotify */
@media (max-width: 768px) {
    .spotify-bubble {
        bottom: 20px;
        right: 20px;
    }

    .spotify-bubble-button {
        width: 50px;
        height: 50px;
    }

    .spotify-player-container {
        width: calc(100vw - 40px);
        right: 20px;
        bottom: 80px;
        max-height: calc(100vh - 120px);
        overflow-y: auto;
    }
}

/* Fluidité sur iOS */
.spotify-player-container {
    -webkit-overflow-scrolling: touch;
}

/* ================================
   CSS EXTRAIT DE includes/header.php
================================ */
.header-logo-link {
    text-decoration: none;
    color: inherit;
}

.header-logo-img {
    height: 48px;
    vertical-align: middle;
}

/* Header redefini depuis includes/header.php */
header {
    background: linear-gradient(135deg, #1a1a1f 0%, #2d2d35 100%);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    position: sticky;
    top: 0;
    z-index: 1000;
}

header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    max-width: 1400px;
    margin: 0 auto;
}

/* Navigation */
nav {
    display: flex;
    align-items: center;
    gap: 15px;
}

nav a {
    color: #fff;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
    padding: 8px 15px;
    border-radius: 8px;
    white-space: nowrap;
}

nav a:hover {
    background: rgba(102, 126, 234, 0.2);
    color: #667eea;
}

/* Profil Avatar */
.profile-link {
    display: inline-flex !important;
    align-items: center;
    gap: 10px;
    padding: 5px 15px 5px 5px !important;
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.15) 0%, rgba(118, 75, 162, 0.15) 100%);
    border: 2px solid transparent;
    border-radius: 25px;
    transition: all 0.3s ease;
}

.profile-link:hover {
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.25) 0%, rgba(118, 75, 162, 0.25) 100%);
    border-color: #667eea;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

.header-avatar {
    width: 35px !important;
    height: 35px !important;
    min-width: 35px;
    min-height: 35px;
    border-radius: 50% !important;
    object-fit: cover !important;
    border: 2px solid #667eea;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.3);
    display: block;
    flex-shrink: 0;
}

.profile-link:hover .header-avatar {
    border-color: #764ba2;
    transform: scale(1.15);
    box-shadow: 0 4px 12px rgba(118, 75, 162, 0.5);
}

.username {
    font-weight: 600;
    color: #fff;
    font-size: 14px;
    white-space: nowrap;
}

/* Responsive Header */
@media (max-width: 768px) {
    .header-avatar {
        width: 30px !important;
        height: 30px !important;
        min-width: 30px;
        min-height: 30px;
    }

    .username {
        font-size: 13px;
    }

    nav {
        gap: 8px;
    }
}

/* ================================
   CSS EXTRAIT DE admin/points.php
================================ */
.text-success {
    color: #4CAF50;
    font-weight: bold;
}

.text-danger {
    color: #f44336;
    font-weight: bold;
}

.btn-delete {
    padding: 5px 10px;
    background: #f44336;
    color: white;
    text-decoration: none;
    border-radius: 5px;
    font-size: 14px;
    transition: all 0.3s ease;
}

.btn-delete:hover {
    background: #d32f2f;
    transform: scale(1.05);
}

small {
    display: block;
    margin-top: 5px;
    color: #666;
    font-size: 12px;
}

/* ================================
   CSS EXTRAIT DE admin/roulette.php
================================ */
.roulette-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

.roulette-wheel {
    position: relative;
    width: 500px;
    height: 500px;
    margin: 40px auto;
    border-radius: 50%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    box-shadow: 0 10px 50px rgba(0,0,0,0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.roulette-inner {
    width: 90%;
    height: 90%;
    border-radius: 50%;
    background: white;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    position: relative;
}

.participant-display {
    font-size: 2.5rem;
    font-weight: bold;
    color: #667eea;
    text-align: center;
    padding: 20px;
    transition: all 0.1s;
}

.participant-avatar {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    margin-bottom: 15px;
    border: 4px solid #667eea;
    transition: all 0.1s;
}

.roulette-indicator {
    position: absolute;
    top: -15px;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 0;
    border-left: 20px solid transparent;
    border-right: 20px solid transparent;
    border-top: 30px solid #e74c3c;
    z-index: 100;
}

.controls {
    text-align: center;
    margin: 30px 0;
}

.btn-roulette {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 15px 40px;
    font-size: 1.2rem;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.3s;
    margin: 0 10px;
}

.btn-roulette:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(102, 126, 234, 0.4);
}

.btn-roulette:disabled {
    background: #ccc;
    cursor: not-allowed;
    transform: none;
}

.btn-reset {
    background: linear-gradient(135deg, #e74c3c 0%, #c0392b 100%);
}

.selected-team {
    background: linear-gradient(135deg, #2ecc71 0%, #27ae60 100%);
    color: white;
    padding: 30px;
    border-radius: 20px;
    margin: 20px 0;
    text-align: center;
}

.selected-team h3 {
    margin: 0 0 20px 0;
    font-size: 2rem;
}

.team-members {
    display: flex;
    justify-content: center;
    gap: 40px;
    flex-wrap: wrap;
}

.team-member {
    text-align: center;
}

.team-member img {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    border: 4px solid white;
    margin-bottom: 10px;
}

.team-member-name {
    font-size: 1.3rem;
    font-weight: bold;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin: 30px 0;
}

.stat-card {
    background: white;
    padding: 25px;
    border-radius: 15px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    text-align: center;
}

.stat-label {
    font-size: 1.1rem;
    color: #666;
}

.drawn-list {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 15px;
    margin: 20px 0;
}

.drawn-list h3 {
    color: #667eea;
    margin-bottom: 15px;
}

.drawn-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 15px;
}

.drawn-participant {
    background: white;
    padding: 15px;
    border-radius: 10px;
    text-align: center;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.drawn-participant img {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    margin-bottom: 8px;
}

.alert-warning {
    background: #fff3cd;
    color: #856404;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.spinning {
    animation: spin 0.1s linear infinite;
}

/* ================================
   CSS EXTRAIT DE admin/games.php
================================ */
.admin-game-thumbnail {
    width: 60px;
    height: 60px;
    object-fit: cover;
    border-radius: 8px;
}

.admin-game-thumbnail-placeholder {
    width: 60px;
    height: 60px;
    background: var(--light-gray);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* ================================
   CSS EXTRAIT DE admin/index.php
================================ */
.admin-stat-icon {
    font-size: 3rem;
    margin-bottom: 10px;
}

.admin-actions-grid {
    margin-top: 50px;
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
}

/* ================================
   CSS ADDITIONNEL POUR ADMIN
================================ */
.auth-box-wide {
    max-width: 600px;
}

.games-list-title,
.teams-list-title {
    margin-top: 50px;
    font-size: 1.5rem;
}

.team-points-large {
    font-size: 1.2rem;
}

.empty-state {
    text-align: center;
    color: #666;
}

.inline-form {
    display: inline;
}

.hidden {
    display: none;
}

.file-info-text {
    display: block;
    margin-top: 5px;
    color: var(--gray);
}

.countdown-finished {
    font-size: 2.5rem;
    color: #ffd700;
    font-weight: bold;
}
