/* Cabinet IA Avocat — design dedicated standalone site
 * Palette: deep navy + burgundy + cream/ivory + gold accent
 * Typography: serif (Cormorant Garamond) for display + Inter for body
 * Vibes: cabinet d'avocat classique revisité, pas chatbot générique
 */

:root {
  --navy: #0f172a;
  --navy-soft: #1e293b;
  --navy-ink: #0b1220;
  --burgundy: #7a1c2e;
  --burgundy-soft: #9a2840;
  --gold: #c7a962;
  --gold-soft: #e4cd92;
  --ivory: #f7f3ea;
  --ivory-soft: #faf6ef;
  --paper: #f2ead9;
  --ink: #1a1611;
  --muted: #6b6658;
  --border: rgba(26, 22, 17, 0.12);
  --shadow-card: 0 4px 24px -8px rgba(15, 23, 42, 0.15);
  --shadow-elev: 0 16px 48px -12px rgba(15, 23, 42, 0.25);
  --font-display: "Cormorant Garamond", "Playfair Display", Georgia, serif;
  --font-body: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-mono: "JetBrains Mono", Menlo, Consolas, monospace;
}

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

html {
  font-size: 16px;
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-body);
  background:
    radial-gradient(ellipse at top, rgba(199, 169, 98, 0.08) 0%, transparent 50%),
    linear-gradient(180deg, var(--ivory) 0%, var(--ivory-soft) 100%);
  color: var(--ink);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  min-height: 100vh;
}

a {
  color: var(--burgundy);
  text-decoration: none;
  transition: color 0.2s ease;
}

a:hover {
  color: var(--burgundy-soft);
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* ===== NAVIGATION ===== */
.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: blur(12px);
  background: rgba(247, 243, 234, 0.85);
  border-bottom: 1px solid var(--border);
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.5rem;
  max-width: 1200px;
  margin: 0 auto;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 500;
  color: var(--navy);
  letter-spacing: 0.01em;
}

.brand-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--navy) 0%, var(--navy-soft) 100%);
  color: var(--gold);
  font-weight: 700;
  font-size: 0.9rem;
}

.brand-meta {
  font-family: var(--font-body);
  font-size: 0.7rem;
  font-weight: 500;
  color: var(--muted);
  letter-spacing: 0.15em;
  text-transform: uppercase;
  margin-top: -0.25rem;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  list-style: none;
  font-size: 0.9rem;
}

.nav-links a {
  color: var(--ink);
  font-weight: 500;
  position: relative;
}

.nav-links a::after {
  content: "";
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--gold);
  transition: width 0.3s ease;
}

.nav-links a:hover::after {
  width: 100%;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.5rem;
  border-radius: 999px;
  font-family: var(--font-body);
  font-size: 0.9rem;
  font-weight: 500;
  border: none;
  cursor: pointer;
  transition: all 0.2s ease;
  text-decoration: none;
  line-height: 1;
}

.btn-primary {
  background: var(--navy);
  color: var(--ivory);
}

.btn-primary:hover {
  background: var(--navy-soft);
  color: var(--gold-soft);
  transform: translateY(-1px);
  box-shadow: var(--shadow-elev);
}

.btn-secondary {
  background: transparent;
  color: var(--navy);
  border: 1px solid var(--navy);
}

.btn-secondary:hover {
  background: var(--navy);
  color: var(--ivory);
}

.btn-gold {
  background: var(--gold);
  color: var(--navy-ink);
  font-weight: 600;
}

.btn-gold:hover {
  background: var(--gold-soft);
  transform: translateY(-1px);
  box-shadow: 0 8px 24px rgba(199, 169, 98, 0.4);
}

/* ===== HERO ===== */
.hero {
  padding: 6rem 0 5rem;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: "§";
  position: absolute;
  top: 2rem;
  right: -3rem;
  font-family: var(--font-display);
  font-size: 32rem;
  color: var(--gold);
  opacity: 0.04;
  line-height: 1;
  pointer-events: none;
}

.hero-inner {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 4rem;
  align-items: center;
}

.hero-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.35rem 0.9rem;
  border-radius: 999px;
  background: rgba(122, 28, 46, 0.08);
  color: var(--burgundy);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  margin-bottom: 1.5rem;
}

