/* ============================================================
   Guide d'inscription musicien — styles partagés FR/EN
   Page publique + mockups dynamiques + aperçu PDF.
   Un seul jeu de visuels sert l'affichage ET le PDF.
   ============================================================ */

:root {
  --jg-primary: #2563eb;
  --jg-primary-dark: #1d4ed8;
  --jg-primary-soft: #eff6ff;
  --jg-success: #16a34a;
  --jg-success-soft: #f0fdf4;
  --jg-amber: #d97706;
  --jg-amber-soft: #fffbeb;
  --jg-ink: #0f172a;
  --jg-text: #1e293b;
  --jg-muted: #64748b;
  --jg-border: #e2e8f0;
  --jg-bg: #f8fafc;
  --jg-surface: #ffffff;
  --jg-radius: 16px;
  --jg-font: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
}

* { box-sizing: border-box; }

body.jg-body {
  margin: 0;
  font-family: var(--jg-font);
  color: var(--jg-text);
  background: var(--jg-bg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

/* ---------- Header ---------- */
.jg-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 20px;
  background: var(--jg-surface);
  border-bottom: 1px solid var(--jg-border);
  position: sticky;
  top: 0;
  z-index: 50;
}
.jg-logo {
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--jg-ink);
  text-decoration: none;
  letter-spacing: -0.02em;
}
.jg-header-right { display: flex; align-items: center; gap: 14px; }
.jg-back {
  color: var(--jg-muted);
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 600;
}
.jg-back:hover { color: var(--jg-primary); }

/* ---------- Layout ---------- */
.jg-page { max-width: 1280px; margin: 0 auto; padding: 0 28px 80px; }

.jg-hero {
  text-align: center;
  padding: 56px 0 36px;
}
.jg-hero h1 {
  font-size: clamp(1.8rem, 4vw, 2.6rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--jg-ink);
  margin: 0 0 16px;
}
.jg-hero p {
  font-size: 1.1rem;
  color: var(--jg-muted);
  max-width: 640px;
  margin: 0 auto;
}

/* ---------- Tabs (mobile / web) ---------- */
.jg-tabs {
  display: inline-flex;
  gap: 4px;
  padding: 5px;
  background: #e8edf5;
  border-radius: 12px;
  margin: 0 auto 8px;
}
.jg-tabs-wrap { text-align: center; margin-bottom: 28px; }
.jg-tab {
  border: none;
  background: transparent;
  font: inherit;
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--jg-muted);
  padding: 9px 22px;
  border-radius: 9px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: all 0.15s;
}
.jg-tab.active {
  background: var(--jg-surface);
  color: var(--jg-primary);
  box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.jg-track { display: none; }
.jg-track.active { display: block; }

/* ---------- Steps ---------- */
.jg-step {
  display: grid;
  grid-template-columns: 1fr minmax(280px, 420px);
  gap: 40px;
  align-items: center;
  padding: 38px 0;
  border-top: 1px solid var(--jg-border);
}
.jg-step:first-of-type { border-top: none; }
.jg-step-text { min-width: 0; }
.jg-step-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: var(--jg-primary);
  color: #fff;
  font-weight: 800;
  font-size: 1.05rem;
  margin-bottom: 14px;
}
.jg-step-text h3 {
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--jg-ink);
  margin: 0 0 10px;
  letter-spacing: -0.01em;
}
.jg-step-text p { color: var(--jg-muted); margin: 0 0 10px; }
.jg-step-text .jg-tip {
  display: flex;
  gap: 8px;
  align-items: flex-start;
  background: var(--jg-primary-soft);
  border-radius: 10px;
  padding: 10px 14px;
  font-size: 0.9rem;
  color: var(--jg-primary-dark);
  margin-top: 12px;
}
.jg-step-text .jg-tip svg { flex: 0 0 auto; margin-top: 2px; }
.jg-step-visual { display: flex; justify-content: center; }

/* Étapes « ordinateur » : même mise en page côte à côte, mais visuel (navigateur) plus large */
#jg-track-web .jg-step { grid-template-columns: minmax(0, 1fr) minmax(0, 760px); gap: 48px; }

@media (max-width: 980px) {
  .jg-step { grid-template-columns: 1fr; gap: 22px; padding: 30px 0; }
  #jg-track-web .jg-step { grid-template-columns: 1fr; gap: 22px; }
  .jg-step-visual { order: 2; }
}

