/* ============================================================
   La Table de Léon — démo chatbot restaurant
   Palette : crème / vert bouteille / doré
   ============================================================ */

:root {
  --cream: #faf6ef;
  --cream-dark: #f1ead9;
  --green: #1e3b2f;
  --green-light: #2c5443;
  --gold: #c19a49;
  --gold-light: #d9b96e;
  --ink: #24211c;
  --ink-soft: #5c564c;
  --white: #ffffff;
  --radius: 14px;
  --shadow: 0 10px 40px rgba(30, 59, 47, .18);
  --font-serif: "Playfair Display", Georgia, serif;
  --font-sans: "Inter", -apple-system, "Segoe UI", sans-serif;
}

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

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-sans);
  color: var(--ink);
  background: var(--cream);
  line-height: 1.6;
}

.container { max-width: 1060px; margin: 0 auto; padding: 0 24px; }

h1, h2, h3 { font-family: var(--font-serif); color: var(--green); }

/* ===== En-tête ===== */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(250, 246, 239, .92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--cream-dark);
}
.header-inner {
  display: flex; align-items: center; justify-content: space-between;
  height: 64px;
}
.brand { display: flex; align-items: center; gap: 10px; }
.brand-mark {
  width: 34px; height: 34px; border-radius: 50%;
  background: var(--green); color: var(--gold-light);
  font-family: var(--font-serif); font-size: 20px; font-weight: 700;
  display: grid; place-items: center;
}
.brand-name { font-family: var(--font-serif); font-weight: 700; font-size: 19px; color: var(--green); }
.site-nav { display: flex; align-items: center; gap: 22px; }
.site-nav a {
  color: var(--ink-soft); text-decoration: none; font-size: 14.5px; font-weight: 500;
}
.site-nav a:hover { color: var(--green); }

/* ===== Boutons ===== */
.btn {
  display: inline-block; border: none; cursor: pointer;
  font-family: var(--font-sans); font-weight: 600; font-size: 15px;
  padding: 13px 26px; border-radius: 999px;
  text-decoration: none; transition: transform .15s, box-shadow .15s, background .15s;
}
.btn-small { padding: 9px 18px; font-size: 13.5px; }
.btn-primary {
  background: var(--green); color: var(--cream);
  box-shadow: 0 4px 14px rgba(30, 59, 47, .25);
}
.btn-primary:hover { background: var(--green-light); transform: translateY(-1px); }
.btn-ghost {
  background: transparent; color: var(--green);
  border: 1.5px solid var(--green);
}
.btn-ghost:hover { background: var(--green); color: var(--cream); }

/* ===== Héro ===== */
.hero {
  background:
    radial-gradient(1000px 500px at 80% -10%, rgba(193, 154, 73, .16), transparent 60%),
    linear-gradient(180deg, var(--cream) 0%, var(--cream-dark) 100%);
  padding: 90px 0 100px;
  text-align: center;
}
.hero-kicker, .section-kicker {
  text-transform: uppercase; letter-spacing: .18em; font-size: 12.5px;
  font-weight: 600; color: var(--gold);
  margin-bottom: 14px;
}
.hero h1 {
  font-size: clamp(38px, 6vw, 62px);
  line-height: 1.12;
  margin-bottom: 20px;
}
.hero-sub {
  max-width: 560px; margin: 0 auto 34px;
  color: var(--ink-soft); font-size: 17px;
}
.hero-actions { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }

/* ===== Sections ===== */
.section { padding: 80px 0; }
.section-alt { background: var(--white); }
.section h2 { font-size: clamp(28px, 4vw, 38px); margin-bottom: 34px; }

