/* =========================================================
   Restauration — Styles généraux (HORS media & HORS carousel)
   ========================================================= */

/* ---------- wrapper & rythme vertical ---------- */
.rcv-catering {
    padding: 0 16px;
    max-width: 980px;
    margin: 0 auto;
    font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, "Apple Color Emoji", "Segoe UI Emoji";
}

.rcv-catering>*+* {
    margin-top: 18px;
}

/* ---------- bouton retour ---------- */
.rcv-back-btn-wrap {
    display: flex;
    justify-content: center;
    margin: 20px 0 6px;
}

.rcv-back-btn {
    background: #f3f4f6;
    color: #111;
    border: 0;
    border-radius: 999px;
    padding: 10px 20px;
    font-size: 15px;
    cursor: pointer;
    text-decoration: none;
}

.rcv-back-btn:hover {
    background: #e9eaee;
}

/* ---------- bandeau “régler en espèces” ---------- */
.rcv-cash-note {
    background: #fff2f7;
    color: #111;
    border: 1px solid #f2d6e2;
    border-radius: 12px;
    padding: 12px 14px;
    margin: 8px 0 22px;
    font-size: 14px;
}

.rcv-cash-note b {
    font-weight: 800;
}

.rcv-cash-note u {
    text-underline-offset: 2px;
}

/* ---------- titres de section ---------- */
.rcv-section-title {
    color: #6b7280;
    font-weight: 600;
    margin: 8px 0 10px;
    font-size: 18px;
}

/* pour assurer un vrai espace entre la section restauration et boisson */
.rcv-section-spacer {
    height: 6px;
}

/* ---------- grilles classiques (quand pas en carrousel) ---------- */
.rcv-catering-row {
    display: grid;
    gap: 18px;
    margin: 0 0 24px;
}

.rcv-catering-row.is-3 {
    grid-template-columns: repeat(3, minmax(240px, 1fr));
}

.rcv-catering-row.is-2 {
    grid-template-columns: repeat(2, minmax(220px, 1fr));
}

/* ---------- carte ---------- */
.rcv-pack-card {
    background: #fff;
    border: 1px solid #f2d6e2;
    border-radius: 14px;
    box-shadow: 0 6px 16px rgba(0, 0, 0, .05);
    padding: 12px;
    overflow: hidden;
}

/* zone cliquable de la carte */
.rcv-pack-main {
    display: grid;
    grid-template-columns: 120px 1fr;
    column-gap: 14px;
    text-decoration: none !important;
    color: inherit;
}

/* image */
.rcv-pack-media {
    width: 120px;
    height: 90px;
    border-radius: 12px;
    overflow: hidden;
    background: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
}

.rcv-pack-img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
}

.rcv-empty-media {
    background: #eef2f5;
}

/* contenu */
.rcv-pack-content {
    display: grid;
    row-gap: 6px;
    align-content: start;
}

.rcv-pack-head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 8px;
}

.rcv-pack-title {
    margin: 0;
    font-size: 17px;
    font-weight: 800;
    line-height: 1.25;
}

/* prix */
.rcv-pack-price-line {
    margin-top: 2px;
}

.rcv-pack-price {
    font-size: 14px;
    font-weight: 600;
    color: #0f172a;
}

/* sélecteurs 0..3 */
.rcv-qty {
    display: flex;
    gap: 8px;
    align-items: center;
    flex-wrap: wrap;
    margin-top: 2px;
}

.rcv-pill {
    appearance: none;
    border: 1.6px solid #d1d5db;
    background: #f3f4f6;
    color: #111;
    border-radius: 999px;
    width: 30px;
    height: 30px;
    line-height: 27px;
    font-weight: 700;
    text-align: center;
    cursor: pointer;
    user-select: none;
    transition: background .2s, color .2s, border-color .2s, transform .08s;
}

.rcv-pill:hover {
    transform: translateY(-1px);
}

.rcv-pill.is-active,
.rcv-pill[aria-pressed="true"] {
    background: #0f172a;
    color: #fff;
    border-color: #0f172a;
}

.rcv-pill:focus-visible {
    outline: 2px solid #0f172a;
    outline-offset: 2px;
}

/* ---------- bloc actions / bouton Continuer ---------- */
.rcv-actions {
    display: flex;
    justify-content: center;
    margin: 16px 0 40px;
}

.rcv-continue {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #0f172a;
    color: #fff;
    text-decoration: none;
    padding: 9px 16px;
    border-radius: 12px;
    font-weight: 800;
    font-size: 15px;
}

.rcv-continue:hover {
    filter: brightness(1.07);
}

/* aides d’alignement quand carrousel présent */
.rcv-carousel {
    margin-bottom: 24px;
}

.rcv-car-viewport {
    margin-top: 6px;
}

/* ------ carousel restauration ------ */
.rcv-carousel {
    --gap: 18px;
    position: relative;
    margin-bottom: 24px;
}

.rcv-car-viewport {
    overflow: hidden;
    pointer-events: auto;
}

.rcv-car-track {
    display: grid;
    grid-auto-flow: column;
    gap: var(--gap);
    grid-auto-columns: calc((100% - (var(--gap)*2))/3);
    /* 3 visibles */
    scroll-snap-type: x mandatory;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scroll-behavior: smooth;
    padding-bottom: 2px;
}

.rcv-car-track>.rcv-pack-card {
    scroll-snap-align: start;
    min-width: 0;
}

/* flèches */
.rcv-car-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 2;
    width: 32px;
    height: 32px;
    border-radius: 999px;
    border: none;
    background: #f3f4f6;
    color: #111;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(0, 0, 0, .08);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
}

.rcv-car-btn:hover {
    background: #e9eaee;
}

