/* ==========================================================================
   MAISON VERLU v2 — « Le carnet de Camille »
   Le site est tenu comme le carnet de marché de la cheffe : daté du jour,
   annoté à la main, vivant au rythme du service.
   Projet démonstratif conçu par Genshi.
   ========================================================================== */

:root {
  --paper: #F2EBDA;
  --paper-2: #EAE0C8;
  --sheet: #FAF5E7;
  --ink: #2E2719;
  --soft: #6E6450;
  --terre: #A84A26;
  --terre-deep: #883A1C;
  --olive: #67703D;
  --olive-deep: #525A2F;
  --slate: #29231B;
  --chalk: #EFE7D2;
  --line: rgba(46, 39, 25, 0.16);
  --line-strong: rgba(46, 39, 25, 0.4);
  --shadow: 0 16px 40px -18px rgba(46, 39, 25, 0.4);
  --f-serif: "Instrument Serif", "Iowan Old Style", Georgia, serif;
  --f-sans: "Karla", "Helvetica Neue", Arial, sans-serif;
  --f-hand: "Caveat", "Segoe Script", cursive;
  --f-mono: ui-monospace, "SF Mono", Menlo, monospace;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--f-sans);
  background: var(--paper);
  color: var(--ink);
  font-size: 16.5px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

/* la marge du carnet — filet vertical terracotta, desktop uniquement */
@media (min-width: 1100px) {
  body::after {
    content: "";
    position: fixed;
    left: clamp(40px, 5vw, 88px);
    top: 0;
    bottom: 0;
    width: 1px;
    background: rgba(168, 74, 38, 0.28);
    pointer-events: none;
    z-index: 1;
  }
}

::selection { background: var(--terre); color: var(--sheet); }

img { max-width: 100%; display: block; }
a { color: inherit; }
:focus-visible { outline: 2px solid var(--terre); outline-offset: 3px; }

/* ---------- Typographie ---------- */

h1, h2, h3, .serif {
  font-family: var(--f-serif);
  font-weight: 400;
  line-height: 1.02;
  letter-spacing: 0.005em;
  text-wrap: balance;
}

h1 { font-size: clamp(2.7rem, 6.2vw, 4.8rem); }
h2 { font-size: clamp(2.1rem, 4.2vw, 3.2rem); }
h3 { font-size: 1.55rem; }

h1 em, h2 em, h3 em, .serif em { font-style: italic; color: var(--terre); }

p { text-wrap: pretty; }

.lead { font-size: 1.16rem; color: var(--soft); max-width: 36em; }

.k-label {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.24em;
  color: var(--soft);
}

.hand {
  font-family: var(--f-hand);
  font-weight: 500;
  font-size: 1.45rem;
  line-height: 1.25;
  color: var(--terre);
  letter-spacing: 0;
}

.hand--ink { color: var(--soft); }

/* ---------- Layout ---------- */

.wrap { width: min(1200px, 91vw); margin-inline: auto; }
@media (min-width: 1100px) {
  .wrap {
    --wrap-ml: max(calc((100vw - 1200px) / 2), calc(clamp(40px, 5vw, 88px) + 48px));
    margin-left: var(--wrap-ml);
    margin-right: auto;
    width: min(1200px, calc(100vw - var(--wrap-ml) - max(3vw, 24px)));
  }
}

.section { padding-block: clamp(60px, 8vw, 110px); }

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

/* numéro de page de carnet en bas de section */
.folio {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-top: clamp(40px, 6vw, 72px);
  color: var(--soft);
  font-size: 0.75rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
}
.folio::before, .folio::after { content: ""; height: 1px; background: var(--line); flex: 1; }

/* ---------- Bandeau du jour (top strip) ---------- */

.daybar {
  background: var(--slate);
  color: var(--chalk);
  font-size: 0.74rem;
  letter-spacing: 0.04em;
}

.daybar .wrap {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 2px 24px;
  padding-block: 7px;
}

.daybar .day-date { white-space: nowrap; }

.day-state { display: inline-flex; align-items: center; gap: 8px; }

.day-state .pulse {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--olive);
  box-shadow: 0 0 0 0 rgba(103, 112, 61, 0.5);
  animation: pulse 2.4s infinite;
}

.day-state.is-closed .pulse { background: #A4794B; animation: none; }

@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(103, 112, 61, 0.45); }
  70% { box-shadow: 0 0 0 7px rgba(103, 112, 61, 0); }
  100% { box-shadow: 0 0 0 0 rgba(103, 112, 61, 0); }
}

/* ---------- Header ---------- */

