/*
 * Votons — lisibilité des formulaires de vote (3.22.0).
 * Chargée après style.css : ne fait que compléter ou préciser des règles.
 *
 * 1. En-tête de chaque bloc de vote et votes en série.
 * 2. Clé : bouton « voir » discret, bouton « Continuer » principal.
 * 3. Vote candidat par candidat : nom mis en avant, choix en un clic.
 * 4. Synthèse avant validation compacte.
 * 5. Petits écrans.
 */

/* ---------- 1. En-tête des blocs ---------- */
.cfdtvote-form .cfdtvote-form-heading {
    margin: 0 0 16px;
    padding: 0 0 12px;
    border-bottom: 2px solid var(--cfdt-orange-border, #ffd2a6);
}

.cfdtvote-form .cfdtvote-form-heading-kicker {
    margin: 0 0 4px;
    color: var(--cfdt-text-muted, #6b7280);
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.cfdtvote-form .cfdtvote-form-heading-kicker [data-cfdtvote-form-counter] {
    color: var(--cfdt-orange, #ff7900);
}

.cfdtvote-form .cfdtvote-form-heading-title {
    margin: 0;
    color: var(--cfdt-text, #111827);
    font-size: 1.45rem;
    font-weight: 800;
    line-height: 1.25;
}

.cfdtvote-form .cfdtvote-form-heading-note {
    margin: 6px 0 0;
    color: var(--cfdt-text-soft, #4b5563);
    font-size: 0.95rem;
}

.cfdtvote-form .cfdtvote-form-heading-items {
    margin: 8px 0 0 1.2em;
    padding: 0;
    color: var(--cfdt-text-soft, #4b5563);
    font-size: 0.95rem;
}

.cfdtvote-form .cfdtvote-form-heading-items li { margin: 2px 0; }

.cfdtvote-election-form .cfdtvote-form-heading {
    border-bottom-color: var(--cfdt-election-border, #c4b5fd);
}

.cfdtvote-election-form .cfdtvote-form-heading-kicker [data-cfdtvote-form-counter] {
    color: var(--cfdt-election, #7c3aed);
}

/* Le titre est déjà dans l'en-tête : inutile de le répéter après la clé. */
.cfdtvote-election-form .cfdtvote-form-heading ~ .cfdtvote-vote-step .cfdtvote-election-title {
    display: none;
}

/* Votes en série : chaque bloc est nettement séparé du suivant. */
.cfdtvote-form.cfdtvote-form-in-series {
    margin-bottom: 28px;
}

.cfdtvote-form .cfdtvote-token-series-hint {
    margin: 0 0 12px;
    padding: 10px 12px;
    border-radius: var(--cfdt-radius-sm, 10px);
    background: var(--cfdt-blue-soft, #eff6ff);
    border: 1px solid var(--cfdt-blue-border, #bfdbfe);
    color: var(--cfdt-blue-dark, #1d4ed8);
    font-size: 0.92rem;
    line-height: 1.45;
}

/* ---------- 2. Clé ---------- */
.cfdtvote-form .cfdtvote-token-input-row {
    position: relative;
    display: block;
}

.cfdtvote-form .cfdtvote-token-input-row input[name="token"] {
    width: 100%;
    padding-right: 92px;
}

.cfdtvote-form .cfdtvote-token-toggle,
.cfdtvote-form button.cfdtvote-token-toggle {
    position: absolute;
    top: 50%;
    right: 6px;
    transform: translateY(-50%);
    display: inline-flex;
    align-items: center;
    gap: 4px;
    width: auto;
    min-width: 0;
    min-height: 0;
    margin: 0;
    padding: 6px 8px;
    border: 0;
    border-radius: 6px;
    background: transparent;
    box-shadow: none;
    color: var(--cfdt-text-muted, #6b7280);
    font-size: 0.85rem;
    font-weight: 600;
    line-height: 1;
    text-decoration: none;
    text-transform: none;
}

.cfdtvote-form .cfdtvote-token-toggle:hover,
.cfdtvote-form .cfdtvote-token-toggle:focus-visible {
    background: var(--cfdt-bg-panel, #f8fafc);
    color: var(--cfdt-text, #111827);
}

.cfdtvote-form .cfdtvote-token-toggle:active { transform: translateY(-50%); }
.cfdtvote-form .cfdtvote-token-toggle.is-visible { color: var(--cfdt-orange, #ff7900); }
.cfdtvote-form .cfdtvote-token-toggle-icon { flex: 0 0 auto; }

.cfdtvote-form .cfdtvote-token-validate-row { margin: 14px 0 0; }

.cfdtvote-form .cfdtvote-token-validate {
    min-width: 220px;
    min-height: 48px;
    font-size: 1.05rem;
}

.cfdtvote-form .cfdtvote-token-validate::after {
    content: " →";
}

/* ---------- 3. Vote candidat par candidat ---------- */
.cfdtvote-form .cfdtvote-candidate-vote > legend.cfdtvote-candidate-name {
    display: block;
    width: 100%;
    margin: 0 0 10px;
    padding: 0 6px !important;
    border: 0;
    background: #ffffff !important;
    color: var(--cfdt-text, #111827);
    font-size: 1.35rem;
    font-weight: 800;
    line-height: 1.25;
}

.cfdtvote-form .cfdtvote-candidate-vote.has-quick-positions.is-answered > legend.cfdtvote-candidate-name::after {
    content: " ✓";
    color: var(--cfdt-green, #16a34a);
}

.cfdtvote-form .cfdtvote-quick-positions {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
}

.cfdtvote-form .cfdtvote-quick-positions-help {
    grid-column: 1 / -1;
    margin: 0;
    color: var(--cfdt-text-soft, #4b5563);
    font-size: 0.9rem;
}

.cfdtvote-form button.cfdtvote-quick-position {
    width: 100%;
    min-height: 52px;
    margin: 0;
    padding: 10px 6px;
    border: 2px solid var(--cfdt-border-strong, #d1d5db) !important;
    border-radius: 12px;
    background: #ffffff !important;
    color: var(--cfdt-text-soft, #374151) !important;
    font-size: 1rem;
    font-weight: 800;
    letter-spacing: 0.02em;
    box-shadow: none !important;
    text-decoration: none !important;
}

.cfdtvote-form button.cfdtvote-quick-position:hover {
    background: var(--cfdt-bg-panel, #f8fafc) !important;
}

.cfdtvote-form button.cfdtvote-quick-position--pour.is-active {
    border-color: var(--cfdt-green, #16a34a) !important;
    background: var(--cfdt-green, #16a34a) !important;
    color: #ffffff !important;
}

.cfdtvote-form button.cfdtvote-quick-position--contre.is-active {
    border-color: #dc2626 !important;
    background: #dc2626 !important;
    color: #ffffff !important;
}

.cfdtvote-form button.cfdtvote-quick-position--abstention.is-active {
    border-color: #6b7280 !important;
    background: #6b7280 !important;
    color: #ffffff !important;
}

/* 1 mandat : les champs chiffrés et l'aide de calcul sont inutiles. */
.cfdtvote-form .cfdtvote-candidate-vote.is-single-mandate .cfdtvote-candidate-controls-approval {
    display: none;
}

/* Plusieurs mandats : répartition compacte sur une ligne. */
.cfdtvote-form .cfdtvote-candidate-vote.has-quick-positions:not(.is-single-mandate) .cfdtvote-candidate-controls-approval {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
    padding: 10px;
}

.cfdtvote-form .cfdtvote-candidate-vote.has-quick-positions:not(.is-single-mandate) .cfdtvote-candidate-controls-approval .cfdtvote-candidate-help {
    display: none;
}

/* ---------- 4. Synthèse avant validation ---------- */
.cfdtvote-form .cfdtvote-election-summary.is-compact .cfdtvote-identity-grid { display: none; }
.cfdtvote-form .cfdtvote-election-summary.is-compact.is-expanded .cfdtvote-identity-grid { display: grid; }

.cfdtvote-form .cfdtvote-election-summary-line {
    margin: 0 0 8px;
    padding: 0;
    list-style: none;
}

.cfdtvote-form .cfdtvote-election-summary-item {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 12px;
    margin: 0;
    padding: 7px 0;
    border-bottom: 1px solid var(--cfdt-border, #e5e7eb);
}

.cfdtvote-form .cfdtvote-election-summary-item:last-child { border-bottom: 0; }
.cfdtvote-form .cfdtvote-election-summary-name { font-weight: 600; }
.cfdtvote-form .cfdtvote-election-summary-choice { white-space: nowrap; }
.cfdtvote-form .cfdtvote-election-summary-choice.is-pour { color: var(--cfdt-green-dark, #166534); }
.cfdtvote-form .cfdtvote-election-summary-choice.is-contre { color: #b91c1c; }
.cfdtvote-form .cfdtvote-election-summary-choice.is-abstention,
.cfdtvote-form .cfdtvote-election-summary-choice.is-empty { color: var(--cfdt-text-muted, #6b7280); font-weight: 600; }

.cfdtvote-form button.cfdtvote-election-summary-toggle {
    width: auto;
    min-height: 0;
    margin: 0 0 8px;
    padding: 0 !important;
    border: 0 !important;
    background: transparent !important;
    color: var(--cfdt-blue, #2563eb) !important;
    font-size: 0.9rem;
    font-weight: 600;
    text-decoration: underline;
    box-shadow: none !important;
}

/* Un seul candidat : seule la vérification (message de contrôle) subsiste. */
.cfdtvote-form .cfdtvote-election-summary.is-minimal > h3,
.cfdtvote-form .cfdtvote-election-summary.is-minimal .cfdtvote-election-summary-line,
.cfdtvote-form .cfdtvote-election-summary.is-minimal .cfdtvote-election-summary-toggle,
.cfdtvote-form .cfdtvote-election-summary.is-minimal:not(.is-expanded) .cfdtvote-identity-grid {
    display: none;
}

.cfdtvote-form .cfdtvote-election-summary.is-minimal {
    padding: 0;
    border: 0;
    background: transparent;
    box-shadow: none;
}

/* ---------- 5. Petits écrans ---------- */
@media (max-width: 640px) {
    .cfdtvote-form .cfdtvote-form-heading-title { font-size: 1.25rem; }

    .cfdtvote-form .cfdtvote-token-validate { width: 100%; min-width: 0; }

    .cfdtvote-form .cfdtvote-token-toggle,
    .cfdtvote-form button.cfdtvote-token-toggle { width: auto; }

    .cfdtvote-form .cfdtvote-candidate-vote > legend.cfdtvote-candidate-name { font-size: 1.2rem; }

    .cfdtvote-form button.cfdtvote-quick-position { min-height: 56px; font-size: 0.95rem; }

    /* « Vos informations » : une seule ligne compacte au lieu de trois cartes. */
    .cfdtvote-form .cfdtvote-identity-summary .cfdtvote-identity-grid {
        display: flex;
        flex-wrap: wrap;
        gap: 4px 14px;
    }

    .cfdtvote-form .cfdtvote-identity-summary .cfdtvote-identity-item {
        padding: 0;
        border: 0;
        background: transparent;
        box-shadow: none;
    }
}

/* ---------- 6. Robustesse face aux thèmes ----------
 * Certains thèmes (dont Twenty Twenty-One) imposent la couleur de tous les
 * boutons avec des sélecteurs très spécifiques : on fixe ici l'apparence
 * des petits boutons du formulaire de vote. */
.cfdtvote-form button.cfdtvote-token-toggle {
    background: transparent !important;
    border: 0 !important;
    box-shadow: none !important;
    color: var(--cfdt-text-muted, #6b7280) !important;
    padding: 6px 8px !important;
}

.cfdtvote-form button.cfdtvote-token-toggle:hover,
.cfdtvote-form button.cfdtvote-token-toggle:focus-visible {
    background: var(--cfdt-bg-panel, #f1f5f9) !important;
    color: var(--cfdt-text, #111827) !important;
}

.cfdtvote-form button.cfdtvote-token-toggle.is-visible { color: var(--cfdt-orange, #ff7900) !important; }dtvote-form button.cfdtvote-quick-position:disabled { opacity: 0.6; }/* Petits écrans : POUR et CONTRE côte à côte, ABSTENTION en dessous. */
@media (max-width: 640px) {
    .cfdtvote-form .cfdtvote-quick-positions { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .cfdtvote-form button.cfdtvote-quick-position--abstention { grid-column: 1 / -1; }
}

/* ---------- 7. Questions : vote en un clic (3.23.0) ---------- */
.cfdtvote-form .cfdtvote-question-block .cfdtvote-question-quick { margin: 4px 0 8px; }
.cfdtvote-form .cfdtvote-question-block.has-question-quick .cfdtvote-input-grid { display: none; }
.cfdtvote-form .cfdtvote-question-block.has-question-quick.is-answered > legend::after {
    content: " ✓";
    color: var(--cfdt-green, #16a34a);
}

/* ---------- 8. Résultats : rappel de l'élection (3.23.0) ---------- */
.cfdtvote-synthese__context {
    margin: 0 0 4px;
    color: var(--cfdt-election-dark, #5b21b6);
    font-size: 0.85rem;
    font-weight: 600;
    line-height: 1.3;
}

.cfdtvote-synthese__context span {
    display: inline-block;
    margin-right: 4px;
    padding: 1px 7px;
    border-radius: 999px;
    background: var(--cfdt-election-bg, #ede9fe);
    font-size: 0.72rem;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.cfdtvote-dossier-election { margin: 0 0 28px; }
.cfdtvote-dossier-election-title { margin: 18px 0 10px; }
.cfdtvote-synthese__heading { min-width: 0; }
.cfdtvote-synthese__heading .cfdtvote-synthese__title { margin: 0; }

/* ---------- 9. État des scrutins : couleur du bloc des procurations ----------
 * 3.48.0 : sarcelle (le violet est réservé aux élections). */
.cfdtvote-synthese-proxy-panel {
    border-left: 5px solid #0d9488;
}
.cfdtvote-synthese-proxy-panel .cfdtvote-collapsible-icon {
    background: #ccfbf1;
    color: #0f766e;
}

/* Émargement : colonne mise en valeur (3.48.0). */
.cfdtvote-synthese-table .cfdtvote-emargement-col { text-align: center; white-space: nowrap; }
.cfdtvote-synthese-table th.cfdtvote-emargement-col { background: #eff6ff; color: #1d4ed8; }
.cfdtvote-emargement-badge {
    display: inline-block;
    min-width: 118px;
    padding: 5px 12px;
    border-radius: 999px;
    font-size: 0.85rem;
    font-weight: 800;
    text-align: center;
}
.cfdtvote-emargement-badge.is-present { background: #16a34a; color: #ffffff; }
.cfdtvote-emargement-badge.is-absent { background: #ffffff; color: #6b7280; border: 1px dashed #cbd5e1; }
@media print {
    .cfdtvote-emargement-badge.is-present { background: #ffffff !important; color: #166534 !important; border: 2px solid #16a34a; }
}

/* Votes nominatifs : portée de la page. */
.cfdtvote-vote-details-scope { display: flex; flex-wrap: wrap; gap: 6px; margin: 8px 0 0; }

/* ---------- 10. Dossier complet : tableaux de résultats (3.25.0) ---------- */
.cfdtvote-dossier-results-table { margin: 18px 0 8px; }
.cfdtvote-dossier-table-title { margin: 0 0 8px; font-size: 1.05rem; }
.cfdtvote-dossier-results-table .cfdtvote-results-table { width: 100%; }
@media print {
    .cfdtvote-dossier-results-table { break-inside: avoid-page; }
    .cfdtvote-dossier-results-table table { font-size: 10pt; }
}
.cfdtvote-dossier-results-table .cfdtvote-results-table th,
.cfdtvote-dossier-results-table .cfdtvote-results-table td { padding: 6px 8px; }
.cfdtvote-dossier-results-table .cfdtvote-results-table small { color: var(--cfdt-text-muted, #6b7280); }
@media print {
    .cfdtvote-dossier-results-table .cfdtvote-synthese-table-wrap { overflow: visible; }
}

/* ---------- 11. Gérer les votes (3.26.0) ---------- */
.cfdtvote-od-pages {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 14px;
}

.cfdtvote-od-pages-col {
    padding: 12px 14px;
    border-radius: 10px;
    border: 1px solid var(--cfdt-border, #e5e7eb);
}

.cfdtvote-od-pages-col h4 { margin: 0 0 8px; }
.cfdtvote-od-pages-col--vote { border-left: 4px solid var(--cfdt-blue, #2563eb); }
.cfdtvote-od-pages-col--results { border-left: 4px solid var(--cfdt-green, #16a34a); }

.cfdtvote-od-link {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
    margin: 0 0 6px;
}

.cfdtvote-od-link-label {
    flex: 1 1 auto;
    min-width: 70px;
    font-weight: 600;
    font-size: 0.9rem;
}

.cfdtvote-od-link .button {
    min-height: 0;
    padding: 3px 10px;
    font-size: 0.82rem;
    line-height: 1.6;
}

.cfdtvote-od-list {
    display: grid;
    gap: 8px;
    container-type: inline-size;
    container-name: cfdtvote-od;
}

.cfdtvote-od-row {
    display: grid;
    gap: 10px 14px;
    align-items: center;
    padding: 10px 12px;
    border: 1px solid var(--cfdt-border, #e5e7eb);
    border-left: 4px solid #cbd5e1;
    border-radius: 10px;
    background: #ffffff;
}

.cfdtvote-od-row--open { border-left-color: var(--cfdt-green, #16a34a); background: #f7fdf9; }
.cfdtvote-od-row--closed { border-left-color: #94a3b8; }
.cfdtvote-od-row--draft { border-left-color: #fbbf24; }

.cfdtvote-od-head {
    padding: 0 12px;
    border: 0;
    background: transparent;
    color: var(--cfdt-text-muted, #6b7280);
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.cfdtvote-od-title strong { font-size: 1rem; }
.cfdtvote-od-title small { display: block; margin-top: 2px; color: var(--cfdt-text-muted, #6b7280); }
.cfdtvote-od-id { color: var(--cfdt-text-muted, #6b7280); font-size: 0.85rem; }
.cfdtvote-od-cell form { margin: 0; }
.cfdtvote-od-cell .button { white-space: nowrap; }
.cfdtvote-od-links .cfdtvote-od-link { margin: 0 0 4px; }
.cfdtvote-od-links .cfdtvote-od-link:last-child { margin-bottom: 0; }

.cfdtvote-od-btn-close { border-color: #dc2626 !important; color: #b91c1c !important; background: #ffffff !important; }
.cfdtvote-od-btn-publish { border-color: var(--cfdt-green, #16a34a) !important; color: var(--cfdt-green-dark, #166534) !important; background: #ffffff !important; }

.cfdtvote-od-more { margin: 10px 0 0; }

/* Petits écrans : chaque scrutin devient une carte. */
@media (max-width: 1100px) {
    .cfdtvote-od-head { display: none; }

    .cfdtvote-od-row {
        grid-template-columns: 1fr 1fr;
    }

    .cfdtvote-od-title,
    .cfdtvote-od-links { grid-column: 1 / -1; }

    .cfdtvote-od-cell[data-label]::before {
        content: attr(data-label);
        display: block;
        margin-bottom: 3px;
        color: var(--cfdt-text-muted, #6b7280);
        font-size: 0.72rem;
        font-weight: 700;
        letter-spacing: 0.04em;
        text-transform: uppercase;
    }
}

@media (max-width: 560px) {
    .cfdtvote-od-row { grid-template-columns: 1fr; }
    .cfdtvote-od-cell .button { width: 100%; text-align: center; }
    .cfdtvote-od-link .button { width: auto; }
}.cfdtvote-od-row > * { min-width: 0; }

@container cfdtvote-od (max-width: 980px) {
    .cfdtvote-od-head { display: none; }
    .cfdtvote-od-row { grid-template-columns: 1fr 1fr; }
    .cfdtvote-od-title,
    .cfdtvote-od-links { grid-column: 1 / -1; }
    .cfdtvote-od-cell[data-label]::before {
        content: attr(data-label);
        display: block;
        margin-bottom: 3px;
        color: var(--cfdt-text-muted, #6b7280);
        font-size: 0.72rem;
        font-weight: 700;
        letter-spacing: 0.04em;
        text-transform: uppercase;
    }
    .cfdtvote-od-links { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 6px 14px; }
}

@container cfdtvote-od (max-width: 460px) {
    .cfdtvote-od-row { grid-template-columns: 1fr; }
    .cfdtvote-od-cell .button { width: 100%; text-align: center; }
    .cfdtvote-od-link .button { width: auto; }
}

/* Boutons de la page : apparence fixe, lisible quel que soit le thème. */
.cfdtvote-od-list .button,
.cfdtvote-od-pages .button {
    background: #ffffff !important;
    border: 1px solid #cbd5e1 !important;
    color: #1f2937 !important;
    box-shadow: none !important;
    text-decoration: none !important;
}

.cfdtvote-od-list .button:hover,
.cfdtvote-od-pages .button:hover { background: #f1f5f9 !important; }

.cfdtvote-od-list .button.cfdtvote-od-btn-open {
    background: var(--cfdt-orange, #ff7900) !important;
    border-color: var(--cfdt-orange, #ff7900) !important;
    color: #ffffff !important;
}

.cfdtvote-od-list .button.cfdtvote-od-btn-close {
    border-color: #dc2626 !important;
    color: #b91c1c !important;
}

.cfdtvote-od-list .button.cfdtvote-od-btn-publish {
    border-color: var(--cfdt-green, #16a34a) !important;
    color: var(--cfdt-green-dark, #166534) !important;
}

@container cfdtvote-od (max-width: 980px) {
    .cfdtvote-od-links[data-label]::before { grid-column: 1 / -1; margin-bottom: 0; }
}

/* ---------- 12. Export États (3.27.0) ---------- */
.cfdtvote-etats-export-proxy { margin: 0 0 16px; }
.cfdtvote-etats-export-proxy h4 { margin: 12px 0 6px; }
@media print {
    .cfdtvote-etats-export-page .cfdtvote-synthese-proxy-selector,
    .cfdtvote-etats-export-page .cfdtvote-collapsible-caret,
    .cfdtvote-etats-export-page .cfdtvote-manager-proxy-power-actions,
    .cfdtvote-etats-export-page button { display: none !important; }
    .cfdtvote-etats-export-page details > summary { list-style: none; }
    .cfdtvote-etats-export-proxy { break-inside: avoid-page; }
}
/* Impression de l'Export États : A4 paysage (page nommée, sans effet sur les
   autres pages du site) et tableaux entièrement visibles. */
@page cfdtvote-etats { size: A4 landscape; margin: 12mm; }
@media print {
    .cfdtvote-etats-export-page { page: cfdtvote-etats; }
    .cfdtvote-etats-export-page input[type="search"],
    .cfdtvote-etats-export-page input[type="text"],
    .cfdtvote-etats-export-page select { display: none !important; }
    .cfdtvote-etats-export-page .cfdtvote-manager-table-wrap,
    .cfdtvote-etats-export-page .cfdtvote-table-scroll,
    .cfdtvote-etats-export-page [class*="table-wrap"],
    .cfdtvote-etats-export-page [class*="scroll"] { overflow: visible !important; max-width: none !important; }
    .cfdtvote-etats-export-page table { width: 100% !important; min-width: 0 !important; table-layout: auto; font-size: 8.5pt; }
    .cfdtvote-etats-export-page th,
    .cfdtvote-etats-export-page td { padding: 3px 4px !important; white-space: normal !important; }
}
/* Pas d'animation d'ouverture : impression toujours nette, même immédiate. */
.cfdtvote-etats-export-page *,
.cfdtvote-etats-export-page *::before,
.cfdtvote-etats-export-page *::after { animation: none !important; transition: none !important; }

/* ---------- 13. Gérer les votes : 4 colonnes, sans chevauchement (3.28.0) ---------- */
.cfdtvote-od-row {
    grid-template-columns: minmax(170px, 2fr) minmax(150px, 1.1fr) minmax(170px, 1fr) minmax(215px, 1.2fr);
}

/* Actions (vote puis résultats) empilées, sur toute la largeur de la colonne. */
.cfdtvote-od-actions { display: flex; flex-direction: column; gap: 6px; align-items: stretch; }
.cfdtvote-od-actions form,
.cfdtvote-od-actions .button { width: 100%; }
.cfdtvote-od-list .cfdtvote-od-actions .button {
    white-space: normal !important;
    text-align: center;
    line-height: 1.25;
    padding: 6px 10px;
}

/* Liens : une ligne par lien, libellé à largeur fixe, boutons compacts. */
.cfdtvote-od-links { display: flex; flex-direction: column; gap: 4px; }
.cfdtvote-od-links .cfdtvote-od-link { flex-wrap: nowrap; gap: 4px; margin: 0; }
.cfdtvote-od-links .cfdtvote-od-link-label { flex: 0 0 72px; min-width: 0; }
.cfdtvote-od-list .cfdtvote-od-link .button { padding: 2px 8px !important; font-size: 0.8rem; }

@container cfdtvote-od (max-width: 900px) {
    .cfdtvote-od-head { display: none; }
    .cfdtvote-od-row { grid-template-columns: 1fr 1fr; }
    .cfdtvote-od-title,
    .cfdtvote-od-links { grid-column: 1 / -1; }
    .cfdtvote-od-links { flex-direction: row; flex-wrap: wrap; gap: 6px 18px; }
    .cfdtvote-od-links[data-label]::before { flex: 0 0 100%; }
}

@container cfdtvote-od (min-width: 901px) {
    .cfdtvote-od-head { display: grid; }
    .cfdtvote-od-cell[data-label]::before { content: none; }
}

@container cfdtvote-od (max-width: 460px) {
    .cfdtvote-od-row { grid-template-columns: 1fr; }
    .cfdtvote-od-links { flex-direction: column; }
}

/* ---------- 14. Retours d'usage (3.30.0) ---------- */

/* Gérer les votes › Accès aux pages : « Ouvrir » des résultats en vert. */
.cfdtvote-od-pages-col--results .button.cfdtvote-od-open {
    background: var(--cfdt-green, #16a34a) !important;
    border-color: var(--cfdt-green, #16a34a) !important;
    color: #ffffff !important;
}
.cfdtvote-od-pages-col--results .button.cfdtvote-od-open:hover {
    background: var(--cfdt-green-dark, #166534) !important;
}

/* Titres des blocs repliables sur téléphone : le badge passe sous le titre
   au lieu d'écraser celui-ci en colonne étroite (texte « vertical »). */
@media (max-width: 640px) {
    details.cfdtvote-od-panel > summary.cfdtvote-collapsible-summary,
    details.cfdtvote-table-panel > summary.cfdtvote-collapsible-summary {
        flex-wrap: wrap;
        gap: 8px;
    }
    details.cfdtvote-od-panel > summary .cfdtvote-collapsible-summary-main,
    details.cfdtvote-table-panel > summary .cfdtvote-collapsible-summary-main {
        flex: 1 1 100%;
        min-width: 0;
    }
    details.cfdtvote-od-panel > summary .cfdtvote-collapsible-heading,
    details.cfdtvote-table-panel > summary .cfdtvote-collapsible-heading {
        min-width: 0;
        flex: 1 1 auto;
    }
    details.cfdtvote-od-panel > summary .cfdtvote-collapsible-title,
    details.cfdtvote-table-panel > summary .cfdtvote-collapsible-title,
    details.cfdtvote-od-panel > summary .cfdtvote-collapsible-subtitle,
    details.cfdtvote-table-panel > summary .cfdtvote-collapsible-subtitle {
        word-break: normal;
        overflow-wrap: break-word;
        white-space: normal;
    }
    details.cfdtvote-od-panel > summary .cfdtvote-collapsible-aside,
    details.cfdtvote-table-panel > summary .cfdtvote-collapsible-aside {
        flex: 1 1 100%;
        justify-content: space-between;
    }
    details.cfdtvote-od-panel > summary .cfdtvote-collapsible-badge,
    details.cfdtvote-table-panel > summary .cfdtvote-collapsible-badge {
        white-space: normal;
    }
}

/* Résultats d'élection : « Copier les résultats » et « Image PNG » côte à côte. */
.cfdtvote-results-copy-row {
    gap: 8px;
    flex-wrap: wrap;
    justify-content: flex-end;
    align-items: center;
}

/* Bulletin d'élection : affichages facultatifs (Personnalisation formulaires). */
.cfdtvote-form.cfdtvote-hide-type-note .cfdtvote-election-type-note { display: none !important; }
.cfdtvote-form.cfdtvote-hide-election-summary .cfdtvote-election-summary > :not([data-confirmation-box]) { display: none !important; }
.cfdtvote-form.cfdtvote-hide-election-summary .cfdtvote-election-summary {
    padding: 0;
    border: 0;
    background: transparent;
    box-shadow: none;
}
.cfdtvote-results-copy-row button.cfdtvote-results-copy-btn {
    display: inline-flex !important;
    align-items: center;
    gap: 6px;
    width: auto !important;
    min-height: 0 !important;
    margin: 0 !important;
    padding: 6px 14px !important;
    border: 1px solid var(--cfdt-border-strong, #d1d5db) !important;
    border-radius: 999px !important;
    background: #ffffff !important;
    box-shadow: none !important;
    color: var(--cfdt-text-soft, #374151) !important;
    font-size: 0.82rem !important;
    font-weight: 700 !important;
    line-height: 1.4 !important;
    letter-spacing: normal !important;
    text-transform: none !important;
    text-decoration: none !important;
    white-space: nowrap;
    cursor: pointer;
    transition: background .15s ease, color .15s ease, border-color .15s ease;
}

.cfdtvote-results-copy-row button.cfdtvote-results-copy-btn::before {
    content: "\f105"; /* dashicons-admin-page */
    font-family: dashicons;
    font-size: 16px;
    line-height: 1;
}

.cfdtvote-results-copy-row button.cfdtvote-election-results-png::before {
    content: "\f128"; /* dashicons-format-image */
}

.cfdtvote-results-copy-row button.cfdtvote-results-copy-btn:hover,
.cfdtvote-results-copy-row button.cfdtvote-results-copy-btn:focus-visible {
    border-color: var(--cfdt-blue, #2563eb) !important;
    color: var(--cfdt-blue-dark, #1d4e89) !important;
}

.cfdtvote-results-copy-row button.cfdtvote-results-copy-btn.is-copied {
    background: var(--cfdt-green-bg, #f0fdf4) !important;
    border-color: var(--cfdt-green, #16a34a) !important;
    color: var(--cfdt-green-dark, #166534) !important;
}

@media print {
    .cfdtvote-results-copy-row { display: none !important; }
}

/* ---------- 16. Règle unique POUR / CONTRE / ABSTENTION (3.32.0) ----------
 * Candidat par candidat, liste unique sans raturage et questions :
 * 1 mandat → trois boutons, champs chiffrés masqués ;
 * plusieurs mandats → répartition chiffrée seule. */
.cfdtvote-form .cfdtvote-election-subject.is-single-mandate .cfdtvote-candidate-controls-approval {
    display: none;
}
.cfdtvote-form .cfdtvote-list-vote.has-quick-positions .cfdtvote-quick-positions {
    margin: 10px 0 0;
}
.cfdtvote-form .cfdtvote-list-vote.has-quick-positions.is-answered > legend.cfdtvote-candidate-name::after {
    content: " ✓";
    color: var(--cfdt-green, #16a34a);
}

/* ---------- 17. Plusieurs mandats : raccourcis « Tout POUR… » (3.33.0) ----------
 * Plus discrets que les gros boutons à 1 mandat : la répartition chiffrée
 * reste juste en dessous. */
.cfdtvote-form .cfdtvote-quick-positions--bulk { gap: 6px; margin-bottom: 8px; }
.cfdtvote-form .cfdtvote-quick-positions--bulk button.cfdtvote-quick-position {
    min-height: 42px;
    padding: 6px 4px;
    font-size: 0.88rem;
    letter-spacing: 0;
}
.cfdtvote-form .cfdtvote-quick-positions--bulk .cfdtvote-quick-positions-help {
    order: 10;
    margin: 2px 0 0;
    font-size: 0.85rem;
}
@media (max-width: 640px) {
    .cfdtvote-form .cfdtvote-quick-positions--bulk button.cfdtvote-quick-position { min-height: 46px; }
}

/* Plusieurs mandats : répartition compacte sur une ligne (questions comme
   candidats), libellés lisibles même sur petit écran. */
.cfdtvote-form .cfdtvote-question-block.has-question-bulk .cfdtvote-input-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
}
.cfdtvote-form .cfdtvote-question-block.has-question-bulk .cfdtvote-input-grid .cfdtvote-input-group { margin: 0; min-width: 0; }
.cfdtvote-form .cfdtvote-question-block.has-question-bulk .cfdtvote-input-grid label,
.cfdtvote-form .cfdtvote-election-subject.is-bulk-mandates .cfdtvote-candidate-controls-approval label {
    display: block;
    font-size: 0.72rem;
    letter-spacing: 0;
    overflow-wrap: normal;
    text-transform: uppercase;
    word-break: keep-all;
    white-space: nowrap;
    margin: 0;
}
.cfdtvote-form .cfdtvote-question-block.has-question-bulk .cfdtvote-input-grid input,
.cfdtvote-form .cfdtvote-election-subject.is-bulk-mandates .cfdtvote-candidate-controls-approval input {
    width: 100%;
    min-width: 0;
}
.cfdtvote-form .cfdtvote-election-subject.is-bulk-mandates .cfdtvote-candidate-controls-approval {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
    padding: 10px;
}
.cfdtvote-form .cfdtvote-election-subject.is-bulk-mandates .cfdtvote-candidate-controls-approval > :not(.cfdtvote-input-group) { grid-column: 1 / -1; }
.cfdtvote-form .cfdtvote-election-subject.is-bulk-mandates .cfdtvote-candidate-controls-approval .cfdtvote-candidate-help { display: none; }
.cfdtvote-form .cfdtvote-question-block.has-question-bulk .cfdtvote-input-grid .cfdtvote-input-group,
.cfdtvote-form .cfdtvote-election-subject.is-bulk-mandates .cfdtvote-candidate-controls-approval .cfdtvote-input-group {
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    gap: 4px;
}
/* ---------- 18. Chrono : encart caché tant qu'aucun chrono n'est lancé (3.37.0) ---------- */
.cfdtvote-vote-timer[hidden] { display: none !important; }

/* ---------- 19. Choix en un clic : candidatures multiples et listes concurrentes (3.46.0) ---------- */
.cfdtvote-form .cfdtvote-choice-bar {
    margin: 0 0 14px;
    padding: 12px;
    border: 1px solid var(--cfdt-border, #e5e7eb);
    border-radius: 12px;
    background: #ffffff;
}
.cfdtvote-form .cfdtvote-choice-title { margin: 0 0 8px; font-weight: 800; font-size: 1rem; }
.cfdtvote-form .cfdtvote-choice-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 8px; }
.cfdtvote-form button.cfdtvote-choice-btn {
    width: 100% !important;
    min-height: 52px !important;
    margin: 0 !important;
    padding: 10px 8px !important;
    border: 2px solid var(--cfdt-border-strong, #d1d5db) !important;
    border-radius: 12px !important;
    background: #ffffff !important;
    color: var(--cfdt-text, #1f2937) !important;
    box-shadow: none !important;
    font-size: 0.98rem !important;
    font-weight: 700 !important;
    line-height: 1.25 !important;
    text-transform: none !important;
    white-space: normal !important;
}
.cfdtvote-form button.cfdtvote-choice-btn:hover { background: var(--cfdt-bg-panel, #f8fafc) !important; }
.cfdtvote-form button.cfdtvote-choice-btn.is-active {
    border-color: var(--cfdt-green, #16a34a) !important;
    background: var(--cfdt-green, #16a34a) !important;
    color: #ffffff !important;
}
.cfdtvote-form button.cfdtvote-choice-btn--abstention { color: var(--cfdt-text-soft, #4b5563) !important; }
.cfdtvote-form button.cfdtvote-choice-btn--abstention.is-active {
    border-color: #6b7280 !important;
    background: #6b7280 !important;
    color: #ffffff !important;
}
.cfdtvote-form button.cfdtvote-choice-btn:disabled { opacity: 0.6; }
.cfdtvote-form .cfdtvote-choice-bar.is-bulk button.cfdtvote-choice-btn { min-height: 44px !important; font-size: 0.9rem !important; }
.cfdtvote-form .cfdtvote-choice-help { margin: 8px 0 0; font-size: 0.85rem; color: var(--cfdt-text-soft, #4b5563); }
.cfdtvote-form button.cfdtvote-choice-detail-toggle {
    width: auto !important;
    min-height: 0 !important;
    margin: 10px 0 0 !important;
    padding: 0 !important;
    border: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
    color: var(--cfdt-blue, #2563eb) !important;
    font-size: 0.88rem !important;
    font-weight: 600 !important;
    text-decoration: underline !important;
}

/* 1 mandat : champs chiffrés masqués tant que la répartition détaillée n'est pas ouverte. */
.cfdtvote-form .cfdtvote-choice-single:not(.cfdtvote-choice-detail-open) .cfdtvote-election-subject .cfdtvote-candidate-controls { display: none; }

/* Candidat ou liste choisi : mis en évidence. */
.cfdtvote-form .cfdtvote-election-subject.is-chosen { box-shadow: 0 0 0 3px var(--cfdt-green, #16a34a); border-radius: 12px; }
.cfdtvote-form .cfdtvote-election-subject.is-chosen > legend.cfdtvote-candidate-name::after { content: " ✓"; color: var(--cfdt-green, #16a34a); }

@media (max-width: 640px) {
    .cfdtvote-form .cfdtvote-choice-grid { grid-template-columns: 1fr 1fr; }
    .cfdtvote-form button.cfdtvote-choice-btn--abstention { grid-column: 1 / -1; }
}

/* 3.46.0 : ligne « Porteur » masquée pour une personne. */
.cfdtvote-identity-item[hidden] { display: none !important; }

/* ---------- 20. Gérer les votes : bloc « Accès aux pages de la session » (3.49.0) ----------
 * Démarqué en orange CFDT ; deux pavés bien distincts : VOTER (bleu), RÉSULTATS (vert). */
details.cfdtvote-od-session-pages {
    border-left: 6px solid var(--cfdt-orange, #ff7900) !important;
    background: linear-gradient(135deg, #ffffff 0%, #fff4e8 100%) !important;
}
details.cfdtvote-od-session-pages .cfdtvote-collapsible-icon {
    background: #ffedd5 !important;
    color: #c2410c !important;
}
details.cfdtvote-od-session-pages .cfdtvote-collapsible-title { color: #9a3412; }

.cfdtvote-od-pages { gap: 16px; }
.cfdtvote-od-pages-col {
    padding: 0 0 12px !important;
    border-radius: 12px !important;
    border: 2px solid transparent !important;
    background: #ffffff;
    overflow: hidden;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.06);
}
.cfdtvote-od-pages-col h4 {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0 0 12px !important;
    padding: 10px 14px;
    color: #ffffff;
    font-size: 1rem;
    font-weight: 600;
    letter-spacing: 0.01em;
}
.cfdtvote-od-pages-col h4 strong { font-weight: 900; letter-spacing: 0.06em; }
.cfdtvote-od-pages-col h4 .dashicons { font-size: 20px; width: 20px; height: 20px; }
.cfdtvote-od-pages-col > .cfdtvote-od-link,
.cfdtvote-od-pages-col > .description { margin-left: 14px !important; margin-right: 14px !important; }

.cfdtvote-od-pages-col--vote { border-color: var(--cfdt-blue, #2563eb) !important; background: #f5f9ff; }
.cfdtvote-od-pages-col--vote h4 { background: var(--cfdt-blue, #2563eb); }
.cfdtvote-od-pages-col--vote .button.cfdtvote-od-open {
    background: var(--cfdt-blue, #2563eb) !important;
    border-color: var(--cfdt-blue, #2563eb) !important;
    color: #ffffff !important;
}

.cfdtvote-od-pages-col--results { border-color: var(--cfdt-green, #16a34a) !important; background: #f3fcf6; }
.cfdtvote-od-pages-col--results h4 { background: var(--cfdt-green, #16a34a); }

/* ---------- 21. Gérer des exclusions : état récapitulatif (3.50.0) ---------- */
details.cfdtvote-exclusions-recap-panel { border-left: 6px solid #dc2626 !important; }
details.cfdtvote-exclusions-recap-panel .cfdtvote-collapsible-icon { background: #fee2e2 !important; color: #b91c1c !important; }
.cfdtvote-exclusions-recap td { vertical-align: top; }
.cfdtvote-exclu-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.cfdtvote-exclu-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 4px 4px 10px;
    border-radius: 999px;
    font-size: 0.85rem;
    font-weight: 600;
    line-height: 1.3;
}
.cfdtvote-exclu-chip.is-question { background: var(--cfdt-question-bg, #fef9c3); border: 1px solid var(--cfdt-question, #eab308); color: #713f12; }
.cfdtvote-exclu-chip.is-election { background: var(--cfdt-election-bg, #ede9fe); border: 1px solid var(--cfdt-election, #7c3aed); color: #3b0764; }
.cfdtvote-exclu-chip.is-global { padding: 4px 10px; background: #fee2e2; border: 1px solid #fca5a5; color: #991b1b; }
.cfdtvote-exclu-chip-kind { font-weight: 800; font-size: 0.75rem; opacity: 0.8; }
.cfdtvote-exclu-chip .cfdtvote-inline-form { display: inline; margin: 0; }
.cfdtvote-manager button.cfdtvote-exclu-chip-btn,
.cfdtvote-exclu-chip button.cfdtvote-exclu-chip-btn {
    width: auto !important;
    min-height: 0 !important;
    margin: 0 !important;
    padding: 2px 9px !important;
    border: 1px solid #16a34a !important;
    border-radius: 999px !important;
    background: #ffffff !important;
    color: #166534 !important;
    box-shadow: none !important;
    font-size: 0.78rem !important;
    font-weight: 700 !important;
    line-height: 1.5 !important;
    cursor: pointer;
}
.cfdtvote-exclu-chip button.cfdtvote-exclu-chip-btn:hover { background: #f0fdf4 !important; }
.cfdtvote-manager button.cfdtvote-reauth-all,
.cfdtvote-manager .cfdtvote-reauth-btn {
    border-color: #16a34a !important;
    background: #ffffff !important;
    color: #166534 !important;
    white-space: nowrap;
}
details.cfdtvote-exclusions-recap-panel > summary.cfdtvote-collapsible-summary { flex-wrap: wrap; gap: 8px; }
details.cfdtvote-exclusions-recap-panel > summary .cfdtvote-collapsible-summary-main { flex: 1 1 320px; min-width: 0; }
details.cfdtvote-exclusions-recap-panel > summary .cfdtvote-collapsible-badge { white-space: normal; }

/* ---------- 22. Récapitulatif compact de la séance (3.51.0) ----------
 * Remplace les grandes vignettes : jauges + compteurs, lisible sur téléphone. */
.cfdtvote-manager .cfdtvote-manager-cards.cfdtvote-kpi-live,
.cfdtvote-kpi-live { display: block !important; margin: 18px 0 !important; }
.cfdtvote-kpi {
    padding: 14px 16px 12px;
    border: 1px solid #e5e7eb;
    border-top: 4px solid var(--cfdt-orange, #ff7900);
    border-radius: 14px;
    background: #ffffff;
    box-shadow: 0 4px 14px rgba(15, 23, 42, 0.05);
}
.cfdtvote-kpi-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 6px 12px; margin: 0 0 10px; }
.cfdtvote-kpi-head h3 { margin: 0; font-size: 1.05rem; }
.cfdtvote-kpi-live-dot { font-size: 0.78rem; color: #16a34a; font-weight: 600; }
.cfdtvote-kpi-live-dot::before { content: "●"; margin-right: 4px; animation: cfdtvote-live-pulse 1.6s ease-in-out infinite; }

.cfdtvote-kpi-gauges { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px 18px; }
.cfdtvote-kpi-gauge-top { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.cfdtvote-kpi-gauge-label { font-size: 0.78rem; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase; color: #64748b; }
.cfdtvote-kpi-gauge-value { font-size: 0.95rem; color: #334155; white-space: nowrap; }
.cfdtvote-kpi-gauge-value strong { font-size: 1.35rem; font-weight: 900; color: #0f172a; }
.cfdtvote-kpi-bar { height: 10px; margin: 6px 0 4px; border-radius: 999px; background: #eef2f7; overflow: hidden; }
.cfdtvote-kpi-bar > span { display: block; height: 100%; border-radius: 999px; transition: width .6s ease; }
.cfdtvote-kpi-gauge--present .cfdtvote-kpi-bar > span { background: var(--cfdt-blue, #2563eb); }
.cfdtvote-kpi-gauge--mandates .cfdtvote-kpi-bar > span { background: var(--cfdt-green, #16a34a); }
.cfdtvote-kpi-gauge--quorum .cfdtvote-kpi-bar > span { background: var(--cfdt-orange, #ff7900); }
.cfdtvote-kpi-gauge-hint { display: block; font-size: 0.75rem; color: #94a3b8; line-height: 1.35; }

.cfdtvote-kpi-chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 12px 0 0; padding: 0; list-style: none; }
.cfdtvote-kpi-chips li {
    display: flex; flex-direction: column; gap: 1px;
    min-width: 128px; flex: 1 1 128px;
    margin: 0; padding: 7px 10px;
    border-radius: 10px; border-left: 4px solid #cbd5e1; background: #f8fafc;
}
.cfdtvote-kpi-chips li span { font-size: 0.72rem; font-weight: 700; letter-spacing: 0.03em; text-transform: uppercase; color: #64748b; }
.cfdtvote-kpi-chips li strong { font-size: 1.1rem; font-weight: 900; color: #0f172a; }
.cfdtvote-kpi-chips li em { font-style: normal; font-size: 0.75rem; color: #64748b; }
.cfdtvote-kpi-chips li.is-blue { border-left-color: var(--cfdt-blue, #2563eb); background: #f5f9ff; }
.cfdtvote-kpi-chips li.is-green { border-left-color: var(--cfdt-green, #16a34a); background: #f3fcf6; }
.cfdtvote-kpi-chips li.is-teal { border-left-color: #0d9488; background: #f0fdfa; }

.cfdtvote-kpi-scrutins { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 8px; margin: 10px 0 0; }
.cfdtvote-kpi-scrutin { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; padding: 8px 10px; border-radius: 10px; }
.cfdtvote-kpi-scrutin.is-question { background: var(--cfdt-question-bg, #fef9c3); border-left: 4px solid var(--cfdt-question, #eab308); }
.cfdtvote-kpi-scrutin.is-election { background: var(--cfdt-election-bg, #ede9fe); border-left: 4px solid var(--cfdt-election, #7c3aed); }
.cfdtvote-kpi-scrutin-title { flex: 1 1 100%; font-weight: 800; font-size: 0.88rem; }
.cfdtvote-kpi-pill { padding: 2px 9px; border-radius: 999px; background: rgba(255, 255, 255, 0.8); font-size: 0.8rem; font-weight: 600; }
.cfdtvote-kpi-pill.is-open { background: #16a34a; color: #ffffff; }

@media (max-width: 760px) {
    .cfdtvote-kpi-gauges { grid-template-columns: 1fr; }
    .cfdtvote-kpi-chips li { flex: 1 1 calc(50% - 8px); min-width: 0; }
}
@media print {
    .cfdtvote-kpi { box-shadow: none; }
    .cfdtvote-kpi-live-dot { display: none; }
}

/* ---------- 23. Présences : interrupteur et habilitation (3.51.0) ---------- */
.cfdtvote-manager-presence-table th.cfdtvote-presence-col { background: #eff6ff; color: #1d4ed8; }
.cfdtvote-manager-presence-table td.cfdtvote-presence-col { white-space: nowrap; }
.cfdtvote-manager-presence-table tr.is-present > td { background: #f0f7ff; }
.cfdtvote-manager-presence-table tr.is-present > td:first-child { box-shadow: inset 4px 0 0 var(--cfdt-blue, #2563eb); }
.cfdtvote-manager-presence-table tr.is-excluded > td { background: #fff5f5; }
.cfdtvote-manager-presence-table tr.is-changed > td:first-child { box-shadow: inset 4px 0 0 var(--cfdt-orange, #ff7900); }

.cfdtvote-presence-switch { display: inline-flex; align-items: center; gap: 8px; cursor: pointer; user-select: none; }
.cfdtvote-presence-switch input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.cfdtvote-presence-switch-track {
    position: relative; flex: 0 0 auto;
    width: 46px; height: 26px; border-radius: 999px;
    background: #cbd5e1; transition: background .15s ease;
}
.cfdtvote-presence-switch-track::after {
    content: ""; position: absolute; top: 3px; left: 3px;
    width: 20px; height: 20px; border-radius: 50%;
    background: #ffffff; box-shadow: 0 1px 3px rgba(0, 0, 0, 0.25);
    transition: transform .15s ease;
}
.cfdtvote-presence-switch input:checked + .cfdtvote-presence-switch-track { background: var(--cfdt-blue, #2563eb); }
.cfdtvote-presence-switch input:checked + .cfdtvote-presence-switch-track::after { transform: translateX(20px); }
.cfdtvote-presence-switch input:focus-visible + .cfdtvote-presence-switch-track { outline: 3px solid #93c5fd; outline-offset: 2px; }
.cfdtvote-presence-switch-label { font-weight: 800; font-size: 0.9rem; color: #64748b; min-width: 66px; }
.cfdtvote-presence-switch input:checked ~ .cfdtvote-presence-switch-label { color: #1d4ed8; }
.cfdtvote-presence-switch.is-disabled { cursor: not-allowed; opacity: 0.55; }

.cfdtvote-hab { display: inline-block; padding: 4px 10px; border-radius: 999px; font-size: 0.82rem; font-weight: 800; white-space: nowrap; }
.cfdtvote-hab.is-ok { background: #16a34a; color: #ffffff; }
.cfdtvote-hab.is-proxy { background: #ccfbf1; color: #0f766e; border: 1px solid #5eead4; }
.cfdtvote-hab.is-no { background: #f1f5f9; color: #64748b; border: 1px dashed #cbd5e1; }
.cfdtvote-hab.is-excluded { background: #fee2e2; color: #991b1b; border: 1px solid #fca5a5; }
.cfdtvote-hab-pending { display: block; margin-top: 2px; color: var(--cfdt-orange, #c2410c); font-weight: 700; }

/* ---------- 24. Gérer des exclusions : repères rouges (3.51.0) ---------- */
details.cfdtvote-exclusions-select-panel { border-left: 6px solid #dc2626 !important; }
details.cfdtvote-exclusions-select-panel .cfdtvote-collapsible-icon { background: #fee2e2 !important; color: #b91c1c !important; }
.cfdtvote-exclusions-form-panel .cfdtvote-collapsible-badge { background: #fee2e2 !important; color: #991b1b !important; }
.cfdtvote-manager-exclusions-table tr.is-excluded > td { background: #fff5f5; }
.cfdtvote-manager-exclusions-table tr.is-excluded > td:first-child { box-shadow: inset 4px 0 0 #dc2626; }
.cfdtvote-manager-exclusions-table input[data-cfdtvote-exclusion-checkbox] { width: 20px; height: 20px; accent-color: #dc2626; }

/* ---------- 25. Charte neutre commune (3.52.0) ----------
 * Gris ardoise pour les éléments transverses (actions rapides, récapitulatifs),
 * l'orange restant réservé à l'identité CFDT ; jaune = questions,
 * violet = élections, bleu = présence, rouge = exclusions. */
:root {
    --cfdtvote-ink: #0f172a;
    --cfdtvote-neutral: #334155;
    --cfdtvote-neutral-soft: #f8fafc;
    --cfdtvote-neutral-border: #cbd5e1;
}

/* Actions rapides : liseré gris ardoise (sauf variantes colorées par type). */
.cfdtvote-manager > .cfdtvote-manager-actions:not(.cfdtvote-manager-actions-questions):not(.cfdtvote-manager-actions-exclusions),
.cfdtvote-manager-panel > .cfdtvote-manager-actions:not(.cfdtvote-manager-actions-questions):not(.cfdtvote-manager-actions-exclusions) {
    border-color: var(--cfdtvote-neutral-border) !important;
    border-left-color: var(--cfdtvote-neutral) !important;
}
.cfdtvote-manager > .cfdtvote-manager-actions:not(.cfdtvote-manager-actions-questions)::before,
.cfdtvote-manager-panel > .cfdtvote-manager-actions:not(.cfdtvote-manager-actions-questions)::before {
    color: var(--cfdtvote-neutral) !important;
}

/* Récapitulatifs (« La séance en un coup d'œil », « Récapitulatif de la séance »). */
.cfdtvote-kpi { border-top-color: var(--cfdtvote-neutral) !important; }
.cfdtvote-manager .cfdtvote-kpi-head h3,
.cfdtvote-kpi-head h3 { color: var(--cfdtvote-ink) !important; border: 0 !important; padding: 0 !important; }
.cfdtvote-kpi-head h3::after,
.cfdtvote-kpi-head h3::before { display: none !important; }

/* ---------- 26. Présences : enregistrement en bleu foncé (3.52.0) ----------
 * Le bouton, le liseré des lignes modifiées et la mention « à enregistrer »
 * partagent la même couleur. */
.cfdtvote-manager button.cfdtvote-presence-save-btn,
.cfdtvote-manager .cfdtvote-manager-submit-row button.cfdtvote-presence-save-btn {
    display: inline-flex !important;
    align-items: center;
    gap: 6px;
    border-color: #1e3a8a !important;
    background: #1e3a8a !important;
    color: #ffffff !important;
}
.cfdtvote-manager button.cfdtvote-presence-save-btn:hover { background: #1e40af !important; }
.cfdtvote-manager-presence-table tr.is-changed > td:first-child { box-shadow: inset 6px 0 0 #1e3a8a !important; }
.cfdtvote-manager-presence-table .cfdtvote-hab-pending,
.cfdtvote-hab-pending { color: #1e3a8a !important; }

/* Colonne « Mandats » resserrée ; tableau des présences sans ascenseur. */
.cfdtvote-manager-presence-table { table-layout: auto; width: 100%; }
.cfdtvote-manager-presence-table th:nth-child(5),
.cfdtvote-manager-presence-table td:nth-child(5) { width: 1%; padding-left: 6px !important; padding-right: 6px !important; text-align: center; white-space: nowrap; }
.cfdtvote-manager-presence-table th,
.cfdtvote-manager-presence-table td { padding: 8px 8px !important; }
.cfdtvote-manager-presence-table select { max-width: 150px; }
.cfdtvote-manager-presence-table .cfdtvote-presence-switch-label { min-width: 0; }
.cfdtvote-manager-presence-table .cfdtvote-hab { white-space: normal; }

/* Présences (3.52.0) : largeurs alignées sur l'ordre actuel des colonnes
 * (Présence, Votant, Habilitation, Porteur, Mandats, Mandat donné à, Actions).
 * Les anciennes règles visaient l'ancienne disposition (« Mandat donné à »
 * en 5e position, d'où 240 px sur la colonne « Mandats »). */
.cfdtvote-manager-presence-table td:nth-child(4),
.cfdtvote-manager-presence-table th:nth-child(4) { width: auto !important; min-width: 0 !important; text-align: left !important; }
.cfdtvote-manager-presence-table td:nth-child(5),
.cfdtvote-manager-presence-table th:nth-child(5) { width: 1% !important; min-width: 0 !important; text-align: center !important; }
.cfdtvote-manager-presence-table td:nth-child(6),
.cfdtvote-manager-presence-table th:nth-child(6) { min-width: 130px !important; }
.cfdtvote-manager-presence-table td.cfdtvote-manager-actions-cell,
.cfdtvote-manager-presence-table th:last-child { min-width: 0 !important; width: 1%; }
.cfdtvote-manager-presence-table td.cfdtvote-manager-actions-cell .button { padding: 4px 10px !important; min-height: 0 !important; }
.cfdtvote-manager-presence-table td.cfdtvote-presence-col { width: 1%; }
.cfdtvote-manager-presence-table .cfdtvote-manager-muted { font-size: 0.82rem; }

/* Présences (3.52.0) : affichage en fiches quand le bloc est étroit
 * (téléphone, colonne de thème étroite) — plus d'ascenseur horizontal. */
.cfdtvote-presence-panel-block .cfdtvote-table-scroll { container-type: inline-size; container-name: cfdtpres; }
@container cfdtpres (max-width: 860px) {
    .cfdtvote-manager-presence-table,
    .cfdtvote-manager-presence-table tbody { display: block; width: 100%; }
    .cfdtvote-manager-presence-table thead { display: none; }
    .cfdtvote-manager-presence-table tr[data-cfdtvote-presence-row] {
        display: grid;
        grid-template-columns: auto 1fr;
        grid-template-areas:
            "switch name"
            "hab hab"
            "porteur mandates"
            "proxy proxy"
            "actions actions";
        gap: 6px 12px;
        margin: 0 0 10px;
        padding: 10px 12px;
        border: 1px solid #e5e7eb;
        border-radius: 12px;
        background: #ffffff;
    }
    .cfdtvote-manager-presence-table tr[data-cfdtvote-presence-row] > td {
        display: block; width: auto !important; min-width: 0 !important;
        padding: 0 !important; border: 0 !important; background: transparent !important;
        box-shadow: none !important; text-align: left !important;
    }
    .cfdtvote-manager-presence-table tr.is-present { background: #f0f7ff; border-color: #93c5fd; box-shadow: inset 4px 0 0 var(--cfdt-blue, #2563eb); }
    .cfdtvote-manager-presence-table tr.is-excluded { background: #fff5f5; border-color: #fca5a5; }
    .cfdtvote-manager-presence-table tr.is-changed { box-shadow: inset 6px 0 0 #1e3a8a; }
    .cfdtvote-manager-presence-table td.cfdtvote-presence-col { grid-area: switch; align-self: center; }
    .cfdtvote-manager-presence-table td.cfdtvote-presence-name { grid-area: name; align-self: center; }
    .cfdtvote-manager-presence-table td[data-cfdtvote-hab-cell] { grid-area: hab; }
    .cfdtvote-manager-presence-table td.cfdtvote-presence-porteur { grid-area: porteur; }
    .cfdtvote-manager-presence-table td.cfdtvote-presence-mandates { grid-area: mandates; }
    .cfdtvote-manager-presence-table td.cfdtvote-presence-proxy { grid-area: proxy; }
    .cfdtvote-manager-presence-table td.cfdtvote-manager-actions-cell { grid-area: actions; }
    .cfdtvote-manager-presence-table td.cfdtvote-presence-porteur::before,
    .cfdtvote-manager-presence-table td.cfdtvote-presence-mandates::before,
    .cfdtvote-manager-presence-table td.cfdtvote-presence-proxy::before {
        content: attr(data-label) " : ";
        font-size: 0.75rem; font-weight: 700; letter-spacing: 0.03em; text-transform: uppercase; color: #64748b;
    }
    .cfdtvote-manager-presence-table td.cfdtvote-presence-proxy select { max-width: 100%; width: 100%; }
}
@container cfdtpres (max-width: 860px) {
    .cfdtvote-manager-presence-table tr[data-cfdtvote-presence-row] { grid-template-columns: auto minmax(0, 1fr); width: 100%; box-sizing: border-box; }
    .cfdtvote-manager-presence-table tr[data-cfdtvote-presence-row] > td { white-space: normal !important; overflow-wrap: anywhere; }
    .cfdtvote-manager-presence-table tr[data-cfdtvote-presence-row] > td .button { width: auto !important; white-space: nowrap; }
}
@container cfdtpres (max-width: 860px) {
    .cfdtvote-manager-presence-table { min-width: 0 !important; width: 100% !important; }
}
@container cfdtpres (max-width: 860px) {
    .cfdtvote-manager-presence-table td.cfdtvote-presence-name .cfdtvote-entity-type-badge,
    .cfdtvote-manager-presence-table td.cfdtvote-presence-name [class*="entity-type"] { white-space: nowrap; overflow-wrap: normal; }
}

/* ---------- 27. Envoi des mails : liserés verts (3.54.0) ----------
 * Le modèle du mail, l'envoi et le journal partagent la couleur de la
 * famille « Envoi des mails » (réglable dans le back-office). */
.cfdtvote-manager-email-template-details { border-left: 5px solid #16a34a !important; }
details.cfdtvote-email-log-panel { border-left: 5px solid #16a34a; }
.cfdtvote-manager-email-template-panel {
    background: linear-gradient(135deg, #f0fdf4 0%, #ffffff 55%, #f8fafc 100%) !important;
}
.cfdtvote-manager-email-template-details { border-color: #bbf7d0 !important; }
.cfdtvote-manager-email-template-icon { background: #dcfce7 !important; color: #166534 !important; }
.cfdtvote-manager-email-template-badge { background: #dcfce7 !important; color: #166534 !important; }
/* Modèle du mail aligné sur les autres blocs ; icônes vertes. */
.cfdtvote-manager .cfdtvote-manager-email-template-panel {
    padding: 0 !important;
    border: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
}
details.cfdtvote-manager-email-send-panel .cfdtvote-collapsible-icon,
details.cfdtvote-email-log-panel .cfdtvote-collapsible-icon { background: #dcfce7 !important; color: #166534 !important; }

/* ---------- 28. Liserés (3.55.0) ----------
 * Le bloc « Présences, mandats et procurations » avait un liseré en HAUT
 * (4 px vert) : seul le liseré gauche est désormais coloré, comme partout. */
details.cfdtvote-presence-panel-block { border-top: 1px solid #e5e7eb !important; }
.cfdtvote-manager-proxy-power-panel { border-color: #99f6e4 !important; }

/* ---------- 29. Liste des votants : zone des imports CSV (3.56.0) ---------- */
.cfdtvote-manager .cfdtvote-imports-heading {
    display: flex; align-items: center; gap: 8px;
    margin: 28px 0 12px !important; padding: 10px 0 0 !important;
    border-top: 2px dashed #cbd5e1 !important;
    color: #475569 !important; font-size: 1rem !important;
}
.cfdtvote-manager .cfdtvote-imports-heading::after,
.cfdtvote-manager .cfdtvote-imports-heading::before { display: none !important; }
details.cfdtvote-import-collapsible .cfdtvote-collapsible-icon { background: #f1f5f9 !important; color: #475569 !important; }
.cfdtvote-imports-zone { scroll-margin-top: 80px; }

/* ---------- 30. Exports CSV ventilés (3.58.0) ----------
 * Liseré ardoise très foncé (réglable), plus sombre que les imports. */
.cfdtvote-manager .cfdtvote-exports-heading {
    display: flex; align-items: center; gap: 8px;
    margin: 28px 0 12px !important; padding: 10px 0 0 !important;
    border-top: 2px solid #1e293b !important;
    color: #1e293b !important; font-size: 1rem !important;
}
.cfdtvote-manager .cfdtvote-exports-heading::after,
.cfdtvote-manager .cfdtvote-exports-heading::before { display: none !important; }
details.cfdtvote-export-collapsible .cfdtvote-collapsible-icon { background: #e2e8f0 !important; color: #1e293b !important; }
.cfdtvote-exports-zone { scroll-margin-top: 80px; }
.cfdtvote-export-choices { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 12px; }
.cfdtvote-export-choice { padding: 12px 14px; border: 1px solid #e2e8f0; border-radius: 12px; background: #f8fafc; }
.cfdtvote-export-choice h4 { margin: 0 0 6px; font-size: 0.95rem; color: #0f172a; }
.cfdtvote-export-choice .description { margin: 0 0 10px; font-size: 0.85rem; }
.cfdtvote-export-choice select { width: 100%; max-width: 100%; }
.cfdtvote-export-form .button { display: inline-flex !important; align-items: center; gap: 6px; }

/* ---------- 31. Votes nominatifs : choix non publiés (3.59.0) ---------- */
.cfdtvote-vd-hidden { display: inline-block; padding: 2px 8px; border-radius: 999px; background: #f1f5f9; color: #64748b; font-size: 0.78rem; font-weight: 600; white-space: nowrap; }
.cfdtvote-vd-rule { display: flex; gap: 8px; align-items: flex-start; margin: 8px 0 0; padding: 8px 12px; border-radius: 8px; background: #f8fafc; border: 1px solid #e2e8f0; color: #334155; font-size: 0.9rem; }

/* ---------- 32. Questions : mode de vote (3.60.0) ---------- */
.cfdtvote-anon-badge { display: inline-flex; align-items: center; gap: 4px; width: fit-content; padding: 3px 9px; border-radius: 999px; font-size: 0.78rem; font-weight: 700; }
.cfdtvote-anon-badge .dashicons { font-size: 14px; width: 14px; height: 14px; }
.cfdtvote-anon-badge.is-anonymous { background: #f1f5f9; color: #334155; border: 1px solid #cbd5e1; }
.cfdtvote-anon-badge.is-nominative { background: #eff6ff; color: #1d4ed8; border: 1px solid #93c5fd; }

/* 3.63.0 : refus détaillés dans un bandeau. */
.cfdtvote-manager-notice-list { margin: 8px 0 0 18px; padding: 0; }
.cfdtvote-manager-notice-list li { margin: 3px 0; }

/* ---------- 33. Présences : filtres et actions sur les lignes affichées (3.64.0) ---------- */
.cfdtvote-manager-presence-table tr[data-cfdtvote-presence-row][hidden] { display: none !important; }

.cfdtvote-presence-filters {
    margin: 0 0 10px; padding: 10px 12px;
    border: 1px solid #e2e8f0; border-radius: 12px; background: #f8fafc;
}
.cfdtvote-presence-filters-head { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; margin: 0 0 8px; color: #334155; }
.cfdtvote-presence-filter-count { margin-left: auto; font-size: 0.82rem; color: #64748b; }
.cfdtvote-presence-filter-row { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: 0 0 6px; }
.cfdtvote-presence-filter-label { min-width: 74px; font-size: 0.75rem; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase; color: #64748b; }
.cfdtvote-manager button.cfdtvote-presence-chip {
    width: auto !important; min-height: 0 !important; margin: 0 !important;
    padding: 4px 11px !important; border: 1px solid #cbd5e1 !important; border-radius: 999px !important;
    background: #ffffff !important; color: #334155 !important; box-shadow: none !important;
    font-size: 0.82rem !important; font-weight: 600 !important; line-height: 1.4 !important;
}
.cfdtvote-manager button.cfdtvote-presence-chip:hover { border-color: #64748b !important; }
.cfdtvote-manager button.cfdtvote-presence-chip.is-on { border-color: #334155 !important; background: #334155 !important; color: #ffffff !important; }
.cfdtvote-presence-search { flex: 1 1 220px; max-width: 360px; min-height: 32px; padding: 4px 10px; border-radius: 8px; }
.cfdtvote-manager button.cfdtvote-presence-reset {
    width: auto !important; min-height: 0 !important; margin: 0 !important; padding: 0 !important;
    border: 0 !important; background: transparent !important; box-shadow: none !important;
    color: #2563eb !important; font-size: 0.85rem !important; text-decoration: underline !important;
}

/* Actions : cadre bleu, distinct des filtres neutres. */
.cfdtvote-manager .cfdtvote-presence-actions {
    display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px;
    margin: 0 0 12px !important; padding: 10px 12px !important;
    border: 2px solid var(--cfdt-blue, #2563eb) !important; border-radius: 12px !important;
    background: #eff6ff !important;
}
.cfdtvote-presence-actions-head { flex: 1 1 100%; color: #1e3a8a; }
.cfdtvote-presence-actions .description { flex: 1 1 100%; margin: 0; font-size: 0.82rem; color: #1e3a8a; }
.cfdtvote-manager button.cfdtvote-presence-bulk-btn {
    display: inline-flex !important; align-items: center; gap: 4px;
    width: auto !important; min-height: 38px !important; margin: 0 !important; padding: 6px 14px !important;
    border-radius: 10px !important; font-weight: 700 !important; box-shadow: none !important;
}
.cfdtvote-manager button.cfdtvote-presence-bulk-btn.is-check { border: 2px solid #1d4ed8 !important; background: #1d4ed8 !important; color: #ffffff !important; }
.cfdtvote-manager button.cfdtvote-presence-bulk-btn.is-uncheck { border: 2px solid #1d4ed8 !important; background: #ffffff !important; color: #1d4ed8 !important; }
@media (max-width: 640px) {
    .cfdtvote-manager button.cfdtvote-presence-bulk-btn { flex: 1 1 100%; justify-content: center; }
    .cfdtvote-presence-filter-count { margin-left: 0; flex: 1 1 100%; }
}
.cfdtvote-manager input.cfdtvote-presence-search { font-size: 0.9rem !important; min-height: 34px !important; padding: 4px 10px !important; border: 1px solid #cbd5e1 !important; border-radius: 8px !important; }

/* 3.65.0 : filtres de la Liste des votants. */
.cfdtvote-sections-table tr[data-cfdtvote-voter-row][hidden] { display: none !important; }
.cfdtvote-manager .cfdtvote-presence-actions button.cfdtvote-button-danger {
    display: inline-flex !important; align-items: center; gap: 4px;
    width: auto !important; min-height: 38px !important; margin: 0 !important; padding: 6px 14px !important;
    border: 2px solid #dc2626 !important; border-radius: 10px !important;
    background: #dc2626 !important; color: #ffffff !important; font-weight: 700 !important; box-shadow: none !important;
}
.cfdtvote-manager .cfdtvote-presence-actions button.cfdtvote-button-danger:hover { background: #b91c1c !important; border-color: #b91c1c !important; }

/* ---------- 34. Téléphone : actions rapides, en-têtes de blocs, Votes nominatifs (3.66.0) ---------- */
@media (max-width: 782px) {
    /* Actions rapides : tous les boutons sur le modèle de « Réinitialiser les présences ».
     * Cause : la base flexible de 180 px (style.css) devenait une HAUTEUR de 180 px
     * dans une barre en colonne. */
    .cfdtvote-manager .cfdtvote-manager-actions {
        flex-direction: column !important;
        align-items: stretch !important;
        gap: 8px !important;
    }
    .cfdtvote-manager .cfdtvote-manager-actions > .button,
    .cfdtvote-manager .cfdtvote-manager-actions > a.button,
    .cfdtvote-manager .cfdtvote-manager-actions > button,
    .cfdtvote-manager .cfdtvote-manager-actions > form,
    .cfdtvote-manager .cfdtvote-manager-actions > form .button,
    .cfdtvote-manager .cfdtvote-manager-actions > form button {
        flex: 0 0 auto !important;
        width: 100% !important;
        height: auto !important;
        min-height: 38px !important;
        margin: 0 !important;
    }
    .cfdtvote-manager .cfdtvote-manager-actions > .button,
    .cfdtvote-manager .cfdtvote-manager-actions > a.button,
    .cfdtvote-manager .cfdtvote-manager-actions > button,
    .cfdtvote-manager .cfdtvote-manager-actions > form .button,
    .cfdtvote-manager .cfdtvote-manager-actions > form button {
        display: inline-flex !important;
        align-items: center;
        justify-content: center;
        gap: 6px;
        padding: 7px 12px !important;
        font-size: 0.9rem !important;
        line-height: 1.3 !important;
        text-align: center;
        white-space: normal !important;
    }

    /* En-têtes de blocs : l'étiquette passe sous le titre, la flèche reste visible. */
    .cfdtvote-manager summary.cfdtvote-collapsible-summary { flex-wrap: wrap !important; align-items: flex-start !important; row-gap: 6px; }
    .cfdtvote-manager summary.cfdtvote-collapsible-summary > .cfdtvote-collapsible-summary-main { flex: 1 1 100% !important; min-width: 0 !important; }
    .cfdtvote-manager summary.cfdtvote-collapsible-summary > .cfdtvote-collapsible-aside {
        flex: 1 1 100% !important; display: flex !important; align-items: center; justify-content: space-between; gap: 8px;
        margin: 0 !important; padding-left: 44px;
    }
    .cfdtvote-manager .cfdtvote-collapsible-aside .cfdtvote-collapsible-badge { white-space: normal !important; text-align: left; }
    .cfdtvote-manager .cfdtvote-collapsible-aside .cfdtvote-collapsible-chevron { margin-left: auto; }

    /* Votes nominatifs : introduction lisible. */
    .cfdtvote-vote-details-intro h2 { font-size: 1.1rem !important; line-height: 1.3 !important; }
    .cfdtvote-vote-details-intro p,
    .cfdtvote-vote-details-intro .cfdtvote-help-block,
    .cfdtvote-vote-details-intro .cfdtvote-help-block p { font-size: 0.92rem !important; line-height: 1.5 !important; }
}
@media (max-width: 782px) {
    .cfdtvote-vote-details-intro .cfdtvote-help-text,
    .cfdtvote-vote-details-intro .cfdtvote-help-text p { font-size: 0.92rem !important; line-height: 1.5 !important; }
}

/* ---------- 35. Quorum (3.69.0) ---------- */
.cfdtvote-quorum-badge { display: inline-flex; align-items: center; gap: 4px; padding: 3px 10px; border-radius: 999px; font-size: 0.82rem; font-weight: 700; white-space: nowrap; }
.cfdtvote-quorum-badge.is-ok { background: #dcfce7; color: #166534; border: 1px solid #86efac; }
.cfdtvote-quorum-badge.is-ko { background: #fee2e2; color: #991b1b; border: 1px solid #fca5a5; }
.cfdtvote-quorum-badge.is-neutral { background: #f1f5f9; color: #475569; border: 1px solid #cbd5e1; }
.cfdtvote-quorum-detail { display: block; margin-top: 4px; font-size: 0.75rem; color: #64748b; line-height: 1.35; }
.cfdtvote-quorum-cell { min-width: 150px; }

/* Repère du seuil sur la jauge « Quorum ». */
.cfdtvote-kpi-bar { position: relative; }
.cfdtvote-kpi-threshold { position: absolute; top: -3px; bottom: -3px; width: 3px; margin-left: -1px; border-radius: 2px; background: #0f172a; }
.cfdtvote-kpi-threshold-line { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: 10px 0 0; font-size: 0.9rem; color: #334155; }
.cfdtvote-kpi-threshold-link { margin-left: auto; font-weight: 600; }

/* Réglages : bloc du quorum mis en évidence. */
details.cfdtvote-settings-block--quorum { border-left: 6px solid var(--cfdt-orange, #ff7900) !important; }
.cfdtvote-quorum-form { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; margin: 0 0 12px; padding: 12px 14px; border: 1px solid #fed7aa; border-radius: 12px; background: #fff7ed; }
.cfdtvote-quorum-input { display: inline-flex; align-items: center; gap: 8px; font-weight: 700; }
.cfdtvote-quorum-input input[type=number] { width: 96px !important; font-size: 1.3rem !important; font-weight: 800; text-align: center; }
.cfdtvote-quorum-form .description { flex: 1 1 100%; margin: 0; }
.cfdtvote-quorum-live { margin: 10px 0 0; }

/* Synthèse d'une élection : carte du quorum colorée. */
.cfdtvote-results-metric-card.is-reached { border-color: #86efac !important; }
.cfdtvote-results-metric-card.is-not-reached { border-color: #fca5a5 !important; }
.cfdtvote-settings-block--quorum .cfdtvote-help-text, .cfdtvote-settings-block--quorum .cfdtvote-help-text p { font-size: 0.92rem !important; line-height: 1.55 !important; }

/* ---------- 36. Quorum CSE (3.70.0) ---------- */
.cfdtvote-quorum-blocking { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; flex: 1 1 100%; font-size: 0.92rem; }
.cfdtvote-quorum-blocking input { width: 18px; height: 18px; accent-color: #dc2626; }
.cfdtvote-quorum-invalid { display: inline-block; padding: 3px 10px; border-radius: 999px; background: #f1f5f9; color: #475569; border: 1px dashed #94a3b8; font-weight: 700; font-size: 0.85rem; }

/* ---------- 37. Règles de quorum et d'adoption (3.71.0) ---------- */
.cfdtvote-rules-box { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 12px; margin: 0 0 10px; }
.cfdtvote-rules-fieldset { margin: 0; padding: 10px 12px; border: 1px solid #e2e8f0; border-radius: 12px; background: #ffffff; }
.cfdtvote-rules-fieldset legend { padding: 0 6px; font-weight: 800; color: #0f172a; }
.cfdtvote-rules-fieldset > select { width: 100%; max-width: 100%; margin: 4px 0 6px; }
.cfdtvote-rules-fieldset .description { margin: 0 0 6px; font-size: 0.82rem; }
.cfdtvote-rules-sub { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; margin: 6px 0 0; font-size: 0.88rem; }
.cfdtvote-rules-sub[hidden], .cfdtvote-rules-sub [hidden] { display: none !important; }
.cfdtvote-rules-sub input[type=number] { width: 90px; }
.cfdtvote-rules-sub input.cfdtvote-rules-small { width: 64px; }
.cfdtvote-rules-current { margin: 8px 0; padding: 8px 12px; border-left: 4px solid var(--cfdt-orange, #ff7900); border-radius: 6px; background: #fff7ed; font-size: 0.9rem; line-height: 1.5; }
.cfdtvote-rules-scrutin { margin: 14px 0; padding: 12px 14px; border: 1px solid #fed7aa; border-radius: 12px; background: #fffbf5; }
.cfdtvote-rules-scrutin h3 { display: flex; align-items: center; gap: 6px; margin: 0 0 6px !important; font-size: 1rem !important; }
.cfdtvote-rules-frozen { display: flex; gap: 6px; align-items: center; padding: 6px 10px; border-radius: 8px; background: #f1f5f9; color: #334155; font-size: 0.9rem; }
.cfdtvote-rules-override { margin: 8px 0 0; padding: 8px 10px; border: 1px dashed #dc2626; border-radius: 10px; background: #fff5f5; }
.cfdtvote-rules-override summary { cursor: pointer; font-weight: 700; color: #991b1b; }
.cfdtvote-rules-reason { display: block; margin: 8px 0 0; font-weight: 700; }
.cfdtvote-rules-reason textarea { display: block; width: 100%; margin-top: 4px; }
.cfdtvote-rules-od { display: block; margin-top: 4px; font-size: 0.78rem; color: #475569; line-height: 1.4; }
.cfdtvote-rules-od .dashicons { font-size: 14px; width: 14px; height: 14px; vertical-align: -2px; }
.cfdtvote-rules-od.is-frozen { color: #0f172a; }
.cfdtvote-rules-detail-box { margin: 10px 0; border: 1px solid #e2e8f0; border-radius: 10px; background: #ffffff; }
.cfdtvote-rules-detail-box > summary { cursor: pointer; padding: 8px 12px; font-weight: 700; color: #334155; }
.cfdtvote-rules-detail { padding: 0 12px 10px; }
.cfdtvote-rules-summary { margin: 4px 0; font-size: 0.88rem; color: #334155; }
.cfdtvote-rules-columns { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 12px; margin: 8px 0; }
.cfdtvote-rules-lines { display: grid; grid-template-columns: 1fr auto; gap: 2px 12px; margin: 0; padding: 8px 10px; border-radius: 8px; background: #f8fafc; font-size: 0.88rem; }
.cfdtvote-rules-lines dt { margin: 0; color: #475569; }
.cfdtvote-rules-lines dd { margin: 0; font-weight: 700; text-align: right; font-variant-numeric: tabular-nums; }
.cfdtvote-rules-lines dt.cfdtvote-rules-head { grid-column: 1 / -1; font-weight: 800; color: #0f172a; text-transform: uppercase; letter-spacing: 0.04em; font-size: 0.78rem; }
.cfdtvote-rules-foot { margin: 4px 0 0; font-size: 0.78rem; color: #64748b; }
.cfdtvote-quorum-detail.is-warning { color: #991b1b; font-weight: 700; }
.cfdtvote-rules-log td { vertical-align: top; }
