/* Plugin Sondage - Styles publics */

.sondages-list {
    display: grid;
    gap: 1.5rem;
    margin-top: 2rem;
}

.sondage-item {
    background: var(--section-bg-color);
    border: 1px solid var(--form-border-color);
    border-radius: var(--section-radius);
    padding: 1.5rem;
    transition: all 0.3s ease;
}

.sondage-item:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    transform: translateY(-2px);
}

.sondage-item h3 {
    margin: 0 0 0.5rem 0;
}

.sondage-item h3 a {
    color: var(--primary-color);
    text-decoration: none;
}

.sondage-item h3 a:hover {
    color: var(--primary-hover-color);
}

.already-voted {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    background: var(--warning-color);
    color: var(--primary-inverse-color);
    border-radius: 4px;
    font-size: 0.9rem;
    margin-top: 0.5rem;
}

.already-voted-notice {
    margin-top: 1rem;
    padding: 0;
    background: transparent;
    border: none;
}

.already-voted-badge {
    display: inline-block;
    padding: 0.35rem 0.85rem;
    background: var(--primary-color);
    color: var(--primary-inverse-color);
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 1rem;
}

.sondage-stats-preview {
    margin-top: 1rem;
}

.sondage-stats-preview strong {
    display: block;
    margin-bottom: 1rem;
    color: var(--primary-color);
    font-size: 0.95rem;
}

.stats-visualization {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.stat-bar-item {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.stat-bar-label {
    min-width: 120px;
    font-size: 0.9rem;
    color: var(--font-secondary);
    font-weight: 500;
}

.stat-bar-container {
    flex: 1;
    height: 28px;
    background: var(--section-head-bg-color);
    border-radius: 14px;
    overflow: hidden;
    position: relative;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.1);
}

.stat-bar-fill {
    height: 100%;
    background: var(--primary-color);
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    padding-right: 0.75rem;
    transition: width 0.6s ease;
    min-width: fit-content;
    position: relative;
}

.stat-bar-value {
    color: var(--primary-inverse-color);
    font-size: 0.85rem;
    font-weight: 600;
    white-space: nowrap;
}

/* Si la barre est trop petite, mettre le texte à l'extérieur */
.stat-bar-fill[style*="width: 0%"],
.stat-bar-fill[style*="width: 1%"],
.stat-bar-fill[style*="width: 2%"],
.stat-bar-fill[style*="width: 3%"],
.stat-bar-fill[style*="width: 4%"],
.stat-bar-fill[style*="width: 5%"] {
    padding-right: 0;
}

.stat-bar-fill[style*="width: 0%"] .stat-bar-value,
.stat-bar-fill[style*="width: 1%"] .stat-bar-value,
.stat-bar-fill[style*="width: 2%"] .stat-bar-value,
.stat-bar-fill[style*="width: 3%"] .stat-bar-value,
.stat-bar-fill[style*="width: 4%"] .stat-bar-value,
.stat-bar-fill[style*="width: 5%"] .stat-bar-value {
    position: absolute;
    left: calc(100% + 0.5rem);
    color: var(--primary-color);
    text-shadow: none;
}

.sondage-results {
    margin-top: 2rem;
}

.sondage-total {
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
    color: var(--primary-color);
}

.sondage-option-result {
    margin-bottom: 1.5rem;
}

.option-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.5rem;
    font-size: 0.95rem;
}

.option-text {
    font-weight: 500;
}

.option-stats {
    color: var(--font-secondary);
}

.option-bar {
    height: 30px;
    background: var(--section-head-bg-color);
    border-radius: 15px;
    overflow: hidden;
    position: relative;
}

.option-progress {
    height: 100%;
    background: var(--primary-color);
    border-radius: 15px;
    transition: width 0.6s ease;
}

.sondage-options {
    margin: 1.5rem 0;
}

.sondage-option {
    display: block;
    padding: 1rem;
    margin-bottom: 0.75rem;
    background: var(--section-head-bg-color);
    border: 2px solid var(--form-border-color);
    border-radius: var(--section-radius);
    cursor: pointer;
    transition: all 0.3s ease;
}

.sondage-option:hover {
    background: var(--form-bg-color);
    border-color: var(--primary-color);
}

.sondage-option input[type="radio"] {
    margin-right: 0.75rem;
}

.sondage-option input[type="radio"]:checked+span {
    font-weight: 600;
    color: var(--primary-color);
}

.sondage-options-label {
    display: block;
    font-weight: 500;
    margin-bottom: 0.75rem;
    color: var(--primary-color);
}

