/* =====================================================================
   AFRICA FASHION AWARDS — Vote (grille, fenêtre de paiement, statut)
   S'appuie sur les jetons et composants de main.css (.btn, .field, .section…).
   ===================================================================== */

.hidden { display: none !important; }

/* --- Compte à rebours ------------------------------------------------ */
.vcount { text-align: center; }
.vcount--notice { margin-bottom: clamp(1.4rem, 3vw, 2rem); }

/* Dans le bandeau de titre : à droite du titre, aligné sur le bas */
.pagehead__grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 1.6rem 2.5rem;
    align-items: end;
}

.pagehead__aside .vcount { text-align: right; }
.pagehead__aside .vcount__boxes { justify-content: flex-end; }

.vcount__label {
    margin: 0 0 .7rem;
    font-size: var(--step--1);
    font-weight: 500;
    letter-spacing: .26em;
    text-transform: uppercase;
    color: var(--gold);
}

@media (max-width: 900px) {
    .pagehead__grid { grid-template-columns: 1fr; }
    .pagehead__aside .vcount { text-align: left; }
    .pagehead__aside .vcount__boxes { justify-content: flex-start; }
}

.vcount__boxes {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: .8rem;
}

.vcount__box {
    min-width: 5.6rem;
    padding: .9rem 1rem;
    border: 1px solid var(--line-strong);
    background: var(--grad-surface-2);
    text-align: center;
}

.vcount__box strong {
    display: block;
    font-family: var(--font-display);
    font-size: clamp(1.7rem, 4vw, 2.6rem);
    font-weight: 500;
    line-height: 1;
    color: var(--gold);
}

.vcount__box span {
    display: block;
    margin-top: .4rem;
    font-size: .66rem;
    letter-spacing: .2em;
    text-transform: uppercase;
    color: var(--cream-mute);
}

.vnotice {
    max-width: 60ch;
    margin: 1.4rem auto 0;
    padding: 1rem 1.4rem;
    border: 1px solid var(--gold);
    border-left-width: 3px;
    background: linear-gradient(100deg, rgba(173, 138, 30, .12), rgba(173, 138, 30, .02) 65%);
    font-size: .92rem;
    text-align: left;
}

/* --- Recherche + filtre ---------------------------------------------- */
.vbar {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 18rem) auto;
    gap: .7rem 1rem;
    align-items: end;
    margin-bottom: 1.4rem;
}

.vbar__count {
    margin: 0;
    padding-bottom: .9rem;
    font-size: .78rem;
    letter-spacing: .14em;
    text-transform: uppercase;
    color: var(--cream-mute);
    white-space: nowrap;
}

.vbar__count strong { color: var(--gold); }

/* Les champs de main.css ne ciblent que .field : mêmes règles ici pour les
   formulaires de vote, posés hors des pages de formulaire. */
.vbar .field input,
.vbar .field select,
.vform .field input,
.vform .field select,
.vcopy input {
    width: 100%;
    background: linear-gradient(180deg, #fff, #faf8f3);
    border: 1px solid var(--line-strong);
    color: var(--cream);
    padding: .5rem .75rem;
    font-family: inherit;
    font-size: .92rem;
    border-radius: var(--radius);
    transition: border-color .3s var(--ease), box-shadow .3s var(--ease);
}

.vbar .field input:focus,
.vbar .field select:focus,
.vform .field input:focus,
.vform .field select:focus,
.vcopy input:focus {
    border-color: var(--gold);
    outline: none;
    box-shadow: 0 0 0 3px rgba(173, 138, 30, .15);
}

/* --- Grille de nominés ----------------------------------------------- */
.vgrid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
    gap: clamp(1rem, 2vw, 1.6rem);
}

.vcard {
    display: flex;
    flex-direction: column;
    border: 1px solid var(--line);
    background: var(--grad-surface-2);
    transition: border-color .35s var(--ease), transform .35s var(--ease), box-shadow .35s var(--ease);
}

.vcard:hover {
    border-color: var(--gold-deep);
    transform: translateY(-4px);
    box-shadow: 0 22px 48px -30px rgba(26, 23, 18, .35);
}

.vcard.is-voted { border-color: var(--gold); }

.vcard__media {
    position: relative;
    aspect-ratio: 4 / 5;
    overflow: hidden;
    background: var(--ink-3);
}

.vcard__media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: 50% 25%;
    transition: transform 1s var(--ease);
}

.vcard:hover .vcard__media img { transform: scale(1.04); }

