/* ====================================================================
   LE CARNET — Design system Ivoire & Cognac
   Premium mariage / SaaS multi-tenant skinable
   ==================================================================== */

:root {
  /* Palette par défaut tenant Jaysphotography (override par tenant via inline style) */
  --ivory: #faf6f0;
  --ivory-warm: #f5ede0;
  --bone: #e8dfd1;
  --paper: #ffffff;
  --cognac: #a16f3a;
  --cognac-deep: #7a522a;
  --cognac-light: #c69458;
  --ink: #1a1814;
  --ink-soft: #3a342c;
  --ink-muted: #7a7066;
  --ink-faint: #b8ad9e;
  --line: #e8dfd1;
  --line-soft: #f0e7d8;
  --rose: #d4a59a;
  --sage: #97a18a;
  --gold: #d4b87a;

  --serif: "Fraunces", "EB Garamond", Georgia, "Times New Roman", serif;
  --sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
  --mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;

  --radius: 4px;
  --radius-lg: 12px;
  --radius-xl: 24px;
  --shadow-sm: 0 1px 2px rgba(26, 24, 20, 0.04), 0 2px 8px rgba(26, 24, 20, 0.04);
  --shadow-md: 0 4px 12px rgba(26, 24, 20, 0.06), 0 12px 32px rgba(26, 24, 20, 0.08);
  --shadow-lg: 0 12px 48px rgba(26, 24, 20, 0.12);

  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
}

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

html, body {
  background: var(--ivory);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 15.5px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

body {
  background: linear-gradient(180deg, var(--ivory) 0%, var(--ivory-warm) 100%);
  min-height: 100vh;
}

img { display: block; max-width: 100%; height: auto; }
a { color: var(--cognac); text-decoration: none; }
a:hover { color: var(--cognac-deep); }

button {
  background: none;
  border: 0;
  font: inherit;
  color: inherit;
  cursor: pointer;
}

input, textarea, select {
  font: inherit;
  color: inherit;
}

::selection { background: var(--cognac-light); color: var(--ivory); }

/* ===== TYPOGRAPHIE ===== */

.serif { font-family: var(--serif); font-weight: 400; }
.italic { font-style: italic; }

.h-display {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(36px, 5vw, 64px);
  line-height: 1.05;
  letter-spacing: -0.01em;
  color: var(--ink);
}
.h-display em { font-style: italic; font-weight: 300; color: var(--cognac); }

.h-section {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(26px, 3vw, 38px);
  line-height: 1.15;
  letter-spacing: -0.005em;
  color: var(--ink);
}
.h-section em { font-style: italic; color: var(--cognac); }

.h-card {
  font-family: var(--serif);
  font-weight: 400;
  font-size: 22px;
  line-height: 1.2;
  color: var(--ink);
}

.eyebrow {
  font-size: 10px;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: var(--cognac);
  font-weight: 500;
}

.lead {
  font-size: 17px;
  line-height: 1.7;
  color: var(--ink-soft);
  max-width: 65ch;
}

.muted { color: var(--ink-muted); }
.faint { color: var(--ink-faint); }

/* ===== BOUTONS ===== */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 22px;
  background: var(--ink);
  color: var(--ivory);
  font-size: 12px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  font-weight: 500;
  border-radius: var(--radius);
  cursor: pointer;
  transition: background 0.25s var(--ease), transform 0.18s var(--ease), box-shadow 0.25s var(--ease);
  text-decoration: none;
}
.btn:hover {
  background: #000;
  transform: translateY(-1px);
  box-shadow: var(--shadow-sm);
}
.btn:disabled { opacity: 0.5; cursor: not-allowed; transform: none; }

.btn--cognac {
  background: var(--cognac);
  color: var(--ivory);
}
.btn--cognac:hover { background: var(--cognac-deep); }

.btn--ghost {
  background: transparent;
  color: var(--ink);
  border: 1px solid var(--line);
}
.btn--ghost:hover { background: var(--ivory-warm); border-color: var(--cognac); color: var(--cognac); }

.btn--small { padding: 8px 14px; font-size: 11px; letter-spacing: 0.14em; }
.btn--full { width: 100%; }

/* ===== CHAMPS DE FORMULAIRE ===== */