form label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: var(--primary-color);
}

form input[type="email"] {
    width: 100%;
    padding: 0.75rem;
    background: var(--form-bg-color);
    color: var(--font-color);
    border: 1px solid var(--form-border-color);
    border-radius: 4px;
    font-size: 1rem;
    margin-bottom: 0.5rem;
}

form small {
    display: block;
    color: var(--font-secondary);
    font-size: 0.875rem;
    margin-top: -0.25rem;
    margin-bottom: 1rem;
}

.required {
    color: var(--alert-color);
}

.rgpd-checkbox {
    margin: 1.5rem 0;
    padding: 1rem;
    background: var(--section-head-bg-color);
    border: 1px solid var(--form-border-color);
    border-radius: 4px;
}

.rgpd-checkbox label {
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
    cursor: pointer;
    font-weight: normal;
    color: var(--font-color);
}

.rgpd-checkbox input[type="checkbox"] {
    margin-top: 0.2rem;
    flex-shrink: 0;
}

.rgpd-text {
    display: block;
    margin-top: 0.5rem;
    margin-left: 1.75rem;
    font-size: 0.85rem;
    line-height: 1.5;
    color: var(--font-secondary);
}

/* Bouton retour à la liste */
a.button {
    color: var(--primary-inverse-color) !important;
    background-color: var(--primary-color) !important;
    text-decoration: none;
    display: inline-flex !important;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    border-radius: 4px;
    font-weight: 600;
    transition: all 0.3s ease;
}

a.button:hover {
    background-color: var(--primary-hover-color) !important;
    color: var(--primary-inverse-color) !important;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

a.button span {
    color: var(--primary-inverse-color) !important;
}

a.button i {
    color: var(--primary-inverse-color) !important;
}
/* === Utility Classes for Inline Styles Cleanup === */

.sondage-back-button { margin-bottom: 1.5rem; }
.sondage-results-wrapper { max-width: 400px; margin: 2rem auto; }
.sondage-results-list { margin-top: 2rem; }
.sondage-option-result { margin-bottom: 1rem; }
.sondage-other-results { margin-top: 2rem; padding: 1rem; background: var(--section-head-bg-color); border-radius: 8px; }
.sondage-other-results h4 { margin-top: 0; margin-bottom: 1rem; }
.sondage-other-results ul { list-style: disc; margin-left: 1.5rem; }
.sondage-other-results li { margin-bottom: 0.25rem; }
.sondage-results-demographics { margin-top: 3rem; border-top: 1px solid var(--form-border-color); padding-top: 2rem; }
.sondage-results-demographics h3 { text-align: center; margin-bottom: 2rem; }
.demographics-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 2rem; }
.demographics-card { background: var(--section-bg-color); padding: 1rem; border-radius: 8px; border: 1px solid var(--form-border-color); }
.demographics-card h4 { text-align: center; font-size: 1rem; opacity: 0.7; }
.chart-container { height: 250px; position: relative; }
.chart-container-tall { height: 300px; position: relative; }
.sondage-voted-message { text-align: center; padding: 2rem; background: var(--section-head-bg-color); border-radius: 8px; border: 1px solid var(--form-border-color); }
.sondage-voted-message i { font-size: 3rem; color: var(--success-color); margin-bottom: 1rem; display: block; }
.sondage-option-other { margin-top: 1rem; }
.sondage-option-other label { display: block; margin-bottom: 0.5rem; }
.sondage-option-other input { width: 100%; }
.sondage-vote-button { margin-top: 1.5rem; }
.sondage-login-required { text-align: center; padding: 2rem; background: var(--section-head-bg-color); border-radius: 8px; border: 1px solid var(--form-border-color); }
.sondage-preview-options { margin-top: 2rem; text-align: left; }
.sondage-preview-options ul { list-style: none; padding: 0; }
.sondage-preview-options li { padding: 0.5rem; background: var(--section-bg-color); border-bottom: 1px solid var(--form-border-color); }
.sondage-stats { margin-bottom: 2rem; padding: 1.5rem; background: var(--section-head-bg-color); border-radius: 8px; }
.stats-summary { display: flex; gap: 2rem; margin-bottom: 1rem; padding-bottom: 1rem; border-bottom: 1px solid var(--form-border-color); align-items: center; }
.admin-chart-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 2rem; margin-bottom: 2rem; }
.admin-chart-grid h4 { text-align: center; margin-bottom: 1rem; }
.options-stats { overflow-y: auto; max-height: 300px; }
