/* Reset et base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Arial', sans-serif;
    background: linear-gradient(135deg, #000000 0%, #000000 100%);
    min-height: 100vh;
    overflow-x: hidden;
}

/* Variables CSS pour les couleurs des équipes */
:root {
    --quichons-color: #ff6b6b;
    --quichons-light: #ff8e8e;
    --quichons-dark: #ff4757;
    --quiches-color: #4ecdc4;
    --quiches-light: #7bed9f;
    --quiches-dark: #2ed573;
    --admin-color: #f39c12;
    --admin-dark: #e67e22;
}

/* ============= VERSION DESKTOP (display.php) ============= */
.desktop {
    position: relative;
    overflow: hidden;
}

.desktop::before {
    content: "";
    position: absolute;
    inset: 0;
    background-image: url("background.jpg");
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    opacity: 0.2;
    z-index: -1;
}

.desktop-container {
    position: relative;
    z-index: 1;
    height: 100vh;
    display: flex;
    flex-direction: column;
    padding: 20px;
    color: white;
}

/* Scores en haut */
.scores-header {
    display: flex;
    justify-content: center;
    gap: 100px;
    margin-bottom: 30px;
    animation: slideDown 1s ease-out;
}

.score-badge {
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    border-radius: 25px;
    padding: 15px 30px;
    display: flex;
    align-items: center;
    gap: 15px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: all 0.3s ease;
}

.score-badge:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.2);
}

.quiches-score {
    border-left: 5px solid var(--quiches-color);
}

.quichons-score {
    border-left: 5px solid var(--quichons-color);
}

.team-name {
    font-weight: bold;
    font-size: 1.2em;
}

.vote-count {
    background: rgba(255, 255, 255, 0.3);
    padding: 8px 15px;
    border-radius: 50px;
    font-size: 1.5em;
    font-weight: bold;
    min-width: 50px;
    text-align: center;
    animation: pulse 2s infinite;
}

/* Contenu principal */
.main-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex: 1;
    max-width: 1400px;
    margin: 0 auto;
    width: 100%;
}

/* Sections des équipes */
.team-section {
    flex: 1;
    text-align: center;
    padding: 20px;
}

.team-section h2 {
    font-size: 2.5em;
    margin-bottom: 30px;
    color: #000;
    -webkit-text-stroke: 2px #fff;
    text-shadow: 2px 2px 6px rgba(0, 0, 0, 0.6);
    animation: glow 3s ease-in-out infinite;
}

.quiches-team h2 {
    color: var(--quiches-color);
}

.quichons-team h2 {
    color: var(--quichons-color);
}

.team-members {
    list-style: none;
    font-size: 1.5em;
}

.team-members li {
    background: rgba(255, 255, 255, 0.1);
    margin: 15px 0;
    padding: 15px 20px;
    border-radius: 15px;
    backdrop-filter: blur(5px);
    transition: all 0.3s ease;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.quiches-team .team-members li:hover {
    background: var(--quiches-color);
    transform: scale(1.05);
    box-shadow: 0 5px 20px rgba(78, 205, 196, 0.4);
}

.quichons-team .team-members li:hover {
    background: var(--quichons-color);
    transform: scale(1.05);
    box-shadow: 0 5px 20px rgba(255, 107, 107, 0.4);
}

/* Section centrale */
.center-section {
    flex: 1;
    text-align: center;
    padding: 40px;
    max-width: 400px;
}

#qrcode-container {
    background: white;
    padding: 20px;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    margin-bottom: 30px;
    transition: transform 0.3s ease;
}

#qrcode-container:hover {
    transform: scale(1.02);
}

#qrcode {
    display: flex;
    justify-content: center;
    margin-bottom: 10px;
}

#qrcode-container p {
    color: #333;
    font-weight: bold;
}

/* Timer */
.timer-display {
    background: rgba(0, 0, 0, 0.7);
    padding: 20px;
    border-radius: 15px;
    backdrop-filter: blur(10px);
    border: 2px solid rgba(255, 255, 255, 0.2);
}

#timer {
    font-size: 3em;
    font-weight: bold;
    color: #fff;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
    margin-bottom: 15px;
    font-family: 'Courier New', monospace;
}

.timer-status {
    text-align: center;
    margin-top: 10px;
}

#timer-status-text.running {
    color: #2ed573;
    font-weight: bold;
}

#timer-status-text.stopped {
    color: #ff4757;
    font-weight: bold;
}

.timer-admin-controls {
    display: flex;
    gap: 10px;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
}