.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 16px; }
.field__label {
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-muted);
  font-weight: 500;
}
.input, .textarea, .select {
  width: 100%;
  padding: 12px 14px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  font-size: 15px;
  font-family: inherit;
  color: var(--ink);
  transition: border-color 0.2s var(--ease), box-shadow 0.2s var(--ease);
}
.input:focus, .textarea:focus, .select:focus {
  outline: 0;
  border-color: var(--cognac);
  box-shadow: 0 0 0 3px rgba(161, 111, 58, 0.12);
}
.textarea { resize: vertical; min-height: 88px; line-height: 1.5; }
.field__error {
  color: #b91c1c;
  font-size: 12px;
  margin-top: 4px;
}

/* ===== CARTE / SURFACE ===== */

.card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 24px;
  transition: border-color 0.2s var(--ease), box-shadow 0.25s var(--ease);
}
.card:hover { border-color: var(--bone); box-shadow: var(--shadow-sm); }
.card--featured { background: linear-gradient(135deg, var(--ivory-warm), var(--paper)); }

/* ===== DIVIDER ===== */
.divider {
  height: 1px;
  background: var(--line);
  border: 0;
  margin: 24px 0;
}
.divider--ornament {
  display: flex;
  align-items: center;
  gap: 16px;
  color: var(--cognac);
  font-family: var(--serif);
  font-style: italic;
  font-size: 14px;
}
.divider--ornament::before,
.divider--ornament::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--line);
}

/* ===== STAGE / PROGRESS ===== */
.timeline {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  padding: 18px 24px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 999px;
}
.timeline__step {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-faint);
  font-weight: 500;
}
.timeline__step.is-active { color: var(--cognac); }
.timeline__step.is-done { color: var(--ink); }
.timeline__step.is-done::before {
  content: "✓";
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  background: var(--cognac);
  color: var(--ivory);
  border-radius: 50%;
  font-size: 10px;
}
.timeline__step.is-active::before {
  content: "";
  width: 10px;
  height: 10px;
  background: var(--cognac);
  border-radius: 50%;
  box-shadow: 0 0 0 4px rgba(161, 111, 58, 0.18);
}
.timeline__step + .timeline__step::before { display: none; }
.timeline__sep { flex: 1; height: 1px; background: var(--line); min-width: 12px; }

/* ===== TAGS / BADGES ===== */
.tag {
  display: inline-flex;
  padding: 3px 10px;
  font-size: 10px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  font-weight: 500;
  border-radius: 999px;
  background: var(--ivory-warm);
  color: var(--cognac);
}
.tag--paid { background: #e3eedf; color: #406b35; }
.tag--pending { background: #fdf4dc; color: #8a6c1a; }
.tag--overdue { background: #fadcd9; color: #a13a30; }
.tag--upcoming { background: var(--ivory-warm); color: var(--cognac); }
.tag--done { background: #e6e0d4; color: var(--ink-soft); }

/* ===== LAYOUT PRIMAIRES ===== */

.shell {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 clamp(16px, 4vw, 48px);
}
.shell--narrow { max-width: 760px; }

.app-nav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(250, 246, 240, 0.9);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--line);
}
.app-nav__inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 14px clamp(16px, 4vw, 48px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}
.app-nav__brand {
  display: flex;
  align-items: baseline;
  gap: 4px;
  font-family: var(--serif);
  font-size: 22px;
  font-weight: 400;
  color: var(--ink);
}
.app-nav__brand em {
  color: var(--cognac);
  font-style: italic;
  font-weight: 300;
}

.app-nav__links {
  display: flex;
  align-items: center;
  gap: 24px;
}
.app-nav__links a {
  font-size: 13px;
  color: var(--ink-soft);
  letter-spacing: 0.04em;
  font-weight: 500;
}
.app-nav__links a:hover { color: var(--cognac); }
.app-nav__links a.is-active { color: var(--cognac); }

/* ===== HERO LANDING ===== */

.hero {
  padding: clamp(60px, 10vw, 140px) 0 clamp(40px, 8vw, 100px);
  text-align: center;
  position: relative;
  overflow: hidden;
}
.hero::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: clamp(400px, 80vw, 1000px);
  height: clamp(400px, 80vw, 1000px);
  background: radial-gradient(circle at center, rgba(212, 184, 122, 0.18), transparent 60%);
  z-index: -1;
}
.hero__eyebrow { margin-bottom: 24px; }
.hero__title { margin-bottom: 24px; }
.hero__tagline {
  font-family: var(--serif);
  font-style: italic;
  font-size: clamp(20px, 2.4vw, 26px);
  color: var(--cognac);
  margin-bottom: 32px;
}

/* ===== APP-CARDS GRID ===== */

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 24px;
  margin: 32px 0;
}
.couple-card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 24px;
  cursor: pointer;
  transition: transform 0.2s var(--ease), border-color 0.2s var(--ease), box-shadow 0.25s var(--ease);
  text-decoration: none;
  color: inherit;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.couple-card:hover {
  transform: translateY(-2px);
  border-color: var(--cognac);
  box-shadow: var(--shadow-md);
}
.couple-card__date {
  font-size: 11px;
  letter-spacing: 0.14em;
  color: var(--ink-muted);
  text-transform: uppercase;
}
.couple-card__names {
  font-family: var(--serif);
  font-size: 26px;
  font-weight: 400;
  line-height: 1.1;
  color: var(--ink);
}
.couple-card__names em { color: var(--cognac); font-style: italic; font-weight: 300; }
.couple-card__venue { font-size: 13px; color: var(--ink-muted); }
.couple-card__meta {
  display: flex;
  gap: 14px;
  font-size: 11px;
  color: var(--ink-muted);
  margin-top: auto;
  padding-top: 14px;
  border-top: 1px solid var(--line-soft);
}
.couple-card__meta b { color: var(--ink); font-weight: 600; }

