/* ==========================================================
   Page « Commander à emporter » – shortcode [volavola_commande]
   S'appuie sur carte.css (couleurs, polices, plats).
   ========================================================== */

.vv-commande {
    --vv-controle-h: 2.75rem;      /* cible tactile confortable (44 px) */
}

/* Page Commander : on veut voir les pizzas tout de suite, l'introduction reste compacte. */
.vv-commande .vv-carte__titre {
    font-size: clamp(2.5rem, 1.5rem + 4vw, 5rem);
}

.vv-commande .vv-carte__intro {
    gap: 1rem;
    padding-bottom: clamp(1.25rem, 1rem + 1vw, 2rem);
}

.vv-commande .vv-carte__intro-texte {
    gap: 0.5rem;
}

.vv-commande__adresse {
    font-size: 0.9375rem;
    color: var(--vv-muted);
}

.vv-commande__grille {
    display: grid;
    gap: clamp(2rem, 1rem + 3vw, 4rem);
    padding-top: clamp(1rem, 0.75rem + 1vw, 2rem);
    border-top: 2px solid var(--vv-ink);
}

@media (min-width: 992px) {
    .vv-commande__grille {
        grid-template-columns: minmax(0, 1.55fr) minmax(20rem, 1fr);
        align-items: start;
    }
}

.vv-commande__menu {
    display: grid;
    gap: 2.5rem;
}

.vv-plats--commande {
    gap: 1.25rem;
}

.vv-plats--commande .vv-plat {
    padding: 0.875rem;
    border: 1px solid var(--vv-line);
    border-radius: var(--vv-radius);
    background: #fff;
    transition: border-color 200ms var(--vv-ease), box-shadow 200ms var(--vv-ease);
}

.vv-plats--commande .vv-plat--choisi {
    border-color: var(--vv-accent);
    box-shadow: 0 0 0 1px var(--vv-accent), 0 1rem 2rem -1.5rem rgba(114, 45, 64, 0.6);
}

/* ---------- Quantité ---------- */

.vv-qte {
    display: inline-flex;
    align-items: center;
    justify-self: start;
    margin-top: 0.5rem;
    border: 1px solid var(--vv-ink);
    border-radius: 999px;
}

.vv-qte__btn {
    width: var(--vv-controle-h);
    height: var(--vv-controle-h);
    border: 0;
    border-radius: 999px;
    background: transparent;
    color: var(--vv-ink);
    font-size: 1.375rem;
    line-height: 1;
    cursor: pointer;
    transition: background-color 150ms var(--vv-ease);
}

.vv-qte__btn:hover:not(:disabled) {
    background: color-mix(in srgb, var(--vv-ink) 10%, transparent);
}

.vv-qte__btn:active:not(:disabled) {
    background: var(--vv-ink);
    color: var(--vv-paper);
}

.vv-qte__btn:focus-visible {
    outline: 2px solid var(--vv-accent);
    outline-offset: 2px;
}

.vv-qte__btn:disabled {
    opacity: 0.3;
    cursor: default;
}

.vv-qte__nb {
    min-width: 1.75rem;
    font-family: var(--vv-label);
    font-weight: 600;
    font-size: 1.25rem;
    text-align: center;
    font-variant-numeric: tabular-nums;
}

/* ---------- Panier ---------- */

.vv-panier {
    display: grid;
    gap: 1.25rem;
    padding: clamp(1.25rem, 1rem + 1.5vw, 2rem);
    border-radius: var(--vv-radius);
    background: #fff;
    box-shadow: 0 1.5rem 3rem -2rem rgba(31, 69, 113, 0.45), 0 0 0 1px var(--vv-line);
    scroll-margin-top: 1.5rem;
}

@media (min-width: 992px) {
    .vv-panier {
        position: sticky;
        top: 2rem;
    }

    .admin-bar .vv-panier {
        top: calc(32px + 2rem);
    }
}

.vv-panier__titre {
    font-family: var(--vv-display);
    font-size: 2rem;
    font-weight: 400;
    line-height: 1;
    text-transform: uppercase;
    color: var(--vv-ink);
}

.vv-panier__lignes {
    display: grid;
    gap: 0.5rem;
    padding: 0;
    list-style: none;
}

.vv-panier__lignes li {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    gap: 0.5rem;
    font-family: var(--vv-label);
    font-size: 1.125rem;
    color: var(--vv-ink);
}

