/* ============================================================
   HOSTERZ — Design system
   Pro · classe · rassurant · facile
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Bricolage+Grotesque:opsz,wght@12..96,400;12..96,500;12..96,600;12..96,700&family=Inter:wght@400;500;600&display=swap');

:root {
  --ink:        #14302E;   /* texte principal, presque noir pétrole */
  --primary:    #0E6E63;   /* teal de confiance */
  --primary-deep:#0A524A;
  --accent:     #E8A13A;   /* miel — actions, chaleur */
  --accent-deep:#CE8A26;
  --sand:       #F6F2EA;   /* fond chaud */
  --surface:    #FFFFFF;
  --line:       #E4DED2;
  --muted:      #6B7B73;
  --danger:     #C0492F;
  --success:    #0E6E63;

  --radius:     14px;
  --radius-sm:  10px;
  --shadow:     0 1px 2px rgba(20,48,46,.04), 0 8px 28px rgba(20,48,46,.08);
  --shadow-sm:  0 1px 2px rgba(20,48,46,.06), 0 2px 8px rgba(20,48,46,.05);

  --font-display: 'Bricolage Grotesque', system-ui, sans-serif;
  --font-body: 'Inter', system-ui, sans-serif;
}

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

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--sand);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3 { font-family: var(--font-display); font-weight: 600; line-height: 1.08; letter-spacing: -0.02em; }

a { color: inherit; text-decoration: none; }

.wrap { max-width: 1080px; margin: 0 auto; padding: 0 24px; }

/* ---------- Boutons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font-family: var(--font-body); font-weight: 600; font-size: 15px;
  padding: 13px 22px; border-radius: var(--radius-sm); border: none;
  cursor: pointer; transition: transform .12s ease, background .18s ease, box-shadow .18s ease;
  white-space: nowrap;
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--accent); color: var(--ink); box-shadow: var(--shadow-sm); }
.btn-primary:hover { background: var(--accent-deep); }
.btn-ghost { background: transparent; color: var(--ink); border: 1.5px solid var(--line); }
.btn-ghost:hover { border-color: var(--primary); color: var(--primary); }
.btn-teal { background: var(--primary); color: #fff; }
.btn-teal:hover { background: var(--primary-deep); }
.btn-block { width: 100%; }
.btn:disabled { opacity: .5; cursor: not-allowed; }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 40;
  background: rgba(246,242,234,.85); backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; height: 68px; }
.logo { font-family: var(--font-display); font-weight: 700; font-size: 22px; letter-spacing: -0.03em; color: var(--ink); display: flex; align-items: center; gap: 8px; }
.logo .dot { width: 9px; height: 9px; border-radius: 50%; background: var(--accent); display: inline-block; }

/* ---------- Forms ---------- */
.field { margin-bottom: 14px; }
.field label { display: block; font-size: 13px; font-weight: 600; color: var(--muted); margin-bottom: 6px; }
.input, select.input {
  width: 100%; font-family: var(--font-body); font-size: 15px; color: var(--ink);
  padding: 12px 14px; border: 1.5px solid var(--line); border-radius: var(--radius-sm);
  background: var(--surface); transition: border-color .15s ease, box-shadow .15s ease;
}
.input:focus, select.input:focus {
  outline: none; border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(14,110,99,.12);
}
.row-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }

/* ---------- Cards ---------- */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-sm); }

/* ---------- Badges ---------- */
.badge { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; font-weight: 600; padding: 5px 11px; border-radius: 999px; }
.badge-verified { background: rgba(14,110,99,.1); color: var(--primary-deep); }
.badge-honey { background: rgba(232,161,58,.16); color: var(--accent-deep); }

/* ---------- Utilitaires ---------- */
.muted { color: var(--muted); }
.center { text-align: center; }
.hidden { display: none !important; }

/* ---------- Transitions de page ---------- */
@keyframes hz-fade { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
.page, .q-wrap, .msg-wrap, main.page { animation: hz-fade .22s ease both; }

/* ---------- Squelettes de chargement ---------- */
@keyframes hz-shimmer { from { background-position: 200% 0; } to { background-position: -200% 0; } }
.skel { background: linear-gradient(90deg, var(--line) 25%, #EFEAE0 50%, var(--line) 75%);
  background-size: 200% 100%; animation: hz-shimmer 1.4s linear infinite; border-radius: 8px; }
.skel-line { height: 13px; margin-bottom: 9px; }
.skel-line.w40 { width: 40%; } .skel-line.w60 { width: 60%; } .skel-line.w80 { width: 80%; }
.skel-circle { border-radius: 50%; flex: none; }
.skel-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow-sm); padding: 18px 20px; margin-bottom: 14px; }
.skel-row { display: flex; gap: 12px; align-items: center; padding: 14px 18px; }
.skel-row .skel-circle { width: 46px; height: 46px; }
.skel-row > div:last-child { flex: 1; }
@media (prefers-reduced-motion: reduce) { .skel { animation: none; background: var(--line); } }

/* ---------- Toast global ---------- */
.hz-toast { position: fixed; bottom: calc(24px + env(safe-area-inset-bottom)); left: 50%;
  transform: translateX(-50%); background: var(--ink); color: #fff; padding: 12px 20px;
  border-radius: 12px; font-size: 14px; font-weight: 500; box-shadow: var(--shadow);
  opacity: 0; transition: opacity .2s, transform .2s; pointer-events: none; z-index: 99999;
  max-width: calc(100vw - 48px); text-align: center; }
.hz-toast.show { opacity: 1; transform: translateX(-50%) translateY(-4px); }

@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
}
/* ===== Logo Hosterzz (lockup exact : icone + Hosterzz) — rendu adaptatif via mask ===== */
.site-header .logo, .logo, header .logo { display:inline-flex !important; align-items:center !important; font-size:0 !important; line-height:0 !important; gap:0 !important; }
.site-header .logo .dot, .logo .dot, header .logo .dot {
  width:114px !important; height:26px !important; border-radius:0 !important; box-shadow:none !important; margin:0 !important; background-image:none;
  background-color: currentColor !important;
  -webkit-mask: url("/logo-hosterz.png") left center / contain no-repeat !important;
          mask: url("/logo-hosterz.png") left center / contain no-repeat !important;
}
.site-header {
  padding-top: env(safe-area-inset-top);
  padding-left: env(safe-area-inset-left);
  padding-right: env(safe-area-inset-right);
}

/* ─── Safe-area iOS — barre d'état transparente (overlay) ─────────
   La webview passe SOUS la barre d'état. Chaque page remonte donc
   sa propre couleur de fond derrière l'heure/batterie.
   On réserve juste la hauteur pour que le header ne soit pas masqué.
   Sur le web, env(...) = 0 → aucun effet. */
.site-header {
  padding-top: env(safe-area-inset-top);
  padding-left: env(safe-area-inset-left);
  padding-right: env(safe-area-inset-right);
}
