/* ====================================================================
   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; }
}

/* =============================================================
   APP-LIKE UX (couple / témoin / invités)
   Bottom tab bar iOS, list rows, hero cards, icônes
   ============================================================= */

/* === HERO CARD couple/public === */
.hero-card {
  background: linear-gradient(135deg, var(--cognac) 0%, var(--cognac-deep) 100%);
  color: var(--ivory);
  border-radius: var(--radius-xl);
  padding: 32px 24px;
  text-align: center;
  position: relative;
  overflow: hidden;
  margin-bottom: 24px;
}
.hero-card::before {
  content: "";
  position: absolute;
  top: -40%;
  right: -20%;
  width: 240px;
  height: 240px;
  background: radial-gradient(circle, rgba(212, 184, 122, 0.35), transparent 70%);
  pointer-events: none;
}
.hero-card__eyebrow {
  font-size: 10px;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: var(--gold);
  font-weight: 500;
  position: relative;
}
.hero-card__title {
  font-family: var(--serif);
  font-size: clamp(28px, 6vw, 40px);
  font-weight: 400;
  margin: 12px 0 8px;
  line-height: 1.1;
  position: relative;
}
.hero-card__title em { font-style: italic; color: var(--gold); }
.hero-card__sub {
  font-size: 14px;
  opacity: 0.85;
  position: relative;
}
.hero-card__countdown {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 16px;
  padding: 8px 16px;
  background: rgba(255, 255, 255, 0.18);
  backdrop-filter: blur(10px);
  border-radius: 999px;
  font-size: 13px;
  letter-spacing: 0.06em;
  position: relative;
}

/* === LIST ROW (iOS-style) === */
.row-link {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px 18px;
  background: var(--paper);
  border: 1px solid var(--line-soft);
  border-radius: var(--radius-lg);
  text-decoration: none;
  color: var(--ink);
  cursor: pointer;
  transition: background 0.15s var(--ease), transform 0.15s var(--ease), box-shadow 0.2s var(--ease);
  width: 100%;
  font: inherit;
  text-align: left;
}
.row-link:hover { background: var(--ivory-warm); transform: translateY(-1px); box-shadow: var(--shadow-sm); }
.row-link:active { transform: translateY(0) scale(0.99); }
.row-link__icon {
  flex: 0 0 44px;
  height: 44px;
  border-radius: 12px;
  background: var(--ivory-warm);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--cognac);
  font-size: 22px;
}
.row-link__icon svg { width: 22px; height: 22px; }
.row-link__body { flex: 1; min-width: 0; }
.row-link__title {
  font-family: var(--serif);
  font-size: 17px;
  font-weight: 400;
  line-height: 1.2;
  color: var(--ink);
  margin-bottom: 2px;
}
.row-link__sub {
  font-size: 13px;
  color: var(--ink-muted);
  line-height: 1.3;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.row-link__chev {
  flex: 0 0 auto;
  color: var(--ink-faint);
  font-size: 18px;
}
.row-link__badge {
  flex: 0 0 auto;
  min-width: 22px;
  height: 22px;
  padding: 0 7px;
  background: var(--cognac);
  color: var(--ivory);
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* === ACTION GRID (Quick actions accueil) === */
.action-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 12px;
  margin: 16px 0;
}
.action-tile {
  background: var(--paper);
  border: 1px solid var(--line-soft);
  border-radius: var(--radius-lg);
  padding: 20px 16px;
  text-align: center;
  text-decoration: none;
  color: var(--ink);
  cursor: pointer;
  transition: transform 0.18s var(--ease), border-color 0.18s var(--ease), box-shadow 0.2s var(--ease);
  font: inherit;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}
.action-tile:hover { transform: translateY(-2px); border-color: var(--cognac); box-shadow: var(--shadow-md); }
.action-tile__icon {
  width: 56px;
  height: 56px;
  border-radius: 16px;
  background: linear-gradient(135deg, var(--ivory-warm), var(--bone));
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--cognac);
}
.action-tile__icon svg { width: 28px; height: 28px; }
.action-tile__label {
  font-family: var(--serif);
  font-size: 15px;
  font-weight: 400;
}
.action-tile__hint {
  font-size: 11px;
  color: var(--ink-muted);
  letter-spacing: 0.04em;
}
.action-tile--featured { background: linear-gradient(135deg, var(--cognac), var(--cognac-deep)); color: var(--ivory); border: 0; }
.action-tile--featured .action-tile__icon { background: rgba(255,255,255,0.2); color: var(--ivory); }
.action-tile--featured .action-tile__hint { color: var(--gold); }

/* === BOTTOM TAB BAR (mobile only) === */
.bottom-tabs {
  display: none;
}
@media (max-width: 820px) {
  .bottom-tabs {
    display: grid;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 60;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    border-top: 1px solid var(--line);
    padding: 6px 0 calc(6px + env(safe-area-inset-bottom));
    grid-template-columns: repeat(5, 1fr);
  }
  .bottom-tabs__btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 3px;
    padding: 6px 4px;
    background: transparent;
    border: 0;
    color: var(--ink-faint);
    font-size: 10px;
    letter-spacing: 0.02em;
    cursor: pointer;
    transition: color 0.15s var(--ease);
    position: relative;
  }
  .bottom-tabs__btn svg { width: 24px; height: 24px; }
  .bottom-tabs__btn.is-active { color: var(--cognac); }
  .bottom-tabs__btn.is-active::before {
    content: "";
    position: absolute;
    top: 2px;
    width: 28px;
    height: 4px;
    background: var(--cognac);
    border-radius: 999px;
    opacity: 0.15;
  }
  .bottom-tabs__btn__badge {
    position: absolute;
    top: 2px;
    right: 18%;
    min-width: 16px;
    height: 16px;
    padding: 0 4px;
    background: #c0392b;
    color: white;
    border-radius: 999px;
    font-size: 10px;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
  }
  /* Cache top tabs sur mobile pour le couple/témoin/public */
  .has-bottom-tabs .tabs { display: none; }
  /* Padding bottom safe pour ne pas que le contenu soit caché par la bottom bar */
  .has-bottom-tabs main { padding-bottom: calc(80px + env(safe-area-inset-bottom)) !important; }
  /* Compresse la nav top sur mobile */
  .app-nav__inner { padding: 12px 16px; }
  .app-nav__brand { font-size: 18px; }
}

/* === COMPACT NAV (sticky compact pour couple) === */
.compact-nav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(250, 246, 240, 0.92);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border-bottom: 1px solid var(--line);
  padding: 12px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.compact-nav__title {
  font-family: var(--serif);
  font-size: 17px;
  font-weight: 400;
  color: var(--ink);
}
.compact-nav__title em { color: var(--cognac); font-style: italic; }
.icon-btn {
  width: 38px;
  height: 38px;
  border-radius: 12px;
  background: var(--paper);
  border: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--ink-soft);
  transition: background 0.15s var(--ease), color 0.15s var(--ease);
}
.icon-btn:hover { background: var(--ivory-warm); color: var(--cognac); }
.icon-btn svg { width: 18px; height: 18px; }

/* === SECTION HEADER (style app) === */
.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 24px 0 12px;
}
.section-header__title {
  font-family: var(--serif);
  font-size: 22px;
  font-weight: 400;
  color: var(--ink);
}
.section-header__action {
  font-size: 13px;
  color: var(--cognac);
  font-weight: 500;
}

