/* =========================================================
   ESPP — English Speaking Plumber Paris
   Feuille de style principale
   ========================================================= */

:root {
  --primary: #0EA5E9;
  --primary-dark: #0284C7;
  --ink: #0F172A;
  --bg-soft: #F8FAFC;
  --alert: #EF4444;
  --whatsapp: #24CC63;
  --white: #FFFFFF;
  --border: #E2E8F0;
  --text-muted: #64748B;
  --text-body: #334155;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: 'Inter', sans-serif;
  color: var(--ink);
  background: var(--white);
  line-height: 1.5;
}

a { color: var(--primary-dark); }

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

/* ---------- Header ---------- */
.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 24px;
  background: var(--white);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 50;
  gap: 20px;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 24px;
  flex: 1;
}
.nav-dropdown { position: relative; }
.nav-link {
  font-family: 'Inter', sans-serif;
  font-weight: 600;
  font-size: 14px;
  color: var(--ink);
  text-decoration: none;
  padding: 8px 0;
}
.nav-link:hover { color: var(--primary-dark); }
.nav-dropdown-toggle {
  background: none;
  border: none;
  font-family: 'Inter', sans-serif;
  font-weight: 600;
  font-size: 14px;
  color: var(--ink);
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 8px 0;
}
.nav-dropdown-toggle .caret {
  width: 9px;
  height: 9px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
}
.nav-dropdown-menu {
  position: absolute;
  top: 100%;
  left: -10px;
  background: white;
  border: 1px solid var(--border);
  border-radius: 10px;
  box-shadow: 0 12px 24px rgba(15, 23, 42, 0.1);
  min-width: 230px;
  padding: 8px;
  opacity: 0;
  visibility: hidden;
  transform: translateY(4px);
  transition: opacity 0.15s ease, transform 0.15s ease, visibility 0.15s;
  z-index: 60;
}
.nav-dropdown:hover .nav-dropdown-menu,
.nav-dropdown:focus-within .nav-dropdown-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}
.nav-dropdown-menu a {
  display: block;
  padding: 9px 10px;
  border-radius: 6px;
  font-size: 13.5px;
  font-weight: 500;
  color: var(--text-body);
  text-decoration: none;
}
.nav-dropdown-menu a:hover { background: var(--bg-soft); color: var(--primary-dark); }
.nav-dropdown-menu .nav-view-all {
  border-top: 1px solid var(--border);
  margin-top: 6px;
  padding-top: 10px;
  color: var(--primary-dark);
  font-weight: 600;
}
/* Variante grille pour les longues listes (20 arrondissements) : 4 colonnes
   au lieu d'une liste verticale interminable. "View all" reste seul sur sa
   ligne, en pleine largeur, via grid-column: 1 / -1. */
.nav-dropdown-menu-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(150px, 1fr));
  gap: 2px 12px;
  min-width: 680px;
  max-height: min(70vh, 520px);
  overflow-y: auto;
}
.nav-dropdown-menu-grid .nav-view-all-full {
  grid-column: 1 / -1;
  position: sticky;
  bottom: 0;
  background: white;
}

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

.brand-mark {
  width: 35px;
  height: 35px;
  border-radius: 8px;
  flex-shrink: 0;
  display: block;
}

.brand-text {
  font-weight: 700;
  font-size: 16px;
  color: var(--ink);
  letter-spacing: -0.01em;
}

.header-cta {
  display: flex;
  gap: 10px;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: none;
  border-radius: 8px;
  font-family: 'Inter', sans-serif;
  font-weight: 600;
  font-size: 13.5px;
  cursor: pointer;
  padding: 9px 16px;
  text-decoration: none;
  white-space: nowrap;
}

.btn-lg {
  font-size: 15px;
  font-weight: 700;
  padding: 14px 22px;
  border-radius: 9px;
}

.btn-call { background: var(--alert); color: white; }
.btn-whatsapp { background: var(--whatsapp); color: white; }

.icon { width: 15px; height: 15px; flex-shrink: 0; fill: currentColor; }
.icon-lg { width: 18px; height: 18px; flex-shrink: 0; fill: currentColor; }

