/* Styles pour le système de vote public */

.cdc-vote-container {
    max-width: 800px;
    margin: 20px auto;
    padding: 30px;
    background: #ffffff;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
}

.cdc-vote-header {
    margin-bottom: 25px;
    text-align: center;
}

.cdc-vote-header h3 {
    font-size: 24px;
    font-weight: 600;
    color: #333;
    margin: 0 0 15px 0;
}

.cdc-vote-description {
    color: #666;
    font-size: 16px;
    line-height: 1.6;
    margin-top: 10px;
}

.cdc-vote-options {
    margin: 25px 0;
}

.cdc-vote-option {
    display: block;
    margin-bottom: 15px;
    padding: 15px;
    background: #f8f9fa;
    border: 2px solid #e0e0e0;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.cdc-vote-option:hover {
    background: #e8f4f8;
    border-color: #2271b1;
    transform: translateX(5px);
}

.cdc-vote-option input[type="radio"] {
    margin-right: 12px;
    width: 20px;
    height: 20px;
    cursor: pointer;
    accent-color: #2271b1;
    flex-shrink: 0;
}

.cdc-vote-option input[type="radio"]:checked ~ .cdc-vote-option-content .cdc-vote-option-text {
    font-weight: 600;
    color: #2271b1;
}

.cdc-vote-option input[type="radio"]:checked ~ .cdc-vote-option-content {
    border-color: #2271b1;
}

.cdc-vote-option-content {
    display: flex;
    align-items: center;
    gap: 15px;
    flex-wrap: wrap;
}

.cdc-vote-option-image {
    flex-shrink: 0;
    width: 150px;
    height: 150px;
}

.cdc-vote-image-link {
    position: relative;
    display: block;
    overflow: hidden;
    border-radius: 6px;
    border: 2px solid #e0e0e0;
    transition: all 0.3s ease;
}

.cdc-vote-image-link:hover {
    border-color: #2271b1;
    transform: scale(1.05);
}

.cdc-vote-image-link:hover .cdc-vote-image-overlay {
    opacity: 1;
}

.cdc-vote-thumbnail {
    display: block !important;
    width: 150px !important;
    height: 150px !important;
    min-width: 150px !important;
    min-height: 150px !important;
    max-width: 150px !important;
    max-height: 150px !important;
    object-fit: cover !important;
    transition: transform 0.3s ease;
    border-radius: 4px;
    flex-shrink: 0;
}

.cdc-vote-image-link:hover .cdc-vote-thumbnail {
    transform: scale(1.1);
}

.cdc-vote-image-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(34, 113, 177, 0.8);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    opacity: 0;
    transition: opacity 0.3s ease;
    font-size: 14px;
}

.cdc-vote-option-text {
    font-size: 16px;
    color: #333;
    flex: 1;
    min-width: 200px;
}

.cdc-vote-email-field {
    margin: 25px 0;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 6px;
}

.cdc-vote-email-field label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #333;
}

.cdc-vote-email-input {
    width: 100%;
    padding: 12px;
    border: 2px solid #e0e0e0;
    border-radius: 6px;
    font-size: 16px;
    transition: border-color 0.3s ease;
}

.cdc-vote-email-input:focus {
    outline: none;
    border-color: #2271b1;
}

.cdc-vote-hidden-note {
    font-size: 12px;
    color: #666;
    font-weight: normal;
    font-style: italic;
}

.cdc-vote-gdpr {
    margin: 25px 0;
    padding: 15px;
    background: #f0f7ff;
    border-left: 4px solid #2271b1;
    border-radius: 4px;
}

.cdc-vote-gdpr label {
    display: flex;
    align-items: flex-start;
    cursor: pointer;
    font-size: 14px;
    line-height: 1.5;
}

.cdc-vote-gdpr input[type="checkbox"] {
    margin-right: 10px;
    margin-top: 3px;
    width: 18px;
    height: 18px;
    cursor: pointer;
    accent-color: #2271b1;
    flex-shrink: 0;
}

.cdc-vote-gdpr a {
    color: #2271b1;
    text-decoration: underline;
}

.cdc-vote-gdpr a:hover {
    color: #135e96;
}

.cdc-vote-submit {
    display: block;
    width: 100%;
    padding: 15px 30px;
    background: #2271b1;
    color: #ffffff;
    border: none;
    border-radius: 6px;
    font-size: 18px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 20px;
}

.cdc-vote-submit:hover {
    background: #135e96;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(34, 113, 177, 0.3);
}

.cdc-vote-submit:active {
    transform: translateY(0);
}

.cdc-vote-submit:disabled {
    background: #ccc;
    cursor: not-allowed;
    transform: none;
}

.cdc-vote-message {
    margin-top: 15px;
    padding: 12px;
    border-radius: 4px;
    text-align: center;
    font-weight: 500;
}

.cdc-vote-message.success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.cdc-vote-message.error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.cdc-vote-success {
    padding: 15px;
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
    border-radius: 6px;
    text-align: center;
    font-weight: 600;
    margin-bottom: 25px;
}

.cdc-vote-error {
    padding: 15px;
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
    border-radius: 6px;
    text-align: center;
    margin: 20px 0;
}

.cdc-vote-info {
    padding: 15px;
    background: #d1ecf1;
    color: #0c5460;
    border: 1px solid #bee5eb;
    border-radius: 6px;
    text-align: center;
    margin: 20px 0;
}

/* Résultats */
.cdc-vote-results {
    margin-top: 30px;
    padding-top: 25px;
    border-top: 2px solid #e0e0e0;
}

.cdc-vote-results-preview {
    margin-top: 30px;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 6px;
}

.cdc-vote-results-preview h4 {
    margin-top: 0;
    margin-bottom: 15px;
    color: #333;
    font-size: 18px;
}

.cdc-vote-result-item {
    margin-bottom: 20px;
}

.cdc-vote-result-label {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
    font-size: 15px;
}

.cdc-vote-result-label span:first-child {
    font-weight: 500;
    color: #333;
}

.cdc-vote-result-count {
    color: #666;
    font-size: 14px;
}

.cdc-vote-result-bar {
    height: 30px;
    background: #e0e0e0;
    border-radius: 15px;
    overflow: hidden;
    position: relative;
}

.cdc-vote-result-fill {
    height: 100%;
    background: linear-gradient(90deg, #2271b1 0%, #3a9bd9 100%);
    border-radius: 15px;
    transition: width 0.8s ease;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    padding-right: 10px;
    color: #fff;
    font-size: 12px;
    font-weight: 600;
}

.cdc-vote-total {
    margin-top: 20px;
    padding-top: 15px;
    border-top: 1px solid #e0e0e0;
    text-align: center;
    font-weight: 600;
    color: #333;
    font-size: 16px;
}

/* Responsive */
@media (max-width: 768px) {
    .cdc-vote-container {
        padding: 20px;
        margin: 10px;
    }
    
    .cdc-vote-header h3 {
        font-size: 20px;
    }
    
    .cdc-vote-option {
        padding: 12px;
    }
    
    .cdc-vote-submit {
        padding: 12px 20px;
        font-size: 16px;
    }
}