.hd {
  position: sticky;
  top: -1px; /* évite le filet de 1px au-dessus du header sticky */
  z-index: 60;
  background: color-mix(in srgb, var(--paper) 94%, transparent);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.3s, box-shadow 0.3s;
}

.hd.is-scrolled { border-bottom-color: var(--line); box-shadow: 0 12px 30px -24px rgba(46, 39, 25, 0.5); }

.hd .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding-block: 14px;
}

.brand { text-decoration: none; display: flex; flex-direction: column; line-height: 1; }
.brand .b-name { font-family: var(--f-serif); font-size: 1.7rem; }
.brand .b-name em { font-style: italic; }
.brand .b-sub { font-size: 0.62rem; font-weight: 700; letter-spacing: 0.3em; text-transform: uppercase; color: var(--soft); margin-top: 5px; }

.nav { display: flex; align-items: center; gap: 30px; }

.nav a:not(.btn) {
  text-decoration: none;
  font-size: 0.93rem;
  font-weight: 500;
  color: var(--soft);
  padding-block: 6px;
  position: relative;
  transition: color 0.2s;
}

.nav a:not(.btn)::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: 2px;
  height: 2px;
  background: var(--terre);
  border-radius: 2px;
  transform: scaleX(0) rotate(-1deg);
  transform-origin: left;
  transition: transform 0.25s ease;
}

.nav a:not(.btn):hover { color: var(--ink); }
.nav a:not(.btn):hover::after { transform: scaleX(1) rotate(-1deg); }
.nav a:not(.btn)[aria-current="page"] { color: var(--ink); }
.nav a:not(.btn)[aria-current="page"]::after { transform: scaleX(1) rotate(-1deg); }

.burger {
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
  width: 44px; height: 44px;
  background: none; border: none; cursor: pointer;
}
.burger span { width: 22px; height: 2px; background: var(--ink); transition: transform 0.3s, opacity 0.3s; }

/* ---------- Boutons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  font-family: var(--f-sans);
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  text-decoration: none;
  cursor: pointer;
  padding: 15px 26px;
  background: var(--ink);
  color: var(--sheet);
  border: 1.5px solid var(--ink);
  border-radius: 3px;
  transition: background 0.2s, color 0.2s, transform 0.2s, box-shadow 0.2s;
}

.btn:hover { background: var(--terre); border-color: var(--terre); transform: translateY(-1px); box-shadow: 0 12px 24px -14px rgba(136, 58, 28, 0.8); }

.btn--line { background: transparent; color: var(--ink); }
.btn--line:hover { background: var(--ink); border-color: var(--ink); color: var(--sheet); box-shadow: none; }

.btn--sm { padding: 10px 18px; font-size: 0.72rem; }

/* ---------- Photos « scotchées » ---------- */

.snap {
  --r: -1.6deg;
  background: #FFFDF6;
  padding: 10px 10px 12px;
  box-shadow: 0 14px 34px -16px rgba(46, 39, 25, 0.45);
  transform: rotate(var(--r));
  transition: transform 0.35s ease, box-shadow 0.35s ease;
  position: relative;
}

.snap:hover { transform: rotate(0deg) translateY(-4px); box-shadow: 0 22px 44px -18px rgba(46, 39, 25, 0.5); }

.snap::before {
  content: "";
  position: absolute;
  top: -12px;
  left: 50%;
  transform: translateX(-50%) rotate(-2deg);
  width: 86px;
  height: 24px;
  background: rgba(222, 207, 168, 0.6);
  border-left: 1px dashed rgba(46, 39, 25, 0.12);
  border-right: 1px dashed rgba(46, 39, 25, 0.12);
  z-index: 2;
}

.snap img { width: 100%; height: 100%; object-fit: cover; }

.snap figcaption {
  font-family: var(--f-hand);
  font-weight: 500;
  font-size: 1.25rem;
  color: var(--soft);
  text-align: center;
  padding-top: 9px;
}

.snap--r { --r: 1.8deg; }
.snap--flat { --r: 0deg; }

/* ---------- Tampon ---------- */

