/* =============================================
   ZAMBLE — Feuille de style principale v2
   Palette : Pistache #C5D86D | Crème #FAF3E0
             Terracotta #D4845A | Brun #3D2B1F
             Or #C8A84B | Encre #1A0F08
============================================= */

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

:root {
  --pistache:       #C5D86D;
  --pistache-light: #D8EE8A;
  --creme:          #FAF3E0;
  --creme-deep:     #F0E6C8;
  --terracotta:     #D4845A;
  --terracotta-dark:#B8623A;
  --brun:           #3D2B1F;
  --brun-light:     #5C3D2E;
  --brun-mid:       #7A5240;
  --or:             #C8A84B;
  --encre:          #1A0F08;
  --beige:          #F5EDD8;
  --beige-border:   #E2D4B8;
  --text-muted:     #9C8570;
  --text-body:      #6B4F3A;
  --font-serif:     'Playfair Display', Georgia, serif;
  --font-sans:      'Lato', Arial, sans-serif;
  --radius:         4px;
  --radius-lg:      10px;
  --shadow-sm:      0 2px 8px rgba(61,43,31,0.08);
  --shadow:         0 6px 24px rgba(61,43,31,0.14);
  --shadow-lg:      0 16px 48px rgba(61,43,31,0.2);
  --transition:     0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

html { scroll-behavior: smooth; }
body { background: var(--creme); color: var(--brun); font-family: var(--font-sans); overflow-x: hidden; }
a { text-decoration: none; color: inherit; }
img { max-width: 100%; }
.container { max-width: 1160px; margin: 0 auto; padding: 0 2rem; }

/* =============================================
   NAVBAR
============================================= */
.navbar {
  background: var(--encre);
  position: sticky;
  top: 0;
  z-index: 100;
  border-bottom: 1px solid rgba(200,168,75,0.15);
}
.nav-inner {
  max-width: 1160px;
  margin: 0 auto;
  padding: 0 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 68px;
}
.logo {
  font-family: var(--font-serif);
  font-size: 1.9rem;
  font-weight: 900;
  color: var(--pistache);
  letter-spacing: 3px;
  cursor: pointer;
  position: relative;
}
.logo span { color: var(--terracotta); font-style: italic; }
.logo::after {
  content: '';
  position: absolute;
  bottom: -2px; left: 0; right: 0;
  height: 1px;
  background: linear-gradient(90deg, var(--or), transparent);
  opacity: 0.5;
}
.nav-links { display: flex; gap: 1.8rem; align-items: center; }
.nav-links a {
  color: rgba(250,243,224,0.7);
  font-size: 0.8rem;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  transition: color var(--transition);
  position: relative;
}
.nav-links a::after {
  content: '';
  position: absolute;
  bottom: -4px; left: 0;
  width: 0; height: 1px;
  background: var(--pistache);
  transition: width var(--transition);
}
.nav-links a:hover { color: var(--creme); }
.nav-links a:hover::after { width: 100%; }
.btn-outline {
  border: 1px solid rgba(200,168,75,0.35) !important;
  padding: 0 18px !important;
  height: 36px !important;
  line-height: 1 !important;
  border-radius: var(--radius);
  color: var(--or) !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  flex-direction: row !important;
  font-size: 0.78rem !important;
  letter-spacing: 1.5px !important;
  white-space: nowrap !important;
  transition: all var(--transition) !important;
  box-sizing: border-box !important;
}
.btn-outline:hover {
  border-color: var(--or) !important;
  background: rgba(200,168,75,0.1) !important;
}
.btn-outline::after { display: none !important; }
.btn-cta {
  background: var(--pistache) !important;
  color: var(--brun) !important;
  padding: 0 18px !important;
  height: 36px !important;
  line-height: 1 !important;
  border-radius: var(--radius);
  font-weight: 700;
  font-size: 0.78rem !important;
  letter-spacing: 1.5px !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  flex-direction: row !important;
  white-space: nowrap !important;
  transition: all var(--transition) !important;
  box-sizing: border-box !important;
}
.btn-cta:hover { background: var(--pistache-light) !important; transform: translateY(-1px); }
.btn-cta::after { display: none !important; }

/* État connecté : Mon profil — forcé en ligne */
.btn-cta-profile {
  flex-direction: row !important;
  height: 36px !important;
  padding: 0 14px !important;
  gap: 0 !important;
}
.nav-burger { display: none; background: none; border: none; color: var(--creme); font-size: 1.5rem; cursor: pointer; }

/* =============================================
   HERO
============================================= */
.hero {
  position: relative;
  min-height: 88vh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background: var(--encre);
}
.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    radial-gradient(ellipse 80% 70% at 60% 50%, rgba(92,61,46,0.6) 0%, transparent 70%),
    radial-gradient(ellipse 40% 60% at 15% 80%, rgba(212,132,90,0.12) 0%, transparent 60%),
    radial-gradient(ellipse 60% 40% at 85% 20%, rgba(197,216,109,0.06) 0%, transparent 60%);
  pointer-events: none;
}
.hero::after {
  content: '';
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 3px;
  background: linear-gradient(90deg,
    transparent 0%,
    var(--or) 20%,
    var(--terracotta) 50%,
    var(--pistache) 80%,
    transparent 100%
  );
  opacity: 0.6;
}
.hero-books-left {
  position: absolute;
  left: 0; bottom: 0; top: 0;
  width: 100px;
  display: flex;
  align-items: flex-end;
  padding-bottom: 3px;
  gap: 4px;
  padding-left: 16px;
  opacity: 0.18;
  pointer-events: none;
}
.hero-books-right {
  position: absolute;
  right: 0; bottom: 0; top: 0;
  width: 100px;
  display: flex;
  align-items: flex-end;
  padding-bottom: 3px;
  gap: 4px;
  padding-right: 16px;
  justify-content: flex-end;
  opacity: 0.15;
  pointer-events: none;
}
.hero-book-deco {
  width: 16px;
  border-radius: 2px 2px 0 0;
}
.hero-content {
  position: relative;
  text-align: center;
  max-width: 820px;
  padding: 4rem 2rem;
  animation: heroFadeUp 1s ease forwards;
}
@keyframes heroFadeUp {
  from { opacity: 0; transform: translateY(30px); }
  to   { opacity: 1; transform: translateY(0); }
}
.hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 0.68rem;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: var(--or);
  margin-bottom: 1.8rem;
  animation: heroFadeUp 1s 0.1s ease both;
}
.hero-eyebrow::before,
.hero-eyebrow::after {
  content: '';
  display: block;
  height: 1px;
  width: 36px;
  background: var(--or);
  opacity: 0.5;
}
.hero h1 {
  font-family: var(--font-serif);
  font-size: clamp(2.8rem, 6.5vw, 5rem);
  font-weight: 900;
  color: var(--creme);
  line-height: 1.08;
  margin-bottom: 1.4rem;
  letter-spacing: -0.5px;
  animation: heroFadeUp 1s 0.2s ease both;
}
.hero h1 em {
  color: var(--pistache);
  font-style: italic;
}
.hero-sub {
  color: rgba(250,243,224,0.55);
  font-size: 1.1rem;
  font-weight: 300;
  letter-spacing: 0.3px;
  line-height: 1.7;
  margin-bottom: 2.8rem;
  max-width: 540px;
  margin-left: auto;
  margin-right: auto;
  animation: heroFadeUp 1s 0.3s ease both;
}
.hero-actions {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 3rem;
  animation: heroFadeUp 1s 0.4s ease both;
}
.btn-primary {
  background: var(--pistache);
  color: var(--brun);
  padding: 15px 36px;
  font-weight: 700;
  font-size: 0.82rem;
  letter-spacing: 2px;
  text-transform: uppercase;
  border: none;
  cursor: pointer;
  border-radius: var(--radius);
  transition: all var(--transition);
  display: inline-block;
}
.btn-primary:hover { background: var(--pistache-light); transform: translateY(-2px); box-shadow: 0 8px 20px rgba(197,216,109,0.3); }
.btn-secondary {
  background: transparent;
  color: var(--creme);
  padding: 15px 36px;
  font-size: 0.82rem;
  letter-spacing: 2px;
  text-transform: uppercase;
  border: 1px solid rgba(250,243,224,0.25);
  cursor: pointer;
  border-radius: var(--radius);
  transition: all var(--transition);
  display: inline-block;
}
.btn-secondary:hover { border-color: var(--pistache); color: var(--pistache); transform: translateY(-2px); }
.hero-trust {
  display: flex;
  gap: 2rem;
  justify-content: center;
  flex-wrap: wrap;
  animation: heroFadeUp 1s 0.5s ease both;
}
.hero-trust-item {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.73rem;
  color: rgba(250,243,224,0.38);
  letter-spacing: 0.5px;
}
.hero-trust-item .trust-icon { color: var(--pistache); font-size: 0.85rem; }