.vv-panier__nom {
    font-weight: 600;
    text-transform: uppercase;
}

.vv-panier__vide {
    font-size: 0.9375rem;
    color: var(--vv-muted);
}

.vv-panier__total {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    padding-top: 0.75rem;
    border-top: 1px solid var(--vv-line);
    font-family: var(--vv-label);
    font-size: 1.25rem;
    text-transform: uppercase;
    color: var(--vv-ink);
}

.vv-panier__total strong {
    font-family: var(--vv-display);
    font-size: 1.75rem;
    font-weight: 400;
}

.vv-panier__bloc {
    display: grid;
    gap: 0.625rem;
    min-width: 0;
    margin: 0;
    padding: 0;
    border: 0;
    transition: opacity 200ms var(--vv-ease);
}

.vv-panier__bloc:disabled {
    opacity: 0.4;
}

.vv-panier__bloc legend {
    margin-bottom: 0.625rem;
    font-size: 0.8125rem;
    font-weight: 600;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--vv-accent);
}

/* ---------- Créneaux ---------- */

.vv-creneaux__jours,
.vv-creneaux__heures {
    display: flex;
    flex-wrap: wrap;
    gap: 0.375rem;
}

.vv-creneaux__heures {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(4.25rem, 1fr));
}

.vv-creneaux button {
    min-height: var(--vv-controle-h);
    padding: 0 0.875rem;
    border: 1px solid var(--vv-line);
    border-radius: 0.625rem;
    background: var(--vv-paper);
    color: var(--vv-ink);
    font-family: var(--vv-label);
    font-weight: 600;
    font-size: 1.0625rem;
    text-transform: capitalize;
    font-variant-numeric: tabular-nums;
    cursor: pointer;
    transition: background-color 150ms var(--vv-ease), border-color 150ms var(--vv-ease), color 150ms var(--vv-ease);
}

.vv-creneaux button:hover:not(:disabled) {
    border-color: var(--vv-ink);
}

.vv-creneaux button:focus-visible {
    outline: 2px solid var(--vv-accent);
    outline-offset: 2px;
}

.vv-creneaux button[aria-pressed="true"] {
    border-color: var(--vv-ink);
    background: var(--vv-ink);
    color: var(--vv-paper);
}

.vv-creneaux button:disabled {
    text-decoration: line-through;
    opacity: 0.4;
    cursor: not-allowed;
}

.vv-creneaux__info {
    font-size: 0.875rem;
    color: var(--vv-muted);
}

/* ---------- Coordonnées ---------- */

.vv-client label {
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--vv-ink);
}

.vv-client input[type="text"],
.vv-client input[type="tel"],
.vv-client input[type="email"] {
    width: 100%;
    min-height: var(--vv-controle-h);
    margin-bottom: 0.375rem;
    padding: 0 0.875rem;
    border: 1px solid color-mix(in srgb, var(--vv-ink) 35%, transparent);
    border-radius: 0.625rem;
    background: var(--vv-paper);
    color: var(--vv-ink);
    font: inherit;
}

.vv-client input:focus-visible {
    outline: 2px solid var(--vv-accent);
    outline-offset: 1px;
    border-color: var(--vv-ink);
}

.vv-client__cgv {
    display: flex;
    gap: 0.625rem;
    align-items: flex-start;
    font-weight: 400 !important;
    line-height: 1.4;
}

.vv-client__cgv input {
    width: 1.25rem;
    height: 1.25rem;
    margin-top: 0.1rem;
    accent-color: var(--vv-ink);
}

.vv-client__cgv a {
    color: var(--vv-ink);
    text-decoration: underline;
}

/* Champ piège pour les robots : hors écran, jamais vu ni lu. */
.vv-piege {
    position: absolute;
    left: -9999px;
    width: 1px;
    height: 1px;
    overflow: hidden;
}

/* ---------- Paiement ---------- */

.vv-panier__erreur:not(:empty) {
    padding: 0.75rem 1rem;
    border-radius: 0.625rem;
    background: color-mix(in srgb, var(--vv-accent) 10%, transparent);
    color: var(--vv-accent);
    font-weight: 500;
}