.hero h1 {
  font-family: var(--font-display);
  font-size: clamp(2.5rem, 5vw, 4.25rem);
  font-weight: 500;
  line-height: 1.1;
  color: var(--navy);
  letter-spacing: -0.02em;
  margin-bottom: 1.5rem;
}

.hero h1 em {
  font-style: italic;
  color: var(--burgundy);
  position: relative;
}

.hero h1 em::after {
  content: "";
  position: absolute;
  bottom: 0.15em;
  left: 0;
  right: 0;
  height: 0.08em;
  background: var(--gold);
  opacity: 0.5;
}

.hero p.lead {
  font-size: 1.15rem;
  color: var(--muted);
  max-width: 38rem;
  margin-bottom: 2rem;
}

.hero-cta {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

.hero-proof {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: 2rem;
  font-size: 0.85rem;
  color: var(--muted);
}

.hero-proof-dot {
  width: 0.5rem;
  height: 0.5rem;
  border-radius: 50%;
  background: #10b981;
  box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.2);
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}

/* ===== HERO VISUAL ===== */
.hero-visual {
  position: relative;
  aspect-ratio: 4 / 5;
  max-width: 400px;
  margin-left: auto;
}

.hero-card {
  position: absolute;
  background: var(--ivory-soft);
  border: 1px solid var(--border);
  border-radius: 1rem;
  padding: 1.25rem;
  box-shadow: var(--shadow-elev);
  font-family: var(--font-body);
  font-size: 0.8rem;
}

.hero-card-1 {
  top: 0;
  left: 0;
  right: 3rem;
  background: var(--navy);
  color: var(--ivory-soft);
  padding: 1.5rem;
}

.hero-card-1-label {
  font-size: 0.65rem;
  color: var(--gold);
  letter-spacing: 0.15em;
  text-transform: uppercase;
  margin-bottom: 0.5rem;
}

.hero-card-1-title {
  font-family: var(--font-display);
  font-size: 1.25rem;
  line-height: 1.3;
  margin-bottom: 0.75rem;
}

.hero-card-1-meta {
  display: flex;
  gap: 1rem;
  font-size: 0.7rem;
  opacity: 0.7;
}

.hero-card-2 {
  top: 30%;
  right: 0;
  left: 3rem;
  transform: rotate(3deg);
}

.hero-card-2 h4 {
  font-family: var(--font-display);
  font-size: 1rem;
  color: var(--burgundy);
  margin-bottom: 0.5rem;
}

.hero-card-2 p {
  color: var(--ink);
  font-size: 0.8rem;
  line-height: 1.5;
}

.hero-card-2 .citation {
  margin-top: 0.75rem;
  padding-top: 0.75rem;
  border-top: 1px dashed var(--border);
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--muted);
}

.hero-card-3 {
  bottom: 0;
  left: 0;
  right: 6rem;
  transform: rotate(-2deg);
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 1rem;
}

.hero-card-3-icon {
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 50%;
  background: var(--gold);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--navy-ink);
  font-weight: 700;
  flex-shrink: 0;
}

.hero-card-3 strong {
  display: block;
  color: var(--navy);
}

.hero-card-3 small {
  color: var(--muted);
  font-size: 0.7rem;
}

/* ===== SECTIONS ===== */
.section {
  padding: 5rem 0;
}

.section-dark {
  background: var(--navy);
  color: var(--ivory);
}

.section-dark h2,
.section-dark h3 {
  color: var(--ivory);
}

.section-header {
  text-align: center;
  max-width: 42rem;
  margin: 0 auto 3rem;
}

.section-label {
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--burgundy);
  margin-bottom: 0.75rem;
}

.section-dark .section-label {
  color: var(--gold);
}

h2 {
  font-family: var(--font-display);
  font-size: clamp(2rem, 3.5vw, 3rem);
  font-weight: 500;
  line-height: 1.15;
  color: var(--navy);
  letter-spacing: -0.01em;
}

h3 {
  font-family: var(--font-display);
  font-size: 1.5rem;
  color: var(--navy);
}

/* ===== FEATURES GRID ===== */
.features {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.5rem;
}

.feature {
  background: var(--ivory-soft);
  border: 1px solid var(--border);
  border-radius: 1rem;
  padding: 2rem 1.75rem;
  transition: all 0.3s ease;
}

.feature:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-elev);
  border-color: var(--gold);
}

