/* ─── Variables & Reset ─────────────────────────────────────────────────── */
:root {
  --bg:         #07070F;
  --surface:    #0F0F1C;
  --card:       #161626;
  --card-hover: #1C1C30;
  --rose:       #E8607A;
  --rose-light: #F08090;
  --gold:       #C8A45A;
  --gold-light: #DEC07A;
  --text:       #EDE9E3;
  --text-2:     #A09BB0;
  --text-3:     #635F73;
  --border:     rgba(255,255,255,0.07);
  --border-2:   rgba(255,255,255,0.12);
  --grad:       linear-gradient(135deg, #E8607A, #C8A45A);
  --grad-hover: linear-gradient(135deg, #F08090, #DEC07A);
  --shadow-glow: 0 0 60px rgba(232,96,122,0.12);
  --shadow-card: 0 8px 40px rgba(0,0,0,0.5);
  --r:          12px;
  --r-lg:       20px;
  --header-h:   64px;
  --sidebar-w:  260px;
}

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

html {
  font-size: 16px; scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  overflow-x: hidden;
}

body {
  background: var(--bg);
  /* Légère atmosphère chaleureuse — deux sources lumineuses subtiles */
  background-image:
    radial-gradient(ellipse 60% 50% at 15% 15%, rgba(232,96,122,0.055) 0%, transparent 70%),
    radial-gradient(ellipse 50% 40% at 85% 85%, rgba(200,164,90,0.045) 0%, transparent 70%);
  color: var(--text);
  font-family: 'DM Sans', sans-serif;
  min-height: 100dvh;
  overflow: hidden;
}

a { color: var(--gold); text-decoration: none; }
a:hover { text-decoration: underline; }
button { cursor: pointer; font-family: inherit; border: none; background: none; }
input, textarea { font-family: inherit; }
.hidden { display: none !important; }

/* ─── Header ────────────────────────────────────────────────────────────── */
#site-header {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  height: var(--header-h);
  background: rgba(7,7,15,0.85);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
}
.header-inner {
  display: flex; align-items: center; justify-content: space-between;
  height: 100%; padding: 0 20px; max-width: 1200px; margin: 0 auto;
}
.logo-wrap { display: flex; align-items: center; gap: 10px; }
.logo-icon {
  width: 38px; height: 38px; border-radius: 11px;
  background: var(--grad);
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 0 24px rgba(232,96,122,0.4);
  flex-shrink: 0;
}
.logo-name {
  display: block;
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.25rem; font-weight: 700; color: var(--text);
  line-height: 1;
}
.logo-tagline {
  display: block; font-size: 0.68rem; color: var(--text-2); line-height: 1.2;
  letter-spacing: 0.01em;
}
.header-nav { display: flex; align-items: center; gap: 12px; }
.sub-badge {
  background: rgba(200,164,90,0.15); border: 1px solid rgba(200,164,90,0.3);
  color: var(--gold); font-size: 0.72rem; font-weight: 600;
  padding: 3px 10px; border-radius: 99px;
}
.btn-ghost {
  color: var(--text-2); font-size: 0.88rem; font-weight: 500;
  padding: 7px 16px; border-radius: var(--r);
  border: 1px solid var(--border-2);
  transition: all .2s;
}
.btn-ghost:hover { color: var(--text); border-color: rgba(255,255,255,0.2); background: rgba(255,255,255,0.05); }

/* User menu */
.user-menu { position: relative; }
.user-avatar-btn { background: none; border: none; padding: 0; }
.user-avatar {
  width: 36px; height: 36px; border-radius: 50%;
  background: var(--grad);
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 1rem; color: #fff;
  cursor: pointer; transition: box-shadow .2s;
}
.user-avatar:hover { box-shadow: 0 0 0 3px rgba(232,96,122,0.3); }
.user-dropdown {
  position: absolute; top: calc(100% + 10px); right: 0;
  background: var(--card); border: 1px solid var(--border-2);
  border-radius: var(--r-lg); padding: 8px 0; min-width: 220px;
  box-shadow: var(--shadow-card); z-index: 200;
}
.dropdown-header { padding: 10px 16px 8px; }
.dropdown-header strong { display: block; font-size: 0.9rem; }
.dropdown-header small { color: var(--text-2); font-size: 0.78rem; }
.dropdown-divider { border: none; border-top: 1px solid var(--border); margin: 4px 0; }
.dropdown-item {
  display: block; width: 100%; text-align: left;
  padding: 9px 16px; font-size: 0.85rem; color: var(--text-2);
  transition: all .15s;
}
.dropdown-item:hover { background: rgba(255,255,255,0.05); color: var(--text); }
.dropdown-item.danger:hover { color: #F87171; background: rgba(248,113,113,0.08); }

/* ─── Main layout ───────────────────────────────────────────────────────── */
#main-content {
  display: flex;
  height: 100dvh;
  padding-top: var(--header-h);
}

/* ─── Sidebar ───────────────────────────────────────────────────────────── */
#sidebar {
  width: var(--sidebar-w); flex-shrink: 0;
  background: var(--surface);
  border-right: 1px solid var(--border);
  display: flex; flex-direction: column; gap: 0;
  padding: 24px 16px;
  overflow-y: auto;
}
.sidebar-section { margin-bottom: 24px; }
.sidebar-label { font-size: 0.7rem; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--text-3); margin-bottom: 8px; }
.sidebar-plan { font-family: 'Cormorant Garamond', serif; font-size: 1.3rem; font-weight: 700; color: var(--gold); }
.sidebar-limit-text { font-size: 0.8rem; color: var(--text-2); margin-top: 4px; }
.progress-wrap { margin-top: 10px; }
.progress-bar { background: rgba(255,255,255,0.08); border-radius: 99px; height: 5px; overflow: hidden; }
.progress-fill { height: 100%; background: var(--grad); border-radius: 99px; transition: width .4s ease; }
.btn-sidebar-upgrade {
  width: 100%; padding: 10px; border-radius: var(--r);
  background: rgba(200,164,90,0.1); border: 1px solid rgba(200,164,90,0.25);
  color: var(--gold); font-size: 0.82rem; font-weight: 600;
  transition: all .2s;
}
.btn-sidebar-upgrade:hover { background: rgba(200,164,90,0.2); }
/* Approach list */
.sidebar-approach { }
.approach-list { list-style: none; display: flex; flex-direction: column; gap: 8px; }
.approach-list li { font-size: 0.8rem; color: var(--text-2); display: flex; align-items: center; gap: 6px; }