.timer-admin-controls input {
    width: 80px;
    padding: 8px;
    border: none;
    border-radius: 5px;
    text-align: center;
    background: rgba(255, 255, 255, 0.9);
}

.timer-admin-controls button {
    padding: 8px 12px;
    border: none;
    border-radius: 5px;
    background: var(--admin-color);
    color: white;
    cursor: pointer;
    transition: background 0.3s ease;
    font-size: 0.9em;
}

.timer-admin-controls button:hover {
    background: var(--admin-dark);
}

/* Votes récents */
.recent-votes {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    padding: 20px;
    border-radius: 15px;
    margin-top: 20px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.recent-votes h3 {
    margin-bottom: 15px;
    text-align: center;
}

#votes-list {
    max-height: 200px;
    overflow-y: auto;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
}

.vote-item {
    background: rgba(255, 255, 255, 0.1);
    padding: 10px 15px;
    border-radius: 10px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: all 0.3s ease;
    opacity: 0;
    animation: fadeInUp 0.5s ease forwards;
}

.vote-item.new-vote {
    animation: newVoteAlert 1s ease;
}

.vote-quiches {
    border-left: 4px solid var(--quiches-color);
}

.vote-quichons {
    border-left: 4px solid var(--quichons-color);
}

.voter-name {
    font-weight: bold;
    color: white;
}

.vote-team {
    font-size: 0.9em;
    padding: 4px 8px;
    border-radius: 12px;
    font-weight: bold;
}

.vote-team.quiches {
    background: var(--quiches-color);
    color: white;
}

.vote-team.quichons {
    background: var(--quichons-color);
    color: white;
}

/* ============= VERSION MOBILE (vote.php) ============= */
.mobile {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: 10px;
}

.mobile-container {
    width: 100%;
    max-width: 400px;
}

.vote-container {
    background: rgba(255, 255, 255, 0.95);
    padding: 30px;
    border-radius: 20px;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.1);
    text-align: center;
}

.vote-container h1 {
    color: #333;
    margin-bottom: 30px;
    font-size: 1.8em;
}

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

.form-group label {
    display: block;
    margin-bottom: 8px;
    color: #555;
    font-weight: bold;
}

.form-group input {
    width: 100%;
    padding: 15px;
    border: 2px solid #e1e1e1;
    border-radius: 10px;
    font-size: 1.1em;
    transition: border-color 0.3s ease;
}

.form-group input:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 10px rgba(102, 126, 234, 0.2);
}

.team-buttons {
    display: flex;
    gap: 15px;
    margin-top: 20px;
}

.team-btn {
    flex: 1;
    padding: 20px;
    border: none;
    border-radius: 15px;
    font-size: 1.2em;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.team-btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none !important;
}

.quiches-btn {
    background: var(--quiches-color);
    color: white;
    box-shadow: 0 5px 15px rgba(78, 205, 196, 0.3);
}

.quiches-btn:hover:not(:disabled),
.quiches-btn:active:not(:disabled) {
    background: var(--quiches-dark);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(78, 205, 196, 0.4);
}

.quichons-btn {
    background: var(--quichons-color);
    color: white;
    box-shadow: 0 5px 15px rgba(255, 107, 107, 0.3);
}

.quichons-btn:hover:not(:disabled),
.quichons-btn:active:not(:disabled) {
    background: var(--quichons-dark);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(255, 107, 107, 0.4);
}

.success-message {
    background: rgba(46, 213, 115, 0.1);
    border: 2px solid #2ed573;
    border-radius: 15px;
    padding: 30px;
    color: #2ed573;
}

.success-message h2 {
    margin-bottom: 15px;
}

.vote-again-btn {
    background: #667eea;
    color: white;
    border: none;
    padding: 15px 30px;
    border-radius: 10px;
    font-size: 1.1em;
    cursor: pointer;
    margin-top: 20px;
    transition: background 0.3s ease;
}

.vote-again-btn:hover {
    background: #5a67d8;
}

