/* Styles frontend pour SD Poll */

.sd-poll-container {
    max-width: 100%;
    margin: 20px auto;
}

/* Sondage actif */
.sd-poll-active {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 15px;
    padding: 40px;
    margin-bottom: 40px;
    box-shadow: 0 10px 40px rgba(102, 126, 234, 0.3);
    color: white;
}

.poll-header {
    text-align: center;
    margin-bottom: 30px;
}

.poll-title {
    font-size: 32px;
    margin: 0 0 15px 0;
    font-weight: 700;
    color: white;
}

.poll-description {
    font-size: 16px;
    margin: 0;
    opacity: 0.95;
    line-height: 1.6;
}

.poll-image {
    text-align: center;
    margin: 25px 0;
}

.poll-image img {
    max-width: 500px;
    width: 100%;
    height: auto;
    border-radius: 10px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.2);
}

/* Formulaire de vote */
.poll-content {
    background: white;
    border-radius: 10px;
    padding: 30px;
}

.poll-options {
    margin-bottom: 25px;
}

.poll-option {
    display: block;
    padding: 15px 20px;
    margin-bottom: 12px;
    background: #f8f9fa;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 16px;
}

.poll-option:hover {
    border-color: #667eea;
    background: #f0f4ff;
}

.poll-option input[type="radio"] {
    margin-right: 12px;
    width: 18px;
    height: 18px;
    cursor: pointer;
}

.poll-vote-button {
    width: 100%;
    padding: 15px 30px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 18px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
}

.poll-vote-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.5);
}

.poll-vote-button:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

/* Résultats */
.poll-results {
    padding: 10px 0;
}

.results-header {
    text-align: center;
    font-size: 18px;
    margin-bottom: 25px;
    color: #2c3e50;
}

.result-item {
    margin-bottom: 20px;
}

.result-label {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
    font-size: 15px;
}

.option-text {
    font-weight: 600;
    color: #2c3e50;
}

.result-stats {
    display: flex;
    gap: 8px;
    font-size: 14px;
}

.percentage {
    font-weight: 700;
    color: #667eea;
}

.vote-count {
    color: #7f8c8d;
}

.result-bar {
    height: 30px;
    background: #e9ecef;
    border-radius: 15px;
    overflow: hidden;
    position: relative;
}

.result-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, #667eea 0%, #764ba2 100%);
    border-radius: 15px;
    transition: width 0.8s ease;
    box-shadow: inset 0 2px 4px rgba(255,255,255,0.3);
}

/* Sondages fermés */
.sd-poll-closed-list {
    margin-top: 50px;
}

.sd-poll-closed-list h3 {
    font-size: 24px;
    margin-bottom: 20px;
    color: #2c3e50;
}

.polls-table {
    width: 100%;
    border-collapse: collapse;
    background: white;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.polls-table thead {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.polls-table th {
    padding: 15px;
    text-align: left;
    font-weight: 600;
}

.polls-table td {
    padding: 15px;
    border-bottom: 1px solid #e9ecef;
}

.polls-table tbody tr:hover {
    background: #f8f9fa;
}

.view-results-btn {
    padding: 8px 16px;
    background: #667eea;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s ease;
}

.view-results-btn:hover {
    background: #5568d3;
    transform: translateY(-1px);
}

.view-results-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* Aucun sondage actif */
.sd-poll-no-active {
    text-align: center;
    padding: 60px 20px;
    background: #f8f9fa;
    border-radius: 10px;
    margin-bottom: 40px;
}

.sd-poll-no-active p {
    font-size: 18px;
    color: #7f8c8d;
    margin: 0;
}

/* Modale */
.sd-poll-modal {
    display: none;
    position: fixed;
    z-index: 9999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.7);
    animation: fadeIn 0.3s;
}

.modal-content {
    position: relative;
    background-color: #fff;
    margin: 5% auto;
    padding: 40px;
    border-radius: 15px;
    max-width: 600px;
    width: 90%;
    box-shadow: 0 10px 40px rgba(0,0,0,0.3);
    animation: slideDown 0.3s;
}

.modal-close {
    position: absolute;
    top: 15px;
    right: 20px;
    font-size: 32px;
    font-weight: bold;
    color: #aaa;
    cursor: pointer;
    transition: color 0.3s;
}

.modal-close:hover {
    color: #000;
}

/* Notification */
.sd-poll-notification {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 15px 25px;
    background: #46b450;
    color: white;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(70, 180, 80, 0.4);
    z-index: 10000;
    animation: slideInRight 0.3s;
    font-weight: 500;
}

.sd-poll-notification.error {
    background: #dc3232;
    box-shadow: 0 4px 15px rgba(220, 50, 50, 0.4);
}

/* Animations */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideDown {
    from {
        transform: translateY(-50px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

@keyframes slideInRight {
    from {
        transform: translateX(100px);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* Responsive */
@media (max-width: 768px) {
    .sd-poll-active {
        padding: 25px 20px;
    }
    
    .poll-title {
        font-size: 24px;
    }
    
    .poll-description {
        font-size: 14px;
    }
    
    .poll-content {
        padding: 20px;
    }
    
    .poll-option {
        padding: 12px 15px;
        font-size: 14px;
    }
    
    .polls-table {
        font-size: 14px;
    }
    
    .polls-table th,
    .polls-table td {
        padding: 10px;
    }
    
    .modal-content {
        padding: 25px;
        margin: 10% auto;
    }
}

@media (max-width: 480px) {
    .polls-table {
        display: block;
        overflow-x: auto;
    }
    
    .result-label {
        flex-direction: column;
        align-items: flex-start;
        gap: 5px;
    }
}