/* =============================================
   SEARCH BAR
============================================= */
.search-bar {
  background: var(--brun);
  padding: 0;
  box-shadow: 0 8px 32px rgba(26,15,8,0.35);
}
.search-inner {
  display: flex;
  max-width: 760px;
  margin: 0 auto;
}
.search-inner input {
  flex: 1;
  padding: 18px 24px;
  font-size: 0.95rem;
  border: none;
  background: rgba(250,243,224,0.08);
  color: var(--creme);
  outline: none;
  font-family: var(--font-sans);
  border-top: 3px solid transparent;
  transition: all var(--transition);
}
.search-inner input::placeholder { color: rgba(250,243,224,0.28); }
.search-inner input:focus { background: rgba(250,243,224,0.12); border-top-color: var(--pistache); }
.search-inner button {
  background: var(--pistache);
  color: var(--brun);
  padding: 18px 36px;
  border: none;
  font-weight: 700;
  font-size: 0.78rem;
  letter-spacing: 2px;
  text-transform: uppercase;
  cursor: pointer;
  transition: all var(--transition);
  font-family: var(--font-sans);
  white-space: nowrap;
}
.search-inner button:hover { background: var(--pistache-light); }

/* =============================================
   STATS
============================================= */
.stats-section {
  background: var(--brun);
  border-top: 1px solid rgba(200,168,75,0.1);
  padding: 2.5rem 2rem;
}
.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  max-width: 1160px;
  margin: 0 auto;
}
.stat {
  text-align: center;
  padding: 1rem 1.5rem;
  position: relative;
}
.stat + .stat::before {
  content: '';
  position: absolute;
  left: 0; top: 20%; bottom: 20%;
  width: 1px;
  background: rgba(200,168,75,0.12);
}
.stat-n {
  font-family: var(--font-serif);
  font-size: 2.8rem;
  font-weight: 900;
  color: var(--pistache);
  line-height: 1;
  display: block;
}
.stat-l {
  font-size: 0.68rem;
  color: rgba(250,243,224,0.35);
  letter-spacing: 1.5px;
  text-transform: uppercase;
  margin-top: 6px;
  display: block;
}

