/* ===== vote-modern.css ===== */

/* Root Variables */
:root {
    --primary: #3b82f6;
    --secondary: #06b6d4;
}

/* Body Styling */
body#vote {
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
    color: #ffffff;
    min-height: 100vh;
}

/* Page Title */
.page-title {
    max-width: 1200px;
    margin: 3rem auto 1rem;
    padding: 0 2rem;
    position: relative;
    z-index: 1;
}

.page-title h1 {
    font-size: 3rem;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-weight: 800;
}

/* Container */
.container-modern {
    max-width: 1200px;
    margin: 2rem auto;
    padding: 0 2rem;
    position: relative;
    z-index: 1;
}

/* Grid 2 Columns */
.grid-2 {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(500px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

/* Card Modern */
.card-modern {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    padding: 2rem;
    backdrop-filter: blur(10px);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    animation: fadeInUp 0.6s ease-out;
}

.card-modern:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: var(--primary);
    box-shadow: 0 20px 60px rgba(59, 130, 246, 0.2);
    transform: translateY(-5px);
}

.card-title {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    color: var(--primary);
}

/* Alert */
.alert-modern {
    background: rgba(16, 185, 129, 0.15);
    border: 1px solid rgba(16, 185, 129, 0.3);
    border-radius: 12px;
    padding: 1rem 1.5rem;
    margin: 1rem 0;
    color: #d1fae5;
    font-size: 0.95rem;
    animation: fadeInUp 0.6s ease-out;
}

/* Alert Error */
.alert-error {
    background: rgba(239, 68, 68, 0.15);
    border: 1px solid rgba(239, 68, 68, 0.3);
    border-radius: 12px;
    padding: 1rem 1.5rem;
    margin-bottom: 1.5rem;
    color: #fecaca;
    font-size: 0.95rem;
    animation: fadeInUp 0.6s ease-out;
}

/* Website Vote Cards */
.websites-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-top: 1.5rem;
}

.website-card {
    background: rgba(255, 255, 255, 0.05);
    border: 2px solid rgba(59, 130, 246, 0.2);
    border-radius: 15px;
    padding: 1.5rem;
    text-align: center;
    transition: all 0.3s;
    cursor: pointer;
}

.website-card:hover {
    border-color: var(--primary);
    background: rgba(59, 130, 246, 0.1);
    box-shadow: 0 10px 30px rgba(59, 130, 246, 0.2);
    transform: translateY(-3px);
}

.website-name {
    font-size: 1.3rem;
    font-weight: 700;
    margin-bottom: 1rem;
    color: #ffffff;
}

.website-info {
    font-size: 0.9rem;
    color: #94a3b8;
    margin-bottom: 1rem;
    line-height: 1.6;
}

/* Vote Button */
.btn-vote {
    width: 100%;
    padding: 0.75rem 1.5rem;
    background: linear-gradient(135deg, #10b981, #06b6d4);
    color: white;
    border: none;
    border-radius: 10px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    font-size: 1rem;
}

.btn-vote:hover:not(.disabled) {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(16, 185, 129, 0.4);
}

.btn-vote.disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Stats */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 1rem;
    margin-top: 1.5rem;
}

.stat-box {
    background: rgba(59, 130, 246, 0.1);
    border: 1px solid rgba(59, 130, 246, 0.3);
    border-radius: 10px;
    padding: 1rem;
    text-align: center;
}

.stat-value {
    font-size: 1.8rem;
    font-weight: 800;
    color: var(--primary);
}

.stat-label {
    font-size: 0.85rem;
    color: #94a3b8;
    margin-top: 0.5rem;
}

/* Top Vote Header */
.top-vote-header {
    display: flex;
    gap: 1rem;
    margin-bottom: 1.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding-bottom: 1rem;
    flex-wrap: wrap;
}

/* Tab Button */
.tab-button {
    padding: 0.5rem 1.5rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    color: #94a3b8;
    cursor: pointer;
    transition: all 0.3s;
    font-weight: 600;
    font-size: 0.95rem;
}

.tab-button.active {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: white;
    border-color: transparent;
}

.tab-button:hover {
    border-color: var(--primary);
    color: #ffffff;
}

/* Tab Content */
.tab-content-vote {
    animation: fadeInUp 0.3s ease-out;
}

/* Player Item */
.player-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 10px;
    margin-bottom: 1rem;
    border: 1px solid rgba(255, 255, 255, 0.05);
    transition: all 0.3s;
}

.player-item:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(59, 130, 246, 0.3);
}

.player-avatar {
    width: 50px;
    height: 50px;
    border-radius: 8px;
    border: 2px solid var(--primary);
    object-fit: cover;
}

.player-rank {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--primary);
    min-width: 50px;
    text-align: center;
}

.player-info {
    flex: 1;
}

.player-name {
    font-weight: 700;
    color: #ffffff;
    font-size: 1.1rem;
}

.player-stats {
    font-size: 0.85rem;
    color: #94a3b8;
    margin-top: 0.25rem;
}

/* Progress Section */
.progress-section {
    margin-bottom: 1.5rem;
}