/* ============= ADMINISTRATION (admin.php) ============= */
.admin-body {
    background: linear-gradient(135deg, #2c3e50 0%, #34495e 100%);
    color: white;
    min-height: 100vh;
    padding: 20px;
}

.admin-container {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: 20px;
}

.admin-panel {
    background: rgba(243, 156, 18, 0.9);
    backdrop-filter: blur(10px);
    padding: 20px;
    border-radius: 15px;
    border: 2px solid var(--admin-color);
}

.status-panel {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    padding: 20px;
    border-radius: 15px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    height: fit-content;
}

.admin-section {
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
}

.admin-section:last-child {
    border-bottom: none;
}

.desktop-admin {
    position: fixed;
    top: 20px;
    right: 20px;
    width: 300px;
    z-index: 1000;
}

.mobile-admin {
    margin-bottom: 30px;
}

.admin-panel h2,
.admin-panel h3,
.status-panel h3 {
    color: white;
    margin-bottom: 15px;
    text-align: center;
}

.admin-controls {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.button-group {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.admin-btn {
    background: var(--admin-dark);
    color: white;
    border: none;
    padding: 12px 20px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 1em;
    transition: all 0.3s ease;
    flex: 1;
    min-width: 120px;
}

.admin-btn:hover {
    background: #d35400;
    transform: translateY(-2px);
}

.admin-btn.danger {
    background: #e74c3c;
}

.admin-btn.danger:hover {
    background: #c0392b;
}

.admin-input {
    padding: 10px;
    border: none;
    border-radius: 5px;
    font-size: 1em;
}

.timer-controls {
    display: flex;
    gap: 5px;
    align-items: center;
    flex-wrap: wrap;
}

.timer-controls input {
    width: 100px;
    padding: 8px;
    border: none;
    border-radius: 5px;
    text-align: center;
}

.timer-status {
    margin-top: 10px;
    text-align: center;
    font-weight: bold;
}

.video-info {
    background: rgba(255, 255, 255, 0.2);
    padding: 10px;
    border-radius: 5px;
    margin-bottom: 10px;
    font-size: 0.9em;
    word-break: break-all;
}

.scores-display {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-bottom: 20px;
}

.score-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px;
    border-radius: 10px;
    font-weight: bold;
}

.score-item.quiches {
    background: rgba(78, 205, 196, 0.2);
    border-left: 4px solid var(--quiches-color);
}

.score-item.quichons {
    background: rgba(255, 107, 107, 0.2);
    border-left: 4px solid var(--quichons-color);
}

.score {
    font-size: 1.5em;
    color: white;
}

.total-votes {
    text-align: center;
    font-weight: bold;
    font-size: 1.1em;
    padding: 10px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
}

/* ============= OVERLAYS ET MODAUX ============= */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-content {
    background: white;
    border-radius: 15px;
    padding: 30px;
    max-width: 500px;
    max-height: 80vh;
    overflow-y: auto;
    position: relative;
    color: #333;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid #eee;
}

.modal-close {
    background: none;
    border: none;
    font-size: 1.5em;
    cursor: pointer;
    color: #999;
    transition: color 0.3s ease;
}

.modal-close:hover {
    color: #333;
}

.authorization-buttons {
    display: flex;
    gap: 15px;
    justify-content: center;
    margin-top: 20px;
}

#video-overlay,
#end-sequence-overlay,
#celebration-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.95);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
}

#close-video {
    position: absolute;
    top: 20px;
    right: 20px;
    background: rgba(255, 255, 255, 0.2);
    color: white;
    border: none;
    padding: 15px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 1.5em;
    z-index: 10000;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

#close-video:hover {
    background: rgba(255, 255, 255, 0.4);
}

#video-container {
    width: 90%;
    height: 90%;
    display: flex;
    align-items: center;
    justify-content: center;
}

#video-container iframe,
#video-container video {
    width: 100%;
    height: 100%;
    border: none;
    border-radius: 10px;
}

#end-image {
    max-width: 90%;
    max-height: 90%;
    object-fit: contain;
    border-radius: 15px;
}

.celebration-content {
    text-align: center;
    position: relative;
}

#celebration-text {
    font-size: 3em;
    color: #ffd700;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
    animation: celebrationPulse 1s ease-in-out infinite;
}

