/* ==========================================================================
   Chez Ribwich — système de design (v2)
   Palette : noir chocolat, crème, or. Typo : Fraunces (titres), Manrope (texte),
   IBM Plex Mono (prix, repères). Mobile d'abord, animations sobres.
   ========================================================================== */

:root {
    --ink: #17120f;
    --ink-2: #4c423a;
    --ink-3: #7d7066;
    --dark: #120f0d;
    --dark-2: #1c1714;
    --dark-3: #2a231e;
    --cream: #f6efe4;
    --cream-2: #efe6d7;
    --paper: #fffaf2;
    --white: #ffffff;
    --gold: #c9a227;
    --gold-2: #e2bb45;
    --gold-deep: #9b7a1c;
    --gold-soft: rgba(201, 162, 39, .14);
    --line: rgba(23, 18, 15, .12);
    --line-strong: rgba(23, 18, 15, .22);
    --ok: #2f6b3a;
    --danger: #a63a2a;
    --on-dark: #f6efe4;
    --on-dark-2: rgba(246, 239, 228, .68);

    --display: "Fraunces", Georgia, "Times New Roman", serif;
    --sans: "Manrope", system-ui, -apple-system, "Segoe UI", sans-serif;
    --mono: "IBM Plex Mono", ui-monospace, Consolas, monospace;

    --r-sm: 10px; --r-md: 16px; --r-lg: 24px; --r-xl: 32px;
    --shadow-sm: 0 1px 2px rgba(23, 18, 15, .06), 0 4px 12px -8px rgba(23, 18, 15, .18);
    --shadow-md: 0 18px 40px -22px rgba(23, 18, 15, .45);
    --shadow-lg: 0 30px 70px -30px rgba(23, 18, 15, .55);
    --gutter: clamp(1rem, 4.5vw, 2.5rem);
    --wrap: 72rem;
    --topbar-h: 72px;
    --ease: cubic-bezier(.2, .7, .2, 1);
    --safe-t: env(safe-area-inset-top, 0px);
    --safe-b: env(safe-area-inset-bottom, 0px);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: calc(var(--topbar-h) + 12px); }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
    margin: 0; min-height: 100dvh; display: flex; flex-direction: column;
    font-family: var(--sans); font-size: 1.0625rem; line-height: 1.6; color: var(--ink);
    background: var(--cream); -webkit-font-smoothing: antialiased; overflow-x: clip;
}
img, svg { display: block; max-width: 100%; }
a { color: inherit; }
button { font: inherit; color: inherit; }
:focus-visible { outline: 3px solid var(--gold); outline-offset: 3px; border-radius: 4px; }
.main { flex: 1; }
.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding-left: var(--gutter); padding-right: var(--gutter); }
.wrap--narrow { max-width: 46rem; }
.visually-hidden, .skip:not(:focus) { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.skip:focus { position: fixed; top: 12px; left: 12px; z-index: 1000; padding: .6rem 1rem; background: var(--gold); color: var(--ink); border-radius: 999px; font-weight: 700; }
.ic { width: 1.1em; height: 1.1em; flex: none; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

/* ---------- Typographie ---------- */
.display, h1, h2, h3 { font-family: var(--display); font-weight: 600; letter-spacing: -.02em; line-height: 1.05; margin: 0; }
h1 { font-size: clamp(2.5rem, 7vw, 4.6rem); }
h2 { font-size: clamp(1.9rem, 4.2vw, 3rem); }
h3 { font-size: clamp(1.25rem, 2.2vw, 1.6rem); }
em.it, .it { font-style: italic; font-weight: 500; color: var(--gold-deep); }
.eyebrow {
    display: inline-flex; align-items: center; gap: .6rem; margin: 0 0 .9rem;
    font-family: var(--mono); font-size: .7rem; font-weight: 600; letter-spacing: .22em; text-transform: uppercase; color: var(--gold-deep);
}
.eyebrow::before { content: ""; width: 1.6rem; height: 1.5px; background: currentColor; }
.lead { font-size: clamp(1.05rem, 1.4vw, 1.25rem); color: var(--ink-2); max-width: 54ch; margin: 1rem 0 0; }
.muted { color: var(--ink-3); }
.mono { font-family: var(--mono); font-variant-numeric: tabular-nums; }
.price { font-family: var(--mono); font-weight: 600; font-variant-numeric: tabular-nums; white-space: nowrap; }
.section { padding: clamp(3.5rem, 8vw, 6.5rem) 0; }
.section--tight { padding: clamp(2.2rem, 5vw, 4rem) 0; }
.section__head { max-width: 42rem; margin-bottom: clamp(1.8rem, 4vw, 3rem); }
.section__head--center { margin-left: auto; margin-right: auto; text-align: center; }
.section__head--center .eyebrow { justify-content: center; }
.section__head--center .lead { margin-left: auto; margin-right: auto; }

/* ---------- Boutons ---------- */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: .55rem;
    min-height: 3rem; padding: .65rem 1.4rem; border-radius: 999px; border: 1.5px solid transparent;
    font-weight: 700; font-size: .95rem; letter-spacing: .01em; text-decoration: none; cursor: pointer;
    transition: transform .25s var(--ease), box-shadow .25s var(--ease), background .25s, color .25s, border-color .25s;
    will-change: transform;
}
.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(0) scale(.985); }
.btn--gold { background: linear-gradient(135deg, var(--gold-2), var(--gold)); color: var(--ink); box-shadow: 0 10px 24px -12px rgba(201, 162, 39, .9); }
.btn--gold:hover { box-shadow: 0 16px 30px -12px rgba(201, 162, 39, 1); }
.btn--dark { background: var(--dark); color: var(--on-dark); }
.btn--dark:hover { background: var(--dark-3); }
.btn--light { background: var(--white); color: var(--ink); box-shadow: var(--shadow-sm); }
.btn--ghost { border-color: var(--line-strong); color: var(--ink); background: transparent; }
.btn--ghost:hover { border-color: var(--ink); }
.btn--ghost-light { border-color: rgba(246, 239, 228, .35); color: var(--on-dark); background: transparent; }
.btn--ghost-light:hover { border-color: var(--on-dark); background: rgba(246, 239, 228, .06); }
.btn--lg { min-height: 3.4rem; padding: .8rem 1.8rem; font-size: 1.02rem; }
.btn--sm { min-height: 2.5rem; padding: .4rem 1rem; font-size: .85rem; }
.btn .ic { width: 1.05em; height: 1.05em; }

