/* ============================================================
   TableLibre — Landing page
   ============================================================ */

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

:root {
  --red:       #dc2626;
  --red-dark:  #b91c1c;
  --red-light: #fef2f2;
  --text:      #111827;
  --text-2:    #4b5563;
  --muted:     #9ca3af;
  --border:    #e5e7eb;
  --bg-alt:    #f9fafb;
  --radius:    10px;
  --shadow:    0 1px 3px rgba(0,0,0,.1), 0 1px 2px rgba(0,0,0,.06);
  --shadow-lg: 0 10px 40px rgba(0,0,0,.12), 0 4px 12px rgba(0,0,0,.08);
}

html { scroll-behavior: smooth; }

body {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  color: var(--text);
  background: #fff;
  line-height: 1.6;
}

.container {
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ============================================================
   Header
   ============================================================ */
.site-header {
  position: sticky;
  top: 0;
  background: rgba(255,255,255,.95);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
  z-index: 100;
}

.header-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 60px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
}

.logo-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--red);
  box-shadow: 0 0 0 3px rgba(220,38,38,.15);
  flex-shrink: 0;
}

.logo-dot--sm { width: 9px; height: 9px; }

.logo-text {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.4px;
}

.btn-nav {
  background: var(--red);
  color: #fff;
  text-decoration: none;
  padding: 8px 18px;
  border-radius: 8px;
  font-size: 0.85rem;
  font-weight: 600;
  transition: background .15s;
}

.btn-nav:hover { background: var(--red-dark); }

/* ============================================================
   Hero
   ============================================================ */
.hero {
  padding: 80px 0 72px;
  background: linear-gradient(160deg, #fff 60%, #fef2f2 100%);
  overflow: hidden;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
  align-items: center;
}

.hero-eyebrow {
  display: inline-block;
  background: var(--red-light);
  color: var(--red);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: .5px;
  text-transform: uppercase;
  padding: 4px 12px;
  border-radius: 999px;
  margin-bottom: 20px;
}

.hero-title {
  font-size: clamp(1.75rem, 3vw, 2.5rem);
  font-weight: 800;
  line-height: 1.2;
  letter-spacing: -0.6px;
  color: var(--text);
  margin-bottom: 20px;
}

.hero-sub {
  font-size: 1.05rem;
  color: var(--text-2);
  line-height: 1.65;
  margin-bottom: 32px;
  max-width: 500px;
}

/* Email form */
.email-form { max-width: 500px; }
.email-form--centered { margin: 0 auto; }

.input-row {
  display: flex;
  gap: 8px;
  margin-bottom: 10px;
}

.input-row input {
  flex: 1;
  border: 1.5px solid var(--border);
  border-radius: 8px;
  padding: 12px 14px;
  font-size: 0.95rem;
  color: var(--text);
  outline: none;
  transition: border-color .15s;
  min-width: 0;
}

.input-row input::placeholder { color: var(--muted); }
.input-row input:focus { border-color: var(--red); }

.input-row button {
  background: var(--red);
  color: #fff;
  border: none;
  border-radius: 8px;
  padding: 12px 20px;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: background .15s;
  flex-shrink: 0;
}

.input-row button:hover { background: var(--red-dark); }

.form-reassurance {
  font-size: 0.75rem;
  color: var(--muted);
  margin-top: 6px;
}

.form-ok {
  display: flex;
  align-items: center;
  gap: 8px;
  background: #f0fdf4;
  border: 1px solid #bbf7d0;
  border-radius: 8px;
  padding: 10px 14px;
  font-size: 0.85rem;
  color: #15803d;
  font-weight: 500;
  margin-bottom: 8px;
}

.ok-icon { font-size: 1rem; }

/* ============================================================
   Map mockup (hero visual)
   ============================================================ */
.hero-visual { position: relative; }

.map-mockup {
  position: relative;
  width: 100%;
  aspect-ratio: 4/3;
  background: #e8ede0;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  border: 1px solid rgba(0,0,0,.06);
}

/* Street lines */
.map-street {
  position: absolute;
  background: rgba(255,255,255,.7);
}

.map-street.h { left: 0; right: 0; height: 3px; }
.map-street.v { top: 0; bottom: 0; width: 3px; }

/* Pin markers */
.map-pin {
  position: absolute;
  width: 22px;
  height: 30px;
  transform: translate(-50%, -100%);
  filter: drop-shadow(0 2px 3px rgba(0,0,0,.3));
}

.map-pin::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 50% 50% 50% 0;
  transform: rotate(-45deg);
  border: 2.5px solid white;
}

.map-pin::after {
  content: '';
  position: absolute;
  top: 5px; left: 50%;
  transform: translateX(-50%);
  width: 8px; height: 8px;
  border-radius: 50%;
  background: white;
}