.vcard__score {
    position: absolute;
    left: .7rem;
    top: .7rem;
    display: grid;
    min-width: 4rem;
    padding: .45rem .7rem;
    background: rgba(10, 10, 11, .78);
    backdrop-filter: blur(4px);
    border: 1px solid rgba(173, 138, 30, .7);
    text-align: center;
    color: #f5f1e8;
}

.vcard__score strong {
    font-family: var(--font-display);
    font-size: 1.15rem;
    font-weight: 500;
    line-height: 1;
}

.vcard__score small {
    margin-top: .2rem;
    font-size: .58rem;
    letter-spacing: .2em;
    text-transform: uppercase;
    opacity: .7;
}

.vcard__rank {
    position: absolute;
    right: .7rem;
    top: .7rem;
    padding: .3rem .65rem;
    background: var(--grad-gold);
    color: #fff;
    font-size: .64rem;
    font-weight: 600;
    letter-spacing: .14em;
    text-transform: uppercase;
}

.vcard__share {
    position: absolute;
    right: .7rem;
    bottom: .7rem;
    display: grid;
    place-items: center;
    width: 2.4rem;
    height: 2.4rem;
    border: 1px solid rgba(255, 255, 255, .7);
    background: rgba(10, 10, 11, .6);
    backdrop-filter: blur(4px);
    color: #fff;
    cursor: pointer;
    transition: background .3s var(--ease), border-color .3s var(--ease);
}

.vcard__share:hover { background: var(--gold); border-color: var(--gold); }
.vcard__share svg { width: 1.05rem; height: 1.05rem; }

.vcard__body {
    display: flex;
    flex: 1;
    flex-direction: column;
    gap: .55rem;
    padding: 1.1rem 1.1rem 1.2rem;
    text-align: center;
}

.vcard__name { font-size: 1.15rem; }

.vcard__cat {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: .5rem;
    margin: 0 0 .5rem;
    font-size: .68rem;
    letter-spacing: .12em;
    text-transform: uppercase;
    color: var(--cream-mute);
}

.vcard__body .btn { margin-top: auto; }

.btn--voted {
    --btn-bg: var(--grad-glass);
    --btn-fg: var(--gold);
    --btn-shadow: none;
}

.vflag {
    display: inline-block;
    flex: none;
    width: 22px;
    height: 15px;
    object-fit: cover;
    border-radius: 2px;
    box-shadow: 0 0 0 1px var(--line-strong);
}

.vplain { padding-left: 1.2rem; }

/* --- Fenêtres --------------------------------------------------------- */
.vmodal {
    position: fixed;
    inset: 0;
    z-index: 200;
    display: none;
    align-items: flex-start;
    justify-content: center;
    overflow-y: auto;
    padding: clamp(1.2rem, 5vw, 3rem) 1rem;
    background: rgba(10, 10, 11, .66);
    backdrop-filter: blur(4px);
    animation: vfade .25s var(--ease) both;
}

.vmodal.flex { display: flex; }
.vmodal.closing { animation: vfadeout .2s var(--ease) both; }
#shareModal { z-index: 210; }
#photoPreview { z-index: 220; align-items: center; }
.vmodal--dark { background: rgba(10, 10, 11, .92); }

.vpanel {
    position: relative;
    width: min(100%, 30rem);
    margin: 1rem auto 0;
    padding: 2rem clamp(1rem, 3vw, 1.4rem) 1.2rem;
    background: #fff;
    border: 1px solid var(--line-strong);
    box-shadow: 0 40px 90px -40px rgba(10, 10, 11, .6);
    animation: vrise .4s var(--ease) both;
}

.vmodal.closing .vpanel { animation: vriseout .2s var(--ease) both; }
.vpanel--sm { width: min(100%, 26rem); margin-top: 3rem; }
.vpanel--status { width: 100%; margin-top: 0; padding-top: 2rem; }

/* Pastille de score à cheval sur le bord haut */
.vpanel__score {
    position: absolute;
    left: 50%;
    top: 0;
    transform: translate(-50%, -50%);
    padding: .55rem 1.4rem;
    background: var(--grad-gold);
    color: #fff;
    white-space: nowrap;
    box-shadow: 0 12px 28px -16px rgba(173, 138, 30, .8);
}

.vpanel__score strong {
    font-family: var(--font-display);
    font-size: 1.5rem;
    font-weight: 500;
    line-height: 1;
}

.vpanel__score span {
    margin-left: .35rem;
    font-size: .66rem;
    letter-spacing: .2em;
    text-transform: uppercase;
}