/* ---------- Marque ---------- */
.brand { display: inline-flex; align-items: baseline; gap: .35rem; text-decoration: none; line-height: 1; }
.brand__chez { font-family: var(--display); font-style: italic; font-weight: 400; font-size: 1.05rem; color: var(--gold); }
.brand__name { font-family: var(--display); font-weight: 700; font-size: 1.55rem; letter-spacing: -.03em; }
.brand--lg .brand__chez { font-size: 1.4rem; }
.brand--lg .brand__name { font-size: 2.3rem; }

/* ---------- En-tête & navigation ---------- */
.topbar {
    position: sticky; top: 0; z-index: 100; color: var(--on-dark);
    border-bottom: 1px solid rgba(246, 239, 228, .08);
    transition: transform .4s var(--ease), box-shadow .3s;
}
/* Le flou est porté par un pseudo-élément : un backdrop-filter sur l'en-tête lui-même
   ferait de lui le bloc conteneur du tiroir de navigation (position: fixed) sur mobile. */
.topbar::before {
    content: ""; position: absolute; inset: 0; z-index: -1;
    background: rgba(18, 15, 13, .82);
    backdrop-filter: blur(16px) saturate(140%); -webkit-backdrop-filter: blur(16px) saturate(140%);
    transition: background .3s;
}
.topbar.is-scrolled::before { background: rgba(18, 15, 13, .94); }
.topbar.is-scrolled { box-shadow: 0 10px 30px -20px rgba(0, 0, 0, .8); }
.topbar.is-hidden { transform: translateY(-100%); }
.topbar__inner { display: flex; align-items: center; justify-content: space-between; gap: 1rem; min-height: var(--topbar-h); padding-top: var(--safe-t); }
.nav { display: flex; align-items: center; gap: .25rem; }
.nav__link {
    position: relative; padding: .55rem .8rem; border-radius: 999px; text-decoration: none; font-weight: 600; font-size: .92rem; color: var(--on-dark-2);
    transition: color .25s, background .25s;
}
.nav__link::after { content: ""; position: absolute; left: .8rem; right: .8rem; bottom: .3rem; height: 2px; border-radius: 2px; background: var(--gold); transform: scaleX(0); transform-origin: left; transition: transform .3s var(--ease); }
.nav__link:hover { color: var(--on-dark); }
.nav__link:hover::after, .nav__link.is-active::after { transform: scaleX(1); }
.nav__link.is-active { color: var(--on-dark); }
.nav__cta { margin-left: .6rem; min-height: 2.6rem; padding: .4rem 1rem; font-size: .88rem; }
.burger { display: none; width: 46px; height: 46px; padding: 0; border: 0; background: transparent; border-radius: 12px; position: relative; cursor: pointer; }
.burger span { position: absolute; left: 12px; right: 12px; height: 2px; background: var(--on-dark); border-radius: 2px; transition: transform .35s var(--ease), opacity .25s, top .35s var(--ease); }
.burger span:nth-child(1) { top: 15px; } .burger span:nth-child(2) { top: 22px; } .burger span:nth-child(3) { top: 29px; }
.burger.is-open span:nth-child(1) { top: 22px; transform: rotate(45deg); }
.burger.is-open span:nth-child(2) { opacity: 0; }
.burger.is-open span:nth-child(3) { top: 22px; transform: rotate(-45deg); }
.nav-scrim { position: fixed; inset: 0; z-index: 90; background: rgba(18, 15, 13, .55); backdrop-filter: blur(3px); animation: fade .3s var(--ease); }
@media (max-width: 899px) {
    .burger { display: block; }
    .nav {
        position: fixed; top: 0; right: 0; bottom: 0; z-index: 95; width: min(22rem, 86vw);
        flex-direction: column; align-items: stretch; gap: .15rem;
        padding: calc(var(--topbar-h) + var(--safe-t) + .5rem) 1.2rem calc(1.5rem + var(--safe-b));
        background: var(--dark); border-left: 1px solid rgba(246, 239, 228, .08);
        transform: translateX(104%); transition: transform .45s var(--ease); visibility: hidden;
        box-shadow: var(--shadow-lg);
    }
    .nav.is-open { transform: none; visibility: visible; }
    .nav__link { font-size: 1.15rem; padding: .85rem 1rem; border-radius: 12px; opacity: 0; transform: translateX(14px); transition: opacity .4s var(--ease), transform .45s var(--ease), background .25s; }
    .nav.is-open .nav__link { opacity: 1; transform: none; }
    .nav.is-open .nav__link:nth-child(1) { transition-delay: .08s; } .nav.is-open .nav__link:nth-child(2) { transition-delay: .13s; }
    .nav.is-open .nav__link:nth-child(3) { transition-delay: .18s; } .nav.is-open .nav__link:nth-child(4) { transition-delay: .23s; }
    .nav.is-open .nav__link:nth-child(5) { transition-delay: .28s; }
    .nav__link::after { display: none; }
    .nav__link.is-active { background: rgba(246, 239, 228, .07); color: var(--gold-2); }
    .nav__cta { margin: 1rem 0 0; min-height: 3.1rem; font-size: 1rem; }
    .topbar { z-index: 100; }
    .topbar__inner { position: relative; z-index: 2; }
    .nav-open body, html.nav-open { overflow: hidden; }
}

