/* ---------- Corsica Studio design system ---------- */
/* Palette officielle : navy #2B4150 / #1F3441 · ocean #51738C / #7F9DA6 ·
   mist #BFD4DA · coral #FF6E44 (accent unique) · cream #FFFCF5 / #F6F0E4 */

:root {
  --bg:        #1F3441;
  --bg-soft:   #2B4150;
  --bg-card:   #243a48;
  --border:    #33495a;
  --border-strong: #51738C;
  --fg:        #FFFCF5;
  --fg-muted:  #BFD4DA;
  --fg-faint:  #7F9DA6;
  --accent:    #FF6E44;
  --accent-bg: rgba(255,110,68,0.10);
  --user:      #FFFCF5;
  --radius-pill: 999px;
  --radius-card: 16px;
}

* { box-sizing: border-box; }

html, body {
  margin: 0; padding: 0;
  background: linear-gradient(180deg, var(--bg) 0%, var(--bg-soft) 100%);
  min-height: 100vh;
  color: var(--fg);
  font-family: 'Source Sans 3', ui-sans-serif, system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
}

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

code, .mono { font-family: 'Source Sans 3', sans-serif; font-size: 0.95em; }
code.accent {
  color: var(--accent);
  background: var(--accent-bg);
  padding: 2px 8px; border-radius: 4px;
  font-weight: 600;
}

/* ---------- top bar ---------- */
.topbar {
  display: flex; align-items: center; justify-content: space-between;
  padding: 20px 40px;
  position: sticky; top: 0; background: rgba(31,52,65,0.88);
  backdrop-filter: blur(8px);
  z-index: 10;
  border-bottom: 1px solid var(--border);
}
.topbar-left { display: flex; align-items: center; gap: 36px; }
.brand {
  display: inline-flex; align-items: center; gap: 12px;
  text-decoration: none; color: var(--fg);
}
.brand:hover { color: var(--fg); }
.brand-mark {
  display: inline-flex; align-items: center; justify-content: center;
  width: 38px; height: 38px;
  background: var(--bg-soft);
  border: 1px solid var(--border-strong);
  border-radius: 11px;
  font-family: 'MuseoModerno', sans-serif;
  font-size: 20px; font-weight: 700;
  color: #FFFCF5;
  position: relative;
}
.brand-mark::after {
  content: "";
  position: absolute; right: 6px; bottom: 8px;
  width: 5px; height: 5px; border-radius: 50%;
  background: var(--accent);
}
.brand-name {
  font-family: 'MuseoModerno', sans-serif;
  font-size: 17px; font-weight: 600; letter-spacing: 0.01em;
}
.brand-name .lite { color: var(--fg-faint); font-weight: 500; }
.topnav { display: flex; gap: 28px; }
.topnav a {
  color: var(--fg-muted); font-size: 12px; letter-spacing: 0.12em;
  font-weight: 600; padding: 4px 0; text-transform: uppercase;
}
.topnav a.active, .topnav a:hover { color: var(--fg); }

.cta-pill {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 12px 24px;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-pill);
  font-size: 14px; letter-spacing: 0.04em; font-weight: 600;
  color: var(--fg);
  background: transparent;
  cursor: pointer; font-family: inherit;
  transition: border-color 0.15s, background 0.15s, color 0.15s;
}
.cta-pill:hover { border-color: var(--fg); }
.cta-pill.primary {
  background: var(--accent);
  border-color: var(--accent);
  color: #FFFCF5;
  font-size: 16px; padding: 16px 32px;
  box-shadow: 0 6px 24px rgba(255,110,68,0.35);
}
.cta-pill.primary:hover { background: #ff8159; border-color: #ff8159; }
.cta-pill.recording {
  background: transparent;
  border-color: var(--accent); color: var(--accent);
  box-shadow: none;
}
.cta-pill.recording:hover { background: var(--accent-bg); }
.cta-pill .dot {
  width: 9px; height: 9px; border-radius: 50%;
  background: rgba(255,252,245,0.6);
  transition: background 0.2s;
}
.cta-pill.recording .dot {
  background: var(--accent);
  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); }
}