/* ---------- Live badge (pulsing dot) ---------- */
.tag-live {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  background: rgba(14, 165, 233, 0.12);
  color: var(--primary-dark);
  font-size: 13px;
  font-weight: 600;
  padding: 7px 14px 7px 10px;
  border-radius: 999px;
  margin-bottom: 18px;
}

.pulse-dot {
  position: relative;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--whatsapp);
  flex-shrink: 0;
}
.pulse-dot::after {
  content: "";
  position: absolute;
  inset: -5px;
  border-radius: 50%;
  background: var(--whatsapp);
  opacity: 0.5;
  animation: pulse-ring 1.8s ease-out infinite;
}
@keyframes pulse-ring {
  0% { transform: scale(0.6); opacity: 0.55; }
  70% { transform: scale(1.9); opacity: 0; }
  100% { transform: scale(1.9); opacity: 0; }
}
@media (prefers-reduced-motion: reduce) {
  .pulse-dot::after { animation: none; opacity: 0.35; }
  .bubble { animation: none !important; opacity: 1 !important; }
}

/* ---------- Bulles de chat qui apparaissent une par une ---------- */
/* Animation CSS pure (pas de JS) : aucun coût de chargement, ça tourne sur
   le thread de composition du navigateur une fois la page déjà affichée.
   Le délai de chaque bulle est fixé en inline style (animation-delay) dans
   render_chat_mock(), 1 seconde d'écart entre chaque. */
@keyframes bubble-appear {
  0% { opacity: 0; transform: scale(0.75) translateY(6px); }
  60% { opacity: 1; transform: scale(1.04) translateY(0); }
  100% { opacity: 1; transform: scale(1) translateY(0); }
}
.bubble {
  opacity: 0;
  transform-origin: bottom center;
  animation: bubble-appear 0.45s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}
.bubble-in { transform-origin: bottom left; }
.bubble-out { transform-origin: bottom right; }

/* ---------- Hero ---------- */
/* ---------- Fil d'Ariane ---------- */
.breadcrumbs {
  padding: 12px 0;
}
.breadcrumbs ol {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  list-style: none;
  margin: 0;
  padding: 0;
  font-size: 13px;
}
.breadcrumbs li {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--text-muted);
}
.breadcrumbs li:not(:first-child)::before {
  content: "/";
  color: var(--border);
}
.breadcrumbs a {
  color: var(--text-muted);
  text-decoration: none;
}
.breadcrumbs a:hover {
  color: var(--primary-dark);
  text-decoration: underline;
}
.breadcrumbs span[aria-current] {
  color: var(--text-body);
  font-weight: 500;
}