.feature-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 3rem;
  height: 3rem;
  border-radius: 0.75rem;
  background: var(--navy);
  color: var(--gold);
  font-size: 1.25rem;
  margin-bottom: 1.25rem;
}

.feature h3 {
  font-size: 1.25rem;
  margin-bottom: 0.75rem;
}

.feature p {
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.6;
}

/* ===== PROOF BAR ===== */
.proof-bar {
  padding: 3rem 0;
  background: var(--navy-ink);
  color: var(--ivory);
}

.proof-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 2rem;
  text-align: center;
}

.proof-item-num {
  font-family: var(--font-display);
  font-size: 2.5rem;
  color: var(--gold);
  font-weight: 500;
  line-height: 1;
  margin-bottom: 0.5rem;
}

.proof-item-label {
  font-size: 0.8rem;
  color: var(--ivory);
  opacity: 0.7;
  letter-spacing: 0.05em;
}

/* ===== HOW IT WORKS ===== */
.steps {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 2rem;
  counter-reset: step;
}

.step {
  position: relative;
  padding-top: 3rem;
}

.step::before {
  counter-increment: step;
  content: counter(step, decimal-leading-zero);
  position: absolute;
  top: 0;
  left: 0;
  font-family: var(--font-display);
  font-size: 2.5rem;
  color: var(--gold);
  font-weight: 500;
  line-height: 1;
}

.step h3 {
  color: var(--ivory);
  margin-bottom: 0.75rem;
}

.step p {
  color: rgba(247, 243, 234, 0.7);
  font-size: 0.9rem;
}

