/* ═══════════════════════════════════════════════════════
   Studio Invitations — Premium Brief Form
   Design System: Clean, lumineux, professionnel
   ═══════════════════════════════════════════════════════ */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&family=Fraunces:opsz,wght@9..144,400;9..144,600;9..144,700&display=swap');

/* ── Design Tokens ── */
:root {
  /* Couleurs */
  --white:    #ffffff;
  --bg:       #f8f7f4;
  --bg2:      #f1efe9;
  --surface:  #ffffff;
  --surface2: #faf9f7;
  --text:     #1a1a2e;
  --text2:    #3d3d56;
  --muted:    #8b8b9e;
  --accent:   #2d2d5e;
  --accent2:  #4a4a8a;
  --primary:  #1a1a2e;
  --primary-hover: #2d2d5e;
  --gold:     #c5a55a;
  --gold-light: #f5edda;
  --success:  #2d8a4e;
  --success-light: #e8f5ed;
  --danger:   #c53030;
  --danger-light: #fee;
  --line:     #e8e6e1;
  --line2:    #d5d2ca;

  /* Espacements */
  --space-xs:  4px;
  --space-sm:  8px;
  --space-md:  16px;
  --space-lg:  24px;
  --space-xl:  32px;
  --space-2xl: 48px;
  --space-3xl: 64px;

  /* Rayons */
  --radius:    12px;
  --radius-lg: 20px;
  --radius-xl: 28px;

  /* Ombres */
  --shadow-sm: 0 1px 3px rgba(0,0,0,.05), 0 1px 2px rgba(0,0,0,.04);
  --shadow-md: 0 4px 16px rgba(0,0,0,.06), 0 1px 4px rgba(0,0,0,.04);
  --shadow-lg: 0 12px 40px rgba(0,0,0,.08), 0 4px 12px rgba(0,0,0,.04);

  /* Typographie */
  --font:     'Inter', ui-sans-serif, system-ui, -apple-system, sans-serif;
  --font-display: 'Fraunces', Georgia, serif;

  /* Animation */
  --ease: cubic-bezier(.4, 0, .2, 1);
  --duration: .25s;

  --max: 720px;
}

/* ── Reset ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; }

body {
  font-family: var(--font);
  color: var(--text);
  background: var(--bg);
  line-height: 1.65;
  min-height: 100vh;
}

.container { width: min(var(--max), calc(100% - 40px)); margin: 0 auto; }
.main { padding-bottom: var(--space-3xl); }

/* ── Progress Bar ── */
.progress-bar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--line);
  z-index: 200;
}

.progress-bar__fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--accent), var(--gold));
  border-radius: 0 3px 3px 0;
  transition: width .5s var(--ease);
}

/* ── Navigation ── */
.nav {
  position: sticky;
  top: 3px;
  z-index: 100;
  background: rgba(248,247,244,.85);
  backdrop-filter: blur(16px) saturate(1.4);
  -webkit-backdrop-filter: blur(16px) saturate(1.4);
  border-bottom: 1px solid var(--line);
}

.nav__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 0;
}

.brand { display: flex; align-items: center; gap: 12px; }
.brand__icon {
  font-size: 18px;
  color: var(--gold);
}
.brand__title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 16px;
  color: var(--text);
}
.brand__subtitle {
  font-size: 11px;
  color: var(--muted);
  font-weight: 500;
  letter-spacing: .02em;
}

.nav__step {
  font-size: 12px;
  font-weight: 600;
  color: var(--muted);
  background: var(--bg2);
  padding: 6px 14px;
  border-radius: 999px;
  letter-spacing: .02em;
}

/* ── Hero ── */
.hero {
  text-align: center;
  padding: var(--space-3xl) 0 var(--space-2xl);
}

.hero__badge {
  display: inline-block;
  padding: 6px 16px;
  background: var(--gold-light);
  color: var(--gold);
  font-size: 13px;
  font-weight: 700;
  border-radius: 999px;
  margin-bottom: var(--space-lg);
  letter-spacing: .02em;
}