.rcv-car-btn.prev {
    left: -8px;
}

.rcv-car-btn.next {
    right: -8px;
}


/* responsive largeur des slides: 2 puis 1 */
@media (max-width:1024px) {
    .rcv-car-track {
        grid-auto-columns: calc((100% - var(--gap))/2);
    }
}

@media (max-width:640px) {
    .rcv-car-track {
        grid-auto-columns: 100%;
    }

    .rcv-car-btn.prev {
        left: 6px;
    }

    .rcv-car-btn.next {
        right: 6px;
    }
}

/* zone actions */
.rcv-actions {
    display: flex;
    justify-content: center;
    margin: 16px 0 40px;
}

/* bouton normal (desktop) */
.rcv-continue {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #0f172a;
    color: #fff;
    text-decoration: none;
    padding: 9px 16px;
    border-radius: 12px;
    font-weight: 800;
    font-size: 15px;
}

.rcv-continue:hover {
    filter: brightness(1.07);
}

/* sticky en mobile : petit et toujours visible */
@media (max-width:768px) {
    .rcv-catering {
        padding-bottom: 84px;
    }

    /* espace pour la barre */
    .rcv-actions {
        position: fixed;
        left: 0;
        right: 0;
        bottom: 10px;
        z-index: 30;
        padding: 0 14px;
        margin: 0;
    }

    .rcv-continue {
        width: 40%;
        max-width: 320px;
        margin: 0 auto;
        height: 24px;
        border-radius: 14px;
        font-size: 15px;
    }
}

/* tablette paysage */
@media (max-width:1080px) {
    .rcv-catering-row.is-3 {
        grid-template-columns: repeat(2, minmax(240px, 1fr));
    }

    .rcv-catering-row.is-2 {
        grid-template-columns: repeat(2, minmax(220px, 1fr));
    }

    .rcv-pack-main {
        grid-template-columns: 110px 1fr;
    }

    .rcv-pack-media {
        width: 110px;
        height: 85px;
    }
}

/* ===========================
   TABLETTE (<= 800px)
   =========================== */
@media (max-width: 800px) {

    /* on garde image à gauche + centrage vertical */
    .rcv-pack-main {
        grid-template-columns: 100px 1fr;
        column-gap: 12px;
        align-items: center;
        /* centre verticalement l'image vs. le contenu */
    }

    .rcv-pack-media {
        width: 100px;
        height: 84px;
        /* hauteur fixe pour un bon alignement */
    }

    /* titres & contenu compacts (toujours en ligne) */
    .rcv-pack-title {
        font-size: 16px;
        text-align: left;
    }

    .rcv-pack-content {
        row-gap: 6px;
        text-align: left;
    }

    /* pastilles — RESTENT EN LIGNE */
    .rcv-qty {
        gap: 6px;
        flex-wrap: nowrap;
        /* pas de retour à la ligne */
        overflow-x: auto;
        /* si trop serré, léger scroll horizontal */
        -webkit-overflow-scrolling: touch;
    }

    .rcv-pill {
        width: 28px;
        height: 28px;
        line-height: 26px;
        font-size: 13px;
    }

    /* cartes un peu plus compactes */
    .rcv-pack-card {
        padding: 12px;
    }

    .rcv-catering-row.is-3,
    .rcv-catering-row.is-2 {
        grid-template-columns: 1fr 1fr;
        gap: 16px;
        margin-bottom: 22px;
    }

    /* bouton continuer plus petit */
    .rcv-actions {
        position: sticky;
        bottom: 10px;
        z-index: 50;
        display: flex;
        justify-content: center;
        pointer-events: none;
        /* évite de bloquer le scroll à côté */
    }

    .rcv-continue {
        pointer-events: auto;
        padding: 9px 14px;
        font-size: 14px;
        border-radius: 10px;
        min-width: 200px;
        /* petit, mais confortable au doigt */
        box-shadow: 0 8px 20px rgba(0, 0, 0, .12);
    }
}

/* ===========================
   MOBILE (<= 600px)
   =========================== */
@media (max-width: 600px) {

    /* toujours 2 colonnes : image + contenu  */
    .rcv-pack-main {
        grid-template-columns: 92px 1fr;
        column-gap: 10px;
        align-items: center;
    }

    .rcv-pack-media {
        width: 92px;
        height: 78px;
    }

    .rcv-pack-title {
        font-size: 15px;
    }

    .rcv-pack-price {
        font-size: 13px;
    }

    /* pastilles en ligne et plus petites */
    .rcv-qty {
        gap: 6px;
        flex-wrap: nowrap;
    }

    .rcv-pill {
        width: 26px;
        height: 26px;
        line-height: 24px;
        font-size: 12px;
    }

    /* grille 1 colonne sur mobile pour respirer */
    .rcv-catering-row.is-3,
    .rcv-catering-row.is-2 {
        grid-template-columns: 1fr;
        gap: 14px;
        margin-bottom: 18px;
    }

    /* bouton continuer encore plus discret */
    .rcv-actions {
        bottom: 8px;
    }

    .rcv-continue {
        min-width: 180px;
        padding: 8px 12px;
        font-size: 13px;
        border-radius: 10px;
    }
}

/* ===========================
   TRES PETIT (<= 380px)
   =========================== */
@media (max-width: 380px) {
    .rcv-pack-main {
        grid-template-columns: 86px 1fr;
    }

    .rcv-pack-media {
        width: 86px;
        height: 72px;
    }

    .rcv-pill {
        width: 24px;
        height: 24px;
        line-height: 22px;
        font-size: 12px;
    }

    .rcv-continue {
        min-width: 160px;
        font-size: 12.5px;
        padding: 7px 12px;
    }
}