/* ============================================================
   DESIGN TOKENS — matching main batirup.com site
============================================================ */
:root {
  --primary: #fbbf24;
  --primary-hover: #fcd34d;
  --background: #0a0a0a;
  --surface: #1e293b;
  --surface-elevated: #334155;
  --text-primary: #f8fafc;
  --text-secondary: #cbd5e1;
  --text-muted: #64748b;
  --border-subtle: rgba(255, 255, 255, 0.08);
  --border-primary: #475569;
  --shadow-glow: 0 0 30px rgba(251, 191, 36, 0.2), 0 0 60px rgba(251, 191, 36, 0.08);
  --shadow-card: 0 4px 24px rgba(0,0,0,0.4);
  --font-heading: 'Space Grotesk', ui-sans-serif, system-ui, sans-serif;
  --font-body: 'Inter', ui-sans-serif, system-ui, sans-serif;
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 24px;
}

/* ============================================================
   RESET & BASE
============================================================ */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  background-color: var(--background);
  color: var(--text-primary);
  line-height: 1.6;
  overflow-x: hidden;
}

h1, h2, h3, h4 {
  font-family: var(--font-heading);
}

a { color: inherit; text-decoration: none; }

button { cursor: pointer; font-family: var(--font-body); }

strong { color: var(--primary); font-weight: 600; }

/* ============================================================
   NAV
============================================================ */
.site-nav {
  position: sticky;
  top: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 88px;
  padding: 0 24px;
  background: rgba(10, 10, 10, 0.85);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-subtle);
  overflow: visible;
}

.nav-back {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  font-weight: 500;
  color: var(--text-secondary);
  transition: color 0.2s;
}

.nav-back:hover { color: var(--text-primary); }

.nav-logo img {
  height: 110px;
  width: auto;
  display: block;
}

.nav-cta {
  font-size: 13px;
  font-weight: 600;
  padding: 7px 16px;
  background: var(--primary);
  color: #000;
  border-radius: var(--radius-sm);
  transition: background 0.2s;
}

.nav-cta:hover { background: var(--primary-hover); }

/* ============================================================
   HERO
============================================================ */
.hero-section {
  min-height: 90vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 80px 24px 64px;
  text-align: center;
  position: relative;
}

.hero-section::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 60% 50% at 50% 0%, rgba(251,191,36,0.08) 0%, transparent 70%);
  pointer-events: none;
}

.hero-inner {
  max-width: 760px;
  width: 100%;
  position: relative;
}

.hero-badge {
  display: inline-block;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--primary);
  background: rgba(251,191,36,0.1);
  border: 1px solid rgba(251,191,36,0.2);
  border-radius: 100px;
  padding: 5px 14px;
  margin-bottom: 24px;
}

.hero-title {
  font-size: clamp(2.2rem, 6vw, 4rem);
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -0.02em;
  margin-bottom: 20px;
  color: var(--text-primary);
}

.hero-subtitle {
  font-size: clamp(1rem, 2.5vw, 1.2rem);
  color: var(--text-secondary);
  margin-bottom: 48px;
}

.hero-cards {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
  max-width: 480px;
  margin: 0 auto;
}

@media (min-width: 480px) {
  .hero-cards {
    grid-template-columns: repeat(2, 1fr);
    max-width: 520px;
  }
}

@media (min-width: 900px) {
  .hero-cards {
    grid-template-columns: repeat(3, 1fr);
    max-width: 640px;
  }
}

@media (min-width: 1100px) {
  .hero-cards {
    grid-template-columns: repeat(6, 1fr);
    max-width: 100%;
  }
}

.hero-card {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  padding: 20px 16px;
  background: var(--surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  cursor: pointer;
  transition: border-color 0.2s, transform 0.2s, box-shadow 0.2s;
  text-align: center;
}

.hero-card:hover {
  border-color: var(--primary);
  transform: translateY(-3px);
  box-shadow: var(--shadow-glow);
}

.card-icon {
  width: 44px;
  height: 44px;
  background: rgba(251,191,36,0.1);
  border: 1px solid rgba(251,191,36,0.2);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--primary);
  transition: background 0.2s;
}

.hero-card:hover .card-icon {
  background: rgba(251,191,36,0.18);
}

.card-text {
  font-size: 14px;
  font-weight: 600;
  font-family: var(--font-heading);
  color: var(--text-primary);
  line-height: 1.3;
}

.card-arrow {
  color: var(--primary);
  opacity: 0;
  transition: opacity 0.2s;
}

.hero-card:hover .card-arrow { opacity: 1; }

/* ============================================================
   SECTIONS LAYOUT
============================================================ */
.demo-section {
  padding: 80px 24px;
}

.demo-section.alt {
  position: relative;
  overflow: hidden;
  background: var(--background);
}

.demo-section.alt::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: radial-gradient(rgba(251, 191, 36, 0.18) 1px, transparent 1px);
  background-size: 30px 30px;
  -webkit-mask-image: radial-gradient(ellipse 65% 65% at 50% 50%, black 0%, transparent 100%);
  mask-image: radial-gradient(ellipse 65% 65% at 50% 50%, black 0%, transparent 100%);
  pointer-events: none;
}

.demo-section.alt::after {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 55% 55% at 50% 50%, rgba(251, 191, 36, 0.1) 0%, transparent 70%);
  pointer-events: none;
}

.demo-section.alt .section-inner {
  position: relative;
  z-index: 1;
}

.section-inner {
  max-width: 900px;
  margin: 0 auto;
}

.section-header {
  text-align: center;
  margin-bottom: 48px;
}

.section-tag {
  display: inline-block;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 12px;
}