.hero h1 {
  font-family: var(--font-display);
  font-size: clamp(28px, 5vw, 40px);
  font-weight: 700;
  line-height: 1.2;
  color: var(--text);
  margin-bottom: var(--space-md);
  letter-spacing: -.02em;
}

.hero__sub {
  font-size: 16px;
  color: var(--text2);
  max-width: 520px;
  margin: 0 auto var(--space-xl);
  line-height: 1.7;
}

.hero__features {
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
  max-width: 440px;
  margin: 0 auto var(--space-xl);
  text-align: left;
}

.hero__feature {
  display: flex;
  align-items: flex-start;
  gap: var(--space-md);
  padding: var(--space-md) var(--space-lg);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
}

.hero__feature-icon {
  font-size: 20px;
  flex-shrink: 0;
  margin-top: 2px;
}

.hero__feature strong {
  display: block;
  font-size: 14px;
  color: var(--text);
  margin-bottom: 2px;
}

.hero__feature span {
  font-size: 13px;
  color: var(--muted);
  line-height: 1.5;
}

.hero__cta { margin-bottom: var(--space-lg); }

.hero__note {
  font-size: 13px;
  color: var(--muted);
  max-width: 420px;
  margin: 0 auto;
  line-height: 1.6;
}

/* ── Steps ── */
.step {
  padding: var(--space-xl) 0;
  animation: stepIn .4s var(--ease) both;
}

@keyframes stepIn {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}

.step__header {
  margin-bottom: var(--space-lg);
}

.step__number {
  font-size: 12px;
  font-weight: 700;
  color: var(--gold);
  text-transform: uppercase;
  letter-spacing: .08em;
  margin-bottom: var(--space-sm);
}

.step__header h2 {
  font-family: var(--font-display);
  font-size: clamp(24px, 4vw, 32px);
  font-weight: 700;
  color: var(--text);
  margin-bottom: var(--space-sm);
  letter-spacing: -.01em;
  line-height: 1.2;
}

.step__desc {
  font-size: 15px;
  color: var(--muted);
  line-height: 1.6;
  max-width: 540px;
}

/* ── Cards ── */
.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: var(--space-xl);
  box-shadow: var(--shadow-md);
  margin-bottom: var(--space-lg);
}

/* ── Fields ── */
.field { margin-bottom: var(--space-lg); }
.field:last-child { margin-bottom: 0; }

.fields-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-lg);
  margin-bottom: var(--space-lg);
}
.fields-row:last-child { margin-bottom: 0; }
.fields-row .field { margin-bottom: 0; }

label {
  display: block;
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: var(--space-sm);
}

.req { color: var(--gold); margin-left: 2px; }

input, select, textarea {
  width: 100%;
  padding: 12px 16px;
  border: 1.5px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface2);
  color: var(--text);
  font-family: var(--font);
  font-size: 14px;
  outline: none;
  transition: all var(--duration) var(--ease);
}

input::placeholder, textarea::placeholder {
  color: var(--muted);
  opacity: .6;
}

select {
  appearance: none;
  -webkit-appearance: none;
  cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%238b8b9e' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  padding-right: 40px;
}

select option { background: var(--surface); color: var(--text); }

input:hover, select:hover, textarea:hover {
  border-color: var(--line2);
}

input:focus, select:focus, textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(45,45,94,.08);
}

textarea { resize: vertical; min-height: 80px; }

.field__help {
  display: block;
  font-size: 12px;
  color: var(--muted);
  margin-top: 6px;
  line-height: 1.5;
}

/* ── Divider ── */
.divider {
  height: 1px;
  background: var(--line);
  margin: var(--space-lg) 0;
}

/* ── Info Box ── */
.info-box {
  display: flex;
  gap: var(--space-md);
  padding: var(--space-md) var(--space-lg);
  background: var(--gold-light);
  border: 1px solid rgba(197,165,90,.15);
  border-radius: var(--radius);
  margin-bottom: var(--space-lg);
}

.info-box__icon { font-size: 18px; flex-shrink: 0; margin-top: 2px; }
.info-box strong { display: block; font-size: 13px; color: var(--text); margin-bottom: 4px; }
.info-box p { font-size: 13px; color: var(--text2); line-height: 1.6; margin: 0; }

