/* ==========================================================================
   NumiApp — MODULE RESTAURANTS (site public)
   Références : deliveroo.fr · ubereats.com
   --------------------------------------------------------------------------
   Portée : tout est scopé sous `.numi-resto` (aucune fuite vers les autres
   modules ni vers le socle commun). Accent CORAIL #ff6839 (theme_color de la
   section Restaurants), distinct de l'épicerie (lime), du shop (sky) et de
   Doctoso (teal). 100 % OpenStreetMap pour la carte (via NumiGeo).
   ========================================================================== */

.numi-resto {
    --nr-accent: #FF6839;
    --nr-accent-fonce: #E24B1C;
    --nr-accent-clair: #FFF1EB;
    --nr-encre: #1B1B1F;
    --nr-texte: #3D3D45;
    --nr-gris: #767680;
    --nr-bord: #ECECEF;
    --nr-fond: #F7F7F8;
    --nr-blanc: #ffffff;
    --nr-vert: #128A4B;
    --nr-rouge: #D92D20;
    --nr-etoile: #F5A623;
    --nr-radius: 18px;
    background: var(--nr-fond);
    color: var(--nr-texte);
    padding-bottom: 140px;
    font-family: 'Poppins', 'Montserrat', system-ui, -apple-system, sans-serif;
}
.numi-resto * { box-sizing: border-box; }
.nr-container { max-width: 1180px; margin: 0 auto; padding: 0 16px; }