/* =============================================
   SECTIONS COMMUNES
============================================= */
.section-label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.66rem;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: var(--terracotta);
  margin-bottom: 0.7rem;
}
.section-label::before {
  content: '';
  display: block;
  width: 24px; height: 1px;
  background: var(--terracotta);
}
.section-title {
  font-family: var(--font-serif);
  font-size: clamp(1.7rem, 3vw, 2.4rem);
  font-weight: 700;
  margin-bottom: 0.5rem;
  line-height: 1.2;
}
.section-sub {
  font-size: 0.95rem;
  color: var(--text-muted);
  line-height: 1.65;
  max-width: 520px;
}
.features-header { margin-bottom: 3.5rem; }

/* =============================================
   FEATURES
============================================= */
.features-section {
  padding: 6rem 2rem;
  background: var(--creme);
  position: relative;
}
.features-section::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--beige-border), transparent);
}
.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.5rem;
}
.feature-card {
  background: white;
  border: 1px solid var(--beige-border);
  padding: 2.2rem 2rem;
  border-radius: var(--radius-lg);
  transition: all var(--transition);
  position: relative;
  overflow: hidden;
}
.feature-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--terracotta), var(--or));
  transform: scaleX(0);
  transform-origin: left;
  transition: transform var(--transition);
}
.feature-card:hover { box-shadow: var(--shadow); transform: translateY(-4px); }
.feature-card:hover::before { transform: scaleX(1); }
.feat-icon { font-size: 2.2rem; margin-bottom: 1.2rem; display: block; }
.feature-card h3 { font-family: var(--font-serif); font-size: 1.15rem; margin-bottom: 0.7rem; color: var(--brun); }
.feature-card p { font-size: 0.875rem; color: var(--text-body); line-height: 1.7; }