.section-title {
  font-size: clamp(1.6rem, 4vw, 2.4rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  margin-bottom: 16px;
  color: var(--text-primary);
}

.section-desc {
  font-size: 1rem;
  color: var(--text-secondary);
  max-width: 520px;
  margin: 0 auto;
}

.problem-box {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  background: rgba(239, 68, 68, 0.08);
  border: 1px solid rgba(239, 68, 68, 0.2);
  border-radius: var(--radius-md);
  padding: 12px 20px;
  margin-bottom: 16px;
  font-size: 14px;
  color: #fca5a5;
}

.problem-label {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #f87171;
  font-weight: 700;
}

/* ============================================================
   METRIC BLOCK
============================================================ */
.metric-block {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 24px;
  margin-bottom: 40px;
}

.metric-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}

.metric-top {
  display: flex;
  align-items: baseline;
  gap: 4px;
}

.metric-number {
  font-family: var(--font-heading);
  font-size: clamp(2.5rem, 8vw, 4rem);
  font-weight: 800;
  color: var(--text-muted);
  line-height: 1;
  transition: color 0.3s;
}

.metric-highlight .metric-number {
  color: var(--primary);
  text-shadow: var(--shadow-glow);
}

.metric-unit {
  font-size: 1.2rem;
  color: var(--text-muted);
  font-weight: 600;
}

.metric-highlight .metric-unit { color: var(--primary); }

.metric-label {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  font-weight: 600;
}

.after-label { color: var(--primary); }

.metric-sep {
  font-size: 2rem;
  color: var(--text-muted);
  font-weight: 300;
}

/* ============================================================
   TOGGLE AVANT / APRÈS
============================================================ */
.toggle-demo {
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-xl);
  overflow: hidden;
  background: var(--surface);
}

.toggle-tabs {
  display: flex;
  background: var(--background);
  border-bottom: 1px solid var(--border-subtle);
}

.toggle-tab {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px;
  font-size: 14px;
  font-weight: 600;
  background: transparent;
  border: none;
  color: var(--text-muted);
  transition: color 0.2s, background 0.2s;
}

.toggle-tab.active {
  color: var(--text-primary);
  background: var(--surface);
}

.tab-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
}

.red-dot { background: #ef4444; }
.green-dot { background: #22c55e; }

.toggle-panel {
  padding: 24px;
}

.toggle-panel.hidden { display: none; }

/* Browser mockup */
.mockup-window {
  border: 1px solid var(--border-primary);
  border-radius: var(--radius-md);
  overflow: hidden;
  background: #0f172a;
}

.email-window {
  border-color: rgba(34, 197, 94, 0.25);
}

.mockup-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  background: var(--surface-elevated);
  border-bottom: 1px solid var(--border-subtle);
}

.mockup-dots {
  display: flex;
  gap: 5px;
}

.mockup-dots span {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--border-primary);
}

