/* ---------- Le Petit Bistro — thème clair vert/crème (by Velyssia) ---------- */

:root {
  --bg:        #e9f3ec;        /* vert très pâle */
  --bg-card:   #ffffff;
  --cream:     #f7f1e3;        /* crème du téléphone */
  --border:    #d9e6dc;
  --fg:        #1c2420;
  --fg-muted:  #51635a;
  --fg-faint:  #8aa093;
  --green:     #1e7a46;        /* vert principal */
  --green-dark:#14572f;
  --green-bg:  #d9ecdf;
  --pink:      #e0357c;
  --pink-bg:   #fbdde9;
  --orange:    #e8a13c;
  --orange-bg: #fdeed3;
  --red:       #e25555;
  --radius-pill: 999px;
  --radius-card: 18px;
}

* { box-sizing: border-box; }

html, body {
  margin: 0; padding: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: 'Inter', ui-sans-serif, system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--fg); text-decoration: none; }
a:hover { color: var(--green); }

code, .mono { font-family: 'JetBrains Mono', ui-monospace, monospace; font-size: 0.92em; }
code.accent {
  color: var(--green-dark);
  background: var(--green-bg);
  padding: 2px 8px; border-radius: 4px;
  font-weight: 500;
}

/* ---------- top bar ---------- */
.topbar {
  display: flex; align-items: center; justify-content: space-between;
  padding: 18px 40px;
  position: sticky; top: 0; z-index: 10;
  background: rgba(255,255,255,0.92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}
.topbar-left { display: flex; align-items: center; gap: 36px; }
.brand { display: inline-flex; align-items: center; gap: 12px; }
.brand-mark {
  display: inline-flex; align-items: center; justify-content: center;
  width: 42px; height: 42px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: #fff;
  color: var(--green-dark);
  font-weight: 800; font-size: 13px; letter-spacing: 0.02em;
  box-shadow: 0 2px 6px rgba(20,87,47,0.08);
}
.brand-name { font-size: 17px; font-weight: 700; letter-spacing: -0.01em; }
.topnav { display: flex; gap: 28px; }
.topnav a {
  color: var(--fg-muted); font-size: 12px; letter-spacing: 0.14em;
  font-weight: 600; padding: 4px 0;
  transition: color 0.15s;
}
.topnav a.active, .topnav a:hover { color: var(--fg); }
.byline {
  font-size: 13px; font-weight: 600; color: var(--fg-muted);
  letter-spacing: 0.02em;
}
.byline:hover { color: var(--green); }

/* ---------- layout ---------- */
.app-main { max-width: 1180px; margin: 0 auto; padding: 64px 40px 90px; }

.hero {
  display: grid;
  grid-template-columns: 380px 1fr;
  gap: 72px;
  align-items: center;
  margin-bottom: 56px;
}
@media (max-width: 900px) {
  .hero { grid-template-columns: 1fr; gap: 40px; }
  .phone-col { display: flex; justify-content: center; }
}

/* ---------- phone mockup ---------- */
.phone {
  width: 340px;
  background: var(--cream);
  border-radius: 44px;
  padding: 26px 24px 34px;
  box-shadow: 0 24px 60px -18px rgba(28,36,32,0.25), inset 0 0 0 6px #fff;
  display: flex; flex-direction: column; align-items: center;
  gap: 18px;
}
.phone-notch {
  width: 130px; height: 30px;
  background: #15181b; border-radius: 999px;
  margin-bottom: 6px;
}
.phone-title { font-size: 20px; font-weight: 700; }
.phone-sub {
  font-family: 'JetBrains Mono', monospace;
  font-size: 13px; letter-spacing: 0.08em;
  color: var(--green);
}
.wave {
  display: flex; align-items: center; gap: 5px;
  height: 78px; margin: 8px 0;
}
.wave span {
  width: 6px; border-radius: 3px;
  background: var(--green);
  animation: wave 1.2s ease-in-out infinite;
  animation-play-state: paused;
}
.wave span:nth-child(1)  { height: 38%; animation-delay: 0s; }
.wave span:nth-child(2)  { height: 70%; animation-delay: .1s; }
.wave span:nth-child(3)  { height: 52%; animation-delay: .2s; }
.wave span:nth-child(4)  { height: 88%; animation-delay: .3s; }
.wave span:nth-child(5)  { height: 30%; animation-delay: .4s; }
.wave span:nth-child(6)  { height: 62%; animation-delay: .5s; }
.wave span:nth-child(7)  { height: 44%; animation-delay: .6s; }
.wave span:nth-child(8)  { height: 92%; animation-delay: .7s; }
.wave span:nth-child(9)  { height: 58%; animation-delay: .8s; }
.wave span:nth-child(10) { height: 76%; animation-delay: .9s; }
.wave span:nth-child(11) { height: 40%; animation-delay: 1s; }
.wave span:nth-child(12) { height: 66%; animation-delay: 1.1s; }
@keyframes wave {
  0%, 100% { transform: scaleY(0.55); }
  50%      { transform: scaleY(1.15); }
}
/* le waveform s'anime quand la conversation est lancée */
body:has(#toggle.recording) .wave span { animation-play-state: running; }

.phone-pill {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px; letter-spacing: 0.16em;
  color: var(--fg-muted);
  border: 1px solid var(--border);
  background: #fff;
  border-radius: 999px;
  padding: 6px 18px;
}
.phone-confirm { font-size: 16px; font-weight: 600; margin-top: 4px; }
.phone-buttons { display: flex; gap: 46px; margin-top: 10px; }
.call-btn {
  width: 64px; height: 64px; border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  color: var(--pink);
  box-shadow: 0 10px 22px -8px rgba(28,36,32,0.35);
}
.call-btn.hangup { background: var(--red); color: var(--pink); }
.call-btn.answer { background: var(--green); }

/* ---------- hero texte ---------- */
.eyebrow {
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px; letter-spacing: 0.22em;
  color: var(--fg-muted);
  margin: 0 0 20px;
}
.hero h1 {
  font-size: clamp(38px, 4.6vw, 58px);
  font-weight: 800; letter-spacing: -0.03em;
  line-height: 1.06;
  margin: 0 0 20px;
}
.hero .lede {
  font-size: 18px; color: var(--fg-muted);
  max-width: 620px; line-height: 1.6;
  margin: 0 0 36px;
}

/* ---------- features 2x2 ---------- */
.features {
  display: grid; grid-template-columns: 1fr 1fr;
  gap: 26px 40px;
}
@media (max-width: 700px) { .features { grid-template-columns: 1fr; } }
.feature { display: flex; gap: 16px; align-items: flex-start; }
.feature-icon {
  flex: 0 0 auto;
  width: 46px; height: 46px; border-radius: 12px;
  display: inline-flex; align-items: center; justify-content: center;
}
.icon-green  { background: var(--green-bg);  color: var(--green-dark); }
.icon-pink   { background: var(--pink-bg);   color: var(--pink); }
.icon-orange { background: var(--orange-bg); color: var(--orange); }
.feature h3 { margin: 2px 0 6px; font-size: 16px; font-weight: 700; }
.feature p  { margin: 0; font-size: 14.5px; line-height: 1.55; color: var(--fg-muted); }

/* ---------- bloc essai / CTA ---------- */
.try { text-align: center; margin: 26px 0 46px; }
.try-line { font-size: 16px; color: var(--fg-muted); margin: 0 0 18px; }
.try-line strong { color: var(--fg); }
.actions { display: flex; align-items: center; justify-content: center; gap: 18px; flex-wrap: wrap; }
.meta-line { margin: 14px 0 0; font-size: 12px; color: var(--fg-faint); }
.status { font-family: 'JetBrains Mono', monospace; font-size: 12px; color: var(--fg-faint); }
.muted { color: var(--fg-faint); }
.small { font-size: 12px; }

.cta-pill {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 14px 30px;
  border: none;
  border-radius: var(--radius-pill);
  font-size: 15px; font-weight: 600;
  font-family: 'Inter', sans-serif;
  color: #fff;
  background: var(--green-dark);
  box-shadow: 0 12px 28px -10px rgba(20,87,47,0.55);
  cursor: pointer;
  transition: filter 0.15s, transform 0.1s;
}
.cta-pill:hover { filter: brightness(1.12); color: #fff; }
.cta-pill:active { transform: translateY(1px); }
.cta-pill.recording {
  background: var(--red);
  box-shadow: 0 12px 28px -10px rgba(226,85,85,0.55);
}
.cta-pill .dot {
  width: 9px; height: 9px; border-radius: 50%;
  background: rgba(255,255,255,0.55);
  transition: background 0.2s;
}
.cta-pill.recording .dot {
  background: #fff;
  animation: pulse 1.4s ease-in-out infinite;
}
@keyframes pulse {
  0%,100% { opacity: 1; transform: scale(1); }
  50%     { opacity: 0.4; transform: scale(0.85); }
}

/* ---------- transcript ---------- */
.transcript {
  display: flex; flex-direction: column; gap: 4px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  padding: 10px 28px;
  box-shadow: 0 10px 30px -18px rgba(28,36,32,0.18);
}
.transcript:empty { display: none; }
.row {
  display: grid; grid-template-columns: 80px 1fr; gap: 24px;
  padding: 14px 0;
  border-bottom: 1px solid var(--border);
}
.row:last-child { border-bottom: none; }
.row .role {
  font-family: 'JetBrains Mono', monospace; font-size: 11px;
  letter-spacing: 0.12em; color: var(--fg-faint); padding-top: 2px;
}
.row .text {
  font-size: 15px; line-height: 1.6; color: var(--fg);
  white-space: pre-wrap; word-wrap: break-word;
}
.row.user      .role { color: var(--fg); }
.row.assistant .role { color: var(--green); font-weight: 600; }
.row.tool {
  background: var(--green-bg);
  border-left: 3px solid var(--green);
  padding-left: 14px; margin-left: -16px;
  border-radius: 0 8px 8px 0;
}
.row.tool .role { color: var(--green-dark); font-weight: 600; }
.row.tool .text { font-family: 'JetBrains Mono', monospace; font-size: 12px; color: var(--fg-muted); }
.row.system .role { color: var(--fg-faint); }
.row.system .text { color: var(--fg-muted); font-size: 13px; font-style: italic; }

/* ---------- footer ---------- */
.footer {
  text-align: center;
  padding: 26px 20px 40px;
  font-size: 13px; color: var(--fg-faint);
  border-top: 1px solid var(--border);
}
.footer a { color: var(--fg-muted); font-weight: 600; }
.footer a:hover { color: var(--green); }

/* ---------- guide page ---------- */
.page-guide { background: var(--bg); }
.page-guide .container {
  max-width: 760px; margin: 0 auto; padding: 60px 40px 100px;
}
.page-guide h1 {
  font-size: 44px; font-weight: 800; letter-spacing: -0.02em;
  margin: 0 0 8px;
}
.page-guide h2 {
  font-size: 22px; font-weight: 700;
  margin: 56px 0 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border);
}
.page-guide h3 {
  font-size: 15px; font-weight: 600; color: var(--green-dark);
  margin: 32px 0 10px;
  font-family: 'JetBrains Mono', monospace; letter-spacing: 0.02em;
}
.page-guide p, .page-guide li {
  font-size: 15px; line-height: 1.65; color: var(--fg-muted);
}
.page-guide p strong, .page-guide li strong { color: var(--fg); font-weight: 600; }
.page-guide ul, .page-guide ol { padding-left: 22px; }
.page-guide ul li, .page-guide ol li { margin-bottom: 6px; }

.page-guide pre {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 18px 20px; overflow-x: auto;
  font-size: 13px; line-height: 1.55;
  color: var(--fg); margin: 16px 0;
}
.page-guide code {
  background: #fff; border: 1px solid var(--border);
  padding: 2px 8px; border-radius: 4px;
  font-size: 0.88em; color: var(--green-dark);
}
.page-guide pre code {
  background: transparent; border: 0; padding: 0; color: inherit;
}
.page-guide a { color: var(--green-dark); }
.page-guide a:hover { color: var(--fg); }

.callout {
  background: var(--green-bg);
  border: 1px solid var(--green);
  border-radius: 12px;
  padding: 16px 20px; margin: 24px 0;
  font-size: 14px; color: var(--fg);
  line-height: 1.6;
}
.callout strong { color: var(--green-dark); }

.page-guide table {
  width: 100%; border-collapse: collapse; margin: 16px 0;
  font-size: 14px;
}
.page-guide th, .page-guide td {
  text-align: left; padding: 12px 14px;
  border-bottom: 1px solid var(--border);
}
.page-guide th { color: var(--fg); font-weight: 600; font-size: 12px; letter-spacing: 0.06em; text-transform: uppercase; }
.page-guide td { color: var(--fg-muted); }
.page-guide td strong, .page-guide td code { color: var(--fg); }

.back-link {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: 'JetBrains Mono', monospace; font-size: 12px;
  color: var(--fg-muted); margin-bottom: 24px;
  letter-spacing: 0.08em;
}
.back-link:hover { color: var(--fg); }