/* === STATUS PILL === */
.pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 11px;
  letter-spacing: 0.04em;
  font-weight: 500;
}
.pill--cognac { background: rgba(161, 111, 58, 0.12); color: var(--cognac); }
.pill--green { background: #e3eedf; color: #406b35; }
.pill--amber { background: #fdf4dc; color: #8a6c1a; }
.pill--rose { background: #fadcd9; color: #a13a30; }

/* === SHEET (modal app-style) === */
.sheet-backdrop {
  position: fixed; inset: 0;
  background: rgba(26, 24, 20, 0.4);
  backdrop-filter: blur(4px);
  z-index: 100;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s var(--ease);
}
.sheet-backdrop.is-open { opacity: 1; pointer-events: auto; }
.sheet {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  max-height: 85vh;
  background: var(--paper);
  border-radius: 24px 24px 0 0;
  z-index: 101;
  transform: translateY(100%);
  transition: transform 0.3s var(--ease-out);
  overflow-y: auto;
  padding: 24px 24px calc(24px + env(safe-area-inset-bottom));
  box-shadow: 0 -10px 40px rgba(26, 24, 20, 0.18);
}
.sheet.is-open { transform: translateY(0); }
.sheet__handle {
  width: 40px;
  height: 4px;
  background: var(--bone);
  border-radius: 2px;
  margin: -8px auto 16px;
}
@media (min-width: 821px) {
  .sheet { max-width: 540px; left: 50%; right: auto; transform: translate(-50%, 100%); border-radius: 24px; bottom: 5vh; }
  .sheet.is-open { transform: translate(-50%, 0); }
}
/* ===== SIGNATURE MODAL ===== */
.sig-overlay {
  position: fixed; inset: 0;
  background: rgba(26, 24, 20, 0.72);
  z-index: 200;
  display: flex; align-items: center; justify-content: center;
  padding: 16px;
  backdrop-filter: blur(4px);
  animation: sig-fade 0.2s ease;
}
@keyframes sig-fade { from { opacity: 0; } to { opacity: 1; } }
.sig-card {
  background: var(--paper, #faf6f0);
  border-radius: 16px;
  width: 100%;
  max-width: 640px;
  max-height: 92vh;
  overflow-y: auto;
  padding: 24px;
  box-shadow: 0 30px 60px rgba(0,0,0,0.35);
  position: relative;
  animation: sig-slide 0.25s ease;
}
@keyframes sig-slide { from { transform: translateY(20px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }
.sig-close {
  position: absolute; top: 12px; right: 12px;
  background: transparent; border: 0; cursor: pointer;
  font-size: 22px; line-height: 1; color: var(--ink-muted, #7a7066);
  width: 36px; height: 36px;
}
.sig-close:hover { color: var(--ink, #1a1814); }
.sig-head { margin-bottom: 18px; padding-right: 32px; }
.sig-title {
  font-family: 'Fraunces', Georgia, serif;
  font-size: 24px; font-weight: 400;
  color: var(--ink, #1a1814);
}
.sig-subtitle { font-size: 13px; color: var(--ink-muted, #7a7066); margin-top: 4px; letter-spacing: 0.04em; }
.sig-field { margin-bottom: 12px; }
.sig-label {
  display: block;
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-muted, #7a7066);
  margin-bottom: 6px;
  font-weight: 500;
}
.sig-input {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--bone, #e8dfd1);
  border-radius: 6px;
  font-size: 15px;
  font-family: inherit;
  background: #fff;
  color: var(--ink, #1a1814);
  box-sizing: border-box;
}
.sig-input:focus { outline: none; border-color: var(--cognac, #a16f3a); box-shadow: 0 0 0 3px rgba(161,111,58,0.15); }
.sig-canvas-wrap {
  margin: 12px 0;
  background: #fff;
  border: 2px dashed var(--bone, #e8dfd1);
  border-radius: 8px;
  padding: 12px;
  position: relative;
  text-align: center;
}
.sig-canvas {
  display: block;
  margin: 0 auto;
  cursor: crosshair;
  touch-action: none;
  background: transparent;
  border-bottom: 1px solid var(--bone, #e8dfd1);
}
.sig-canvas-hint {
  font-size: 12px;
  color: var(--ink-muted, #7a7066);
  margin-top: 6px;
  font-style: italic;
}
.sig-toolbar { display: flex; justify-content: flex-end; gap: 8px; margin-bottom: 12px; }
.sig-consent {
  display: flex; gap: 10px;
  align-items: flex-start;
  font-size: 13px;
  line-height: 1.5;
  color: var(--ink-soft, #3a342c);
  padding: 12px;
  background: rgba(161, 111, 58, 0.06);
  border-radius: 6px;
  cursor: pointer;
  margin-bottom: 12px;
}
.sig-consent input { margin-top: 3px; flex-shrink: 0; }
.sig-consent-text { flex: 1; }
.sig-error {
  background: rgba(178, 56, 56, 0.08);
  color: #b23838;
  padding: 10px 12px;
  border-radius: 6px;
  font-size: 13px;
  margin-bottom: 12px;
}
.sig-actions { display: flex; justify-content: flex-end; gap: 8px; }
.sig-btn {
  padding: 10px 20px;
  border-radius: 6px;
  font-size: 13px;
  letter-spacing: 0.06em;
  font-weight: 500;
  border: 0;
  cursor: pointer;
  font-family: inherit;
  transition: opacity 0.15s, transform 0.1s;
}
.sig-btn--primary {
  background: var(--cognac, #a16f3a);
  color: #faf6f0;
}
.sig-btn--primary:hover { opacity: 0.92; }
.sig-btn--primary:disabled { opacity: 0.5; cursor: not-allowed; }
.sig-btn--ghost {
  background: transparent;
  color: var(--ink-muted, #7a7066);
  border: 1px solid var(--bone, #e8dfd1);
}
.sig-btn--ghost:hover { color: var(--ink, #1a1814); border-color: var(--ink-muted, #7a7066); }
@media (max-width: 640px) {
  .sig-card { padding: 18px; max-height: 96vh; }
  .sig-title { font-size: 20px; }
  .sig-canvas { width: 100% !important; height: 180px !important; }
}

/* ===== STANDALONE /sign/:token PAGE ===== */
.sign-shell {
  min-height: 100vh;
  background: var(--paper, #faf6f0);
  padding: 24px 16px 80px;
}
.sign-page {
  max-width: 720px;
  margin: 0 auto;
  background: #fff;
  border: 1px solid var(--bone, #e8dfd1);
  border-radius: 12px;
  padding: 32px;
  box-shadow: 0 4px 20px rgba(26, 24, 20, 0.06);
}
.sign-brand {
  font-size: 11px;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: var(--cognac, #a16f3a);
  margin-bottom: 8px;
}
.sign-page h1 {
  font-family: 'Fraunces', Georgia, serif;
  font-size: 28px;
  font-weight: 400;
  margin: 0 0 8px;
  color: var(--ink, #1a1814);
}
.sign-page .lede { color: var(--ink-soft, #3a342c); font-size: 15px; margin-bottom: 24px; }
.sign-meta {
  display: grid; grid-template-columns: 1fr 1fr; gap: 12px 24px;
  padding: 16px 0;
  margin: 16px 0 24px;
  border-top: 1px solid var(--bone, #e8dfd1);
  border-bottom: 1px solid var(--bone, #e8dfd1);
}
.sign-meta dt { font-size: 11px; color: var(--cognac, #a16f3a); letter-spacing: 0.16em; text-transform: uppercase; margin-bottom: 2px; }
.sign-meta dd { margin: 0 0 8px; font-size: 14px; color: var(--ink, #1a1814); }
.sign-cta { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 24px; }
.sign-confirm {
  text-align: center; padding: 32px;
  background: rgba(64, 107, 53, 0.06);
  border-radius: 8px;
  margin-top: 24px;
}
.sign-confirm h2 { font-family: 'Fraunces', serif; color: #406b35; margin: 0 0 8px; font-weight: 400; }

/* ===== RESPONSIVE FIX — composants ajoutés (signature, import, sign page) ===== */

/* Sign page — meta 2 cols → 1 col sur mobile */
@media (max-width: 600px) {
  .sign-shell { padding: 16px 12px 60px; }
  .sign-page { padding: 22px 18px; border-radius: 8px; }
  .sign-page h1 { font-size: 22px; }
  .sign-meta { grid-template-columns: 1fr; gap: 8px 0; padding: 12px 0; }
  .sign-meta dt { font-size: 10px; }
  .sign-cta .btn { flex: 1 1 auto; min-height: 44px; }
}

/* Signature modal — affinage canvas et padding sur très petits écrans */
@media (max-width: 480px) {
  .sig-card { padding: 16px 14px; max-height: 100vh; border-radius: 10px; }
  .sig-title { font-size: 18px; line-height: 1.25; }
  .sig-subtitle { font-size: 12px; }
  .sig-canvas-wrap { padding: 8px; margin: 8px 0; }
  .sig-canvas { height: 140px !important; }
  .sig-canvas-hint { font-size: 11px; }
  .sig-input { padding: 12px; font-size: 16px; /* évite zoom iOS */ }
  .sig-actions { flex-direction: column-reverse; gap: 8px; }
  .sig-actions .sig-btn { width: 100%; min-height: 44px; }
  .sig-toolbar { justify-content: stretch; }
  .sig-toolbar .sig-btn { flex: 1; }
  .sig-consent { font-size: 13px; padding: 10px; }
}

/* Mobile landscape — canvas plus court pour ne pas dépasser */
@media (max-width: 900px) and (orientation: landscape) {
  .sig-card { max-height: 96vh; padding: 12px 16px; }
  .sig-canvas { height: 120px !important; }
  .sig-head { margin-bottom: 8px; }
}

/* Modal import brief — tabs scrollables horizontalement sur mobile */
@media (max-width: 640px) {
  .imp-tab { padding: 10px 8px; font-size: 12px; white-space: nowrap; }
  .sig-card .row[style*="border-bottom"] {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    flex-wrap: nowrap !important;
  }
  .sig-card textarea { font-size: 16px; /* évite zoom iOS */ }
  /* Review modal — grille 2 cols → 1 col sur mobile */
  .sig-card form > div[style*="grid-template-columns: 1fr 1fr"] {
    grid-template-columns: 1fr !important;
  }
}

/* Contrats admin — row de boutons d'action plus propre sur mobile */
@media (max-width: 720px) {
  /* Force le full-width pour les boutons d'action contrats sur mobile */
  .card .row[style*="flex-wrap: wrap"] .btn--small {
    flex: 1 1 calc(50% - 4px);
    min-height: 40px;
    text-align: center;
    justify-content: center;
  }
  .card .row[style*="flex-wrap: wrap"] select {
    width: 100% !important;
    min-height: 40px;
  }
  /* Bloc info PDF importé : passe en colonne, plus aéré */
  .card .muted[style*="background: rgba(161,111,58,0.06)"] {
    line-height: 1.7;
  }
}

/* iOS safe-area pour les modals plein écran */
@supports (padding-bottom: env(safe-area-inset-bottom)) {
  .sig-card { padding-bottom: max(24px, calc(24px + env(safe-area-inset-bottom))); }
  .sign-page { padding-bottom: max(24px, calc(24px + env(safe-area-inset-bottom))); }
}

/* Tap targets — minimum 44px sur mobile pour respecter Apple HIG */
@media (max-width: 640px) {
  .btn--small { min-height: 40px; padding: 10px 14px; }
  .tag { padding: 6px 10px; font-size: 11px; }
}

/* Sign page — bouton "Signer maintenant" en pleine largeur sur mobile */
@media (max-width: 480px) {
  .sign-cta { flex-direction: column; gap: 10px; }
  .sign-cta .btn { width: 100%; min-height: 44px; }
}

/* Contrats card — l'image de signature ne déborde pas */
.card img[alt="Signature client"], .card img[alt="Votre signature"] {
  max-width: 100% !important;
  height: auto;
}

/* Empêche les longs labels Hash SHA-256 de casser le layout PDF preview */
.card .muted code, .card .muted .courier {
  word-break: break-all;
  font-family: monospace;
  font-size: 11px;
}

/* ===== MODE KIOSQUE (présentation tablette pour signature en présentiel) ===== */
body.is-kiosque .app-nav,
body.is-kiosque .compact-nav,
body.is-kiosque .bottom-tabs,
body.is-kiosque .tabs,
body.is-kiosque .app-nav__links,
body.is-kiosque [class*="nav__"],
body.is-kiosque .footer { display: none !important; }
body.is-kiosque .shell { padding-top: 24px !important; padding-bottom: 24px !important; }
body.is-kiosque .sig-card { max-width: 90vw !important; }
body.is-kiosque .sig-canvas { height: 280px !important; }
body.is-kiosque main, body.is-kiosque .shell { padding-top: 12px; }
.kiosque-banner {
  position: fixed; top: 8px; right: 8px;
  background: var(--cognac, #a16f3a); color: #fff;
  padding: 6px 12px; border-radius: 6px; font-size: 11px;
  letter-spacing: 0.18em; text-transform: uppercase; z-index: 200;
  font-weight: 600;
  box-shadow: 0 2px 12px rgba(0,0,0,0.2);
}
.kiosque-banner button {
  background: rgba(255,255,255,0.18); border: 0; color: #fff;
  margin-left: 8px; padding: 2px 8px; border-radius: 3px; cursor: pointer;
  font-size: 10px; letter-spacing: 0.1em;
}

/* ===== ONGLET DEVIS UNIFIÉ — LAYOUT 3 COLONNES + APPLE-STYLE ===== */
.devis-kpis {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin-bottom: 20px;
  padding: 16px;
  background: var(--paper, #faf6f0);
  border-radius: 12px;
  position: sticky;
  top: 0;
  z-index: 10;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  background: rgba(250, 246, 240, 0.85);
  border: 1px solid var(--bone, #e8dfd1);
}
.devis-kpi { display: flex; flex-direction: column; align-items: center; text-align: center; }
.devis-kpi__label { font-size: 10px; letter-spacing: 0.18em; text-transform: uppercase; color: var(--ink-muted, #7a7066); margin-bottom: 4px; font-weight: 500; }
.devis-kpi__value { font-family: 'Fraunces', serif; font-size: 22px; font-weight: 400; color: var(--ink, #1a1814); }
.devis-kpi__value--paid { color: #406b35; }
@media (max-width: 720px) {
  .devis-kpis { grid-template-columns: repeat(2, 1fr); position: relative; }
  .devis-kpi__value { font-size: 18px; }
}

.devis-grid {
  display: grid;
  grid-template-columns: 280px 1fr 320px;
  gap: 16px;
  align-items: start;
}
@media (max-width: 1100px) { .devis-grid { grid-template-columns: 1fr; } }

.devis-pane {
  background: #fff;
  border: 1px solid var(--bone, #e8dfd1);
  border-radius: 12px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  max-height: 80vh;
}
.devis-pane__head {
  padding: 14px 16px;
  border-bottom: 1px solid var(--bone, #e8dfd1);
  background: var(--paper, #faf6f0);
}
.devis-pane__title {
  font-family: 'Fraunces', serif;
  font-size: 17px;
  font-weight: 400;
  color: var(--ink, #1a1814);
}
.devis-pane__sub {
  font-size: 11px;
  color: var(--ink-muted, #7a7066);
  margin-top: 2px;
  letter-spacing: 0.04em;
}
.devis-pane__foot {
  padding: 12px 16px;
  border-top: 1px solid var(--bone, #e8dfd1);
}

/* Catalog (gauche) */
.devis-catalog { padding: 8px; overflow-y: auto; flex: 1; max-height: 60vh; }
.devis-cat-item {
  display: flex; flex-direction: column;
  width: 100%; padding: 10px 12px;
  margin-bottom: 6px;
  background: #fff;
  border: 1px solid var(--bone, #e8dfd1);
  border-radius: 8px;
  cursor: pointer;
  text-align: left;
  font-family: inherit;
  position: relative;
  transition: all 0.18s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.devis-cat-item:hover {
  border-color: var(--cognac, #a16f3a);
  background: rgba(161, 111, 58, 0.04);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(161, 111, 58, 0.08);
}
.devis-cat-item:active { transform: scale(0.97); }
.devis-cat-item__top { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.devis-cat-item__name { font-weight: 500; font-size: 13px; color: var(--ink, #1a1814); flex: 1; }
.devis-cat-item__price { font-family: 'Fraunces', serif; font-size: 14px; color: var(--cognac, #a16f3a); white-space: nowrap; font-weight: 500; }
.devis-cat-item__desc { font-size: 11px; color: var(--ink-muted, #7a7066); margin-top: 4px; line-height: 1.4; }
.devis-cat-item__cat { font-size: 9px; letter-spacing: 0.2em; text-transform: uppercase; color: var(--cognac, #a16f3a); margin-top: 6px; opacity: 0.7; }
.devis-cat-item__add {
  position: absolute; top: 8px; right: 8px;
  width: 22px; height: 22px;
  border-radius: 50%;
  background: var(--cognac, #a16f3a);
  color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-size: 16px; font-weight: 300;
  opacity: 0; transition: opacity 0.18s;
  pointer-events: none;
}
.devis-cat-item:hover .devis-cat-item__add { opacity: 1; }

.devis-empty { padding: 24px 16px; text-align: center; color: var(--ink-muted, #7a7066); font-size: 13px; }

/* Builder (milieu) */
.devis-pane--builder { max-height: none; }
.devis-services { padding: 12px 16px; }
.devis-line {
  display: grid;
  grid-template-columns: 1fr auto auto;
  gap: 12px;
  align-items: center;
  padding: 10px 0;
  border-bottom: 1px solid rgba(232, 223, 209, 0.5);
  animation: devis-line-in 0.3s ease;
}
@keyframes devis-line-in { from { opacity: 0; transform: translateX(-8px); } to { opacity: 1; transform: translateX(0); } }
.devis-line.is-included { background: rgba(64, 107, 53, 0.04); padding-left: 8px; padding-right: 8px; border-radius: 6px; }
.devis-line__main { display: flex; flex-direction: column; }
.devis-line__name { font-weight: 500; font-size: 14px; color: var(--ink, #1a1814); }
.devis-line__cat { font-size: 10px; letter-spacing: 0.18em; text-transform: uppercase; color: var(--ink-muted, #7a7066); margin-top: 2px; }
.devis-line__price { font-family: 'Fraunces', serif; font-size: 16px; color: var(--cognac, #a16f3a); }
.devis-line__status { display: flex; gap: 6px; align-items: center; }

.devis-doc {
  display: flex; justify-content: space-between; align-items: center; gap: 12px;
  padding: 10px; background: rgba(232, 223, 209, 0.3); border-radius: 8px;
  margin-bottom: 6px; flex-wrap: wrap;
}
.devis-doc__main { display: flex; flex-direction: column; flex: 1; min-width: 180px; }
.devis-doc__actions { display: flex; gap: 4px; align-items: center; flex-wrap: wrap; }

.devis-quick-create {
  padding: 16px;
  border-top: 1px dashed var(--bone, #e8dfd1);
  margin-top: 12px;
}
.devis-quick-create .btn { width: 100%; }

/* Schedule (droite) */
.devis-quick-schedule { padding: 12px 16px; border-bottom: 1px solid var(--bone, #e8dfd1); }
.devis-chips { display: flex; gap: 6px; flex-wrap: wrap; }
.devis-chip {
  padding: 8px 12px;
  background: #fff;
  border: 1px solid var(--bone, #e8dfd1);
  border-radius: 18px;
  font-size: 12px;
  cursor: pointer;
  font-family: inherit;
  color: var(--ink, #1a1814);
  transition: all 0.15s;
}
.devis-chip:hover {
  background: var(--cognac, #a16f3a);
  color: #fff;
  border-color: var(--cognac, #a16f3a);
  transform: translateY(-1px);
}
.devis-payments { padding: 8px 12px; flex: 1; overflow-y: auto; }
.devis-pay {
  padding: 10px;
  background: rgba(232, 223, 209, 0.3);
  border-radius: 8px;
  margin-bottom: 6px;
  border-left: 3px solid var(--ink-muted, #7a7066);
}
.devis-pay.is-paid { border-left-color: #406b35; background: rgba(64, 107, 53, 0.06); }
.devis-pay__main { display: flex; justify-content: space-between; align-items: baseline; }
.devis-pay__label { font-size: 13px; font-weight: 500; }
.devis-pay__amount { font-family: 'Fraunces', serif; font-size: 15px; color: var(--cognac, #a16f3a); }
.devis-pay__meta { display: flex; justify-content: space-between; align-items: center; margin-top: 4px; gap: 6px; flex-wrap: wrap; }

/* Sticky bottom action bar (mobile) */
.devis-stickybar {
  display: none;
}
@media (max-width: 720px) {
  .devis-stickybar {
    display: flex;
    position: fixed;
    bottom: 0; left: 0; right: 0;
    padding: 10px 12px calc(10px + env(safe-area-inset-bottom));
    background: rgba(255,255,255,0.95);
    backdrop-filter: blur(20px);
    border-top: 1px solid var(--bone, #e8dfd1);
    gap: 8px;
    z-index: 50;
    box-shadow: 0 -4px 12px rgba(0,0,0,0.05);
  }
  .devis-stickybar .btn { flex: 1; min-height: 44px; }
}

.icon-btn {
  display: inline-flex; align-items: center; justify-content: center;
  width: 32px; height: 32px;
  border: 0; background: transparent;
  border-radius: 6px;
  cursor: pointer;
  font-size: 14px;
  text-decoration: none;
  color: var(--ink, #1a1814);
  transition: background 0.15s;
}
.icon-btn:hover { background: rgba(161, 111, 58, 0.08); }

/* ===== ONGLETS UNIFIÉS — SECTIONS DÉPLIABLES (Mariage, Photos) ===== */
.mariage-section {
  background: #fff;
  border: 1px solid var(--bone, #e8dfd1);
  border-radius: 12px;
  margin-bottom: 12px;
  overflow: hidden;
}
.mariage-section[open] { border-color: var(--cognac, #a16f3a); }
.mariage-section > summary {
  padding: 14px 18px;
  cursor: pointer;
  font-family: 'Fraunces', serif;
  font-size: 16px;
  color: var(--ink, #1a1814);
  display: flex;
  align-items: center;
  gap: 10px;
  list-style: none;
  user-select: none;
  transition: background 0.15s;
}
.mariage-section > summary::-webkit-details-marker { display: none; }
.mariage-section > summary:hover { background: rgba(161, 111, 58, 0.04); }
.mariage-section > summary::after {
  content: "▾";
  margin-left: auto;
  font-size: 14px;
  color: var(--cognac, #a16f3a);
  transition: transform 0.2s;
}
.mariage-section[open] > summary::after { transform: rotate(180deg); }
.mariage-section__icon {
  display: inline-flex;
  align-items: center; justify-content: center;
  width: 28px; height: 28px;
  background: rgba(161, 111, 58, 0.1);
  border-radius: 8px;
  font-size: 14px;
}
.mariage-section > div { padding: 16px; border-top: 1px solid var(--bone, #e8dfd1); }

/* ===== ONGLET MARIAGE — TIMELINE TEMPORELLE APPLE-STYLE ===== */
.mariage-hero {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 24px;
  padding: 24px;
  background: linear-gradient(135deg, var(--paper, #faf6f0) 0%, rgba(161, 111, 58, 0.08) 100%);
  border: 1px solid var(--bone, #e8dfd1);
  border-radius: 16px;
  margin-bottom: 20px;
}
.mariage-hero__date {
  text-align: center;
  padding: 14px 20px;
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 2px 12px rgba(161, 111, 58, 0.08);
}
.mariage-hero__day {
  font-family: 'Fraunces', serif;
  font-size: 48px;
  font-weight: 400;
  color: var(--cognac, #a16f3a);
  line-height: 1;
}
.mariage-hero__month {
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-muted, #7a7066);
  margin-top: 4px;
}
.mariage-hero__main { flex: 1; }
.mariage-hero__couple {
  font-family: 'Fraunces', serif;
  font-size: 26px;
  font-weight: 400;
  color: var(--ink, #1a1814);
}
.mariage-hero__venue {
  font-size: 14px;
  color: var(--ink-soft, #3a342c);
  margin-top: 4px;
}
.mariage-hero__countdown {
  display: inline-block;
  margin-top: 8px;
  padding: 6px 12px;
  background: var(--cognac, #a16f3a);
  color: #fff;
  border-radius: 20px;
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.04em;
}
.mariage-hero__stats {
  display: flex;
  gap: 18px;
}
.mariage-stat { text-align: center; }
.mariage-stat__num {
  display: block;
  font-family: 'Fraunces', serif;
  font-size: 22px;
  color: var(--cognac, #a16f3a);
}
.mariage-stat__lbl {
  font-size: 10px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-muted, #7a7066);
}
@media (max-width: 720px) {
  .mariage-hero { grid-template-columns: 1fr; padding: 16px; gap: 12px; text-align: center; }
  .mariage-hero__stats { justify-content: center; }
  .mariage-hero__couple { font-size: 22px; }
}

.mariage-grid {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 20px;
  align-items: start;
}
@media (max-width: 1100px) { .mariage-grid { grid-template-columns: 1fr; } }

/* Timeline pane */
.mariage-timeline-pane {
  background: #fff;
  border: 1px solid var(--bone, #e8dfd1);
  border-radius: 12px;
  overflow: hidden;
}
.mariage-actions {
  display: flex;
  gap: 8px;
  padding: 12px;
  border-bottom: 1px solid var(--bone, #e8dfd1);
  flex-wrap: wrap;
  background: var(--paper, #faf6f0);
}

.mariage-timeline { padding: 12px 0; }

.mariage-phase { padding: 12px 20px; border-bottom: 1px dashed rgba(232, 223, 209, 0.6); }
.mariage-phase:last-child { border-bottom: 0; }
.mariage-phase__head {
  display: flex; justify-content: space-between; align-items: baseline;
  margin-bottom: 12px;
}
.mariage-phase__title {
  font-size: 11px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--cognac, #a16f3a);
  font-weight: 500;
}
.mariage-phase__count {
  font-size: 10px;
  color: var(--ink-muted, #7a7066);
  letter-spacing: 0.1em;
}
.mariage-phase--jour-j .mariage-phase__title { color: #b23838; }
.mariage-phase--jour-j { background: linear-gradient(180deg, rgba(178,56,56,0.04) 0%, transparent 100%); }
.mariage-phase--apres .mariage-phase__title { color: #406b35; }

.mariage-events {
  list-style: none; padding: 0; margin: 0;
  position: relative;
}
.mariage-events::before {
  content: ""; position: absolute;
  left: 16px; top: 12px; bottom: 12px;
  width: 2px; background: rgba(232, 223, 209, 0.7);
  z-index: 0;
}

.mariage-event {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 10px 0;
  position: relative;
  z-index: 1;
  animation: mariage-event-in 0.35s ease;
}
@keyframes mariage-event-in {
  from { opacity: 0; transform: translateX(-6px); }
  to { opacity: 1; transform: translateX(0); }
}
.mariage-event--empty { opacity: 0.5; }
.mariage-event.is-done { opacity: 0.55; }
.mariage-event.is-done .mariage-event__body strong { text-decoration: line-through; }

.mariage-event__dot {
  flex-shrink: 0;
  width: 34px; height: 34px;
  border-radius: 50%;
  background: #fff;
  border: 2px solid var(--bone, #e8dfd1);
  display: flex; align-items: center; justify-content: center;
  font-size: 14px;
  z-index: 1;
  transition: all 0.2s;
}
.mariage-event:hover .mariage-event__dot {
  transform: scale(1.08);
  box-shadow: 0 2px 8px rgba(161, 111, 58, 0.2);
}
.mariage-event--cognac .mariage-event__dot { border-color: var(--cognac, #a16f3a); }
.mariage-event--green .mariage-event__dot { border-color: #406b35; background: rgba(64, 107, 53, 0.06); }
.mariage-event--wedding .mariage-event__dot {
  border-color: var(--cognac, #a16f3a);
  background: var(--cognac, #a16f3a);
  color: #fff;
  width: 38px; height: 38px;
  font-size: 16px;
  box-shadow: 0 0 0 4px rgba(161, 111, 58, 0.15);
}

.mariage-event__dot--today {
  border: 0;
  background: linear-gradient(135deg, #b23838, #d04545);
  width: 12px; height: 12px;
  margin: 11px;
  box-shadow: 0 0 0 4px rgba(178, 56, 56, 0.2), 0 0 0 8px rgba(178, 56, 56, 0.08);
  animation: today-pulse 2s ease-in-out infinite;
}
@keyframes today-pulse {
  0%, 100% { box-shadow: 0 0 0 4px rgba(178, 56, 56, 0.2), 0 0 0 8px rgba(178, 56, 56, 0.08); }
  50% { box-shadow: 0 0 0 6px rgba(178, 56, 56, 0.3), 0 0 0 12px rgba(178, 56, 56, 0.12); }
}
.mariage-event--today { padding: 12px 0; }
.mariage-event--today .mariage-event__body strong { color: #b23838; letter-spacing: 0.16em; font-size: 11px; text-transform: uppercase; }

.mariage-event__body {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}
.mariage-event__body strong {
  font-size: 14px; font-weight: 500;
  color: var(--ink, #1a1814);
}
.mariage-event__sub {
  font-size: 12px; color: var(--ink-muted, #7a7066);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.mariage-event__time {
  font-size: 11px; color: var(--ink-muted, #7a7066);
  margin-top: 2px;
  font-family: 'Inter', monospace;
}
.mariage-event__date {
  flex-shrink: 0;
  font-family: 'Fraunces', serif;
  font-size: 13px;
  color: var(--cognac, #a16f3a);
  align-self: center;
  font-weight: 500;
  white-space: nowrap;
}

/* Sidebar */
.mariage-side {
  display: flex;
  flex-direction: column;
  gap: 14px;
  position: sticky;
  top: 20px;
}
@media (max-width: 1100px) { .mariage-side { position: static; } }

.mariage-card {
  background: #fff;
  border: 1px solid var(--bone, #e8dfd1);
  border-radius: 12px;
  padding: 14px 16px;
}
.mariage-card__head {
  display: flex; justify-content: space-between; align-items: baseline;
  margin-bottom: 10px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--bone, #e8dfd1);
}
.mariage-card__title {
  font-family: 'Fraunces', serif;
  font-size: 14px;
  color: var(--ink, #1a1814);
  font-weight: 400;
}

.mariage-witness {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 0;
  font-size: 13px;
}
.mariage-witness__name { font-weight: 500; flex: 1; }
.mariage-witness__role {
  font-size: 10px; letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--ink-muted, #7a7066);
  background: rgba(161, 111, 58, 0.08);
  padding: 2px 6px; border-radius: 10px;
}

.mariage-rsvp { display: flex; flex-direction: column; gap: 4px; }
.mariage-rsvp__row {
  display: flex; justify-content: space-between;
  font-size: 13px; padding: 4px 0;
}
.mariage-rsvp__row--total {
  border-top: 1px solid var(--bone, #e8dfd1);
  padding-top: 8px;
  margin-top: 4px;
  color: var(--cognac, #a16f3a);
  font-family: 'Fraunces', serif;
}

/* ===== NEXT ACTIONS — SMART "ET APRÈS ?" CARDS ===== */
.next-actions {
  margin-bottom: 28px;
  padding: 18px 20px;
  background: linear-gradient(135deg, #fff 0%, rgba(161, 111, 58, 0.04) 100%);
  border: 1px solid var(--bone, #e8dfd1);
  border-radius: 14px;
  position: relative;
  overflow: hidden;
}
.next-actions::before {
  content: "";
  position: absolute;
  top: -2px; right: -2px;
  width: 80px; height: 80px;
  background: radial-gradient(circle at top right, rgba(161, 111, 58, 0.18), transparent 70%);
  pointer-events: none;
}
.next-actions__head {
  display: flex; align-items: center; gap: 8px;
  margin-bottom: 14px;
  position: relative;
}
.next-actions__icon {
  font-size: 18px;
  animation: sparkle-pulse 2.5s ease-in-out infinite;
}
@keyframes sparkle-pulse {
  0%, 100% { transform: rotate(0) scale(1); opacity: 1; }
  50% { transform: rotate(15deg) scale(1.15); opacity: 0.7; }
}
.next-actions__title {
  font-family: 'Fraunces', serif;
  font-size: 18px;
  font-weight: 400;
  color: var(--ink, #1a1814);
}
.next-actions__sub {
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-muted, #7a7066);
  margin-left: auto;
}
.next-actions__list { display: flex; flex-direction: column; gap: 10px; }

.action-card {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 14px;
  padding: 14px 16px;
  background: #fff;
  border: 1px solid var(--bone, #e8dfd1);
  border-radius: 10px;
  opacity: 0;
  transform: translateY(8px);
  animation: action-card-in 0.4s ease forwards;
  transition: all 0.18s;
}
@keyframes action-card-in {
  to { opacity: 1; transform: translateY(0); }
}
.action-card:hover {
  border-color: var(--cognac, #a16f3a);
  box-shadow: 0 4px 16px rgba(161, 111, 58, 0.1);
  transform: translateY(-2px);
}
.action-card--p1 {
  border-left: 4px solid #b23838;
  background: linear-gradient(90deg, rgba(178, 56, 56, 0.04) 0%, #fff 100%);
}
.action-card--p2 {
  border-left: 4px solid var(--cognac, #a16f3a);
}
.action-card--p3 {
  border-left: 4px solid var(--ink-muted, #7a7066);
}

.action-card__icon {
  font-size: 22px;
  width: 44px; height: 44px;
  background: rgba(161, 111, 58, 0.08);
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.action-card--p1 .action-card__icon {
  background: rgba(178, 56, 56, 0.12);
}
.action-card__body { min-width: 0; }
.action-card__title {
  font-weight: 500;
  font-size: 14px;
  color: var(--ink, #1a1814);
  margin-bottom: 2px;
  line-height: 1.3;
}
.action-card__sub {
  font-size: 12px;
  color: var(--ink-muted, #7a7066);
  line-height: 1.45;
}
.action-card__cta {
  display: flex; align-items: center; gap: 6px;
  flex-shrink: 0;
}
.action-card__dismiss {
  width: 28px; height: 28px;
  border: 0; background: transparent;
  border-radius: 50%;
  cursor: pointer;
  font-size: 18px; line-height: 1;
  color: var(--ink-muted, #7a7066);
  transition: all 0.15s;
}
.action-card__dismiss:hover {
  background: rgba(178, 56, 56, 0.1);
  color: #b23838;
}

@media (max-width: 720px) {
  .action-card {
    grid-template-columns: auto 1fr;
    grid-template-rows: auto auto;
  }
  .action-card__cta {
    grid-column: 1 / -1;
    justify-content: flex-end;
    margin-top: 8px;
  }
  .action-card__cta .btn {
    flex: 1;
    min-height: 40px;
  }
  .next-actions__sub { display: none; }
}

/* ===== SPOTLIGHT — RECHERCHE GLOBALE Cmd+K ===== */
.spotlight-trigger {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 6px 10px;
  background: rgba(255, 255, 255, 0.5);
  border: 1px solid var(--bone, #e8dfd1);
  border-radius: 8px;
  cursor: pointer;
  font-size: 13px;
  color: var(--ink-muted, #7a7066);
  font-family: inherit;
  transition: all 0.15s;
}
.spotlight-trigger:hover {
  background: #fff;
  border-color: var(--cognac, #a16f3a);
  color: var(--ink, #1a1814);
}
.spotlight-trigger kbd {
  padding: 2px 6px;
  background: var(--bone, #e8dfd1);
  border-radius: 4px;
  font-size: 10px;
  font-family: 'SF Mono', monospace;
  color: var(--ink-muted, #7a7066);
}
.spotlight-trigger__label { font-size: 12px; }
@media (max-width: 720px) { .spotlight-trigger__label, .spotlight-trigger kbd { display: none; } }

.spotlight-overlay {
  position: fixed; inset: 0;
  background: rgba(26, 24, 20, 0.55);
  backdrop-filter: blur(8px) saturate(1.2);
  -webkit-backdrop-filter: blur(8px) saturate(1.2);
  z-index: 200;
  display: flex; align-items: flex-start; justify-content: center;
  padding-top: 12vh;
  animation: spotlight-fade 0.18s ease;
  transition: opacity 0.15s;
}
@keyframes spotlight-fade { from { opacity: 0; } to { opacity: 1; } }

.spotlight {
  width: 100%;
  max-width: 640px;
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(20px) saturate(1.5);
  -webkit-backdrop-filter: blur(20px) saturate(1.5);
  border-radius: 16px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.32);
  overflow: hidden;
  animation: spotlight-slide 0.22s cubic-bezier(0.16, 1, 0.3, 1);
  margin: 0 16px;
  border: 1px solid rgba(255, 255, 255, 0.4);
}
@keyframes spotlight-slide {
  from { transform: translateY(-12px) scale(0.98); opacity: 0; }
  to { transform: translateY(0) scale(1); opacity: 1; }
}

.spotlight__head {
  display: flex; align-items: center;
  padding: 14px 18px;
  border-bottom: 1px solid var(--bone, #e8dfd1);
  gap: 12px;
}
.spotlight__icon { font-size: 18px; opacity: 0.6; }
.spotlight__input {
  flex: 1;
  border: 0; outline: 0;
  background: transparent;
  font-size: 18px;
  font-family: 'Fraunces', Georgia, serif;
  font-weight: 400;
  color: var(--ink, #1a1814);
}
.spotlight__input::placeholder { color: var(--ink-muted, #7a7066); font-weight: 300; }
.spotlight__hint {
  padding: 3px 8px;
  background: var(--bone, #e8dfd1);
  color: var(--ink-muted, #7a7066);
  border-radius: 4px;
  font-size: 11px;
  font-family: 'SF Mono', monospace;
}

.spotlight__results {
  max-height: 60vh;
  overflow-y: auto;
  padding: 8px;
}
.spotlight__empty {
  padding: 40px 24px;
  text-align: center;
  color: var(--ink-muted, #7a7066);
}
.spotlight__empty p { margin: 0 0 16px; font-size: 14px; }
.spotlight__examples {
  display: flex; gap: 6px; justify-content: center; flex-wrap: wrap;
}
.spotlight__examples kbd {
  padding: 4px 10px;
  background: rgba(161, 111, 58, 0.08);
  color: var(--cognac, #a16f3a);
  border-radius: 12px;
  font-size: 12px;
  font-family: inherit;
}

.spotlight__group-label {
  padding: 8px 12px 4px;
  font-size: 10px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--ink-muted, #7a7066);
  font-weight: 500;
}
.spotlight__result {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border-radius: 8px;
  cursor: pointer;
  text-decoration: none;
  color: var(--ink, #1a1814);
  transition: background 0.1s;
}
.spotlight__result:hover, .spotlight__result.is-selected {
  background: rgba(161, 111, 58, 0.1);
}
.spotlight__result.is-selected {
  background: var(--cognac, #a16f3a);
  color: #fff;
}
.spotlight__result-icon {
  font-size: 20px;
  width: 32px; height: 32px;
  display: flex; align-items: center; justify-content: center;
  background: rgba(161, 111, 58, 0.1);
  border-radius: 8px;
  flex-shrink: 0;
}
.spotlight__result.is-selected .spotlight__result-icon {
  background: rgba(255, 255, 255, 0.18);
}
.spotlight__result-body { min-width: 0; }
.spotlight__result-title {
  font-weight: 500;
  font-size: 14px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.spotlight__result-title mark {
  background: rgba(161, 111, 58, 0.25);
  color: inherit;
  padding: 0 2px;
  border-radius: 3px;
}
.spotlight__result.is-selected .spotlight__result-title mark {
  background: rgba(255, 255, 255, 0.3);
}
.spotlight__result-sub {
  font-size: 12px;
  color: var(--ink-muted, #7a7066);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.spotlight__result.is-selected .spotlight__result-sub { color: rgba(255, 255, 255, 0.85); }
.spotlight__result-action {
  font-size: 14px;
  opacity: 0;
  transition: opacity 0.15s;
}
.spotlight__result.is-selected .spotlight__result-action { opacity: 0.7; }

.spotlight__foot {
  display: flex;
  gap: 16px;
  padding: 10px 18px;
  border-top: 1px solid var(--bone, #e8dfd1);
  background: rgba(250, 246, 240, 0.5);
  font-size: 11px;
  color: var(--ink-muted, #7a7066);
}
.spotlight__foot kbd {
  display: inline-block;
  padding: 1px 5px;
  background: #fff;
  border: 1px solid var(--bone, #e8dfd1);
  border-radius: 3px;
  font-size: 10px;
  font-family: 'SF Mono', monospace;
  margin-right: 3px;
}

@media (max-width: 600px) {
  .spotlight-overlay { padding-top: 4vh; padding-left: 8px; padding-right: 8px; }
  .spotlight__input { font-size: 16px; }
  .spotlight__foot { display: none; }
}

/* ===== TAB TRANSITIONS — APPLE SLIDE ===== */
/* View Transitions API : Chrome/Safari récents */
@supports (view-transition-name: tab) {
  ::view-transition-old(root),
  ::view-transition-new(root) {
    animation-duration: 0.32s;
    animation-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
  }
  /* Direction droite (ex: Aperçu → Devis → Mariage) */
  html[data-tab-dir="right"]::view-transition-old(root) {
    animation-name: slide-out-left;
  }
  html[data-tab-dir="right"]::view-transition-new(root) {
    animation-name: slide-in-right;
  }
  /* Direction gauche (ex: Mariage → Aperçu) */
  html[data-tab-dir="left"]::view-transition-old(root) {
    animation-name: slide-out-right;
  }
  html[data-tab-dir="left"]::view-transition-new(root) {
    animation-name: slide-in-left;
  }
  @keyframes slide-out-left {
    from { transform: translateX(0); opacity: 1; }
    to { transform: translateX(-3%); opacity: 0; }
  }
  @keyframes slide-in-right {
    from { transform: translateX(3%); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
  }
  @keyframes slide-out-right {
    from { transform: translateX(0); opacity: 1; }
    to { transform: translateX(3%); opacity: 0; }
  }
  @keyframes slide-in-left {
    from { transform: translateX(-3%); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
  }
}

/* Fallback CSS pour les browsers sans View Transitions API */
.tab-anim-out-left {
  animation: tab-fb-out-left 0.14s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}
.tab-anim-out-right {
  animation: tab-fb-out-right 0.14s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}
.tab-anim-in-left {
  animation: tab-fb-in-left 0.18s cubic-bezier(0, 0, 0.2, 1) forwards;
}
.tab-anim-in-right {
  animation: tab-fb-in-right 0.18s cubic-bezier(0, 0, 0.2, 1) forwards;
}
@keyframes tab-fb-out-left {
  from { transform: translateX(0); opacity: 1; }
  to { transform: translateX(-12px); opacity: 0; }
}
@keyframes tab-fb-out-right {
  from { transform: translateX(0); opacity: 1; }
  to { transform: translateX(12px); opacity: 0; }
}
@keyframes tab-fb-in-left {
  from { transform: translateX(-12px); opacity: 0; }
  to { transform: translateX(0); opacity: 1; }
}
@keyframes tab-fb-in-right {
  from { transform: translateX(12px); opacity: 0; }
  to { transform: translateX(0); opacity: 1; }
}

/* Désactive les animations si l'utilisateur préfère reduced motion */
@media (prefers-reduced-motion: reduce) {
  .tab-anim-out-left, .tab-anim-out-right, .tab-anim-in-left, .tab-anim-in-right {
    animation: none !important;
  }
}

/* ===== MONTAGE PHOTOS BUILDER ===== */
.montage-overlay {
  position: fixed; inset: 0;
  background: rgba(26, 24, 20, 0.7);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  z-index: 200;
  display: flex; align-items: center; justify-content: center;
  padding: 16px;
  animation: m-fade 0.2s ease;
}
@keyframes m-fade { from { opacity: 0; } to { opacity: 1; } }
.montage-modal {
  background: #fff;
  border-radius: 16px;
  width: 100%;
  max-width: 1100px;
  max-height: 94vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.4);
}
.montage-head {
  display: flex; justify-content: space-between; align-items: center;
  padding: 18px 24px;
  border-bottom: 1px solid var(--bone, #e8dfd1);
}
.montage-title { font-family: 'Fraunces', serif; font-size: 22px; font-weight: 400; margin: 0 0 2px; }
.montage-sub { font-size: 12px; color: var(--ink-muted, #7a7066); margin: 0; }
.montage-close {
  background: transparent; border: 0; font-size: 24px;
  width: 36px; height: 36px; cursor: pointer;
  border-radius: 50%; color: var(--ink-muted, #7a7066);
}
.montage-close:hover { background: rgba(0,0,0,0.05); }

.montage-toolbar {
  display: flex; align-items: center; gap: 24px; flex-wrap: wrap;
  padding: 14px 24px;
  background: var(--paper, #faf6f0);
  border-bottom: 1px solid var(--bone, #e8dfd1);
}
.montage-group { display: flex; align-items: center; gap: 12px; }
.montage-group-label {
  font-size: 10px; letter-spacing: 0.18em; text-transform: uppercase;
  color: var(--ink-muted, #7a7066); font-weight: 500;
}
.montage-tpls { display: flex; gap: 8px; flex-wrap: wrap; }
.montage-tpl {
  background: #fff; border: 1px solid var(--bone, #e8dfd1);
  border-radius: 10px; padding: 8px 12px; cursor: pointer;
  font-family: inherit; display: flex; align-items: center; gap: 8px;
  transition: all 0.15s; font-size: 13px;
}
.montage-tpl:hover { border-color: var(--cognac, #a16f3a); }
.montage-tpl.is-active { background: var(--cognac, #a16f3a); color: #fff; border-color: var(--cognac, #a16f3a); }
.montage-tpl__icon { font-size: 16px; }
.montage-tpl__name { font-weight: 500; }
.montage-tpl__count {
  font-size: 10px; opacity: 0.6;
  background: rgba(255,255,255,0.2);
  padding: 1px 6px; border-radius: 10px;
}
.montage-tpl.is-active .montage-tpl__count { background: rgba(255,255,255,0.25); }

.montage-select {
  padding: 8px 12px;
  border: 1px solid var(--bone, #e8dfd1);
  border-radius: 8px;
  font-family: inherit;
  background: #fff;
  font-size: 13px;
}

.montage-workarea {
  flex: 1; display: grid; grid-template-columns: 240px 1fr;
  overflow: hidden;
}
@media (max-width: 800px) { .montage-workarea { grid-template-columns: 1fr; grid-template-rows: 160px 1fr; } }

.montage-sidebar {
  border-right: 1px solid var(--bone, #e8dfd1);
  background: var(--paper, #faf6f0);
  display: flex; flex-direction: column;
  overflow: hidden;
}
@media (max-width: 800px) { .montage-sidebar { border-right: 0; border-bottom: 1px solid var(--bone, #e8dfd1); } }
.montage-sb-head {
  display: flex; justify-content: space-between; align-items: center;
  padding: 12px 14px; font-size: 12px; font-weight: 500;
  border-bottom: 1px solid var(--bone, #e8dfd1);
}
.montage-upload {
  background: var(--cognac, #a16f3a); color: #fff;
  padding: 4px 10px; border-radius: 14px; cursor: pointer;
  font-size: 12px; font-weight: 500;
}
.montage-photos {
  flex: 1; overflow-y: auto; padding: 8px;
  display: grid; grid-template-columns: repeat(auto-fill, minmax(85px, 1fr));
  gap: 6px;
  align-content: start;
}
.montage-empty {
  grid-column: 1 / -1;
  text-align: center; padding: 24px 12px;
  font-size: 12px; color: var(--ink-muted, #7a7066);
}
.montage-photo {
  aspect-ratio: 1;
  border-radius: 6px; overflow: hidden;
  cursor: grab;
  border: 2px solid transparent;
  transition: all 0.15s;
}
.montage-photo:hover { border-color: var(--cognac, #a16f3a); transform: scale(1.04); }
.montage-photo:active { cursor: grabbing; }
.montage-photo img { width: 100%; height: 100%; object-fit: cover; display: block; }

.montage-canvas-wrap {
  display: flex; align-items: center; justify-content: center;
  padding: 20px;
  background: linear-gradient(135deg, #f5f1e8 0%, #ede5d3 100%);
  position: relative;
  overflow: auto;
}
#montage-canvas {
  max-width: 100%; max-height: 100%;
  background: #fff;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
  cursor: pointer;
  border-radius: 4px;
}
.montage-canvas-hint {
  position: absolute; bottom: 8px; right: 12px;
  font-size: 11px; color: var(--ink-muted, #7a7066);
  background: rgba(255, 255, 255, 0.85); padding: 4px 10px;
  border-radius: 12px;
  pointer-events: none;
  letter-spacing: 0.05em;
}

.montage-foot {
  display: grid;
  grid-template-columns: 1fr 1fr auto;
  gap: 8px;
  padding: 14px 24px;
  border-top: 1px solid var(--bone, #e8dfd1);
  background: var(--paper, #faf6f0);
  align-items: center;
}
@media (max-width: 800px) {
  .montage-foot { grid-template-columns: 1fr; }
  .montage-actions { flex-direction: column; gap: 6px; }
}
.montage-input {
  padding: 10px 12px;
  border: 1px solid var(--bone, #e8dfd1);
  border-radius: 8px;
  font-size: 13px;
  font-family: inherit;
  background: #fff;
  width: 100%;
}
.montage-actions { display: flex; gap: 8px; }
.action-tile--cognac {
  background: linear-gradient(135deg, #fff 0%, rgba(161, 111, 58, 0.08) 100%);
  border-color: var(--cognac, #a16f3a) !important;
}

/* ============================================================
   POLISH UX — V2 (sprint stabilisation 70 mariages)
   ============================================================ */

/* ===== BANDEAU DORMANT (sticky, en haut de toutes les pages admin) ===== */
.dormant-banner {
  position: sticky;
  top: 0;
  z-index: 90;
  background: linear-gradient(90deg, var(--cognac, #a16f3a) 0%, #b88454 100%);
  color: #fff;
  padding: 10px 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  font-size: 13px;
  letter-spacing: 0.02em;
  text-align: center;
  box-shadow: 0 1px 0 rgba(0, 0, 0, 0.05);
}
.dormant-banner__icon { font-size: 16px; }
.dormant-banner a {
  color: #fff;
  text-decoration: underline;
  font-weight: 600;
  margin-left: 4px;
  white-space: nowrap;
}
@media (max-width: 600px) {
  .dormant-banner { font-size: 12px; padding: 8px 14px; line-height: 1.3; flex-wrap: wrap; gap: 6px; }
}

/* ===== JOUR-J BANNER (mode jour J actif chez le témoin) ===== */
.jour-j-banner {
  background: linear-gradient(135deg, var(--cognac, #a16f3a) 0%, #c79560 100%);
  color: #fff;
  padding: 16px 20px;
  border-radius: 12px;
  margin-bottom: 16px;
  text-align: center;
  box-shadow: 0 4px 12px rgba(161, 111, 58, 0.25);
  animation: jour-j-pulse 2.4s ease-in-out infinite;
}
.jour-j-banner__title {
  font-family: var(--serif);
  font-size: 22px;
  font-style: italic;
  margin: 0;
  font-weight: 400;
}
.jour-j-banner__sub {
  font-size: 12px;
  opacity: 0.9;
  margin-top: 4px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
@keyframes jour-j-pulse {
  0%, 100% { box-shadow: 0 4px 12px rgba(161, 111, 58, 0.25); }
  50% { box-shadow: 0 6px 20px rgba(161, 111, 58, 0.4); }
}

/* Bouton de check group-shot côté témoin */
.gs-check-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  font-size: 13px;
  font-weight: 600;
  border-radius: 999px;
  border: 1.5px solid var(--cognac, #a16f3a);
  background: #fff;
  color: var(--cognac, #a16f3a);
  cursor: pointer;
  transition: all 0.18s ease;
  white-space: nowrap;
}
.gs-check-btn:hover { background: var(--cognac, #a16f3a); color: #fff; }
.gs-check-btn.is-done {
  background: #2f7d4f;
  border-color: #2f7d4f;
  color: #fff;
}
.gs-check-btn.is-done:hover { background: #246339; }

/* Statut group-shot côté admin (jour-J en temps réel) */
.gs-status-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.04em;
}
.gs-status-pill--done { background: #d9efe1; color: #1f6b3a; }
.gs-status-pill--pending { background: #fff4e2; color: #8a5a18; }

/* ===== SKELETON LOADERS ===== */
.skeleton-wrap { padding: 24px 0; }
.skeleton {
  display: block;
  background: linear-gradient(90deg,
    rgba(161, 111, 58, 0.06) 0%,
    rgba(161, 111, 58, 0.14) 50%,
    rgba(161, 111, 58, 0.06) 100%);
  background-size: 200% 100%;
  border-radius: 8px;
  animation: skeleton-pulse 1.4s ease-in-out infinite;
}
.skeleton--text { height: 14px; margin: 8px 0; }
.skeleton--title { height: 28px; width: 60%; margin: 8px 0 16px; }
.skeleton--card {
  height: 120px;
  margin-bottom: 14px;
  border-radius: var(--radius-lg, 12px);
}
.skeleton--avatar { height: 48px; width: 48px; border-radius: 50%; }
@keyframes skeleton-pulse {
  0% { background-position: 200% 0; opacity: 0.7; }
  50% { opacity: 1; }
  100% { background-position: -200% 0; opacity: 0.7; }
}

/* ===== EMPTY STATES ===== */
.empty-state {
  text-align: center;
  padding: 56px 24px;
  border-radius: var(--radius-lg, 12px);
  background: linear-gradient(180deg, var(--ivory-warm, #f5efe2) 0%, var(--paper, #faf6f0) 100%);
  border: 1px dashed var(--bone, #e8dfd1);
}
.empty-state__icon {
  width: 56px;
  height: 56px;
  margin: 0 auto 16px;
  border-radius: 50%;
  background: rgba(161, 111, 58, 0.1);
  color: var(--cognac, #a16f3a);
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.empty-state__icon svg { width: 28px; height: 28px; }
.empty-state__title {
  font-family: var(--serif);
  font-size: 22px;
  font-weight: 400;
  margin: 0 0 8px;
  color: var(--ink, #2d241c);
}
.empty-state__msg {
  font-size: 14px;
  color: var(--ink-muted, #7a7066);
  max-width: 360px;
  margin: 0 auto 20px;
  line-height: 1.55;
}
.empty-state .btn { margin-top: 4px; }

/* ===== HERO COUNTDOWN (couple) ===== */
.hero-countdown-block {
  display: flex;
  justify-content: center;
  gap: 14px;
  margin-top: 18px;
  flex-wrap: wrap;
}
.hero-countdown-cell {
  background: rgba(161, 111, 58, 0.08);
  border: 1px solid rgba(161, 111, 58, 0.18);
  border-radius: 10px;
  padding: 10px 14px;
  min-width: 64px;
  text-align: center;
}
.hero-countdown-cell__num {
  font-family: var(--serif);
  font-size: 28px;
  font-weight: 400;
  color: var(--cognac, #a16f3a);
  line-height: 1;
  font-variant-numeric: tabular-nums;
}
.hero-countdown-cell__label {
  font-size: 10px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-muted, #7a7066);
  margin-top: 6px;
}
.hero-countdown-today {
  font-family: var(--serif);
  font-style: italic;
  font-size: 26px;
  color: var(--cognac, #a16f3a);
  margin-top: 12px;
}
@media (max-width: 480px) {
  .hero-countdown-cell { min-width: 56px; padding: 8px 10px; }
  .hero-countdown-cell__num { font-size: 22px; }
}

/* ===== PWA INSTALL PROMPT ===== */
.pwa-install-toast {
  position: fixed;
  bottom: 96px;
  left: 16px;
  right: 16px;
  max-width: 420px;
  margin: 0 auto;
  background: #fff;
  border: 1px solid var(--bone, #e8dfd1);
  border-radius: 14px;
  box-shadow: 0 8px 24px rgba(45, 36, 28, 0.15);
  padding: 14px 16px;
  display: flex;
  gap: 12px;
  align-items: center;
  z-index: 150;
  animation: pwa-slide-up 0.3s var(--ease-out, cubic-bezier(0.16, 1, 0.3, 1));
}
@keyframes pwa-slide-up {
  from { transform: translateY(40px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}
.pwa-install-toast__icon {
  font-size: 28px;
  flex: 0 0 auto;
}
.pwa-install-toast__body { flex: 1; min-width: 0; }
.pwa-install-toast__title {
  font-family: var(--serif);
  font-size: 16px;
  font-weight: 400;
  margin: 0 0 2px;
}
.pwa-install-toast__sub {
  font-size: 12px;
  color: var(--ink-muted, #7a7066);
  line-height: 1.4;
}
.pwa-install-toast__actions { display: flex; gap: 6px; flex-shrink: 0; }
.pwa-install-toast__close {
  background: transparent;
  border: 0;
  color: var(--ink-muted, #7a7066);
  cursor: pointer;
  font-size: 18px;
  padding: 4px 8px;
  line-height: 1;
}

/* ===== ADMIN COUPLE TABS — scroll horizontal mobile ===== */
@media (max-width: 768px) {
  .tabs {
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    margin-left: -16px;
    margin-right: -16px;
    padding: 0 16px;
    gap: 0;
  }
  .tabs::-webkit-scrollbar { display: none; }
  .tabs__btn { padding: 12px 14px; font-size: 11px; flex-shrink: 0; }
  /* Indicateur subtil qu'il y a plus à scroller à droite */
  .tabs::after {
    content: "";
    flex: 0 0 8px;
  }
}

/* ===== FADE-IN ON SCROLL (cards entrée animée) ===== */
.fade-in-up {
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 0.5s ease, transform 0.5s var(--ease-out, cubic-bezier(0.16, 1, 0.3, 1));
  will-change: opacity, transform;
}
.fade-in-up.is-visible {
  opacity: 1;
  transform: translateY(0);
}
@media (prefers-reduced-motion: reduce) {
  .fade-in-up { opacity: 1; transform: none; transition: none; }
  .jour-j-banner { animation: none; }
  .skeleton { animation: none; }
}

/* ===== NAV BRAND COHÉRENT (Mon Carnet logo lockup) ===== */
.brand-lockup {
  display: inline-flex;
  align-items: baseline;
  gap: 4px;
  font-family: var(--serif, Fraunces, Georgia, serif);
  font-size: 22px;
  font-weight: 400;
  letter-spacing: -0.01em;
  color: var(--ink, #2d241c);
  text-decoration: none;
  line-height: 1;
}
.brand-lockup__mark { color: var(--ink, #2d241c); }
.brand-lockup__name {
  color: var(--cognac, #a16f3a);
  font-style: italic;
}
.brand-lockup__suffix {
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-muted, #7a7066);
  margin-left: 8px;
  font-style: normal;
  font-family: var(--sans, Inter, system-ui);
  align-self: center;
}
