/* Bloc sondages accueil — UI pro v2 */

.sidebar-poll.sidebar-poll--pro,
.sidebar-panel.sidebar-poll.sidebar-poll--pro {
    background: linear-gradient(165deg, #fff 0%, #f8fbff 100%);
    border: 1px solid var(--border-color, #d6e3f3);
    border-radius: 18px;
    padding: 0;
    overflow: visible;
    box-shadow: 0 10px 28px rgba(15, 35, 70, 0.06);
    color: var(--text-dark, #111827);
}

.sidebar-poll-shell {
    display: flex;
    flex-direction: column;
}

.sidebar-poll-header {
    padding: 1rem 1rem 0.75rem;
    border-bottom: 1px solid rgba(214, 227, 243, 0.9);
    background: rgba(255, 255, 255, 0.85);
}

.sidebar-poll-title-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    margin-bottom: 0.65rem;
}

.sidebar-poll-title {
    margin: 0;
    font-size: 1rem;
    font-weight: 800;
    display: flex;
    align-items: center;
    gap: 0.45rem;
    color: var(--text-dark, #111827);
}

.sidebar-poll-icon {
    font-size: 1.05rem;
    line-height: 1;
}

.sidebar-poll-counter {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 1.6rem;
    height: 1.6rem;
    padding: 0 0.45rem;
    border-radius: 999px;
    background: rgba(232, 93, 4, 0.12);
    color: var(--bg-accent, #e85d04);
    font-size: 0.72rem;
    font-weight: 800;
}

/* Navigation flèches (sans scrollbar) */
.sidebar-poll-nav {
    display: grid;
    grid-template-columns: 2.1rem minmax(0, 1fr) 2.1rem;
    align-items: center;
    gap: 0.45rem;
}

.sidebar-poll-nav-btn {
    appearance: none;
    border: 1px solid var(--border-color, #d6e3f3);
    background: #fff;
    border-radius: 10px;
    width: 2.1rem;
    height: 2.1rem;
    padding: 0;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font: inherit;
    font-size: 0.95rem;
    font-weight: 800;
    color: var(--bg-accent, #e85d04);
    transition: border-color 0.15s, background 0.15s, box-shadow 0.15s;
}

.sidebar-poll-nav-btn:hover,
.sidebar-poll-nav-btn:focus-visible {
    border-color: var(--bg-accent, #e85d04);
    background: rgba(232, 93, 4, 0.08);
    box-shadow: 0 4px 12px rgba(232, 93, 4, 0.15);
    outline: none;
}

.sidebar-poll-nav-current {
    min-width: 0;
    text-align: center;
    display: grid;
    gap: 0.1rem;
}

.sidebar-poll-nav-label {
    display: block;
    font-size: 0.78rem;
    font-weight: 700;
    color: var(--text-dark, #111827);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.sidebar-poll-nav-index {
    font-size: 0.68rem;
    font-weight: 700;
    color: var(--muted-text, #586b82);
    letter-spacing: 0.03em;
}

.sidebar-poll-panel {
    padding: 1rem 1.1rem 1.15rem;
    overflow: visible;
}

.sidebar-poll-results,
.sidebar-poll-result-list,
.sidebar-poll-result,
.sidebar-poll-result-head,
.sidebar-poll-result-stats {
    overflow: visible;
}

.sidebar-poll[data-sidebar-poll-block].is-loading .sidebar-poll-panel {
    opacity: 0.55;
    pointer-events: none;
}

.sidebar-poll-card-head {
    margin-bottom: 0.85rem;
}

.sidebar-poll-question {
    margin: 0 0 0.35rem;
    font-size: 0.95rem;
    font-weight: 700;
    line-height: 1.35;
    color: var(--text-dark, #111827);
}

.sidebar-poll-meta {
    display: inline-block;
    font-size: 0.72rem;
    font-weight: 700;
    color: var(--muted-text, #586b82);
    background: rgba(214, 227, 243, 0.35);
    padding: 0.15rem 0.55rem;
    border-radius: 999px;
}

.sidebar-poll-options {
    border: 0;
    margin: 0 0 0.85rem;
    padding: 0;
    display: grid;
    gap: 0.45rem;
}

.sidebar-poll-option {
    display: block;
    cursor: pointer;
}

.sidebar-poll-option input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.sidebar-poll-option-ui {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    padding: 0.62rem 0.75rem;
    border: 1px solid var(--border-color, #d6e3f3);
    border-radius: 12px;
    background: #fff;
    transition: border-color 0.15s, box-shadow 0.15s, transform 0.12s;
}

.sidebar-poll-option:hover .sidebar-poll-option-ui {
    border-color: rgba(232, 93, 4, 0.45);
    box-shadow: 0 4px 12px rgba(15, 35, 70, 0.06);
}

.sidebar-poll-option input:focus-visible + .sidebar-poll-option-ui {
    outline: 2px solid var(--bg-accent, #e85d04);
    outline-offset: 2px;
}

.sidebar-poll-option input:checked + .sidebar-poll-option-ui {
    border-color: var(--bg-accent, #e85d04);
    background: rgba(232, 93, 4, 0.07);
}

.sidebar-poll-option-bullet {
    width: 0.85rem;
    height: 0.85rem;
    border-radius: 50%;
    border: 2px solid #b8c8dc;
    flex-shrink: 0;
}

.sidebar-poll-option input:checked + .sidebar-poll-option-ui .sidebar-poll-option-bullet {
    border-color: var(--bg-accent, #e85d04);
    box-shadow: inset 0 0 0 3px #fff, inset 0 0 0 6px var(--bg-accent, #e85d04);
}

.sidebar-poll-option-text {
    font-size: 0.84rem;
    font-weight: 600;
    line-height: 1.3;
}

.sidebar-poll-submit {
    width: 100%;
    border: 0;
    border-radius: 12px;
    padding: 0.65rem 1rem;
    background: var(--bg-accent, #e85d04);
    color: #fff;
    font: inherit;
    font-size: 0.84rem;
    font-weight: 800;
    cursor: pointer;
    transition: transform 0.12s, box-shadow 0.15s, filter 0.15s;
}

.sidebar-poll-submit:hover {
    filter: brightness(1.05);
    box-shadow: 0 8px 18px rgba(232, 93, 4, 0.28);
}

.sidebar-poll-submit:active {
    transform: translateY(1px);
}

.sidebar-poll-result-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    gap: 0.75rem;
}

.sidebar-poll-result-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.5rem;
    margin-bottom: 0.35rem;
}

.sidebar-poll-result-label {
    flex: 1 1 auto;
    min-width: 0;
    font-size: 0.82rem;
    font-weight: 700;
    line-height: 1.3;
}

.sidebar-poll-your-vote {
    display: inline-block;
    margin-left: 0.35rem;
    padding: 0.05rem 0.4rem;
    border-radius: 999px;
    background: rgba(232, 93, 4, 0.14);
    color: var(--bg-accent, #e85d04);
    font-size: 0.62rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    vertical-align: middle;
}

.sidebar-poll-result-stats {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    justify-content: flex-end;
    gap: 0.4rem;
    max-width: 58%;
}

.sidebar-poll-result-pct {
    display: inline-flex;
    align-items: baseline;
    gap: 0.15rem;
    font-size: 0.76rem;
    color: var(--muted-text, #586b82);
    white-space: nowrap;
}

.sidebar-poll-result-pct strong {
    color: var(--text-dark, #111827);
    font-size: 0.82rem;
}

.sidebar-poll-result-bar {
    height: 0.45rem;
    border-radius: 999px;
    background: rgba(214, 227, 243, 0.55);
    overflow: hidden;
}

.sidebar-poll-result-fill {
    display: block;
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, #ff8c42, var(--bg-accent, #e85d04));
    transition: width 0.45s ease;
}

.sidebar-poll-result.is-user-choice .sidebar-poll-result-fill {
    box-shadow: 0 0 0 1px rgba(232, 93, 4, 0.25);
}

.sidebar-poll-voters {
    flex-shrink: 0;
}

.sidebar-poll-voters-stack {
    display: inline-flex;
    align-items: center;
}

.sidebar-poll-voter {
    position: relative;
    display: inline-flex;
    margin-left: -0.28rem;
    cursor: pointer;
}

.sidebar-poll-voter:first-child {
    margin-left: 0;
}

.sidebar-poll-voter-avatar {
    width: 24px !important;
    height: 24px !important;
    border-radius: 50% !important;
    border: 2px solid #fff !important;
    box-shadow: 0 2px 6px rgba(15, 35, 70, 0.14);
    display: block !important;
}

.sidebar-poll-voter-tip {
    position: absolute;
    left: 50%;
    top: calc(100% + 8px);
    transform: translateX(-50%) translateY(-2px);
    padding: 0.32rem 0.55rem;
    border-radius: 6px;
    background: rgba(15, 23, 42, 0.96);
    color: #fff;
    font-size: 0.68rem;
    font-weight: 700;
    line-height: 1.2;
    white-space: nowrap;
    pointer-events: none;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.15s ease, transform 0.15s ease, visibility 0.15s;
    z-index: 30;
    box-shadow: 0 6px 18px rgba(15, 35, 70, 0.24);
}

.sidebar-poll-voter-tip::after {
    content: "";
    position: absolute;
    left: 50%;
    bottom: 100%;
    transform: translateX(-50%);
    border: 5px solid transparent;
    border-bottom-color: rgba(15, 23, 42, 0.96);
}

.sidebar-poll-voter:hover .sidebar-poll-voter-tip,
.sidebar-poll-voter:focus-visible .sidebar-poll-voter-tip {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0);
}

.sidebar-poll-voters-more {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 24px;
    height: 24px;
    margin-left: -0.2rem;
    padding: 0 0.3rem;
    border-radius: 999px;
    background: #eef3fa;
    border: 2px solid #fff;
    font-size: 0.62rem;
    font-weight: 800;
    color: var(--muted-text, #586b82);
    box-shadow: 0 2px 6px rgba(15, 35, 70, 0.1);
}

.sidebar-poll-results-note {
    margin: 0.75rem 0 0;
    font-size: 0.72rem;
    color: var(--muted-text, #586b82);
}

@media (max-width: 640px) {
    .sidebar-poll-header,
    .sidebar-poll-panel {
        padding-left: 0.85rem;
        padding-right: 0.85rem;
    }

    .sidebar-poll-result-stats {
        max-width: 52%;
        gap: 0.25rem;
    }

    .sidebar-poll-voter-avatar {
        width: 22px !important;
        height: 22px !important;
    }
}