.progress-label {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.progress-bar-container {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 10px;
    height: 12px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.progress-bar-fill {
    background: linear-gradient(90deg, #10b981, #06b6d4);
    height: 100%;
    transition: width 0.3s ease;
    border-radius: 10px;
}

/* Player Statistics */
.player-stats-header {
    display: flex;
    gap: 1.5rem;
    margin-bottom: 1.5rem;
}

.player-avatar-large {
    width: 80px;
    height: 80px;
    border-radius: 10px;
    border: 2px solid var(--primary);
    object-fit: cover;
    flex-shrink: 0;
}

.player-stats-info {
    flex: 1;
}

.stats-period {
    margin-bottom: 1rem;
}

.stats-period-title {
    font-weight: 700;
    margin-bottom: 0.5rem;
    color: var(--primary);
    font-size: 0.95rem;
}

.stats-period-values {
    display: flex;
    justify-content: space-between;
    font-size: 0.9rem;
    color: #94a3b8;
    gap: 1rem;
}

/* Form Styles */
input[type="text"],
input[type="email"],
input[type="password"],
textarea {
    width: 100%;
    padding: 0.75rem 1rem;
    background: rgba(255, 255, 255, 0.05);
    border: 2px solid rgba(59, 130, 246, 0.3);
    border-radius: 10px;
    color: #ffffff;
    font-size: 1rem;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    transition: all 0.3s;
    box-sizing: border-box;
}

input[type="text"]::placeholder,
input[type="email"]::placeholder,
input[type="password"]::placeholder,
textarea::placeholder {
    color: #64748b;
}

input[type="text"]:focus,
input[type="email"]:focus,
input[type="password"]:focus,
textarea:focus {
    outline: none;
    border-color: rgba(59, 130, 246, 0.8);
    background: rgba(59, 130, 246, 0.1);
    box-shadow: 0 0 20px rgba(59, 130, 246, 0.2);
}

input[type="text"].is-invalid,
input[type="email"].is-invalid,
input[type="password"].is-invalid,
textarea.is-invalid {
    border-color: rgba(239, 68, 68, 0.5);
    background: rgba(239, 68, 68, 0.05);
}

input[type="text"].is-invalid:focus,
input[type="email"].is-invalid:focus,
input[type="password"].is-invalid:focus,
textarea.is-invalid:focus {
    border-color: rgba(239, 68, 68, 0.8);
    background: rgba(239, 68, 68, 0.1);
    box-shadow: 0 0 20px rgba(239, 68, 68, 0.2);
}

/* Form Group */
.form-group {
    margin-bottom: 1.5rem;
}

.form-group small {
    display: block;
    margin-top: 0.5rem;
    color: #fca5a5;
}

/* Button Submit */
button[type="submit"] {
    width: 100%;
    padding: 0.85rem 1.5rem;
    background: linear-gradient(135deg, #10b981, #06b6d4);
    color: white;
    border: none;
    border-radius: 10px;
    font-weight: 700;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s;
    box-shadow: 0 4px 15px rgba(16, 185, 129, 0.3);
}

button[type="submit"]:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(16, 185, 129, 0.5);
}

button[type="submit"]:active {
    transform: translateY(0);
}

/* Form Wrapper */
.form-wrapper {
    max-width: 100%;
}

/* Utility Classes */
.mt-4 {
    margin-top: 1.5rem;
}

.mb-0 {
    margin-bottom: 0;
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Responsive */
@media (max-width: 768px) {
    .grid-2 {
        grid-template-columns: 1fr;
    }

    .page-title h1 {
        font-size: 2rem;
    }

    .websites-grid {
        grid-template-columns: 1fr;
    }

    .top-vote-header {
        flex-wrap: wrap;
    }

    .tab-button {
        flex: 1;
        min-width: 100px;
    }

    .player-item {
        flex-wrap: wrap;
    }

    .player-rank {
        order: -1;
        width: 100%;
        margin-bottom: 0.5rem;
    }

    .player-stats-header {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }

    .stats-period-values {
        justify-content: center;
    }

    .player-avatar-large {
        width: 64px;
        height: 64px;
    }
}

.card-modern + .card-modern {
    margin-top: 1.5rem;
}

/* Ajout dans vote-modern.css */

/* Website Card - Version avec alerte */
.website-card.has-issues {
    border-color: rgba(239, 68, 68, 0.4);
    background: rgba(239, 68, 68, 0.05);
    position: relative;
}

.website-card.has-issues:hover {
    border-color: rgba(239, 68, 68, 0.6);
    background: rgba(239, 68, 68, 0.1);
    box-shadow: 0 10px 30px rgba(239, 68, 68, 0.2);
}

/* Badge d'alerte */
.website-warning-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    background: linear-gradient(135deg, #ef4444, #dc2626);
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    box-shadow: 0 4px 10px rgba(239, 68, 68, 0.4);
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
        opacity: 1;
    }
    50% {
        transform: scale(1.05);
        opacity: 0.9;
    }
}

/* Message d'alerte dans la card */
.website-alert-message {
    background: rgba(239, 68, 68, 0.15);
    border: 1px solid rgba(239, 68, 68, 0.3);
    border-radius: 8px;
    padding: 0.5rem 0.75rem;
    margin-top: 0.75rem;
    margin-bottom: 0.75rem;
    font-size: 0.85rem;
    color: #fecaca;
    line-height: 1.4;
}

.website-alert-message strong {
    color: #ef4444;
    display: block;
    margin-bottom: 0.25rem;
}

/* Icône d'avertissement */
.warning-icon {
    display: inline-block;
    margin-right: 0.25rem;
    animation: shake 0.5s infinite;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-2px); }
    75% { transform: translateX(2px); }
}

/* Modification du nom du site pour les sites en erreur */
.website-card.has-issues .website-name {
    color: #fca5a5;
}

/* Bouton désactivé avec style rouge */
.website-card.has-issues .btn-vote.disabled {
    background: linear-gradient(135deg, #6b7280, #4b5563);
    opacity: 0.6;
}