/* ---------- page resto (immersion) ---------- */
.app-main { max-width: 980px; margin: 0 auto; padding: 64px 40px 100px; }

.demo-badge {
  font-size: 11px; letter-spacing: 0.14em; font-weight: 700;
  text-transform: uppercase;
  color: var(--accent);
  border: 1px solid rgba(255,110,68,0.45);
  background: var(--accent-bg);
  border-radius: var(--radius-pill);
  padding: 5px 14px;
}

.resto-hero { text-align: center; margin-bottom: 64px; }
.resto-over {
  font-size: 13px; letter-spacing: 0.26em; font-weight: 600;
  color: var(--fg-faint); text-transform: uppercase;
  margin: 0 0 18px;
}
.resto-name {
  font-family: 'Cormorant Garamond', serif;
  font-size: clamp(54px, 9vw, 96px);
  font-weight: 600; letter-spacing: 0.02em;
  line-height: 1;
  margin: 0 0 10px;
  color: var(--fg);
}
.resto-tagline {
  font-family: 'Cormorant Garamond', serif;
  font-style: italic;
  font-size: clamp(19px, 2.6vw, 24px);
  color: var(--accent);
  margin: 0 0 22px;
}
.resto-desc {
  font-size: 17px; color: var(--fg-muted);
  max-width: 620px; line-height: 1.7;
  margin: 0 auto 36px;
}
.actions {
  display: flex; align-items: center; justify-content: center;
  gap: 18px; flex-wrap: wrap;
}
.ghost-link {
  border-color: var(--border-strong);
  color: var(--fg-muted);
}
.status { color: var(--fg-muted); font-size: 13px; width: 100%; }
.muted   { color: var(--fg-faint); }
.small   { font-size: 12px; }
.demo-strip {
  font-size: 14.5px; color: var(--fg-muted);
  margin: 30px auto 0; max-width: 560px; line-height: 1.6;
}
.demo-strip b { color: var(--accent); }

/* ---------- égaliseur vocal animé ---------- */
.voice-eq {
  display: inline-flex; align-items: center; gap: 3px;
  height: 18px; flex: none;
}
.voice-eq i {
  display: block; width: 3px; border-radius: 2px;
  background: currentColor;
  height: 35%;
  transform-origin: center;
}
.voice-eq.accent { color: var(--accent); }
.voice-eq i:nth-child(1) { height: 40%; }
.voice-eq i:nth-child(2) { height: 75%; }
.voice-eq i:nth-child(3) { height: 100%; }
.voice-eq i:nth-child(4) { height: 65%; }
.voice-eq i:nth-child(5) { height: 38%; }
body.on-call .voice-eq i { animation: eq 0.9s ease-in-out infinite; }
body.on-call .voice-eq i:nth-child(2) { animation-delay: 0.12s; }
body.on-call .voice-eq i:nth-child(3) { animation-delay: 0.24s; }
body.on-call .voice-eq i:nth-child(4) { animation-delay: 0.36s; }
body.on-call .voice-eq i:nth-child(5) { animation-delay: 0.48s; }
@keyframes eq {
  0%, 100% { transform: scaleY(0.4); }
  50%      { transform: scaleY(1.25); }
}

/* ---------- récap post-appel ---------- */
.recap {
  display: flex; align-items: flex-start; gap: 14px;
  background: rgba(76,175,125,0.10);
  border: 1px solid rgba(76,175,125,0.45);
  border-radius: var(--radius-card);
  padding: 20px 24px;
  margin: 0 0 8px;
  font-size: 15.5px; line-height: 1.6; color: var(--fg);
  animation: rise 0.4s ease;
}
.recap[hidden] { display: none; }
.recap b { color: var(--fg); }
.recap-check { font-size: 20px; line-height: 1.3; }
.recap-note { display: block; color: var(--fg-muted); font-size: 13.5px; margin-top: 4px; }

