:root {
  --wine: #520006;
  --red: #d90c1e;
  --rose: #d09989;
  --blush: #efdcd6;
  --taupe: #aaa190;
  --ink: #241c1d;
  --muted: #756b6d;
  --line: rgba(82, 0, 6, 0.1);
  --surface: rgba(255, 255, 255, 0.93);
  --canvas: #f9f6f5;
  --success: #18855b;
  --warning: #b47416;
  --shadow-sm: 0 8px 24px rgba(82, 0, 6, 0.06);
  --shadow-lg: 0 28px 70px rgba(82, 0, 6, 0.14);
  --radius: 20px;
  --sidebar: 278px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--ink);
  background:
    radial-gradient(circle at 95% 0%, rgba(208, 153, 137, 0.18), transparent 28rem),
    linear-gradient(135deg, #fbf9f8, #f7f3f2 60%, #fbf7f5);
  font-family: "Figtree", system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
}
button, input, textarea, select { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
a { color: inherit; text-decoration: none; }
button { color: inherit; }

.auth-shell { min-height: 100vh; display: grid; place-items: center; padding: 32px 18px; background: radial-gradient(circle at 15% 10%, rgba(239,220,214,.9), transparent 30rem), linear-gradient(135deg,#fff,#f8f1ef); }
.auth-card { width: min(500px,100%); padding: clamp(30px,6vw,54px); border: 1px solid var(--line); border-radius: 30px; background: rgba(255,255,255,.9); box-shadow: var(--shadow-lg); backdrop-filter: blur(18px); }
.auth-card > .brand-mark { margin-bottom: 28px; }
.auth-card h1 { margin: 6px 0 14px; color: var(--wine); font: 600 clamp(36px,6vw,55px)/1.03 "Playfair Display",serif; }
.auth-card h1 em { color: var(--red); font-weight: 600; }
.auth-form { display: grid; gap: 16px; margin-top: 28px; }
.auth-form .btn { justify-content: center; margin-top: 4px; }
.auth-notice { margin-top: 20px; padding: 12px 14px; border-radius: 12px; color: var(--wine); background: var(--blush); font-size: 14px; }
.signup-panel { margin-top: 22px; padding-top: 18px; border-top: 1px solid var(--line); }
.signup-panel summary { cursor: pointer; color: var(--wine); font-weight: 700; }
.auth-foot { display: block; margin-top: 25px; color: var(--muted); text-align: center; }

.app-shell {
  --ink: color-mix(in srgb, var(--wine) 58%, #171314);
  --muted: color-mix(in srgb, var(--taupe) 72%, var(--ink));
  --line: color-mix(in srgb, var(--wine) 11%, transparent);
  --surface: color-mix(in srgb, var(--blush) 10%, white);
  --canvas: color-mix(in srgb, var(--blush) 24%, white);
  min-height: 100vh;
  color: var(--ink);
  font-family: var(--ui-font, "Figtree", system-ui, sans-serif);
  background: radial-gradient(circle at 95% 0%, color-mix(in srgb,var(--rose) 20%,transparent), transparent 28rem), linear-gradient(135deg,var(--canvas),color-mix(in srgb,var(--blush) 16%,white));
}
.sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  z-index: 40;
  width: var(--sidebar);
  display: flex;
  flex-direction: column;
  padding: 24px 18px;
  background: color-mix(in srgb,var(--surface) 94%,transparent);
  border-right: 1px solid var(--line);
  backdrop-filter: blur(20px);
  overflow-x: hidden;
  overflow-y: scroll;
  overscroll-behavior: contain;
  scrollbar-gutter: stable;
  scrollbar-width: thin;
  scrollbar-color: var(--rose) color-mix(in srgb,var(--blush) 24%,white);
  transition: width 220ms ease, padding 220ms ease, transform 220ms ease;
}
.sidebar::-webkit-scrollbar { width: 9px; }
.sidebar::-webkit-scrollbar-track { background: color-mix(in srgb,var(--blush) 24%,white); }
.sidebar::-webkit-scrollbar-thumb { border: 2px solid color-mix(in srgb,var(--blush) 24%,white); border-radius: 999px; background: var(--rose); }
.brand { display: flex; align-items: center; gap: 12px; padding: 0 10px 25px; }
.brand-mark {
  width: 42px; height: 42px; border-radius: calc(var(--radius) * .7);
  display: grid; place-items: center;
  color: white; background: linear-gradient(145deg, var(--wine), var(--red));
  box-shadow: 0 12px 26px rgba(82, 0, 6, 0.22);
}
.brand-mark svg { width: 22px; }
.brand strong { display: block; font-size: 15px; letter-spacing: -0.02em; }
.brand small { display: block; margin-top: 2px; color: var(--muted); font-size: 11px; }
.nav-section-label { margin: 13px 12px 7px; color: var(--taupe); font-size: 10px; font-weight: 800; letter-spacing: .14em; }
.nav { display: grid; gap: 5px; }
.nav-link {
  display: flex; align-items: center; gap: 12px;
  min-height: 46px; padding: 0 13px;
  border-radius: calc(var(--radius) * .65); color: var(--muted);
  font-size: 14px; font-weight: 600;
  transition: all 160ms ease;
}
.nav-link svg { width: 19px; height: 19px; stroke-width: 1.8; }
.nav-link:hover { color: var(--wine); background: rgba(239, 220, 214, .42); transform: translateX(2px); }
.nav-link.active { color: var(--wine); background: var(--blush); box-shadow: inset 3px 0 var(--red); }
.nav-count { margin-left: auto; min-width: 22px; height: 22px; padding: 0 6px; display: grid; place-items: center; border-radius: 20px; background: var(--surface); color: var(--red); font-size: 11px; }
.sidebar-footer { margin-top: auto; }
.wedding-chip { padding: 14px; border: 1px solid var(--line); border-radius: calc(var(--radius) * .8); background: var(--canvas); }
.wedding-chip small { color: var(--muted); }
.wedding-chip strong { display: block; margin-top: 4px; font-size: 13px; }
.main { min-height: 100vh; margin-left: var(--sidebar); transition: margin-left 220ms ease; }
.topbar {
  position: sticky; top: 0; z-index: 30;
  height: 76px; display: flex; align-items: center; gap: 16px;
  padding: 0 clamp(22px, 4vw, 52px);
  border-bottom: 1px solid rgba(82, 0, 6, .07);
  background: color-mix(in srgb,var(--canvas) 82%,transparent); backdrop-filter: blur(18px);
}
.menu-btn { display: grid; }
.sidebar-collapsed .sidebar { width: 78px; padding-inline: 10px; }
.sidebar-collapsed .main { margin-left: 78px; }
.sidebar-collapsed .brand { justify-content: center; padding-inline: 0; }
.sidebar-collapsed .brand > span:last-child,
.sidebar-collapsed .nav-section-label,
.sidebar-collapsed .nav-link > span,
.sidebar-collapsed .nav-count,
.sidebar-collapsed .sidebar-footer { display: none; }
.sidebar-collapsed .nav-link { justify-content: center; padding-inline: 0; }
.sidebar-collapsed .nav-link:hover { transform: none; }
.app-shell .btn,
.app-shell .icon-btn,
.app-shell .field,
.app-shell select,
.app-shell textarea { border-radius: calc(var(--radius) * .65); }
.breadcrumb { color: var(--muted); font-size: 13px; font-weight: 600; }
.top-actions { display: flex; align-items: center; gap: 10px; margin-left: auto; }
.icon-btn {
  width: 42px; height: 42px; display: grid; place-items: center;
  border: 1px solid var(--line); border-radius: 13px; background: rgba(255,255,255,.72); cursor: pointer;
}
.icon-btn:hover { background: white; color: var(--red); box-shadow: var(--shadow-sm); }
.icon-btn svg { width: 19px; }
.avatar { width: 42px; height: 42px; display: grid; place-items: center; border-radius: 14px; color: white; background: linear-gradient(145deg, var(--rose), var(--wine)); font-weight: 700; }
.content { width: min(1440px, 100%); margin: 0 auto; padding: 34px clamp(22px, 4vw, 52px) 64px; }
.eyebrow { margin: 0 0 8px; color: var(--red); font-size: 11px; font-weight: 800; letter-spacing: .15em; text-transform: uppercase; }
h1, h2, h3, p { margin-top: 0; }
h1 { margin-bottom: 10px; font-size: clamp(28px, 4vw, 43px); line-height: 1.06; letter-spacing: -.04em; }
h2 { margin-bottom: 6px; font-size: 20px; letter-spacing: -.02em; }
h3 { font-size: 15px; }
.lead { max-width: 750px; color: var(--muted); line-height: 1.65; }
.page-header { display: flex; justify-content: space-between; gap: 24px; align-items: flex-end; margin-bottom: 30px; }
.page-header-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.btn {
  min-height: 44px; display: inline-flex; align-items: center; justify-content: center; gap: 9px;
  padding: 0 17px; border: 1px solid transparent; border-radius: 13px; cursor: pointer;
  font-size: 13px; font-weight: 750; transition: transform 150ms ease, box-shadow 150ms ease, background 150ms ease;
}
.btn:hover { transform: translateY(-1px); }
.btn svg { width: 17px; height: 17px; }
.btn-primary { color: white; background: linear-gradient(135deg, var(--wine), color-mix(in srgb,var(--wine) 62%,var(--red))); box-shadow: 0 10px 24px color-mix(in srgb,var(--wine) 20%,transparent); }
.btn-primary:hover { box-shadow: 0 14px 30px rgba(82,0,6,.28); }
.btn-red { color: white; background: var(--red); }
.btn-secondary { color: var(--wine); background: var(--surface); border-color: var(--line); }
.btn-danger { color: #a30a17; background: #fff; border-color: rgba(163,10,23,.25); }
.btn-danger:hover { color: white; background: #a30a17; box-shadow: 0 10px 24px rgba(163,10,23,.18); }
.btn-ghost { color: var(--muted); background: transparent; }
.btn-small { min-height: 36px; padding: 0 12px; border-radius: 10px; }
.grid { display: grid; gap: 20px; }
.grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.dashboard-grid { grid-template-columns: minmax(0, 1.65fr) minmax(310px, .8fr); align-items: start; }
.card { padding: 22px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); box-shadow: var(--shadow-sm); }
.card-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 15px; margin-bottom: 20px; }
.card-head p { margin: 4px 0 0; color: var(--muted); font-size: 13px; }
.hero {
  position: relative; min-height: 255px; overflow: hidden; display: flex; align-items: flex-end;
  padding: 34px; color: white; border: 0;
  background:
    linear-gradient(90deg, rgba(51,0,4,.95), rgba(82,0,6,.78) 55%, rgba(82,0,6,.23)),
    radial-gradient(circle at 82% 24%, #d09989, transparent 27%),
    linear-gradient(135deg, #520006, #d90c1e);
  box-shadow: var(--shadow-lg);
}
.hero::before, .hero::after { content: ""; position: absolute; border: 1px solid rgba(255,255,255,.22); border-radius: 50%; }
.hero::before { width: 280px; height: 280px; right: -50px; top: -110px; }
.hero::after { width: 190px; height: 190px; right: 70px; bottom: -100px; }
.hero-content { position: relative; z-index: 1; max-width: 630px; }
.hero .eyebrow { color: #f2c9bf; }
.hero h1 { max-width: 590px; font-family: "Playfair Display", serif; font-size: clamp(34px, 5vw, 54px); font-style: italic; font-weight: 600; }
.hero p { color: rgba(255,255,255,.78); }
.hero-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 22px; }
.hero .btn-secondary { color: white; background: rgba(255,255,255,.12); border-color: rgba(255,255,255,.25); backdrop-filter: blur(10px); }
.stat-card { display: flex; align-items: center; gap: 15px; }
.stat-icon { width: 46px; height: 46px; flex: 0 0 auto; display: grid; place-items: center; border-radius: 15px; color: var(--wine); background: var(--blush); }
.stat-icon svg { width: 21px; }
.stat-number { display: block; font-size: 26px; font-weight: 800; letter-spacing: -.04em; }
.stat-label { display: block; color: var(--muted); font-size: 12px; }
.stat-card .help { display: block; margin-top: 4px; }
.progress-row { display: flex; justify-content: space-between; margin-bottom: 8px; color: var(--muted); font-size: 12px; }
.progress { height: 8px; overflow: hidden; border-radius: 10px; background: #eee9e8; }
.progress span { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--rose), var(--red)); }
.checklist { display: grid; gap: 5px; margin-top: 18px; }
.check-item { display: flex; align-items: center; gap: 12px; padding: 11px 8px; border-radius: 12px; }
.check-item:hover { background: #fbf7f5; }
.check-dot { width: 24px; height: 24px; display: grid; place-items: center; border: 1px solid #d9d0d1; border-radius: 50%; color: white; }
.check-item.done .check-dot { border-color: var(--success); background: var(--success); }
.check-item strong { display: block; font-size: 13px; }
.check-item small { color: var(--muted); }
.quick-actions { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.quick-action { padding: 17px; border: 1px solid var(--line); border-radius: 16px; background: var(--surface); cursor: pointer; transition: all 160ms ease; }
.quick-action:hover { border-color: rgba(217,12,30,.25); transform: translateY(-2px); box-shadow: var(--shadow-sm); }
.quick-action .stat-icon { width: 39px; height: 39px; margin-bottom: 12px; }
.quick-action strong { display: block; font-size: 13px; }
.quick-action small { color: var(--muted); font-size: 11px; }
.stack { display: grid; gap: 20px; }
.section-title { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin: 30px 0 14px; }
.section-title h2 { margin: 0; }
.table-wrap { overflow: auto; border: 1px solid var(--line); border-radius: 18px; background: var(--surface); }
table { width: 100%; border-collapse: collapse; }
th { padding: 14px 17px; color: var(--muted); background: var(--canvas); font-size: 10px; letter-spacing: .1em; text-align: left; text-transform: uppercase; }
td { padding: 15px 17px; border-top: 1px solid var(--line); font-size: 13px; }
tbody tr:hover { background: rgba(239,220,214,.18); }
.person { display: flex; align-items: center; gap: 11px; }
.person-avatar { width: 36px; height: 36px; display: grid; place-items: center; border-radius: 11px; color: var(--wine); background: var(--blush); font-size: 12px; font-weight: 800; }
.badge { display: inline-flex; align-items: center; gap: 5px; padding: 5px 9px; border-radius: 20px; background: #f1ecea; color: #716668; font-size: 11px; font-weight: 700; }
.badge.success { color: #126443; background: #e6f4ee; }
.badge.danger { color: #a30a17; background: #fdebed; }
.badge.warning { color: #8a5610; background: #fff3dd; }
.toolbar { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 18px; }
.search { position: relative; flex: 1; min-width: 220px; }
.search svg { position: absolute; left: 14px; top: 13px; width: 17px; color: var(--muted); }
.field, .search input, select, textarea {
  width: 100%; min-height: 44px; padding: 0 14px; border: 1px solid var(--line); border-radius: 12px; outline: none; background: var(--surface); color: var(--ink);
  transition: border 150ms ease, box-shadow 150ms ease;
}
.search input { padding-left: 42px; }
textarea { min-height: 110px; padding-top: 12px; resize: vertical; }
.field:focus, .search input:focus, select:focus, textarea:focus { border-color: var(--rose); box-shadow: 0 0 0 4px rgba(208,153,137,.17); }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.form-group { display: grid; gap: 7px; }
.form-group.full { grid-column: 1 / -1; }
.form-group label { color: #5e5355; font-size: 12px; font-weight: 700; }
.help { color: var(--muted); font-size: 11px; }
.color-field { display: flex; align-items: center; gap: 9px; }
.color-field input[type=color] { width: 44px; height: 44px; padding: 3px; border: 1px solid var(--line); border-radius: 12px; background: white; }
.form-actions { grid-column: 1 / -1; display: flex; justify-content: flex-end; gap: 10px; padding-top: 8px; }
.empty { padding: 46px 25px; text-align: center; }
.empty .stat-icon { margin: 0 auto 16px; }
.empty p { max-width: 430px; margin: 8px auto 20px; color: var(--muted); }
.timeline { display: grid; gap: 2px; }
.timeline-item { position: relative; display: grid; grid-template-columns: 86px 1fr; gap: 20px; padding: 15px 0; }
.timeline-item:not(:last-child)::after { content: ""; position: absolute; left: 96px; top: 43px; bottom: -10px; width: 1px; background: var(--line); }
.timeline-time { color: var(--red); font-weight: 800; }
.timeline-event { padding-left: 20px; position: relative; }
.timeline-event::before { content: ""; position: absolute; left: -5px; top: 4px; width: 10px; height: 10px; border: 3px solid white; border-radius: 50%; background: var(--red); box-shadow: 0 0 0 1px var(--rose); }
.timeline-event p { margin: 4px 0 0; color: var(--muted); font-size: 12px; }
.budget-bar { display: flex; height: 12px; overflow: hidden; border-radius: 10px; background: #ece7e5; }
.budget-bar span:nth-child(1) { background: var(--wine); }
.budget-bar span:nth-child(2) { background: var(--red); }
.budget-bar span:nth-child(3) { background: var(--rose); }
.budget-line { display: flex; justify-content: space-between; align-items: center; padding: 13px 0; border-bottom: 1px solid var(--line); }
.budget-line:last-child { border-bottom: 0; }
.budget-line small { color: var(--muted); }
.first-wedding { display:flex; align-items:center; justify-content:space-between; gap:24px; margin-bottom:20px; border-color:color-mix(in srgb,var(--red) 22%,transparent); background:linear-gradient(120deg,var(--surface),color-mix(in srgb,var(--blush) 36%,white)); }
.first-wedding p:last-child { margin:0; color:var(--muted); }
.wizard-steps { display:grid; grid-template-columns:repeat(3,1fr); gap:12px; margin:0 0 20px; }
.wizard-steps span { padding:14px; border-radius:14px; background:#eee8e6; color:var(--muted); font-weight:800; }
.wizard-steps span.active { color:white; background:var(--wine); }.wizard-steps small{margin-left:6px;font-weight:600}
.wizard-form h2 { padding-top:12px; color:var(--wine); }.template-grid.mini{grid-template-columns:repeat(4,minmax(0,1fr));}
.editor-layout { display:grid; grid-template-columns:minmax(0,1fr) 330px; gap:20px; align-items:start; }.editor-panel{position:sticky;top:96px}.editor-tabs{display:flex;gap:8px;margin-bottom:16px}.compact{grid-template-columns:1fr}.compact .form-group,.compact .form-actions{grid-column:auto}
.section-editor{display:grid;gap:7px}.section-editor>div{display:flex;justify-content:space-between;align-items:center;padding:10px 12px;border:1px solid var(--line);border-radius:11px;background:#fcfaf9}.section-editor button{width:28px;height:28px;border:0;border-radius:8px;background:white;cursor:pointer}
.template-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
.template-card { overflow: hidden; padding: 0; }
.template-card.selected{outline:2px solid var(--red);outline-offset:-2px}.template-preview { width:100%; min-height: 250px; border:0; display: grid; place-items: center; padding: 28px; color: var(--wine); text-align: center; background: linear-gradient(145deg, #fff, var(--blush)); cursor:pointer; }
.template-preview.dark { color: white; background: linear-gradient(145deg, #350004, var(--wine)); }
.template-preview.modern { background: linear-gradient(135deg, #ece8e5 50%, #fff 50%); }
.template-preview.art-deco{color:#f4d58b;background:linear-gradient(135deg,#260006,#70000b)}.template-preview.autumn{color:#713623;background:linear-gradient(145deg,#fff5e8,#d59a70)}.template-preview.midnight{color:#f3d8d0;background:radial-gradient(circle at 70% 20%,#8e1122,#101a36 55%)}.template-preview.boheme{color:#694c43;background:linear-gradient(145deg,#f8efe5,#d9c4ad)}.template-preview.caramel{color:#513127;background:linear-gradient(120deg,#f4d3a6,#b87347)}.template-preview.forest{color:#f5e8d0;background:linear-gradient(145deg,#173d34,#52725d)}.template-preview.winter{color:#56606b;background:linear-gradient(145deg,#fff,#dae3e8)}.template-preview.industrial{color:#f0e6df;background:linear-gradient(135deg,#323234 50%,#8e3038 50%)}.template-preview.japan{color:#171717;background:radial-gradient(circle at 78% 26%,#c51b28 0 9%,transparent 10%),#f7f1e7}.template-preview.english-garden{color:#57454c;background:linear-gradient(145deg,#f9e9ec,#c9d8bd)}.template-preview.kawaii{color:#8b4e5d;background:linear-gradient(135deg,#fff0f5,#e5dcfa)}.template-preview.digital{color:white;background:linear-gradient(135deg,#520006,#d90c1e,#d09989)}.template-preview.provence{color:#4c435f;background:linear-gradient(145deg,#fff8df,#c6b5d9)}.template-preview.romance{color:white;background:radial-gradient(circle,#d90c1e,#520006)}.template-preview.rose-modern{color:#4b3338;background:linear-gradient(90deg,#f0c8c3 50%,#fff 50%)}
.template-preview span { font-family: "Playfair Display", serif; font-size: 30px; font-style: italic; }
.template-meta { display: flex; justify-content: space-between; align-items: center; padding: 16px; }
.invitation-shell { min-height: 100vh; background: #f2e8e4; }
.invitation-page { max-width: 680px; min-height: 100vh; margin: 0 auto; padding: 24px; text-align: center; background: #fffaf8; box-shadow: 0 0 60px rgba(82,0,6,.15); }
.invitation-cover { position: relative; min-height: 530px; overflow: hidden; display: grid; place-items: center; padding: 50px 24px; border-radius: 220px 220px 24px 24px; color: white; background: linear-gradient(155deg, #350004, #72000a 52%, #d90c1e); background-size:cover;background-position:center; }
.invitation-cover::before { content: ""; position: absolute; inset: 16px; border: 1px solid rgba(255,255,255,.35); border-radius: inherit; }
.invitation-monogram { position: relative; font-family: "Playfair Display", serif; font-size: 78px; font-style: italic; }
.invitation-cover h1 { position: relative; margin-top: 25px; font-family: "Playfair Display", serif; font-size: 46px; font-style: italic; }
.invitation-cover p { position: relative; color: #efdcd6; letter-spacing: .04em; text-transform: none; }
.invitation-section { width:100%; box-sizing:border-box; padding: 50px var(--section-padding-x,20px); }
.invitation-section h2 { font-family: "Playfair Display", serif; font-size: 30px; font-style: italic; }
.font-cinzel .invitation-cover h1,.font-cinzel .invitation-section h2{font-family:"Cinzel","Times New Roman",serif;font-style:normal}.font-figtree .invitation-cover h1,.font-figtree .invitation-section h2{font-family:"Figtree",sans-serif;font-style:normal}.font-cormorant .invitation-cover h1,.font-cormorant .invitation-section h2{font-family:"Cormorant Garamond","Playfair Display",serif}.gallery-placeholder{display:grid;grid-template-columns:2fr 1fr 1fr;gap:8px;height:220px}.gallery-placeholder span{border-radius:14px;background:linear-gradient(145deg,var(--blush),var(--rose))}.gallery-placeholder span:first-child{grid-row:span 2}
.font-montserrat .invitation-cover h1,.font-montserrat .invitation-section h2{font-family:"Montserrat",sans-serif;font-style:normal}.font-poppins .invitation-cover h1,.font-poppins .invitation-section h2{font-family:"Poppins",sans-serif;font-style:normal}.font-italiana .invitation-cover h1,.font-italiana .invitation-section h2{font-family:"Italiana",serif;font-style:normal}.font-lato .invitation-cover h1,.font-lato .invitation-section h2{font-family:"Lato",sans-serif;font-style:normal}.font-marcellus .invitation-cover h1,.font-marcellus .invitation-section h2{font-family:"Marcellus",serif;font-style:normal}.font-manrope .invitation-cover h1,.font-manrope .invitation-section h2{font-family:"Manrope",sans-serif;font-style:normal}.font-libre-baskerville .invitation-cover h1,.font-libre-baskerville .invitation-section h2{font-family:"Libre Baskerville",serif}.font-bodoni-moda .invitation-cover h1,.font-bodoni-moda .invitation-section h2{font-family:"Bodoni Moda",serif}
.body-montserrat{font-family:"Montserrat",sans-serif}.body-poppins{font-family:"Poppins",sans-serif}.body-italiana{font-family:"Italiana",serif}.body-lato{font-family:"Lato",sans-serif}.body-marcellus{font-family:"Marcellus",serif}.body-manrope{font-family:"Manrope",sans-serif}.body-libre-baskerville{font-family:"Libre Baskerville",serif}.body-bodoni-moda{font-family:"Bodoni Moda",serif}
.title-case-uppercase h1,.title-case-uppercase h2,.title-case-uppercase h3{text-transform:uppercase}.title-case-lowercase h1,.title-case-lowercase h2,.title-case-lowercase h3{text-transform:lowercase}.title-case-normal h1,.title-case-normal h2,.title-case-normal h3{text-transform:none}.body-case-uppercase p,.body-case-uppercase small,.body-case-uppercase .eyebrow{text-transform:uppercase}.body-case-lowercase p,.body-case-lowercase small,.body-case-lowercase .eyebrow{text-transform:lowercase}.body-case-normal p,.body-case-normal small,.body-case-normal .eyebrow{text-transform:none}
.rsvp-box { padding: 26px; border: 1px solid rgba(82,0,6,.15); border-radius: 22px; background: white; text-align: left; }
.radio-group { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.radio-card { padding: 14px; border: 1px solid var(--line); border-radius: 12px; cursor: pointer; }
.radio-card:has(input:checked) { border-color: var(--red); background: #fff1f2; }
.modal-backdrop { position: fixed; inset: 0; z-index: 80; display: grid; place-items: center; padding: 20px; background: rgba(34,20,22,.48); backdrop-filter: blur(5px); }
.modal { width: min(620px, 100%); max-height: calc(100vh - 40px); overflow: auto; padding: 26px; border-radius: 23px; background: white; box-shadow: var(--shadow-lg); }
.modal-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 22px; }
.modal-head h2 { margin: 0; }
.toast-region { position: fixed; z-index: 100; right: 22px; bottom: 22px; display: grid; gap: 10px; }
.toast { min-width: 260px; padding: 14px 16px; color: white; border-radius: 13px; background: #241c1d; box-shadow: var(--shadow-lg); animation: toast-in 220ms ease both; }
@keyframes toast-in { from { opacity: 0; transform: translateY(10px); } }
.mobile-overlay { display: none; }

@media (max-width: 1180px) {
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .dashboard-grid { grid-template-columns: 1fr; }
  .quick-actions { grid-template-columns: repeat(2, 1fr); }
  .template-grid { grid-template-columns: repeat(2, 1fr); }
  .template-grid.mini{grid-template-columns:repeat(3,1fr)}
}
@media (max-width: 820px) {
  .sidebar-collapsed .sidebar { width: var(--sidebar); padding: 24px 18px; }
  .sidebar-collapsed .main { margin-left: 0; }
  .sidebar-collapsed .brand { justify-content: flex-start; padding: 0 10px 25px; }
  .sidebar-collapsed .brand > span:last-child,
  .sidebar-collapsed .nav-section-label,
  .sidebar-collapsed .sidebar-footer { display: block; }
  .sidebar-collapsed .nav-link > span { display: inline; }
  .sidebar-collapsed .nav-count { display: grid; }
  .sidebar-collapsed .nav-link { justify-content: flex-start; padding: 0 13px; }
  .sidebar { transform: translateX(-100%); }
  .sidebar.open { transform: translateX(0); box-shadow: var(--shadow-lg); }
  .mobile-overlay { position: fixed; inset: 0; z-index: 35; display: block; background: rgba(34,20,22,.28); }
  .main { margin-left: 0; }
  .menu-btn { display: grid; }
  .topbar { height: 68px; padding: 0 17px; }
  .content { padding: 25px 17px 50px; }
  .page-header { align-items: flex-start; flex-direction: column; }
  .page-header-actions { width: 100%; }
  .page-header-actions .btn { flex: 1; }
  .grid-3, .grid-2, .form-grid { grid-template-columns: 1fr; }
  .editor-layout{grid-template-columns:1fr}.editor-panel{position:static}.first-wedding{align-items:flex-start;flex-direction:column}
  .form-group.full, .form-actions { grid-column: auto; }
}
@media (max-width: 560px) {
  .grid-4, .quick-actions, .template-grid { grid-template-columns: 1fr; }
  .template-grid.mini{grid-template-columns:1fr 1fr}.wizard-steps small{display:block;margin:4px 0 0}
  .hero { min-height: 330px; padding: 26px 22px; }
  .hero h1 { font-size: 39px; }
  .card { padding: 18px; border-radius: 17px; }
  .top-actions .icon-btn:first-child { display: none; }
  .timeline-item { grid-template-columns: 65px 1fr; gap: 12px; }
  .timeline-item:not(:last-child)::after { left: 72px; }
  .table-wrap { margin-inline: -18px; border-radius: 0; border-inline: 0; }
  .radio-group { grid-template-columns: 1fr; }
  .invitation-page { padding: 12px; }
  .invitation-cover { min-height: 480px; }
}

/* Studio de création du faire-part */
.save-state { align-self: center; color: #39735a; font-size: 11px; font-weight: 700; }
.builder-shell { display: grid; grid-template-columns: minmax(0,1fr) 390px; gap: 20px; align-items: start; transition: grid-template-columns .3s ease; }
.builder-shell.tools-collapsed { grid-template-columns: minmax(0,1fr) 62px; }
.builder-tools { grid-column: 2; grid-row: 1; position: sticky; top: 94px; max-height: calc(100vh - 112px); overflow: hidden; padding: 0; transition: width .3s ease; }
.builder-tools-head { min-height: 58px; display:flex; align-items:center; justify-content:space-between; gap:12px; padding:9px 11px 9px 18px; border-bottom:1px solid var(--line); background:white; }
.builder-tools-head strong,.builder-tools-head small { display:block; }.builder-tools-head small { margin-top:2px; color:var(--muted); font-size:10px; }
.builder-tools.collapsed .builder-tools-head { height:100%; min-height:150px; justify-content:center; padding:9px; border-bottom:0; }
.builder-tools.collapsed .builder-tools-head > div { display:none; }
.builder-tabs { display: grid; grid-template-columns: repeat(6, 1fr); border-bottom: 1px solid var(--line); background: #fcfaf9; }
.builder-tabs button { min-width: 0; padding: 14px 4px 12px; border: 0; border-bottom: 2px solid transparent; background: transparent; color: var(--muted); cursor: pointer; font-size: 10px; font-weight: 750; }
.builder-tabs button.active { border-color: var(--red); color: var(--wine); background: white; }
.builder-panel { max-height: calc(100vh - 228px); overflow-x: hidden; overflow-y: scroll; padding: 22px; scrollbar-width: thin; scrollbar-color: var(--rose) #f4efed; scrollbar-gutter: stable; }
.builder-panel::-webkit-scrollbar,.preview-canvas::-webkit-scrollbar { width:10px; }.builder-panel::-webkit-scrollbar-track,.preview-canvas::-webkit-scrollbar-track { background:#f4efed; }.builder-panel::-webkit-scrollbar-thumb,.preview-canvas::-webkit-scrollbar-thumb { border:2px solid #f4efed; border-radius:10px; background:var(--rose); }
.panel-intro { grid-column: 1/-1; margin-bottom: 17px; }
.panel-intro h2 { font-family: "Playfair Display", serif; font-size: 26px; }
.panel-intro p:last-child { margin: 5px 0 0; color: var(--muted); font-size: 12px; line-height: 1.5; }
.section-editor.advanced > div { cursor: pointer; transition: border-color .15s, background .15s; }
.section-editor.advanced > div.selected { border-color: var(--rose); background: var(--blush); }
.section-editor.advanced > div > span:first-child { display: flex; align-items: center; gap: 9px; }
.section-editor.advanced i { width: 24px; height: 24px; display: grid; place-items: center; border-radius: 8px; background: white; color: var(--red); font-size: 10px; font-style: normal; }
.section-editor.advanced strong { font-size: 12px; }
.add-section { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 18px; padding-top: 17px; border-top: 1px solid var(--line); }
.add-section small { width: 100%; margin-bottom: 3px; color: var(--muted); font-weight: 700; }
.builder-stage { grid-column:1; grid-row:1; min-width: 0; overflow: hidden; border: 1px solid var(--line); border-radius: var(--radius); background: #e9e3e1; box-shadow: var(--shadow-sm); }
.preview-toolbar { min-height: 62px; display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 10px 16px; border-bottom: 1px solid var(--line); background: white; }
.preview-toolbar strong,.preview-toolbar small { display: block; }
.preview-toolbar small { margin-top: 2px; color: var(--muted); font-size: 10px; }
.device-switch { display: flex; padding: 3px; border-radius: 10px; background: #f2eeec; }
.device-switch button { width: 35px; height: 30px; border: 0; border-radius: 8px; background: transparent; color: var(--muted); cursor: pointer; }
.device-switch button.active { color: var(--wine); background: white; box-shadow: 0 2px 8px rgba(82,0,6,.1); }
.preview-canvas { height: calc(100vh - 174px); min-height: 620px; overflow-x: hidden; overflow-y: scroll; padding: 28px; scrollbar-width: thin; scrollbar-color: var(--rose) #e9e3e1; scrollbar-gutter: stable; }
.preview-frame { width: min(680px, 100%); margin: auto; transition: width .28s ease; }
.preview-frame.tablet { width: min(560px, 100%); }
.preview-frame.mobile { width: min(375px, 100%); }
.preview-frame .invitation-page { min-height: 700px; padding: 12px; }
.preview-frame.mobile .invitation-page { padding: 7px; }
.preview-frame.mobile .invitation-cover { min-height: 470px; }
.diffusion-card { margin-top: 20px; }
.share-row { display: grid; grid-template-columns: minmax(240px,1fr) repeat(4,auto); gap: 9px; }
.photo-drop { min-height: 150px; display: grid; place-items: center; align-content: center; gap: 6px; padding: 20px; border: 1.5px dashed var(--rose); border-radius: 17px; background: #fff8f6; color: var(--wine); text-align: center; cursor: pointer; }
.photo-drop input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.photo-drop span { width: 38px; height: 38px; display: grid; place-items: center; border-radius: 50%; background: var(--blush); }
.photo-drop svg { width: 17px; }
.photo-drop small { color: var(--muted); font-size: 10px; }
.media-grid { display: grid; gap: 14px; margin-top: 16px; }
.media-card { overflow: hidden; border: 1px solid var(--line); border-radius: 15px; background: white; }
.media-card > img { width: 100%; height: 160px; display: block; object-fit: cover; }
.media-card > div { display: grid; grid-template-columns: 1fr 1fr; gap: 7px; padding: 10px; }
.media-card input { grid-column: 1/-1; min-height: 36px; }
.media-card select { min-height: 36px; padding: 0 8px; font-size: 11px; }
.media-assign { grid-column: 1/-1; margin-top: 3px; padding: 10px; border-radius: 11px; background: #faf6f4; }
.media-assign small { color: var(--red); font-size: 10px; font-weight: 700; }
.media-actions { grid-column: 1/-1; display: flex; gap: 5px; }
.media-actions .btn { flex: 1; padding: 0 7px; font-size: 10px; }
.media-actions .icon-btn { width: 36px; height: 36px; flex: 0 0 auto; }
.template-picker { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; margin-bottom: 20px; }
.template-picker .template-preview { min-height: 96px; padding: 8px; border: 2px solid transparent; border-radius: 12px; }
.template-picker .template-preview.selected { border-color: var(--red); box-shadow: 0 0 0 3px rgba(217,12,30,.1); }
.template-picker .template-preview span { font-size: 16px; }
.palette-editor { display:grid; gap:8px; margin-top:7px; }
.palette-color { display:grid; grid-template-columns:86px minmax(0,1fr); align-items:center; gap:9px; color:var(--muted); font-size:10px; font-weight:700; }
.palette-color-controls { display:grid; grid-template-columns:46px minmax(0,1fr); gap:7px; }
.palette-color input[type=color] { width:46px; height:42px; padding:2px; border:1px solid var(--line); border-radius:10px; background:white; cursor:pointer; }
.palette-color .color-hex { width:100%; min-width:0; height:42px; font-family:ui-monospace,SFMono-Regular,Consolas,monospace; font-size:12px; text-transform:uppercase; }
.preset-palettes { display: flex; flex-wrap: wrap; gap: 6px; }
.preset-palettes button { padding: 7px 9px; border: 1px solid var(--line); border-radius: 9px; background: white; color: var(--wine); cursor: pointer; font-size: 10px; font-weight: 700; }
.block-list { display: grid; gap: 8px; }
.block-item { display: grid; grid-template-columns: 22px 1fr auto; align-items: center; gap: 7px; padding: 9px; border: 1px solid var(--line); border-radius: 12px; background: white; transition: .15s ease; }
.block-item.selected { border-color: var(--rose); background: #fff7f5; }.block-item.dragging { opacity: .45; }.block-item.drag-over { border-color: var(--red); transform: translateY(2px); }
.drag-handle { color: var(--taupe); cursor: grab; font-size: 19px; }.block-item > button { min-width: 0; border: 0; background: none; text-align: left; cursor: pointer; }.block-item > button strong,.block-item > button small { display: block; }.block-item > button strong { font-size: 12px; }.block-item > button small { overflow: hidden; color: var(--muted); font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.block-item > span:last-child { display: flex; }.block-item > span:last-child button { width: 25px; height: 27px; border: 0; border-radius: 7px; background: #f7f2f0; cursor: pointer; }
.block-empty { padding: 26px 15px; border: 1px dashed var(--rose); border-radius: 13px; color: var(--muted); text-align: center; font-size: 11px; }
.block-library { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 17px; padding-top: 15px; border-top: 1px solid var(--line); }.block-library small { width: 100%; color: var(--muted); font-weight: 700; }.block-library button { padding: 7px 9px; border: 1px solid var(--line); border-radius: 9px; background: white; color: var(--wine); cursor: pointer; font-size: 10px; font-weight: 700; }
.block-form { display: grid; gap: 12px; margin-top: 20px; padding: 16px; border-radius: 14px; background: #f8f3f1; }.block-form h3 { margin: 0; color: var(--wine); }.block-form fieldset { display: grid; gap: 10px; margin: 0; padding: 12px; border: 1px solid var(--line); border-radius: 12px; background: white; }.block-form legend { padding: 0 5px; color: var(--red); font-size: 10px; font-weight: 800; text-transform: uppercase; }.block-form .story-remove { justify-self: start; color: var(--red); }

/* Rendu public personnalisable */
.invitation-shell { padding: 28px 18px 90px; }
.invitation-page { overflow: hidden; padding: 0; color: #34282a; background: #fffdfa; }
.invitation-page.body-cormorant { font-family: "Cormorant Garamond", serif; font-size: 18px; }
.invitation-page.body-playfair { font-family: "Playfair Display", serif; }
.invitation-page.body-cinzel { font-family: "Cinzel", serif; }
.invitation-page.body-figtree { font-family: "Figtree", sans-serif; }
.invitation-page.font-cormorant h1,.invitation-page.font-cormorant h2,.invitation-page.font-cormorant .signature { font-family: "Cormorant Garamond", serif; }
.invitation-page.font-playfair h1,.invitation-page.font-playfair h2,.invitation-page.font-playfair .signature { font-family: "Playfair Display", serif; }
.invitation-page.font-cinzel h1,.invitation-page.font-cinzel h2,.invitation-page.font-cinzel .signature { font-family: "Cinzel", serif; font-style: normal; }
.invitation-page.font-figtree h1,.invitation-page.font-figtree h2,.invitation-page.font-figtree .signature { font-family: "Figtree", sans-serif; font-style: normal; }
.invitation-page .eyebrow { color: var(--section-accent,var(--i-red)); letter-spacing:.06em; text-transform:none; }
.invitation-cover { min-height: 610px; border-radius: 320px 320px 22px 22px; background: linear-gradient(155deg,var(--i-wine),var(--i-red)); isolation: isolate; }
.invitation-cover[style] { background-image: var(--section-image); background-size: var(--image-fit); background-position: var(--image-position); background-repeat: no-repeat; }
.invitation-cover.layout-full { border-radius: 20px; }
.invitation-cover.layout-editorial { min-height: 560px; align-items: end; justify-items: start; border-radius: 12px; text-align: left; }
.invitation-cover.layout-editorial::before { display: none; }
.cover-overlay { position: absolute; inset: 0; z-index: -1; background: linear-gradient(180deg,rgba(25,0,3,.14),rgba(48,0,5,.83)); }
.cover-content { position: relative; z-index: 1; width: 100%; }
.invitation-monogram { font-size: 68px; line-height: 1; }
.invitation-monogram i { margin: 0 6px; color: var(--i-rose); font-size: .55em; font-weight: 400; }
.invitation-cover h1 { margin: 24px 0 10px; font-size: clamp(39px,8vw,59px); }
.invitation-cover h1 em { color: var(--i-rose); font-weight: 400; }
.wedding-date { color: var(--i-blush) !important; }
.countdown { width: max-content; display: grid; margin: 28px auto 0; padding: 12px 20px; border: 1px solid rgba(255,255,255,.28); border-radius: 15px; background: rgba(255,255,255,.1); backdrop-filter: blur(9px); }
.text-left .countdown { margin-left: 0; }.text-right .countdown { margin-right: 0; }
.countdown strong { font-size: 28px; }.countdown span { color: var(--i-blush); font-size: 9px; letter-spacing: .05em; text-transform: none; }
.invitation-section { position: relative; width:100%; box-sizing:border-box; padding: 76px var(--section-padding-x,42px); }
.invitation-section.tone-light { background: #fffdfa; }
.invitation-section.tone-soft { background: color-mix(in srgb,var(--i-blush) 54%,white); }
.invitation-section.tone-dark { color: white; background: var(--i-wine); }
.invitation-section.tone-dark .eyebrow { color: var(--i-rose); }
.invitation-section h2 { margin: 7px 0 18px; color: var(--i-wine); font-size: clamp(32px,6vw,45px); }
.invitation-section.tone-dark h2 { color: white; }
.invitation-section.custom-section-style { color:var(--section-text,inherit); }
.invitation-section.custom-section-style h2,.invitation-section.custom-section-style p { color:inherit; }
.invitation-section.custom-section-style .eyebrow,.invitation-section.custom-section-style .venue-city,.invitation-section.custom-section-style .guest-program span { color:var(--section-accent,var(--i-red)); }
.invitation-section.has-background-image { color:white; background-repeat:no-repeat; }
.invitation-section.has-background-image h2 { color:inherit; }
.invitation-section p { max-width: 520px; margin-inline: auto; line-height: 1.75; }
.text-left { text-align: left; }.text-right { text-align: right; }.text-center { text-align: center; }
.text-left p { margin-left: 0; }.text-right p { margin-right: 0; }
.section-photo { width: min(420px,90%); height: 330px; margin-bottom: 34px; border-radius: 210px 210px 18px 18px; object-fit: var(--image-fit); object-position: var(--image-position); box-shadow: 0 18px 45px rgba(82,0,6,.16); }
.guest-program { max-width: 500px; margin: 34px auto 0; }
.guest-program article { display: grid; grid-template-columns: 65px 28px 1fr; align-items: start; gap: 13px; text-align: left; }
.guest-program article:not(:last-child) { padding-bottom: 25px; }
.guest-program span { padding-top: 2px; color: var(--i-red); font-size: 13px; font-weight: 800; }
.guest-program i { width: 28px; height: 28px; display: grid; place-items: center; border-radius: 50%; color: white; background: var(--i-red); font-size: 10px; font-style: normal; }
.guest-program article:not(:last-child) i::after { content:""; width: 1px; height: 27px; position: absolute; margin-top: 54px; background: var(--i-rose); }
.guest-program strong,.guest-program small { display: block; }.guest-program small { margin-top: 5px; color: var(--i-grey); }
.venue-city { color: var(--i-red); font-weight: 750; letter-spacing: .04em; text-transform: none; }
.invitation-link { display: inline-flex; margin-top: 13px; padding: 12px 18px; border: 1px solid var(--i-red); border-radius: 40px; color: var(--i-red); font-size: 12px; font-weight: 750; }
.photo-gallery { display: grid; grid-template-columns: repeat(2,1fr); grid-auto-rows: 190px; gap: 9px; margin-top: 30px; }
.photo-gallery figure { overflow: hidden; margin: 0; border-radius: 12px; }.photo-gallery figure.photo-0 { grid-row: span 2; }.photo-gallery img { width: 100%; height: 100%; display: block; }
.gallery-empty { min-height: 210px; display: grid; place-items: center; margin-top: 25px; border: 1px dashed var(--i-rose); border-radius: 18px; color: var(--i-grey); background: rgba(255,255,255,.5); }
.love-story { display: grid; gap: 12px; margin-top: 30px; }
.story-card { overflow: hidden; border-radius: 12px; background: white; box-shadow: 0 7px 22px rgba(82,0,6,.08); text-align: left; }.story-card > img,.story-photo-empty { width: 100%; height: 200px; display: grid; place-items: center; object-fit: cover; background: color-mix(in srgb,var(--i-blush) 68%,white); color: var(--i-grey); }.story-card-body { display: grid; grid-template-columns: 48px 1fr; }.story-card time { display: grid; place-items: center; padding: 9px 4px; color: white; background: var(--i-rose); font-size: 13px; font-weight: 800; writing-mode: vertical-rl; transform: rotate(180deg); }.story-card-body > div { padding: 14px 16px; }.story-card h3 { margin: 0 0 6px; color: var(--i-red); font: 600 20px/1.1 "Cormorant Garamond",serif; }.story-card p { margin: 0; color: #6f6465; font-size: 12px; line-height: 1.5; }
.photo-carousel { margin-top: 28px; }
.carousel-stage { position: relative; height: 520px; overflow: hidden; border-radius: 12px; background: #eee; isolation: isolate; }
.carousel-slide-image { position: absolute; inset: 0; width: 100%; height: 100%; display: block; object-fit: cover; transform: translate3d(0,0,0) scale(1); opacity: 1; filter: blur(0); transition: transform .7s cubic-bezier(.22,.61,.36,1),opacity .58s ease,filter .7s ease; will-change: transform,opacity,filter; }
.carousel-incoming { z-index: 2; opacity: 0; filter: blur(3px); }
.carousel-incoming.from-right { transform: translate3d(9%,0,0) scale(1.035); }
.carousel-incoming.from-left { transform: translate3d(-9%,0,0) scale(1.035); }
.carousel-incoming.is-visible { opacity: 1; filter: blur(0); transform: translate3d(0,0,0) scale(1); }
.carousel-slide-image.carousel-leave-left { opacity: .18; filter: blur(2px); transform: translate3d(-6%,0,0) scale(.985); }
.carousel-slide-image.carousel-leave-right { opacity: .18; filter: blur(2px); transform: translate3d(6%,0,0) scale(.985); }
.carousel-arrow { position: absolute; top: 50%; z-index: 4; width: 42px; height: 58px; display: grid; place-items: center; border: 1px solid rgba(255,255,255,.24); border-radius: 0 14px 14px 0; color: white; background: rgba(35,20,20,.3); box-shadow: 0 8px 24px rgba(0,0,0,.16); backdrop-filter: blur(9px); cursor: pointer; font-size: 34px; transform: translateY(-50%); transition: width .25s ease,background .25s ease,transform .25s ease; }
.carousel-arrow:hover { width: 46px; background: rgba(82,0,6,.62); }
.carousel-arrow:active { transform: translateY(-50%) scale(.93); }
.carousel-arrow.next { right: 0; border-radius: 14px 0 0 14px; }.carousel-arrow.prev { left: 0; }
.carousel-thumbs { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(66px,1fr); gap: 7px; overflow-x: auto; margin-top: 8px; scroll-behavior: smooth; scrollbar-width: thin; }
.carousel-thumbs button { height: 75px; overflow: hidden; padding: 0; border: 2px solid transparent; border-radius: 8px; background: none; cursor: pointer; opacity: .62; transform: scale(.96); transition: opacity .28s ease,transform .35s cubic-bezier(.22,.61,.36,1),border-color .28s ease,box-shadow .35s ease; }
.carousel-thumbs button:hover { opacity: .86; transform: scale(.985); }
.carousel-thumbs button.active { border-color: var(--i-red); box-shadow: 0 5px 16px color-mix(in srgb,var(--i-red) 25%,transparent); opacity: 1; transform: scale(1); }
.carousel-thumbs img { width: 100%; height: 100%; object-fit: cover; transition: transform .45s ease; }.carousel-thumbs button:hover img { transform: scale(1.06); }
@media (prefers-reduced-motion:reduce){.carousel-slide-image,.carousel-arrow,.carousel-thumbs,.carousel-thumbs button,.carousel-thumbs img{scroll-behavior:auto!important;transition-duration:.01ms!important}}
.custom-heading { margin-top: 25px; color: var(--i-wine); font: 600 28px/1.15 "Cormorant Garamond",serif; }.custom-text { white-space: pre-line; }.custom-image { height: 360px; overflow: hidden; margin: 25px 0; border-radius: 10px; }.custom-image img { width: 100%; height: 100%; }.custom-separator { width: 90px; border: 0; border-top: 1px solid var(--i-rose); }.block-placeholder { min-height: 120px; display: grid; place-items: center; margin: 20px 0; border: 1px dashed var(--i-rose); color: var(--i-grey); }
.invitation-page .rsvp-box { padding: 32px; border-color: color-mix(in srgb,var(--i-wine) 15%,transparent); }
.rsvp-deadline { color: var(--i-red); font-size: 12px; font-weight: 750; }
.invitation-page .btn-primary { background: var(--i-wine); }
.thanks-section { width:100%; min-height: 390px; display: grid; place-content: center; background-position:center; background-size:cover; }
.thanks-section .signature { margin-top: 25px; color: var(--i-rose); font-size: 32px; font-style: italic; }
.preview-back { position: fixed; right: 24px; bottom: 24px; z-index: 20; box-shadow: var(--shadow-lg); }
.rsvp-shortcut { position:fixed; right:16px; bottom:16px; z-index:20; box-shadow:var(--shadow-lg); }
.rsvp-confirmation { padding:20px; color:var(--i-wine); background:var(--i-blush); border-radius:12px; }
.start-choice { display: flex; align-items: center; justify-content: space-between; gap: 28px; margin-bottom: 30px; border-color: rgba(217,12,30,.2); background: linear-gradient(120deg,#fff,#fff4f2); }
.start-choice p:last-child { max-width: 680px; margin-bottom: 0; color: var(--muted); line-height: 1.6; }
.delete-confirm { text-align: center; }.delete-confirm .stat-icon { margin: 0 auto 17px; color: #a30a17; background: #fdebed; }.delete-confirm p { max-width: 470px; margin: 0 auto 20px; color: var(--muted); line-height: 1.6; }.delete-confirm .form-actions { justify-content: center; }

/* Les 16 modèles modifient la composition; la palette reste librement réglable. */
.template-classic .invitation-cover { border-radius: 320px 320px 22px 22px; }
.template-art-deco .invitation-cover { border-radius: 4px; clip-path: polygon(12% 0,88% 0,100% 12%,100% 88%,88% 100%,12% 100%,0 88%,0 12%); }
.template-art-deco .invitation-section h2 { letter-spacing: .04em; }
.template-art-deco .invitation-cover::after { content:""; position:absolute; inset:28px; border:3px double var(--i-rose); }
.template-autumn .invitation-cover { border-radius: 50% 50% 8px 8px / 26% 26% 8px 8px; }
.template-autumn .invitation-section { background-image: radial-gradient(circle at 8% 12%,color-mix(in srgb,var(--i-rose) 22%,transparent),transparent 21%); }
.template-midnight .invitation-page { background: #11172b; }.template-midnight .invitation-section.tone-light { background:#f9f7f4; }.template-midnight .invitation-cover { border-radius: 16px; box-shadow: inset 0 0 0 1px rgba(255,255,255,.3); }
.template-boheme .invitation-cover { border-radius: 46% 46% 20px 20px; }.template-boheme .invitation-section h2 { font-weight:500; }.template-boheme .section-photo { transform:rotate(-2deg); }
.template-caramel .invitation-cover { border-radius: 8px; align-items:end; text-align:left; }.template-caramel .cover-content { padding:25px; }.template-caramel .countdown { margin-left:0; }
.template-forest .invitation-cover { border-radius: 280px 280px 0 0; }.template-forest .invitation-section::after { content:"✦"; display:block; margin-top:30px; color:var(--i-rose); }
.template-winter .invitation-cover { border-radius: 280px 280px 280px 280px / 190px 190px 70px 70px; }.template-winter .invitation-section { border-bottom:1px solid color-mix(in srgb,var(--i-grey) 25%,transparent); }
.template-industrial .invitation-cover { border-radius:0; clip-path:polygon(0 0,100% 0,100% 94%,0 100%); }.template-industrial h1,.template-industrial h2 { letter-spacing:-.04em; }
.template-japan .invitation-cover { min-height:540px; border-radius:0; }.template-japan .invitation-monogram { width:110px;height:110px;display:grid;place-items:center;margin:auto;border-radius:50%;background:var(--i-red);font-size:43px; }.template-japan .invitation-section { padding-block:90px; }
.template-english-garden .invitation-cover { border-radius: 48% 48% 16px 16px; outline:8px solid color-mix(in srgb,var(--i-blush) 55%,white); outline-offset:-20px; }
.template-kawaii .invitation-cover { border-radius:32px; }.template-kawaii .invitation-section,.template-kawaii .rsvp-box { border-radius:28px; }.template-kawaii h2 { font-weight:600; }
.template-digital .invitation-cover { border-radius:24px; clip-path:polygon(0 0,100% 0,100% 88%,62% 100%,0 94%); }.template-digital .invitation-section h2 { background:linear-gradient(90deg,var(--i-wine),var(--i-red));-webkit-background-clip:text;background-clip:text;color:transparent; }
.template-provence .invitation-cover { border-radius:240px 240px 30px 30px; }.template-provence .invitation-section { border-inline:12px solid color-mix(in srgb,var(--i-blush) 35%,white); }
.template-romance .invitation-cover { border-radius:320px 320px 80px 80px; }.template-romance .cover-content h1 { font-size:64px; }.template-romance .invitation-section h2 { font-style:italic; }
.template-rose-modern .invitation-cover { border-radius:0; min-height:560px; align-items:end; text-align:left; }.template-rose-modern .cover-content { width:80%;padding:25px;background:rgba(255,255,255,.9);color:var(--i-wine); }.template-rose-modern .invitation-cover p { color:var(--i-red)!important; }.template-rose-modern .countdown { margin-left:0;background:var(--i-wine);color:white; }

@media (max-width: 1120px) {
  .builder-shell { grid-template-columns: minmax(0,1fr) 350px; }.builder-shell.tools-collapsed { grid-template-columns:minmax(0,1fr) 62px; }
  .share-row { grid-template-columns: 1fr 1fr; }.share-row input { grid-column: 1/-1; }
}
@media (max-width: 880px) {
  .builder-shell,.builder-shell.tools-collapsed { grid-template-columns: 1fr; }.builder-tools,.builder-stage { grid-column:1; grid-row:auto; }.builder-tools { position: static; max-height: none; }.builder-tools.collapsed .builder-tools-head { min-height:58px; }.builder-panel { max-height:65vh; }
  .preview-canvas { height:72vh; min-height:520px; padding: 14px; }.preview-toolbar { position: sticky; top: 68px; z-index: 5; }
}
@media (max-width: 560px) {
  .builder-panel { padding: 16px; }.builder-tabs { overflow-x: auto; grid-template-columns: repeat(6,74px); }.preview-canvas { padding: 8px; }
  .share-row { grid-template-columns: 1fr; }.share-row input { grid-column: auto; }.save-state { width: 100%; }
  .invitation-section { padding: 55px var(--section-padding-x,24px); }.invitation-cover { min-height: 500px; }.invitation-page .rsvp-box { padding: 20px; }
  .start-choice { align-items: flex-start; flex-direction: column; }
}

/* Couverture demandée : plein cadre rectangulaire, quelle que soit la base choisie. */
.invitation-page .invitation-cover {
  width: 100%;
  min-height: clamp(560px, 100vh, 900px) !important;
  margin: 0;
  border-radius: 0 !important;
  clip-path: none !important;
  outline: 0 !important;
  background-size: cover !important;
}
.invitation-page .invitation-cover::before { border-radius: 0 !important; }
.row-actions { display:flex; align-items:center; justify-content:flex-end; gap:6px; }
.timeline-item .row-actions { align-self:start; }
.section-create { width:100%; margin-bottom:14px; }
.color-optional .clear-color { width:max-content; padding:0; border:0; color:var(--muted); background:none; cursor:pointer; font-size:11px; text-decoration:underline; }
.upload-status { min-height:18px; margin:8px 0; color:var(--muted); font-size:12px; }
@media (max-width:560px){.carousel-stage{height:410px}.story-card>img,.story-photo-empty{height:170px}.story-card-body{grid-template-columns:42px 1fr}.carousel-thumbs button{height:60px}}

/* Plan de table et gestion des accès */
.seating-summary { display:flex; flex-wrap:wrap; gap:10px; margin-bottom:20px; }
.seating-summary span { padding:10px 14px; border:1px solid var(--line); border-radius:999px; color:var(--muted); background:white; font-size:12px; }
.seating-summary strong { margin-right:4px; color:var(--wine); font-size:16px; }
.seating-grid { align-items:start; }
.seating-card { display:grid; gap:18px; }
.seating-card .card-head { margin:0; }
.seating-card .card-head > div:first-child { display:grid; grid-template-columns:auto 1fr; column-gap:10px; align-items:center; }
.seating-card .card-head h2,.seating-card .card-head p { grid-column:2; }
.table-shape { width:34px; height:34px; grid-row:1/3; display:block; border:2px solid var(--rose); background:var(--blush); }
.table-shape.round { border-radius:50%; }.table-shape.rectangle { width:42px; height:28px; border-radius:5px; }
.table-actions { display:flex; gap:5px; }.table-actions .icon-btn:last-child { color:#a30a17; }
.seated-guests { display:grid; gap:9px; min-height:70px; }.seated-guests .person { padding:8px; border-radius:10px; background:#faf6f4; }.seated-guests small { display:block; color:var(--muted); }
.empty-note { margin:0; color:var(--muted); font-size:12px; }.danger-text { color:#b42318!important; font-weight:700; }
.unassigned-card { margin-top:20px; }.guest-chips { display:flex; flex-wrap:wrap; gap:8px; }.guest-chip { padding:8px 11px; border-radius:999px; color:var(--wine); background:var(--blush); font-size:12px; font-weight:650; }
.guest-selector { max-height:280px; overflow:auto; display:grid; gap:7px; padding:8px; border:1px solid var(--line); border-radius:12px; background:#fcfaf9; }
.guest-selector label { display:flex; align-items:center; gap:9px; padding:9px; border-radius:9px; background:white; cursor:pointer; }.guest-selector input { accent-color:var(--red); }.guest-selector small { color:var(--muted); }
.readonly-banner { margin-bottom:18px; padding:12px 15px; border:1px solid #e6cabf; border-radius:12px; color:var(--wine); background:#fff5f1; font-size:12px; }
.access-intro { margin-bottom:20px; background:linear-gradient(120deg,#fff,#fff4f2); }.access-intro p:last-child { color:var(--muted); }
.pending-access { margin-top:20px; }.invite-row { display:grid; grid-template-columns:minmax(150px,1fr) minmax(160px,1fr) auto auto; align-items:center; gap:10px; padding:12px 0; border-top:1px solid var(--line); }.invite-row strong,.invite-row small { display:block; }.invite-row small { margin-top:3px; color:var(--muted); }
@media(max-width:650px){.invite-row{grid-template-columns:1fr auto}.invite-row .field{grid-column:1/-1;grid-row:2;width:100%;min-width:0}.invite-row .btn{grid-column:1}.seating-grid{grid-template-columns:1fr!important}}

/* Confidentialité : dissuasion contre la copie et traçabilité des vues partagées. */
/* Budget : une seule rubrique par dépense, avec toutes ses tranches. */
.expense-table { min-width:760px; }
.expense-table td,.expense-table th { padding:16px 12px; }
.expense-table td { vertical-align:top; }
.expense-history { display:grid; gap:7px; margin:12px 0 0; padding:0; list-style:none; min-width:190px; max-width:260px; }
.expense-history li { display:flex; justify-content:space-between; gap:12px; color:var(--muted); font-size:11px; white-space:normal; }
.expense-history li strong { color:var(--wine); white-space:nowrap; }
.expense-actions { display:grid; justify-items:end; gap:8px; width:110px; }
.expense-actions .btn { padding:9px 10px; font-size:11px; }
.modal:has(#expense-form) { width:min(840px,100%); }
#expense-form > .full { grid-column:1/-1; }
.expense-totals { padding:14px; border-radius:12px; background:var(--blush); color:var(--wine); line-height:1.8; align-self:end; }
.payment-editor { display:grid; gap:12px; margin:15px 0; }
.payment-row { min-width:0; padding:16px; border:1px solid var(--line); border-radius:14px; }
.payment-row legend { padding:0 7px; color:var(--wine); font-size:12px; font-weight:650; }
.payment-fields { display:grid; grid-template-columns:1fr 1fr 1.3fr auto; gap:12px; align-items:end; }
.payment-fields .form-group { margin:0; }
@media(max-width:650px){.payment-fields{grid-template-columns:1fr}.payment-fields .icon-btn{justify-self:end}.expense-totals{grid-column:1/-1}}

.privacy-settings { display:grid; gap:10px; padding:16px; border:1px solid var(--line); border-radius:14px; background:#fffaf8; }
.privacy-settings > strong { color:var(--wine); }
.privacy-settings .form-group { margin:0; }
.protected-media { position:relative; }
.protected-media img { -webkit-user-drag:none; -webkit-touch-callout:none; user-select:none; }
.privacy-watermark { position:absolute; inset:0; z-index:18; display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); grid-auto-rows:230px; align-items:center; overflow:hidden; pointer-events:none; user-select:none; }
.privacy-watermark span { justify-self:center; max-width:260px; color:rgba(255,255,255,.24); font:700 12px/1.25 "Figtree",sans-serif; letter-spacing:.08em; text-align:center; text-shadow:0 1px 3px rgba(0,0,0,.42); transform:rotate(-27deg); }
@media(max-width:700px){.privacy-watermark{grid-template-columns:repeat(2,minmax(0,1fr));grid-auto-rows:190px}.privacy-watermark span{font-size:10px}}
@media print {
  .protected-invitation .protected-media,.protected-invitation .preview-back { display:none!important; }
  .protected-invitation::before { content:"Ce faire-part privé n’est pas disponible à l’impression."; display:block; padding:15vh 8vw; color:#520006; font:600 24px/1.4 "Figtree",sans-serif; text-align:center; }
}

.auth-wedding-intro { letter-spacing:normal; display:block; margin-bottom:12px; font:600 18px/1.4 "Figtree",sans-serif; color:var(--wine); }

.guest-status-label { display:grid; gap:5px; font-size:12px; color:var(--muted); }
.guest-status-control { min-width:145px; padding:9px 12px; font-size:14px; }

/* Photos & souvenirs */
.memory-public {max-width:1180px;margin:0 auto;padding:28px 20px 64px;}
.memory-public .page-header h1 {color:var(--wine);font-family:"Cormorant Garamond",serif;}
.memory-space {display:grid;gap:24px;}
.memory-space .page-header {margin-bottom:0;}
.memory-sharing,.memory-upload {display:grid;gap:16px;}
.memory-share-row,.memory-switches,.memory-bulk,.memory-filters {display:flex;flex-wrap:wrap;align-items:center;gap:12px;}
.memory-share-row input {flex:1;min-width:210px;}
.memory-filters {margin-bottom:18px;}
.memory-filters>* {flex:1;min-width:180px;}
.memory-bulk {margin:16px 0;}
.memory-bulk .help {flex-basis:100%;}
.memory-grid {display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:20px;}
.memory-card {overflow:hidden;padding:0;}
.memory-image {overflow:hidden;height:220px;background:var(--blush);display:grid;place-items:center;padding:0;color:var(--wine);text-align:center;}
.memory-image img {display:block;width:100%;height:220px;object-fit:cover;}
.memory-card-body {padding:18px;display:grid;gap:10px;}
.memory-card-body strong {overflow-wrap:anywhere;}
.memory-card-body small {color:var(--muted);}
.memory-actions {display:flex;flex-wrap:wrap;gap:4px;}
.memory-check {display:flex;gap:8px;align-items:center;font-size:12px;}
.memory-transfer {display:grid;gap:6px;margin-top:14px;padding:12px;border:1px solid var(--line);border-radius:12px;}
.memory-transfer progress {width:100%;accent-color:var(--red);}
.memory-transfer span {overflow-wrap:anywhere;}
.memory-notice {padding:14px;background:var(--blush);color:var(--wine);border-radius:12px;}
#memory-qr svg {max-width:270px;height:auto;display:block;background:#fff;}
.memory-invitation-link {display:block;width:max-content;max-width:calc(100% - 32px);margin:16px auto;position:relative;z-index:10;}
@media(max-width:1000px){.memory-grid {grid-template-columns:repeat(2,minmax(0,1fr));}}
@media(max-width:600px){.memory-grid {grid-template-columns:1fr;}.memory-public{padding:20px 16px 50px;}.memory-share-row .btn,.memory-switches .btn {width:100%;}.memory-filters>*{min-width:100%;}}

.memory-carousel {padding:20px;overflow:hidden;outline-offset:4px;}
.memory-stage {background:linear-gradient(140deg,#230509,#541b24);border-radius:20px;overflow:hidden;}
.memory-slide[hidden] {display:none;}
.memory-slide:not([hidden]) {animation:memory-reveal .35s ease;}
.memory-screen {height:clamp(260px,55vw,620px);display:flex;align-items:center;justify-content:center;color:#fff;touch-action:pan-y;user-select:none;}
.memory-screen img,.memory-screen video {display:block;width:100%;height:100%;object-fit:cover;}
.memory-screen img {pointer-events:none;-webkit-touch-callout:none;-webkit-user-select:none;user-select:none;}
.memory-screen {-webkit-touch-callout:none;}
.memory-slide-caption {display:flex;justify-content:space-between;gap:16px;padding:18px 22px;color:#fff;flex-wrap:wrap;}
.memory-slide-caption small {opacity:.75;}
.memory-carousel-controls {display:flex;justify-content:center;align-items:center;gap:16px;margin-top:18px;flex-wrap:wrap;}
.memory-carousel .help {text-align:center;}
#memory-upload-form label:has(input[name=consent]) {display:flex;flex-direction:row;align-items:center;gap:12px;}
#memory-upload-form input[name=consent] {width:18px;flex:0 0 18px;}
@keyframes memory-reveal {from{opacity:.25;transform:translateX(10px);}to{opacity:1;transform:translateX(0);}}
@media(prefers-reduced-motion:reduce){.memory-slide:not([hidden]){animation:none;}}
@media(max-width:600px){.memory-carousel{padding:10px;}.memory-screen{height:360px;}.memory-slide-caption{padding:14px;}}

.contribution-message {white-space:pre-line;line-height:1.9;}
.contribution-list{display:grid;gap:18px;margin-top:24px;}
.contribution-list input{margin-top:8px;}