/* ===== TABS ===== */
.tabs {
  display: flex;
  gap: 4px;
  border-bottom: 1px solid var(--line);
  margin: 32px 0 24px;
  overflow-x: auto;
}
.tabs__btn {
  padding: 12px 18px;
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-weight: 500;
  color: var(--ink-muted);
  border-bottom: 2px solid transparent;
  transition: color 0.2s var(--ease), border-color 0.2s var(--ease);
  white-space: nowrap;
}
.tabs__btn:hover { color: var(--ink); }
.tabs__btn.is-active {
  color: var(--cognac);
  border-bottom-color: var(--cognac);
}

/* ===== JOUR-J / TIMELINE VERTICALE ===== */
.j-timeline {
  position: relative;
  padding-left: 36px;
}
.j-timeline::before {
  content: "";
  position: absolute;
  left: 12px;
  top: 0;
  bottom: 0;
  width: 1px;
  background: var(--line);
}
.j-timeline__item {
  position: relative;
  padding: 16px 0;
}
.j-timeline__item::before {
  content: "";
  position: absolute;
  left: -30px;
  top: 22px;
  width: 12px;
  height: 12px;
  background: var(--paper);
  border: 2px solid var(--cognac);
  border-radius: 50%;
}
.j-timeline__item.is-now::before {
  background: var(--cognac);
  box-shadow: 0 0 0 6px rgba(161, 111, 58, 0.16);
}
.j-timeline__time {
  font-family: var(--serif);
  font-size: 18px;
  color: var(--cognac);
  font-style: italic;
}
.j-timeline__title {
  font-family: var(--serif);
  font-size: 22px;
  margin: 4px 0 6px;
}
.j-timeline__notes {
  font-size: 14px;
  color: var(--ink-soft);
  line-height: 1.6;
}

/* ===== TOAST ===== */
.toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%) translateY(100px);
  background: var(--ink);
  color: var(--ivory);
  padding: 14px 20px;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  font-size: 13px;
  letter-spacing: 0.04em;
  z-index: 200;
  opacity: 0;
  transition: opacity 0.25s var(--ease), transform 0.3s var(--ease-out);
}
.toast.is-visible { opacity: 1; transform: translateX(-50%) translateY(0); }
.toast--error { background: #b91c1c; }

/* ===== SECTION SPACING ===== */
.section { padding: 32px 0; }
.section--lg { padding: 56px 0; }

/* ===== HELPERS ===== */
.row { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.row--end { justify-content: flex-end; }
.row--space { justify-content: space-between; }
.stack { display: flex; flex-direction: column; gap: 16px; }
.stack--lg { gap: 32px; }

@media (max-width: 720px) {
  .h-display { font-size: 36px; }
  .timeline { padding: 12px 16px; }
  .tabs { font-size: 11px; }
}