.vclose {
    position: absolute;
    right: .8rem;
    top: .8rem;
    z-index: 2;
    display: grid;
    place-items: center;
    width: 2.2rem;
    height: 2.2rem;
    border: 1px solid var(--line-strong);
    background: #fff;
    color: var(--cream);
    font-size: .8rem;
    cursor: pointer;
    transition: background .25s var(--ease), color .25s var(--ease), border-color .25s var(--ease);
}

.vclose:hover { background: var(--gold); border-color: var(--gold); color: #fff; }
.vmodal--dark .vclose { top: 1rem; right: 1rem; background: rgba(255, 255, 255, .1); color: #fff; border-color: rgba(255, 255, 255, .35); }

.vsolo { max-width: 30rem; margin: 1.8rem auto 0; }
.vsolo .vpanel { margin: 0 auto; }

.vsolo__note {
    margin-top: 1.4rem;
    font-size: .86rem;
    text-align: center;
    color: var(--cream-dim);
}

.vsolo__note strong { color: var(--gold); }
.vsolo__note a { color: var(--gold); text-decoration: underline; }

/* --- Identité du nominé ---------------------------------------------- */
.vident {
    display: flex;
    align-items: center;
    gap: 1.1rem;
    padding-bottom: .8rem;
    margin-bottom: .8rem;
    border-bottom: 1px solid var(--line);
}

.vident__photo {
    flex: none;
    width: 5.6rem;
    height: 5.6rem;
    padding: 0;
    overflow: hidden;
    border: 2px solid var(--gold);
    border-radius: 50%;
    background: var(--ink-3);
    cursor: zoom-in;
}

.vident__photo--sm { width: 4rem; height: 4rem; cursor: default; }
.vident__photo img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 25%; }
.vident__text { min-width: 0; flex: 1; padding-right: 2rem; }
.vident__name { margin: 0; font-family: var(--font-display); font-size: 1.3rem; font-weight: 500; line-height: 1.15; color: var(--gold); }
.vident__cat { margin: .4rem 0 0; font-size: .68rem; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: var(--cream-dim); }

.vident__country {
    display: flex;
    align-items: center;
    gap: .5rem;
    margin: .5rem 0 0;
    font-size: .7rem;
    letter-spacing: .14em;
    color: var(--cream-mute);
}

/* --- Formulaire -------------------------------------------------------- */
.vform { display: grid; gap: .7rem; }
.vform .field, .vbar .field { gap: .25rem; }
.vform__row { display: grid; grid-template-columns: 1fr 1fr; gap: .7rem; }
.vform__total { margin: 0; padding: .3rem 0; font-family: var(--font-display); font-size: 1.6rem; line-height: 1; color: var(--gold); }
.vform__total small { font-family: var(--font-body); font-size: .75rem; color: var(--cream-mute); }
.vform__legal { margin: 0; font-size: .74rem; color: var(--cream-mute); }
.vform__legal a { color: var(--gold); text-decoration: underline; }
.vform__done { margin: 0; text-align: center; font-size: .86rem; font-weight: 600; color: var(--gold); }
.vform .btn[disabled] { opacity: .6; cursor: not-allowed; transform: none; }

.vcopy { display: flex; gap: .6rem; }
.vcopy input { min-width: 0; }

/* intl-tel-input : le champ occupe toute la largeur */
.iti { display: block; width: 100%; }
.iti--detached-country-selector { z-index: 1200; }
.vform .iti input { padding-left: 5.2rem; }

/* --- Suivi de transaction -------------------------------------------- */
.vstatus__head { display: flex; flex-direction: column; align-items: center; text-align: center; }

.vstatus__icon {
    display: grid;
    place-items: center;
    width: 3.6rem;
    height: 3.6rem;
    border: 1px solid var(--gold);
    border-radius: 50%;
}

.vstatus__icon svg { width: 1.7rem; height: 1.7rem; }

.vbadge {
    margin-top: .8rem;
    padding: .35rem 1rem;
    border: 1px solid var(--gold);
    font-size: .68rem;
    font-weight: 600;
    letter-spacing: .16em;
    text-transform: uppercase;
}

.vstatus__hint { max-width: 32ch; margin: .8rem 0 0; font-size: .86rem; color: var(--cream-dim); }
.vstatus__count { margin: .9rem 0 0; text-align: center; font-size: .78rem; color: var(--cream-mute); }
.vstatus__actions { display: flex; flex-wrap: wrap; justify-content: center; gap: .7rem; margin-top: 1.2rem; }

.vtone--gold  { color: var(--gold); border-color: var(--gold); background: rgba(173, 138, 30, .08); }
.vtone--green { color: #1d7a46; border-color: #1d7a46; background: rgba(29, 122, 70, .08); }
.vtone--red   { color: #c0392b; border-color: #c0392b; background: rgba(192, 57, 43, .08); }

.vspin {
    width: 1.5rem;
    height: 1.5rem;
    border: 3px solid rgba(173, 138, 30, .25);
    border-top-color: var(--gold);
    border-radius: 50%;
    animation: vspin .8s linear infinite;
}

.vrows { margin: 1.4rem 0 0; border: 1px solid var(--line); }
.vrows__row { display: flex; justify-content: space-between; gap: 1rem; padding: .65rem 1rem; border-bottom: 1px solid var(--line); }
.vrows__row:last-child { border-bottom: 0; }
.vrows dt { font-size: .66rem; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: var(--cream-mute); }
.vrows dd { min-width: 0; margin: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; text-align: right; font-size: .86rem; font-weight: 600; }

/* --- Aperçu photo et partage ----------------------------------------- */
.vpreview { width: min(100%, 30rem); margin: 0 auto; background: #fff; border: 1px solid var(--line-strong); }
.vpreview img { width: 100%; max-height: 70vh; object-fit: contain; background: #0a0a0b; }
.vpreview figcaption { padding: 1.1rem; text-align: center; }
.vpreview .vident__country { justify-content: center; }

.vshare { display: grid; grid-template-columns: repeat(4, 1fr); gap: .6rem; margin: 0 0 1.2rem; }

.vshare__net {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: .5rem;
    padding: .8rem .2rem;
    border: 1px solid var(--line-strong);
    background: transparent;
    font-family: inherit;
    font-size: .68rem;
    font-weight: 600;
    color: var(--cream);
    cursor: pointer;
    transition: border-color .25s var(--ease), background .25s var(--ease), color .25s var(--ease);
}

.vshare__net svg { width: 1.3rem; height: 1.3rem; fill: currentColor; }
.vshare__net:hover { border-color: var(--gold); background: var(--gold); color: #fff; }

/* --- Animations -------------------------------------------------------- */
@keyframes vfade { from { opacity: 0 } to { opacity: 1 } }
@keyframes vfadeout { to { opacity: 0 } }
@keyframes vrise { from { opacity: 0; transform: translateY(24px) } to { opacity: 1; transform: none } }
@keyframes vriseout { to { opacity: 0; transform: translateY(16px) } }
@keyframes vspin { to { transform: rotate(360deg) } }

@media (prefers-reduced-motion: reduce) {
    .vmodal, .vpanel, .vspin { animation: none !important; }
}

/* --- Adaptatif --------------------------------------------------------- */
@media (max-width: 760px) {
    .vbar { grid-template-columns: 1fr; }
    .vbar__count { padding-bottom: 0; }
    .vgrid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .8rem; }
    .vcard__body { padding: .8rem .7rem 1rem; }
    .vcard__name { font-size: 1rem; }
    .vcard__cat { font-size: .6rem; }
    .vcount__box { min-width: 4.4rem; padding: .7rem .6rem; }
}

@media (max-width: 420px) {
    .vform__row { grid-template-columns: 1fr; }
    .vshare { grid-template-columns: repeat(2, 1fr); }
}

/* Les listes déroulantes gardent une flèche : la règle générale ci-dessus
   remplace le fond, flèche comprise, donc on la redessine ici. */
.vbar .field select,
.vform .field select {
    appearance: none;
    -webkit-appearance: none;
    cursor: pointer;
    padding-right: 2.4rem;
    background-color: #fff;
    background-image:
        linear-gradient(45deg, transparent 50%, var(--gold) 50%),
        linear-gradient(135deg, var(--gold) 50%, transparent 50%);
    background-position: calc(100% - 20px) calc(50% + 2px), calc(100% - 14px) calc(50% + 2px);
    background-size: 6px 6px, 6px 6px;
    background-repeat: no-repeat;
}

/* Précision dans le libellé : en casse normale, plus discrète */
.field__label .field__hint { letter-spacing: 0; text-transform: none; font-weight: 400; }

.vform__fees { color: #c0392b; font-weight: 600; }

/* Bandeau de titre plus compact sur les pages de vote (en-tête fixe ≈ 5 rem) */
.page-vote .pagehead { padding-block: clamp(6rem, 10vw, 7.5rem) clamp(1.5rem, 3vw, 2.2rem); }

/* Section de contenu des pages de vote : barre de recherche collée au bandeau */
.page-vote .section { padding-top: clamp(.8rem, 2vw, 1.4rem); padding-bottom: clamp(2.5rem, 5vw, 4rem); }
.page-vote .vbar { margin-top: 0; }

/* --- Mobile : écritures et marges réduites ------------------------------ */
@media (max-width: 600px) {
    .page-vote { --gutter: 1rem; }

    .page-vote .pagehead { padding-block: 5.2rem 1.1rem; }
    .page-vote .pagehead .crumbs { margin-bottom: .6rem; font-size: .62rem; letter-spacing: .1em; }
    .page-vote .pagehead .kicker { margin-bottom: .6rem; font-size: .62rem; letter-spacing: .2em; gap: .5rem; }
    .page-vote .pagehead .kicker::before { width: 1.4rem; }
    .page-vote .pagehead .title-xl { font-size: 1.65rem; line-height: 1.1; }
    .page-vote .pagehead .lead { margin-top: .6rem !important; font-size: .82rem; line-height: 1.5; }
    .page-vote .pagehead__grid { gap: .9rem; }

    /* Compte à rebours : quatre cases sur une seule ligne */
    .vcount__label { margin-bottom: .45rem; font-size: .6rem; letter-spacing: .16em; }
    .vcount__boxes { flex-wrap: nowrap; gap: .4rem; }
    .vcount__box { flex: 1; min-width: 0; padding: .45rem .3rem; }
    .vcount__box strong { font-size: 1.15rem; }
    .vcount__box span { margin-top: .2rem; font-size: .5rem; letter-spacing: .1em; }

    .page-vote .section { padding-top: .7rem; padding-bottom: 2rem; }
    .vnotice { margin-top: .8rem; padding: .7rem .9rem; font-size: .8rem; }

    .vbar { gap: .5rem; margin-bottom: 1rem; }
    .vbar .field input, .vbar .field select { padding: .42rem .65rem; font-size: .85rem; }
    .vbar__count { font-size: .66rem; }
    .page-vote .field__label { font-size: .62rem; letter-spacing: .12em; }

    .vgrid { gap: .6rem; }
    .vcard__score { left: .4rem; top: .4rem; min-width: 3rem; padding: .3rem .45rem; }
    .vcard__score strong { font-size: .95rem; }
    .vcard__score small { font-size: .5rem; }
    .vcard__share { right: .4rem; bottom: .4rem; width: 1.9rem; height: 1.9rem; }
    .vcard__body { gap: .35rem; padding: .6rem .5rem .7rem; }
    .vcard__name { font-size: .9rem; }
    .vcard__cat { margin-bottom: .3rem; font-size: .56rem; letter-spacing: .06em; }
    .vcard__body .btn { padding: .6rem 1rem; font-size: .66rem; }

    /* Fenêtre et page de vote */
    .vmodal { padding: .8rem .6rem; }
    .vpanel { margin-top: 1rem; padding: 1.6rem .9rem .9rem; }
    .vpanel__score { padding: .4rem 1rem; }
    .vpanel__score strong { font-size: 1.2rem; }
    .vident { gap: .7rem; padding-bottom: .6rem; margin-bottom: .6rem; }
    .vident__photo { width: 4.2rem; height: 4.2rem; }
    .vident__name { font-size: 1.05rem; }
    .vident__cat { font-size: .6rem; }
    .vident__country { font-size: .62rem; }
    .vform { gap: .55rem; }
    .vform .field input, .vform .field select { padding: .42rem .65rem; font-size: .85rem; }
    .vform__total { font-size: 1.3rem; }
    .vform__legal, .field__hint { font-size: .68rem; }
    .vform .btn { padding: .75rem 1rem; font-size: .7rem; }
    .vsolo { margin-top: 1.4rem; }
    .vsolo__note { font-size: .78rem; }

    /* Suivi de paiement */
    .vrows__row { padding: .5rem .75rem; }
    .vrows dt { font-size: .58rem; }
    .vrows dd { font-size: .78rem; }
    .vstatus__hint { font-size: .8rem; }
}

/* Mobile : le bandeau de vote ne garde que le décompte (fil d'Ariane, titre,
   édition et catégorie sont masqués ; le nom du nominé reste dans sa carte). */
@media (max-width: 600px) {
    .page-vote .pagehead__grid > div:first-child { display: none; }
    .page-vote .pagehead:has(.pagehead__grid) { padding-block: 5rem .9rem; }
}