/* ===== CTA SECTION ===== */
.cta-section {
  padding: 5rem 0;
  text-align: center;
  background:
    radial-gradient(ellipse at center, rgba(199, 169, 98, 0.15) 0%, transparent 70%),
    var(--ivory);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.cta-section h2 {
  max-width: 42rem;
  margin: 0 auto 1.5rem;
}

.cta-section p {
  color: var(--muted);
  max-width: 36rem;
  margin: 0 auto 2rem;
  font-size: 1.05rem;
}

.cta-form {
  display: flex;
  gap: 0.75rem;
  max-width: 400px;
  margin: 0 auto;
  flex-wrap: wrap;
  justify-content: center;
}

.cta-form input {
  flex: 1;
  min-width: 200px;
  padding: 0.85rem 1.25rem;
  border-radius: 999px;
  border: 1px solid var(--border);
  font-family: var(--font-body);
  font-size: 0.9rem;
  background: var(--ivory-soft);
  color: var(--ink);
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.cta-form input:focus {
  outline: none;
  border-color: var(--gold);
  box-shadow: 0 0 0 4px rgba(199, 169, 98, 0.15);
}

.cta-hint {
  margin-top: 1rem;
  font-size: 0.75rem;
  color: var(--muted);
  font-style: italic;
}

/* ===== FOOTER ===== */
.footer {
  padding: 3rem 0 2rem;
  background: var(--navy-ink);
  color: rgba(247, 243, 234, 0.6);
  font-size: 0.85rem;
}

.footer-inner {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 2rem;
  margin-bottom: 2rem;
}

.footer h4 {
  color: var(--gold);
  font-family: var(--font-body);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  margin-bottom: 1rem;
}

.footer ul {
  list-style: none;
}

.footer li {
  margin-bottom: 0.5rem;
}

.footer a {
  color: rgba(247, 243, 234, 0.6);
}

.footer a:hover {
  color: var(--gold);
}

.footer-bottom {
  padding-top: 1.5rem;
  border-top: 1px solid rgba(247, 243, 234, 0.1);
  text-align: center;
  font-size: 0.75rem;
}

/* ===== APP CHAT PAGE ===== */
.app-layout {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.app-header {
  background: var(--navy);
  color: var(--ivory);
  padding: 1rem 1.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid rgba(199, 169, 98, 0.2);
}

.app-main {
  flex: 1;
  display: flex;
  max-width: 900px;
  width: 100%;
  margin: 0 auto;
  padding: 1.5rem;
  flex-direction: column;
}

.chat-log {
  flex: 1;
  overflow-y: auto;
  padding: 1rem 0;
}

.chat-welcome {
  text-align: center;
  padding: 4rem 1rem;
}

.chat-welcome h2 {
  margin-bottom: 1rem;
}

.chat-welcome p {
  color: var(--muted);
  max-width: 36rem;
  margin: 0 auto 2rem;
}

.quick-prompts {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  justify-content: center;
}

.quick-prompt {
  padding: 0.5rem 1rem;
  border-radius: 999px;
  background: var(--ivory-soft);
  border: 1px solid var(--border);
  font-size: 0.85rem;
  color: var(--ink);
  cursor: pointer;
  transition: all 0.2s ease;
  font-family: var(--font-body);
}

.quick-prompt:hover {
  border-color: var(--gold);
  background: rgba(199, 169, 98, 0.1);
}

.msg {
  margin: 1rem 0;
  display: flex;
  gap: 0.75rem;
  align-items: flex-start;
}

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

.msg-avatar {
  flex-shrink: 0;
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  font-size: 0.85rem;
}

.msg.user .msg-avatar {
  background: var(--burgundy);
  color: var(--ivory);
}

.msg.assistant .msg-avatar {
  background: var(--navy);
  color: var(--gold);
}

.msg-bubble {
  max-width: calc(100% - 3rem);
  background: var(--ivory-soft);
  border: 1px solid var(--border);
  padding: 0.85rem 1.15rem;
  border-radius: 0.85rem;
  line-height: 1.65;
}

.msg.user .msg-bubble {
  background: rgba(122, 28, 46, 0.08);
  border-color: rgba(122, 28, 46, 0.15);
}

.msg-bubble pre {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  background: var(--navy-ink);
  color: var(--ivory);
  padding: 0.75rem;
  border-radius: 0.5rem;
  overflow-x: auto;
  margin: 0.5rem 0;
}

.msg-bubble code {
  font-family: var(--font-mono);
  font-size: 0.85em;
  background: rgba(15, 23, 42, 0.05);
  padding: 0.1em 0.3em;
  border-radius: 0.25em;
}

.msg-meta {
  font-size: 0.7rem;
  color: var(--muted);
  margin-top: 0.5rem;
  padding-top: 0.5rem;
  border-top: 1px dashed var(--border);
  display: flex;
  gap: 0.75rem;
  align-items: center;
}

.chat-composer {
  border-top: 1px solid var(--border);
  padding-top: 1rem;
  display: flex;
  gap: 0.75rem;
  align-items: flex-end;
}

.chat-composer textarea {
  flex: 1;
  min-height: 3rem;
  max-height: 12rem;
  padding: 0.85rem 1.15rem;
  border-radius: 0.85rem;
  border: 1px solid var(--border);
  font-family: var(--font-body);
  font-size: 0.95rem;
  background: var(--ivory-soft);
  color: var(--ink);
  resize: vertical;
  line-height: 1.5;
}

.chat-composer textarea:focus {
  outline: none;
  border-color: var(--navy);
  box-shadow: 0 0 0 4px rgba(15, 23, 42, 0.08);
}

.jurisdiction-switch {
  display: inline-flex;
  background: var(--ivory-soft);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 0.25rem;
  gap: 0.25rem;
}

.jurisdiction-switch button {
  padding: 0.35rem 0.85rem;
  border-radius: 999px;
  border: none;
  background: transparent;
  color: var(--muted);
  font-size: 0.75rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  letter-spacing: 0.05em;
}

.jurisdiction-switch button.active {
  background: var(--navy);
  color: var(--ivory);
}

.banner-local {
  background: var(--navy-ink);
  color: var(--ivory);
  padding: 0.5rem 1rem;
  text-align: center;
  font-size: 0.75rem;
  letter-spacing: 0.05em;
}

.banner-local .dot {
  display: inline-block;
  width: 0.5rem;
  height: 0.5rem;
  background: #10b981;
  border-radius: 50%;
  margin-right: 0.5rem;
  animation: pulse 2s infinite;
  vertical-align: middle;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 900px) {
  .hero-inner {
    grid-template-columns: 1fr;
  }
  .hero-visual {
    display: none;
  }
  .footer-inner {
    grid-template-columns: 1fr;
  }
  .nav-links {
    display: none;
  }
}

/* Google Fonts load hint */
@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:ital,wght@0,400;0,500;0,600;1,400;1,500&family=Inter:wght@400;500;600;700&family=JetBrains+Mono:wght@400;500&display=swap');