.stamp {
  display: inline-block;
  font-family: var(--f-sans);
  font-weight: 700;
  font-size: 0.68rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--terre);
  border: 2px solid var(--terre);
  border-radius: 5px;
  padding: 8px 14px;
  transform: rotate(-5deg);
  opacity: 0.82;
  line-height: 1.5;
  text-align: center;
  -webkit-mask-image: radial-gradient(circle at 30% 60%, #000 92%, transparent 100%);
          mask-image: radial-gradient(circle at 30% 60%, #000 92%, transparent 100%);
}

/* ---------- L'ardoise ---------- */

.ardoise {
  background:
    radial-gradient(ellipse at 25% 18%, rgba(239, 231, 210, 0.05), transparent 55%),
    radial-gradient(ellipse at 80% 90%, rgba(239, 231, 210, 0.04), transparent 50%),
    var(--slate);
  color: var(--chalk);
  border-radius: 6px;
  border: 1px solid rgba(239, 231, 210, 0.12);
  box-shadow: var(--shadow);
  padding: clamp(28px, 4vw, 48px);
  position: relative;
}

.ardoise .a-head {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.26em;
  text-transform: uppercase;
  color: rgba(239, 231, 210, 0.55);
  display: flex;
  align-items: center;
  gap: 14px;
}

.ardoise .a-head::after { content: ""; flex: 1; height: 1px; background: rgba(239, 231, 210, 0.18); }

.ardoise .a-plat {
  font-family: var(--f-hand);
  font-weight: 600;
  font-size: clamp(1.9rem, 3.6vw, 2.9rem);
  line-height: 1.15;
  margin-top: 18px;
  color: var(--chalk);
}

.ardoise .a-prix { font-family: var(--f-hand); font-weight: 600; font-size: 1.7rem; color: #D9B98A; white-space: nowrap; }

.ardoise .a-note { font-family: var(--f-hand); font-weight: 500; font-size: 1.3rem; color: rgba(239, 231, 210, 0.62); margin-top: 10px; }

.ardoise .a-row { display: flex; align-items: baseline; justify-content: space-between; gap: 20px; flex-wrap: wrap; }

/* ---------- La carte : document composé ---------- */

.sheet {
  background: var(--sheet);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  border-radius: 4px;
  padding: clamp(28px, 5vw, 64px);
  position: relative;
}

.menu-sec { margin-top: clamp(36px, 5vw, 56px); }
.menu-sec:first-of-type { margin-top: 0; }

.menu-sec > h2 {
  font-size: clamp(1.7rem, 3vw, 2.3rem);
  display: flex;
  align-items: baseline;
  gap: 18px;
}

.menu-sec > h2 .count { font-family: var(--f-hand); font-size: 1.2rem; color: var(--soft); }

.mi { padding-block: 19px; border-bottom: 1px solid var(--line); position: relative; }
.mi:last-child { border-bottom: none; }

.mi-line { display: flex; align-items: baseline; gap: 12px; }

.mi-name { font-family: var(--f-serif); font-size: 1.42rem; line-height: 1.15; }

.mi-dots { flex: 1; min-width: 30px; border-bottom: 2px dotted var(--line-strong); transform: translateY(-5px); }

.mi-price { font-family: var(--f-serif); font-size: 1.25rem; white-space: nowrap; }

.mi-desc { font-size: 0.92rem; color: var(--soft); margin-top: 5px; max-width: 52ch; }

.mi-prov {
  font-size: 0.69rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: color-mix(in srgb, var(--olive) 80%, var(--soft));
  margin-top: 8px;
}

.mi-badge {
  display: inline-block;
  font-size: 0.64rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  border: 1px solid var(--line-strong);
  color: var(--soft);
  border-radius: 100px;
  padding: 2px 9px;
  margin-left: 10px;
  transform: translateY(-3px);
}

.mi-badge--sig { border-color: var(--terre); color: var(--terre); }

/* plat barré à la main */
.mi--barre .mi-line, .mi--barre .mi-desc, .mi--barre .mi-prov { opacity: 0.42; }
.mi--barre .mi-name { position: relative; }
.mi--barre .mi-name::after {
  content: "";
  position: absolute;
  left: -2%; right: -4%;
  top: 54%;
  height: 2.5px;
  background: var(--terre);
  transform: rotate(-1.6deg);
  border-radius: 2px;
}

/* annotation manuscrite en marge (desktop) / inline (mobile) */
.mi-note {
  font-family: var(--f-hand);
  font-weight: 500;
  font-size: 1.28rem;
  line-height: 1.2;
  color: var(--terre);
  transform: rotate(-2deg);
}

@media (min-width: 1000px) {
  .sheet--notes { padding-left: 260px; }
  .mi-note {
    position: absolute;
    left: -228px;
    top: 50%;
    transform: translateY(-50%) rotate(-3deg);
    width: 190px;
    text-align: right;
  }
  .mi-note::after {
    content: "→";
    font-family: var(--f-sans);
    font-size: 0.85rem;
    margin-left: 6px;
    color: var(--soft);
  }
}

@media (max-width: 999px) {
  .mi-note { display: inline-block; margin-top: 8px; }
  .mi-note::before { content: "— "; }
}

/* post-it formule */
.postit {
  background: #F4E9BC;
  box-shadow: 0 12px 26px -12px rgba(46, 39, 25, 0.4);
  padding: 22px 24px;
  transform: rotate(1.6deg);
  font-family: var(--f-hand);
  font-weight: 500;
  font-size: 1.35rem;
  line-height: 1.35;
  color: #4A4128;
  max-width: 300px;
}

.postit strong { font-weight: 700; }

/* ---------- Formulaires ---------- */

.field { display: grid; gap: 7px; }

.field label {
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--soft);
}

.field input, .field select, .field textarea {
  font-family: var(--f-sans);
  font-size: 1rem;
  color: var(--ink);
  background: transparent;
  border: none;
  border-bottom: 1.5px solid var(--line-strong);
  border-radius: 0;
  padding: 10px 2px;
  transition: border-color 0.2s;
  width: 100%;
}

.field input:focus, .field select:focus, .field textarea:focus {
  outline: none;
  border-bottom-color: var(--terre);
}

.field.is-error input, .field.is-error select { border-bottom-color: var(--terre); }

/* ---------- Footer ---------- */

.ft { background: var(--slate); color: rgba(239, 231, 210, 0.82); padding-block: 60px 30px; }

.ft a { text-decoration: none; }
.ft a:hover { color: var(--chalk); text-decoration: underline; }

.ft-grid {
  display: grid;
  grid-template-columns: 1.3fr 1fr 1fr;
  gap: 40px;
  padding-bottom: 40px;
  border-bottom: 1px solid rgba(239, 231, 210, 0.16);
}

.ft h4 { font-size: 0.7rem; font-weight: 700; letter-spacing: 0.22em; text-transform: uppercase; color: rgba(239, 231, 210, 0.5); margin-bottom: 13px; }

.ft-brand { font-family: var(--f-serif); font-size: 1.8rem; color: var(--chalk); }

.ft ul { list-style: none; display: grid; gap: 7px; font-size: 0.93rem; }

.ft-hand { font-family: var(--f-hand); font-weight: 500; font-size: 1.35rem; color: rgba(239, 231, 210, 0.65); margin-top: 12px; transform: rotate(-1.5deg); display: inline-block; }

.ft-legal {
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: 10px 24px;
  padding-top: 22px; font-size: 0.78rem; color: rgba(239, 231, 210, 0.45);
}

/* ---------- Badge démo ---------- */

.g-demo-badge {
  position: fixed;
  left: 14px;
  bottom: 14px;
  z-index: 80;
  font-family: var(--f-mono);
  font-size: 0.64rem;
  letter-spacing: 0.04em;
  color: var(--soft);
  background: color-mix(in srgb, var(--sheet) 92%, transparent);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 6px 12px;
  backdrop-filter: blur(6px);
  pointer-events: none;
  max-width: 70vw;
}

/* ---------- Chatbot « Hugo » ---------- */

.hc-launcher {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 90;
  display: inline-flex;
  align-items: center;
  gap: 11px;
  border: 1.5px solid var(--ink);
  cursor: pointer;
  background: var(--sheet);
  color: var(--ink);
  font-family: var(--f-sans);
  font-size: 0.84rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  padding: 9px 18px 9px 9px;
  border-radius: 999px;
  box-shadow: 0 16px 36px -14px rgba(46, 39, 25, 0.55);
  transition: transform 0.2s, background 0.2s;
}

.hc-launcher:hover { transform: translateY(-2px); background: #fff; }

.hc-launcher img { width: 36px; height: 36px; border-radius: 50%; object-fit: cover; object-position: top; }

.hc-panel {
  position: fixed;
  right: 18px;
  bottom: 84px;
  z-index: 95;
  width: min(380px, calc(100vw - 28px));
  height: min(560px, calc(100vh - 116px));
  background: var(--sheet);
  border: 1px solid var(--line);
  border-radius: 10px;
  box-shadow: 0 30px 70px -25px rgba(46, 39, 25, 0.55);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  opacity: 0;
  transform: translateY(14px) scale(0.98);
  pointer-events: none;
  transition: opacity 0.25s, transform 0.25s;
}

.hc-panel.is-open { opacity: 1; transform: none; pointer-events: auto; }

.hc-head { display: flex; align-items: center; gap: 12px; padding: 14px 16px; background: var(--slate); color: var(--chalk); }
.hc-head img { width: 40px; height: 40px; border-radius: 50%; object-fit: cover; object-position: top; }
.hc-head .t { font-family: var(--f-serif); font-size: 1.2rem; line-height: 1.1; }
.hc-head .s { font-size: 0.72rem; color: rgba(239, 231, 210, 0.6); }
.hc-close { margin-left: auto; background: none; border: none; color: rgba(239, 231, 210, 0.7); font-size: 1.4rem; line-height: 1; cursor: pointer; padding: 6px; }
.hc-close:hover { color: var(--chalk); }

.hc-body { flex: 1; overflow-y: auto; padding: 18px 16px; display: flex; flex-direction: column; gap: 10px; }

.hc-msg { max-width: 84%; padding: 11px 15px; border-radius: 3px; font-size: 0.93rem; line-height: 1.5; animation: hc-pop 0.3s ease both; }
.hc-msg--bot { align-self: flex-start; background: var(--paper-2); border-left: 2px solid var(--terre); }
.hc-msg--user { align-self: flex-end; background: var(--ink); color: var(--sheet); }

@keyframes hc-pop { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

.hc-typing { align-self: flex-start; display: inline-flex; gap: 5px; padding: 14px 16px; background: var(--paper-2); border-radius: 3px; border-left: 2px solid var(--terre); }
.hc-typing i { width: 6px; height: 6px; border-radius: 50%; background: var(--soft); animation: hc-blink 1.1s infinite; }
.hc-typing i:nth-child(2) { animation-delay: 0.15s; }
.hc-typing i:nth-child(3) { animation-delay: 0.3s; }
@keyframes hc-blink { 0%, 60%, 100% { opacity: 0.25; } 30% { opacity: 1; } }

.hc-choices { display: flex; flex-wrap: wrap; gap: 8px; animation: hc-pop 0.3s ease both; }

.hc-form { display: flex; gap: 8px; animation: hc-pop 0.3s ease both; }
.hc-form input {
  flex: 1;
  font-family: var(--f-sans);
  font-size: 0.93rem;
  color: var(--ink);
  background: #fff;
  border: 1.5px solid var(--ink);
  border-radius: 3px;
  padding: 9px 12px;
}
.hc-form input:focus { outline: none; border-color: var(--terre); }
.hc-form button {
  font-family: var(--f-sans); font-size: 0.85rem; font-weight: 700;
  color: var(--sheet); background: var(--ink);
  border: 1.5px solid var(--ink); border-radius: 3px;
  padding: 9px 15px; cursor: pointer;
  transition: background 0.15s, border-color 0.15s;
}
.hc-form button:hover { background: var(--terre); border-color: var(--terre); }
.hc-choice {
  font-family: var(--f-sans); font-size: 0.85rem; font-weight: 700;
  color: var(--ink); background: transparent;
  border: 1.5px solid var(--ink); border-radius: 3px;
  padding: 9px 15px; cursor: pointer;
  transition: background 0.15s, color 0.15s;
}
.hc-choice:hover { background: var(--ink); color: var(--sheet); }

.hc-confirm { align-self: stretch; background: #fff; border: 1px solid var(--line); border-radius: 4px; padding: 18px; animation: hc-pop 0.3s ease both; text-align: center; }
.hc-confirm .stamp { margin-bottom: 12px; }
.hc-confirm strong { font-family: var(--f-serif); font-size: 1.3rem; font-weight: 400; display: block; }
.hc-confirm ul { list-style: none; display: grid; gap: 4px; font-size: 0.87rem; color: var(--soft); margin-top: 10px; }
.hc-restart { background: none; border: none; font-family: var(--f-sans); font-size: 0.8rem; color: var(--soft); text-decoration: underline; cursor: pointer; padding: 6px; align-self: center; }

/* ---------- Révélation ---------- */

@media (prefers-reduced-motion: no-preference) {
  .rv { opacity: 0; transform: translateY(20px); transition: opacity 0.7s ease, transform 0.7s ease; }
  .rv.is-in { opacity: 1; transform: none; }
}

/* ---------- Responsive ---------- */

@media (max-width: 880px) {
  .nav {
    position: fixed;
    inset: 0;
    z-index: 70;
    flex-direction: column;
    justify-content: center;
    gap: 7vh;
    background: var(--paper);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s;
  }
  .nav a:not(.btn) { font-family: var(--f-serif); font-size: 2.1rem; color: var(--ink); }
  .nav.is-open { opacity: 1; pointer-events: auto; }
  .burger { display: flex; position: relative; z-index: 75; }
  .burger.is-open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
  .burger.is-open span:nth-child(2) { opacity: 0; }
  .burger.is-open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
  .ft-grid { grid-template-columns: 1fr; gap: 30px; }
  .g-demo-badge { display: none; }
}