.mockup-dots span:nth-child(1) { background: #ef4444; }
.mockup-dots span:nth-child(2) { background: #f59e0b; }
.mockup-dots span:nth-child(3) { background: #22c55e; }

.mockup-url-bar {
  font-size: 12px;
  color: var(--text-muted);
  background: var(--background);
  padding: 4px 12px;
  border-radius: 100px;
  flex: 1;
  max-width: 240px;
}

.mockup-body {
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.mockup-row {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  padding: 8px 12px;
  border-radius: var(--radius-sm);
}

.mockup-row.painful { background: rgba(239,68,68,0.08); color: #fca5a5; }
.mockup-row.muted { background: rgba(255,255,255,0.03); color: var(--text-muted); }
.mockup-row.good { background: rgba(34,197,94,0.08); color: #86efac; }
.mockup-row.ok { background: rgba(234,179,8,0.08); color: #fde047; }

.row-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
  display: inline-block;
}

.rdot-red    { background: #ef4444; }
.rdot-gray   { background: #475569; }
.rdot-green  { background: #22c55e; }
.rdot-yellow { background: #eab308; }
.stars { color: var(--primary); }

.email-subject-line {
  display: flex;
  gap: 8px;
  padding: 8px 12px;
  background: rgba(251,191,36,0.06);
  border-radius: var(--radius-sm);
  border-left: 2px solid var(--primary);
  font-size: 13px;
  margin-bottom: 4px;
}

.email-from { font-weight: 700; color: var(--primary); white-space: nowrap; }
.email-subject { color: var(--text-secondary); }

.mockup-caption {
  font-size: 12px;
  color: var(--text-muted);
  text-align: right;
  margin-top: 4px;
  font-style: italic;
}

.success-caption { color: #4ade80; }

/* ============================================================
   BRIEF DE DIRECTION (Appels d'offres — panel Après)
============================================================ */
.brief-doc {
  background: #0f172a;
  border: 1px solid rgba(251, 191, 36, 0.2);
  border-radius: var(--radius-md);
  overflow: hidden;
  font-family: var(--font-body);
}

.brief-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 18px;
  background: #1e293b;
  border-bottom: 1px solid var(--border-subtle);
  flex-wrap: wrap;
}

.brief-title-block {
  display: flex;
  align-items: center;
  gap: 10px;
}

.brief-emoji { font-size: 18px; }

.brief-title {
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.06em;
  color: var(--text-primary);
  text-transform: uppercase;
}

.brief-date {
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 2px;
}

.brief-stats {
  display: flex;
  align-items: center;
  gap: 12px;
}

.brief-stat {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.brief-stat-n {
  font-size: 18px;
  font-weight: 800;
  color: var(--text-muted);
  line-height: 1;
}

.brief-stat-hl .brief-stat-n { color: #4ade80; }

.brief-stat-l {
  font-size: 10px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.brief-stat-sep {
  width: 1px;
  height: 28px;
  background: var(--border-subtle);
}

.brief-section-head {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-secondary);
  padding: 12px 18px 8px;
  border-bottom: 1px solid var(--border-subtle);
}

.brief-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
}

.brief-table thead tr {
  background: rgba(255,255,255,0.03);
}

.brief-table th {
  padding: 8px 12px;
  text-align: left;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  border-bottom: 1px solid var(--border-subtle);
  white-space: nowrap;
}

.brief-table tbody tr {
  border-bottom: 1px solid rgba(255,255,255,0.05);
  transition: background 0.15s;
}

.brief-table tbody tr:last-child { border-bottom: none; }

.brief-table tbody tr:hover { background: rgba(255,255,255,0.03); }

.brief-table td {
  padding: 10px 12px;
  vertical-align: top;
  color: var(--text-secondary);
}

.brief-proj-title {
  font-weight: 600;
  color: var(--text-primary);
  font-size: 12px;
  margin-bottom: 3px;
}

.brief-proj-desc {
  font-size: 11px;
  color: var(--text-muted);
  line-height: 1.4;
}

.brief-emetteur { white-space: nowrap; font-size: 12px; }

.brief-type {
  display: inline-block;
  font-size: 10px;
  font-weight: 600;
  padding: 2px 7px;
  border-radius: 100px;
  white-space: nowrap;
}

.brief-type.rehab {
  background: rgba(251,191,36,0.12);
  color: #fbbf24;
}

.brief-type.construction {
  background: rgba(96,165,250,0.12);
  color: #60a5fa;
}

.brief-montant {
  font-weight: 600;
  color: var(--text-primary);
  white-space: nowrap;
  font-size: 12px;
}

.brief-delai {
  font-size: 12px;
  white-space: nowrap;
}

.brief-delai-warn { color: #fbbf24; font-weight: 600; }

.brief-score {
  font-size: 13px;
  letter-spacing: 1px;
}

.score-high { color: #4ade80; }
.score-mid  { color: #fbbf24; }

.brief-reco {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  padding: 12px 18px;
  background: rgba(251,191,36,0.06);
  border-top: 1px solid rgba(251,191,36,0.15);
  font-size: 12px;
  color: var(--text-secondary);
  line-height: 1.5;
}

.brief-reco strong { color: var(--text-primary); }
.brief-reco-icon { font-size: 14px; flex-shrink: 0; margin-top: 1px; }

/* ============================================================
   CHAT
============================================================ */
.chat-wrapper {
  display: flex;
  flex-direction: column;
  gap: 20px;
  max-width: 680px;
  margin: 0 auto;
}

.suggestions-hint {
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 10px;
  text-align: center;
}

.suggestions-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

@media (min-width: 640px) {
  .suggestions-list {
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: center;
  }
}

.suggestion-chip {
  padding: 10px 16px;
  background: var(--surface);
  border: 1px solid var(--border-primary);
  border-radius: var(--radius-md);
  font-size: 13px;
  color: var(--text-secondary);
  transition: border-color 0.2s, color 0.2s, transform 0.15s;
  text-align: left;
}

.suggestion-chip:hover {
  border-color: var(--primary);
  color: var(--text-primary);
  transform: translateY(-1px);
}

.suggestion-chip.used {
  opacity: 0.4;
  pointer-events: none;
}

.chat-box {
  background: var(--surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-xl);
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  min-height: 180px;
  max-height: 400px;
  overflow-y: auto;
}

.chat-msg {
  display: flex;
  gap: 12px;
  align-items: flex-start;
}

.chat-msg.user { flex-direction: row-reverse; }

.msg-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--primary);
  color: #000;
  font-size: 13px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.chat-msg.user .msg-avatar {
  background: var(--surface-elevated);
  color: var(--text-primary);
}

.msg-bubble {
  max-width: 75%;
  background: var(--surface-elevated);
  border-radius: 12px;
  padding: 10px 14px;
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.5;
}

.chat-msg.user .msg-bubble {
  background: rgba(251,191,36,0.12);
  border: 1px solid rgba(251,191,36,0.2);
  color: var(--text-primary);
}

.msg-source {
  margin-top: 6px;
  font-size: 11px;
  color: var(--text-muted);
  background: rgba(255,255,255,0.04);
  border-radius: 6px;
  padding: 4px 8px;
  display: flex;
  align-items: center;
  gap: 4px;
}

.msg-source::before { content: '↗'; font-size: 10px; }

/* Typing indicator */
.typing-indicator {
  display: flex;
  gap: 4px;
  align-items: center;
  padding: 4px 0;
}

.typing-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--text-muted);
  animation: typingBounce 1.2s ease-in-out infinite;
}

.typing-dot:nth-child(2) { animation-delay: 0.2s; }
.typing-dot:nth-child(3) { animation-delay: 0.4s; }

@keyframes typingBounce {
  0%, 60%, 100% { transform: translateY(0); opacity: 0.4; }
  30% { transform: translateY(-5px); opacity: 1; }
}

/* ============================================================
   DEVIS INTELLIGENTS — Value props
============================================================ */
.wa-props {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
  margin-bottom: 40px;
  max-width: 760px;
  margin-left: auto;
  margin-right: auto;
}

@media (min-width: 560px) {
  .wa-props {
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
  }
}

.wa-prop-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  background: var(--surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 20px 16px;
  text-align: center;
}

.wa-prop-icon {
  width: 48px;
  height: 48px;
  background: rgba(251,191,36,0.1);
  border: 1px solid rgba(251,191,36,0.15);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--primary);
  flex-shrink: 0;
}

.wa-prop-body {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.wa-prop-body strong {
  font-size: 14px;
  font-weight: 700;
  color: var(--text-primary);
}

.wa-prop-body span {
  font-size: 12px;
  color: var(--text-muted);
}

/* ============================================================
   DEVIS INTELLIGENTS — WhatsApp window
============================================================ */
.wa-demo-center {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
}

/* WhatsApp dark mode colors */
.wa-window {
  width: 100%;
  max-width: 480px;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 8px 48px rgba(0,0,0,0.6);
  background: #0b141a;
  border: 1px solid rgba(255,255,255,0.06);
}

/* Header */
.wa-head {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  background: #202c33;
  min-height: 56px;
}

.wa-avatar-circle {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: #25d366;
  color: #fff;
  font-size: 16px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.wa-head-info {
  flex: 1;
  min-width: 0;
}

.wa-head-name {
  font-size: 15px;
  font-weight: 600;
  color: #e9edef;
  line-height: 1.2;
}

.wa-head-status {
  font-size: 12px;
  color: #8696a0;
}

.wa-head-actions {
  display: flex;
  gap: 16px;
  color: #aebac1;
}

/* Messages area */
.wa-body {
  min-height: 320px;
  max-height: 420px;
  overflow-y: auto;
  padding: 12px 10px;
  display: flex;
  flex-direction: column;
  gap: 2px;
  background: #0b141a;
  /* WhatsApp background pattern */
  background-image: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.02'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}

.wa-body::-webkit-scrollbar { width: 4px; }
.wa-body::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.1); border-radius: 100px; }

/* Message bubbles */
.wa-msg {
  display: flex;
  margin-bottom: 4px;
}

.wa-msg.sent {
  justify-content: flex-end;
}

.wa-msg.received {
  justify-content: flex-start;
}

.wa-bubble {
  max-width: 80%;
  padding: 7px 10px 4px 10px;
  border-radius: 7.5px;
  font-size: 14px;
  line-height: 1.5;
  color: #e9edef;
  word-break: break-word;
  position: relative;
}

.wa-msg.sent .wa-bubble {
  background: #005c4b;
  border-top-right-radius: 2px;
}

.wa-msg.received .wa-bubble {
  background: #202c33;
  border-top-left-radius: 2px;
}

/* Timestamp + ticks */
.wa-meta {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 3px;
  font-size: 11px;
  color: #8696a0;
  margin-top: 2px;
}

/* Typing indicator */
.wa-typing-bubble {
  padding: 10px 14px;
}

.wa-typing {
  display: flex;
  gap: 4px;
  align-items: center;
}

.wa-typing span {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #8696a0;
  animation: waTypingPulse 1.2s ease-in-out infinite;
}

.wa-typing span:nth-child(2) { animation-delay: 0.2s; }
.wa-typing span:nth-child(3) { animation-delay: 0.4s; }

@keyframes waTypingPulse {
  0%, 60%, 100% { transform: scale(0.8); opacity: 0.4; }
  30% { transform: scale(1.1); opacity: 1; }
}

/* Input bar */
.wa-foot {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  background: #202c33;
}

.wa-foot-field {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 10px;
  background: #2a3942;
  border-radius: 24px;
  padding: 9px 14px;
}

.wa-emoji-btn,
.wa-attach-btn {
  color: #8696a0;
  font-size: 18px;
  flex-shrink: 0;
  display: flex;
}

.wa-placeholder {
  flex: 1;
  font-size: 15px;
  color: #8696a0;
}

.wa-send-btn {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: #25d366;
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  flex-shrink: 0;
  transition: background 0.2s;
}

.wa-send-btn:hover { background: #20ba5a; }

/* PDF document card */
.wa-doc-card {
  display: flex;
  align-items: center;
  gap: 10px;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 8px;
  padding: 10px 12px;
  margin: 8px 0 4px;
}

.wa-doc-icon {
  width: 36px;
  height: 36px;
  background: rgba(255,255,255,0.08);
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #aebac1;
  flex-shrink: 0;
}

.wa-doc-name {
  font-size: 13px;
  font-weight: 600;
  color: #e9edef;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 180px;
}

.wa-doc-size {
  font-size: 11px;
  color: #8696a0;
  margin-top: 2px;
}

/* Validation buttons */
.wa-validation {
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px solid rgba(255,255,255,0.07);
}

.wa-validation-q {
  font-size: 13px;
  color: #e9edef;
  margin-bottom: 8px;
  font-weight: 500;
}

.wa-validation-btns {
  display: flex;
  gap: 8px;
}

.wa-btn-no,
.wa-btn-yes {
  flex: 1;
  text-align: center;
  padding: 7px 10px;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 600;
  border: 1px solid rgba(255,255,255,0.1);
}

.wa-btn-no {
  background: rgba(239,68,68,0.1);
  border-color: rgba(239,68,68,0.25);
  color: #fca5a5;
}

.wa-btn-yes {
  background: rgba(37,211,102,0.12);
  border-color: rgba(37,211,102,0.3);
  color: #86efac;
}

/* Replay button */
.btn-wa-replay {
  background: transparent;
  border: 1px solid var(--border-primary);
  border-radius: 100px;
  padding: 8px 20px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-muted);
  transition: color 0.2s, border-color 0.2s;
}

.btn-wa-replay:hover {
  color: var(--primary);
  border-color: var(--primary);
}

/* ============================================================
   PPSPS — Layout
============================================================ */
.ppsps-layout {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

@media (min-width: 768px) {
  .ppsps-layout {
    flex-direction: row;
    align-items: flex-start;
    gap: 32px;
  }
}

/* Form */
.ppsps-form-wrap {
  flex: 0 0 320px;
  background: var(--surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 24px;
}

.ppsps-form-title {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 20px;
}

.ppsps-field {
  margin-bottom: 16px;
}

.ppsps-field label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  margin-bottom: 6px;
}

.ppsps-field select,
.ppsps-field input[type="number"] {
  width: 100%;
  background: var(--background);
  border: 1px solid var(--border-primary);
  border-radius: var(--radius-sm);
  padding: 9px 12px;
  font-size: 14px;
  color: var(--text-primary);
  font-family: var(--font-body);
  transition: border-color 0.2s;
  appearance: none;
}

.ppsps-field select:focus,
.ppsps-field input:focus {
  outline: none;
  border-color: var(--primary);
}

.ppsps-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.field-with-unit {
  display: flex;
  align-items: center;
  background: var(--background);
  border: 1px solid var(--border-primary);
  border-radius: var(--radius-sm);
  overflow: hidden;
  transition: border-color 0.2s;
}

.field-with-unit:focus-within { border-color: var(--primary); }

.field-with-unit input {
  border: none;
  background: transparent;
  padding: 9px 10px;
  flex: 1;
  min-width: 0;
}

.field-with-unit input:focus { outline: none; }

.field-unit {
  font-size: 12px;
  color: var(--text-muted);
  padding: 0 10px;
  border-left: 1px solid var(--border-primary);
  white-space: nowrap;
}

/* Toggle pills */
.toggle-pills {
  display: flex;
  gap: 8px;
}

.toggle-pill input { display: none; }

.toggle-pill span {
  display: block;
  padding: 8px 20px;
  border: 1px solid var(--border-primary);
  border-radius: 100px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-muted);
  cursor: pointer;
  transition: all 0.2s;
}

.toggle-pill input:checked + span {
  background: var(--primary);
  border-color: var(--primary);
  color: #000;
}

/* Checkboxes */
.check-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.check-chip input { display: none; }

.check-chip span {
  display: block;
  padding: 6px 14px;
  border: 1px solid var(--border-primary);
  border-radius: 100px;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
  cursor: pointer;
  transition: all 0.2s;
}

.check-chip input:checked + span {
  background: rgba(251,191,36,0.12);
  border-color: var(--primary);
  color: var(--primary);
}

/* Generate button */
.btn-gen-ppsps {
  width: 100%;
  background: var(--primary);
  color: #000;
  border: none;
  border-radius: var(--radius-sm);
  padding: 12px;
  font-size: 14px;
  font-weight: 700;
  font-family: var(--font-heading);
  margin-top: 4px;
  transition: background 0.2s, transform 0.1s;
}

.btn-gen-ppsps:hover {
  background: var(--primary-hover);
  transform: translateY(-1px);
}

.btn-gen-ppsps.shake {
  animation: shake 0.4s ease;
}

@keyframes shake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-6px); }
  75% { transform: translateX(6px); }
}

.ppsps-required-hint {
  font-size: 12px;
  color: #f87171;
  margin-top: 8px;
  min-height: 16px;
  text-align: center;
}

/* Preview area */
.ppsps-preview-wrap {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.ppsps-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  min-height: 300px;
  border: 2px dashed var(--border-primary);
  border-radius: var(--radius-lg);
  color: var(--text-muted);
  font-size: 14px;
  text-align: center;
}

/* Word-like document */
.word-doc {
  background: #fff;
  color: #1e293b;
  border-radius: var(--radius-md);
  padding: 32px 28px;
  box-shadow: 0 4px 32px rgba(0,0,0,0.5);
  font-family: 'Calibri', 'Inter', sans-serif;
  font-size: 13px;
  line-height: 1.6;
  max-height: 520px;
  overflow-y: auto;
}

.word-doc::-webkit-scrollbar { width: 4px; }
.word-doc::-webkit-scrollbar-thumb { background: #cbd5e1; border-radius: 100px; }

.doc-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  padding-bottom: 16px;
  margin-bottom: 20px;
  border-bottom: 3px solid #fbbf24;
}

.doc-company {
  font-size: 18px;
  font-weight: 800;
  color: #0a0a0a;
  font-family: 'Space Grotesk', sans-serif;
}

.doc-company-sub {
  font-size: 10px;
  color: #94a3b8;
  margin-top: 2px;
}

.doc-main-title {
  font-size: 22px;
  font-weight: 800;
  color: #fbbf24;
  text-align: right;
  font-family: 'Space Grotesk', sans-serif;
  letter-spacing: 0.04em;
}

.doc-sub-title {
  font-size: 10px;
  color: #64748b;
  text-align: right;
  margin-top: 2px;
  line-height: 1.4;
}

.doc-section {
  margin-bottom: 18px;
}

.doc-section-title {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #fff;
  background: #1e293b;
  padding: 5px 10px;
  border-radius: 4px;
  margin-bottom: 10px;
}

.doc-info-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

.doc-info-table td {
  padding: 5px 8px;
  border-bottom: 1px solid #f1f5f9;
}

.doc-info-table td:first-child {
  font-weight: 600;
  color: #475569;
  width: 45%;
}

.doc-info-table td:last-child {
  color: #1e293b;
}

/* Note "À compléter" */
.doc-autofill-note {
  background: #fef9ec;
  border: 1px solid #fbbf24;
  border-radius: 4px;
  padding: 7px 12px;
  font-size: 11px;
  color: #92400e;
  margin-bottom: 14px;
}

/* 2-column layout inside doc */
.doc-two-cols {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.doc-col-head {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #fff;
  background: #dc2626;
  padding: 3px 8px;
  margin-bottom: 0;
  border-radius: 2px 2px 0 0;
}

.doc-placeholder {
  color: #94a3b8 !important;
  font-style: italic;
}

.doc-autofill {
  color: #d97706;
  font-weight: 500;
}

/* Urgence numbers */
.doc-urgence-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  margin-bottom: 10px;
}

.doc-urgence-chip {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 8px 4px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
}

.doc-urgence-chip.urg-primary {
  background: #fef2f2;
  border-color: #fca5a5;
}

.urg-num {
  font-size: 20px;
  font-weight: 800;
  color: #dc2626;
  font-family: 'Space Grotesk', sans-serif;
  line-height: 1;
}

.urg-lab {
  font-size: 10px;
  color: #64748b;
  margin-top: 3px;
}

/* Risk analysis table */
.doc-risk-scroll {
  overflow-x: auto;
}

.doc-risk-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 11px;
  min-width: 580px;
}

.doc-risk-table th {
  background: #1e293b;
  color: #fff;
  padding: 6px 8px;
  text-align: left;
  font-size: 9px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  white-space: nowrap;
}

.doc-risk-table td {
  padding: 7px 8px;
  border-bottom: 1px solid #f1f5f9;
  vertical-align: top;
  color: #334155;
  font-size: 11px;
}

.doc-risk-table tr:nth-child(even) td { background: #f8fafc; }

.rt-phase { font-weight: 700; color: #1e293b !important; white-space: nowrap; }
.rt-red   { color: #dc2626 !important; }
.rt-orange { color: #d97706 !important; }
.rt-green  { color: #16a34a !important; }
.rt-ras   { text-align: center; color: #94a3b8; padding: 14px !important; font-style: italic; }

.doc-mini {
  font-size: 10px;
  color: #64748b;
  margin-top: 2px;
}

.doc-section p {
  font-size: 12px;
  color: #475569;
  margin: 0;
}

.doc-footer {
  margin-top: 20px;
  padding-top: 12px;
  border-top: 1px solid #e2e8f0;
  font-size: 10px;
  color: #94a3b8;
  text-align: center;
  font-style: italic;
}

/* Download button */
.btn-dl-docx {
  align-self: flex-end;
  background: var(--surface-elevated);
  color: var(--text-muted);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 10px 20px;
  font-size: 13px;
  font-weight: 600;
  font-family: var(--font-heading);
  cursor: not-allowed;
  opacity: 0.7;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

/* ============================================================
   RELANCES IMPAYÉS
============================================================ */
.relances-layout {
  display: flex;
  flex-direction: column;
  gap: 24px;
  margin-bottom: 40px;
}

@media (min-width: 768px) {
  .relances-layout {
    flex-direction: row;
    align-items: flex-start;
    gap: 28px;
  }
}

/* Left — invoice table */
.relances-table-wrap {
  flex: 0 0 auto;
  width: 100%;
}

@media (min-width: 768px) {
  .relances-table-wrap { width: 380px; }
}

.relances-table-title {
  font-size: 14px;
  font-weight: 700;
  color: var(--text-secondary);
  margin-bottom: 12px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-family: var(--font-heading);
}

.relances-table {
  background: var(--surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.rt-header {
  display: grid;
  grid-template-columns: 1fr auto auto auto;
  gap: 8px;
  align-items: center;
  padding: 10px 16px;
  background: var(--background);
  border-bottom: 1px solid var(--border-subtle);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
}

.rt-row {
  display: grid;
  grid-template-columns: 1fr auto auto auto;
  gap: 8px;
  align-items: center;
  padding: 14px 16px;
  border-bottom: 1px solid var(--border-subtle);
  transition: background 0.2s;
}

.rt-row:last-child { border-bottom: none; }

.rt-row:hover { background: rgba(255,255,255,0.02); }

.rt-row.rt-row-active {
  background: rgba(251,191,36,0.05);
  border-color: rgba(251,191,36,0.15);
}

.rt-client-name {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
  line-height: 1.2;
}

.rt-invoice-ref {
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 2px;
}

.rt-amount {
  font-size: 14px;
  font-weight: 700;
  color: var(--text-primary);
  white-space: nowrap;
}

.delay-badge {
  font-size: 12px;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 100px;
  white-space: nowrap;
}

.red-badge {
  background: rgba(239,68,68,0.12);
  color: #f87171;
  border: 1px solid rgba(239,68,68,0.2);
}

.orange-badge {
  background: rgba(234,179,8,0.12);
  color: #fde047;
  border: 1px solid rgba(234,179,8,0.2);
}

.green-badge {
  background: rgba(34,197,94,0.1);
  color: #4ade80;
  border: 1px solid rgba(34,197,94,0.2);
}

.btn-relancer {
  padding: 7px 12px;
  border: none;
  border-radius: var(--radius-sm);
  font-size: 12px;
  font-weight: 700;
  font-family: var(--font-body);
  white-space: nowrap;
  transition: opacity 0.2s, transform 0.15s;
}

.btn-relancer:hover:not(:disabled) { transform: translateY(-1px); }

.btn-relancer:disabled { opacity: 0.45; cursor: default; }

.btn-red {
  background: rgba(239,68,68,0.15);
  color: #fca5a5;
  border: 1px solid rgba(239,68,68,0.25);
}

.btn-red:hover { background: rgba(239,68,68,0.25); }

.btn-orange {
  background: rgba(234,179,8,0.12);
  color: #fde047;
  border: 1px solid rgba(234,179,8,0.25);
}

.btn-orange:hover { background: rgba(234,179,8,0.22); }

.btn-green {
  background: rgba(34,197,94,0.08);
  color: #4ade80;
  border: 1px solid rgba(34,197,94,0.2);
}

.btn-sent {
  background: rgba(34,197,94,0.1) !important;
  color: #4ade80 !important;
  border-color: rgba(34,197,94,0.2) !important;
}

/* Right — email preview */
.relance-email-wrap {
  flex: 1;
  min-width: 0;
}

.relance-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  min-height: 260px;
  border: 2px dashed var(--border-primary);
  border-radius: var(--radius-lg);
  color: var(--text-muted);
  font-size: 14px;
  text-align: center;
  line-height: 1.5;
}

.relance-email-preview {
  background: var(--surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  overflow: hidden;
  animation: fadeInUp 0.3s ease;
}

@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

.email-preview-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  background: var(--background);
  border-bottom: 1px solid var(--border-subtle);
  gap: 8px;
  flex-wrap: wrap;
}

.ep-badge {
  font-size: 11px;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 100px;
}

.badge-red {
  background: rgba(239,68,68,0.12);
  color: #f87171;
  border: 1px solid rgba(239,68,68,0.2);
}

.badge-orange {
  background: rgba(234,179,8,0.12);
  color: #fde047;
  border: 1px solid rgba(234,179,8,0.2);
}

.ep-auto-label {
  font-size: 11px;
  color: var(--text-muted);
}

.email-preview-meta {
  padding: 14px 16px;
  border-bottom: 1px solid var(--border-subtle);
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.ep-row {
  display: flex;
  gap: 10px;
  font-size: 13px;
  align-items: baseline;
}

.ep-label {
  font-weight: 600;
  color: var(--text-muted);
  min-width: 48px;
  flex-shrink: 0;
}

.ep-val { color: var(--text-secondary); }

.ep-to { color: var(--primary); }

.ep-subject {
  color: var(--text-primary);
  font-weight: 600;
}

.email-preview-body {
  padding: 16px 18px;
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.7;
}

.email-preview-body p {
  margin: 0;
}

.email-preview-body strong { color: var(--text-primary); font-weight: 600; }

.ep-actions {
  display: flex;
  gap: 10px;
  padding: 12px 16px;
  border-top: 1px solid var(--border-subtle);
}

.ep-btn-send {
  background: var(--primary);
  color: #000;
  border: none;
  border-radius: var(--radius-sm);
  padding: 9px 18px;
  font-size: 13px;
  font-weight: 700;
  font-family: var(--font-body);
  transition: background 0.2s, transform 0.15s;
}

.ep-btn-send:hover {
  background: var(--primary-hover);
  transform: translateY(-1px);
}

.ep-btn-edit {
  background: transparent;
  color: var(--text-muted);
  border: 1px solid var(--border-primary);
  border-radius: var(--radius-sm);
  padding: 9px 14px;
  font-size: 13px;
  font-weight: 600;
  font-family: var(--font-body);
  transition: color 0.2s, border-color 0.2s;
}

.ep-btn-edit:hover {
  color: var(--text-primary);
  border-color: var(--text-muted);
}

/* Escalation sequence */
.escalation-seq {
  margin-top: 0;
  padding: 24px;
  background: var(--surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
}

.esc-title {
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  margin-bottom: 20px;
  text-align: center;
}

.esc-steps {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  flex-wrap: wrap;
}

.esc-step {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  flex: 1;
  min-width: 80px;
  max-width: 120px;
}

.esc-day {
  font-size: 14px;
  font-weight: 800;
  font-family: var(--font-heading);
  color: var(--text-primary);
}

.esc-desc {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-secondary);
  text-align: center;
}

.esc-tone {
  font-size: 11px;
  color: var(--text-muted);
  text-align: center;
}

.esc-step-highlight .esc-day { color: var(--primary); }
.esc-step-highlight .esc-desc { color: var(--primary); }

.esc-arrow {
  font-size: 18px;
  color: var(--text-muted);
  flex-shrink: 0;
  font-weight: 300;
}

/* ============================================================
   PROCESS TIMELINE
============================================================ */
.process-section {
  padding: 80px 24px;
}

.timeline {
  display: flex;
  flex-direction: column;
  gap: 0;
  max-width: 680px;
  margin: 0 auto;
}

@media (min-width: 640px) {
  .timeline {
    flex-direction: row;
    align-items: flex-start;
  }
}

.timeline-step {
  display: flex;
  flex-direction: column;
  align-items: center;
  flex: 1;
  position: relative;
}

@media (max-width: 639px) {
  .timeline-step {
    flex-direction: row;
    align-items: flex-start;
    gap: 16px;
    padding-bottom: 32px;
  }
}

.tl-dot {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--surface-elevated);
  border: 2px solid var(--border-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 14px;
  color: var(--text-muted);
  position: relative;
  z-index: 1;
  flex-shrink: 0;
}

.tl-dot.primary-dot {
  background: var(--primary);
  border-color: var(--primary);
  color: #000;
  box-shadow: var(--shadow-glow);
}

.tl-connector {
  background: var(--border-primary);
}

@media (min-width: 640px) {
  .tl-connector {
    position: absolute;
    top: 20px;
    left: 50%;
    width: 100%;
    height: 2px;
  }

  .timeline-step.last .tl-connector {
    display: none;
  }
}

@media (max-width: 639px) {
  .tl-connector {
    position: absolute;
    left: 19px;
    top: 40px;
    width: 2px;
    height: calc(100% - 40px);
  }

  .timeline-step.last .tl-connector { display: none; }
}

.tl-content {
  padding-top: 12px;
  text-align: center;
  max-width: 140px;
}

@media (max-width: 639px) {
  .tl-content {
    text-align: left;
    padding-top: 6px;
    max-width: none;
  }
}

.tl-day {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--primary);
  margin-bottom: 4px;
}

.tl-content h3 {
  font-size: 15px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 4px;
}

.tl-content p {
  font-size: 13px;
  color: var(--text-muted);
}

/* ============================================================
   FOOTER
============================================================ */
.footer-section {
  background: var(--surface);
  border-top: 1px solid var(--border-subtle);
  padding: 80px 24px;
  text-align: center;
}

.footer-inner {
  max-width: 480px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
}

.footer-tagline {
  font-size: 13px;
  color: var(--text-muted);
  letter-spacing: 0.04em;
}

.footer-title {
  font-size: clamp(1.6rem, 4vw, 2.4rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--text-primary);
}

.btn-cta-large {
  display: inline-block;
  background: var(--primary);
  color: #000;
  font-family: var(--font-heading);
  font-size: 16px;
  font-weight: 700;
  padding: 14px 36px;
  border-radius: 100px;
  transition: background 0.2s, transform 0.15s, box-shadow 0.2s;
  margin-top: 8px;
}

.btn-cta-large:hover {
  background: var(--primary-hover);
  transform: translateY(-2px);
  box-shadow: var(--shadow-glow);
}

/* ============================================================
   SCROLL REVEAL
============================================================ */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ============================================================
   INBOX ZERO BTP
============================================================ */
.inbox-toggle-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}

.inbox-status {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  font-weight: 600;
  color: var(--text-secondary);
}

.status-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  flex-shrink: 0;
}

.status-red  { background: #ef4444; box-shadow: 0 0 6px rgba(239,68,68,0.6); }
.status-green { background: #22c55e; box-shadow: 0 0 6px rgba(34,197,94,0.6); }

.btn-inbox-toggle {
  background: var(--primary);
  color: #000;
  border: none;
  border-radius: var(--radius-sm);
  padding: 10px 20px;
  font-size: 13px;
  font-weight: 700;
  font-family: var(--font-heading);
  transition: background 0.2s, transform 0.15s;
  white-space: nowrap;
}

.btn-inbox-toggle:hover { background: var(--primary-hover); transform: translateY(-1px); }

.btn-inbox-active {
  background: var(--surface-elevated) !important;
  color: var(--text-secondary) !important;
  border: 1px solid var(--border-primary);
}

/* Panels */
.inbox-panel { animation: fadeInUp 0.3s ease; }
.inbox-panel.hidden { display: none; }

/* AVANT — inbox window */
.inbox-window {
  border: 1px solid var(--border-primary);
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: #0f172a;
}

.inbox-winbar {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 16px;
  background: var(--surface-elevated);
  border-bottom: 1px solid var(--border-subtle);
}

.inbox-winbar-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-secondary);
}

.inbox-list {
  display: flex;
  flex-direction: column;
}

.imail {
  display: grid;
  grid-template-columns: 1fr auto;
  grid-template-rows: auto auto;
  gap: 2px 12px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border-subtle);
  transition: background 0.15s;
  cursor: default;
}

.imail:hover { background: rgba(255,255,255,0.03); }

.imail-sender {
  font-size: 13px;
  font-weight: 700;
  color: var(--text-primary);
  grid-column: 1;
  grid-row: 1;
}

.imail-read .imail-sender { font-weight: 500; color: var(--text-muted); }

.imail-subject {
  font-size: 12px;
  color: var(--text-secondary);
  grid-column: 1;
  grid-row: 2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.imail-read .imail-subject { color: var(--text-muted); }

.imail-time {
  font-size: 11px;
  color: var(--text-muted);
  grid-column: 2;
  grid-row: 1;
  white-space: nowrap;
  align-self: center;
}

.imail-urgent .imail-sender::before {
  content: '';
  display: inline-block;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #ef4444;
  margin-right: 7px;
  vertical-align: middle;
  position: relative;
  top: -1px;
}

.imail-overflow {
  padding: 10px 16px;
  font-size: 12px;
  color: var(--text-muted);
  font-style: italic;
  text-align: center;
}

/* APRÈS — folders */
.inbox-folders {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.inbox-folder {
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--border-subtle);
}

.folder-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 18px;
  gap: 12px;
}

.folder-head-left {
  display: flex;
  align-items: center;
  gap: 12px;
}

.folder-icon {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.fi-red    { background: #ef4444; box-shadow: 0 0 6px rgba(239,68,68,0.5); }
.fi-yellow { background: #eab308; box-shadow: 0 0 6px rgba(234,179,8,0.4); }

.folder-name {
  font-size: 15px;
  font-weight: 700;
  font-family: var(--font-heading);
  color: var(--text-primary);
  line-height: 1.2;
}

.folder-hint {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 2px;
}

.folder-count {
  font-size: 12px;
  font-weight: 700;
  padding: 4px 12px;
  border-radius: 100px;
  white-space: nowrap;
  flex-shrink: 0;
}

.folder-urgent {
  background: rgba(239,68,68,0.05);
  border-color: rgba(239,68,68,0.2);
}

.folder-urgent .folder-head { border-bottom: 1px solid rgba(239,68,68,0.15); }
.folder-urgent .folder-count { background: rgba(239,68,68,0.12); color: #f87171; }

.folder-admin {
  background: rgba(234,179,8,0.04);
  border-color: rgba(234,179,8,0.18);
}

.folder-admin .folder-head { border-bottom: 1px solid rgba(234,179,8,0.12); }
.folder-admin .folder-count { background: rgba(234,179,8,0.1); color: #fde047; }

.folder-archive {
  background: rgba(255,255,255,0.02);
  border-color: var(--border-subtle);
}

.folder-archive .folder-count { background: rgba(255,255,255,0.06); color: var(--text-muted); }

/* Emails inside folders */
.folder-emails {
  padding: 8px 14px 14px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.folder-emails-collapsed { padding-bottom: 10px; }

.femail {
  background: rgba(255,255,255,0.03);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 10px 14px;
}

.femail-highlighted {
  background: rgba(239,68,68,0.06);
  border-color: rgba(239,68,68,0.25);
  box-shadow: 0 0 0 1px rgba(239,68,68,0.1);
}

.femail-top {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 4px;
  flex-wrap: wrap;
}

.femail-sender {
  font-size: 13px;
  font-weight: 700;
  color: var(--text-primary);
}

.badge-urgent {
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.05em;
  padding: 2px 8px;
  background: #ef4444;
  color: #fff;
  border-radius: 4px;
  text-transform: uppercase;
}

.femail-time {
  font-size: 11px;
  color: var(--text-muted);
  margin-left: auto;
}

.femail-subject {
  font-size: 13px;
  color: var(--text-secondary);
  font-weight: 500;
}

.femail-preview {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 6px;
  line-height: 1.5;
  padding: 8px 10px;
  background: rgba(255,255,255,0.03);
  border-radius: 6px;
  border-left: 2px solid rgba(239,68,68,0.4);
}

.femail-actions {
  display: flex;
  gap: 8px;
  margin-top: 10px;
}

.femail-btn {
  padding: 7px 14px;
  border-radius: var(--radius-sm);
  font-size: 12px;
  font-weight: 700;
  font-family: var(--font-body);
  border: none;
  transition: opacity 0.2s, transform 0.15s;
}

.femail-btn:hover { transform: translateY(-1px); opacity: 0.85; }

.femail-btn-primary {
  background: var(--primary);
  color: #000;
}

.femail-btn-secondary {
  background: var(--surface-elevated);
  color: var(--text-secondary);
  border: 1px solid var(--border-primary);
}

.femail-more {
  font-size: 12px;
  color: var(--text-muted);
  font-style: italic;
  text-align: center;
  padding: 4px 0 2px;
}

/* ============================================================
   SCROLLBAR
============================================================ */
.chat-box::-webkit-scrollbar {
  width: 4px;
}

.chat-box::-webkit-scrollbar-track {
  background: transparent;
}

.chat-box::-webkit-scrollbar-thumb {
  background: var(--border-primary);
  border-radius: 100px;
}
