/* ====================================================================
   MON 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;
  /* Erreur / danger — utilisé dans les modales destructrices, messages d'erreur,
     champs requis. Avant : #b91c1c hardcodé partout. */
  --danger: #b91c1c;
  --danger-bg: #fbe7e1;

  --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;
  /* Empêche tout débordement horizontal — corrige le bug "la page de droite se voit"
     causé par les View Transitions translateX(±3%) figées sur iOS Safari et tout
     élément enfant qui dépasserait du viewport en mobile portrait. */
  overflow-x: hidden;
  /* iOS Safari : empêche le bounce horizontal sur les sliders internes */
  overscroll-behavior-x: none;
}

body {
  background: linear-gradient(180deg, var(--ivory) 0%, var(--ivory-warm) 100%);
  min-height: 100vh;
  /* Largeur strictement contenue à la viewport pour mobile */
  max-width: 100vw;
}

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: var(--danger);
  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;
  /* min(280px, 100%) : sans ça, sur iPhone SE (320px) la cellule force 280px
     et déborde le shell qui a 16px de padding latéral. */
  grid-template-columns: repeat(auto-fill, minmax(min(280px, 100%), 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; }
/* Boost Avis — wrapper carte couple + bouton affiche */
.couple-card-wrap { position: relative; display: flex; flex-direction: column; }
.couple-card-wrap .couple-card { flex: 1; }
.couple-card__poster-btn {
  display: block; text-align: center;
  padding: 7px 10px; margin-top: 4px;
  font-size: 11px; font-weight: 500; letter-spacing: 0.04em;
  color: var(--cognac); background: rgba(161,111,58,0.08);
  border: 1px solid rgba(161,111,58,0.25); border-radius: 6px;
  text-decoration: none; transition: background 0.15s, border-color 0.15s;
}
.couple-card__poster-btn:hover { background: rgba(161,111,58,0.18); border-color: var(--cognac); }

/* ===== TABS ===== */
.tabs {
  display: flex;
  gap: 4px;
  border-bottom: 1px solid var(--line);
  margin: 32px 0 24px;
  /* Scroll horizontal sans barre visible : sur mobile portrait, 5+ onglets
     dépassent toujours la viewport — sans flex-shrink:0 sur les boutons
     ils se compriment et deviennent illisibles. */
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.tabs::-webkit-scrollbar { display: none; }
.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;
  /* Empêche la compression des boutons d'onglet lorsqu'ils sortent du viewport */
  flex-shrink: 0;
}
.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: var(--danger); }

