/* ===== Cook de Babi — thème orange / noir / crème ===== */
@layer reset, base, layout, components, utilities;

:root {
  --orange: #d96a05;
  --orange-dark: #b35200;
  --orange-soft: color-mix(in oklab, var(--orange) 14%, white);
  --green: #3e8e41;
  --black: #141210;
  --ink: #2a2622;
  --cream: #fff9f1;
  --grey: #e9e6e2;
  --radius: 18px;
  --shadow: 0 10px 30px -12px rgb(0 0 0 / .25);
  --font-script: "Kaushan Script", cursive;
  --font-body: "Poppins", system-ui, sans-serif;
  --header-h: 72px;
  color-scheme: light;
}

@layer reset {
  *, *::before, *::after { box-sizing: border-box; }
  * { margin: 0; }
  html { scroll-behavior: smooth; scroll-padding-top: var(--header-h); -webkit-text-size-adjust: 100%; }
  img, iframe { display: block; max-width: 100%; }
  button, input, select, textarea { font: inherit; color: inherit; }
  button { cursor: pointer; }
  ul { padding: 0; list-style: none; }
}

@layer base {
  body {
    font-family: var(--font-body);
    color: var(--ink);
    background: var(--cream);
    line-height: 1.65;
  }
  h1, h2, h3 { line-height: 1.15; text-wrap: balance; }
  h2 { font-size: clamp(1.9rem, 4vw, 2.8rem); font-weight: 700; margin-block: .3rem 1rem; }
  h3 { font-size: 1.15rem; }
  p { text-wrap: pretty; }
  a { color: var(--orange); text-underline-offset: 3px; }
  :focus-visible { outline: 3px solid var(--orange); outline-offset: 3px; border-radius: 6px; }
}