/* =============================================
   HOW IT WORKS
============================================= */
.how-section {
  padding: 6rem 2rem;
  background: var(--beige);
}
.steps-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0;
  margin-top: 3.5rem;
  position: relative;
}
.steps-grid::before {
  content: '';
  position: absolute;
  top: 26px;
  left: calc(16.66% + 26px);
  right: calc(16.66% + 26px);
  height: 1px;
  background: linear-gradient(90deg, var(--beige-border), var(--or), var(--beige-border));
  opacity: 0.5;
}
.step { text-align: center; padding: 0 2rem 2rem; }
.step-num {
  width: 52px; height: 52px;
  background: var(--brun);
  color: var(--pistache);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-serif);
  font-size: 1.4rem;
  font-weight: 900;
  margin: 0 auto 1.5rem;
  position: relative;
  z-index: 1;
  box-shadow: 0 0 0 6px var(--beige), 0 0 0 7px var(--beige-border);
}
.step h3 { font-family: var(--font-serif); font-size: 1.15rem; margin-bottom: 0.6rem; color: var(--brun); }
.step p { font-size: 0.875rem; color: var(--text-body); line-height: 1.7; }

/* =============================================
   BANDEAU CTA
============================================= */
.cta-band {
  background: var(--brun);
  padding: 5rem 2rem;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.cta-band::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: repeating-linear-gradient(
    90deg,
    transparent,
    transparent 9px,
    rgba(200,168,75,0.025) 9px,
    rgba(200,168,75,0.025) 10px
  );
}
.cta-band-inner { position: relative; z-index: 1; }
.cta-band h2 {
  font-family: var(--font-serif);
  font-size: clamp(1.8rem, 4vw, 2.8rem);
  color: var(--creme);
  margin-bottom: 0.8rem;
}
.cta-band h2 em { color: var(--pistache); font-style: italic; }
.cta-band p {
  color: rgba(250,243,224,0.5);
  font-size: 0.95rem;
  margin-bottom: 2.2rem;
  max-width: 420px;
  margin-left: auto;
  margin-right: auto;
  line-height: 1.7;
}
.cta-band-actions { display: flex; gap: 1rem; justify-content: center; flex-wrap: wrap; }