/* Menu */
.menu-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 40px;
}
.menu-col h3 {
  font-size: 21px; margin-bottom: 16px;
  padding-bottom: 8px; border-bottom: 2px solid var(--gold-light);
  display: inline-block;
}
.menu-list { list-style: none; }
.menu-list li {
  display: flex; justify-content: space-between; gap: 12px;
  padding: 9px 0; border-bottom: 1px dashed var(--cream-dark);
  font-size: 15px;
}
.menu-list em { color: var(--ink-soft); font-size: 13px; }
.price { color: var(--green); font-weight: 600; white-space: nowrap; }
.menu-note {
  margin-top: 22px; padding: 14px 16px;
  background: var(--cream); border-left: 3px solid var(--gold);
  border-radius: 0 8px 8px 0; font-size: 14px; color: var(--ink-soft);
}
.menu-note strong { color: var(--green); }

/* Horaires + contact */
.two-cols {
  display: grid; grid-template-columns: 1fr 1fr; gap: 60px;
}
.hours-table { border-collapse: collapse; width: 100%; font-size: 15.5px; }
.hours-table td { padding: 11px 0; border-bottom: 1px dashed var(--cream-dark); }
.hours-table td:first-child { font-weight: 600; color: var(--green); }
.hours-table td:last-child { text-align: right; color: var(--ink-soft); }
.closed { color: #b0483c !important; font-weight: 600; }
.contact-line { padding: 7px 0; color: var(--ink-soft); font-size: 15.5px; }

/* Pied de page */
.site-footer {
  background: var(--green); color: rgba(250, 246, 239, .75);
  padding: 28px 0; font-size: 13.5px; text-align: center;
}

/* ============================================================
   Widget chatbot
   ============================================================ */

/* Bouton flottant */
.chat-fab {
  position: fixed; bottom: 24px; right: 24px; z-index: 100;
  width: 60px; height: 60px; border-radius: 50%;
  background: var(--green); color: var(--gold-light);
  border: none; cursor: pointer;
  display: grid; place-items: center;
  box-shadow: 0 6px 24px rgba(30, 59, 47, .4);
  transition: transform .2s, background .2s;
  animation: fab-pulse 2.6s ease-in-out infinite;
}
.chat-fab:hover { transform: scale(1.08); background: var(--green-light); }
.chat-fab .chat-fab-close { display: none; font-size: 22px; }
.chat-fab.open { animation: none; }
.chat-fab.open svg { display: none; }
.chat-fab.open .chat-fab-close { display: block; }

@keyframes fab-pulse {
  0%, 100% { box-shadow: 0 6px 24px rgba(30, 59, 47, .4), 0 0 0 0 rgba(30, 59, 47, .3); }
  50%      { box-shadow: 0 6px 24px rgba(30, 59, 47, .4), 0 0 0 12px rgba(30, 59, 47, 0); }
}

/* Bulle d'accroche */
.chat-teaser {
  position: fixed; bottom: 98px; right: 24px; z-index: 99;
  max-width: 260px;
  background: var(--white); color: var(--ink);
  padding: 13px 16px; border-radius: 14px 14px 2px 14px;
  font-size: 14px; box-shadow: var(--shadow);
  cursor: pointer;
  animation: teaser-in .4s ease-out;
}
@keyframes teaser-in {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* Panneau */
.chat-panel {
  position: fixed; bottom: 98px; right: 24px; z-index: 100;
  width: 380px; max-width: calc(100vw - 32px);
  height: 560px; max-height: calc(100vh - 130px);
  background: var(--white); border-radius: var(--radius);
  box-shadow: var(--shadow);
  display: flex; flex-direction: column;
  overflow: hidden;
  animation: panel-in .28s cubic-bezier(.2, .9, .3, 1.1);
}
@keyframes panel-in {
  from { opacity: 0; transform: translateY(16px) scale(.97); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

.chat-header {
  display: flex; align-items: center; gap: 12px;
  background: var(--green); color: var(--cream);
  padding: 14px 18px;
}
.chat-avatar {
  width: 40px; height: 40px; border-radius: 50%;
  background: var(--gold); color: var(--green);
  font-family: var(--font-serif); font-size: 22px; font-weight: 700;
  display: grid; place-items: center; flex-shrink: 0;
}
.chat-title { font-weight: 600; font-size: 15.5px; }
.chat-status { font-size: 12px; opacity: .85; display: flex; align-items: center; gap: 6px; }
.status-dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: #6fd08c; display: inline-block;
}

.chat-messages {
  flex: 1; overflow-y: auto;
  padding: 18px 16px;
  display: flex; flex-direction: column; gap: 10px;
  background: var(--cream);
}

.msg {
  max-width: 84%; padding: 11px 14px;
  font-size: 14.3px; line-height: 1.5;
  white-space: pre-line;
  animation: msg-in .25s ease-out;
}
@keyframes msg-in {
  from { opacity: 0; transform: translateY(6px); }
  to   { opacity: 1; transform: translateY(0); }
}
.msg-bot {
  align-self: flex-start;
  background: var(--white); color: var(--ink);
  border-radius: 4px 14px 14px 14px;
  box-shadow: 0 2px 8px rgba(30, 59, 47, .07);
}
.msg-user {
  align-self: flex-end;
  background: var(--green); color: var(--cream);
  border-radius: 14px 4px 14px 14px;
}
.msg strong { color: var(--green); }
.msg-user strong { color: var(--gold-light); }

/* Indicateur de frappe */
.typing {
  align-self: flex-start;
  background: var(--white);
  border-radius: 4px 14px 14px 14px;
  padding: 14px 16px;
  display: flex; gap: 5px;
  box-shadow: 0 2px 8px rgba(30, 59, 47, .07);
}
.typing span {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--gold);
  animation: typing-bounce 1.1s infinite;
}
.typing span:nth-child(2) { animation-delay: .15s; }
.typing span:nth-child(3) { animation-delay: .3s; }
@keyframes typing-bounce {
  0%, 60%, 100% { transform: translateY(0); opacity: .5; }
  30%           { transform: translateY(-5px); opacity: 1; }
}

/* Suggestions (chips) */
.chips {
  display: flex; flex-wrap: wrap; gap: 8px;
  align-self: flex-start;
  animation: msg-in .25s ease-out;
}
.chip {
  background: var(--white); color: var(--green);
  border: 1.5px solid var(--green);
  border-radius: 999px;
  padding: 7px 14px; font-size: 13px; font-weight: 600;
  cursor: pointer; font-family: var(--font-sans);
  transition: background .15s, color .15s;
}
.chip:hover { background: var(--green); color: var(--cream); }

/* Zone de saisie */
.chat-input-row {
  display: flex; align-items: center; gap: 8px;
  padding: 12px 14px;
  background: var(--white);
  border-top: 1px solid var(--cream-dark);
}
.chat-input-row input {
  flex: 1; border: 1.5px solid var(--cream-dark);
  border-radius: 999px;
  padding: 11px 16px; font-size: 14.3px;
  font-family: var(--font-sans);
  outline: none; background: var(--cream);
  transition: border-color .15s;
}
.chat-input-row input:focus { border-color: var(--gold); }
.chat-input-row button {
  width: 42px; height: 42px; border-radius: 50%;
  border: none; cursor: pointer;
  background: var(--green); color: var(--cream);
  display: grid; place-items: center;
  transition: background .15s;
  flex-shrink: 0;
}
.chat-input-row button:hover { background: var(--green-light); }

.chat-footer {
  text-align: center; font-size: 11px; color: var(--ink-soft);
  padding: 6px 0 9px; background: var(--white);
}

/* ===== Responsive ===== */
@media (max-width: 820px) {
  .menu-grid { grid-template-columns: 1fr; gap: 32px; }
  .two-cols { grid-template-columns: 1fr; gap: 40px; }
  .site-nav a { display: none; }
  .hero { padding: 60px 0 70px; }
  .section { padding: 56px 0; }
}
@media (max-width: 480px) {
  .chat-panel {
    right: 8px; bottom: 86px;
    width: calc(100vw - 16px);
    height: calc(100vh - 110px);
  }
  .chat-fab { right: 16px; bottom: 16px; }
  .chat-teaser { right: 16px; bottom: 90px; }
}