.celebText {
    background: rgba(255, 255, 255, 0.15);
    padding: 20px;
    text-align: center;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    font-size: clamp(1.4rem, 4vw, 3rem);
    font-weight: 800;
    margin: 0 0 8px;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
    background: linear-gradient(45deg, #fff, #f0f0f0);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    line-height: 1.15;
    letter-spacing: .2px;
}

.fireworks {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

.firework {
    position: absolute;
    width: 6px;
    height: 6px;
    background: radial-gradient(circle, #ffd700, #ff6b6b, #4ecdc4);
    border-radius: 50%;
    animation: fireworkAnim 2s ease-out forwards;
}

/* Statistiques dans modal */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 15px;
    margin-bottom: 20px;
}

.stat-card {
    text-align: center;
    padding: 20px;
    border-radius: 10px;
    background: #f8f9fa;
    border: 2px solid #e9ecef;
}

.stat-card.quiches {
    border-color: var(--quiches-color);
    background: rgba(78, 205, 196, 0.1);
}

.stat-card.quichons {
    border-color: var(--quichons-color);
    background: rgba(255, 107, 107, 0.1);
}

.stat-card h4 {
    margin-bottom: 10px;
    color: #666;
}

.stat-value {
    font-size: 2em;
    font-weight: bold;
    color: #333;
}

.top-voters {
    background: #f8f9fa;
    padding: 15px;
    border-radius: 10px;
    list-style: none;
}

.top-voters li {
    padding: 8px 0;
    border-bottom: 1px solid #eee;
}

.top-voters li:last-child {
    border-bottom: none;
}

/* ============= NOTIFICATIONS ============= */
.notification {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 15px 25px;
    border-radius: 10px;
    color: white;
    font-weight: bold;
    z-index: 10001;
    transform: translateX(400px);
    transition: transform 0.3s ease;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.2);
    max-width: 300px;
}

.notification.show {
    transform: translateX(0);
}

.notification.info {
    background: linear-gradient(135deg, #667eea, #764ba2);
}

.notification.success {
    background: linear-gradient(135deg, #2ed573, #2ed573);
}

.notification.warning {
    background: linear-gradient(135deg, #ffa502, #ff6348);
}

.notification.error {
    background: linear-gradient(135deg, #ff4757, #c44569);
}

/* ============= ANIMATIONS ============= */
@keyframes slideDown {
    from {
        transform: translateY(-50px);
        opacity: 0;
    }

    to {
        transform: translateY(0);
        opacity: 1;
    }
}

@keyframes fadeInUp {
    from {
        transform: translateY(20px);
        opacity: 0;
    }

    to {
        transform: translateY(0);
        opacity: 1;
    }
}

@keyframes pulse {

    0%,
    100% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.05);
    }
}

@keyframes glow {

    0%,
    100% {
        text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
    }

    50% {
        text-shadow: 2px 2px 20px rgba(255, 255, 255, 0.5);
    }
}

@keyframes newVoteAlert {
    0% {
        transform: scale(1);
        background: rgba(255, 255, 255, 0.1);
    }

    50% {
        transform: scale(1.02);
        background: rgba(255, 215, 0, 0.3);
    }

    100% {
        transform: scale(1);
        background: rgba(255, 255, 255, 0.1);
    }
}

@keyframes pulse-in {
    0% {
        transform: scale(0.98);
        opacity: 0.0;
    }

    60% {
        transform: scale(1.02);
        opacity: 1;
    }

    100% {
        transform: scale(1);
    }
}

@keyframes celebrationPulse {

    0%,
    100% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.1);
    }
}

@keyframes fireworkAnim {
    0% {
        transform: translateY(0) scale(1);
        opacity: 1;
    }

    50% {
        transform: translateY(var(--random-y, -100px)) translateX(var(--random-x, 0)) scale(1.5);
        opacity: 0.8;
    }

    100% {
        transform: translateY(var(--random-y, -200px)) translateX(var(--random-x, 0)) scale(0);
        opacity: 0;
    }
}

@keyframes timerAlert {

    0%,
    100% {
        color: #ff4757;
        text-shadow: 0 0 10px rgba(255, 71, 87, 0.5);
    }

    50% {
        color: #ffffff;
        text-shadow: 0 0 20px rgba(255, 71, 87, 1);
    }
}

.timer-ended {
    animation: timerAlert 1s infinite;
}

/* ============= RESPONSIVE ============= */
@media (max-width: 768px) {
    #votes-list {
        grid-template-columns: 1fr;
    }

    .desktop .main-content {
        flex-direction: column;
        gap: 20px;
    }

    .team-section {
        padding: 10px;
    }

    .team-section h2 {
        font-size: 2em;
    }

    .scores-header {
        gap: 20px;
        flex-wrap: wrap;
    }

    .desktop-admin {
        position: relative !important;
        top: auto !important;
        right: auto !important;
        width: 100% !important;
        margin: 20px 0 !important;
    }

    .admin-container {
        grid-template-columns: 1fr;
    }

    .team-buttons {
        flex-direction: column;
    }

    .vote-container {
        padding: 20px;
    }

    .button-group {
        flex-direction: column;
    }

    .timer-controls {
        flex-direction: column;
        align-items: stretch;
    }

    .timer-controls input {
        width: 100%;
        margin-bottom: 10px;
    }

    #celebration-text {
        font-size: 2em;
    }
}