/* =============================================
   SHELF (profil)
============================================= */
.shelf-container { margin-bottom: 2.5rem; }
.shelf-label {
  font-family: var(--font-serif);
  font-size: 1rem;
  color: var(--brun-mid);
  margin-bottom: 0.7rem;
  padding-left: 0.75rem;
  border-left: 3px solid var(--terracotta);
}
.shelf {
  background: linear-gradient(180deg, #c4a882 0%, #a88060 4px, #8B6843 4px);
  padding: 6px 10px 8px;
  border-radius: 2px;
  display: flex;
  gap: 3px;
  align-items: flex-end;
  min-height: 100px;
  box-shadow: 0 4px 12px rgba(61,43,31,0.25);
  overflow-x: auto;
}
.book-spine {
  min-width: 22px; max-width: 32px;
  border-radius: 2px 2px 0 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  padding-bottom: 6px;
  cursor: pointer;
  transition: all 0.15s;
  position: relative;
  flex-shrink: 0;
  box-shadow: 2px 0 4px rgba(0,0,0,0.2);
}
.book-spine:hover { transform: translateY(-6px); filter: brightness(1.12); }
.spine-title {
  writing-mode: vertical-rl;
  text-orientation: mixed;
  transform: rotate(180deg);
  font-size: 9px;
  color: rgba(255,255,255,0.8);
  font-family: var(--font-serif);
  letter-spacing: 0.5px;
  max-height: 80px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.book-dot { width: 6px; height: 6px; border-radius: 50%; margin-bottom: 4px; flex-shrink: 0; }
.dot-available { background: var(--pistache); }
.dot-unavailable { background: var(--terracotta); opacity: 0.6; }
.book-tooltip {
  display: none;
  position: absolute;
  bottom: calc(100% + 8px);
  left: 50%;
  transform: translateX(-50%);
  background: var(--brun);
  color: var(--creme);
  padding: 10px 12px;
  border-radius: var(--radius);
  font-size: 0.78rem;
  white-space: nowrap;
  box-shadow: var(--shadow);
  z-index: 10;
  line-height: 1.5;
  border-left: 3px solid var(--pistache);
}
.book-tooltip::after {
  content: '';
  position: absolute;
  top: 100%; left: 50%;
  transform: translateX(-50%);
  border: 5px solid transparent;
  border-top-color: var(--brun);
}
.book-spine:hover .book-tooltip { display: block; }

/* =============================================
   FORMS
============================================= */
.form-page { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 2rem; }
.form-card {
  background: white;
  border: 1px solid var(--beige-border);
  padding: 3rem;
  border-radius: var(--radius-lg);
  width: 100%;
  max-width: 460px;
  box-shadow: var(--shadow-lg);
  position: relative;
  overflow: hidden;
}
.form-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--terracotta), var(--or), var(--pistache));
}
.form-card h2 { font-family: var(--font-serif); font-size: 2rem; margin-bottom: 0.4rem; color: var(--brun); }
.form-card .form-sub { color: var(--text-muted); font-size: 0.875rem; margin-bottom: 2rem; }
.form-group { margin-bottom: 1.3rem; }
.form-group label {
  display: block;
  font-size: 0.73rem;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--text-body);
  margin-bottom: 0.5rem;
}
.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 12px 16px;
  border: 1px solid var(--beige-border);
  border-radius: var(--radius);
  font-family: var(--font-sans);
  font-size: 0.95rem;
  color: var(--brun);
  background: var(--creme);
  transition: border-color var(--transition), box-shadow var(--transition);
}
.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--pistache);
  box-shadow: 0 0 0 3px rgba(197,216,109,0.15);
}
.form-group textarea { resize: vertical; min-height: 90px; }
.form-submit {
  width: 100%;
  padding: 14px;
  background: var(--brun);
  color: var(--creme);
  border: none;
  font-family: var(--font-sans);
  font-weight: 700;
  font-size: 0.82rem;
  letter-spacing: 2px;
  text-transform: uppercase;
  cursor: pointer;
  border-radius: var(--radius);
  transition: all var(--transition);
  margin-top: 0.5rem;
}
.form-submit:hover { background: var(--brun-light); transform: translateY(-1px); box-shadow: var(--shadow-sm); }
.form-link { text-align: center; margin-top: 1.3rem; font-size: 0.85rem; color: var(--text-muted); }
.form-link a { color: var(--terracotta); font-weight: 700; }
.form-link a:hover { color: var(--terracotta-dark); }
.form-error { background: #FEF0ED; border: 1px solid #F5C6B8; padding: 10px 14px; border-radius: var(--radius); font-size: 0.85rem; color: #B8432A; margin-bottom: 1rem; display: none; border-left: 3px solid var(--terracotta); }
.form-success { background: #EEF5E0; border: 1px solid #C5D86D; padding: 10px 14px; border-radius: var(--radius); font-size: 0.85rem; color: #4A6020; margin-bottom: 1rem; display: none; border-left: 3px solid var(--pistache); }

/* =============================================
   PROFILE PAGE
============================================= */
.profile-header {
  background: var(--encre);
  padding: 3.5rem 2rem;
  position: relative;
  overflow: hidden;
}
.profile-header::after {
  content: '';
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(200,168,75,0.3), transparent);
}
.profile-header-inner {
  max-width: 1160px;
  margin: 0 auto;
  display: flex;
  gap: 2.5rem;
  align-items: flex-start;
  flex-wrap: wrap;
}
.profile-avatar {
  width: 96px; height: 96px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--pistache), var(--or));
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-serif);
  font-size: 2.4rem;
  font-weight: 900;
  color: var(--brun);
  flex-shrink: 0;
  box-shadow: 0 0 0 3px rgba(200,168,75,0.25);
}
.profile-info h1 { font-family: var(--font-serif); font-size: 2rem; color: var(--creme); margin-bottom: 0.3rem; }
.profile-info .profile-city { color: var(--pistache); font-size: 0.82rem; letter-spacing: 1px; }
.profile-info .profile-bio { color: rgba(250,243,224,0.6); font-size: 0.9rem; margin-top: 0.6rem; max-width: 500px; line-height: 1.65; }
.profile-stats { display: flex; gap: 2rem; margin-top: 1.2rem; flex-wrap: wrap; }
.profile-stat { text-align: center; }
.profile-stat .ps-n { font-family: var(--font-serif); font-size: 1.6rem; font-weight: 700; color: var(--pistache); }
.profile-stat .ps-l { font-size: 0.65rem; color: rgba(250,243,224,0.35); letter-spacing: 1.5px; text-transform: uppercase; margin-top: 2px; }
.profile-actions { margin-left: auto; display: flex; gap: 0.75rem; flex-wrap: wrap; align-self: center; }

