/* =====================================================================
   MAKWELA — Feuille de style
   Palette : bordeaux (union, élégance), or (célébration), ivoire (douceur)
   ===================================================================== */
:root {
  --bordeaux: #7B1E3A;
  --bordeaux-700: #5E1630;
  --bordeaux-50: #F8EDF1;
  --gold: #C8A24A;
  --gold-600: #A9832E;
  --gold-50: #FBF4E2;
  --ivory: #FBF7F1;
  --surface: #FFFFFF;
  --ink: #221B22;
  --muted: #6E6470;
  --line: #E9E1D9;
  --success: #2E7D5B;  --success-50: #E8F4EE;
  --warning: #A86A12;  --warning-50: #FDF3E1;
  --danger:  #B42318;  --danger-50:  #FDECEA;
  --info:    #2B6CB0;  --info-50:    #EAF2FB;

  --radius: 14px;
  --radius-sm: 10px;
  --shadow: 0 1px 2px rgba(34,27,34,.06), 0 4px 16px rgba(34,27,34,.06);
  --shadow-lg: 0 12px 40px rgba(34,27,34,.18);
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-title: "Playfair Display", Georgia, "Times New Roman", serif;
  --nav-h: 64px;
  --sidebar-w: 248px;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: var(--font); font-size: 15px; line-height: 1.5;
  color: var(--ink); background: var(--ivory);
  -webkit-font-smoothing: antialiased; -webkit-tap-highlight-color: transparent;
}
h1, h2, h3 { font-family: var(--font-title); font-weight: 700; line-height: 1.2; margin: 0 0 .4em; }
h1 { font-size: 1.7rem; } h2 { font-size: 1.3rem; } h3 { font-size: 1.08rem; }
p { margin: 0 0 .8em; }
a { color: var(--bordeaux); }
.muted { color: var(--muted); }
.small { font-size: .85rem; }
.center { text-align: center; }
.hidden { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
svg.icon { width: 20px; height: 20px; flex: none; stroke: currentColor; fill: none; stroke-width: 2;
  stroke-linecap: round; stroke-linejoin: round; vertical-align: middle; }

/* ---------- Boutons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 44px; padding: 0 18px; border-radius: 999px; border: 1px solid transparent;
  font: 600 .95rem var(--font); cursor: pointer; text-decoration: none;
  background: var(--bordeaux); color: #fff; transition: background .15s, transform .05s;
}
.btn:hover { background: var(--bordeaux-700); }
.btn:active { transform: translateY(1px); }
.btn[disabled] { opacity: .55; cursor: not-allowed; }
.btn.secondary { background: var(--surface); color: var(--bordeaux); border-color: var(--line); }
.btn.secondary:hover { background: var(--bordeaux-50); }
.btn.gold { background: var(--gold); color: #2B1B05; }
.btn.gold:hover { background: var(--gold-600); color: #fff; }
.btn.danger { background: var(--surface); color: var(--danger); border-color: #F2C6C1; }
.btn.danger:hover { background: var(--danger-50); }
.btn.whatsapp { background: #1F9D55; } .btn.whatsapp:hover { background: #18814A; }
.btn.ghost { background: transparent; color: var(--muted); }
.btn.ghost:hover { background: rgba(0,0,0,.04); color: var(--ink); }
.btn.block { width: 100%; }
.btn.sm { min-height: 36px; padding: 0 12px; font-size: .85rem; }
.icon-btn {
  display: inline-grid; place-items: center; width: 42px; height: 42px; border-radius: 50%;
  border: 0; background: transparent; color: var(--ink); cursor: pointer; position: relative;
}
.icon-btn:hover { background: rgba(0,0,0,.05); }
.btn .spinner, .icon-btn .spinner { width: 16px; height: 16px; border-width: 2px; }

/* ---------- Formulaires ---------- */
.field { margin-bottom: 14px; }
.field label { display: block; font-weight: 600; font-size: .9rem; margin-bottom: 6px; }
.field .hint { font-size: .8rem; color: var(--muted); margin-top: 4px; }
.input, select.input, textarea.input {
  width: 100%; min-height: 46px; padding: 10px 14px; border-radius: var(--radius-sm);
  border: 1px solid var(--line); background: var(--surface); color: var(--ink);
  font: 1rem var(--font); outline: none; transition: border-color .15s, box-shadow .15s;
}
textarea.input { min-height: 90px; resize: vertical; }
.input:focus { border-color: var(--bordeaux); box-shadow: 0 0 0 3px rgba(123,30,58,.12); }
.input-group { position: relative; }
.input-group .icon-btn { position: absolute; right: 2px; top: 2px; }
.row { display: grid; gap: 12px; grid-template-columns: 1fr 1fr; }
@media (max-width: 520px) { .row { grid-template-columns: 1fr; } }
.choice-grid { display: grid; gap: 10px; grid-template-columns: repeat(3, 1fr); }
@media (max-width: 520px) { .choice-grid { grid-template-columns: 1fr; } }
.choice { position: relative; }
.choice input { position: absolute; opacity: 0; }
.choice span {
  display: block; padding: 12px; border: 1px solid var(--line); border-radius: var(--radius-sm);
  background: var(--surface); cursor: pointer; text-align: center; font-weight: 600;
}
.choice span small { display: block; font-weight: 400; color: var(--muted); }
.choice input:checked + span { border-color: var(--bordeaux); background: var(--bordeaux-50); color: var(--bordeaux); }
.choice input:focus-visible + span { box-shadow: 0 0 0 3px rgba(123,30,58,.2); }
.checks { display: grid; gap: 8px; grid-template-columns: 1fr 1fr; }
@media (max-width: 520px) { .checks { grid-template-columns: 1fr; } }
.check { display: flex; gap: 10px; align-items: center; padding: 10px 12px; border: 1px solid var(--line);
  border-radius: var(--radius-sm); background: var(--surface); cursor: pointer; font-size: .92rem; }
.check input { width: 18px; height: 18px; accent-color: var(--bordeaux); }
.form-error { background: var(--danger-50); color: var(--danger); padding: 10px 14px;
  border-radius: var(--radius-sm); font-size: .9rem; margin-bottom: 14px; }
.form-info { background: var(--info-50); color: var(--info); padding: 10px 14px;
  border-radius: var(--radius-sm); font-size: .9rem; margin-bottom: 14px; }

/* ---------- Cartes, badges, listes ---------- */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow); padding: 18px; margin-bottom: 16px; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.card-head h2, .card-head h3 { margin: 0; }
.grid { display: grid; gap: 16px; }
.grid.cols-2 { grid-template-columns: repeat(2, 1fr); }
.grid.cols-3 { grid-template-columns: repeat(3, 1fr); }
@media (max-width: 900px) { .grid.cols-3 { grid-template-columns: 1fr 1fr; } }
@media (max-width: 640px) { .grid.cols-2, .grid.cols-3 { grid-template-columns: 1fr; } }
.stat { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; }
.stat .label { color: var(--muted); font-size: .82rem; }
.stat .value { font-size: 1.5rem; font-weight: 700; font-family: var(--font-title); }
.badge { display: inline-flex; align-items: center; gap: 4px; padding: 2px 10px; border-radius: 999px;
  font-size: .76rem; font-weight: 600; background: #F1ECE7; color: var(--muted); white-space: nowrap; }
.badge.success { background: var(--success-50); color: var(--success); }
.badge.warning { background: var(--warning-50); color: var(--warning); }
.badge.danger { background: var(--danger-50); color: var(--danger); }
.badge.info { background: var(--info-50); color: var(--info); }
.badge.gold { background: var(--gold-50); color: var(--gold-600); }
.badge.bordeaux { background: var(--bordeaux-50); color: var(--bordeaux); }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.list { list-style: none; margin: 0; padding: 0; }
.list-item { display: flex; align-items: center; gap: 12px; padding: 12px 0; border-top: 1px solid var(--line); }
.list-item:first-child { border-top: 0; }
.list-item .grow { flex: 1; min-width: 0; }
.list-item .title { font-weight: 600; overflow: hidden; text-overflow: ellipsis; }
.list-item .actions { display: flex; gap: 4px; flex: none; }
.avatar { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; flex: none;
  background: var(--bordeaux-50); color: var(--bordeaux); font-weight: 700; font-size: .9rem; }
.progress { height: 10px; background: #F1ECE7; border-radius: 999px; overflow: hidden; }
.progress > div { height: 100%; background: linear-gradient(90deg, var(--gold), var(--bordeaux)); border-radius: 999px; }
.empty { text-align: center; padding: 28px 12px; color: var(--muted); }
.empty svg.icon { width: 40px; height: 40px; color: var(--gold); margin-bottom: 8px; }

/* ---------- Écrans d'authentification ---------- */
.auth-wrap { min-height: 100vh; display: grid; place-items: center; padding: 24px 16px;
  background: radial-gradient(circle at 15% 10%, #F6E7EC 0, transparent 45%),
              radial-gradient(circle at 90% 90%, #F7EEDA 0, transparent 40%), var(--ivory); }
.auth-card { width: 100%; max-width: 440px; background: var(--surface); border: 1px solid var(--line);
  border-radius: 20px; box-shadow: var(--shadow-lg); padding: 28px 24px; }
.auth-card.wide { max-width: 640px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: inherit; }
.brand img { width: 40px; height: 40px; border-radius: 10px; }
.brand .name { font-family: var(--font-title); font-weight: 700; font-size: 1.35rem; letter-spacing: .08em; color: var(--bordeaux); }
.brand .tag { display: block; font-size: .72rem; letter-spacing: .04em; color: var(--muted); margin-top: -2px; }
.auth-card .brand { justify-content: center; margin-bottom: 18px; }
.auth-card h1 { text-align: center; }
.auth-card .sub { text-align: center; color: var(--muted); margin-bottom: 20px; }
.auth-links { display: flex; justify-content: space-between; gap: 10px; margin-top: 14px; font-size: .9rem; flex-wrap: wrap; }
.auth-foot { text-align: center; color: var(--muted); font-size: .78rem; margin-top: 18px; }

/* ---------- Structure de l'application ---------- */
.shell { min-height: 100vh; }
.sidebar { position: fixed; inset: 0 auto 0 0; width: var(--sidebar-w); background: var(--surface);
  border-right: 1px solid var(--line); display: flex; flex-direction: column; padding: 18px 14px; z-index: 20; }
.sidebar .brand { padding: 0 6px 18px; }
.sidenav { display: flex; flex-direction: column; gap: 2px; flex: 1; }
.sidenav a { display: flex; align-items: center; gap: 12px; padding: 11px 12px; border-radius: 10px;
  color: var(--ink); text-decoration: none; font-weight: 500; }
.sidenav a:hover { background: var(--ivory); }
.sidenav a.active { background: var(--bordeaux-50); color: var(--bordeaux); font-weight: 700; }
.sidebar-foot { font-size: .75rem; color: var(--muted); padding: 10px 6px 0; border-top: 1px solid var(--line); }
.main-col { margin-left: var(--sidebar-w); min-height: 100vh; display: flex; flex-direction: column; }
.topbar { position: sticky; top: 0; z-index: 15; display: flex; align-items: center; gap: 10px;
  padding: 10px 20px; background: rgba(251,247,241,.92); backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line); }
.topbar .brand.mobile { display: none; }
.topbar .spacer { flex: 1; }
.project-switch { max-width: 360px; min-height: 40px; padding: 6px 12px; font-weight: 600; }
.view { padding: 20px; max-width: 1100px; width: 100%; margin: 0 auto; flex: 1; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; margin-bottom: 16px; flex-wrap: wrap; }
.page-head h1 { margin: 0; }
.page-head p { margin: 2px 0 0; color: var(--muted); }
.dot { position: absolute; top: 6px; right: 6px; min-width: 18px; height: 18px; padding: 0 5px;
  border-radius: 999px; background: var(--danger); color: #fff; font-size: .7rem; font-weight: 700;
  display: grid; place-items: center; border: 2px solid var(--ivory); }
.bottomnav { display: none; }

@media (max-width: 900px) {
  .sidebar { display: none; }
  .main-col { margin-left: 0; padding-bottom: calc(var(--nav-h) + env(safe-area-inset-bottom)); }
  .topbar { padding: 8px 12px; }
  .topbar .brand.mobile { display: flex; }
  .topbar .brand.mobile .name { font-size: 1.05rem; }
  .topbar .brand.mobile img { width: 32px; height: 32px; }
  .project-switch { max-width: 46vw; font-size: .85rem; }
  .view { padding: 16px 12px; }
  .bottomnav { display: flex; position: fixed; left: 0; right: 0; bottom: 0; z-index: 20;
    height: calc(var(--nav-h) + env(safe-area-inset-bottom)); padding-bottom: env(safe-area-inset-bottom);
    background: var(--surface); border-top: 1px solid var(--line); }
  .bottomnav a { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center;
    gap: 2px; color: var(--muted); text-decoration: none; font-size: .7rem; font-weight: 600; }
  .bottomnav a.active { color: var(--bordeaux); }
  .bottomnav a.active svg.icon { stroke-width: 2.4; }
}

/* ---------- Accueil ---------- */
.hero { background: linear-gradient(135deg, var(--bordeaux) 0%, var(--bordeaux-700) 100%); color: #fff;
  border-radius: 20px; padding: 22px; margin-bottom: 16px; position: relative; overflow: hidden; }
.hero::after { content: ""; position: absolute; right: -40px; top: -40px; width: 180px; height: 180px;
  border-radius: 50%; border: 18px solid rgba(200,162,74,.25); }
.hero h1 { color: #fff; font-size: 1.8rem; margin-bottom: 4px; }
.hero .meta { opacity: .85; }
.hero .countdown { display: inline-flex; align-items: baseline; gap: 8px; margin-top: 14px;
  background: rgba(255,255,255,.12); padding: 8px 14px; border-radius: 12px; }
.hero .countdown b { font-family: var(--font-title); font-size: 2rem; color: #F3D98F; }
.hero .progress { background: rgba(255,255,255,.18); margin-top: 14px; }
.hero .progress > div { background: linear-gradient(90deg, #F3D98F, #fff); }
.timeline { list-style: none; margin: 0; padding: 0; }
.timeline li { display: flex; gap: 12px; padding: 10px 0; position: relative; }
.timeline li::before { content: ""; position: absolute; left: 11px; top: 34px; bottom: -8px; width: 2px; background: var(--line); }
.timeline li:last-child::before { display: none; }
.timeline .bullet { width: 24px; height: 24px; border-radius: 50%; border: 2px solid var(--line);
  background: var(--surface); flex: none; display: grid; place-items: center; }
.timeline .bullet.done { background: var(--success); border-color: var(--success); color: #fff; }
.timeline .bullet.active { border-color: var(--gold); background: var(--gold-50); }
.timeline .bullet svg.icon { width: 14px; height: 14px; }

/* ---------- Modales, toasts, chargement ---------- */
.modal-backdrop { position: fixed; inset: 0; background: rgba(34,27,34,.45); z-index: 50;
  display: grid; place-items: center; padding: 16px; animation: fade .15s ease; }
.modal { width: 100%; max-width: 560px; max-height: calc(100vh - 32px); overflow: auto; background: var(--surface);
  border-radius: 18px; box-shadow: var(--shadow-lg); animation: pop .18s ease; }
.modal-head { display: flex; align-items: center; justify-content: space-between; padding: 16px 18px 8px; }
.modal-head h2 { margin: 0; font-size: 1.2rem; }
.modal-body { padding: 8px 18px 4px; }
.modal-foot { display: flex; justify-content: flex-end; gap: 8px; padding: 12px 18px 18px; flex-wrap: wrap; }
@media (max-width: 600px) {
  .modal-backdrop { place-items: end center; padding: 0; }
  .modal { max-width: none; border-radius: 18px 18px 0 0; max-height: 92vh; }
  .modal-foot .btn { flex: 1; }
}
.toasts { position: fixed; z-index: 60; left: 50%; transform: translateX(-50%); bottom: 24px;
  display: flex; flex-direction: column; gap: 8px; width: min(92vw, 420px); pointer-events: none; }
@media (max-width: 900px) { .toasts { bottom: calc(var(--nav-h) + 16px); } }
.toast { pointer-events: auto; display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px;
  border-radius: 12px; background: var(--ink); color: #fff; box-shadow: var(--shadow-lg); font-size: .92rem;
  animation: pop .18s ease; }
.toast.success { background: var(--success); } .toast.error { background: var(--danger); }
.spinner { width: 28px; height: 28px; border: 3px solid rgba(123,30,58,.15); border-top-color: var(--bordeaux);
  border-radius: 50%; animation: spin .8s linear infinite; display: inline-block; }
.btn .spinner { border-color: rgba(255,255,255,.35); border-top-color: #fff; }
.btn.secondary .spinner { border-color: rgba(123,30,58,.15); border-top-color: var(--bordeaux); }
.splash { min-height: 100vh; display: grid; place-items: center; gap: 16px; align-content: center; }
.splash img { width: 72px; height: 72px; border-radius: 18px; }
.skeleton { background: linear-gradient(90deg, #F1ECE7 25%, #F8F4F0 50%, #F1ECE7 75%); background-size: 200% 100%;
  animation: shimmer 1.2s infinite; border-radius: 10px; height: 18px; margin: 8px 0; }
.copy-box { display: flex; gap: 8px; }
.copy-box .input { font-size: .85rem; }
.notif-item { display: flex; gap: 10px; padding: 12px; border-radius: 12px; cursor: pointer; }
.notif-item:hover { background: var(--ivory); }
.notif-item.unread { background: var(--bordeaux-50); }
.notif-item .when { font-size: .75rem; color: var(--muted); }
.offline-bar { position: fixed; top: 0; left: 0; right: 0; z-index: 70; background: var(--warning); color: #fff;
  text-align: center; font-size: .82rem; padding: 4px; }

@keyframes spin { to { transform: rotate(360deg); } }
@keyframes fade { from { opacity: 0; } }
@keyframes pop { from { opacity: 0; transform: translateY(8px) scale(.98); } }
@keyframes shimmer { to { background-position: -200% 0; } }
@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; } }

/* ---------- Ajustements v0.2 ---------- */
.grow { flex: 1; min-width: 0; }
.timeline li { align-items: center; }
.timeline li::before { top: 40px; }
.stats-grid { display: grid; gap: 12px; grid-template-columns: repeat(3, 1fr); margin-bottom: 16px; }
@media (max-width: 640px) {
  .stats-grid { grid-template-columns: 1fr 1fr; }
  .stats-grid .wide { grid-column: 1 / -1; }
  .stat .value { font-size: 1.3rem; }
}
@media (max-width: 640px) { .stats-grid .wide { order: 3; } }

/* ---------- Étape 3 : étapes, tâches, calendrier, paramètres ---------- */
.seg { display: inline-flex; background: #F1ECE7; border-radius: 999px; padding: 3px; }
.seg button { border: 0; background: transparent; border-radius: 999px; padding: 0 14px; min-height: 38px;
  font: 600 .88rem var(--font); color: var(--muted); cursor: pointer; display: inline-flex; align-items: center; gap: 6px; }
.seg button.on { background: var(--surface); color: var(--bordeaux); box-shadow: var(--shadow); }
.seg svg.icon { width: 16px; height: 16px; }
.ms-card { padding: 16px; }
.ms-card.is-done { background: #FCFEFC; }
.ms-card.is-cancel { opacity: .6; }
.ms-head { display: flex; gap: 12px; align-items: flex-start; }
.ms-head h3 { margin: 2px 0 6px; }
.ms-head .actions { display: flex; flex: none; }
.ms-head .icon-btn[disabled] { opacity: .3; cursor: default; }
.ms-card .bullet { width: 32px; height: 32px; border-radius: 50%; flex: none; display: grid; place-items: center;
  border: 2px solid var(--line); font-weight: 700; color: var(--muted); font-size: .85rem; background: var(--surface); }
.ms-card .bullet.done { background: var(--success); border-color: var(--success); color: #fff; }
.ms-card .bullet.late { border-color: var(--danger); color: var(--danger); }
.ms-meta { display: flex; flex-wrap: wrap; gap: 6px 18px; margin: 10px 0 0 44px; color: var(--ink); font-size: .9rem; }
.ms-meta > span { display: inline-flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.ms-meta svg.icon { width: 16px; height: 16px; color: var(--muted); }
.ms-card > p { margin-left: 44px !important; }
.ms-foot { display: flex; gap: 8px; margin: 12px 0 0 44px; flex-wrap: wrap; }
.ms-tasks { margin: 10px 0 0 44px; padding-top: 6px; border-top: 1px dashed var(--line); }
.task { display: flex; align-items: center; gap: 6px; padding: 6px 0; border-top: 1px solid #F3EEE9; }
.task:first-child { border-top: 0; }
.task-check { display: flex; gap: 10px; align-items: flex-start; flex: 1; cursor: pointer; min-width: 0; }
.task-check input { width: 20px; height: 20px; margin-top: 2px; accent-color: var(--success); flex: none; }
.task-check .grow { display: flex; flex-direction: column; }
.task.done .task-title { text-decoration: line-through; color: var(--muted); }
.task-add { display: grid; grid-template-columns: 2fr 1fr 150px auto; gap: 8px; margin-top: 10px; }
.task-add .input { min-height: 40px; padding: 6px 10px; font-size: .9rem; }
@media (max-width: 640px) {
  .ms-meta, .ms-foot, .ms-tasks, .ms-card > p { margin-left: 0 !important; }
  .task-add { grid-template-columns: 1fr 1fr; }
  .task-add input[name=title] { grid-column: 1 / -1; }
  .task-add .btn { grid-column: 1 / -1; }
  .ms-head .actions .icon-btn { width: 36px; height: 36px; }
}
.cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; }
.cal-head div { text-align: center; font-size: .75rem; font-weight: 700; color: var(--muted); padding: 4px 0; }
.cal-cell { min-height: 92px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); padding: 4px 6px;
  text-align: left; display: flex; flex-direction: column; gap: 3px; cursor: pointer; font: inherit; color: inherit; overflow: hidden; }
.cal-cell.empty { border: 0; background: transparent; cursor: default; }
.cal-cell:hover { border-color: var(--gold); }
.cal-cell .n { font-size: .8rem; font-weight: 700; color: var(--muted); }
.cal-cell.today .n { background: var(--bordeaux); color: #fff; border-radius: 999px; padding: 0 7px; align-self: flex-start; }
.cal-cell.sel { border-color: var(--bordeaux); box-shadow: 0 0 0 2px rgba(123,30,58,.15); }
.cal-ev { display: flex; flex-direction: column; gap: 2px; }
.cal-ev .ev { font-size: .7rem; line-height: 1.25; padding: 1px 5px; border-radius: 5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ev.etape { background: var(--bordeaux-50); color: var(--bordeaux); }
.ev.tache { background: #F1ECE7; color: var(--ink); }
.ev.ceremonie { background: var(--gold-50); color: var(--gold-600); }
.ev.late { background: var(--danger-50); color: var(--danger); }
.ev.done { text-decoration: line-through; opacity: .6; }
.cal-ev .more { font-size: .68rem; color: var(--muted); }
.cal-dots { display: none; gap: 3px; }
.cal-dots i, .cal-legend i { width: 7px; height: 7px; border-radius: 50%; display: inline-block; }
i.etape { background: var(--bordeaux); } i.tache { background: #9C8F98; } i.ceremonie { background: var(--gold); } i.late { background: var(--danger); }
.cal-legend { display: flex; gap: 14px; flex-wrap: wrap; margin-top: 10px; }
.cal-legend span { display: inline-flex; align-items: center; gap: 5px; }
@media (max-width: 640px) {
  .cal-cell { min-height: 48px; align-items: center; padding: 4px 2px; }
  .cal-ev { display: none; } .cal-dots { display: flex; }
}
.photo-box { border-radius: 14px; overflow: hidden; background: var(--ivory); border: 1px dashed var(--line); margin-bottom: 10px; aspect-ratio: 4 / 3; }
.photo-box img { width: 100%; height: 100%; object-fit: cover; display: block; }
.photo-empty { height: 100%; display: grid; place-items: center; align-content: center; gap: 6px; color: var(--muted); }
.photo-empty svg.icon { width: 36px; height: 36px; color: var(--gold); }
.danger-zone { border-color: #F2C6C1; }
.hero.with-photo { padding-right: 150px; }
.hero-photo { position: absolute; right: 22px; top: 50%; transform: translateY(-50%); width: 112px; height: 112px;
  border-radius: 50%; object-fit: cover; border: 4px solid rgba(243,217,143,.85); z-index: 1; }
@media (max-width: 640px) {
  .hero.with-photo { padding-right: 22px; padding-top: 22px; }
  .hero-photo { position: static; transform: none; width: 84px; height: 84px; float: right; margin: 0 0 8px 10px; }
}
details summary { cursor: pointer; color: var(--bordeaux); font-weight: 600; }

/* ---------- Étape 4 : cérémonies, finances, prestataires ---------- */
.pos { color: var(--success); } .neg { color: var(--danger); }
.value.pos { color: var(--success); } .value.neg { color: var(--danger); }
.progress.over > div { background: var(--danger); }
.card .progress { height: 7px; margin-top: 6px; }
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin-bottom: 16px; overflow-x: auto; }
.tabs button { border: 0; background: transparent; padding: 10px 14px; font: 600 .92rem var(--font); color: var(--muted);
  border-bottom: 3px solid transparent; cursor: pointer; white-space: nowrap; }
.tabs button.on { color: var(--bordeaux); border-bottom-color: var(--bordeaux); }
.fin-stats { grid-template-columns: repeat(3, 1fr); }
@media (max-width: 640px) { .fin-stats { grid-template-columns: 1fr 1fr; } }
.table-wrap { overflow-x: auto; }
.table { width: 100%; border-collapse: collapse; font-size: .9rem; }
.table th { text-align: left; color: var(--muted); font-weight: 600; font-size: .78rem; padding: 6px 8px; border-bottom: 1px solid var(--line); }
.table td { padding: 10px 8px; border-bottom: 1px solid #F3EEE9; vertical-align: top; }
.table .num { text-align: right; white-space: nowrap; }
.toolbar { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-bottom: 8px; }
.toolbar .input { flex: 1; min-width: 160px; min-height: 40px; }
.avatar.in { background: var(--success-50); color: var(--success); }
.avatar.out { background: var(--danger-50); color: var(--danger); }
.amount { text-align: right; font-weight: 700; white-space: nowrap; }
.list-total { text-align: right; padding-top: 10px; border-top: 1px solid var(--line); margin-top: 4px; }
.cer-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px 18px; margin: 12px 0 0 52px; }
.cer-grid > div { display: flex; gap: 8px; align-items: flex-start; font-size: .92rem; }
.cer-grid svg.icon { width: 18px; height: 18px; color: var(--gold-600); margin-top: 2px; }
.cer-budget { margin: 12px 0 0 52px; }
.prog-time { font-weight: 700; color: var(--bordeaux); min-width: 48px; font-variant-numeric: tabular-nums; }
.prog-add { grid-template-columns: 110px 1.5fr 1.5fr auto; }
@media (max-width: 640px) { .cer-grid, .cer-budget { margin-left: 0; grid-template-columns: 1fr; } .prog-add { grid-template-columns: 1fr 1fr; } }
.chip { border: 1px solid var(--line); background: var(--surface); border-radius: 999px; padding: 6px 12px; font: 600 .82rem var(--font); cursor: pointer; color: var(--ink); }
.chip.on { background: var(--bordeaux); color: #fff; border-color: var(--bordeaux); }
.vendor-money { display: flex; gap: 18px; margin-top: 12px; flex-wrap: wrap; }
.vendor-money > div { display: flex; flex-direction: column; }
.due-add { grid-template-columns: 1fr 1fr 1fr auto; }
@media (max-width: 640px) { .due-add { grid-template-columns: 1fr 1fr; } }
.more-menu { display: grid; gap: 4px; }
.more-menu a { display: flex; align-items: center; gap: 12px; padding: 14px 12px; border-radius: 12px; color: var(--ink); text-decoration: none; font-weight: 600; }
.more-menu a:hover, .more-menu a.active { background: var(--bordeaux-50); color: var(--bordeaux); }

/* ---------- Étapes 5 à 11 ---------- */
.quick-grid { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); margin-bottom: 16px; }
a.stat.link { text-decoration: none; color: inherit; transition: border-color .15s, transform .1s; }
a.stat.link:hover { border-color: var(--gold); transform: translateY(-1px); }
.stat .label svg.icon { width: 15px; height: 15px; color: var(--gold-600); }
.sm-input { min-height: 36px; padding: 4px 8px; font-size: .88rem; }
.is-cancel { opacity: .55; }
/* Liste des biens */
.good { border-top: 1px solid var(--line); padding: 12px 0; }
.good:first-child { border-top: 0; }
.good.is-remis .title { color: var(--success); }
.good-main { display: flex; gap: 12px; align-items: flex-start; }
.good-actions { display: flex; flex-direction: column; align-items: flex-end; gap: 6px; flex: none; }
.good-actions .actions { display: flex; }
.purchases { margin: 8px 0 0 0; padding: 4px 10px; background: var(--ivory); border-radius: 10px; }
@media (max-width: 640px) { .good-main { flex-direction: column; } .good-actions { flex-direction: row; flex-wrap: wrap; align-items: center; width: 100%; } }
/* Invitations */
.cer-stats { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); margin-bottom: 16px; }
.swatch { display: inline-block; width: 18px; height: 18px; border-radius: 50%; margin: 0 2px 4px; border: 2px solid #fff; box-shadow: 0 0 0 1px var(--line); }
input[type=color].input { padding: 4px; height: 46px; cursor: pointer; }
svg.qr-big { width: 220px; height: 220px; max-width: 100%; display: block; margin: 0 auto 8px; }
.qr-wrap { background: #fff; display: inline-block; padding: 10px; border-radius: 14px; border: 1px solid var(--line); }
.invite-card { --ip: #7B1E3A; --ia: #C8A24A; --ib: #FBF7F1; background: var(--ib); border: 2px solid var(--ia); outline: 1px solid var(--ia);
  outline-offset: -8px; border-radius: 18px; padding: 30px 24px; text-align: center; position: relative; overflow: hidden; }
.invite-card::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 6px; background: var(--ip); }
.ic-photo { width: 120px; height: 120px; border-radius: 50%; object-fit: cover; border: 4px solid var(--ia); margin-bottom: 12px; }
.ic-intro { color: var(--muted); font-size: .92rem; max-width: 420px; margin: 0 auto 8px; }
.ic-names { font-family: var(--font-title); font-style: italic; color: var(--ip); font-size: 2rem; margin: 6px 0; }
.ic-sep { width: 80px; height: 2px; background: var(--ia); margin: 10px auto 16px; }
.ic-cer { margin-bottom: 12px; display: flex; flex-direction: column; gap: 1px; font-size: .92rem; }
.ic-cer b { color: var(--ip); font-size: 1rem; }
.ic-msg { font-style: italic; color: var(--muted); margin: 14px auto 0; max-width: 420px; }
.ic-close { font-family: var(--font-title); color: var(--ip); margin: 8px 0 0; }
/* Page publique */
body.public { background: radial-gradient(circle at 20% 0%, #F6E7EC 0, transparent 40%), var(--ivory); }
.public-wrap { max-width: 560px; margin: 0 auto; padding: 18px 14px 40px; display: flex; flex-direction: column; gap: 14px; }
.public-card { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 18px; box-shadow: var(--shadow); }
.public-card h3 { margin-bottom: 8px; }
.public-logo { width: 64px; height: 64px; border-radius: 16px; margin-bottom: 10px; }
.public-foot { text-align: center; color: var(--muted); font-size: .8rem; }
.public .cer-grid { grid-template-columns: 1fr; }
.rsvp-row { border: 1px solid var(--line); border-radius: 12px; padding: 12px; margin: 0 0 12px; }
.rsvp-row legend { font-weight: 700; padding: 0 6px; color: var(--bordeaux); }
.choice-grid.two { grid-template-columns: 1fr 1fr; }
.choice span svg.icon { width: 16px; height: 16px; }
/* Tables */
.tables-grid { display: grid; gap: 14px; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
.table-card { margin: 0; display: flex; flex-direction: column; }
.table-card.full { border-color: #BFE3CF; }
.table-card .seats { flex: 1; margin: 8px 0; }
.table-card .seats .task { padding: 4px 0; font-size: .9rem; }
.table-card .seats .icon-btn { width: 30px; height: 30px; }
.picker { max-height: 46vh; overflow: auto; border: 1px solid var(--line); border-radius: 12px; }
.pk-group { border-top: 1px solid var(--line); padding: 6px 10px; }
.pk-group:first-child { border-top: 0; }
.pk-head, .pk-row { display: flex; align-items: center; gap: 8px; padding: 5px 0; cursor: pointer; flex-wrap: wrap; }
.pk-row { padding-left: 26px; font-size: .92rem; }
.pk-head input, .pk-row input { width: 18px; height: 18px; accent-color: var(--bordeaux); }
.tables-mini { display: grid; gap: 10px; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
.tm { border: 1px solid var(--line); border-radius: 12px; padding: 10px; display: flex; flex-direction: column; gap: 2px; }
.table-tag { text-align: right; font-weight: 700; color: var(--bordeaux); display: flex; flex-direction: column; align-items: flex-end; }
.table-tag small { font-weight: 400; color: var(--muted); }
/* Contrôle des entrées */
.reader { width: 100%; max-width: 420px; margin: 0 auto; border-radius: 14px; overflow: hidden; background: #000; }
.scan-result { display: flex; gap: 14px; align-items: flex-start; border-radius: 14px; padding: 16px; margin-bottom: 10px; color: #fff; }
.scan-result svg.icon { width: 44px; height: 44px; flex: none; stroke-width: 2.5; }
.scan-result .sr-title { font-size: 1.15rem; font-weight: 700; margin-bottom: 2px; }
.scan-result.ok { background: var(--success); } .scan-result.warn { background: #C2700C; }
.scan-result.bad { background: var(--danger); } .scan-result.unknown { background: #5C5560; }
.big-check { width: 22px; height: 22px; accent-color: var(--bordeaux); }
.table .center, th.center { text-align: center; }
/* Offres */
.plans { display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); margin-bottom: 16px; }
.plan { margin: 0; display: flex; flex-direction: column; gap: 8px; }
.plan.current { border: 2px solid var(--gold); }
.plan .price { font-family: var(--font-title); font-size: 1.6rem; font-weight: 700; color: var(--bordeaux); }
.feat { list-style: none; padding: 0; margin: 0 0 8px; flex: 1; display: flex; flex-direction: column; gap: 6px; font-size: .9rem; }
.feat li { display: flex; gap: 8px; align-items: flex-start; }
.feat svg.icon { width: 16px; height: 16px; color: var(--success); margin-top: 2px; }
.steps { padding-left: 20px; margin: 0 0 14px; } .steps li { margin-bottom: 6px; }

/* ---------- Correctif v1.0.1 : menu latéral défilant sur les petits écrans ---------- */
.sidebar { overflow: hidden; }
.sidenav { flex: 1 1 auto; min-height: 0; overflow-y: auto; scrollbar-width: thin; }
.sidenav a { padding: 9px 12px; }
@media (max-height: 760px) { .sidebar .brand { padding-bottom: 10px; } .sidenav a { padding: 7px 12px; } }

/* ---------- Correctif v1.0.2 : tout le menu latéral défile, barre visible ---------- */
.sidebar { overflow-y: auto; overflow-x: hidden; scrollbar-width: auto; scrollbar-color: #BDB2BA transparent; }
.sidebar::-webkit-scrollbar { width: 10px; }
.sidebar::-webkit-scrollbar-track { background: transparent; }
.sidebar::-webkit-scrollbar-thumb { background: #C9BFC6; border-radius: 10px; border: 2px solid var(--surface); }
.sidebar::-webkit-scrollbar-thumb:hover { background: #A79BA4; }
.sidenav { flex: 1 0 auto; min-height: auto; overflow: visible; }
.top-account { display: inline-grid; place-items: center; width: 38px; height: 38px; border-radius: 50%;
  background: var(--bordeaux-50); color: var(--bordeaux); font-weight: 700; font-size: .85rem; text-decoration: none; flex: none; }
.top-account:hover { background: var(--bordeaux); color: #fff; }