/* ------------------------------------------------------------ bandeau de tête */
.nr-topbar {
    background: linear-gradient(120deg, var(--nr-accent) 0%, var(--nr-accent-fonce) 100%);
    color: #fff; padding: 14px 0 20px;
}
.nr-brandline { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.nr-logo { font-weight: 800; font-size: 22px; letter-spacing: .3px; display: inline-flex; align-items: center; gap: 8px; }
.nr-badge-brand {
    background: rgba(255,255,255,.22); border: 1px solid rgba(255,255,255,.45);
    color: #fff; font-size: 10px; font-weight: 700; padding: 2px 8px; border-radius: 999px; text-transform: uppercase;
}
.nr-slogan { opacity: .92; font-size: 13px; }
.nr-quick { margin-left: auto; display: flex; gap: 8px; }
.nr-quicklink {
    color: #fff; text-decoration: none; font-weight: 600; font-size: 13px;
    background: rgba(255,255,255,.15); padding: 7px 14px; border-radius: 999px;
}
.nr-quicklink:hover { background: rgba(255,255,255,.28); color: #fff; }

.nr-searchbar { margin-top: 16px; display: flex; background: #fff; border-radius: 999px; overflow: hidden; box-shadow: 0 10px 30px rgba(0,0,0,.15); }
.nr-searchbar input {
    flex: 1; border: 0; outline: 0; padding: 15px 20px; font-size: 15px; color: var(--nr-encre); background: transparent;
}
.nr-searchbar button {
    border: 0; background: var(--nr-accent); color: #fff; font-weight: 700; padding: 0 26px; font-size: 15px; cursor: pointer;
}
.nr-searchbar button:hover { background: var(--nr-accent-fonce); }

/* ------------------------------------------------------------------ sections */
.nr-section { margin: 30px 0; }
.nr-section-title { display: flex; align-items: baseline; gap: 10px; margin-bottom: 14px; }
.nr-section-title h2 { font-size: 21px; font-weight: 800; color: var(--nr-encre); margin: 0; }
.nr-section-title a { margin-left: auto; color: var(--nr-accent); text-decoration: none; font-weight: 700; font-size: 13px; }
.nr-sub { color: var(--nr-gris); font-size: 13px; }
.nr-empty { background: #fff; border: 1px dashed var(--nr-bord); border-radius: var(--nr-radius); padding: 28px; text-align: center; color: var(--nr-gris); }

/* ---------------------------------------------------------------------- hero */
.nr-hero {
    background: linear-gradient(115deg, #2A1712 0%, #5A2A18 55%, var(--nr-accent-fonce) 130%);
    color: #fff; border-radius: var(--nr-radius); padding: 34px 30px; position: relative; overflow: hidden;
}
.nr-hero h1 { font-size: 30px; font-weight: 900; margin: 0 0 8px; letter-spacing: -.3px; }
.nr-hero p { opacity: .9; margin: 0 0 16px; font-size: 15px; }
.nr-hero-stats { display: flex; gap: 22px; flex-wrap: wrap; margin-top: 8px; }
.nr-hero-stat b { font-size: 22px; display: block; font-weight: 900; }
.nr-hero-stat span { font-size: 12px; opacity: .85; }

/* ------------------------------------------------------------------- envies */
.nr-envies { display: flex; gap: 10px; overflow-x: auto; padding-bottom: 6px; }
.nr-envie {
    flex: 0 0 auto; background: #fff; border: 1px solid var(--nr-bord); border-radius: 999px;
    padding: 9px 16px; text-decoration: none; color: var(--nr-encre); font-weight: 600; font-size: 14px;
    display: inline-flex; align-items: center; gap: 8px; white-space: nowrap;
}
.nr-envie:hover { border-color: var(--nr-accent); color: var(--nr-accent); background: var(--nr-accent-clair); }
.nr-envie .nr-envie-ico { font-size: 17px; }
.nr-envie .nr-envie-n { color: var(--nr-gris); font-weight: 700; font-size: 12px; }

/* ------------------------------------------------------------ carte restaurant */
.nr-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(265px, 1fr)); gap: 20px; }
.nr-card {
    background: #fff; border-radius: var(--nr-radius); overflow: hidden; text-decoration: none; color: inherit;
    border: 1px solid var(--nr-bord); display: block;
    transition: transform .18s ease, box-shadow .18s ease;
}
.nr-card:hover { transform: translateY(-3px); box-shadow: 0 16px 34px rgba(20,20,30,.12); color: inherit; }
.nr-card-media { position: relative; aspect-ratio: 16 / 10; background: #f0f0f2; overflow: hidden; }
.nr-card-media img { width: 100%; height: 100%; object-fit: cover; display: block; }
.nr-card-badges { position: absolute; top: 10px; left: 10px; display: flex; gap: 6px; flex-wrap: wrap; }
.nr-badge {
    font-size: 11px; font-weight: 800; padding: 3px 9px; border-radius: 999px; color: #fff; letter-spacing: .2px;
}
.nr-badge-promo { background: var(--nr-accent); }
.nr-badge-new { background: #0EA5E9; }
.nr-badge-closed { background: #33333a; }
.nr-card-body { padding: 13px 15px 16px; }
.nr-card-name { font-weight: 800; font-size: 16px; color: var(--nr-encre); margin: 0 0 3px; display: flex; align-items: center; gap: 6px; }
.nr-card-cuisines { color: var(--nr-gris); font-size: 13px; margin-bottom: 9px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nr-meta { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; font-size: 12.5px; color: var(--nr-texte); }
.nr-star { color: var(--nr-etoile); font-weight: 800; }
.nr-star-bg { color: #d9d9de; font-weight: 800; }
.nr-meta .nr-dot { color: var(--nr-bord); }
.nr-meta .nr-frais { color: var(--nr-gris); }
.nr-meta .nr-open { color: var(--nr-vert); font-weight: 700; }
.nr-meta .nr-closed { color: var(--nr-rouge); font-weight: 700; }

/* ------------------------------------------------------------- restaurant (fiche) */
.nr-banner { position: relative; height: 320px; border-radius: var(--nr-radius); overflow: hidden; background: #2A1712; }
.nr-banner img { width: 100%; height: 100%; object-fit: cover; opacity: .85; }
.nr-banner-overlay {
    position: absolute; inset: 0; display: flex; flex-direction: column; justify-content: flex-end;
    padding: 26px 28px; color: #fff; background: linear-gradient(180deg, rgba(0,0,0,.05) 30%, rgba(0,0,0,.78) 100%);
}
.nr-banner h1 { font-size: 32px; font-weight: 900; margin: 0 0 6px; }
.nr-banner .nr-bc-cuisines { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 8px; }
.nr-chip { background: rgba(255,255,255,.16); border: 1px solid rgba(255,255,255,.3); padding: 4px 11px; border-radius: 999px; font-size: 12px; font-weight: 600; }
.nr-banner .nr-bc-meta { display: flex; gap: 16px; flex-wrap: wrap; font-size: 13.5px; }

.nr-resto-info { display: grid; grid-template-columns: 1fr 340px; gap: 26px; margin-top: 24px; }
@media (max-width: 900px) { .nr-resto-info { grid-template-columns: 1fr; } }
.nr-resto-main { min-width: 0; }

.nr-infos-bar { display: flex; gap: 22px; flex-wrap: wrap; background: #fff; border: 1px solid var(--nr-bord); border-radius: var(--nr-radius); padding: 16px 20px; margin-bottom: 20px; }
.nr-info { font-size: 13.5px; }
.nr-info b { display: block; color: var(--nr-encre); font-size: 15px; }

.nr-menu-tabs { position: sticky; top: 8px; z-index: 20; background: rgba(247,247,248,.96); backdrop-filter: blur(6px); display: flex; gap: 8px; overflow-x: auto; padding: 10px 0; border-bottom: 1px solid var(--nr-bord); margin-bottom: 12px; }
.nr-menu-tabs a { flex: 0 0 auto; text-decoration: none; color: var(--nr-texte); font-weight: 700; font-size: 13.5px; padding: 7px 14px; border-radius: 999px; border: 1px solid var(--nr-bord); background: #fff; }
.nr-menu-tabs a:hover, .nr-menu-tabs a.active { background: var(--nr-accent); border-color: var(--nr-accent); color: #fff; }

.nr-menu-section { margin-bottom: 26px; scroll-margin-top: 70px; }
.nr-menu-section > h3 { font-size: 19px; font-weight: 800; color: var(--nr-encre); margin: 0 0 12px; }

/* ligne de plat */
.nr-plat {
    display: flex; gap: 14px; background: #fff; border: 1px solid var(--nr-bord);
    border-radius: 14px; padding: 14px; margin-bottom: 12px; text-decoration: none; color: inherit;
    transition: border-color .15s ease, box-shadow .15s ease;
}
.nr-plat:hover { border-color: var(--nr-accent); box-shadow: 0 10px 24px rgba(20,20,30,.08); color: inherit; }
.nr-plat-body { flex: 1; min-width: 0; }
.nr-plat-name { font-weight: 700; font-size: 15.5px; color: var(--nr-encre); margin: 0 0 4px; }
.nr-plat-desc { color: var(--nr-gris); font-size: 13px; margin: 0 0 8px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.nr-plat-price { font-weight: 800; color: var(--nr-encre); font-size: 15px; }
.nr-plat-price s { color: var(--nr-gris); font-weight: 500; margin-left: 7px; font-size: 13px; }
.nr-plat-tags { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 8px; }
.nr-tag { font-size: 11px; font-weight: 700; padding: 3px 9px; border-radius: 999px; }
.nr-tag-opt { background: var(--nr-accent-clair); color: var(--nr-accent-fonce); }
.nr-tag-veg { background: #E7F7EE; color: var(--nr-vert); }
.nr-tag-nonveg { background: #FDECEA; color: var(--nr-rouge); }
.nr-plat-media { position: relative; width: 116px; height: 116px; flex: 0 0 auto; border-radius: 12px; overflow: hidden; background: #f0f0f2; }
.nr-plat-media img { width: 100%; height: 100%; object-fit: cover; }
.nr-plat-add {
    position: absolute; right: 7px; bottom: 7px; width: 34px; height: 34px; border-radius: 50%;
    background: #fff; border: 1px solid var(--nr-bord); color: var(--nr-accent); font-size: 20px; line-height: 1;
    display: flex; align-items: center; justify-content: center; cursor: pointer; font-weight: 700;
    box-shadow: 0 4px 12px rgba(0,0,0,.14);
}
.nr-plat-add:hover { background: var(--nr-accent); color: #fff; border-color: var(--nr-accent); }

/* carte OSM */
.nr-map { height: 210px; border-radius: 14px; overflow: hidden; margin-top: 10px; z-index: 1; }

/* --------------------------------------------------------------------- panier */
.nr-cols { display: grid; grid-template-columns: 1fr 360px; gap: 24px; align-items: start; }
@media (max-width: 900px) { .nr-cols { grid-template-columns: 1fr; } }
.nr-panel { background: #fff; border: 1px solid var(--nr-bord); border-radius: var(--nr-radius); padding: 20px; }
.nr-panel h4 { font-size: 17px; font-weight: 800; color: var(--nr-encre); margin: 0 0 14px; }
.nr-line { display: flex; gap: 12px; padding: 13px 0; border-bottom: 1px solid var(--nr-bord); }
.nr-line:last-child { border-bottom: 0; }
.nr-line img { width: 62px; height: 62px; border-radius: 10px; object-fit: cover; background: #f0f0f2; }
.nr-line-main { flex: 1; min-width: 0; }
.nr-line-name { font-weight: 700; color: var(--nr-encre); }
.nr-line-opt { color: var(--nr-gris); font-size: 12.5px; }
.nr-line-actions { display: flex; align-items: center; gap: 10px; margin-top: 6px; }
.nr-qty { display: inline-flex; align-items: center; border: 1px solid var(--nr-bord); border-radius: 999px; overflow: hidden; }
.nr-qty button { border: 0; background: #fff; width: 30px; height: 30px; font-size: 16px; cursor: pointer; color: var(--nr-accent); font-weight: 800; }
.nr-qty input { width: 34px; border: 0; text-align: center; font-weight: 700; color: var(--nr-encre); }
.nr-remove { background: none; border: 0; color: var(--nr-rouge); font-size: 12.5px; font-weight: 700; cursor: pointer; }
.nr-line-right { text-align: right; font-weight: 800; color: var(--nr-encre); white-space: nowrap; }

.nr-row { display: flex; justify-content: space-between; padding: 7px 0; font-size: 14px; }
.nr-row.total { border-top: 1px solid var(--nr-bord); margin-top: 8px; padding-top: 13px; font-size: 18px; font-weight: 900; color: var(--nr-encre); }
.nr-row .nr-disc { color: var(--nr-vert); font-weight: 700; }

.nr-modes { display: flex; gap: 10px; margin-bottom: 14px; }
.nr-mode { flex: 1; border: 2px solid var(--nr-bord); background: #fff; border-radius: 14px; padding: 13px; text-align: center; cursor: pointer; font-weight: 700; color: var(--nr-texte); font-size: 13.5px; }
.nr-mode.active { border-color: var(--nr-accent); background: var(--nr-accent-clair); color: var(--nr-accent-fonce); }

.nr-field { margin-bottom: 12px; }
.nr-field label { display: block; font-size: 12.5px; font-weight: 700; color: var(--nr-encre); margin-bottom: 4px; }
.nr-field input, .nr-field select, .nr-field textarea {
    width: 100%; border: 1px solid var(--nr-bord); border-radius: 11px; padding: 11px 13px; font-size: 14px; color: var(--nr-encre); background: #fff;
}
.nr-field input:focus, .nr-field select:focus, .nr-field textarea:focus { outline: 0; border-color: var(--nr-accent); }

.nr-primary {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    background: var(--nr-accent); color: #fff; border: 0; border-radius: 13px;
    padding: 14px 18px; font-weight: 800; font-size: 15px; cursor: pointer; text-decoration: none; width: 100%;
}
.nr-primary:hover { background: var(--nr-accent-fonce); color: #fff; }
.nr-primary[disabled], .nr-primary.disabled { opacity: .5; pointer-events: none; }
.nr-secondary { background: #fff; color: var(--nr-accent); border: 1.5px solid var(--nr-accent); border-radius: 13px; padding: 12px 18px; font-weight: 700; cursor: pointer; text-decoration: none; display: inline-flex; align-items: center; justify-content: center; gap: 8px; }
.nr-hint { color: var(--nr-gris); font-size: 12.5px; }
.nr-alert { background: var(--nr-accent-clair); border: 1px solid #FFD3C2; color: var(--nr-accent-fonce); border-radius: 13px; padding: 14px 16px; font-size: 13.5px; font-weight: 600; }
.nr-ok { background: #E7F7EE; border: 1px solid #BFE8D2; color: var(--nr-vert); border-radius: 13px; padding: 14px 16px; font-size: 13.5px; font-weight: 600; }

/* ----------------------------------------------------------- barre panier flottante */
.nr-cartbar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 60; background: var(--nr-encre); color: #fff; box-shadow: 0 -6px 22px rgba(0,0,0,.22); }
.nr-cartbar .nr-inner { display: flex; align-items: center; gap: 14px; max-width: 1180px; margin: 0 auto; padding: 12px 16px; }
.nr-cartbar .nr-count { font-weight: 700; }
.nr-cartbar .nr-total { margin-left: auto; font-weight: 900; font-size: 17px; }
.nr-cartbar .nr-cta { background: var(--nr-accent); color: #fff; border-radius: 11px; padding: 11px 20px; font-weight: 800; text-decoration: none; }
.nr-cartbar[data-flash="1"] { animation: nrflash .5s ease; }
@keyframes nrflash { 0% { background: var(--nr-accent); } 100% { background: var(--nr-encre); } }
.nr-cartbar.hidden { display: none; }

/* ---------------------------------------------------------- modale d'options */
.nr-modal-back { position: fixed; inset: 0; background: rgba(15,15,20,.55); z-index: 2000; display: flex; align-items: flex-end; justify-content: center; padding: 0; }
@media (min-width: 700px) { .nr-modal-back { align-items: center; padding: 20px; } }
.nr-modal { background: #fff; width: 100%; max-width: 560px; border-radius: 20px 20px 0 0; max-height: 92vh; overflow-y: auto; }
@media (min-width: 700px) { .nr-modal { border-radius: 20px; } }
.nr-modal-head { position: relative; }
.nr-modal-head img { width: 100%; height: 150px; object-fit: cover; display: block; border-radius: 20px 20px 0 0; }
.nr-modal-close { position: absolute; top: 12px; right: 12px; width: 36px; height: 36px; border-radius: 50%; border: 0; background: rgba(255,255,255,.92); font-size: 20px; cursor: pointer; }
.nr-modal-body { padding: 20px 22px 26px; }
.nr-opt { display: flex; align-items: center; justify-content: space-between; gap: 12px; border: 1px solid var(--nr-bord); border-radius: 12px; padding: 12px 14px; margin-bottom: 9px; cursor: pointer; }
.nr-opt.on { border-color: var(--nr-accent); background: var(--nr-accent-clair); }
.nr-opt label { display: flex; align-items: center; gap: 10px; cursor: pointer; font-weight: 600; color: var(--nr-encre); margin: 0; }
.nr-opt .nr-opt-price { color: var(--nr-gris); font-weight: 700; font-size: 13px; }

/* --------------------------------------------------------------------- suivi */
.nr-steps { display: flex; gap: 0; margin: 20px 0 8px; }
.nr-step { flex: 1; text-align: center; position: relative; }
.nr-step .nr-step-dot { width: 34px; height: 34px; border-radius: 50%; margin: 0 auto 8px; background: #fff; border: 2px solid var(--nr-bord); color: var(--nr-gris); display: flex; align-items: center; justify-content: center; font-weight: 800; }
.nr-step.attein .nr-step-dot { background: var(--nr-accent); border-color: var(--nr-accent); color: #fff; }
.nr-step.encours .nr-step-dot { box-shadow: 0 0 0 5px var(--nr-accent-clair); }
.nr-step .nr-step-lbl { font-size: 12px; font-weight: 700; color: var(--nr-gris); }
.nr-step.attein .nr-step-lbl { color: var(--nr-encre); }
.nr-step::after { content: ''; position: absolute; top: 17px; left: 50%; width: 100%; height: 2px; background: var(--nr-bord); z-index: -1; }
.nr-step:last-child::after { display: none; }
.nr-step.attein::after { background: var(--nr-accent); }
.nr-recap-line { display: flex; justify-content: space-between; padding: 6px 0; font-size: 13.5px; border-bottom: 1px dashed var(--nr-bord); }
.nr-code { font-size: 26px; letter-spacing: 7px; font-weight: 900; color: var(--nr-encre); }

/* ------------------------------------------------------------------ filtres */
.nr-filtres { display: flex; gap: 10px; flex-wrap: wrap; align-items: flex-end; background: #fff; border: 1px solid var(--nr-bord); border-radius: var(--nr-radius); padding: 16px 18px; }
.nr-filtres .nr-field { margin: 0; min-width: 150px; }
.nr-chips { display: flex; gap: 8px; flex-wrap: wrap; margin: 14px 0; }
.nr-chipsel { text-decoration: none; border: 1px solid var(--nr-bord); background: #fff; border-radius: 999px; padding: 7px 14px; font-size: 13px; font-weight: 600; color: var(--nr-texte); }
.nr-chipsel.active, .nr-chipsel:hover { background: var(--nr-accent); border-color: var(--nr-accent); color: #fff; }

/* ------------------------------------------------------------- frais/délai */
.nr-fee-note { font-size: 12px; color: var(--nr-gris); margin-top: 6px; }