/* ============================================================
   MOCKUPS — écrans reconstruits (pas de captures d'écran)
   ============================================================ */

/* Toutes les tailles sont FIXES : un seul ratio téléphone, un seul format
   navigateur, identiques sur toutes les étapes (et au PDF). Pas de hauteur
   pilotée par le contenu, pas d'aspect-ratio (html2canvas le rend mal). */

/* Cadre téléphone — bordure fine et moderne (iPhone) */
.jg-phone {
  width: 300px;
  flex: 0 0 auto;
  background: #0f172a;
  border-radius: 46px;
  padding: 9px;            /* bezel fin */
  box-shadow: 0 24px 54px -18px rgba(15,23,42,0.5);
}
.jg-phone-screen {
  width: 282px;
  height: 600px;            /* hauteur FIXE → ratio constant */
  background: var(--jg-surface);
  border-radius: 38px;
  overflow: hidden;
  position: relative;
  display: flex;
  flex-direction: column;
}
.jg-statusbar {
  flex: 0 0 auto;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 24px 0 28px;
  font-size: 0.78rem;
  font-weight: 600;
  color: #1a1a1a;
}
.jg-sb-time { letter-spacing: 0.01em; }
.jg-statusbar .jg-sb-icons { display: flex; align-items: center; gap: 5px; }
.jg-statusbar .jg-sb-icons svg { display: block; }
.jg-phone-island {
  position: absolute; top: 9px; left: 50%; transform: translateX(-50%);
  width: 96px; height: 24px; background: #0f172a; border-radius: 14px; z-index: 5;
}