.hero {
  position: relative;
  overflow: hidden;
  background: linear-gradient(120deg, #F1F5F9 0%, #CBD5E1 15%, #7DD3FC 40%, #38BDF8 55%, #BAE6FD 75%, #F1F5F9 100%);
  background-size: 300% 300%;
  animation: hero-gradient-sweep 20s ease-in-out infinite alternate;
  border-bottom: 1px solid var(--border);
  padding: 64px 0;
}
@keyframes hero-gradient-sweep {
  0%   { background-position: 0% 50%; }
  100% { background-position: 100% 50%; }
}
@media (prefers-reduced-motion: reduce) {
  .hero { animation: none; background-position: 20% 50%; }
}
.hero-text {
  position: relative;
  z-index: 1;
  background: rgba(255, 255, 255, 0.78);
  backdrop-filter: blur(6px);
  border-radius: 20px;
  padding: 32px 36px;
}

h1 {
  font-size: 42px;
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.1;
  margin: 0 0 16px;
  max-width: 18ch;
}

.lede {
  font-size: 18px;
  color: var(--text-muted);
  max-width: 60ch;
  margin: 0 0 8px;
}

h2 {
  font-size: 26px;
  font-weight: 700;
  letter-spacing: -0.01em;
  margin: 0 0 10px;
}

h3 {
  font-size: 18px;
  font-weight: 600;
  margin: 0 0 8px;
}

p {
  font-size: 15.5px;
  color: var(--text-body);
  max-width: 65ch;
  margin: 0 0 12px;
}

.hero-cta-row {
  display: flex;
  gap: 12px;
  margin-top: 24px;
  flex-wrap: wrap;
}

/* ---------- Hero : deux colonnes (texte + image) ---------- */
.hero-grid {
  display: grid;
  grid-template-columns: 1.4fr 0.6fr;
  gap: 40px;
  align-items: center;
}
.hero-grid > * {
  min-width: 0;
}
.eyebrow-accent {
  color: var(--primary-dark);
  margin-bottom: 4px;
}
.hero-image-col {
  position: relative;
  max-width: 320px;
  margin: 0 auto;
}
.hero-image {
  width: 100%;
  height: auto;
  border-radius: 16px;
  display: block;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  background: var(--border); /* fond visible tant que l'image n'est pas encore uploadée */
}
.hero-badge {
  position: absolute;
  background: white;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 10px 14px;
  box-shadow: 0 6px 18px rgba(15, 23, 42, 0.08);
  line-height: 1.25;
}
.hero-badge strong {
  display: block;
  font-size: 14px;
  color: var(--ink);
}
.hero-badge span {
  display: block;
  font-size: 12px;
  color: var(--text-muted);
  max-width: none;
  margin: 0;
}
.hero-badge-top { top: 16px; left: -16px; }
.hero-badge-bottom { bottom: 16px; right: -16px; }

/* ---------- Hero : mockup de conversation (remplace la photo) ---------- */
.chat-mock {
  background: white;
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid var(--border);
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.08);
}
.chat-mock-header {
  background: var(--ink);
  color: white;
  padding: 14px 16px;
  display: flex;
  align-items: center;
  gap: 10px;
}
.chat-avatar {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 14px;
  flex-shrink: 0;
}
.chat-mock-name { font-weight: 600; font-size: 13.5px; }
.chat-mock-status {
  font-size: 12px;
  color: #94A3B8;
  display: flex;
  align-items: center;
  gap: 6px;
}
.chat-mock-status .dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--whatsapp);
  flex-shrink: 0;
}
.chat-mock-body {
  padding: 18px 16px;
  background: #F1F5F9;
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-height: 280px;
}
.bubble {
  max-width: 82%;
  padding: 10px 14px;
  border-radius: 14px;
  font-size: 13.5px;
  line-height: 1.4;
}
.bubble-in {
  align-self: flex-start;
  background: white;
  border: 1px solid var(--border);
  border-bottom-left-radius: 4px;
  color: var(--text-body);
}
.bubble-out {
  align-self: flex-end;
  background: var(--primary);
  color: white;
  border-bottom-right-radius: 4px;
}
.hero-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}
.chip {
  background: #FFFFFF;
  color: var(--primary-dark);
  font-size: 12.5px;
  font-weight: 600;
  padding: 6px 12px;
  border-radius: 999px;
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.08);
}

/* ---------- Section preuve : photo (gauche) + texte (droite), sans chevauchement ---------- */
.proof-grid {
  display: grid;
  grid-template-columns: 0.85fr 1.15fr;
  gap: 40px;
  align-items: center;
}
.proof-image {
  width: 100%;
  height: auto;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  border-radius: 16px;
  display: block;
  background: var(--border); /* fond visible tant que l'image n'est pas encore uploadée */
}

/* ---------- How it works ---------- */
.steps-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 24px;
  margin-top: 28px;
}
.step { position: relative; }
.step-number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--primary);
  color: white;
  font-weight: 700;
  font-size: 14px;
  margin-bottom: 12px;
}

/* ---------- Section labels ---------- */
.section {
  padding: 56px 0;
}
.section-alt {
  background: var(--bg-soft);
}
.eyebrow {
  font-size: 13px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  margin-bottom: 10px;
}

/* ---------- Cards ---------- */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 20px;
  margin-top: 24px;
}
.card {
  border: 1px solid var(--border);
  border-top: 4px solid var(--primary);
  border-radius: 12px;
  padding: 22px;
  background: var(--white);
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.04);
}
.card-icon {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: rgba(14, 165, 233, 0.12);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 14px;
}
.card-icon .icon-lg { fill: var(--primary-dark); }
.card h3 { margin-top: 0; }
.card a {
  font-weight: 600;
  font-size: 14px;
  text-decoration: none;
}
.card a:hover { text-decoration: underline; }