/* =============================================
   MESSAGERIE
============================================= */
.messages-layout { display: grid; grid-template-columns: 300px 1fr; min-height: calc(100vh - 68px); }
.conv-list { border-right: 1px solid var(--beige-border); overflow-y: auto; background: white; }
.conv-item { padding: 1.2rem 1.5rem; border-bottom: 1px solid var(--beige-border); cursor: pointer; transition: background var(--transition); }
.conv-item:hover, .conv-item.active { background: var(--beige); }
.conv-item .conv-name { font-weight: 700; font-size: 0.9rem; }
.conv-item .conv-preview { font-size: 0.8rem; color: var(--text-muted); margin-top: 3px; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.conv-item .conv-time { font-size: 0.68rem; color: var(--text-muted); }
.chat-area { display: flex; flex-direction: column; background: var(--creme); }
.chat-header { padding: 1.2rem 1.5rem; border-bottom: 1px solid var(--beige-border); font-weight: 700; background: white; font-family: var(--font-serif); }
.chat-messages { flex: 1; padding: 1.5rem; overflow-y: auto; display: flex; flex-direction: column; gap: 0.8rem; }
.chat-msg { max-width: 68%; padding: 10px 16px; border-radius: 12px; font-size: 0.9rem; line-height: 1.55; }
.chat-msg.me { background: var(--brun); color: var(--creme); align-self: flex-end; border-bottom-right-radius: 4px; }
.chat-msg.other { background: white; color: var(--brun); align-self: flex-start; border-bottom-left-radius: 4px; border: 1px solid var(--beige-border); }
.chat-input-area { padding: 1rem 1.5rem; border-top: 1px solid var(--beige-border); display: flex; gap: 0.75rem; background: white; }
.chat-input-area input { flex: 1; padding: 10px 16px; border: 1px solid var(--beige-border); border-radius: 24px; font-family: var(--font-sans); font-size: 0.9rem; background: var(--creme); outline: none; transition: border-color var(--transition); }
.chat-input-area input:focus { border-color: var(--pistache); }
.chat-input-area button { background: var(--brun); color: var(--creme); border: none; padding: 10px 22px; border-radius: 24px; font-weight: 700; font-size: 0.8rem; cursor: pointer; transition: all var(--transition); }
.chat-input-area button:hover { background: var(--brun-light); }

/* =============================================
   SEARCH PAGE
============================================= */
.search-filters { display: flex; gap: 0.8rem; flex-wrap: wrap; }
.search-filters select,
.search-filters input {
  padding: 9px 14px;
  border: 1px solid var(--beige-border);
  border-radius: var(--radius);
  font-family: var(--font-sans);
  font-size: 0.85rem;
  background: white;
  color: var(--brun);
  transition: border-color var(--transition);
}
.search-filters select:focus,
.search-filters input:focus { outline: none; border-color: var(--pistache); }
.results-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 1.2rem; }
.result-card {
  background: white;
  border: 1px solid var(--beige-border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: all var(--transition);
  cursor: pointer;
}
.result-card:hover { box-shadow: var(--shadow); transform: translateY(-3px); }
.result-cover { width: 100%; height: 180px; background: var(--beige); display: flex; align-items: center; justify-content: center; font-size: 3rem; }
.result-info { padding: 1rem; }
.result-title { font-family: var(--font-serif); font-weight: 700; font-size: 0.95rem; margin-bottom: 0.3rem; }
.result-author { font-size: 0.8rem; color: var(--text-muted); margin-bottom: 0.6rem; }
.result-meta { display: flex; justify-content: space-between; align-items: center; gap: 0.5rem; flex-wrap: wrap; }
.result-type { font-size: 0.68rem; background: var(--beige); padding: 3px 9px; border-radius: 10px; letter-spacing: 0.5px; text-transform: uppercase; color: var(--text-body); }
.result-owner { font-size: 0.75rem; color: var(--terracotta); font-weight: 700; }

/* =============================================
   MAP PAGE
============================================= */
.map-page { height: calc(100vh - 68px); position: relative; display: flex; }
#map { flex: 1; }
.map-sidebar {
  position: absolute;
  top: 1.5rem; left: 1.5rem;
  z-index: 10;
  background: white;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  width: 290px;
  max-height: calc(100vh - 100px);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  border: 1px solid var(--beige-border);
}
.map-sidebar-header {
  padding: 1.2rem 1.5rem;
  background: var(--brun);
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
  flex-shrink: 0;
}
.map-sidebar-header h3 { font-family: var(--font-serif); color: var(--creme); font-size: 1.1rem; }
.map-sidebar-header p { font-size: 0.73rem; color: rgba(250,243,224,0.45); margin-top: 2px; }
.map-sidebar-body { overflow-y: auto; flex: 1; }
.map-user-card {
  padding: 0.9rem 1.2rem;
  border-bottom: 1px solid var(--beige-border);
  cursor: pointer;
  transition: background var(--transition);
  display: flex;
  gap: 0.7rem;
  align-items: center;
}
.map-user-card:hover { background: var(--beige); }
.map-user-avatar {
  width: 34px; height: 34px;
  border-radius: 50%;
  background: var(--pistache);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-serif);
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--brun);
  flex-shrink: 0;
}
.map-user-info .name { font-weight: 700; font-size: 0.88rem; }
.map-user-info .city { font-size: 0.73rem; color: var(--text-muted); }
.map-user-info .items { font-size: 0.7rem; color: var(--terracotta); font-weight: 700; margin-top: 2px; }