@media (max-width: 480px) {
    .scores-header {
        flex-direction: column;
        align-items: center;
        gap: 15px;
    }

    .score-badge {
        width: 100%;
        max-width: 250px;
        justify-content: center;
    }

    .modal-content {
        margin: 20px;
        padding: 20px;
    }

    .notification {
        right: 10px;
        left: 10px;
        transform: translateY(-100px);
        max-width: none;
    }

    .notification.show {
        transform: translateY(0);
    }
}

/* ============= SCROLLBARS ============= */
#votes-list::-webkit-scrollbar,
.modal-content::-webkit-scrollbar {
    width: 8px;
}

#votes-list::-webkit-scrollbar-track,
.modal-content::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
}

#votes-list::-webkit-scrollbar-thumb,
.modal-content::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.3);
    border-radius: 4px;
}

#votes-list::-webkit-scrollbar-thumb:hover,
.modal-content::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.5);
}

/* ============= ÉTATS INTERACTIFS ============= */
.pressed {
    transform: scale(0.95);
    transition: transform 0.1s ease;
}

.qr-hover {
    transform: scale(1.02) rotate(2deg);
}

.member-highlight {
    animation: memberGlow 0.3s ease;
}

@keyframes memberGlow {
    0% {
        box-shadow: 0 0 5px rgba(255, 255, 255, 0.5);
    }

    50% {
        box-shadow: 0 0 20px rgba(255, 255, 255, 0.8);
    }

    100% {
        box-shadow: 0 0 5px rgba(255, 255, 255, 0.5);
    }
}

/* ============= ACCESSIBILITÉ ============= */
.admin-btn:focus,
.team-btn:focus,
.vote-again-btn:focus,
.modal-close:focus {
    outline: 2px solid #667eea;
    outline-offset: 2px;
}

.form-group input:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

/* Amélioration du contraste pour l'accessibilité */
.timer-status #timer-status-text {
    font-weight: bold;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5);
}

/* ============= PRINT STYLES ============= */
@media print {

    .admin-panel,
    .desktop-admin,
    .mobile-admin,
    .notification,
    .modal-overlay,
    #video-overlay,
    #end-sequence-overlay,
    #celebration-overlay {
        display: none !important;
    }

    body {
        background: white !important;
        color: black !important;
    }

    .desktop-container {
        color: black !important;
    }
}

/* ============= ANIMATIONS SUPPLÉMENTAIRES ============= */
.vote-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.score-badge.pulse {
    animation: scorePulse 0.6s ease;
}

@keyframes scorePulse {
    0% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.1);
    }

    100% {
        transform: scale(1);
    }
}

/* Effet de typing pour les nouvelles notifications */
.notification.typing {
    animation: typeIn 0.5s ease-out;
}

@keyframes typeIn {
    from {
        width: 0;
        opacity: 0;
    }

    to {
        width: auto;
        opacity: 1;
    }
}

/* ============= DARK MODE SUPPORT ============= */
@media (prefers-color-scheme: dark) {
    .vote-container {
        background: rgba(40, 44, 52, 0.95);
        color: #e5e5e5;
    }

    .vote-container h1 {
        color: #e5e5e5;
    }

    .form-group label {
        color: #b3b3b3;
    }

    .form-group input {
        background: #2c2c2c;
        color: #e5e5e5;
        border-color: #404040;
    }

    .modal-content {
        background: #2c2c2c;
        color: #e5e5e5;
    }

    .stat-card {
        background: #3c3c3c;
        border-color: #555;
        color: #e5e5e5;
    }
}

/* ============= REDUCED MOTION ============= */
@media (prefers-reduced-motion: reduce) {

    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }

    .timer-ended {
        animation: none;
        color: #ff4757;
    }
}

/* ============= HIGH CONTRAST MODE ============= */
@media (prefers-contrast: high) {

    .score-badge,
    .vote-item,
    .recent-votes,
    .admin-panel {
        border: 2px solid currentColor;
    }

    .team-btn,
    .admin-btn {
        border: 2px solid currentColor;
    }
}

/* ============= LOADING STATES ============= */
.loading {
    position: relative;
    overflow: hidden;
}

.loading::after {
    content: "";
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg,
            transparent,
            rgba(255, 255, 255, 0.2),
            transparent);
    animation: shimmer 1.5s infinite;
}

@keyframes shimmer {
    0% {
        left: -100%;
    }

    100% {
        left: 100%;
    }
}