/* ── Buttons ── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 24px;
  border-radius: var(--radius);
  border: 1.5px solid transparent;
  font-family: var(--font);
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
  transition: all var(--duration) var(--ease);
  text-decoration: none;
}

.btn--primary {
  background: var(--primary);
  color: var(--white);
  border-color: var(--primary);
}

.btn--primary:hover {
  background: var(--primary-hover);
  border-color: var(--primary-hover);
  box-shadow: var(--shadow-md);
  transform: translateY(-1px);
}

.btn--ghost {
  background: transparent;
  color: var(--muted);
  border-color: transparent;
}

.btn--ghost:hover {
  color: var(--text);
  background: var(--bg2);
}

.btn--outline {
  background: var(--surface);
  color: var(--text);
  border-color: var(--line);
}

.btn--outline:hover {
  border-color: var(--line2);
  background: var(--bg2);
  box-shadow: var(--shadow-sm);
}

.btn--lg { padding: 14px 32px; font-size: 15px; border-radius: var(--radius); }

.btn--sm { padding: 8px 16px; font-size: 12px; }

.btn--danger { color: var(--danger); }
.btn--danger:hover { background: var(--danger-light); }

.btn:active { transform: translateY(0); }

/* ── Step Navigation ── */
.step__nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: var(--space-lg);
}

/* ── Moment Cards ── */
.moment {
  padding: var(--space-lg);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface2);
  margin-bottom: var(--space-md);
  animation: stepIn .3s var(--ease) both;
}

.momentHead {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--space-md);
}

.momentTitle {
  font-weight: 700;
  font-size: 15px;
  color: var(--accent);
}

.momentGrid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-md);
}

.momentGrid .span2 { grid-column: 1 / -1; }
.momentGrid label { font-size: 13px; }
.momentGrid input { font-size: 13px; padding: 10px 14px; }

/* ── Summary ── */
.summary {
  padding: var(--space-lg);
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: var(--surface2);
  white-space: pre-wrap;
  line-height: 1.7;
  font-size: 13px;
  font-family: 'SF Mono', 'Fira Code', 'Cascadia Code', 'Menlo', monospace;
  color: var(--text2);
  max-height: 500px;
  overflow: auto;
}

.summary-actions {
  display: flex;
  gap: var(--space-md);
  justify-content: center;
  margin-bottom: var(--space-md);
}

.summary-note {
  text-align: center;
  font-size: 13px;
  color: var(--muted);
  line-height: 1.6;
}

/* ── Footer ── */
.footer {
  padding: var(--space-xl) 0;
  text-align: center;
  font-size: 12px;
  color: var(--muted);
  border-top: 1px solid var(--line);
  margin-top: var(--space-2xl);
}

/* ── Scrollbar ── */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--line2); border-radius: 10px; }
::-webkit-scrollbar-thumb:hover { background: var(--muted); }

/* ── Selection ── */
::selection { background: rgba(197,165,90,.2); color: var(--text); }

/* ── Toast notification ── */
.toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: var(--text);
  color: var(--white);
  padding: 12px 24px;
  border-radius: var(--radius);
  font-size: 14px;
  font-weight: 500;
  box-shadow: var(--shadow-lg);
  z-index: 1000;
  opacity: 0;
  transition: all .3s var(--ease);
  pointer-events: none;
}

.toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* ── Responsive ── */
@media (max-width: 640px) {
  .container { width: calc(100% - 32px); }
  .card { padding: var(--space-lg) var(--space-md); }
  .fields-row { grid-template-columns: 1fr; gap: var(--space-md); }
  .momentGrid { grid-template-columns: 1fr; }
  .hero { padding: var(--space-2xl) 0 var(--space-xl); }
  .hero h1 { font-size: 26px; }
  .summary-actions { flex-direction: column; }
  .summary-actions .btn { width: 100%; }
  .nav__inner { gap: 8px; }
  .brand__subtitle { display: none; }
  .step__nav { gap: var(--space-sm); }
}