/* ---------- FAQ accordion ---------- */
.faq-list {
  margin-top: 24px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.faq-item {
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--white);
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.04);
  overflow: hidden;
}
.faq-item summary {
  cursor: pointer;
  list-style: none;
  padding: 18px 22px;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after {
  content: "+";
  font-size: 22px;
  font-weight: 400;
  color: var(--primary-dark);
  flex-shrink: 0;
}
.faq-item[open] summary::after { content: "–"; }
.faq-item[open] summary { border-bottom: 1px solid var(--border); }
.faq-item p {
  margin: 0;
  padding: 4px 22px 20px;
  color: var(--text-body);
}

/* ---------- Trust strip ---------- */
.trust-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 28px;
  padding: 28px 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  color: var(--text-muted);
  font-size: 14px;
  font-weight: 600;
}
.trust-strip span { display: flex; align-items: center; gap: 8px; }

/* ---------- Footer ---------- */
.site-footer {
  background: var(--ink);
  color: #CBD5E1;
  padding: 40px 0 24px;
  font-size: 14px;
  margin-top: 40px;
}
.site-footer a { color: #CBD5E1; text-decoration: none; }
.site-footer a:hover { color: white; }
.footer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 24px;
  margin-bottom: 24px;
}
.footer-grid h4 {
  color: white;
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin: 0 0 12px;
}
.footer-grid ul { list-style: none; padding: 0; margin: 0; }
.footer-grid li { margin-bottom: 8px; }
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.12);
  padding-top: 20px;
  font-size: 12.5px;
  color: #94A3B8;
}

/* ---------- Bandeau CTA bleu marine (contraste fort, séparateur de sections) ---------- */
.cta-band {
  background: var(--ink);
  color: white;
  padding: 48px 0;
}
.cta-band h2 { color: white; }
.cta-band p { color: #CBD5E1; }
.cta-band .hero-cta-row { margin-top: 20px; }

/* ---------- Section sombre (alternance de rythme, réutilisable hors bandeau CTA) ---------- */
.section-dark {
  background: var(--ink);
  color: white;
}
.section-dark h2, .section-dark h3 { color: white; }
.section-dark p { color: #CBD5E1; }
.section-dark .eyebrow { color: #94A3B8; }

/* ---------- Sticky mobile bar ---------- */
.mobile-cta-bar {
  display: none;
}

/* ---------- Responsive ---------- */
@media (max-width: 480px) {
  .site-header { flex-direction: column; align-items: stretch; gap: 12px; }
  .site-nav { display: none; } /* menu déroulant masqué sur mobile : navigation via la barre sticky + footer */
  .header-cta { display: none; } /* boutons masqués sur mobile : seule la barre sticky en bas reste visible, pour éviter la redondance */
  .btn { width: 100%; justify-content: center; padding: 12px 16px; font-size: 14px; }
  h1 { font-size: 30px; }
  .hero { padding: 40px 0; }
  .hero-grid { grid-template-columns: 1fr; gap: 24px; }
  .hero-image-col { order: -1; } /* image au-dessus du texte sur mobile, comme le concurrent */
  .proof-grid { grid-template-columns: 1fr; gap: 24px; }
  .hero-badge-top { left: 8px; }
  .hero-badge-bottom { right: 8px; }
  .hero-cta-row { flex-direction: column; }
  .btn-lg { width: 100%; justify-content: center; white-space: normal; text-align: center; }
  .card-grid { grid-template-columns: 1fr; }

  /* Barre sticky en bas d'écran sur mobile, comme le concurrent */
  .mobile-cta-bar {
    display: flex;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 100;
    box-shadow: 0 -2px 10px rgba(0,0,0,0.08);
  }
  .mobile-cta-bar .btn {
    flex: 1;
    border-radius: 0;
    padding: 16px 8px;
    justify-content: center;
  }
  /* Évite que le contenu soit caché sous la barre sticky */
  body { padding-bottom: 62px; }
}