/* ---------- Surfaces ---------- */
.card { background: var(--white); border-radius: var(--r-lg); padding: clamp(1.3rem, 3vw, 2rem); box-shadow: var(--shadow-sm); border: 1px solid var(--line); transition: transform .35s var(--ease), box-shadow .35s var(--ease), border-color .3s; }
.card--hover:hover { transform: translateY(-5px); box-shadow: var(--shadow-md); border-color: rgba(201, 162, 39, .45); }
.card--dark { background: var(--dark-2); color: var(--on-dark); border-color: rgba(246, 239, 228, .08); }
.chip { display: inline-flex; align-items: center; gap: .4rem; padding: .35rem .8rem; border-radius: 999px; background: var(--white); border: 1px solid var(--line); font-size: .82rem; font-weight: 600; }
.chip--gold { background: var(--gold-soft); border-color: rgba(201, 162, 39, .4); color: var(--gold-deep); }
.chip--dark { background: rgba(246, 239, 228, .08); border-color: rgba(246, 239, 228, .14); color: var(--on-dark); }
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--gold); box-shadow: 0 0 0 4px var(--gold-soft); }
.dot--live { animation: pulse 1.8s ease-in-out infinite; }

/* ---------- Bandeau sombre (héros des pages) ---------- */
.hero-band { position: relative; overflow: hidden; background: var(--dark); color: var(--on-dark); isolation: isolate; }
.hero-band::before {
    content: ""; position: absolute; inset: -20%; z-index: -1; pointer-events: none;
    background:
        radial-gradient(40% 50% at var(--mx, 70%) var(--my, 30%), rgba(201, 162, 39, .22), transparent 60%),
        radial-gradient(60% 60% at 10% 100%, rgba(201, 162, 39, .10), transparent 60%);
    transition: background-position .3s;
}
.hero-band::after {
    content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none; opacity: .5; mix-blend-mode: overlay;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.35'/%3E%3C/svg%3E");
}
.hero-band .eyebrow { color: var(--gold-2); }
.hero-band .lead { color: var(--on-dark-2); }
.hero-band__inner { padding: clamp(3rem, 8vw, 6rem) 0 clamp(2.5rem, 6vw, 4.5rem); }
.gold-rule { width: 64px; height: 2px; margin: 1.2rem 0; background: linear-gradient(90deg, var(--gold), transparent); }