.map-pin.lj::before  { background: #dc2626; }
.map-pin.rj::before  { background: #fb923c; }
.map-pin.conv::before{ background: #7f1d1d; }

.map-pin.active { z-index: 10; filter: drop-shadow(0 3px 6px rgba(220,38,38,.5)); }
.map-pin.active::before { width: 26px; height: 34px; top: -2px; left: -2px; }

/* Popup */
.map-popup {
  position: absolute;
  top: 12%;
  left: 40%;
  background: white;
  border-radius: 10px;
  padding: 10px 12px;
  box-shadow: 0 4px 20px rgba(0,0,0,.18);
  min-width: 180px;
  font-size: 0.72rem;
  z-index: 20;
  border: 1px solid var(--border);
}

.mp-badge {
  display: inline-block;
  padding: 1px 7px;
  border-radius: 4px;
  font-size: 0.62rem;
  font-weight: 700;
  margin-bottom: 5px;
  letter-spacing: .3px;
}

.mp-badge.lj { background: #fef2f2; color: #dc2626; }

.mp-name { font-weight: 700; color: #111; margin-bottom: 3px; font-size: 0.78rem; }
.mp-addr { color: #6b7280; margin-bottom: 2px; }
.mp-mandataire { color: #6b7280; font-size: 0.68rem; margin-bottom: 5px; }
.mp-link { color: #2563eb; cursor: pointer; font-size: 0.7rem; }

/* Sidebar preview */
.map-sidebar {
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 38%;
  background: white;
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: 1px;
  padding: 8px 0;
  overflow: hidden;
}

.ms-item {
  padding: 7px 10px;
  border-left: 3px solid transparent;
  font-size: 0.7rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: white;
  color: #374151;
}

.ms-item span { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ms-item em { font-style: normal; color: #9ca3af; flex-shrink: 0; margin-left: 4px; }

.ms-item.lj  { border-left-color: #dc2626; }
.ms-item.rj  { border-left-color: #fb923c; }
.ms-item.conv{ border-left-color: #7f1d1d; }
.ms-item:first-child { background: #f9fafb; }

/* ============================================================
   Sections communes
   ============================================================ */
.section-alt   { background: var(--bg-alt); padding: 80px 0; }
.section-white { background: #fff; padding: 80px 0; }

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

.section-header h2 {
  font-size: clamp(1.4rem, 2.5vw, 2rem);
  font-weight: 800;
  letter-spacing: -0.4px;
  margin-bottom: 12px;
}

.section-header p {
  font-size: 1rem;
  color: var(--text-2);
  max-width: 560px;
  margin: 0 auto;
}

/* ============================================================
   Problème / Solution — 3 cartes
   ============================================================ */
.cards-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.ps-card {
  background: white;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px 24px;
  box-shadow: var(--shadow);
}

.ps-card--accent {
  border-color: #fca5a5;
  background: var(--red-light);
}

.ps-icon {
  font-size: 1.8rem;
  margin-bottom: 14px;
}

.ps-card h3 {
  font-size: 0.95rem;
  font-weight: 700;
  margin-bottom: 10px;
  line-height: 1.4;
}

.ps-card p {
  font-size: 0.875rem;
  color: var(--text-2);
  line-height: 1.6;
}

.ps-card--accent p { color: #7f1d1d; }

/* ============================================================
   Fonctionnalités — 3 cartes
   ============================================================ */
.features-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
}

.feature-card {
  padding: 28px 24px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  transition: box-shadow .2s, transform .2s;
}

.feature-card:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-2px);
}

.feature-icon {
  font-size: 2rem;
  margin-bottom: 16px;
}

.feature-card h3 {
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 10px;
}

.feature-card p {
  font-size: 0.875rem;
  color: var(--text-2);
  line-height: 1.6;
}

/* ============================================================
   Stats
   ============================================================ */
.section-dark {
  background: #111827;
  padding: 72px 0;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 48px;
}

.stat { text-align: center; }

.stat-number {
  font-size: clamp(2.5rem, 5vw, 3.5rem);
  font-weight: 900;
  color: var(--red);
  letter-spacing: -2px;
  line-height: 1;
  margin-bottom: 8px;
}

.stat-label {
  font-size: 1rem;
  font-weight: 700;
  color: #fff;
  margin-bottom: 8px;
}

.stat-desc {
  font-size: 0.8rem;
  color: #9ca3af;
  line-height: 1.5;
  max-width: 240px;
  margin: 0 auto;
}

/* ============================================================
   CTA 2
   ============================================================ */
.section-cta {
  background: linear-gradient(135deg, var(--red-light) 0%, #fff 60%);
  padding: 88px 0;
}

.cta-inner {
  text-align: center;
  max-width: 600px;
}

.cta-inner h2 {
  font-size: clamp(1.5rem, 3vw, 2.2rem);
  font-weight: 800;
  letter-spacing: -0.5px;
  margin-bottom: 12px;
}

.cta-inner > p {
  font-size: 1rem;
  color: var(--text-2);
  margin-bottom: 32px;
}

/* ============================================================
   Footer
   ============================================================ */
.site-footer {
  background: #f3f4f6;
  border-top: 1px solid var(--border);
  padding: 28px 0;
}

.footer-inner {
  display: flex;
  flex-direction: column;
  gap: 8px;
  align-items: center;
  text-align: center;
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 6px;
  font-weight: 700;
  font-size: 0.9rem;
  color: var(--text);
}

.footer-sources {
  font-size: 0.74rem;
  color: var(--muted);
  line-height: 1.8;
}

.footer-sources a {
  color: var(--muted);
  text-decoration: none;
}

.footer-sources a:hover {
  color: var(--text-2);
  text-decoration: underline;
}

.footer-legal a {
  font-size: 0.72rem;
  color: var(--muted);
  text-decoration: none;
}

.footer-legal a:hover { text-decoration: underline; }

/* ============================================================
   Utilitaires
   ============================================================ */
.hidden { display: none !important; }

/* ============================================================
   Responsive mobile
   ============================================================ */
@media (max-width: 768px) {
  .hero { padding: 48px 0 56px; }
  .hero-grid { grid-template-columns: 1fr; gap: 40px; }
  .hero-visual { display: none; }

  .cards-3,
  .features-grid,
  .stats-grid { grid-template-columns: 1fr; gap: 16px; }

  .input-row { flex-direction: column; }
  .input-row button { width: 100%; }

  .email-form { max-width: 100%; }
}

@media (max-width: 480px) {
  .hero-title { font-size: 1.6rem; }
  .section-alt,
  .section-white,
  .section-cta { padding: 48px 0; }
  .section-dark { padding: 48px 0; }
}
