/*
 * Votes et consultations (pages page=votes, page=vote, page=vote_edit) dans l'espace adhérents.
 * S'appuie sur les variables et classes de css/cgtftocc_espace.css (.esp, .esp-btn, .esp-inter, .esp-evt, .esp-puce...).
 */

/* message après une action (lancer, clore, voter...) */
.esp.rub .vt-flash { margin: 0 0 20px; padding: 12px 16px; border-left: 8px solid var(--esp-vert); border-radius: 4px; background: #e8f3ec; font-family: var(--esp-texte); font-size: 17px; }

/* lignes de la liste */
.vt-ligne { grid-template-columns: 56px minmax(0, 1fr) auto; }
.vt-ic { display: grid; place-items: center; width: 56px; height: 56px; border-radius: 6px; background: #fff; border-top: 7px solid var(--esp-rouge, #c30c07); box-shadow: 0 1px 3px rgba(0, 0, 0, .18); box-sizing: border-box; }
.vt-ic svg { width: 28px; height: 28px; fill: none; stroke: var(--esp-noir, #1D1C1D); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.vt-ic--vote { border-top-color: var(--esp-vert, #23733a); }
.vt-ic--vote svg { stroke: var(--esp-vert, #23733a); }
.vt-ic--clos svg { stroke: #6a6868; }
.vt-ic--attente { position: relative; }
.vt-ic--attente svg { stroke: var(--esp-rouge, #c30c07); }
.vt-ic--attente::after { content: ''; position: absolute; top: -6px; right: -6px; width: 16px; height: 16px; border-radius: 50%; background: var(--esp-rouge, #c30c07); border: 3px solid #f2f2f2; }
.vt-ligne--clos .vt-ic { border-top-color: #8d8b8b; }
.vt-ligne--brouillon .vt-ic { border-top-color: var(--esp-jaune, #f8e501); }
.vt-etat--ouvert { background: var(--esp-rouge, #c30c07); }
.vt-etat--avenir { background: var(--esp-orange, #b25b00); }
.vt-etat--clos { background: #6a6868; }
.vt-etat--brouillon { background: var(--esp-jaune, #f8e501); color: #000; }
.esp.rub .vt-ligne p + p { margin-top: 2px; }
.esp.rub .vt-ligne .esp-etat + .esp-etat { margin-left: 6px; }

/* fiche */
.esp.rub .vt-puces { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 16px; }
.esp.rub .vt-texte { margin: 0 0 18px; font-family: var(--esp-texte); font-size: 18px; line-height: 1.5; }
.esp.rub .vt-texte p { margin: 0 0 10px; }
.esp.rub .vt-infos { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: 6px 18px; margin: 0; padding: 16px 18px; border-radius: 6px; background: var(--esp-gris-clair); font-family: var(--esp-texte); font-size: 17px; }
.esp.rub .vt-infos dt { padding-top: 2px; font-family: 'Barlow Semi Condensed', sans-serif; font-size: 14px; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: var(--esp-gris); }
.esp.rub .vt-infos dd { margin: 0; }
.esp.rub .vt-ok { margin: 0; padding: 14px 16px; border-left: 8px solid var(--esp-vert); border-radius: 4px; background: #e8f3ec; font-family: var(--esp-texte); font-size: 18px; }
.esp.rub .vt-alerte { margin: 0 0 14px; padding: 12px 16px; border-left: 8px solid var(--esp-orange); border-radius: 4px; background: #fbf0e0; font-family: var(--esp-texte); font-size: 17px; }

/* formulaire de vote : choix en grands boutons, le rond natif est remplacé par un rond aux couleurs du site */
.page .formulaire_spip.vt-voter:not(.zz) .vt-choix { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 8px; }
.page .formulaire_spip.vt-voter:not(.zz) .vt-choix--liste { flex-direction: column; align-items: stretch; }
.page .formulaire_spip.vt-voter:not(.zz) .choix { position: relative; display: block; margin: 0; padding: 0; border: 0; background: none; }
.page .formulaire_spip.vt-voter:not(.zz) .choix input[type=radio], .page .formulaire_spip.vt-voter:not(.zz) .choix input[type=checkbox] { position: absolute; opacity: 0; width: 1px; height: 1px; margin: 0; }
.page .formulaire_spip.vt-voter:not(.zz) .choix label {
	display: flex; align-items: center; gap: 12px; margin: 0; padding: 13px 22px;
	border: 2px solid #cfcdcd; border-radius: 6px; background: #fff; color: #1D1C1D;
	font: 700 22px/1.1 'Barlow Semi Condensed', 'Arial Narrow', Arial, sans-serif; letter-spacing: .04em; text-transform: uppercase;
	cursor: pointer; transition: border-color .15s, background-color .15s;
}
.page .formulaire_spip.vt-voter:not(.zz) .choix label::before {
	content: ''; flex: none; box-sizing: border-box; width: 24px; height: 24px; border: 2px solid #8d8b8b; border-radius: 50%;
	background: #fff; transition: border-color .15s, background .15s;
}
.page .formulaire_spip.vt-voter:not(.zz) .choix input[type=checkbox] + label::before { border-radius: 4px; }
.page .formulaire_spip.vt-voter:not(.zz) .choix label:hover { border-color: #c30c07; }
.page .formulaire_spip.vt-voter:not(.zz) .choix input:focus-visible + label { outline: 3px solid #1D1C1D; outline-offset: 3px; }
.page .formulaire_spip.vt-voter:not(.zz) .choix input:checked + label { border-color: #c30c07; background: #fbe7e6; }
.page .formulaire_spip.vt-voter:not(.zz) .choix input[type=radio]:checked + label::before { border-color: #c30c07; background: radial-gradient(circle, #c30c07 0 42%, #fff 46%); }
.page .formulaire_spip.vt-voter:not(.zz) .choix input[type=checkbox]:checked + label::before { border-color: #c30c07; background: #c30c07 url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='none' stroke='%23fff' stroke-width='3' d='M5 12.5l4.5 4.5L19 7.5'/%3E%3C/svg%3E") center / 100% no-repeat; }
.page .formulaire_spip.vt-voter:not(.zz) .vt-choix--pour input:checked + label { border-color: #23733a; background: #e8f3ec; }
.page .formulaire_spip.vt-voter:not(.zz) .vt-choix--pour input:checked + label::before { border-color: #23733a; background: radial-gradient(circle, #23733a 0 42%, #fff 46%); }
.page .formulaire_spip.vt-voter:not(.zz) .vt-choix--liste label { font-weight: 600; font-size: 20px; letter-spacing: .02em; text-transform: none; }
.page .formulaire_spip.vt-voter:not(.zz) .vt-rangs { display: flex; flex-direction: column; gap: 10px; margin: 8px 0 14px; padding: 0; list-style: none; }
.page .formulaire_spip.vt-voter:not(.zz) .vt-rangs li { display: flex; align-items: center; gap: 14px; margin: 0; padding: 0; }
.page .formulaire_spip.vt-voter:not(.zz) .vt-rangs select { width: auto; min-width: 9em; }
.page .formulaire_spip.vt-voter:not(.zz) .vt-rangs label { font-family: var(--esp-texte); font-size: 19px; }
.esp.rub .vt-attention { margin: 14px 0 0; font-family: var(--esp-texte); font-size: 16px; color: var(--esp-gris); }

/* résultats */
.esp.rub .vt-participation { margin: 0 0 12px; font-family: var(--esp-texte); font-size: 17px; }
.esp.rub .vt-participation b { font-family: 'Barlow Semi Condensed', sans-serif; font-size: 28px; }
.esp.rub .vt-barres { display: flex; flex-direction: column; gap: 12px; margin: 0 0 14px; padding: 0; list-style: none; }
.vt-barres li { display: grid; grid-template-columns: minmax(8em, 24%) minmax(0, 1fr) 4.5em; gap: 12px; align-items: center; margin: 0; padding: 0; }
.esp.rub .vt-barre__nom { font-family: var(--esp-texte); font-size: 18px; font-weight: 600; overflow-wrap: anywhere; }
.vt-barre__piste { display: block; height: 22px; border-radius: 3px; background: var(--esp-gris-clair); overflow: hidden; }
.vt-barre__piste i { display: block; height: 100%; min-width: 2px; background: var(--esp-rouge, #c30c07); }
.esp.rub .vt-barre__voix { font: 700 22px/1 'Barlow Semi Condensed', sans-serif; text-align: right; }
.esp.rub .vt-note { margin: 0 0 10px; font-family: var(--esp-texte); font-size: 15px; color: var(--esp-gris); }
.esp.rub .vt-verdict { margin: 14px 0; padding: 12px 16px; border-left: 8px solid var(--esp-jaune, #f8e501); background: var(--esp-gris-clair); font-family: var(--esp-texte); font-size: 19px; font-weight: 600; }
.esp.rub .vt-empreinte { margin: 14px 0 0; font-family: var(--esp-texte); font-size: 14px; color: var(--esp-gris); }
.vt-empreinte code { display: block; margin-top: 4px; font-size: 13px; overflow-wrap: anywhere; }
.vt-detail { margin: 12px 0; font-family: var(--esp-texte); font-size: 16px; }
.vt-detail summary { cursor: pointer; font-weight: 600; }
.vt-detail table { width: 100%; margin-top: 8px; border-collapse: collapse; }
.vt-detail th, .vt-detail td { padding: 5px 8px; border-bottom: 1px solid var(--esp-filet, #d6d4d4); text-align: left; font-weight: 400; }
.vt-detail th { font-weight: 600; }
.vt-rgpd { margin-top: 28px; }

/* panneaux latéraux */
.vt-jauge { display: block; height: 12px; margin: 0 0 8px; border-radius: 6px; background: #fff; overflow: hidden; }
.vt-jauge i { display: block; height: 100%; background: var(--esp-rouge, #c30c07); }
.vt-emarg, .vt-journal, .vt-regles { margin: 8px 0 0; padding: 0; list-style: none; font-family: var(--esp-texte); font-size: 15px; }
.vt-emarg li, .vt-journal li, .vt-regles li { margin: 0 0 6px; padding: 0; }
.vt-emarg li:not(.vt-emarg--oui) { color: var(--esp-gris); }
.vt-regles li { padding-left: 16px; position: relative; }
.vt-regles li::before { content: ''; position: absolute; left: 0; top: .55em; width: 7px; height: 7px; background: var(--esp-rouge, #c30c07); }
.vt-mini { display: flex; flex-direction: column; gap: 12px; margin: 0 0 14px; padding: 0; list-style: none; }
.vt-mini li { display: flex; flex-direction: column; gap: 6px; margin: 0; padding: 0 0 12px; border-bottom: 2px solid #c9c7c7; font-family: var(--esp-texte); }
.vt-mini li:last-child { border-bottom: 0; padding-bottom: 0; }
.vt-mini b { font: 700 20px/1.15 'Barlow Semi Condensed', sans-serif; }
.vt-mini small { font-size: 14px; color: var(--esp-gris); }

@media (max-width: 600px) {
	.vt-ligne { grid-template-columns: 48px minmax(0, 1fr); }
	.vt-ic { width: 48px; height: 48px; }
	.esp.rub .vt-infos { grid-template-columns: 1fr; gap: 0; }
	.esp.rub .vt-infos dd { margin-bottom: 8px; }
	.vt-barres li { grid-template-columns: 1fr 4em; }
	.vt-barre__piste { grid-column: 1 / -1; grid-row: 2; }
}

/* proposition (pour / contre / abstention) : tuiles avec pictogramme */
.page .formulaire_spip.vt-voter:not(.zz) .vt-choix.vt-choix--prop { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 14px; }
.page .formulaire_spip.vt-voter:not(.zz) .vt-choix--prop .choix label { display: grid; justify-items: center; gap: 8px; padding: 18px 12px 16px; border: 0; border-top: 7px solid #cfcdcd; border-radius: 6px; background: #fff; box-shadow: 0 1px 3px rgba(0, 0, 0, .18); font-size: 20px; letter-spacing: .06em; transition: transform .15s, border-color .15s, background .15s, box-shadow .15s; }
.page .formulaire_spip.vt-voter:not(.zz) .vt-choix--prop .choix label::before { display: none; }
.page .formulaire_spip.vt-voter:not(.zz) .vt-choix--prop .choix svg { width: 40px; height: 40px; fill: none; stroke: #1D1C1D; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.page .formulaire_spip.vt-voter:not(.zz) .vt-choix--prop .choix label:hover { transform: translateY(-2px); border-top-color: #c30c07; }
.page .formulaire_spip.vt-voter:not(.zz) .vt-choix--prop .choix input:checked + label { border-top-color: #c30c07; background: #fbe7e6; box-shadow: 0 0 0 2px #c30c07, 0 1px 3px rgba(0, 0, 0, .18); }
.page .formulaire_spip.vt-voter:not(.zz) .vt-choix--prop .choix input:checked + label svg { stroke: #c30c07; }
.page .formulaire_spip.vt-voter:not(.zz) .vt-choix--prop .vt-choix--pour input:checked + label { border-top-color: #23733a; background: #e8f3ec; box-shadow: 0 0 0 2px #23733a, 0 1px 3px rgba(0, 0, 0, .18); }
.page .formulaire_spip.vt-voter:not(.zz) .vt-choix--prop .vt-choix--pour input:checked + label svg { stroke: #23733a; }

/* pastille « à voter » dans l'onglet Consultations */
.esp.rub .esp-onglets .vt-pastille { display: inline-block; min-width: 1.4em; margin-left: 4px; padding: 0 6px; border-radius: 999px; background: var(--esp-rouge, #c30c07); color: #fff; font-size: .75em; line-height: 1.5; text-align: center; letter-spacing: 0; vertical-align: .15em; }

/* liste des sites : bloc repliable, chevron a gauche du titre, aligne sur le texte (vers le haut = replie, vers le bas = deploye) */
.vt-pli > summary { display: flex !important; align-items: center; gap: 12px; cursor: pointer; list-style: none; line-height: 1.2; }
.vt-pli > summary::-webkit-details-marker { display: none; }
.vt-pli > summary:focus-visible { outline: 3px solid #1D1C1D; outline-offset: 3px; }
.vt-pli .vt-pli__aide { font-weight: 400; font-style: italic; letter-spacing: 0; text-transform: none; font-size: 14px; color: #6a6868; }
.vt-pli .vt-pli__chev { flex: none; display: block; width: 18px; height: 18px; margin: 0 4px 0 0; padding: 0; fill: none; stroke: #c30c07; stroke-width: 3.5; stroke-linecap: round; stroke-linejoin: round; transform: rotate(180deg); transition: transform .2s; }
.vt-pli[open] .vt-pli__chev { transform: rotate(0deg); }
.vt-pli[open] > summary { margin-bottom: 8px; }
.editer_reponses[hidden], #vt_bloc_reponses[hidden] { display: none !important; }

/* résultats en direct dans le panneau latéral */
.esp-panneau .vt-barres li { grid-template-columns: 1fr 3em; gap: 6px 10px; }
.esp-panneau .vt-barres .vt-barre__piste { grid-column: 1 / -1; grid-row: 2; }
.esp.rub .esp-panneau .vt-barre__nom { font-size: 16px; }
.esp.rub .esp-panneau .vt-barre__voix { font-size: 20px; }