/* ---------- Apparitions ---------- */
[data-reveal] { opacity: 0; transform: translateY(22px); transition: opacity .7s var(--ease), transform .8s var(--ease); transition-delay: calc(var(--i, 0) * 90ms); }
[data-reveal].is-in { opacity: 1; transform: none; }
[data-reveal="left"] { transform: translateX(-28px); }
[data-reveal="scale"] { transform: scale(.94); }
html:not(.js) [data-reveal] { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
    [data-reveal] { opacity: 1; transform: none; transition: none; }
    .btn, .card, .nav__link, .topbar { transition: none; }
    .dot--live { animation: none; }
}
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes pulse { 0%, 100% { box-shadow: 0 0 0 4px var(--gold-soft); } 50% { box-shadow: 0 0 0 9px rgba(201, 162, 39, .05); } }
@keyframes float { 0%, 100% { transform: translateY(0) rotate(-2deg); } 50% { transform: translateY(-10px) rotate(-1deg); } }
@keyframes shimmer { 0% { background-position: 200% 0; } 100% { background-position: -200% 0; } }

/* ---------- Pied de page ---------- */
.footer { background: var(--dark); color: var(--on-dark-2); margin-top: auto; }
.footer__grid { display: grid; gap: 2rem; padding-top: clamp(3rem, 6vw, 4.5rem); padding-bottom: 2.5rem; grid-template-columns: 1fr; }
@media (min-width: 700px) { .footer__grid { grid-template-columns: 1.4fr 1fr 1fr 1.2fr; } }
.footer__brand .brand { color: var(--on-dark); }
.footer__tag { margin: .9rem 0 .3rem; font-size: .9rem; }
.footer__halal { margin: 0; font-family: var(--mono); font-size: .68rem; letter-spacing: .2em; text-transform: uppercase; color: var(--gold); }
.footer__h { margin: 0 0 .7rem; font-family: var(--mono); font-size: .66rem; letter-spacing: .22em; text-transform: uppercase; color: var(--gold); }
.footer__col { display: grid; gap: .35rem; align-content: start; font-size: .95rem; }
.footer__col a { color: var(--on-dark-2); text-decoration: none; transition: color .2s; width: fit-content; }
.footer__col a:hover { color: var(--on-dark); }
.footer__col p { margin: 0; }
.footer__phone { font-family: var(--mono); font-weight: 600; color: var(--on-dark) !important; font-size: 1.05rem; margin-top: .3rem; }
.footer__bottom { padding: 1.2rem var(--gutter) calc(1.4rem + var(--safe-b)); border-top: 1px solid rgba(246, 239, 228, .08); font-size: .82rem; display: flex; flex-wrap: wrap; gap: .5rem 1.5rem; justify-content: space-between; }
.footer__bottom p { margin: 0; }

/* ---------- Formulaires ---------- */
.input { width: 100%; min-height: 3.1rem; padding: .7rem 1.1rem; border-radius: 999px; border: 1.5px solid var(--line-strong); background: var(--white); font: inherit; color: var(--ink); transition: border-color .2s, box-shadow .2s; }
.input:focus { outline: none; border-color: var(--gold); box-shadow: 0 0 0 4px var(--gold-soft); }
.input::placeholder { color: var(--ink-3); }

/* ---------- Listes de prix (partagées carte / allergènes) ---------- */
.rows { list-style: none; margin: 0; padding: 0; }
.row { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: baseline; gap: .5rem 1rem; padding: .75rem .4rem; border-top: 1px solid var(--line); transition: background .25s, padding .25s var(--ease); border-radius: 10px; }
.row:first-child { border-top: 0; }
.row:hover { background: var(--white); padding-left: .8rem; }
.row__name { font-weight: 600; }
.row__sub { display: block; font-size: .85rem; color: var(--ink-3); font-weight: 400; }
.row .price { color: var(--ink); }
.tags { display: flex; flex-wrap: wrap; gap: .4rem; list-style: none; margin: 0; padding: 0; }
.tags li { padding: .25rem .7rem; border-radius: 999px; background: var(--gold-soft); color: var(--gold-deep); font-size: .8rem; font-weight: 700; }
