/* ========== PAGE DE VOTE HYTALE (assets/css/vote.css) ========== */

.sb-vote-hero {
    padding: 10rem 2rem 5rem 2rem;
    text-align: center;
    background: linear-gradient(135deg, var(--sb-slate-blue) 0%, var(--sb-void-dark) 100%);
    border-bottom: 2px solid rgba(255, 215, 0, 0.2);
    min-height: 80vh; /* Pour remplir l'écran si peu de contenu */
}

.sb-vote-container {
    max-width: 800px;
    margin: 0 auto;
}

.sb-vote-title {
    font-size: 3rem;
    color: var(--sb-gold);
    margin-bottom: 1.5rem;
    text-transform: uppercase;
    text-shadow: 0 4px 15px rgba(255, 215, 0, 0.3);
}

.sb-vote-intro {
    font-size: 1.1rem;
    color: var(--sb-text-main);
    line-height: 1.8;
    margin-bottom: 3rem;
}

/* Zone de vérification (Carte principale) */
.sb-vote-card {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 215, 0, 0.1);
    border-radius: 12px;
    padding: 3rem;
    position: relative;
    overflow: hidden;
    backdrop-filter: blur(10px);
    transition: transform 0.3s ease, border-color 0.3s ease;
}

.sb-vote-card:hover {
    border-color: var(--sb-hytale-green-start);
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

.sb-vote-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; width: 100%; height: 4px;
    background: linear-gradient(90deg, var(--sb-hytale-green-start), var(--sb-gold));
}

.sb-vote-step {
    margin-bottom: 2rem;
    text-align: left;
}

.sb-vote-label {
    display: block;
    color: var(--sb-gold);
    font-weight: 700;
    margin-bottom: 0.8rem;
    font-family: 'Cinzel', serif;
    font-size: 1.2rem;
}

.sb-vote-input-group {
    display: flex;
    gap: 1rem;
}

.sb-vote-input {
    flex: 1;
    padding: 1rem 1.5rem;
    background: rgba(9, 18, 29, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 6px;
    color: #fff;
    font-size: 1.1rem;
    font-family: 'Lato', sans-serif;
    transition: all 0.3s ease;
}

.sb-vote-input:focus {
    outline: none;
    border-color: var(--sb-hytale-green-start);
    background: rgba(9, 18, 29, 0.9);
    box-shadow: 0 0 15px rgba(88, 166, 24, 0.2);
}

.sb-btn-vote {
    background: linear-gradient(135deg, var(--sb-hytale-green-start) 0%, var(--sb-hytale-green-end) 100%);
    color: white;
    padding: 1rem 2.5rem;
    border: none;
    border-radius: 6px;
    font-weight: 700;
    font-size: 1.1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.8rem;
}

.sb-btn-vote:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(88, 166, 24, 0.6);
    filter: brightness(1.1);
}

.sb-btn-vote:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    filter: grayscale(0.5);
}

/* Zone de résultat */
.sb-vote-result {
    margin-top: 2rem;
    padding: 1.5rem;
    border-radius: 8px;
    display: none; 
    text-align: left;
    animation: fadeIn 0.5s ease;
}

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

.sb-vote-success {
    background: rgba(88, 166, 24, 0.15);
    border-left: 4px solid var(--sb-hytale-green-start);
    color: var(--sb-text-main);
}

.sb-vote-error {
    background: rgba(255, 68, 68, 0.15);
    border-left: 4px solid #FF4444;
    color: #ffdada;
}

.sb-vote-list {
    margin-top: 1rem;
    list-style: none;
    padding: 0;
}

.sb-vote-item {
    background: rgba(0, 0, 0, 0.2);
    padding: 1rem;
    border-radius: 4px;
    margin-bottom: 0.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.sb-btn-claim {
    background: var(--sb-gold);
    color: var(--sb-void-dark);
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 4px;
    font-weight: 800;
    cursor: pointer;
    font-size: 0.9rem;
    transition: transform 0.2s ease;
}

.sb-btn-claim:hover {
    transform: scale(1.05);
    background: #fff;
    box-shadow: 0 0 10px rgba(255, 215, 0, 0.5);
}

.sb-btn-claim:disabled {
    background: #4A5568;
    color: #A0AEC0;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* Loader CSS */
.sb-loader-dots {
    display: inline-block;
    margin-left: 5px;
}
.sb-loader-dots::after {
    content: '.';
    animation: dots 1.5s steps(5, end) infinite;
}
@keyframes dots {
    0%, 20% { content: '.'; }
    40% { content: '..'; }
    60% { content: '...'; }
    80%, 100% { content: ''; }
}

@media (max-width: 768px) {
    .sb-vote-input-group { flex-direction: column; }
    .sb-btn-vote { width: 100%; justify-content: center; }
    .sb-vote-title { font-size: 2rem; }
    .sb-vote-item { flex-direction: column; gap: 1rem; text-align: center; }
    .sb-btn-claim { width: 100%; }
}

/* --- DESIGN GRID & CARTES --- */

.sb-vote-step-global {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.05) 0%, rgba(255, 255, 255, 0.02) 100%);
    border: 1px solid rgba(255, 215, 0, 0.15);
    padding: 2rem;
    border-radius: 16px;
    margin-bottom: 3rem;
    text-align: left;
    box-shadow: 0 4px 20px rgba(0,0,0,0.2);
}