/* =============================================
   BADGES
============================================= */
.badge { display: inline-flex; align-items: center; gap: 4px; padding: 4px 10px; border-radius: 12px; font-size: 0.68rem; font-weight: 700; letter-spacing: 0.5px; text-transform: uppercase; }
.badge-gold { background: #FFF8E7; color: #8B6000; border: 1px solid #F0D080; }
.badge-available { background: #EEF5E0; color: #4A6020; border: 1px solid #C5D86D; }
.badge-unavailable { background: #FEF0ED; color: #B8432A; border: 1px solid #F5C6B8; }

/* =============================================
   MOT-MARQUE "ZAMBLEURS"
   Même traitement que le logo : Playfair Display,
   avec le "a" en italique terracotta
============================================= */
.zambleur-word {
  font-family: var(--font-serif);
  font-weight: inherit;
  font-style: normal;
  letter-spacing: 0.5px;
}
.zambleur-word .za { color: var(--terracotta); font-style: italic; }

/* =============================================
   SOCIAL ICONS NAVBAR
============================================= */
.nav-social {
  display: flex;
  gap: 0.3rem;
  align-items: center;
  margin-left: 0.6rem;
  padding-left: 1rem;
  border-left: 1px solid rgba(200,168,75,0.15);
}
.nav-social a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 30px; height: 30px;
  border-radius: 50%;
  color: rgba(250,243,224,0.4);
  transition: all var(--transition);
  flex-shrink: 0;
}
.nav-social a:hover { color: var(--creme); background: rgba(250,243,224,0.08); }
.nav-social a svg { width: 14px; height: 14px; fill: currentColor; display: block; }

@media (max-width: 768px) { .nav-social { display: none; } }

/* =============================================
   FOOTER
============================================= */
.footer {
  background: var(--encre);
  padding: 4rem 2rem 3rem;
  text-align: center;
  border-top: 1px solid rgba(200,168,75,0.1);
}
.footer-logo { font-family: var(--font-serif); font-size: 1.8rem; font-weight: 900; color: var(--pistache); letter-spacing: 3px; margin-bottom: 0.5rem; }
.footer-tagline { font-size: 0.73rem; color: rgba(156,133,112,0.5); letter-spacing: 2px; text-transform: uppercase; margin-bottom: 1.5rem; }
.footer-about { font-size: 0.85rem; color: rgba(122,98,85,0.65); max-width: 500px; margin: 0 auto 2.5rem; line-height: 1.8; }
.footer-links { display: flex; gap: 2rem; justify-content: center; flex-wrap: wrap; }
.footer-links a { font-size: 0.73rem; color: rgba(156,133,112,0.45); letter-spacing: 1px; text-transform: uppercase; transition: color var(--transition); }
.footer-links a:hover { color: var(--pistache); }

/* =============================================
   TOAST
============================================= */
.toast {
  position: fixed;
  bottom: 2rem; right: 2rem;
  background: var(--brun);
  color: var(--creme);
  padding: 14px 20px;
  border-radius: var(--radius);
  font-size: 0.875rem;
  z-index: 999;
  transform: translateY(80px);
  opacity: 0;
  transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  pointer-events: none;
  border-left: 4px solid var(--pistache);
  max-width: 320px;
  box-shadow: var(--shadow-lg);
}
.toast.show { transform: translateY(0); opacity: 1; }
.toast.error { border-left-color: var(--terracotta); }

/* =============================================
   SCROLL REVEAL
============================================= */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}
.reveal.visible { opacity: 1; transform: translateY(0); }
.reveal-delay-1 { transition-delay: 0.1s; }
.reveal-delay-2 { transition-delay: 0.2s; }
.reveal-delay-3 { transition-delay: 0.3s; }
.reveal-delay-4 { transition-delay: 0.4s; }

/* =============================================
   RESPONSIVE
============================================= */
@media (max-width: 900px) {
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .steps-grid { grid-template-columns: 1fr; gap: 2rem; }
  .steps-grid::before { display: none; }
}

@media (max-width: 768px) {
  .nav-links { display: none; }
  .nav-links.open {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: 68px; left: 0; right: 0;
    background: var(--encre);
    padding: 1.5rem;
    gap: 1rem;
    z-index: 99;
    border-bottom: 1px solid rgba(200,168,75,0.1);
  }
  .nav-burger { display: block; }
  .hero { min-height: 70vh; }
  .hero-books-left, .hero-books-right { display: none; }
  .features-section, .how-section { padding: 4rem 1.5rem; }
  .cta-band { padding: 4rem 1.5rem; }
  .messages-layout { grid-template-columns: 1fr; }
  .conv-list { max-height: 220px; border-right: none; border-bottom: 1px solid var(--beige-border); }
  .map-sidebar { position: relative; top: auto; left: auto; width: 100%; max-height: 260px; border-radius: 0; }
  .map-page { flex-direction: column; height: auto; }
  #map { min-height: 420px; }
  .search-inner button { padding: 14px 20px; font-size: 0.72rem; }
}

@media (max-width: 480px) {
  .hero h1 { font-size: 2.2rem; }
  .hero-actions { flex-direction: column; align-items: center; }
  .btn-primary, .btn-secondary { width: 100%; max-width: 300px; text-align: center; }
  .hero-trust { gap: 1rem; flex-direction: column; align-items: center; }
  .features-grid { grid-template-columns: 1fr; }
  .form-card { padding: 2rem 1.5rem; }
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .stat + .stat::before { display: none; }
}