/* États de connexion */
.connection-status {
    position: fixed;
    bottom: 20px;
    right: 20px;
    padding: 8px 12px;
    border-radius: 20px;
    font-size: 0.8em;
    font-weight: bold;
    z-index: 1000;
    transition: all 0.3s ease;
}

.connection-status.online {
    background: #2ed573;
    color: white;
}

.connection-status.offline {
    background: #ff4757;
    color: white;
}

.connection-status.reconnecting {
    background: #ffa502;
    color: white;
    animation: pulse 1s infinite;
}

/* Grille 5 colonnes fixes sur desktop */
#votes-container {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 12px;
    /* espace entre cartes */
}

/* Responsive (optionnel) */
@media (max-width: 1200px) {
    #votes-container {
        grid-template-columns: repeat(4, 1fr);
    }
}

@media (max-width: 992px) {
    #votes-container {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 768px) {
    #votes-container {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 480px) {
    #votes-container {
        grid-template-columns: 1fr;
    }
}

/* (Optionnel) style carte si besoin */
.vote-card {
    padding: 8px 10px;
    border-radius: 10px;
    background: #111;
    border: 1px solid #333;
}

.celebration-banner {
    text-align: center;
    padding: 16px 12px;
    /* Si tu préfères sans fond, supprime la ligne suivante */
    background: linear-gradient(135deg, rgba(255, 175, 189, 0.15), rgba(100, 216, 251, 0.15));
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.celebration-banner h1 {
    margin: 0;
    line-height: 1.2;
    font-weight: 700;
    /* Taille fluide : min 22px, max 44px */
    font-size: clamp(22px, 3.2vw + 6px, 44px);
}

.celebration-subtitle {
    margin: 6px 0 0;
    opacity: 0.9;
    /* min 14px, max 20px */
    font-size: clamp(14px, 1.2vw + 8px, 20px);
}

.nowrap {
    white-space: nowrap;
}

#end-sequence-overlay {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 9999;
    color: #fff;
    font-family: system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
    text-align: center;

    /* fond noir semi-transparent par défaut */
    background: rgba(0, 0, 0, 1);
    overflow: hidden;
    /* pour contenir le ::before */
}

#end-sequence-overlay::before {
    content: "";
    position: absolute;
    inset: 0;
    background: url('fondFin.png') center center / cover no-repeat;
    opacity: 0.5;
    /* 🔥 règle la transparence de l’image */
    z-index: -1;
    /* passe derrière le contenu */
}

/* ====== OVERLAY MESSAGES VOTANTS ====== */
.message-overlay {
    visibility: hidden;
    position: fixed;
    top: 20px;
    right: 20px;
    width: 360px;
    max-width: 90vw;
    background: rgba(255, 255, 255, 0.9);
    color: #111;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.25);
    z-index: 2000;
    backdrop-filter: blur(6px);
    border: 1px solid rgba(0, 0, 0, 0.08);
    overflow: hidden;
}

.message-overlay.fullscreen {
    inset: 0;
    width: auto;
    height: auto;
    max-width: none;
    border-radius: 0;
}

.message-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 12px;
    background: rgba(255, 255, 255, 0.6);
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}

.message-actions button {
    background: rgba(0, 0, 0, 0.08);
    border: none;
    padding: 6px 10px;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 700;
}

.message-carousel {
    padding: 14px 16px;
    min-height: 90px;
}

.message-item {
    margin: 0;
}

.message-item blockquote {
    margin: 0 0 8px 0;
    font-size: 1.05rem;
    line-height: 1.3;
}

.message-item figcaption {
    font-size: 0.95rem;
    opacity: 0.8;
}

/* Message affiché à droite du nom dans la liste des votes récents */
.voter-message {
    margin-left: 8px;
    opacity: 0.9;
    font-style: italic;
    color: #ddd;
}

/* Message à droite du nom dans la liste des vainqueurs */
.winner-message {
    margin-left: 8px;
    font-style: italic;
    opacity: .9;
}

.results {
    display: flex;
    gap: 16px;
    align-items: stretch;
    width: 100%;
    /* prend toute la largeur */
    max-width: 100vw;
    /* ne dépasse pas la largeur de la fenêtre */
    box-sizing: border-box;
}

#rl-lane img {
    position: absolute;
    will-change: transform;
}

#rl-ball {
    transform-origin: 50% 50%;
    transform-box: fill-box;
}

#rl-car {
    transform-origin: 50% 50%;
    transform-box: fill-box;
}