/* ===== 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); }
.action-tile--wide { grid-column: 1 / -1; }

/* === SUBTABS (sous-onglets dans les groupes Forfait/Galerie/Planif) === */
.subtabs {
  display: flex;
  gap: 6px;
  flex-wrap: nowrap;
  overflow-x: auto;
  padding: 4px 0 12px;
  margin: 0 0 16px;
  border-bottom: 1px solid var(--line-soft);
  scrollbar-width: none;
}
.subtabs::-webkit-scrollbar { display: none; }
.subtabs__btn {
  flex: 0 0 auto;
  padding: 8px 14px;
  border: 1.5px solid var(--line);
  background: #fff;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 500;
  color: var(--ink-muted);
  cursor: pointer;
  transition: all 0.15s var(--ease);
  white-space: nowrap;
}
.subtabs__btn:hover { border-color: var(--cognac); color: var(--cognac); }
.subtabs__btn.is-active { background: var(--cognac); color: #fff; border-color: var(--cognac); }

/* === 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;
    flex-wrap: nowrap;
    gap: 12px;
    overflow: hidden;
  }
  .app-nav__brand { font-size: 18px; flex-shrink: 0; }
  /* Nav links : scroll horizontal au lieu de débordement coupé. La barre est
     masquée pour rester propre, les liens restent atteignables au glissement. */
  .app-nav__links {
    flex: 1;
    min-width: 0;
    overflow-x: auto;
    overflow-y: hidden;
    gap: 16px;
    padding: 4px 4px 8px;
    margin: -4px -4px -8px;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    /* Indicateur visuel : fade à droite pour suggérer qu'on peut scroller */
    -webkit-mask-image: linear-gradient(to right, #000 calc(100% - 24px), transparent);
            mask-image: linear-gradient(to right, #000 calc(100% - 24px), transparent);
  }
  .app-nav__links::-webkit-scrollbar { display: none; }
  .app-nav__links a,
  .app-nav__links button {
    flex-shrink: 0;
    white-space: nowrap;
    font-size: 13px;
  }
}

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

/* === NAV LINKS (Waze / Google Maps) — bouton "Y aller" sur tous les lieux === */
.nav-links { display: inline-flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.nav-link {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  font-size: 11px;
  letter-spacing: 0.04em;
  font-weight: 500;
  border-radius: 999px;
  text-decoration: none;
  transition: transform 0.15s var(--ease), box-shadow 0.2s var(--ease);
  white-space: nowrap;
}
.nav-link:hover { transform: translateY(-1px); box-shadow: var(--shadow-sm); text-decoration: none; }
.nav-link--waze { background: #33ccff; color: #002033; }
.nav-link--waze:hover { background: #1ec0f5; color: #002033; }
.nav-link--gmaps { background: #4285f4; color: white; }
.nav-link--gmaps:hover { background: #2c6bd1; color: white; }

/* === 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;
}
/* Le suffixe "FAIT EN FRANCE" sort de la nav en dessous de 480px portrait
   et empêche le brand "Mon Carnet" de s'afficher en entier — on le cache. */
@media (max-width: 480px) {
  .brand-lockup__suffix { display: none; }
}

/* =================================================================
   RESPONSIVE FIX BLOCK — 2026-05-01
   Audit complet : voir rapport
   Cible : iPhone 360-414px portrait
   ================================================================= */

/* FIX 1 — Sections landing avec margin négatif (cause primaire débordement)
   Le JS injecte 2 sections avec `margin: 0 -48px; padding: ... 48px`. Sur mobile
   le shell n'a que 16px de padding → la section déborde de +64px à droite. */
@media (max-width: 720px) {
  main.shell > section[style*="margin: 0 -48px"],
  main.shell > section[style*="margin: 60px -48px 0"],
  main.shell > section[style*="-48px"] {
    margin-left: 0 !important;
    margin-right: 0 !important;
    padding-left: clamp(16px, 4vw, 24px) !important;
    padding-right: clamp(16px, 4vw, 24px) !important;
    border-radius: 0;
  }
}

/* FIX 2 — Inputs zoom iOS Safari (font-size < 16px déclenche un zoom forcé)
   Maintient la taille visuelle via -webkit-text-size-adjust dans certains contextes,
   mais ici on force 16px sur mobile pour 0 zoom. */
@media (max-width: 768px) {
  .input,
  .textarea,
  .select,
  input[type="text"],
  input[type="email"],
  input[type="tel"],
  input[type="number"],
  input[type="date"],
  input[type="time"],
  input[type="search"],
  input[type="url"],
  textarea,
  select {
    font-size: 16px;
  }
}

/* FIX 3 — Inputs natifs iOS qui débordent leur cellule grid
   iOS Safari rend &lt;input type="date"&gt; avec un widget natif min ~120px.
   En cellule 80px, ça déborde la grille → débordement horizontal. */
@media (max-width: 640px) {
  input[type="date"],
  input[type="number"],
  input[type="time"],
  input[type="datetime-local"],
  input[type="month"],
  input[type="week"] {
    min-width: 0;
    width: 100%;
    max-width: 100%;
  }
  .input,
  .select,
  .textarea {
    min-width: 0;
    max-width: 100%;
  }
}

/* FIX 4 — Grilles inline 3-4 colonnes dans formulaires (add-payment, add-budget,
   add-contact, add-witness) qui injectent grid-template-columns en style direct.
   Sur mobile portrait 360px, 4 colonnes = 80px chacune → impossible avec inputs date.
   On force 2 colonnes <640px et 1 colonne <420px. */
@media (max-width: 640px) {
  .shell div[style*="grid-template-columns: 1fr 1fr 1fr"],
  .shell div[style*="grid-template-columns: 2fr 1fr 1fr"],
  .shell div[style*="grid-template-columns: 1fr 2fr 1fr"],
  .shell div[style*="grid-template-columns: 1fr 1fr 1fr 1fr"],
  .shell div[style*="grid-template-columns: 2fr 1fr 1fr 1fr"],
  .shell div[style*="grid-template-columns: 1fr 2fr 1fr 1fr"],
  .shell form[style*="grid-template-columns: 1fr 1fr 1fr"],
  .shell form[style*="grid-template-columns: 2fr 1fr 1fr"],
  .shell form[style*="grid-template-columns: 1fr 1fr 1fr 1fr"] {
    grid-template-columns: 1fr 1fr !important;
  }
}
@media (max-width: 420px) {
  .shell div[style*="grid-template-columns: 1fr 1fr 1fr"],
  .shell div[style*="grid-template-columns: 2fr 1fr 1fr"],
  .shell div[style*="grid-template-columns: 1fr 2fr 1fr"],
  .shell div[style*="grid-template-columns: 1fr 1fr 1fr 1fr"],
  .shell div[style*="grid-template-columns: 2fr 1fr 1fr 1fr"],
  .shell div[style*="grid-template-columns: 1fr 2fr 1fr 1fr"],
  .shell form[style*="grid-template-columns"] {
    grid-template-columns: 1fr !important;
  }
}

/* FIX 5 — .tabs margins négatives -16px en mobile
   Annule les margins négatives qui débordent le shell quand il a un padding non
   compensable. La nav reste scrollable horizontalement par .tabs { overflow-x: auto } existant. */
@media (max-width: 768px) {
  .shell > .tabs,
  .shell .tabs {
    margin-left: 0;
    margin-right: 0;
    padding: 0;
  }
  /* Permet aux tabs de scroller horizontalement sans déborder */
  .tabs {
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }
  .tabs::-webkit-scrollbar { display: none; }
}

/* FIX 6 — View Transitions clip sur iOS Safari
   Le pseudo-element ::view-transition-old(root) peut excéder la viewport pendant
   les 320ms d'animation slide ±3%, révélant le bord droit de la page précédente.
   On force le clipping et on désactive l'animation horizontale en mobile. */
::view-transition-group(root) {
  overflow: clip;
  width: 100vw;
  max-width: 100vw;
}
::view-transition-old(root),
::view-transition-new(root) {
  width: 100% !important;
  max-width: 100vw !important;
}
/* iOS Safari mobile portrait : remplacer translateX par fade simple (zéro débordement) */
@media (max-width: 720px) {
  @supports (-webkit-touch-callout: none) {
    html[data-tab-dir="right"]::view-transition-old(root),
    html[data-tab-dir="left"]::view-transition-old(root) {
      animation: vt-fade-out 0.18s ease forwards !important;
    }
    html[data-tab-dir="right"]::view-transition-new(root),
    html[data-tab-dir="left"]::view-transition-new(root) {
      animation: vt-fade-in 0.18s ease forwards !important;
    }
    @keyframes vt-fade-out { to { opacity: 0; } }
    @keyframes vt-fade-in { from { opacity: 0; } to { opacity: 1; } }
  }
}

/* FIX 7 — Safety net sur tous les containers principaux (defense in depth) */
.shell,
.app-nav__inner,
main {
  max-width: 100%;
  box-sizing: border-box;
}

/* FIX 8 — Tables natives <table> : sans wrapper, une table de 6+ colonnes
   déborde forcément la viewport mobile. On les rend scrollables horizontalement
   et on les empêche de casser le layout des cards qui les contiennent. */
.card table,
.shell table,
main table {
  display: block;
  width: 100%;
  max-width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  border-collapse: collapse;
}
.card table thead,
.card table tbody,
.shell table thead,
.shell table tbody,
main table thead,
main table tbody {
  /* Préserve l'apparence tableau quand on passe en display:block */
  display: table;
  width: 100%;
  table-layout: auto;
}

/* FIX 9 — Hero / titres landing avec font-size en style inline ou rules globales
   qui ne sont pas déjà clampés. Force un recalc safe sur très petits écrans. */
@media (max-width: 480px) {
  .h-display { font-size: clamp(28px, 8vw, 36px); }
  .h-section { font-size: clamp(22px, 6vw, 26px); }
}

/* FIX 10 — .row avec flex-wrap doit autoriser min-width:0 sur ses enfants
   pour qu'ils puissent rétrécir au lieu de pousser le parent. */
@media (max-width: 600px) {
  .row > * { min-width: 0; }
  /* .row--end et .row--space restent en flex-wrap, mais sur mobile on autorise
     le passage en colonne quand il n'y a vraiment pas la place. */
}

/* FIX 11 — devis-doc__main : min-width:180px déborde en cellule étroite */
@media (max-width: 480px) {
  .devis-doc__main { min-width: 0; flex: 1 1 100%; }
  .devis-doc { gap: 8px; }
}

/* FIX 12 — montage-toolbar : sur mobile, gap 24px entre groupes pousse le contenu */
@media (max-width: 600px) {
  .montage-toolbar { gap: 12px; padding: 12px 16px; }
  .montage-head { padding: 14px 16px; }
  .montage-foot { padding: 12px 16px; }
}

/* ===== MODALES (v15) ===== */
.modal {
  position: fixed; inset: 0; z-index: 9000;
  display: grid; place-items: center;
}
.modal[hidden] { display: none !important; }
.modal__backdrop {
  position: absolute; inset: 0;
  background: rgba(20, 18, 14, 0.55);
  backdrop-filter: blur(2px);
}
.modal__panel {
  position: relative; z-index: 1;
  background: var(--paper, #fff);
  border-radius: 8px;
  padding: 24px 28px;
  width: min(92vw, 520px);
  max-height: 88vh; overflow-y: auto;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.25);
}
.modal__panel h3 { margin: 0; }

/* Catalogue admin v15 — drag-drop */
.catalog-offer-card { transition: background 0.15s; }
.catalog-offer-card:hover { background: var(--paper-soft, rgba(0, 0, 0, 0.02)); }
.catalog-offers .sortable-ghost { opacity: 0.4; background: rgba(161, 111, 58, 0.08); }
.catalog-offers .sortable-chosen { cursor: grabbing; }

/* Couple — grid de catégories */
/* min(240px, 100%) : évite l'overflow horizontal en viewport <240px+padding */
.cat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(240px, 100%), 1fr)); gap: 16px; }
.cat-card {
  position: relative; border-radius: 10px; overflow: hidden;
  background: var(--paper, #fff); border: 1px solid var(--rule, rgba(0,0,0,0.08));
  cursor: pointer; transition: transform 0.18s, box-shadow 0.18s;
}
.cat-card:hover { transform: translateY(-2px); box-shadow: 0 12px 30px rgba(0,0,0,0.10); }
.cat-card__media { aspect-ratio: 4/3; background: linear-gradient(135deg, #f4ede3 0%, #e8dcc8 100%); position: relative; overflow: hidden; }
.cat-card__media img { width: 100%; height: 100%; object-fit: cover; display: block; }
.cat-card__media::after {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(180deg, transparent 50%, rgba(20,18,14,0.55));
}
.cat-card__body { padding: 14px 16px 16px; }
.cat-card__title { font-family: var(--font-display, serif); font-size: 18px; line-height: 1.2; margin: 0; }
.cat-card__teaser { color: var(--cognac, #a16f3a); font-size: 13px; margin-top: 6px; font-weight: 600; }
.cat-card__tagline { color: var(--ink-soft, #6b665e); font-size: 12px; margin-top: 4px; }
.cat-card--acquired::after {
  content: '✓ Acquis'; position: absolute; top: 12px; right: 12px;
  background: rgba(255,255,255,0.92); color: var(--cognac, #a16f3a);
  padding: 4px 10px; border-radius: 100px; font-size: 11px; letter-spacing: 0.06em; font-weight: 600;
}

/* ===== WISHLIST PUBLIQUE INVITÉS (v15) ===== */
body.is-wishlist-public { background: var(--ivory-warm, #faf6ee); }
.wl-page { max-width: 920px; margin: 0 auto; padding: 48px 20px 80px; }
.wl-hero { text-align: center; margin-bottom: 40px; }
.wl-eyebrow { font-size: 11px; letter-spacing: 0.4em; color: var(--cognac, #a16f3a); }
/* clamp() : évite que le titre wishlist dépasse en mobile portrait (ex: "Mariage de…") */
.wl-title { font-family: var(--serif, Fraunces); font-size: clamp(28px, 6vw, 42px); line-height: 1.1; margin: 14px 0 8px; color: var(--ink, #1a1814); word-wrap: break-word; }
.wl-date { font-style: italic; color: var(--ink-soft, #6b665e); margin-top: 6px; }
.wl-intro { font-style: italic; color: var(--ink-soft); max-width: 540px; margin: 24px auto 0; font-size: 16px; line-height: 1.55; }
.wl-toast { background: rgba(161, 111, 58, 0.12); color: var(--cognac); padding: 14px 18px; border-radius: 8px; text-align: center; margin-bottom: 24px; font-size: 14px; }
.wl-empty { text-align: center; padding: 60px 20px; color: var(--ink-soft); }
/* min(260px, 100%) évite que la cellule force 260px sur viewport 320-360px */
.wl-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(260px, 100%), 1fr)); gap: 18px; }
.wl-item { background: var(--paper, #fff); border-radius: 10px; overflow: hidden; border: 1px solid var(--rule, rgba(0,0,0,0.06)); display: flex; flex-direction: column; }
.wl-item--funded { opacity: 0.85; }
.wl-item__media { aspect-ratio: 4/3; background: linear-gradient(135deg, #f4ede3, #e8dcc8); overflow: hidden; }
.wl-item__media img { width: 100%; height: 100%; object-fit: cover; }
.wl-item__body { padding: 16px 18px 20px; flex: 1; display: flex; flex-direction: column; }
.wl-item__title { font-family: var(--serif, Fraunces); font-size: 20px; line-height: 1.2; margin: 0; }
.wl-item__desc { color: var(--ink-soft); font-size: 13px; margin: 6px 0 12px; line-height: 1.5; }
.wl-progress { height: 6px; background: rgba(0,0,0,0.06); border-radius: 6px; overflow: hidden; margin-top: auto; }
.wl-progress__bar { height: 100%; background: linear-gradient(90deg, var(--cognac, #a16f3a), #c89766); transition: width 0.4s; }
.wl-item__meta { display: flex; justify-content: space-between; font-size: 12px; color: var(--ink-soft); margin-top: 6px; }
.wl-item__contribs { color: var(--cognac); }
.wl-item__cta { width: 100%; margin-top: 14px; }
.wl-item__funded { color: var(--cognac, #a16f3a); font-weight: 600; font-size: 14px; margin-top: 12px; text-align: center; padding: 10px; background: rgba(161, 111, 58, 0.08); border-radius: 6px; }
.wl-footer { text-align: center; margin-top: 50px; color: var(--ink-soft); font-size: 12px; }

/* Onglets wishlist / covoiturage sur la page publique */
.wl-tabs { display: flex; gap: 0; border-bottom: 2px solid var(--rule, rgba(0,0,0,0.08)); margin-bottom: 32px; }
.wl-tabs__btn { background: none; border: none; padding: 12px 20px; font-size: 15px; font-family: inherit; cursor: pointer; color: var(--ink-soft, #6b665e); border-bottom: 2px solid transparent; margin-bottom: -2px; transition: color 0.15s, border-color 0.15s; }
.wl-tabs__btn.is-active { color: var(--cognac, #a16f3a); border-bottom-color: var(--cognac, #a16f3a); font-weight: 600; }
.wl-tabs__btn:hover:not(.is-active) { color: var(--ink, #1a1814); }

/* Covoiturage — liste des offres */
.carpool-section { max-width: 720px; margin: 0 auto; }
.carpool-intro { font-style: italic; color: var(--ink-soft); max-width: 540px; margin: 0 auto 28px; font-size: 15px; line-height: 1.55; text-align: center; }
.carpool-actions { display: flex; gap: 12px; justify-content: center; margin-bottom: 28px; flex-wrap: wrap; }
.carpool-empty { text-align: center; padding: 48px 20px; color: var(--ink-soft); }
.carpool-offer { background: var(--paper, #fff); border-radius: 10px; border: 1px solid var(--rule, rgba(0,0,0,0.06)); padding: 18px 20px; margin-bottom: 14px; }
.carpool-offer__header { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.carpool-offer__driver { font-weight: 600; font-size: 16px; }
.carpool-offer__dir { display: inline-block; font-size: 11px; letter-spacing: 0.12em; text-transform: uppercase; background: rgba(161,111,58,0.10); color: var(--cognac, #a16f3a); border-radius: 4px; padding: 3px 8px; margin-top: 2px; }
.carpool-offer__meta { font-size: 13px; color: var(--ink-soft); margin-top: 8px; line-height: 1.6; }
.carpool-offer__seats { display: inline-block; margin-top: 8px; font-size: 13px; font-weight: 600; }
.carpool-offer__seats--full { color: #b04545; }
.carpool-offer__seats--ok { color: #4a7c4e; }
.carpool-offer__notes { font-size: 13px; color: var(--ink-soft); font-style: italic; margin-top: 8px; border-left: 2px solid var(--rule, rgba(0,0,0,0.08)); padding-left: 10px; }
.carpool-offer__actions { display: flex; gap: 8px; margin-top: 14px; flex-wrap: wrap; }
.carpool-offer__passengers { margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--rule, rgba(0,0,0,0.06)); font-size: 13px; color: var(--ink-soft); }

/* Page pricing : features list — contraint la taille des SVG check (sinon 100% width) */
.pricing-features li { display: flex; align-items: center; gap: 8px; }
.pricing-features svg { width: 18px; height: 18px; flex-shrink: 0; color: var(--cognac, #a16f3a); }

/* ============================================================
   CONFIRM DIALOG — modale de confirmation custom (remplace confirm() natif)
   Style cognac, mobile-first (bottom sheet sur < 600px), boutons accessibles.
   ============================================================ */
.cd-overlay {
  position: fixed; inset: 0; z-index: 9998;
  background: rgba(15, 15, 15, 0.5);
  backdrop-filter: blur(4px);
  display: flex; align-items: center; justify-content: center;
  padding: 16px;
  animation: cd-fade-in 0.2s var(--ease-out);
}
.cd-card {
  background: var(--paper);
  border-radius: 18px;
  max-width: 420px; width: 100%;
  padding: 28px 24px 22px;
  box-shadow: 0 24px 70px rgba(0,0,0,0.28);
  animation: cd-pop-in 0.25s var(--ease-out);
}
.cd-icon {
  width: 44px; height: 44px;
  border-radius: 50%;
  background: var(--ivory-warm);
  color: var(--cognac);
  display: flex; align-items: center; justify-content: center;
  font-size: 22px;
  margin: 0 auto 14px;
}
.cd-icon--danger {
  background: var(--danger-bg);
  color: var(--danger);
}
.cd-title {
  font-family: var(--serif);
  font-size: 20px;
  line-height: 1.3;
  margin: 0 0 6px;
  text-align: center;
  color: var(--ink);
}
.cd-message {
  text-align: center;
  color: var(--ink-soft);
  font-size: 14.5px;
  line-height: 1.5;
  margin: 0 0 22px;
  white-space: pre-line;
}
.cd-actions {
  display: flex; gap: 10px;
  justify-content: stretch;
}
.cd-actions .cd-btn { flex: 1; min-height: 44px; padding: 11px 14px; border-radius: 10px; font-size: 14.5px; font-weight: 500; cursor: pointer; transition: background 0.15s, color 0.15s, border-color 0.15s; border: 1px solid transparent; }
.cd-btn--cancel { background: var(--ivory-warm); color: var(--ink-soft); border-color: var(--bone); }
.cd-btn--cancel:hover { background: var(--bone); }
.cd-btn--confirm { background: var(--cognac); color: var(--ivory); }
.cd-btn--confirm:hover { background: var(--cognac-deep); }
.cd-btn--danger { background: var(--danger); color: #fff; }
.cd-btn--danger:hover { background: #8b1414; }

@keyframes cd-fade-in { from { opacity: 0; } to { opacity: 1; } }
@keyframes cd-pop-in { from { transform: translateY(8px) scale(0.96); opacity: 0; } to { transform: translateY(0) scale(1); opacity: 1; } }

/* Mobile : bottom-sheet plus pouce-friendly */
@media (max-width: 600px) {
  .cd-overlay { align-items: flex-end; padding: 0; }
  .cd-card {
    max-width: 100%;
    border-radius: 18px 18px 0 0;
    padding: 28px 20px calc(22px + env(safe-area-inset-bottom));
    animation: cd-slide-up 0.25s var(--ease-out);
  }
  .cd-actions { flex-direction: column-reverse; gap: 8px; }
  .cd-actions .cd-btn { width: 100%; }
}
@keyframes cd-slide-up { from { transform: translateY(100%); } to { transform: translateY(0); } }

/* ============================================================
   PILLS RSVP — boutons radio stylisés (oui/non/peut-être) sur le formulaire public
   ============================================================ */
.rsvp-pills { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.rsvp-pill {
  display: flex; flex-direction: column; align-items: center; gap: 4px;
  padding: 14px 10px;
  border: 1.5px solid var(--bone);
  border-radius: 12px;
  background: var(--paper);
  cursor: pointer;
  text-align: center;
  font-size: 13px;
  line-height: 1.3;
  color: var(--ink-soft);
  transition: border-color 0.15s, background 0.15s, color 0.15s, transform 0.15s;
}
.rsvp-pill:hover { border-color: var(--cognac-light); }
.rsvp-pill input { position: absolute; opacity: 0; pointer-events: none; }
.rsvp-pill__emoji { font-size: 22px; line-height: 1; }
.rsvp-pill:has(input:checked) {
  border-color: var(--cognac);
  background: var(--ivory-warm);
  color: var(--cognac);
  font-weight: 500;
  transform: translateY(-1px);
}

/* Stepper +/− pour input numérique (plus_one_count) */
.stepper { display: inline-flex; align-items: stretch; border: 1px solid var(--bone); border-radius: 10px; overflow: hidden; background: var(--paper); }
.stepper__btn {
  width: 44px; height: 44px;
  font-size: 20px;
  color: var(--cognac);
  background: var(--ivory-warm);
  border: 0;
  cursor: pointer;
  transition: background 0.15s;
}
.stepper__btn:hover { background: var(--bone); }
.stepper__btn:disabled { color: var(--ink-faint); cursor: not-allowed; background: var(--ivory-warm); }
.stepper__value {
  width: 56px;
  border: 0;
  text-align: center;
  font-size: 16px;
  font-weight: 500;
  color: var(--ink);
  background: transparent;
  -moz-appearance: textfield;
}
.stepper__value::-webkit-outer-spin-button,
.stepper__value::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }

/* ====================================================================
   UTILITY CLASSES — refactor inline styles → classes Tailwind-like
   2026-05-07 : extraction des patterns inline les plus répétés dans app.js
   Convention : préfixe .u- pour éviter collision avec composants existants.
   Strictement équivalents visuels aux inline d'origine.
   ==================================================================== */

/* margin-top */
.u-mt-2 { margin-top: 2px; }
.u-mt-4 { margin-top: 4px; }
.u-mt-6 { margin-top: 6px; }
.u-mt-8 { margin-top: 8px; }
.u-mt-12 { margin-top: 12px; }
.u-mt-14 { margin-top: 14px; }
.u-mt-16 { margin-top: 16px; }
.u-mt-20 { margin-top: 20px; }
.u-mt-24 { margin-top: 24px; }
.u-mt-32 { margin-top: 32px; }

/* margin-bottom */
.u-mb-4 { margin-bottom: 4px; }
.u-mb-8 { margin-bottom: 8px; }
.u-mb-12 { margin-bottom: 12px; }
.u-mb-14 { margin-bottom: 14px; }
.u-mb-16 { margin-bottom: 16px; }
.u-mb-18 { margin-bottom: 18px; }
.u-mb-24 { margin-bottom: 24px; }
.u-mb-28 { margin-bottom: 28px; }

/* font-size */
.u-text-xs { font-size: 11px; }
.u-text-sm { font-size: 12px; }
.u-text-md { font-size: 13px; }
.u-text-base { font-size: 14px; }
.u-text-15 { font-size: 15px; }
.u-text-16 { font-size: 16px; }
.u-text-17 { font-size: 17px; }
.u-text-18 { font-size: 18px; }
.u-text-24 { font-size: 24px; }
.u-text-36 { font-size: 36px; }

/* alignment */
.u-text-center { text-align: center; }
.u-text-right { text-align: right; }

/* font-weight / style */
.u-bold { font-weight: 600; }
.u-medium { font-weight: 500; }
.u-fw-normal { font-weight: normal; }
.u-italic { font-style: italic; }

/* color */
.u-color-cognac { color: var(--cognac); }
.u-color-cognac-hex { color: #a16f3a; }
.u-color-gold { color: var(--gold); }
.u-color-danger { color: var(--danger); }
.u-color-danger-hex { color: #b23838; }

/* flex helpers (complement de .row qui a gap:12px par defaut) */
.u-gap-4 { gap: 4px; }
.u-gap-6 { gap: 6px; }
.u-gap-8 { gap: 8px; }
.u-gap-10 { gap: 10px; }
.u-gap-12 { gap: 12px; }
.u-gap-16 { gap: 16px; }

.u-flex-1 { flex: 1; }
.u-flex-2 { flex: 2; }
.u-flex-1-min0 { flex: 1; min-width: 0; }

/* misc layout */
.u-justify-center { justify-content: center; }
.u-align-start { align-items: flex-start; }
.u-grid-full { grid-column: 1 / -1; }
.u-cursor-pointer { cursor: pointer; }
.u-hidden { display: none; }
.u-relative { position: relative; }
.u-block { display: block; }

/* margin reset */
.u-m-0 { margin: 0; }

/* Common composites - patterns copiés tels quels de l'inline le plus fréquent */
.u-empty-state { text-align: center; padding: 48px; }
.u-text-md-mt-4 { font-size: 13px; margin-top: 4px; }
.u-text-xs-mt-4 { font-size: 11px; margin-top: 4px; }
.u-mt-8-text-base { margin-top: 8px; font-size: 14px; }
.u-mt-12-gap-4 { margin-top: 12px; gap: 4px; }
.u-mt-12-text-base { margin-top: 12px; font-size: 14px; }

/* grid auto-fit pour cartes 160px */
.u-grid-auto-160 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 12px;
  margin-top: 12px;
}

/* image cover full */
.u-img-cover { width: 100%; height: 100%; object-fit: cover; }

/* ============================================================
   Couple New Wizard (cnw-*) — formulaire 3 étapes pour /admin/couples/new
   ============================================================ */
.cnw-progress {
  position: sticky;
  top: 0;
  z-index: 5;
  background: linear-gradient(180deg, var(--ivory) 0%, rgba(250, 246, 240, 0.95) 100%);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  padding: 16px 0 18px;
  margin-bottom: 24px;
  border-bottom: 1px solid var(--bone);
}
.cnw-progress__steps {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  max-width: 460px;
  margin: 0 auto;
}
.cnw-progress__step {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  flex: 0 0 auto;
}
.cnw-progress__bullet {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--bone);
  color: var(--cognac-deep);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: "Fraunces", serif;
  font-weight: 500;
  font-size: 15px;
  transition: background 0.25s ease, color 0.25s ease, transform 0.25s ease;
}
.cnw-progress__step.is-active .cnw-progress__bullet {
  background: var(--cognac);
  color: #fff;
  transform: scale(1.08);
  box-shadow: 0 4px 14px rgba(161, 111, 58, 0.35);
}
.cnw-progress__step.is-done .cnw-progress__bullet {
  background: var(--cognac-light);
  color: #fff;
}
.cnw-progress__label {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--cognac-deep);
  opacity: 0.55;
  white-space: nowrap;
}
.cnw-progress__step.is-active .cnw-progress__label {
  opacity: 1;
  color: var(--cognac);
}
.cnw-progress__line {
  flex: 1 1 auto;
  height: 2px;
  background: var(--bone);
  margin: 0 6px;
  margin-bottom: 22px; /* aligne avec le bullet, pas le label */
  border-radius: 999px;
  position: relative;
  overflow: hidden;
}
.cnw-progress__line::after {
  content: "";
  position: absolute;
  inset: 0 100% 0 0;
  background: linear-gradient(90deg, var(--cognac), var(--gold));
  transition: right 0.35s ease;
}
.cnw-progress__line.is-filled::after { inset: 0 0 0 0; }

.cnw-stage-wrap {
  position: relative;
  overflow: hidden;
}
.cnw-stage {
  animation: cnw-slide-in 0.32s ease both;
}
.cnw-stage--back {
  animation: cnw-slide-in-back 0.32s ease both;
}
@keyframes cnw-slide-in {
  from { transform: translateX(28px); opacity: 0; }
  to   { transform: translateX(0);    opacity: 1; }
}
@keyframes cnw-slide-in-back {
  from { transform: translateX(-28px); opacity: 0; }
  to   { transform: translateX(0);     opacity: 1; }
}

.cnw-stage__lead {
  font-size: 14px;
  color: var(--cognac-deep);
  opacity: 0.75;
  margin: 0 0 18px;
  line-height: 1.5;
}

.cnw-grid-2 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
}
.cnw-full { grid-column: 1 / -1; }

.cnw-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 28px;
  flex-wrap: wrap;
}
.cnw-actions__right { display: flex; gap: 10px; flex-wrap: wrap; }
.cnw-actions__skip {
  background: none;
  border: none;
  color: var(--cognac-deep);
  opacity: 0.65;
  font-size: 13px;
  text-decoration: underline;
  cursor: pointer;
  padding: 6px 4px;
}
.cnw-actions__skip:hover { opacity: 1; }

.cnw-pkg-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 10px;
  margin-top: 6px;
}
.cnw-pkg-card {
  border: 1px solid var(--bone);
  border-radius: 12px;
  padding: 12px 14px;
  cursor: pointer;
  background: #fff;
  transition: border-color 0.18s ease, box-shadow 0.18s ease, transform 0.18s ease;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.cnw-pkg-card:hover { border-color: var(--cognac-light); }
.cnw-pkg-card.is-selected {
  border-color: var(--cognac);
  box-shadow: 0 4px 14px rgba(161, 111, 58, 0.18);
  background: #fef9f3;
}
.cnw-pkg-card input[type="radio"] { display: none; }
.cnw-pkg-card__name { font-weight: 600; color: var(--cognac-deep); }
.cnw-pkg-card__price { font-size: 13px; color: var(--cognac); }
.cnw-pkg-card__desc { font-size: 12px; opacity: 0.7; }

.cnw-checkbox-card {
  background: #fef9f3;
  border: 1px solid #e8d9c2;
  border-radius: 12px;
  padding: 14px 16px;
}
.cnw-checkbox-card label {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  cursor: pointer;
}
.cnw-checkbox-card input[type="checkbox"] {
  margin-top: 3px;
  flex: 0 0 auto;
}
.cnw-checkbox-card__copy { flex: 1; line-height: 1.4; }
.cnw-checkbox-card__hint {
  display: block;
  font-size: 13px;
  margin-top: 2px;
  color: var(--cognac-deep);
  opacity: 0.7;
}

.cnw-draft-banner {
  background: #fef9f3;
  border: 1px dashed var(--cognac-light);
  border-radius: 10px;
  padding: 10px 14px;
  margin-bottom: 16px;
  font-size: 13px;
  color: var(--cognac-deep);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.cnw-draft-banner button {
  background: none;
  border: none;
  color: var(--cognac);
  text-decoration: underline;
  cursor: pointer;
  font-size: 12px;
}

/* ====================================================================
   UTILITY CLASSES — 2e vague (composites moyennement répétés)
   ==================================================================== */
.u-flex-wrap { flex-wrap: wrap; }
.u-row-wrap-12 { gap: 12px; flex-wrap: wrap; }
.u-min-200 { min-width: 200px; }
.u-min-160 { min-width: 160px; }
.u-flex-1-min-200 { flex: 1; min-width: 200px; }
.u-flex-1-min-160 { flex: 1; min-width: 160px; }

.u-uppercase-12 { font-size: 12px; text-transform: uppercase; letter-spacing: 0.05em; }
.u-text-sm-mt-2 { font-size: 12px; margin-top: 2px; }
.u-text-sm-mt-4 { font-size: 12px; margin-top: 4px; }
.u-text-sm-mt-6 { font-size: 12px; margin-top: 6px; }
.u-text-sm-mt-8 { font-size: 12px; margin-top: 8px; }
.u-text-md-mt-6 { font-size: 13px; margin-top: 6px; }
.u-text-md-mt-8 { font-size: 13px; margin-top: 8px; }
.u-text-md-mb-14 { font-size: 13px; margin-bottom: 14px; }
.u-text-base-mt-8 { font-size: 14px; margin-top: 8px; }
.u-text-base-mt-8-lh { font-size: 14px; margin-top: 8px; line-height: 1.6; }
.u-text-36-mt-8 { font-size: 36px; margin-top: 8px; }
.u-mt-16-text-sm { margin-top: 16px; font-size: 12px; }
.u-mt-12-gap-8 { margin-top: 12px; gap: 8px; }
.u-mt-24-gap-12 { margin-top: 24px; gap: 12px; }
.u-mt-center-16 { text-align: center; margin-top: 16px; }
.u-gap-8-mt-20 { gap: 8px; margin-top: 20px; }

.u-section-pad { padding: 32px 0 80px; }
.u-section-pad-md { padding: 16px 0 32px; }
.u-section-pad-sm { padding: 32px 0; }
.u-pad-card-center { padding: 16px; text-align: center; }
.u-list-row-sep { padding: 12px 0; border-bottom: 1px solid var(--line-soft); }
.u-icon-44 { width: 44px; height: 44px; margin-bottom: 12px; }
.u-icon-48 { width: 48px; height: 48px; margin-bottom: 12px; }
.u-icon-20 { width: 20px; height: 20px; }
.u-margin-h2 { margin: 24px 0 16px; }
.u-margin-h3 { margin: 8px 0 16px; font-size: 14px; }
.u-margin-12-0 { margin: 12px 0; }
.u-mw-720-center { max-width: 720px; margin: 0 auto; }

.u-serif-17 { font-family: var(--serif); font-size: 17px; font-weight: 400; }
.u-serif-17-light { font-family: var(--serif); font-size: 17px; }
.u-cognac-18 { color: var(--cognac); font-size: 18px; }
.u-serif-24 { font-family: var(--serif, Fraunces); font-size: 24px; color: var(--cognac, #a16f3a); }
.u-serif-36 { font-family: var(--serif); font-size: 36px; color: #a16f3a; margin-top: 6px; }

.u-link-row {
  display: block;
  padding: 8px 0;
  border-bottom: 1px solid var(--line-soft);
  text-decoration: none;
  color: inherit;
}

.u-flex-center-gap-8 { display: flex; align-items: center; gap: 8px; }
.u-flex-center-gap-10-mb { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.u-grid-gap-12 { display: grid; gap: 12px; }
.u-grid-gap-14 { display: grid; gap: 14px; }
.u-text-base-flex-wrap { font-size: 14px; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.u-text-md-line { font-size: 13px; margin: 0; line-height: 1.5; }


/* ===== COMMENTAIRES INLINE (popover global) ===== */
.cmt-btn {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 6px 10px; font-size: 14px; line-height: 1;
  background: transparent; border: 1px solid var(--line, #e8dfd1); border-radius: 8px;
  color: var(--ink-soft, #7a6a55); cursor: pointer;
  transition: background 0.15s, border-color 0.15s;
  position: relative;
}
.cmt-btn:hover { background: var(--ivory-warm, #faf6f0); border-color: var(--cognac, #a16f3a); }
.cmt-btn__badge {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 18px; height: 18px; padding: 0 5px;
  background: var(--cognac, #a16f3a); color: #fff;
  border-radius: 9px; font-size: 11px; font-weight: 600;
  margin-left: 2px;
}
.cmt-overlay {
  position: fixed; inset: 0; z-index: 9999;
  background: rgba(26, 24, 20, 0.5); backdrop-filter: blur(4px);
  display: flex; align-items: center; justify-content: center;
  padding: 16px;
  animation: cmtFadeIn 0.15s ease-out;
}
@keyframes cmtFadeIn { from { opacity: 0; } to { opacity: 1; } }
.cmt-pop {
  background: #fff; border-radius: 14px; box-shadow: 0 24px 60px rgba(0,0,0,0.35);
  width: 100%; max-width: 560px; max-height: 80vh;
  display: flex; flex-direction: column; overflow: hidden;
}
.cmt-pop__head {
  display: flex; align-items: flex-start; justify-content: space-between;
  gap: 12px; padding: 18px 20px 12px;
  border-bottom: 1px solid var(--line, #e8dfd1);
}
.cmt-pop__ctx {
  font-family: var(--serif, Fraunces, Georgia, serif);
  font-size: 16px; color: var(--ink, #1a1814); margin-top: 4px;
}
.cmt-pop__list {
  flex: 1 1 auto; overflow-y: auto;
  padding: 14px 20px; display: flex; flex-direction: column; gap: 14px;
  background: var(--ivory-warm, #faf6f0);
}
.cmt-pop__loading, .cmt-pop__empty {
  text-align: center; padding: 32px 16px; font-style: italic;
}
.cmt-pop__form {
  padding: 14px 20px; border-top: 1px solid var(--line, #e8dfd1);
  background: #fff;
}
.cmt-pop__form textarea { resize: vertical; }
.cmt-item { display: flex; gap: 10px; align-items: flex-start; }
.cmt-item__avatar {
  flex: 0 0 36px; width: 36px; height: 36px;
  border-radius: 50%; background: var(--cognac, #a16f3a); color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-size: 13px; font-weight: 600; letter-spacing: 0.05em;
}
.cmt-item--mine .cmt-item__avatar { background: var(--ink, #1a1814); }
.cmt-item__body { flex: 1 1 auto; min-width: 0; background: #fff; padding: 10px 12px; border-radius: 10px; border: 1px solid var(--line-soft, #f0e8db); }
.cmt-item__head { display: flex; gap: 8px; align-items: baseline; flex-wrap: wrap; margin-bottom: 4px; }
.cmt-item__author { font-weight: 600; font-size: 13px; color: var(--ink, #1a1814); }
.cmt-item__date { font-size: 11px; color: var(--ink-faint, #b8ad9e); }
.cmt-item__del { margin-left: auto; background: none; border: 0; color: var(--ink-faint, #b8ad9e); cursor: pointer; font-size: 16px; line-height: 1; padding: 0 4px; }
.cmt-item__del:hover { color: var(--danger, #b91c1c); }
.cmt-item__text { font-size: 14px; color: var(--ink, #1a1814); line-height: 1.5; white-space: pre-wrap; word-break: break-word; }
@media (max-width: 600px) {
  .cmt-pop { max-height: 92vh; }
  .cmt-pop__list { padding: 10px 14px; }
  .cmt-pop__head, .cmt-pop__form { padding: 12px 14px; }
}

/* ===== WIKI INTERNE ===== */
.wiki-shell {
  display: grid; grid-template-columns: 280px 1fr;
  height: calc(100vh - 60px);
  max-height: calc(100vh - 60px);
  background: var(--ivory-warm, #faf6f0);
}
.wiki-sidebar {
  background: #fff; border-right: 1px solid var(--line, #e8dfd1);
  padding: 18px 12px; overflow-y: auto;
  display: flex; flex-direction: column; gap: 8px;
}
.wiki-sidebar__head {
  display: flex; align-items: flex-start; justify-content: space-between; gap: 8px;
  padding: 0 4px;
}
.wiki-sidebar__list {
  display: flex; flex-direction: column; gap: 1px;
  margin-top: 8px;
}
.wiki-item {
  display: flex; align-items: center; gap: 8px;
  padding: 8px 10px; border-radius: 6px;
  text-decoration: none; color: var(--ink-soft, #7a6a55);
  font-size: 14px; line-height: 1.3;
}
.wiki-item:hover { background: var(--ivory-warm, #faf6f0); color: var(--ink, #1a1814); }
.wiki-item.is-active { background: rgba(201,165,107,0.15); color: var(--cognac, #a16f3a); font-weight: 600; }
.wiki-item__icon { flex: 0 0 auto; font-size: 14px; }
.wiki-item__title { flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wiki-main {
  overflow-y: auto; padding: 24px 32px;
  display: flex; flex-direction: column;
}
.wiki-empty {
  margin: auto; text-align: center; padding: 60px 20px;
  color: var(--ink-faint, #b8ad9e);
}
.wiki-main__head {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  margin-bottom: 20px; padding-bottom: 14px;
  border-bottom: 1px solid var(--line, #e8dfd1);
}
.wiki-title {
  font-family: var(--serif, Fraunces, Georgia, serif);
  font-size: 24px; color: var(--ink, #1a1814);
  border: 0; outline: none; background: transparent;
  padding: 4px 0; flex: 1 1 auto; min-width: 0;
}
.wiki-title:focus { outline: 2px solid var(--cognac, #a16f3a); outline-offset: 2px; border-radius: 4px; }
.wiki-main__body { flex: 1 1 auto; min-height: 0; }
.wiki-edit {
  display: grid; grid-template-columns: 1fr 1fr; gap: 18px; height: 100%;
}
.wiki-edit--preview-only { grid-template-columns: 1fr; }
.wiki-edit--preview-only .wiki-textarea { display: none; }
.wiki-textarea {
  width: 100%; height: 100%; min-height: 400px;
  font-family: ui-monospace, "SF Mono", Menlo, monospace;
  font-size: 13px; line-height: 1.6;
  padding: 14px 16px;
  border: 1px solid var(--line, #e8dfd1); border-radius: 8px;
  background: #fff; resize: none; color: var(--ink, #1a1814);
}
.wiki-textarea:focus { outline: 2px solid var(--cognac, #a16f3a); outline-offset: 0; border-color: var(--cognac, #a16f3a); }
.wiki-preview {
  background: #fff; border: 1px solid var(--line, #e8dfd1); border-radius: 8px;
  padding: 18px 22px; overflow-y: auto;
  font-size: 14px; line-height: 1.6; color: var(--ink, #1a1814);
}
.wiki-preview h1 { font-family: var(--serif, Fraunces); font-size: 24px; margin: 16px 0 10px; color: var(--cognac, #a16f3a); font-weight: 400; }
.wiki-preview h2 { font-family: var(--serif, Fraunces); font-size: 19px; margin: 14px 0 8px; color: var(--cognac, #a16f3a); font-weight: 400; }
.wiki-preview h3 { font-size: 16px; margin: 12px 0 6px; color: var(--ink, #1a1814); font-weight: 600; }
.wiki-preview p { margin: 0 0 12px; }
.wiki-preview ul, .wiki-preview ol { margin: 0 0 12px; padding-left: 22px; }
.wiki-preview li { margin: 2px 0; }
.wiki-preview code { background: var(--ivory-warm, #faf6f0); padding: 1px 5px; border-radius: 3px; font-family: ui-monospace, monospace; font-size: 12px; }
.wiki-preview pre { background: var(--ivory-warm, #faf6f0); padding: 12px 14px; border-radius: 6px; overflow-x: auto; margin: 0 0 12px; }
.wiki-preview pre code { background: none; padding: 0; }
.wiki-preview a { color: var(--cognac, #a16f3a); }
.wiki-preview hr { border: 0; border-top: 1px solid var(--line, #e8dfd1); margin: 18px 0; }
.wiki-preview blockquote { border-left: 3px solid var(--cognac, #a16f3a); padding: 4px 14px; margin: 0 0 12px; color: var(--ink-soft, #7a6a55); font-style: italic; }
@media (max-width: 900px) {
  .wiki-shell { grid-template-columns: 1fr; height: auto; }
  .wiki-sidebar { border-right: 0; border-bottom: 1px solid var(--line, #e8dfd1); max-height: 40vh; }
  .wiki-edit { grid-template-columns: 1fr; }
  .wiki-textarea { min-height: 280px; }
}

/* v84 — Galerie pro CTA card (espace marié /c/<slug>) */
.gallery-cta-card {
  display: flex; align-items: center; gap: 18px;
  padding: 22px 26px; margin: 18px 0 24px;
  background: linear-gradient(135deg, var(--cognac, #a16f3a) 0%, var(--cognac-deep, #8a5d2f) 100%);
  color: var(--ivory, #faf6f0); text-decoration: none;
  border-radius: 16px; box-shadow: 0 8px 24px rgba(161, 111, 58, 0.25);
  transition: transform .15s, box-shadow .2s;
}
.gallery-cta-card:hover { transform: translateY(-3px); box-shadow: 0 12px 32px rgba(161, 111, 58, 0.35); }
.gallery-cta-card__icon { font-size: 38px; line-height: 1; flex-shrink: 0; }
.gallery-cta-card__body { flex: 1; min-width: 0; }
.gallery-cta-card__eyebrow {
  font-size: 11px; letter-spacing: .18em; text-transform: uppercase;
  opacity: .85; font-weight: 600; margin-bottom: 4px;
}
.gallery-cta-card__title {
  font-family: var(--serif, 'Fraunces', Georgia, serif);
  font-size: 22px; font-weight: 500; line-height: 1.2; margin-bottom: 6px;
}
.gallery-cta-card__sub { font-size: 13.5px; line-height: 1.45; opacity: .92; }
.gallery-cta-card__chev { font-size: 28px; flex-shrink: 0; opacity: .8; }
@media (max-width: 560px) {
  .gallery-cta-card { padding: 18px 18px; gap: 14px; flex-wrap: nowrap; }
  .gallery-cta-card__icon { font-size: 30px; }
  .gallery-cta-card__title { font-size: 18px; }
  .gallery-cta-card__sub { font-size: 12.5px; }
  .gallery-cta-card__chev { font-size: 22px; }
}

/* Bouton ✕ Supprimer couple — top-right de la couple-card-wrap, discret par défaut, visible hover. */
.couple-card__del-btn {
  position: absolute; top: 8px; right: 8px;
  width: 28px; height: 28px; border-radius: 50%;
  background: rgba(161, 74, 58, 0.85); color: #fff;
  border: 0; font-size: 13px; line-height: 28px; padding: 0;
  cursor: pointer; opacity: 0.4; transition: opacity .15s, transform .15s, background .15s;
  z-index: 5;
}
.couple-card-wrap:hover .couple-card__del-btn,
.couple-card__del-btn:focus { opacity: 1; }
.couple-card__del-btn:hover { background: #a14a3a; transform: scale(1.1); }
@media (max-width: 640px) {
  .couple-card__del-btn { opacity: 1; width: 26px; height: 26px; font-size: 12px; line-height: 26px; }
}
/* Bouton archiver/désarchiver (à gauche du ✕) */
.couple-card__archive-btn {
  position: absolute; top: 8px; right: 42px;
  width: 28px; height: 28px; border-radius: 50%;
  background: rgba(122, 104, 80, 0.85); color: #fff;
  border: 0; font-size: 13px; line-height: 28px; padding: 0;
  cursor: pointer; opacity: 0.4; transition: opacity .15s, transform .15s, background .15s;
  z-index: 5;
}
.couple-card-wrap:hover .couple-card__archive-btn,
.couple-card__archive-btn:focus { opacity: 1; }
.couple-card__archive-btn:hover { background: #6b5a44; transform: scale(1.1); }
@media (max-width: 640px) {
  .couple-card__archive-btn { opacity: 1; width: 26px; height: 26px; font-size: 12px; line-height: 26px; right: 40px; }
}

/* ===== v90 — Lightbox guest_uploads côté espace couple ===== */
.couple-lb-overlay {
  position: fixed; inset: 0;
  background: rgba(10, 8, 6, 0.94);
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  z-index: 99999;
  animation: cu-lb-fade-in 180ms ease-out;
}
@keyframes cu-lb-fade-in { from { opacity: 0; } to { opacity: 1; } }
.couple-lb-stage {
  display: flex; flex-direction: column; align-items: center; gap: 14px;
  max-width: 96vw;
}
.couple-lb-media img, .couple-lb-media video {
  display: block;
  box-shadow: 0 24px 60px rgba(0,0,0,0.5);
}
.couple-lb-meta {
  display: flex; gap: 14px; align-items: center;
  color: #f0e6d4; font-size: 13px;
  font-family: "Inter", -apple-system, sans-serif;
}
.couple-lb-name { font-weight: 600; color: #d4b87a; }
.couple-lb-date { color: rgba(240, 230, 212, 0.7); }
.couple-lb-pos { color: rgba(240, 230, 212, 0.5); margin-left: auto; }
.couple-lb-close, .couple-lb-prev, .couple-lb-next {
  position: fixed;
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  border: 0; width: 48px; height: 48px;
  border-radius: 50%;
  font-size: 24px; line-height: 1;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: background 150ms ease;
}
.couple-lb-close:hover, .couple-lb-prev:hover, .couple-lb-next:hover {
  background: rgba(255, 255, 255, 0.2);
}
.couple-lb-close { top: 18px; right: 18px; }
.couple-lb-prev { left: 18px; top: 50%; transform: translateY(-50%); }
.couple-lb-next { right: 18px; top: 50%; transform: translateY(-50%); }
.couple-lb-dl {
  position: fixed; bottom: 28px; left: 50%; transform: translateX(-50%);
  background: #a16f3a; color: #fff;
  padding: 12px 24px; border-radius: 999px;
  text-decoration: none;
  font-family: "Inter", -apple-system, sans-serif; font-size: 14px; font-weight: 500;
  box-shadow: 0 8px 24px rgba(161, 111, 58, 0.4);
  transition: transform 150ms ease, background 150ms ease;
}
.couple-lb-dl:hover { background: #b58446; transform: translateX(-50%) translateY(-2px); }
@media (max-width: 640px) {
  .couple-lb-close, .couple-lb-prev, .couple-lb-next { width: 40px; height: 40px; font-size: 20px; }
  .couple-lb-close { top: 12px; right: 12px; }
  .couple-lb-prev { left: 8px; }
  .couple-lb-next { right: 8px; }
  .couple-lb-meta { font-size: 11px; padding: 0 8px; flex-wrap: wrap; }
  .couple-lb-dl { bottom: 18px; padding: 10px 18px; font-size: 13px; }
}

/* v90 — Fix iOS Safari : <input type=file hidden> empêchait le change event de
   fire sur certains iOS. CSS pseudo-hidden = input accessible aux APIs file
   mais invisible visuellement. */
.gu-file-hidden {
  position: absolute !important;
  left: -9999px;
  top: 0;
  width: 1px;
  height: 1px;
  opacity: 0;
  overflow: hidden;
  pointer-events: none;
}

/* v90 — Empêche "Enregistrer l'image" via long-press iOS/Android et clic droit
   desktop sur les photos invités. Force le passage par le bouton "Télécharger"
   qui sert le HD original (pas la version compressée). */
.qr-card img, .shared-card img, .couple-lb-media img {
  -webkit-touch-callout: none;
  -webkit-user-select: none;
  -moz-user-select: none;
  user-select: none;
  -webkit-user-drag: none;
  -khtml-user-drag: none;
  -moz-user-drag: none;
  -o-user-drag: none;
  pointer-events: none; /* clic passe au parent (lightbox open ou backdrop) */
}
/* Vidéos : on ne met PAS pointer-events:none (sinon les controls natifs ne
   répondent plus). Juste touch-callout + draggable false côté HTML. */
.couple-lb-media video {
  -webkit-touch-callout: none;
  -webkit-user-select: none;
  user-select: none;
}
.qr-card, .shared-card {
  -webkit-touch-callout: none;
  -webkit-user-select: none;
  user-select: none;
}

/* ===== Modale CGV avant paiement (PR1 mariage Jays) ===== */
.cgv-overlay {
  position: fixed; inset: 0; z-index: 9999;
  background: rgba(40, 30, 20, 0.5);
  display: flex; align-items: center; justify-content: center; padding: 20px;
  animation: cgvFade 0.18s ease;
}
@keyframes cgvFade { from { opacity: 0; } to { opacity: 1; } }
.cgv-modal {
  background: var(--ivory, #fff); border: 1px solid var(--line);
  border-radius: 16px; padding: 26px 24px; max-width: 420px; width: 100%;
  box-shadow: 0 20px 60px rgba(0,0,0,0.25);
}
.cgv-modal__title {
  font-family: var(--serif, Georgia, serif); font-weight: 400;
  font-size: 22px; margin: 0 0 18px; color: var(--ink, #2a2018);
}
.cgv-check { display: flex; gap: 12px; align-items: flex-start; cursor: pointer; font-size: 15px; line-height: 1.5; color: var(--ink, #2a2018); }
.cgv-check input { width: 22px; height: 22px; margin-top: 1px; flex-shrink: 0; accent-color: var(--cognac); cursor: pointer; }
.cgv-check a { text-decoration: underline; }
.cgv-modal__actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 24px; }
.cgv-modal__actions .btn[disabled] { opacity: 0.45; cursor: not-allowed; }

/* ============================================================
   MODE TERRAIN (v99) — session JB. Mobile-first : JB est en mariage,
   sur téléphone, souvent en plein soleil → gros contrastes, gros taps.
   ============================================================ */
.terrain-badge { font-weight: 600; color: var(--cognac); white-space: nowrap; }
.terrain-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 18px; flex-wrap: wrap; }
.terrain-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 14px; }
.terrain-card { display: block; background: var(--paper); border: 1px solid var(--line); border-radius: 14px; padding: 16px 18px; text-decoration: none; color: var(--ink); transition: transform .12s ease, box-shadow .12s ease; }
a.terrain-card:hover { transform: translateY(-2px); box-shadow: 0 6px 18px rgba(26,24,20,.08); }
.terrain-card__top { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 8px; }
.terrain-card__names { font-family: var(--serif); font-size: 21px; line-height: 1.2; color: var(--ink); text-decoration: none; display: block; }
.terrain-card__meta { color: var(--ink-muted); font-size: 13px; margin-top: 4px; }
.terrain-kind { font-size: 11px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; padding: 3px 9px; border-radius: 999px; background: var(--ivory, #f5f0e8); color: var(--ink-soft); }
.terrain-kind--pb { background: #eee6f7; color: #5b3a8a; }
.terrain-kind--wed { background: #f3ead9; color: var(--cognac-deep); }
.terrain-jx { font-size: 12px; font-weight: 700; padding: 3px 10px; border-radius: 999px; background: var(--line-soft); color: var(--ink-soft); }
.terrain-jx--soon { background: #f3e3c2; color: #7a522a; }
.terrain-jx--today { background: #b3402f; color: #fff; animation: terrainPulse 1.6s ease-in-out infinite; }
.terrain-jx--past { background: var(--line-soft); color: var(--ink-faint); }
@keyframes terrainPulse { 50% { opacity: .75; } }
.terrain-couple-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; margin-bottom: 18px; flex-wrap: wrap; }
.terrain-contacts { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.terrain-contacts a { display: inline-block; padding: 8px 14px; border: 1px solid var(--line); border-radius: 999px; background: var(--paper); color: var(--ink); text-decoration: none; font-size: 13px; font-weight: 500; }
.terrain-tiles { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-bottom: 20px; }
.terrain-tile { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 16px 8px; background: var(--paper); border: 1px solid var(--line); border-radius: 14px; text-decoration: none; color: var(--ink); font-weight: 600; font-size: 14px; text-align: center; }
.terrain-tile span { font-size: 28px; }
.terrain-tile em { font-style: normal; font-weight: 400; color: var(--ink-muted); font-size: 12px; }
.terrain-tile:active { transform: scale(.97); }
.terrain-section { margin-bottom: 18px; scroll-margin-top: 80px; }
.terrain-prep { background: var(--ivory, #f7f2e9); border-radius: 10px; padding: 10px 14px; font-size: 13px; margin: 10px 0 14px; }
.terrain-prep span { display: inline-block; }
.terrain-timeline { display: flex; flex-direction: column; gap: 0; margin-top: 10px; }
.terrain-slot { display: flex; gap: 14px; padding: 10px 0; border-bottom: 1px dashed var(--line-soft); }
.terrain-slot:last-child { border-bottom: none; }
.terrain-slot__time { font-variant-numeric: tabular-nums; font-weight: 700; font-size: 16px; color: var(--cognac-deep); min-width: 52px; }
.terrain-slot__body strong { font-size: 15px; }
.terrain-slot__loc { font-size: 13px; color: var(--ink-muted); margin-top: 2px; }
.terrain-waze { font-size: 12px; font-weight: 600; color: #2a6db5; text-decoration: none; margin-left: 6px; white-space: nowrap; }
.terrain-vendor { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 9px 0; border-bottom: 1px dashed var(--line-soft); font-size: 14px; }
.terrain-vendor:last-child { border-bottom: none; }
.terrain-vendor__role { font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: .04em; color: var(--ink-muted); min-width: 86px; }
.terrain-vendor a { color: var(--cognac-deep); text-decoration: none; font-weight: 500; }
.terrain-vendors summary { cursor: pointer; font-size: 13px; font-weight: 600; color: var(--cognac-deep); padding: 6px 0; }
.terrain-photos-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.terrain-live { font-size: 11px; font-weight: 700; color: #b3402f; letter-spacing: .05em; text-transform: uppercase; }
.terrain-live.is-tick { color: #2e7d32; }
.terrain-photos-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 6px; margin-top: 12px; }
.terrain-photo { display: block; aspect-ratio: 1; border-radius: 8px; overflow: hidden; background: var(--line-soft); position: relative; border: none; padding: 0; cursor: pointer; width: 100%; }
.terrain-photo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.terrain-photo__video { display: flex; align-items: center; justify-content: center; width: 100%; height: 100%; font-size: 26px; }
.terrain-card--static .terrain-card__names:hover { text-decoration: underline; }
@media (max-width: 560px) {
  .terrain-tiles { gap: 8px; }
  .terrain-tile span { font-size: 24px; }
  .terrain-card__names { font-size: 19px; }
  .terrain-couple-head { flex-direction: column; }
}
/* v99.1 — chips @ Instagram copiables (mode terrain) */
.terrain-ig { border: 1px solid var(--line); background: var(--ivory, #f7f2e9); color: var(--cognac-deep); border-radius: 999px; padding: 4px 12px; font-size: 13px; font-weight: 600; cursor: pointer; font-family: inherit; }
.terrain-ig:active { transform: scale(.95); background: var(--line-soft); }
/* v99.2 — recherche mode terrain */
.terrain-search { margin-bottom: 14px; font-size: 16px; padding: 12px 14px; width: 100%; }
/* v99.5 — autocomplete répertoire prestataires (fiche couple, onglet prestas) */
.vendor-suggest { position: absolute; top: 100%; left: 0; right: 0; z-index: 40; background: var(--paper); border: 1px solid var(--line); border-radius: 10px; box-shadow: 0 8px 24px rgba(26,24,20,.12); overflow: hidden; }
.vendor-suggest__item { display: block; width: 100%; text-align: left; padding: 10px 12px; border: none; background: none; cursor: pointer; font-size: 13px; font-family: inherit; border-bottom: 1px solid var(--line-soft); }
.vendor-suggest__item:last-child { border-bottom: none; }
.vendor-suggest__item:hover { background: var(--ivory, #f7f2e9); }
/* v99.6 — photos indispensables (mode terrain) */
.terrain-shot { display: flex; align-items: center; gap: 12px; width: 100%; text-align: left; border: none; background: none; padding: 11px 0; border-bottom: 1px dashed var(--line-soft); cursor: pointer; font-family: inherit; font-size: 14px; color: var(--ink); }
.terrain-shot:last-child { border-bottom: none; }
.terrain-shot__check { font-size: 18px; line-height: 1; }
.terrain-shot.is-done .terrain-shot__body strong { text-decoration: line-through; color: var(--ink-muted); }
.terrain-shot__body strong { display: inline-block; }
.terrain-shot-add { display: flex; gap: 8px; margin-top: 12px; }
.terrain-shot-add .input { flex: 1; font-size: 16px; }
/* v99.7 — must_shots des mariés (textes longs) + à éviter */
.terrain-shot__body--long strong { font-weight: 500; white-space: pre-line; }
.terrain-avoid { margin-top: 16px; background: #fdf0ee; border: 1px solid #f0cfc7; border-radius: 10px; padding: 12px 14px; font-size: 13px; }
.terrain-avoid__item { margin-top: 6px; white-space: pre-line; }
/* v99.8 — badge prestation photo/vidéo/drone (mode terrain) */
.terrain-kind--svc { background: #e8eef5; color: #2a4d7a; }