.vv-panier__payer {
    min-height: 3.5rem;
    border: 0;
    border-radius: 999px;
    background: var(--vv-highlight);
    color: var(--vv-on-highlight);
    font-family: var(--vv-display);
    font-size: 1.5rem;
    text-transform: uppercase;
    cursor: pointer;
    box-shadow: 0 1rem 2rem -1rem rgba(114, 45, 64, 0.7);
    transition: transform 150ms var(--vv-ease), opacity 150ms var(--vv-ease);
}

.vv-panier__payer:hover:not(:disabled) {
    transform: translateY(-2px);
}

.vv-panier__payer:active:not(:disabled) {
    transform: translateY(0);
}

.vv-panier__payer:focus-visible {
    outline: 3px solid var(--vv-ink);
    outline-offset: 3px;
}

.vv-panier__payer:disabled {
    opacity: 0.45;
    cursor: not-allowed;
    box-shadow: none;
}

.vv-panier__securite {
    font-size: 0.8125rem;
    line-height: 1.45;
    color: var(--vv-muted);
}

/* ---------- Barre mobile ---------- */

.vv-commande__barre {
    position: fixed;
    right: 0;
    bottom: 0;
    left: 0;
    z-index: 900;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.75rem 1rem calc(0.75rem + env(safe-area-inset-bottom));
    background: var(--vv-ink);
    color: var(--vv-paper);
    font-family: var(--vv-label);
    font-weight: 600;
    font-size: 1.125rem;
}

.vv-commande__barre[hidden] {
    display: none;
}

.vv-commande__continuer {
    padding: 0.625rem 1.25rem;
    border-radius: 999px;
    background: var(--vv-highlight);
    color: var(--vv-on-highlight);
    text-transform: uppercase;
}

.vv-commande__continuer:hover,
.vv-commande__continuer:focus-visible {
    color: var(--vv-on-highlight);
    background: color-mix(in srgb, var(--vv-highlight) 85%, #000);
}

@media (min-width: 992px) {
    .vv-commande__barre {
        display: none;
    }
}

@media (max-width: 991.98px) {
    .vv-commande {
        padding-bottom: 6rem; /* place pour la barre du bas */
    }
}

/* ---------- Retour de paiement ---------- */

.vv-retour__numero span {
    font-size: clamp(2.5rem, 1.5rem + 4vw, 5rem);
    letter-spacing: 0.04em;
}

.vv-retour__recap {
    max-width: 36rem;
}

.vv-retour__liens {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.75rem 1.5rem;
    margin-top: 2rem;
}

.vv-retour__lien {
    display: inline-block;
    font-weight: 600;
    text-decoration: none;
}

.vv-retour__lien--discret {
    color: var(--vv-accent);
    text-decoration: underline;
    text-underline-offset: 0.2em;
}

/* Encadré de diagnostic, visible des administrateurs quand la commande est fermée */
.vv-commande__admin {
    max-width: 40rem;
    border-left: 4px solid var(--vv-accent);
}

.vv-commande__admin ul {
    padding-left: 1.25rem;
}

/* Boissons alcoolisées : mention légale (loi Évin) et case « 18 ans ou plus » */
.vv-commande__mention-alcool {
    margin: 0.75rem 0 0;
    font-size: 0.85rem;
    font-style: italic;
    opacity: 0.8;
}

.vv-client__majeur[hidden] {
    display: none;
}

/* Jour de retrait toujours écrit en clair (on ne doit jamais croire commander pour aujourd'hui par erreur) */
.vv-creneaux__ferme {
    margin: 0 0 0.75rem;
    padding: 0.75rem 1rem;
    border-left: 4px solid var(--vv-accent);
    border-radius: 0.5rem;
    background: color-mix(in srgb, var(--vv-accent) 10%, transparent);
    font-weight: 600;
}

.vv-creneaux__ferme[hidden],
.vv-creneaux__choix[hidden] {
    display: none;
}

.vv-creneaux__jour {
    margin: 0.75rem 0 0.5rem;
    font-size: 1.1rem;
    font-weight: 700;
}

.vv-creneaux__jour:first-letter,
.vv-creneaux__choix:first-letter {
    text-transform: uppercase;
}

.vv-creneaux__choix {
    margin: 0.75rem 0 0;
    padding: 0.625rem 0.875rem;
    border-radius: 0.5rem;
    background: color-mix(in srgb, var(--vv-highlight) 15%, transparent);
    font-weight: 700;
}