/* Logo icon SVG container */
.logo-icon svg { display: block; }
.modal-logo svg { display: block; }
.msg-avatar svg { display: block; }
.alex-msg-avatar svg { display: block; }
.intro-logo-icon svg { display: block; }

/* Trust disclaimer in pricing */
.trust-disclaimer {
  display: flex; align-items: center; gap: 8px;
  background: rgba(200,164,90,0.06); border: 1px solid rgba(200,164,90,0.15);
  border-radius: var(--r); padding: 10px 14px;
  font-size: 0.76rem; color: var(--text-2);
  margin-bottom: 14px; text-align: center;
  justify-content: center;
}
.trust-shield { font-size: 1rem; }

.sidebar-footer { margin-top: auto; padding-top: 16px; border-top: 1px solid var(--border); }
.sidebar-link { display: block; font-size: 0.78rem; color: var(--text-3); margin-bottom: 8px; }
.sidebar-link:hover { color: var(--text-2); }
.disclaimer-small { font-size: 0.7rem; color: var(--text-3); line-height: 1.5; margin-top: 8px; }

/* ─── Chat container ────────────────────────────────────────────────────── */
#chat-container {
  flex: 1; display: flex; flex-direction: column;
  min-width: 0; overflow: hidden; position: relative;
}

/* Intro screen */
#chat-intro {
  flex: 1; display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 12px;
  padding: 20px;
}
.intro-logo-icon {
  width: 80px; height: 80px; border-radius: 24px;
  background: var(--grad);
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 0 50px rgba(232,96,122,0.35);
  animation: pulse-glow 3s ease-in-out infinite;
}
@keyframes pulse-glow {
  0%,100% { box-shadow: 0 0 40px rgba(232,96,122,0.3); }
  50%      { box-shadow: 0 0 70px rgba(232,96,122,0.5); }
}
.intro-title { font-family: 'Cormorant Garamond', serif; font-size: 2.2rem; font-weight: 700; color: var(--text); }
.intro-sub { color: var(--text-2); font-size: 1rem; }
.intro-dots { display: flex; gap: 8px; margin-top: 8px; }
.intro-dots span {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--rose); opacity: 0.6;
  animation: bounce-dot 1.4s infinite ease-in-out;
}
.intro-dots span:nth-child(2) { animation-delay: .2s; }
.intro-dots span:nth-child(3) { animation-delay: .4s; }
@keyframes bounce-dot { 0%,80%,100% { transform: scale(0.7); opacity: .4; } 40% { transform: scale(1); opacity: 1; } }

