/* Rendeo — landing publique. Aucune dépendance externe : pas de CDN, pas de police distante
   (Google Fonts depuis leur CDN transmet l'IP du visiteur, ce qui cadre mal avec le discours
   « vos données restent chez vous »). Les polices personnalisées des pros ne sont donc pas
   reproduites ici pour l'instant — voir README. */

:root {
  --accent: #208aef;
  --bg: #ffffff;
  --surface: #ffffff;
  --text: #14181f;
  --muted: #626b7a;
  --line: #e6e9ee;
  --radius: 16px;
  --maxw: 640px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0f1216;
    --surface: #171b21;
    --text: #f2f4f7;
    --muted: #9aa4b2;
    --line: #262c34;
  }
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

#app {
  max-width: var(--maxw);
  margin: 0 auto;
  padding-bottom: 40px;
}

.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

/* ── Chargement ─────────────────────────────────────────────────────────── */
.loader {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 60vh;
}

.spinner {
  width: 28px;
  height: 28px;
  border: 3px solid var(--line);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin { to { transform: rotate(360deg); } }

@media (prefers-reduced-motion: reduce) {
  .spinner { animation-duration: 2.4s; }
}

/* ── En-tête ────────────────────────────────────────────────────────────── */
/* Le pro cadre sa couverture en 16:7 dans l'app (customization.tsx). Tout autre ratio la recadre
   arbitrairement : avec une hauteur fixe de 240px, un téléphone de 390px donnait du 1,63:1 et
   `object-fit: cover` amputait les côtés. On adopte donc le ratio d'origine, et la disposition
   horizontale de l'en-tête de l'app cliente (nom à gauche, logo à droite) qui tient dedans.
   `min-height` protège les écrans très étroits, où le recadrage redevient inévitable. */
.hero {
  position: relative;
  aspect-ratio: 16 / 7;
  min-height: 150px;
  display: flex;
  align-items: center;
  overflow: hidden;
  background: var(--accent);
}

.hero-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-veil {
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, rgba(0, 0, 0, 0.15), rgba(0, 0, 0, 0.55));
}

.hero-content {
  position: relative;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 20px;
  width: 100%;
  color: #fff;
}

/* `min-width: 0` sans quoi un nom long refuse de se réduire et pousse le logo hors du cadre. */
.hero-text {
  flex: 1;
  min-width: 0;
}

/* 56px et anneau blanc : mêmes valeurs que l'en-tête de l'app cliente (pro-preview.tsx). */
.logo {
  flex: none;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  object-fit: cover;
  border: 1px solid rgba(255, 255, 255, 0.85);
  background: rgba(255, 255, 255, 0.15);
  display: block;
}

.logo-initial {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  font-weight: 700;
}

.hero h1 {
  margin: 0;
  font-size: 28px;
  line-height: 1.2;
  text-shadow: 0 1px 8px rgba(0, 0, 0, 0.35);
}

.badge {
  display: inline-block;
  vertical-align: -0.12em;
  line-height: 0;
}

/* Le bouclier se pose sur la photo de couverture : une ombre portée le décolle des zones
   claires, sinon l'or disparaît sur un fond pâle. */
.badge .shield {
  filter: drop-shadow(0 1px 4px rgba(0, 0, 0, 0.45));
}

.address, .paused {
  margin: 6px 0 0;
  font-size: 14px;
  opacity: 0.95;
  text-shadow: 0 1px 6px rgba(0, 0, 0, 0.35);
}

.paused {
  display: inline-block;
  margin-top: 8px;
  padding: 2px 10px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.45);
  font-size: 13px;
}

/* ── Appel à l'action ───────────────────────────────────────────────────── */
.cta {
  padding: 20px;
  text-align: center;
}

.btn-primary {
  display: block;
  width: 100%;
  padding: 16px 20px;
  font-size: 17px;
  font-weight: 600;
  font-family: inherit;
  color: #fff;
  background: var(--accent);
  border: none;
  border-radius: var(--radius);
  cursor: pointer;
  transition: transform 0.08s ease, filter 0.15s ease;
}

.btn-primary:hover { filter: brightness(1.06); }
.btn-primary:active { transform: scale(0.985); }
.btn-primary:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; }

.cta-hint {
  margin: 10px 0 0;
  font-size: 13px;
  color: var(--muted);
}

.fallback {
  margin-top: 16px;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  font-size: 14px;
  text-align: left;
}

.fallback p { margin: 0 0 8px; }
.fallback p:last-child { margin-bottom: 0; }
.fallback a { color: var(--accent); }

/* ── Cartes ─────────────────────────────────────────────────────────────── */
.card {
  margin: 0 20px 16px;
  padding: 16px 18px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.card h2 {
  margin: 0 0 12px;
  font-size: 15px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--muted);
}

.card p { margin: 0; }

/* ── Certification « Entreprise déclarée » ──────────────────────────────── */
.cert {
  border-color: rgba(245, 197, 24, 0.4);
}

/* Contrairement aux autres titres de carte (petites capitales grises), celui-ci est le message
   lui-même et non un libellé de rubrique : il se lit comme un titre normal, à côté du bouclier.
   Sélecteur qualifié par `.card h2`, sinon la règle générique des cartes l'emporte (même
   spécificité, déclarée avant) et le titre repasse en capitales grises. */
.card h2.cert-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 16px;
  text-transform: none;
  letter-spacing: 0;
  color: var(--text);
}

.cert p {
  font-size: 14px;
  line-height: 1.45;
  color: var(--muted);
}

/* Même raison : `.card p { margin: 0 }` écraserait le `margin-top`. */
.card p.cert-ape {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
}

.cert-ape strong {
  color: var(--text);
  font-variant-numeric: tabular-nums;
}

.services {
  list-style: none;
  margin: 0;
  padding: 0;
}

.services li {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
}

.services li:first-child { padding-top: 0; }
.services li:last-child { border-bottom: none; padding-bottom: 0; }

.s-name { font-weight: 500; }

.s-meta {
  display: flex;
  align-items: baseline;
  gap: 12px;
  color: var(--muted);
  font-size: 14px;
  white-space: nowrap;
}

.s-price {
  color: var(--text);
  font-weight: 600;
  font-size: 15px;
}

.socials {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.socials a {
  display: inline-block;
  padding: 8px 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--accent);
  text-decoration: none;
  font-size: 14px;
}

.socials a:hover { border-color: var(--accent); }

/* ── Messages pleine page ───────────────────────────────────────────────── */
.message {
  padding: 60px 24px;
  text-align: center;
}

.message h1 { font-size: 22px; margin: 0 0 12px; }
.message p { color: var(--muted); margin: 0 0 8px; }

.footer {
  margin-top: 28px;
  padding: 0 20px;
  text-align: center;
  font-size: 13px;
  color: var(--muted);
}