/* ---------- la carte (menu façon carte imprimée) ---------- */
.menu-board { margin: 72px 0 0; }
.menu-paper {
  background: #FFFCF5;
  color: #2B4150;
  border-radius: 6px;
  padding: clamp(32px, 6vw, 64px) clamp(24px, 7vw, 80px);
  box-shadow: 0 18px 60px rgba(0,0,0,0.35);
  position: relative;
}
.menu-paper::before {
  content: "";
  position: absolute; inset: 14px;
  border: 1px solid rgba(43,65,80,0.22);
  border-radius: 3px;
  pointer-events: none;
}
.menu-head { text-align: center; margin-bottom: 36px; }
.menu-orn { display: block; font-size: 22px; color: #FF6E44; margin-bottom: 8px; }
.menu-head h2 {
  font-family: 'Cormorant Garamond', serif;
  font-size: clamp(34px, 5vw, 48px);
  font-weight: 600; letter-spacing: 0.08em;
  text-transform: uppercase;
  margin: 0 0 6px; color: #1F3441;
}
.menu-sub {
  font-family: 'Cormorant Garamond', serif; font-style: italic;
  font-size: 17px; color: #51738C; margin: 0;
}
.menu-content { display: flex; flex-direction: column; gap: 36px; }
.menu-fixed {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px;
  padding-bottom: 32px;
  border-bottom: 1px solid rgba(43,65,80,0.18);
}
.menu-fixed .menu-box { text-align: center; padding: 0 8px; }
.menu-fixed h4 {
  font-family: 'Cormorant Garamond', serif;
  font-size: 23px; font-weight: 600; margin: 0 0 2px; color: #1F3441;
}
.menu-fixed .menu-price {
  font-family: 'Cormorant Garamond', serif; font-style: italic;
  color: #FF6E44; font-size: 17px; margin: 0 0 10px; display: block;
}
.menu-fixed p { font-size: 13.5px; line-height: 1.65; color: #51738C; margin: 0 0 8px; }
.menu-fixed .menu-wine { font-size: 12px; color: #7F9DA6; font-style: italic; }
.menu-section h4 {
  font-family: 'Cormorant Garamond', serif;
  font-size: 21px; font-weight: 600; letter-spacing: 0.14em;
  text-transform: uppercase; text-align: center;
  color: #1F3441; margin: 0 0 18px;
}
.menu-item {
  display: flex; align-items: baseline; gap: 10px;
  font-size: 14.5px; line-height: 1.5; color: #2B4150;
  margin-bottom: 11px;
}
.menu-item .dots {
  flex: 1; border-bottom: 1px dotted rgba(43,65,80,0.35);
  transform: translateY(-4px); min-width: 24px;
}
.menu-item .price { color: #FF6E44; font-weight: 600; white-space: nowrap; }
.menu-note { font-size: 13px; color: #7F9DA6; font-style: italic; margin: 4px 0 10px; }

/* ---------- infos pratiques ---------- */
.infos {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px;
  margin: 28px 0 0;
}
.info-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  padding: 26px 26px 22px;
}
.info-card h3 {
  font-family: 'Cormorant Garamond', serif;
  font-size: 22px; font-weight: 600; margin: 0 0 14px;
  color: var(--fg);
}
.info-card ul { list-style: none; margin: 0; padding: 0; }
.info-card li {
  font-size: 14px; line-height: 1.55; color: var(--fg-muted);
  padding: 7px 0; border-bottom: 1px solid var(--border);
}
.info-card li:last-child { border-bottom: none; }
.info-card li b { color: var(--fg); font-weight: 600; }

/* ---------- suggestions ---------- */
.chips {
  display: flex; gap: 12px; flex-wrap: wrap;
  margin-top: 32px;
}
.chip {
  font-size: 13.5px; color: var(--fg-muted);
  border: 1px dashed var(--border-strong);
  border-radius: var(--radius-pill);
  padding: 8px 16px;
}
.chip b { color: var(--fg); font-weight: 600; }

/* ---------- carte conversation (appel en cours) ---------- */
.call-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  overflow: hidden;
  margin: 8px 0 0;
  box-shadow: 0 12px 40px rgba(0,0,0,0.25);
}
.call-card[hidden] { display: none; }
.call-card-head {
  display: flex; align-items: center; gap: 12px;
  padding: 16px 24px;
  background: rgba(31,52,65,0.65);
  border-bottom: 1px solid var(--border);
}
.call-title { font-size: 14px; font-weight: 600; color: var(--fg); }
.call-title b { color: var(--accent); font-weight: 700; }
.call-hint {
  margin-left: auto;
  font-size: 12px; color: var(--fg-faint); font-style: italic;
}
.live-dot {
  width: 10px; height: 10px; border-radius: 50%;
  background: var(--accent); flex: none;
  animation: pulse 1.4s ease-in-out infinite;
}
.call-card.ended .live-dot { animation: none; background: var(--fg-faint); }

/* transcription : zone à hauteur fixe, scroll interne, bulles aérées */
.transcript {
  display: flex; flex-direction: column; gap: 18px;
  max-height: min(58vh, 540px);
  overflow-y: auto;
  padding: 26px 26px 30px;
  scroll-behavior: smooth;
  overscroll-behavior: contain;
}
.transcript::-webkit-scrollbar { width: 8px; }
.transcript::-webkit-scrollbar-thumb { background: var(--border-strong); border-radius: 8px; }
.transcript::-webkit-scrollbar-track { background: transparent; }

.row { display: flex; flex-direction: column; max-width: 78%; }
.row .role {
  font-size: 10.5px; font-weight: 700;
  letter-spacing: 0.14em; color: var(--fg-faint);
  text-transform: uppercase;
  margin: 0 6px 6px;
}
.row .text {
  font-size: 15.5px; line-height: 1.65; color: var(--fg);
  white-space: pre-wrap; word-wrap: break-word;
  padding: 12px 18px;
  border-radius: 16px;
}
.row.assistant { align-self: flex-start; }
.row.assistant .role { color: var(--accent); }
.row.assistant .text {
  background: var(--bg-soft);
  border: 1px solid var(--border);
  border-top-left-radius: 4px;
}
.row.user { align-self: flex-end; align-items: flex-end; }
.row.user .role { color: var(--fg-muted); }
.row.user .text {
  background: rgba(255,252,245,0.10);
  border: 1px solid rgba(255,252,245,0.16);
  border-top-right-radius: 4px;
}
.row.tool {
  align-self: center; align-items: center; max-width: 92%;
}
.row.tool .role { display: none; }
.row.tool .text {
  font-size: 12.5px; color: var(--fg-muted);
  background: var(--accent-bg);
  border: 1px solid rgba(255,110,68,0.3);
  border-radius: var(--radius-pill);
  padding: 7px 16px;
}
.row.system { align-self: center; align-items: center; }
.row.system .role { display: none; }
.row.system .text {
  color: var(--fg-faint); font-size: 13px; font-style: italic;
  background: transparent; border: none; padding: 0;
}

/* ---------- barre d'appel fixe (raccrocher toujours visible) ---------- */
.call-bar {
  position: fixed; bottom: 20px; left: 50%;
  transform: translateX(-50%);
  display: flex; align-items: center; gap: 16px;
  padding: 10px 12px 10px 24px;
  background: rgba(31,52,65,0.96);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-pill);
  box-shadow: 0 14px 40px rgba(0,0,0,0.45);
  z-index: 40;
  animation: rise 0.35s ease;
}
.call-bar[hidden] { display: none; }
.call-bar-status {
  font-size: 13.5px; color: var(--fg-muted);
  max-width: 240px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.hangup-btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 11px 24px;
  background: var(--accent); color: #FFFCF5;
  border: none; border-radius: var(--radius-pill);
  font-family: inherit; font-size: 14.5px; font-weight: 700;
  letter-spacing: 0.02em; cursor: pointer;
  transition: background 0.15s;
}
.hangup-btn:hover { background: #ff8159; }
body.on-call { padding-bottom: 96px; }

/* ---------- bandeau post-appel ---------- */
.after-call {
  display: none;
  margin: 56px 0 0;
  background: linear-gradient(135deg, rgba(255,110,68,0.14), rgba(255,110,68,0.05));
  border: 1px solid rgba(255,110,68,0.4);
  border-radius: var(--radius-card);
  padding: 28px 32px;
}
.after-call.visible { display: block; animation: rise 0.5s ease; }
@keyframes rise { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }
.after-call h2 {
  font-family: 'MuseoModerno', sans-serif;
  font-size: 24px; font-weight: 600; margin: 0 0 10px;
}
.after-call p { color: var(--fg-muted); font-size: 15.5px; line-height: 1.6; margin: 0 0 18px; }
.after-call p b { color: var(--fg); }
.after-call .contact-row { display: flex; gap: 14px; flex-wrap: wrap; }
.contact-pill {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 11px 20px;
  border-radius: var(--radius-pill);
  background: var(--accent); color: #FFFCF5;
  font-weight: 600; font-size: 14.5px;
}
.contact-pill:hover { background: #ff8159; color: #FFFCF5; }
.contact-pill.ghost {
  background: transparent; color: var(--fg);
  border: 1px solid var(--border-strong);
}
.contact-pill.ghost:hover { border-color: var(--fg); color: var(--fg); }

/* ---------- footer ---------- */
.footer-cs {
  border-top: 1px solid var(--border);
  margin-top: 64px; padding: 28px 40px 36px;
  text-align: center;
  font-size: 13.5px; color: var(--fg-faint); line-height: 1.8;
}
.footer-cs .slogan {
  font-family: 'MuseoModerno', sans-serif;
  color: var(--fg-muted); font-size: 15px; font-weight: 500;
}
.footer-cs a { color: var(--fg-muted); }
.footer-cs a:hover { color: var(--accent); }

/* ---------- guide page (interne) ---------- */
.page-guide .container { max-width: 760px; margin: 0 auto; padding: 60px 40px 100px; }
.page-guide h1 { font-family: 'MuseoModerno', sans-serif; font-size: 44px; font-weight: 600; margin: 0 0 8px; }
.page-guide h2 { font-size: 22px; font-weight: 600; margin: 56px 0 16px; padding-bottom: 12px; border-bottom: 1px solid var(--border); }
.page-guide h3 { font-size: 15px; font-weight: 700; color: var(--accent); margin: 32px 0 10px; }
.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 pre { background: var(--bg-card); 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: var(--bg-card); border: 1px solid var(--border); padding: 2px 8px; border-radius: 4px; font-size: 0.88em; color: var(--accent); }
.page-guide pre code { background: transparent; border: 0; padding: 0; color: inherit; }
.page-guide a { color: var(--accent); }
.callout { background: var(--accent-bg); border: 1px solid rgba(255,110,68,0.3); border-radius: 12px; padding: 16px 20px; margin: 24px 0; font-size: 14px; color: var(--fg); line-height: 1.6; }
.callout strong { color: var(--accent); }
.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); }
.back-link { display: inline-flex; align-items: center; gap: 8px; font-size: 12px; color: var(--fg-muted); margin-bottom: 24px; letter-spacing: 0.08em; }

@media (max-width: 760px) {
  .menu-fixed { grid-template-columns: 1fr; gap: 28px; }
  .infos { grid-template-columns: 1fr; }
}

@media (max-width: 640px) {
  .topbar { padding: 14px 18px; }
  .topnav { display: none; }
  .demo-badge { display: none; }
  .app-main { padding: 40px 20px 72px; }
  .row { max-width: 88%; }
  .transcript { padding: 18px 16px 22px; max-height: 52vh; }
  .call-card-head { padding: 13px 16px; }
  .call-hint { display: none; }
  .call-bar { left: 16px; right: 16px; transform: none; justify-content: space-between; }
  .after-call { padding: 22px 20px; }
}