/* Messages area */
#messages-area {
  flex: 1; overflow-y: auto; padding: 24px 20px;
  display: flex; flex-direction: column; gap: 0;
  scroll-behavior: smooth;
}
#messages-area::-webkit-scrollbar { width: 4px; }
#messages-area::-webkit-scrollbar-track { background: transparent; }
#messages-area::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.1); border-radius: 99px; }

/* Message rows */
.message-row { display: flex; gap: 10px; margin-bottom: 16px; animation: msg-in .3s ease; }
@keyframes msg-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }
.ai-row { align-items: flex-end; }
.user-row { align-items: flex-end; flex-direction: row-reverse; }

.msg-avatar {
  width: 34px; height: 34px; flex-shrink: 0; border-radius: 50%;
  background: var(--grad);
  display: flex; align-items: center; justify-content: center;
  color: #fff; box-shadow: 0 2px 10px rgba(232,96,122,0.25);
}

.msg-bubble {
  max-width: min(440px, 78%); padding: 12px 16px;
  border-radius: 18px; font-size: 0.9rem; line-height: 1.6;
  word-wrap: break-word; overflow-wrap: anywhere; word-break: break-word;
}
.ai-bubble {
  background: var(--card); border: 1px solid var(--border);
  border-bottom-left-radius: 4px; color: var(--text);
}
.user-bubble {
  background: var(--grad); color: #fff;
  border-bottom-right-radius: 4px;
  box-shadow: 0 4px 20px rgba(232,96,122,0.25);
}
.msg-time { font-size: 0.68rem; color: var(--text-3); margin-top: 4px; align-self: flex-end; }
.ai-time { margin-left: 42px; }
.user-time { margin-right: 42px; text-align: right; }

/* Typing indicator */
#typing-indicator { margin-bottom: 16px; }
.typing-bubble {
  background: var(--card); border: 1px solid var(--border);
  border-bottom-left-radius: 4px; border-radius: 18px;
  padding: 12px 16px; display: flex; flex-direction: column; gap: 6px;
}
.typing-dots { display: flex; gap: 5px; align-items: center; }
.typing-dots span {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--text-2); display: block;
  animation: typing-dot 1.4s infinite ease-in-out;
}
.typing-dots span:nth-child(2) { animation-delay: .2s; }
.typing-dots span:nth-child(3) { animation-delay: .4s; }
@keyframes typing-dot { 0%,80%,100% { transform: scale(0.7); opacity: .4; } 40% { transform: scale(1); opacity: 1; } }
.typing-label {
  font-size: 0.75rem; color: var(--text-3); font-style: italic;
  animation: fade-in-label 0.4s ease;
}
@keyframes fade-in-label { from { opacity: 0; } to { opacity: 1; } }

/* Limit bar */
#limit-bar {
  padding: 8px 20px;
  display: flex; align-items: center; justify-content: center; gap: 12px;
  background: rgba(200,164,90,0.08);
  border-top: 1px solid rgba(200,164,90,0.15);
  font-size: 0.8rem; color: var(--gold);
}
.limit-upgrade {
  font-size: 0.78rem; font-weight: 600; color: var(--gold);
  border: 1px solid rgba(200,164,90,0.3); border-radius: 99px;
  padding: 3px 12px; background: rgba(200,164,90,0.08);
  transition: all .2s;
}
.limit-upgrade:hover { background: rgba(200,164,90,0.2); }