.sb-vote-hint {
    margin-top: 0.8rem;
    color: var(--sb-text-muted);
    font-size: 0.9rem;
    font-style: italic;
}

/* GRILLE RESPONSIVE 3 COLONNES */
.sb-vote-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
    width: 100%;
}

/* CARTE SITE */
.sb-site-card {
    background: rgba(22, 33, 46, 0.7);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    position: relative;
    backdrop-filter: blur(10px);
}

.sb-site-card:hover {
    transform: translateY(-5px);
    border-color: var(--sb-gold);
    box-shadow: 0 10px 25px rgba(0,0,0,0.4);
    background: rgba(22, 33, 46, 0.9);
}

/* Header de carte */
.sb-site-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid rgba(255,255,255,0.05);
}

.sb-site-icon {
    width: 32px; height: 32px;
    border-radius: 4px;
    object-fit: contain;
}

.sb-site-card h3 {
    margin: 0;
    font-size: 1.1rem;
    color: #fff;
    font-family: 'Cinzel', serif;
    letter-spacing: 0.5px;
}

/* Statuts */
.sb-site-status {
    margin-bottom: 1.5rem;
    font-size: 0.95rem;
    min-height: 24px;
}

.sb-badge-wait { color: var(--sb-text-muted); opacity: 0.7; }
.sb-badge-success { color: var(--sb-hytale-green-end); font-weight: 700; display: flex; align-items: center; gap: 6px; }
.sb-badge-fail { color: #FF4444; font-weight: 600; }
.sb-badge-info { color: var(--sb-accent-blue); font-style: italic;}

/* Actions (Boutons) */
.sb-site-actions {
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
    margin-top: auto;
}

.sb-btn-site-vote {
    background: rgba(255,255,255,0.08);
    color: #fff;
    text-align: center;
    padding: 0.8rem;
    border-radius: 6px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-size: 0.9rem;
    border: 1px solid transparent;
    transition: all 0.2s;
}

.sb-btn-site-vote:hover {
    background: var(--sb-gold);
    color: var(--sb-void-dark);
    box-shadow: 0 0 15px rgba(255, 215, 0, 0.3);
}

.sb-btn-site-claim {
    background: linear-gradient(135deg, var(--sb-hytale-green-start), var(--sb-hytale-green-end));
    color: #fff;
    border: none;
    padding: 0.8rem;
    border-radius: 6px;
    font-weight: 700;
    cursor: pointer;
    text-transform: uppercase;
    font-size: 0.9rem;
    animation: pulseBtn 2s infinite;
}

.sb-btn-site-claim:hover {
    filter: brightness(1.15);
}

@keyframes pulseBtn {
    0% { box-shadow: 0 0 0 0 rgba(88, 166, 24, 0.4); }
    70% { box-shadow: 0 0 0 10px rgba(88, 166, 24, 0); }
    100% { box-shadow: 0 0 0 0 rgba(88, 166, 24, 0); }
}

.sb-vote-footer-note {
    margin-top: 3rem;
    text-align: center;
    color: var(--sb-text-muted);
    font-size: 0.9rem;
    border-top: 1px solid rgba(255,255,255,0.1);
    padding-top: 1.5rem;
}

/* Mobile Adjustments */
@media (max-width: 600px) {
    .sb-vote-input-group { flex-direction: column; }
    .sb-btn-vote { width: 100%; justify-content: center; }
    .sb-site-card { padding: 1.2rem; }
    .sb-vote-grid { grid-template-columns: 1fr; } /* 1 colonne mobile */
}

/* ========== AJOUTS POUR LE SYSTÈME DE COOLDOWN ET ETATS ========== */

/* Couleurs d'état dynamiques */
.sb-status-green {
    color: #2ecc71;
    font-weight: 700;
    text-shadow: 0 0 10px rgba(46, 204, 113, 0.4);
}

.sb-status-orange {
    color: #f39c12;
    font-weight: 700;
    font-family: 'Lato', monospace; /* Monospace pour éviter que le texte bouge pdt le décompte */
    font-variant-numeric: tabular-nums;
}

.sb-status-red {
    color: #e74c3c;
    font-weight: 600;
}

/* Animation douce pour le timer */
.timer-tick {
    animation: pulse-timer 1s infinite;
}

@keyframes pulse-timer {
    0% { opacity: 1; }
    50% { opacity: 0.8; }
    100% { opacity: 1; }
}

/* Désactivation visuelle du bouton de vote */
.sb-btn-disabled {
    background: #2c3e50 !important;
    color: #7f8c8d !important;
    cursor: not-allowed !important;
    box-shadow: none !important;
    transform: none !important;
    filter: grayscale(1) !important;
}