/* Cadre navigateur — fenêtre desktop, remplit la colonne de droite (côte à côte) */
.jg-browser {
  width: 100%;
  max-width: 760px;
  flex: 0 0 auto;
  background: var(--jg-surface);
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid var(--jg-border);
  box-shadow: 0 24px 54px -22px rgba(15,23,42,0.45);
}
.jg-browser-bar {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 11px 14px;
  background: #f1f5f9;
  border-bottom: 1px solid var(--jg-border);
}
.jg-browser-dot { width: 11px; height: 11px; border-radius: 50%; background: #cbd5e1; }
.jg-browser-dot:nth-child(1) { background: #f87171; }
.jg-browser-dot:nth-child(2) { background: #fbbf24; }
.jg-browser-dot:nth-child(3) { background: #34d399; }
.jg-browser-url {
  flex: 1;
  margin-left: 8px;
  background: #fff;
  border: 1px solid var(--jg-border);
  border-radius: 8px;
  padding: 5px 14px;
  font-size: 0.74rem;
  color: var(--jg-muted);
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
/* Fenêtre desktop : page BLANCHE avec en-tête + carte d'inscription centrée
   (reproduction fidèle de /auth/signup, pas de fond gris ni de « carte »). */
/* Hauteur PILOTÉE PAR LE CONTENU → les écrans courts donnent une fenêtre courte
   (la plus horizontale possible). Pas de barre « Sostenutoo / langue » (inutile). */
.jg-browser-viewport {
  background: #ffffff;
  overflow: hidden;
  display: flex; justify-content: center;
  padding: 24px 16px;
}
.jg-browser-viewport .jg-screen { width: 360px; flex: 0 0 auto; padding: 0; justify-content: flex-start; }

/* Carte d'inscription — reproduit /auth/signup (noir/blanc, succès vert) */
.jg-screen {
  flex: 1 1 auto;
  padding: 16px 20px 12px;
  overflow: hidden;
  display: flex; flex-direction: column; justify-content: flex-start;
  color: #111111;
}

.jg-dots { display: flex; justify-content: center; gap: 8px; margin-bottom: 14px; }
.jg-dot { width: 7px; height: 7px; border-radius: 50%; background: #e5e5e5; }
.jg-dot.on { background: #111111; width: 22px; border-radius: 4px; }

.jg-s-title { text-align: center; font-size: 1.2rem; font-weight: 600; letter-spacing: -0.02em; color: #111111; margin: 0 0 4px; }
/* Espace via padding (et non margin) : html2canvas respecte fidèlement le padding
   mais « avale » parfois les margin avant un encadré (ex. étape 4) → PDF fiable. */
.jg-s-sub { text-align: center; color: #666666; font-size: 0.8rem; margin: 0; padding-bottom: 16px; }
.jg-s-q { text-align: center; color: #666666; font-size: 0.8rem; margin: 0; padding-bottom: 14px; line-height: 1.4; }

.jg-oauth {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  width: 100%; padding: 9px 10px;
  border: 1px solid #e5e5e5; border-radius: 6px; background: #fff;
  font-weight: 500; font-size: 0.82rem; color: #111111; margin-bottom: 9px;
}
.jg-oauth { margin-bottom: 7px; }
.jg-oauth svg { width: 16px; height: 16px; flex: 0 0 auto; }
.jg-oauth--apple { background: #000; color: #fff; border-color: #000; }

.jg-divider {
  display: flex; align-items: center; gap: 10px;
  color: #666666; font-size: 0.68rem; margin: 11px 0;
  text-transform: uppercase; letter-spacing: 0.06em;
}
.jg-divider::before, .jg-divider::after { content: ""; flex: 1; height: 1px; background: #e5e5e5; }

.jg-fld { margin-bottom: 9px; }
.jg-namerow { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.jg-label { display: block; font-size: 0.75rem; font-weight: 500; color: #111111; margin-bottom: 5px; }
.jg-input {
  border: 1px solid #e5e5e5; border-radius: 6px; padding: 9px 11px;
  font-size: 0.82rem; color: #9ca3af; background: #fff; min-height: 18px;
}
.jg-input.jg-filled { color: #111111; }
.jg-hint { font-size: 0.72rem; color: #666666; margin: 6px 0 0; line-height: 1.4; }
.jg-note-c { text-align: center; font-size: 0.72rem; color: #666666; margin: 12px 0 0; line-height: 1.4; }
.jg-strength { width: 100%; height: 4px; background: #e5e5e5; border-radius: 2px; margin-top: 8px; }

.jg-btn {
  width: 100%; padding: 9px 14px; border-radius: 6px;
  font-weight: 500; font-size: 0.82rem; text-align: center;
  border: 1px solid #e5e5e5; background: #fff; color: #111111;
  display: flex; align-items: center; justify-content: center; gap: 6px;
}
.jg-btn--primary { border-color: #111111; }
.jg-btn--secondary { border-color: #e5e5e5; color: #666666; background: #fafafa; }
.jg-btn-row { display: flex; gap: 10px; margin-top: 8px; }
.jg-btn-row .jg-btn { margin-top: 0; width: auto; }

.jg-icon-box {
  width: 56px; height: 56px; margin: 4px auto 14px;
  border-radius: 12px; border: 2px solid #e5e5e5;
  display: flex; align-items: center; justify-content: center; color: #111111;
}
.jg-icon-box svg { width: 28px; height: 28px; }

.jg-instr {
  display: flex; align-items: center; justify-content: space-between;
  background: #f8f9fa; border: 1px solid #e9ecef; border-radius: 8px;
  padding: 10px 12px; margin-bottom: 8px; font-size: 0.82rem; color: #111111; font-weight: 500;
}
.jg-add {
  display: flex; align-items: center; justify-content: center; gap: 7px;
  width: 100%; border: 1px dashed #e5e5e5; border-radius: 6px;
  padding: 9px; color: #666666; font-size: 0.8rem;
}

/* écran succès — vert, reproduit le vrai */
.jg-success {
  background: #f0fdf4; border: 1px solid #bbf7d0; border-radius: 8px;
  padding: 16px; color: #15803d; text-align: center; line-height: 1.5;
}
.jg-success-h { display: flex; align-items: center; justify-content: center; gap: 8px; font-size: 0.98rem; font-weight: 700; margin-bottom: 7px; }
.jg-success-h svg { flex: 0 0 auto; }
.jg-success-p { font-size: 0.78rem; margin: 0 0 12px; }
.jg-success-sub {
  display: flex; align-items: flex-start; gap: 9px; text-align: left;
  background: #f7fef9; border: 1px solid #bbf7d0; border-radius: 8px; padding: 11px;
}
.jg-success-sub svg { flex: 0 0 auto; margin-top: 1px; }
.jg-success-sub b { display: block; font-size: 0.8rem; margin-bottom: 2px; color: #166534; }
.jg-success-sub span { font-size: 0.74rem; color: #15803d; }
.jg-success + .jg-btn { margin-top: 16px; }

/* Étape « télécharger » : 2 boutons empilés, style identique à la page Fonctionnalités */
.jg-dl { display: flex; flex-direction: column; gap: 14px; width: 300px; }
.jg-store-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.75rem;
  padding: 0.95rem 1.5rem; border-radius: 10px;
  color: #fff; text-decoration: none; font-weight: 500; font-size: 1rem;
  box-shadow: 0 6px 18px -8px rgba(0,0,0,0.35);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.jg-store-btn:hover { transform: translateY(-2px); box-shadow: 0 10px 24px -10px rgba(0,0,0,0.4); }
.jg-store-btn svg { flex: 0 0 auto; }

/* ============================================================
   Formulaire de personnalisation + PDF
   ============================================================ */
.jg-generator {
  margin-top: 48px;
  background: var(--jg-surface);
  border: 1px solid var(--jg-border);
  border-radius: var(--jg-radius);
  padding: 36px;
  box-shadow: 0 10px 40px -24px rgba(15,23,42,0.3);
}
.jg-generator h2 {
  font-size: 1.6rem;
  font-weight: 800;
  color: var(--jg-ink);
  margin: 0 0 8px;
  letter-spacing: -0.02em;
}
.jg-generator > p { color: var(--jg-muted); margin: 0 0 26px; }
.jg-gen-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
}
.jg-gen-grid .jg-gen-full { grid-column: 1 / -1; }
@media (max-width: 640px) { .jg-gen-grid { grid-template-columns: 1fr; } }
.jg-gen-field label {
  display: block;
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--jg-text);
  margin-bottom: 7px;
}
.jg-gen-field input {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--jg-border);
  border-radius: 10px;
  font: inherit;
  font-size: 0.95rem;
  color: var(--jg-ink);
  background: #fff;
}
.jg-gen-field input:focus {
  outline: none;
  border-color: var(--jg-primary);
  box-shadow: 0 0 0 3px rgba(37,99,235,0.15);
}
.jg-gen-field .jg-opt { color: var(--jg-muted); font-weight: 500; }
.jg-gen-field input#jg-in-code { text-transform: uppercase; letter-spacing: 0.06em; font-weight: 700; }

.jg-gen-actions {
  margin-top: 26px;
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  align-items: center;
}
.jg-generate-btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: var(--jg-primary);
  color: #fff;
  border: none;
  font: inherit;
  font-weight: 700;
  font-size: 1rem;
  padding: 14px 26px;
  border-radius: 11px;
  cursor: pointer;
  transition: background 0.15s;
}
.jg-generate-btn:hover { background: var(--jg-primary-dark); }
.jg-generate-btn:disabled { opacity: 0.6; cursor: progress; }
.jg-generate-btn svg { width: 19px; height: 19px; }
.jg-gen-note { font-size: 0.85rem; color: var(--jg-muted); }

.jg-spinner {
  width: 17px; height: 17px;
  border: 2px solid rgba(255,255,255,0.4);
  border-top-color: #fff;
  border-radius: 50%;
  animation: jg-spin 0.7s linear infinite;
}
@keyframes jg-spin { to { transform: rotate(360deg); } }

/* CTA bas de page */
.jg-cta {
  margin-top: 52px;
  text-align: center;
  background: linear-gradient(135deg, #1e293b, #0f172a);
  color: #fff;
  border-radius: var(--jg-radius);
  padding: 44px 28px;
}
.jg-cta h3 { font-size: 1.5rem; font-weight: 800; margin: 0 0 10px; }
.jg-cta p { color: #cbd5e1; margin: 0 0 22px; max-width: 520px; margin-inline: auto; }
.jg-cta a {
  display: inline-block;
  background: #fff;
  color: var(--jg-ink);
  font-weight: 700;
  text-decoration: none;
  padding: 13px 28px;
  border-radius: 11px;
}

/* footer minimal */
.jg-footer {
  border-top: 1px solid var(--jg-border);
  padding: 28px 20px;
  text-align: center;
  color: var(--jg-muted);
  font-size: 0.85rem;
  background: var(--jg-surface);
}
.jg-footer a { color: var(--jg-muted); }

/* ---------- Conteneur PDF hors écran ---------- */
.jg-pdf-stage {
  position: fixed;
  left: -10000px;
  top: 0;
  width: 794px;            /* A4 @ 96dpi */
  background: #fff;
}
.jg-pdf-page {
  width: 794px;
  min-height: 1123px;
  background: #fff;
  padding: 58px 62px;
  font-family: var(--jg-font);
  color: #1a1a1a;
  position: relative;
}
.jg-pdf-measure { min-height: 0; }

/* ---- Page de garde : sobre, guide Sostenutoo neutre ---- */
.jg-pdf-cover { display: flex; flex-direction: column; padding-top: 70px; }
.jg-pdf-wordmark { font-size: 1.15rem; font-weight: 800; color: #1a1a1a; letter-spacing: 0.01em; }
.jg-pdf-topline { height: 1px; background: #e5e7eb; margin: 20px 0 46px; }
.jg-pdf-cover .jg-pdf-kicker {
  font-size: 0.8rem; font-weight: 700; letter-spacing: 0.16em; text-transform: uppercase;
  color: #9ca3af; margin-bottom: 14px;
}
.jg-pdf-cover h1 {
  font-size: 2.5rem; font-weight: 800; color: #1a1a1a;
  margin: 0 0 18px; letter-spacing: -0.025em; line-height: 1.12;
}
.jg-pdf-lead { font-size: 1.08rem; color: #6b7280; line-height: 1.6; margin: 0 0 44px; max-width: 560px; }
.jg-pdf-codeblock {
  align-self: flex-start; min-width: 320px;
  border: 1px solid #e5e7eb; border-radius: 14px; padding: 22px 28px;
  display: flex; flex-direction: column; gap: 10px;
}
.jg-pdf-cb-label { font-size: 0.78rem; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: #9ca3af; }
.jg-pdf-cb-value { font-size: 2.1rem; font-weight: 800; letter-spacing: 0.14em; color: #2563eb; }
.jg-pdf-contact {
  margin-top: auto; font-size: 0.98rem; color: #6b7280;
  border-top: 1px solid #e5e7eb; padding-top: 18px;
}
.jg-pdf-contact b { color: #1a1a1a; font-weight: 600; }

/* ---- En-tête de section : surtitre bleu, filet fin, de l'air ---- */
.jg-pdf-section-head { padding-bottom: 16px; margin-bottom: 40px; border-bottom: 1px solid #e5e7eb; }
.jg-pdf-section-head .jg-pdf-kicker {
  font-size: 0.76rem; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase;
  color: #2563eb; margin-bottom: 8px;
}
.jg-pdf-section-head h2 { font-size: 1.55rem; font-weight: 800; color: #1a1a1a; margin: 0; letter-spacing: -0.015em; }

/* ---- Bloc d'étape : numéro bleu, marges généreuses (pas aplati) ---- */
.jg-pdf-stepblock { display: flex; gap: 30px; align-items: flex-start; margin-bottom: 44px; }
.jg-pdf-stepblock .jg-pdf-stepnum {
  flex: 0 0 auto; width: 40px; height: 40px; border-radius: 50%;
  background: #2563eb; color: #fff; font-weight: 800; font-size: 1.15rem;
  display: flex; align-items: center; justify-content: center;
}
.jg-pdf-stepblock .jg-pdf-steptxt { flex: 1; min-width: 0; padding-top: 5px; }
.jg-pdf-stepblock h3 { font-size: 1.18rem; font-weight: 800; color: #1a1a1a; margin: 0 0 10px; letter-spacing: -0.01em; }
.jg-pdf-stepblock p { color: #6b7280; margin: 0; font-size: 0.96rem; line-height: 1.6; }
.jg-pdf-stepblock .jg-pdf-visual { flex: 0 0 auto; }
/* Étape « ordinateur » : visuel (navigateur) plus large → colonne texte resserrée */
.jg-pdf-stepblock--web { gap: 26px; }
.jg-pdf-stepblock--web .jg-pdf-steptxt { flex: 0 1 auto; }

.jg-pdf-foot {
  position: absolute; bottom: 32px; left: 62px; right: 62px;
  display: flex; justify-content: space-between;
  font-size: 0.72rem; color: #9ca3af; border-top: 1px solid #e5e7eb; padding-top: 12px;
}