/* Input area */
#input-area {
  padding: 12px 20px 16px;
  border-top: 1px solid var(--border);
  background: rgba(7,7,15,0.8);
  backdrop-filter: blur(10px);
}
.input-wrap {
  display: flex; gap: 10px; align-items: center;
  background: var(--card); border: 1px solid var(--border-2);
  border-radius: var(--r-lg); padding: 10px 10px 10px 16px;
  transition: border-color .2s;
}
.input-wrap:focus-within { border-color: rgba(232,96,122,0.4); box-shadow: 0 0 0 3px rgba(232,96,122,0.08); }
#message-input {
  flex: 1; background: none; border: none; outline: none; resize: none;
  color: var(--text); font-size: 1rem; line-height: 1.5;
  min-height: 24px; max-height: 160px;
  overflow-y: auto; padding: 0;
  touch-action: manipulation;
}
#message-input::placeholder { color: var(--text-3); }
#message-input:disabled { opacity: 0.4; }
#send-btn {
  width: 38px; height: 38px; border-radius: 10px; flex-shrink: 0;
  background: var(--grad); color: #fff;
  display: flex; align-items: center; justify-content: center;
  transition: all .2s; box-shadow: 0 4px 15px rgba(232,96,122,0.3);
}
#send-btn:hover:not(:disabled) { background: var(--grad-hover); transform: scale(1.05); }
#send-btn:disabled { opacity: 0.3; cursor: default; transform: none; }
.input-disclaimer { font-size: 0.68rem; color: var(--text-3); text-align: center; margin-top: 8px; }
.input-disclaimer a { color: var(--text-3); text-decoration: underline; }

/* ─── Modals ─────────────────────────────────────────────────────────────── */
.modal-overlay {
  position: fixed; inset: 0; z-index: 500;
  background: rgba(0,0,0,0.75); backdrop-filter: blur(8px);
  display: flex; align-items: center; justify-content: center;
  padding: 20px; overflow-y: auto;
  animation: overlay-in .25s ease;
}
@keyframes overlay-in { from { opacity: 0; } to { opacity: 1; } }
.modal-box {
  background: var(--surface); border: 1px solid var(--border-2);
  border-radius: var(--r-lg); padding: 32px;
  width: 100%; max-height: 90dvh; overflow-y: auto;
  animation: modal-slide-up .3s cubic-bezier(.16,1,.3,1);
  position: relative;
}
@keyframes modal-slide-up { from { opacity: 0; transform: translateY(30px); } to { opacity: 1; transform: translateY(0); } }
.modal-close {
  position: absolute; top: 16px; right: 16px;
  width: 32px; height: 32px; border-radius: 8px;
  background: rgba(255,255,255,0.06); color: var(--text-2);
  font-size: 1.2rem; display: flex; align-items: center; justify-content: center;
  transition: all .15s;
}
.modal-close:hover { background: rgba(255,255,255,0.12); color: var(--text); }
.modal-logo {
  width: 52px; height: 52px; border-radius: 16px; background: var(--grad);
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto 16px;
  box-shadow: 0 0 24px rgba(232,96,122,0.3);
}
.modal-title { font-family: 'Cormorant Garamond', serif; font-size: 1.8rem; font-weight: 700; text-align: center; margin-bottom: 6px; }
.modal-subtitle { text-align: center; color: var(--text-2); font-size: 0.88rem; margin-bottom: 24px; }
.modal-switch { text-align: center; font-size: 0.82rem; color: var(--text-2); margin-top: 20px; }