@layer layout {
  .container { width: min(1140px, 100% - 2.5rem); margin-inline: auto; }
  .narrow-container { width: min(760px, 100% - 2.5rem); }
  .section { padding-block: clamp(3.5rem, 8vw, 6.5rem); }
  .section-tint { background: var(--orange-soft); }
  .section-dark { background: var(--black); color: #f3ede6; }
  .section-dark a { color: #ffb066; }
  .section-head { text-align: center; max-width: 640px; margin: 0 auto 2.5rem; }
  .split { display: grid; gap: 3rem; align-items: center; }
  @media (min-width: 860px) { .split { grid-template-columns: 1.1fr .9fr; } }
  .center { text-align: center; margin-top: 2.5rem; }
}

@layer components {
  /* Header */
  .site-header {
    position: fixed; inset: 0 0 auto 0; z-index: 50; height: var(--header-h);
    display: flex; align-items: center; justify-content: space-between;
    padding-inline: clamp(1rem, 4vw, 3rem);
    background: rgb(255 249 241 / .88); backdrop-filter: blur(14px);
    border-bottom: 1px solid rgb(0 0 0 / .06);
  }
  .brand { display: flex; align-items: center; gap: .7rem; text-decoration: none; color: var(--black); }
  .brand img { border-radius: 50%; }
  .brand-name { font-family: var(--font-script); font-size: 1.7rem; }
  .brand-name em { color: var(--orange); font-style: normal; }
  nav { display: flex; align-items: center; gap: 1.2rem; }
  nav a:not(.btn) { color: var(--ink); text-decoration: none; font-weight: 500; font-size: .95rem; position: relative; }
  nav a:not(.btn)::after { content: ""; position: absolute; left: 0; bottom: -4px; height: 2px; width: 0; background: var(--orange); transition: width .25s; }
  nav a:not(.btn):hover::after, nav a.active::after { width: 100%; }
  .burger { display: none; background: none; border: 0; width: 44px; height: 44px; padding: 10px; }
  .burger span { display: block; height: 3px; background: var(--black); border-radius: 3px; margin-block: 5px; transition: .3s; }
  @media (max-width: 1120px) {
    .burger { display: block; }
    nav {
      position: fixed; inset: var(--header-h) 0 auto 0; flex-direction: column; align-items: stretch;
      padding: 1.2rem 1.5rem 2rem; gap: 1rem; background: var(--cream); box-shadow: var(--shadow);
      transform: translateY(-120%); transition: transform .35s ease; visibility: hidden;
    }
    nav.open { transform: none; visibility: visible; }
    nav a { padding-block: .3rem; font-size: 1.05rem; }
    .burger[aria-expanded="true"] span:nth-child(1) { transform: translateY(8px) rotate(45deg); }
    .burger[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
    .burger[aria-expanded="true"] span:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }
  }

  /* Boutons */
  .btn {
    display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
    padding: .85rem 1.7rem; border-radius: 999px; border: 2px solid var(--orange);
    background: var(--orange); color: #fff; font-weight: 600; text-decoration: none;
    transition: transform .2s, background .2s, box-shadow .2s;
    box-shadow: 0 8px 20px -8px color-mix(in oklab, var(--orange) 70%, black);
  }
  .btn:hover { background: var(--orange-dark); border-color: var(--orange-dark); transform: translateY(-2px); }
  .cta-row { display: flex; flex-wrap: wrap; justify-content: center; gap: .9rem; }
  .btn-wa { background: #1faa59; border-color: #1faa59; box-shadow: 0 8px 20px -8px #0e6b35; }
  .btn-wa:hover { background: #168a47; border-color: #168a47; }
  .btn-small { padding: .55rem 1.1rem; font-size: .9rem; text-align: center; }
  .btn-ghost { background: transparent; color: #fff; border-color: #fff; box-shadow: none; }
  .btn-ghost:hover { background: #fff; color: var(--black); border-color: #fff; }

  /* Typo */
  .eyebrow { text-transform: uppercase; letter-spacing: .18em; font-size: .8rem; font-weight: 700; color: var(--orange); }
  .script { font-family: var(--font-script); }
  .badge { display: inline-block; padding: .4rem 1rem; border-radius: 999px; background: rgb(255 255 255 / .16); border: 1px solid rgb(255 255 255 / .35); backdrop-filter: blur(6px); font-size: .85rem; }

  /* Hero */
  .hero { position: relative; min-height: 100svh; display: grid; align-items: center; color: #fff; overflow: hidden; background: var(--black); }
  .hero-carousel, .hero-carousel .slides, .hero-overlay { position: absolute; inset: 0; }
  .hero-carousel .slide { position: absolute; inset: 0; opacity: 0; transition: opacity 1.2s ease; background: linear-gradient(135deg, var(--orange-dark), #4a2200 70%); }
  .hero-carousel .slide.active { opacity: 1; }
  .hero-carousel .slide img { width: 100%; height: 100%; object-fit: cover; transform: scale(1.06); transition: transform 7s ease-out; }
  .hero-carousel .slide.active img { transform: scale(1); }
  .hero-overlay { background: linear-gradient(90deg, rgb(10 8 6 / .85), rgb(10 8 6 / .35) 60%, rgb(10 8 6 / .15)); }
  .hero-content { position: relative; z-index: 2; width: min(1140px, 100% - 2.5rem); margin: calc(var(--header-h) + 2rem) auto 4rem; display: grid; gap: 2rem; align-items: center; }
  .hero-text { display: grid; gap: 1.3rem; justify-items: start; }
  .hero-logo { width: min(100%, 420px); aspect-ratio: 1; justify-self: end; border-radius: 50%; filter: drop-shadow(0 24px 40px rgb(0 0 0 / .5)); animation: float 6s ease-in-out infinite; }
  @keyframes float { 50% { translate: 0 -12px; } }
  @media (min-width: 860px) { .hero-content { grid-template-columns: 1.15fr .85fr; } }
  @media (max-width: 859px) { .hero-logo { order: -1; justify-self: center; width: min(52vw, 220px); } }
  .hero h1 { font-size: clamp(2.6rem, 8vw, 5.4rem); font-weight: 700; }
  .hero h1 span { font-family: var(--font-script); font-weight: 400; color: #ffa347; }
  .hero .lead { max-width: 34rem; font-size: clamp(1.05rem, 2.2vw, 1.3rem); opacity: .92; }
  .cta { display: flex; flex-wrap: wrap; gap: .9rem; margin-top: .6rem; }
  .scroll-hint { position: absolute; z-index: 2; bottom: 1.5rem; left: 50%; translate: -50% 0; color: #fff; text-decoration: none; font-size: 1.6rem; animation: bob 1.8s infinite; }
  @keyframes bob { 50% { translate: -50% 8px; } }

  /* Présentation */
  .presentation-logo { justify-self: end; width: min(100%, 440px); aspect-ratio: 1; display: grid; place-items: center; }
  .presentation-logo img { width: 100%; height: auto; border-radius: 50%; filter: drop-shadow(0 18px 30px rgb(0 0 0 / .22)); }
  .presentation-logo [hidden] { display: none; }
  .logo-fallback {
    width: 100%; aspect-ratio: 1; border-radius: 50%; background: #fff; text-align: center;
    display: grid; place-content: center; justify-items: center; gap: .1rem;
    border: 10px solid transparent; outline: 4px solid var(--orange); outline-offset: -22px;
    box-shadow: var(--shadow), inset 0 0 0 6px color-mix(in oklab, var(--orange) 25%, white);
  }
  .lf-hat { font-size: 2.2rem; }
  .lf-cook { font-family: var(--font-script); font-size: clamp(3rem, 9vw, 4.6rem); line-height: .9; color: var(--black); }
  .lf-babi { font-family: var(--font-script); font-size: clamp(2.4rem, 7vw, 3.6rem); line-height: 1; color: var(--orange); }
  .lf-tag { margin-top: .6rem; font-size: .72rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--black); }
  .lf-pot { font-size: 2rem; margin-top: .3rem; }
  @media (max-width: 859px) { .presentation-logo { justify-self: center; width: min(80%, 340px); } }
  .split p + p { margin-top: 1rem; }
  .ticks { margin-top: 1.4rem; display: grid; gap: .5rem; }
  .ticks li::before { content: "✔"; color: var(--green); margin-right: .6rem; font-weight: 700; }

  /* Cartes de valeurs */
  .values { display: grid; gap: 1.3rem; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
  .value { background: #fff; padding: 1.8rem 1.5rem; border-radius: var(--radius); box-shadow: var(--shadow); text-align: center; transition: transform .25s; }
  .value:hover { transform: translateY(-6px); }
  .value .ico { font-size: 2.2rem; display: block; margin-bottom: .6rem; }
  .value p { font-size: .95rem; color: #5a534b; margin-top: .4rem; }

  /* Carte */
  .tabs { display: flex; flex-wrap: wrap; justify-content: center; gap: .6rem; margin-bottom: 2rem; }
  .tabs button { padding: .6rem 1.3rem; border-radius: 999px; border: 2px solid var(--orange); background: transparent; color: var(--orange-dark); font-weight: 600; transition: .2s; }
  .tabs button[aria-selected="true"] { background: var(--orange); color: #fff; }
  .menu-grid { display: grid; gap: 1.1rem; grid-template-columns: repeat(auto-fill, minmax(min(100%, 320px), 1fr)); }
  .menu-grid.narrow { grid-template-columns: repeat(auto-fill, minmax(min(100%, 260px), 1fr)); }
  .dish { background: #fff; border-radius: var(--radius); padding: 1.2rem 1.4rem; border-left: 6px solid var(--orange); box-shadow: var(--shadow); }
  .dish header { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; }
  .dish h3 { text-transform: uppercase; letter-spacing: .03em; }
  .tabpanel .dish { display: flex; flex-direction: column; }
  .dish-photo { margin-top: auto; padding-top: 1rem; width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: calc(var(--radius) - 6px); box-sizing: content-box; }
  .price { font-weight: 700; font-size: 1.25rem; color: var(--orange); white-space: nowrap; }
  .meta { margin-top: .5rem; font-size: .88rem; color: var(--green); font-weight: 500; }
  .dish.highlight { background: var(--orange); color: #fff; border-left-color: var(--black); }
  .dish.highlight .price, .dish.highlight .meta { color: #fff; }
  .tabpanel[hidden] { display: none; }
  .tabpanel { animation: fade .4s ease; }
  @keyframes fade { from { opacity: 0; translate: 0 10px; } }

  /* Galerie / carousel */
  .gallery { position: relative; }
  .track { display: flex; gap: 1rem; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; padding-block: .5rem; border-radius: var(--radius); }
  .track::-webkit-scrollbar { display: none; }
  .card { flex: 0 0 min(78%, 340px); scroll-snap-align: center; position: relative; aspect-ratio: 4/5; border-radius: var(--radius); overflow: hidden; border: 0; padding: 0; background: linear-gradient(135deg, var(--orange), #5a2a00); box-shadow: var(--shadow); text-align: left; }
  .card img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s; }
  .card:hover img { transform: scale(1.08); }
  .card figcaption, .card .cap { position: absolute; inset: auto 0 0 0; padding: 2.5rem 1rem 1rem; color: #fff; font-weight: 600; background: linear-gradient(transparent, rgb(0 0 0 / .8)); }
  .nav { position: absolute; top: 50%; translate: 0 -50%; z-index: 3; width: 48px; height: 48px; border-radius: 50%; border: 0; background: var(--orange); color: #fff; font-size: 1.8rem; line-height: 1; box-shadow: var(--shadow); transition: .2s; }
  .nav:hover { background: #fff; color: var(--orange); }
  .nav.prev { left: -8px; } .nav.next { right: -8px; }
  .dots { display: flex; justify-content: center; gap: .5rem; margin-top: 1.4rem; flex-wrap: wrap; }
  .dots button { width: 10px; height: 10px; border-radius: 50%; border: 0; padding: 0; background: rgb(255 255 255 / .35); transition: .25s; }
  .dots button[aria-current="true"] { width: 28px; border-radius: 6px; background: var(--orange); }

  /* Lightbox */
  dialog#lightbox { border: 0; border-radius: var(--radius); padding: 0; max-width: min(92vw, 820px); background: var(--black); color: #fff; overflow: hidden; }
  dialog#lightbox::backdrop { background: rgb(0 0 0 / .8); backdrop-filter: blur(4px); }
  dialog#lightbox img { width: 100%; max-height: 78vh; object-fit: contain; }
  dialog#lightbox p { padding: .9rem 1.2rem; font-weight: 600; }
  dialog#lightbox .close { position: absolute; top: .6rem; right: .6rem; width: 40px; height: 40px; border-radius: 50%; border: 0; background: var(--orange); color: #fff; font-size: 1.5rem; }

  /* Formulaire */
  .form { background: #fff; padding: clamp(1.4rem, 4vw, 2.4rem); border-radius: var(--radius); box-shadow: var(--shadow); display: grid; gap: 1.1rem; }
  .row { display: grid; gap: 1.1rem; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); }
  .form label { display: grid; gap: .35rem; font-weight: 600; font-size: .9rem; }
  .form input:not([type=checkbox]), .form select, .form textarea { padding: .75rem 1rem; border-radius: 12px; border: 1.5px solid var(--grey); background: var(--cream); font-weight: 400; transition: border-color .2s, box-shadow .2s; }
  .form input:focus, .form select:focus, .form textarea:focus { outline: none; border-color: var(--orange); box-shadow: 0 0 0 4px color-mix(in oklab, var(--orange) 22%, transparent); }
  .form input:user-invalid { border-color: #c0392b; }
  fieldset { border: 1.5px solid var(--grey); border-radius: 12px; padding: 1rem; }
  legend { font-weight: 600; font-size: .9rem; padding-inline: .4rem; }
  .checks { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: .5rem; }
  .checks label { display: flex; align-items: center; gap: .5rem; font-weight: 400; }
  .checks input { accent-color: var(--orange); width: 18px; height: 18px; }
  .form-error { color: #c0392b; font-weight: 500; }
  .form-status { padding: .9rem 1.1rem; border-radius: 12px; font-weight: 500; font-size: .95rem; }
  .form-status[hidden] { display: none; }
  .form-status.info { background: var(--orange-soft); }
  .form-status.ok { background: #e6f4e7; color: #20602a; }
  .form-status.error { background: #fdeaea; color: #8e2a1f; }
  .form-status a { font-weight: 700; }

  /* Menu sur mesure */
  .builder { display: grid; gap: 1.8rem; margin-bottom: 2rem; align-items: start; }
  @media (min-width: 960px) { .builder { grid-template-columns: 1.35fr 1fr; } .basket { position: sticky; top: calc(var(--header-h) + 1rem); } }
  .search input { width: 100%; padding: .85rem 1.2rem; border-radius: 999px; border: 2px solid var(--grey); background: #fff; font-size: 1rem; transition: border-color .2s, box-shadow .2s; }
  .search input:focus { outline: none; border-color: var(--orange); box-shadow: 0 0 0 4px color-mix(in oklab, var(--orange) 22%, transparent); }
  .cat { margin-top: 1.6rem; }
  .cat h3 { font-size: 1rem; text-transform: uppercase; letter-spacing: .08em; color: var(--orange-dark); margin-bottom: .7rem; }
  .chips { display: flex; flex-wrap: wrap; gap: .5rem; }
  .chip { position: relative; padding: .5rem 1rem; border-radius: 999px; border: 1.5px solid color-mix(in oklab, var(--orange) 45%, white); background: #fff; color: var(--ink); font-size: .92rem; font-weight: 500; cursor: grab; user-select: none; -webkit-user-select: none; transition: transform .15s, background .15s, border-color .15s, box-shadow .15s; touch-action: manipulation; }
  .chip:hover { border-color: var(--orange); transform: translateY(-2px); box-shadow: 0 6px 14px -8px rgb(0 0 0 / .35); }
  .chip:active { cursor: grabbing; }
  .chip.dragging { opacity: .45; }
  .chip[data-qty] { background: var(--orange); border-color: var(--orange); color: #fff; }
  .chip[data-qty]::after { content: " ×" attr(data-qty); font-weight: 700; }
  .chip[hidden], .cat[hidden] { display: none; }
  .no-result { margin-top: 1.5rem; color: #5a534b; }

  .basket { background: #fff; border-radius: var(--radius); box-shadow: var(--shadow); padding: 1.3rem; display: grid; gap: 1rem; max-height: calc(100svh - var(--header-h) - 2rem); overflow: auto; }
  .basket h3 { display: flex; justify-content: space-between; align-items: center; gap: 1rem; font-size: 1.25rem; }
  .count { font-size: .8rem; font-weight: 600; background: var(--orange-soft); color: var(--orange-dark); padding: .2rem .8rem; border-radius: 999px; }
  .dropzone { min-height: 150px; border: 2.5px dashed color-mix(in oklab, var(--orange) 50%, white); border-radius: 14px; padding: .8rem; display: grid; align-content: start; transition: background .2s, border-color .2s; }
  .dropzone.over { background: var(--orange-soft); border-color: var(--orange); }
  .dropzone .empty { text-align: center; color: #7a7167; padding-block: 2rem; }
  .dropzone .empty small { opacity: .8; }
  .dropzone ul { display: grid; gap: .5rem; }
  .dropzone li { display: flex; align-items: center; gap: .6rem; padding: .55rem .75rem; border-radius: 12px; background: var(--cream); border-left: 4px solid var(--orange); }
  .dropzone li.added { animation: pop .35s ease; }
  @keyframes pop { 0% { scale: .92; opacity: .4; } 60% { scale: 1.03; } }
  .dropzone .name { flex: 1; font-weight: 500; overflow-wrap: anywhere; }
  .dropzone .tag { font-size: .7rem; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; background: var(--green); color: #fff; padding: .1rem .5rem; border-radius: 999px; margin-left: .4rem; vertical-align: middle; }
  .qty { display: inline-flex; align-items: center; gap: .15rem; }
  .qty button, .rm { width: 30px; height: 30px; border-radius: 50%; border: 1.5px solid var(--grey); background: #fff; line-height: 1; font-size: 1.1rem; transition: .15s; }
  .qty button:hover, .rm:hover { border-color: var(--orange); color: var(--orange); }
  .qty output { min-width: 1.6rem; text-align: center; font-weight: 700; }
  .rm { border: 0; background: transparent; color: #8e2a1f; font-size: 1.3rem; }
  .custom-add label { display: block; font-weight: 600; font-size: .9rem; margin-bottom: .4rem; }
  .custom-row { display: flex; gap: .5rem; }
  .custom-row input { flex: 1; min-width: 0; padding: .7rem 1rem; border-radius: 999px; border: 1.5px solid var(--grey); background: var(--cream); }
  .custom-row input:focus { outline: none; border-color: var(--orange); box-shadow: 0 0 0 4px color-mix(in oklab, var(--orange) 22%, transparent); }
  .link-btn { justify-self: start; background: none; border: 0; padding: 0; color: #8e2a1f; font-size: .85rem; text-decoration: underline; text-underline-offset: 3px; }
  .link-btn[hidden] { display: none; }
  .form h3 { font-size: 1.3rem; }
  .form-note { font-size: .85rem; color: #5a534b; }
  #menuContact { margin-inline: auto; }
  .menu-fab { position: fixed; left: 1rem; bottom: 1rem; z-index: 40; padding: .75rem 1.2rem; border-radius: 999px; border: 0; background: var(--black); color: #fff; font-weight: 600; box-shadow: var(--shadow); }
  .menu-fab span { background: var(--orange); border-radius: 999px; padding: .05rem .55rem; margin-left: .3rem; }
  .menu-fab[hidden] { display: none; }
  @media (min-width: 960px) { .menu-fab { display: none !important; } }

  /* FAQ */
  .faq { display: grid; gap: .8rem; }
  details { background: #fff; border-radius: 14px; box-shadow: var(--shadow); padding: 1rem 1.3rem; }
  summary { cursor: pointer; font-weight: 600; list-style: none; display: flex; justify-content: space-between; gap: 1rem; }
  summary::after { content: "+"; color: var(--orange); font-size: 1.5rem; line-height: 1; transition: rotate .25s; }
  details[open] summary::after { rotate: 45deg; }
  details p { margin-top: .8rem; color: #5a534b; }

  /* Contact */
  .contact-list { display: grid; gap: 1.3rem; margin-top: 1.5rem; }
  .contact-list li { display: flex; gap: 1rem; align-items: flex-start; }
  .contact-list li > span { font-size: 1.5rem; }
  .map { border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); aspect-ratio: 4/3; }
  .map iframe { width: 100%; height: 100%; border: 0; }

  /* Footer */
  .site-footer { background: #0b0907; color: #bdb4a9; text-align: center; padding: 2.5rem 1rem 5rem; display: grid; gap: .3rem; }
  .site-footer .script { color: var(--orange); font-size: 2rem; }
  .small { font-size: .8rem; opacity: .7; }

  /* Bouton appel flottant (mobile) */
  .fab { position: fixed; right: 1rem; bottom: 1rem; z-index: 40; width: 56px; height: 56px; display: none; place-items: center; border-radius: 50%; background: var(--orange); color: #fff; text-decoration: none; font-size: 1.5rem; box-shadow: var(--shadow); }
  @media (max-width: 700px) { .fab { display: grid; } .nav.prev { left: 4px; } .nav.next { right: 4px; } }
}

@layer utilities {
  .sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
  .reveal { opacity: 0; translate: 0 28px; transition: opacity .7s ease, translate .7s ease; }
  .reveal.visible { opacity: 1; translate: 0 0; }
  @media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    *, *::before, *::after { animation: none !important; transition-duration: .01ms !important; }
    .reveal { opacity: 1; translate: none; }
  }
}