/* ─── Pricing modal ─────────────────────────────────────────────────────── */
.pricing-box { max-width: 840px; }
.pricing-header { text-align: center; margin-bottom: 28px; }
.pricing-alex-msg { display: flex; align-items: flex-start; gap: 12px; text-align: left; background: var(--card); border: 1px solid var(--border); border-radius: var(--r-lg); padding: 16px; margin-bottom: 24px; }
.alex-msg-avatar { width: 40px; height: 40px; flex-shrink: 0; border-radius: 50%; background: var(--grad); display: flex; align-items: center; justify-content: center; color: #fff; box-shadow: 0 2px 12px rgba(232,96,122,0.3); }
.alex-msg-bubble { font-size: 0.88rem; line-height: 1.6; color: var(--text); }
.pricing-title { font-family: 'Cormorant Garamond', serif; font-size: 2rem; font-weight: 700; margin-bottom: 8px; }
.pricing-subtitle { color: var(--text-2); font-size: 0.88rem; margin-bottom: 14px; }
.trust-row { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; }
.trust-item { font-size: 0.78rem; color: var(--text-2); background: rgba(255,255,255,0.04); border: 1px solid var(--border); border-radius: 99px; padding: 4px 12px; }

.pricing-cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-bottom: 28px; }
.pricing-card {
  background: var(--card); border: 1px solid var(--border);
  border-radius: var(--r-lg); padding: 24px 20px;
  cursor: pointer; transition: all .25s; position: relative;
  display: flex; flex-direction: column; gap: 12px;
}
.pricing-card:hover { border-color: rgba(232,96,122,0.4); transform: translateY(-3px); box-shadow: var(--shadow-glow); }
.pricing-card.popular { border-color: rgba(232,96,122,0.5); box-shadow: 0 0 30px rgba(232,96,122,0.1); }
.pricing-card.premium { border-color: rgba(200,164,90,0.4); }
.popular-badge { position: absolute; top: -12px; left: 50%; transform: translateX(-50%); background: var(--grad); color: #fff; font-size: 0.7rem; font-weight: 700; padding: 4px 12px; border-radius: 99px; white-space: nowrap; }
.card-tier-name { font-family: 'Cormorant Garamond', serif; font-size: 1.4rem; font-weight: 700; color: var(--text); }
.card-price { }
.price-amount { font-size: 1.8rem; font-weight: 700; background: var(--grad); -webkit-background-clip: text; -webkit-text-fill-color: transparent; }
.price-period { font-size: 0.82rem; color: var(--text-2); }
.card-desc { font-size: 0.8rem; color: var(--text-2); }
.card-features { list-style: none; display: flex; flex-direction: column; gap: 7px; flex: 1; }
.card-features li { font-size: 0.82rem; color: var(--text-2); }
.btn-select-plan {
  width: 100%; padding: 11px; border-radius: var(--r);
  font-size: 0.88rem; font-weight: 600; color: #fff;
  background: var(--card-hover); border: 1px solid var(--border-2);
  transition: all .2s;
}
.pricing-card.popular .btn-select-plan { background: var(--grad); border: none; box-shadow: 0 4px 20px rgba(232,96,122,0.3); }
.pricing-card.popular .btn-select-plan:hover { background: var(--grad-hover); }
.btn-select-plan:hover { border-color: rgba(232,96,122,0.4); background: rgba(232,96,122,0.1); }

.testimonials { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 16px; }
.testimonial { background: var(--card); border: 1px solid var(--border); border-radius: var(--r); padding: 14px 16px; font-size: 0.8rem; color: var(--text-2); line-height: 1.5; }
.testimonial strong { display: block; margin-top: 6px; color: var(--gold); font-size: 0.75rem; }
.testimonial-featured {
  grid-column: 1 / -1;
  background: linear-gradient(135deg, rgba(232,96,122,0.08) 0%, rgba(200,164,90,0.08) 100%);
  border-color: rgba(200,164,90,0.35);
  font-size: 0.88rem; color: var(--text);
  padding: 16px 20px;
}

.pricing-footer-note { text-align: center; font-size: 0.75rem; color: var(--text-3); margin-bottom: 12px; }
.modal-login-link { text-align: center; font-size: 0.82rem; color: var(--text-2); }

/* ─── Form modal ─────────────────────────────────────────────────────────── */
.form-box { max-width: 420px; }
.form-group { display: flex; flex-direction: column; gap: 6px; margin-bottom: 14px; }
.form-group label { font-size: 0.82rem; font-weight: 500; color: var(--text-2); }
.label-hint { font-weight: 400; color: var(--text-3); }
.form-group input {
  background: var(--card); border: 1px solid var(--border-2);
  border-radius: var(--r); padding: 11px 14px;
  color: var(--text); font-size: 0.9rem; outline: none;
  transition: border-color .2s;
}
.form-group input:focus { border-color: rgba(232,96,122,0.5); box-shadow: 0 0 0 3px rgba(232,96,122,0.08); }
.form-group input::placeholder { color: var(--text-3); }
.password-wrap { position: relative; }
.password-wrap input { width: 100%; padding-right: 44px; }
.toggle-pw { position: absolute; right: 12px; top: 50%; transform: translateY(-50%); font-size: 0.9rem; color: var(--text-3); background: none; border: none; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.checkboxes { display: flex; flex-direction: column; gap: 10px; margin-bottom: 18px; }
.checkbox-label { display: flex; align-items: flex-start; gap: 10px; cursor: pointer; font-size: 0.82rem; color: var(--text-2); line-height: 1.4; }
.checkbox-label input[type="checkbox"] { width: 16px; height: 16px; flex-shrink: 0; margin-top: 1px; accent-color: var(--rose); cursor: pointer; }
.checkbox-label a { color: var(--gold); text-decoration: underline; }
.form-error { background: rgba(248,113,113,0.1); border: 1px solid rgba(248,113,113,0.3); border-radius: var(--r); padding: 10px 14px; color: #FCA5A5; font-size: 0.82rem; margin-bottom: 14px; }

/* ─── Buttons ────────────────────────────────────────────────────────────── */
.btn-primary {
  padding: 13px 24px; border-radius: var(--r);
  background: var(--grad); color: #fff;
  font-size: 0.92rem; font-weight: 600;
  border: none; transition: all .2s;
  box-shadow: 0 4px 20px rgba(232,96,122,0.3);
  position: relative; overflow: hidden;
}
.btn-primary:hover:not(:disabled) { background: var(--grad-hover); transform: translateY(-1px); box-shadow: 0 6px 28px rgba(232,96,122,0.4); }
.btn-primary:disabled { opacity: 0.5; cursor: default; transform: none; }
.btn-full { width: 100%; }
.link-btn { background: none; border: none; color: var(--gold); font-size: inherit; font-weight: 600; text-decoration: underline; cursor: pointer; }
.btn-spinner {
  width: 18px; height: 18px; border-radius: 50%;
  border: 2px solid rgba(255,255,255,0.3);
  border-top-color: #fff;
  display: inline-block;
  animation: spin .7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* Payment */
.payment-summary {
  background: var(--card); border: 1px solid var(--border);
  border-radius: var(--r); padding: 14px 16px;
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 20px;
}
.pay-plan-name { font-weight: 600; font-size: 0.95rem; }
.pay-plan-price { font-size: 1.1rem; font-weight: 700; background: var(--grad); -webkit-background-clip: text; -webkit-text-fill-color: transparent; }
.pay-demo-hint { text-align: center; font-size: 0.72rem; color: var(--text-3); margin-top: 10px; }
.pay-security { text-align: center; font-size: 0.75rem; color: var(--text-3); margin-top: 14px; }

/* ─── Toasts ─────────────────────────────────────────────────────────────── */
#toast-container { position: fixed; bottom: 24px; right: 24px; z-index: 999; display: flex; flex-direction: column; gap: 10px; pointer-events: none; }
.toast {
  background: var(--card); border: 1px solid var(--border-2);
  border-radius: var(--r); padding: 12px 18px;
  font-size: 0.85rem; color: var(--text);
  box-shadow: var(--shadow-card); min-width: 220px;
  animation: toast-in .3s ease, toast-out .3s ease 2.7s forwards;
  pointer-events: auto;
}
.toast.success { border-left: 3px solid #22C55E; }
.toast.error { border-left: 3px solid #EF4444; }
@keyframes toast-in  { from { opacity: 0; transform: translateX(20px); } to { opacity: 1; transform: translateX(0); } }
@keyframes toast-out { from { opacity: 1; } to { opacity: 0; transform: translateX(20px); } }

/* ─── Responsive ─────────────────────────────────────────────────────────── */
@media (max-width: 768px) {
  #sidebar { display: none !important; }

  .pricing-box { padding: 24px 16px; }
  .pricing-cards { grid-template-columns: 1fr; max-width: 320px; margin-left: auto; margin-right: auto; }
  .testimonials { grid-template-columns: 1fr; }
  .pricing-title { font-size: 1.5rem; }

  .form-box { padding: 24px 20px; }
  .form-row { grid-template-columns: 1fr; }
  #messages-area { padding: 16px 12px; }
  #input-area { padding: 10px 12px 14px; }

  /* iOS zoom prevention — font-size must be >= 16px on all focusable inputs */
  #message-input { font-size: 16px; }
  .form-group input, .form-group textarea { font-size: 16px; }

  /* No horizontal scroll */
  body { overflow-x: hidden; }

  /* Chat layout */
  #chat-container { height: 100%; overflow: hidden; }
  .msg-bubble { max-width: 85%; font-size: 0.9rem; }
  #messages-area { overflow-x: hidden; }
}

@media (max-width: 480px) {
  .header-inner { padding: 0 14px; }
  .logo-tagline { display: none; }
  .modal-overlay { padding: 0; align-items: flex-end; }
  .modal-box { border-radius: var(--r-lg) var(--r-lg) 0 0; max-height: 92dvh; }
  #toast-container { bottom: 16px; right: 16px; left: 16px; }

  /* Input area safe zone for iPhone home bar */
  #input-area { padding-bottom: max(14px, env(safe-area-inset-bottom)); }
}
