:root {
  --bg: #f5efe8;
  --bg-2: #fbf6f1;
  --panel: rgba(255, 255, 255, 0.76);
  --panel-strong: #ffffff;
  --border: rgba(89, 49, 23, 0.12);
  --border-strong: rgba(89, 49, 23, 0.18);
  --text: #24150f;
  --muted: #6c5646;
  --muted-2: #8a7260;
  --accent: #8f430d;
  --accent-2: #d38b4b;
  --accent-3: #111827;
  --success: #1d6b49;
  --danger: #b24d3a;
  --shadow: 0 24px 80px rgba(65, 38, 20, 0.12);
  --shadow-soft: 0 14px 40px rgba(65, 38, 20, 0.08);
  --radius-xl: 30px;
  --radius-lg: 22px;
  --radius-md: 16px;
  --radius-sm: 12px;
  --content-width: 1480px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--text);
  font-family: "Manrope", system-ui, sans-serif;
  background:
    radial-gradient(circle at top left, rgba(211, 139, 75, 0.16), transparent 34%),
    radial-gradient(circle at top right, rgba(143, 67, 13, 0.12), transparent 28%),
    linear-gradient(180deg, var(--bg-2), var(--bg));
  min-height: 100vh;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(90, 58, 34, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(90, 58, 34, 0.03) 1px, transparent 1px);
  background-size: 42px 42px;
  mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0.55), transparent 88%);
  opacity: 0.45;
}

a { color: inherit; text-decoration: none; }
button, input, textarea, select { font: inherit; }
img { display: block; max-width: 100%; }
.hidden { display: none !important; }

.portal-background {
  position: fixed;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
}

.portal-orb {
  position: absolute;
  border-radius: 999px;
  filter: blur(10px);
  opacity: 0.8;
}

.portal-orb-a {
  width: 420px;
  height: 420px;
  top: -120px;
  right: -120px;
  background: radial-gradient(circle, rgba(211, 139, 75, 0.18), rgba(211, 139, 75, 0));
}

.portal-orb-b {
  width: 520px;
  height: 520px;
  left: -180px;
  bottom: -220px;
  background: radial-gradient(circle, rgba(143, 67, 13, 0.14), rgba(143, 67, 13, 0));
}

.portal-grid {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(rgba(255,255,255,0.14), rgba(255,255,255,0.14)) 0 0 / 100% 1px no-repeat,
    linear-gradient(rgba(255,255,255,0.14), rgba(255,255,255,0.14)) 0 100% / 100% 1px no-repeat;
  opacity: 0.35;
}

.portal-frame {
  position: relative;
  z-index: 1;
  max-width: var(--content-width);
  margin: 0 auto;
  padding: 24px 20px 36px;
}

.portal-topbar {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 24px;
  align-items: center;
  padding: 18px 22px;
  background: rgba(255, 255, 255, 0.68);
  border: 1px solid var(--border);
  border-radius: 24px;
  box-shadow: var(--shadow-soft);
  backdrop-filter: blur(18px);
}

.portal-brand {
  display: inline-flex;
  align-items: center;
}

.portal-logo {
  width: 176px;
  height: auto;
  object-fit: contain;
}

.portal-topbar-copy {
  min-width: 0;
}

.portal-topbar-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(143, 67, 13, 0.08);
  color: var(--accent);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.portal-chip-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 4px rgba(143, 67, 13, 0.12);
}

.portal-topbar-copy p {
  margin: 10px 0 0;
  color: var(--muted);
  max-width: 60ch;
  line-height: 1.55;
}

.portal-topbar-actions {
  display: inline-flex;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.portal-ghost-button,
.portal-primary-button,
.agenda-remove {
  border: 0;
  cursor: pointer;
  transition: transform 180ms ease, box-shadow 180ms ease, background-color 180ms ease, border-color 180ms ease;
}

.portal-ghost-button {
  padding: 12px 16px;
  border-radius: 999px;
  background: rgba(255,255,255,0.68);
  color: var(--accent-3);
  border: 1px solid var(--border);
  font-weight: 700;
}

.portal-ghost-button:hover { transform: translateY(-1px); border-color: var(--border-strong); }

.portal-primary-button {
  padding: 13px 18px;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--accent), #b15b1c);
  color: #fff;
  font-weight: 800;
  box-shadow: 0 16px 28px rgba(143, 67, 13, 0.18);
}

.portal-primary-button:hover { transform: translateY(-1px); box-shadow: 0 20px 40px rgba(143, 67, 13, 0.24); }

.auth-stage,
.workspace {
  margin-top: 24px;
  display: grid;
  gap: 24px;
}

.auth-stage {
  grid-template-columns: minmax(0, 1.1fr) minmax(380px, 0.9fr);
  align-items: stretch;
}

.auth-hero,
.auth-card,
.workspace-sidebar .sidebar-hero,
.create-card,
.project-list-panel,
.panel,
.main-hero {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-soft);
  backdrop-filter: blur(20px);
}

.auth-hero {
  padding: 40px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 520px;
}

.portal-kicker {
  margin: 0 0 14px;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.16em;
  font-size: 12px;
  font-weight: 800;
}

.auth-hero h1,
.workspace-main h2,
.auth-card h2 {
  margin: 0;
  font-family: "Cormorant Infant", Georgia, serif;
  line-height: 0.95;
  letter-spacing: -0.03em;
}

.auth-hero h1 {
  max-width: 12ch;
  font-size: clamp(3.2rem, 6vw, 6.4rem);
}

.auth-copy {
  margin: 20px 0 0;
  color: var(--muted);
  font-size: 1.03rem;
  line-height: 1.8;
  max-width: 66ch;
}

.auth-highlights {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin-top: 28px;
}

.auth-highlights article {
  padding: 18px 18px 20px;
  border-radius: 22px;
  border: 1px solid var(--border);
  background: rgba(255,255,255,0.66);
}

.auth-highlights strong {
  display: block;
  font-size: 0.92rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
}

.auth-highlights span {
  display: block;
  margin-top: 8px;
  color: var(--muted);
  line-height: 1.55;
}

.auth-panels {
  display: grid;
  gap: 16px;
}

.auth-card {
  padding: 28px;
  display: grid;
  gap: 18px;
}

.auth-card-head h2 {
  font-size: clamp(2.1rem, 4vw, 3rem);
  margin-top: 10px;
}

.auth-card-head p,
.auth-note span,
.sidebar-hero p,
.panel-note,
.section-head p,
.create-card-head p,
.workspace-main p,
.message-empty,
.project-empty {
  color: var(--muted);
  line-height: 1.65;
}

.auth-card-badge,
.portal-card-badge,
.section-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: fit-content;
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(143, 67, 13, 0.08);
  color: var(--accent);
  border: 1px solid rgba(143, 67, 13, 0.14);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.stack-form {
  display: grid;
  gap: 12px;
}

.stack-form label {
  display: grid;
  gap: 7px;
  color: var(--text);
  font-weight: 700;
}

.stack-form label span {
  font-size: 0.9rem;
}

.stack-form input,
.stack-form textarea,
.stack-form select {
  width: 100%;
  border: 1px solid rgba(107, 79, 58, 0.18);
  background: rgba(255,255,255,0.84);
  color: var(--text);
  border-radius: 16px;
  padding: 13px 15px;
  outline: none;
  transition: border-color 180ms ease, box-shadow 180ms ease, transform 180ms ease;
}

.stack-form textarea {
  resize: vertical;
  min-height: 110px;
}

.stack-form input:focus,
.stack-form textarea:focus,
.stack-form select:focus {
  border-color: rgba(143, 67, 13, 0.52);
  box-shadow: 0 0 0 4px rgba(143, 67, 13, 0.11);
}

.portal-status {
  margin: 0;
  min-height: 1.2em;
  color: var(--muted);
  font-size: 0.95rem;
}

.portal-status.is-error { color: var(--danger); }
.portal-status.is-success { color: var(--success); }

.auth-note {
  padding-top: 8px;
  border-top: 1px solid var(--border);
  display: grid;
  gap: 6px;
}

.auth-note strong {
  color: var(--text);
}

.workspace {
  grid-template-columns: minmax(280px, 340px) minmax(0, 1fr);
  align-items: start;
}

.workspace-sidebar {
  display: grid;
  gap: 18px;
  position: sticky;
  top: 22px;
}

.sidebar-hero,
.create-card,
.project-list-panel {
  padding: 22px;
}

.sidebar-hero h2 {
  margin: 10px 0 8px;
  font-family: "Cormorant Infant", Georgia, serif;
  font-size: clamp(2.2rem, 4vw, 3.4rem);
  line-height: 0.92;
}

.sidebar-hero p {
  margin: 0;
}

.project-list-panel {
  display: grid;
  gap: 18px;
}

.section-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.section-head h3 {
  margin: 7px 0 0;
  font-size: 1.28rem;
  letter-spacing: -0.02em;
}

.project-list,
.message-list,
.agenda-list {
  display: grid;
  gap: 12px;
}

.project-card {
  border-radius: 20px;
  border: 1px solid var(--border);
  background: rgba(255,255,255,0.74);
  padding: 16px;
  display: grid;
  gap: 10px;
  cursor: pointer;
  transition: transform 180ms ease, border-color 180ms ease, box-shadow 180ms ease, background-color 180ms ease;
}

.project-card:hover {
  transform: translateY(-1px);
  border-color: rgba(143, 67, 13, 0.26);
  box-shadow: var(--shadow-soft);
}

.project-card.is-active {
  border-color: rgba(143, 67, 13, 0.34);
  background: linear-gradient(180deg, rgba(255,255,255,0.92), rgba(255,248,239,0.92));
  box-shadow: 0 16px 32px rgba(143, 67, 13, 0.1);
}

.project-card-top {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: flex-start;
}

.project-card h4 {
  margin: 0;
  font-size: 1.05rem;
}

.project-meta {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  color: var(--muted);
  font-size: 0.92rem;
}

.tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 10px;
  border-radius: 999px;
  background: rgba(34, 197, 94, 0.09);
  color: var(--success);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.04em;
}

.tag.warn { background: rgba(211, 139, 75, 0.11); color: var(--accent); }
.tag.muted { background: rgba(107, 79, 58, 0.09); color: var(--muted); }

.workspace-main {
  display: grid;
  gap: 18px;
}

.main-hero {
  padding: 28px;
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) auto;
  gap: 24px;
  align-items: end;
}

.main-hero h2 {
  font-size: clamp(2.7rem, 4.8vw, 4.9rem);
  max-width: 14ch;
}

.hero-metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(92px, 1fr));
  gap: 12px;
}

.hero-metrics article {
  min-width: 0;
  padding: 16px;
  border-radius: 18px;
  background: rgba(255,255,255,0.7);
  border: 1px solid var(--border);
  text-align: center;
}

.hero-metrics strong {
  display: block;
  font-size: 1.5rem;
  font-weight: 900;
  color: var(--accent);
}

.hero-metrics span {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 0.9rem;
}

.detail-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(0, 0.95fr);
  gap: 18px;
  align-items: start;
}

.panel {
  padding: 24px;
  display: grid;
  gap: 18px;
}

.panel-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.panel-note {
  margin: 0;
  padding: 14px 16px;
  border-radius: 16px;
  background: rgba(143, 67, 13, 0.06);
  border: 1px solid rgba(143, 67, 13, 0.12);
}

.agenda-list {
  gap: 14px;
}

.agenda-item {
  border-radius: 22px;
  border: 1px solid var(--border);
  background: rgba(255,255,255,0.84);
  padding: 16px;
  display: grid;
  gap: 14px;
}

.agenda-item-top,
.agenda-fields {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
}

.agenda-time-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.agenda-item label {
  display: grid;
  gap: 7px;
}

.agenda-item label span {
  font-size: 0.83rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted-2);
  font-weight: 800;
}

.agenda-item input,
.agenda-item textarea,
.agenda-item select {
  width: 100%;
  border: 1px solid rgba(107, 79, 58, 0.16);
  border-radius: 14px;
  background: rgba(255,255,255,0.94);
  padding: 12px 13px;
  color: var(--text);
}

.agenda-details { min-width: 0; }

.agenda-item textarea {
  min-height: 94px;
  resize: vertical;
}

.agenda-remove {
  align-self: start;
  justify-self: end;
  padding: 11px 14px;
  border-radius: 999px;
  background: rgba(178, 77, 58, 0.1);
  color: var(--danger);
  border: 1px solid rgba(178, 77, 58, 0.16);
  font-weight: 800;
}

.agenda-remove:hover { transform: translateY(-1px); }

.message-list {
  min-height: 240px;
  max-height: 640px;
  overflow: auto;
  padding-right: 4px;
}

.message-bubble {
  width: min(86%, 680px);
  justify-self: start;
  border-radius: 20px;
  padding: 14px 16px;
  border: 1px solid var(--border);
  background: rgba(255,255,255,0.78);
  display: grid;
  gap: 8px;
}

.message-bubble.is-admin {
  background: linear-gradient(180deg, rgba(143, 67, 13, 0.09), rgba(255,255,255,0.82));
  border-color: rgba(143, 67, 13, 0.16);
}

.message-bubble:not(.is-admin) {
  justify-self: end;
  color: #fff;
  background: linear-gradient(135deg, var(--accent), #a95318);
  border-color: transparent;
  box-shadow: 0 12px 30px rgba(143, 67, 13, 0.16);
}

.message-bubble:not(.is-admin) .message-bubble-top,
.message-bubble:not(.is-admin) strong {
  color: rgba(255,255,255,0.88);
}

.message-bubble-top {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  font-size: 0.86rem;
  color: var(--muted);
}

.message-bubble strong { color: var(--text); }

/* Les messages écrits par les futurs mariés restent lisibles sur le fond brun. */
.message-bubble:not(.is-admin),
.message-bubble:not(.is-admin) .message-bubble-top,
.message-bubble:not(.is-admin) .message-bubble-top strong,
.message-bubble:not(.is-admin) .message-bubble-top time,
.message-bubble:not(.is-admin) p {
  color: #fff;
}

.message-bubble p {
  margin: 0;
  line-height: 1.7;
}

.message-form {
  display: grid;
  gap: 12px;
  border-top: 1px solid var(--border);
  padding-top: 16px;
}

.message-form textarea {
  min-height: 110px;
  resize: vertical;
  width: 100%;
  border: 1px solid rgba(107, 79, 58, 0.16);
  border-radius: 16px;
  background: rgba(255,255,255,0.92);
  padding: 13px 14px;
}

.message-attachment-tools { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; }
.message-attachment-tools input[type="file"] { position: absolute; width: 1px; height: 1px; overflow: hidden; opacity: 0; pointer-events: none; }
.message-attachment-button { display: inline-flex; align-items: center; min-height: 36px; padding: 8px 12px; border: 1px solid rgba(107, 79, 58, .2); border-radius: 9px; color: var(--accent); background: #fff; font-size: 11px; font-weight: 750; cursor: pointer; }
.message-attachment-button:hover { border-color: var(--accent); }
.message-attachment-tools > small { color: var(--muted); font-size: 9px; }
.message-upload-queue { flex-basis: 100%; display: flex; flex-wrap: wrap; gap: 6px; }
.message-upload-queue span { padding: 5px 8px; border-radius: 7px; color: var(--muted); background: rgba(143, 67, 13, .07); font-size: 9px; }
.message-attachments { display: grid; gap: 6px; margin-top: 3px; }
.message-attachment { width: 100%; display: grid; grid-template-columns: 28px minmax(0, 1fr); gap: 8px; align-items: center; padding: 8px; border: 1px solid rgba(107, 79, 58, .16); border-radius: 9px; color: var(--text); background: rgba(255,255,255,.92); text-align: left; cursor: pointer; }
.message-attachment > span:first-child { width: 28px; height: 28px; display: grid; place-items: center; border-radius: 7px; color: #fff; background: var(--accent); }
.message-attachment strong, .message-attachment small { display: block; overflow: hidden; color: inherit !important; text-overflow: ellipsis; white-space: nowrap; }
.message-attachment strong { font-size: 10px; }
.message-attachment small { margin-top: 2px; opacity: .72; font-size: 8px; }

.create-card {
  display: grid;
  gap: 18px;
}

.create-card-head h3 {
  margin: 9px 0 8px;
  font-size: 1.45rem;
}

.created-link {
  padding: 16px;
  border-radius: 20px;
  background: rgba(143, 67, 13, 0.08);
  border: 1px solid rgba(143, 67, 13, 0.14);
  display: grid;
  gap: 14px;
}

.created-link p {
  margin: 0;
  word-break: break-word;
  line-height: 1.65;
}

.inline-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.workspace[data-mode="admin"] .portal-topbar-chip::after {
  content: " - Maxime";
  opacity: 0.72;
}

.workspace[data-mode="client"] .portal-topbar-chip::after {
  content: " - Client";
  opacity: 0.72;
}

.workspace[data-mode="client"] .create-card,
.workspace[data-mode="client"] .portal-topbar-actions,
.workspace[data-mode="client"] #projectListTitle::after {
  display: none;
}

.workspace[data-mode="client"] .workspace-sidebar {
  top: 20px;
}

.workspace[data-mode="client"] .panel-actions .portal-ghost-button,
.workspace[data-mode="client"] .panel-actions .portal-primary-button {
  display: none;
}

@media (max-width: 1180px) {
  .auth-stage,
  .workspace,
  .detail-grid {
    grid-template-columns: 1fr;
  }

  .workspace-sidebar {
    position: static;
  }

  .main-hero {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 900px) {
  .portal-topbar {
    grid-template-columns: 1fr;
  }

  .portal-topbar-actions {
    justify-content: flex-start;
  }

  .auth-hero,
  .auth-card,
  .sidebar-hero,
  .create-card,
  .project-list-panel,
  .panel,
  .main-hero {
    padding: 20px;
  }

  .auth-highlights {
    grid-template-columns: 1fr;
  }

  .hero-metrics {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .agenda-item-top,
  .agenda-fields,
  .agenda-time-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .portal-frame {
    padding-inline: 12px;
  }

  .portal-logo {
    width: 150px;
  }

  .hero-metrics {
    grid-template-columns: 1fr;
  }

  .auth-hero h1,
  .main-hero h2,
  .sidebar-hero h2 {
    max-width: none;
  }
}

/* Espace futurs mariés — même langage d'interface que la régie Maxime. */
body[data-mode="client"] {
  --client-paper: #f4f0e9;
  --client-surface: #fffdf9;
  --client-surface-muted: #eee8de;
  --client-ink: #1e1c1a;
  --client-muted: #756f68;
  --client-line: #ded7cc;
  --client-line-dark: #cbc1b3;
  --client-graphite: #242423;
  --client-graphite-2: #30302e;
  --client-copper: #a75222;
  --client-copper-dark: #813b17;
  --client-sage: #587263;
  --client-sidebar: 264px;
  --client-topbar: 88px;
  color: var(--client-ink);
  background: var(--client-paper);
  font-family: "DM Sans", system-ui, sans-serif;
}

body[data-mode="client"].has-dashboard::before,
body[data-mode="client"].has-dashboard .portal-background,
body[data-mode="client"].has-dashboard .portal-topbar {
  display: none;
}

.workspace[data-mode="client"] {
  position: fixed;
  z-index: 80;
  inset: 0;
  display: block;
  margin: 0;
  overflow: auto;
  background: var(--client-paper);
}

.workspace[data-mode="client"] .workspace-sidebar {
  position: fixed;
  z-index: 90;
  inset: 0 auto 0 0;
  width: var(--client-sidebar);
  display: flex;
  flex-direction: column;
  gap: 0;
  padding: 22px 16px 16px;
  overflow-y: auto;
  color: #f6f2ec;
  background: var(--client-graphite);
  border-right: 1px solid rgba(255, 255, 255, .06);
}

.client-sidebar-head {
  min-height: 56px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 8px;
}

.client-sidebar-logo img {
  width: 164px;
  max-height: 58px;
  object-fit: contain;
  object-position: left center;
}

.client-icon-button {
  width: 38px;
  height: 38px;
  display: inline-grid;
  place-items: center;
  padding: 0;
  border: 1px solid var(--client-line);
  border-radius: 8px;
  color: var(--client-ink);
  background: transparent;
  cursor: pointer;
}

.client-icon-button svg,
.client-nav-item svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.client-sidebar-close { display: none; color: #fff; border-color: rgba(255,255,255,.12); font-size: 25px; }

.workspace[data-mode="client"] .sidebar-hero {
  min-height: auto;
  margin: 25px 0 18px;
  padding: 15px;
  color: #e8dfd5;
  background: var(--client-graphite-2);
  border: 1px solid rgba(255,255,255,.07);
  border-radius: 10px;
  box-shadow: none;
  backdrop-filter: none;
}

.workspace[data-mode="client"] .sidebar-hero-eyebrow {
  display: block;
  color: #a9a49d;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
}

.workspace[data-mode="client"] .sidebar-hero h2 {
  margin: 7px 0 5px;
  color: #fff;
  font: 500 20px/1.15 "Newsreader", Georgia, serif;
}

.workspace[data-mode="client"] .sidebar-hero p {
  color: #9f9a93;
  font-size: 10px;
  line-height: 1.5;
}

.client-main-nav { display: grid; gap: 3px; }

.client-nav-item {
  min-height: 45px;
  display: grid;
  grid-template-columns: 24px 1fr auto;
  gap: 10px;
  align-items: center;
  padding: 0 12px;
  border-radius: 8px;
  color: #aaa69f;
  font-size: 13px;
  font-weight: 600;
  transition: color .18s ease, background-color .18s ease;
}

.client-nav-item:hover,
.client-nav-item.is-active { color: #fff; background: rgba(200,121,71,.18); }
.client-nav-item svg { color: #dc8a57; }
.client-nav-item b { min-width: 22px; padding: 2px 6px; border-radius: 10px; color: #c9c5bf; background: rgba(255,255,255,.07); font-size: 10px; text-align: center; }

.workspace[data-mode="client"] .project-list-panel {
  margin-top: 18px;
  padding: 15px;
  background: rgba(255,255,255,.035);
  border: 1px solid rgba(255,255,255,.07);
  border-radius: 10px;
  box-shadow: none;
  backdrop-filter: none;
}

.workspace[data-mode="client"] .project-list-panel .section-head { align-items: center; }
.workspace[data-mode="client"] .project-list-panel .portal-kicker { margin: 0 0 4px; color: #dc8a57; font-size: 8px; }
.workspace[data-mode="client"] .project-list-panel h3 { margin: 0; color: #fff; font: 500 16px "Newsreader", Georgia, serif; }
.workspace[data-mode="client"] .section-count { padding: 3px 7px; color: #d8d3cb; background: rgba(255,255,255,.07); border: 0; font-size: 9px; }
.workspace[data-mode="client"] .project-list { gap: 8px; }
.workspace[data-mode="client"] .project-card { padding: 11px 0 0; border: 0; border-top: 1px solid rgba(255,255,255,.08); border-radius: 0; color: #fff; background: transparent; box-shadow: none; }
.workspace[data-mode="client"] .project-card:hover { transform: none; box-shadow: none; }
.workspace[data-mode="client"] .project-card h4 { font: 500 14px/1.25 "Newsreader", Georgia, serif; }
.workspace[data-mode="client"] .project-card .project-meta { color: #9f9a93; font-size: 8px; }
.workspace[data-mode="client"] .project-card .tag { display: none; }

.client-sidebar-foot {
  display: grid;
  grid-template-columns: 38px 1fr 34px;
  gap: 10px;
  align-items: center;
  margin-top: auto;
  padding: 17px 6px 3px;
  border-top: 1px solid rgba(255,255,255,.08);
}

.client-avatar { width: 36px; height: 36px; display: grid; place-items: center; border-radius: 50%; color: #fff; background: var(--client-copper); font-size: 11px; font-weight: 700; }
.client-sidebar-foot strong, .client-sidebar-foot span { display: block; }
.client-sidebar-foot strong { color: #fff; font-size: 11px; }
.client-sidebar-foot span { margin-top: 2px; color: #8f8b85; font-size: 10px; }
.client-sidebar-foot .client-icon-button { width: 34px; height: 34px; color: #aaa69f; border: 0; }
.client-sidebar-scrim { display: none; }

.workspace[data-mode="client"] .workspace-main {
  min-height: 100vh;
  display: block;
  margin-left: var(--client-sidebar);
}

.client-app-topbar {
  position: sticky;
  z-index: 40;
  top: 0;
  height: var(--client-topbar);
  display: grid;
  grid-template-columns: minmax(220px, 1fr) auto;
  gap: 20px;
  align-items: center;
  padding: 0 clamp(24px, 4vw, 54px);
  background: rgba(244,240,233,.94);
  border-bottom: 1px solid var(--client-line);
  backdrop-filter: blur(12px);
}

.client-page-identity span { display: block; color: var(--client-muted); font-size: 10px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; }
.client-page-identity h1 { margin: 4px 0 0; font-size: 18px; line-height: 1.2; }
.client-topbar-status { display: inline-flex; align-items: center; gap: 8px; color: var(--client-muted); font-size: 11px; font-weight: 600; }
.client-topbar-status i { width: 7px; height: 7px; border-radius: 50%; background: var(--client-sage); box-shadow: 0 0 0 4px rgba(88,114,99,.12); }
.client-menu-toggle { display: none; }

.workspace[data-mode="client"] .main-hero,
.workspace[data-mode="client"] .detail-grid {
  width: calc(100% - clamp(48px, 8vw, 108px));
  max-width: 1432px;
  margin-right: auto;
  margin-left: auto;
}

.workspace[data-mode="client"] .main-hero {
  scroll-margin-top: calc(var(--client-topbar) + 18px);
  padding: clamp(34px, 5vw, 64px) 0 30px;
  align-items: end;
  background: transparent;
  border: 0;
  border-bottom: 1px solid var(--client-line-dark);
  border-radius: 0;
  box-shadow: none;
  backdrop-filter: none;
}

.workspace[data-mode="client"] .main-hero .portal-kicker { margin-bottom: 10px; color: var(--client-copper); font-size: 9px; letter-spacing: .13em; }
.workspace[data-mode="client"] .main-hero h2 { max-width: 16ch; color: var(--client-ink); font: 600 clamp(38px, 4.7vw, 62px)/.98 "Newsreader", Georgia, serif; letter-spacing: -.035em; }
.workspace[data-mode="client"] #selectedProjectMeta { max-width: 68ch; margin: 13px 0 0; color: var(--client-muted); font-size: 12px; line-height: 1.6; }

.workspace[data-mode="client"] .hero-metrics { gap: 0; background: var(--client-surface); border: 1px solid var(--client-line); }
.workspace[data-mode="client"] .hero-metrics article { min-width: 112px; min-height: 105px; display: grid; align-content: end; padding: 18px; border: 0; border-right: 1px solid var(--client-line); border-radius: 0; background: transparent; }
.workspace[data-mode="client"] .hero-metrics article:last-child { border-right: 0; }
.workspace[data-mode="client"] .hero-metrics strong { color: var(--client-ink); font: 600 31px/1 "Newsreader", Georgia, serif; text-transform: capitalize; }
.workspace[data-mode="client"] .hero-metrics span { color: var(--client-muted); font-size: 9px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; }

.workspace[data-mode="client"] .detail-grid { grid-template-columns: minmax(0, 1.28fr) minmax(340px, .72fr); gap: 20px; padding: 20px 0 54px; }
.workspace[data-mode="client"] .panel { scroll-margin-top: calc(var(--client-topbar) + 18px); padding: 24px; gap: 18px; background: var(--client-surface); border: 1px solid var(--client-line); border-radius: 14px; box-shadow: 0 18px 50px rgba(43,35,28,.06); backdrop-filter: none; }
.workspace[data-mode="client"] .workspace-main .section-head h3 { margin: 4px 0 0; color: var(--client-ink); font: 600 23px/1.15 "Newsreader", Georgia, serif; }
.workspace[data-mode="client"] .section-head .portal-kicker { margin: 0; color: var(--client-copper); font-size: 9px; letter-spacing: .12em; }
.workspace[data-mode="client"] .panel-note { padding: 12px 14px; color: var(--client-muted); background: var(--client-surface-muted); border: 0; border-radius: 8px; font-size: 10px; }

.workspace[data-mode="client"] .panel-actions .portal-ghost-button,
.workspace[data-mode="client"] .panel-actions .portal-primary-button { display: inline-flex; align-items: center; justify-content: center; }
.workspace[data-mode="client"] .portal-ghost-button,
.workspace[data-mode="client"] .portal-primary-button { min-height: 40px; padding: 0 14px; border-radius: 8px; font-size: 10px; font-weight: 700; box-shadow: none; }
.workspace[data-mode="client"] .portal-ghost-button { color: var(--client-ink); background: transparent; border: 1px solid var(--client-line-dark); }
.workspace[data-mode="client"] .portal-primary-button { color: #fff; background: var(--client-copper); }

.workspace[data-mode="client"] .agenda-list { position: relative; gap: 0; }
.workspace[data-mode="client"] .agenda-list::before { content: ""; position: absolute; top: 0; bottom: 0; left: 91px; width: 1px; background: var(--client-line-dark); }
.workspace[data-mode="client"] .agenda-item { position: relative; grid-template-columns: 74px minmax(0, 1fr); gap: 18px; padding: 16px 0; border: 0; border-top: 1px solid var(--client-line); border-radius: 0; background: transparent; }
.workspace[data-mode="client"] .agenda-item::before { content: ""; position: absolute; z-index: 1; top: 27px; left: 87px; width: 7px; height: 7px; border: 2px solid var(--client-surface); border-radius: 50%; background: var(--client-copper); box-shadow: 0 0 0 1px var(--client-copper); }
.workspace[data-mode="client"] .agenda-item-top { display: contents; }
.workspace[data-mode="client"] .agenda-time-grid { grid-column: 1; grid-row: 1 / span 2; display: grid; grid-template-columns: 1fr; gap: 5px; }
.workspace[data-mode="client"] .agenda-fields { grid-column: 2; display: grid; grid-template-columns: minmax(160px, 1fr) 120px; gap: 10px; }
.workspace[data-mode="client"] .agenda-details { grid-column: 2; }
.workspace[data-mode="client"] .agenda-remove { position: absolute; right: 0; bottom: 16px; padding: 0; border: 0; color: #9d5b5b; background: transparent; font-size: 9px; }
.workspace[data-mode="client"] .agenda-item label { gap: 4px; }
.workspace[data-mode="client"] .agenda-item label span { color: var(--client-muted); font-size: 8px; letter-spacing: .06em; }
.workspace[data-mode="client"] .agenda-item input,
.workspace[data-mode="client"] .agenda-item textarea,
.workspace[data-mode="client"] .agenda-item select { padding: 8px 9px; color: var(--client-ink); background: #fff; border: 1px solid var(--client-line); border-radius: 6px; font-size: 10px; }
.workspace[data-mode="client"] .agenda-item textarea { min-height: 58px; padding-right: 58px; }

.workspace[data-mode="client"] .message-panel { overflow: hidden; }
.workspace[data-mode="client"] .message-list { min-height: 390px; max-height: 590px; align-content: end; gap: 12px; margin: 0 -24px; padding: 22px; background: #f9f6f1; border-top: 1px solid var(--client-line); border-bottom: 1px solid var(--client-line); }
.workspace[data-mode="client"] .message-bubble { width: auto; max-width: min(78%, 560px); padding: 12px 14px; gap: 7px; border: 1px solid var(--client-line); border-radius: 4px 12px 12px 12px; background: #fff; box-shadow: none; }
.workspace[data-mode="client"] .message-bubble.is-admin { justify-self: start; color: var(--client-ink); background: #fff; border-color: var(--client-line); }
.workspace[data-mode="client"] .message-bubble:not(.is-admin) { justify-self: end; color: #fff; background: var(--client-graphite); border-color: var(--client-graphite); border-radius: 12px 4px 12px 12px; }
.workspace[data-mode="client"] .message-bubble-top { color: #8d867e; font-size: 8px; }
.workspace[data-mode="client"] .message-bubble strong { color: inherit; }
.workspace[data-mode="client"] .message-bubble p { color: inherit; font-size: 11px; line-height: 1.55; }
.workspace[data-mode="client"] .message-form { grid-template-columns: 1fr auto; align-items: end; gap: 10px; padding: 0; border: 0; }
.workspace[data-mode="client"] .message-attachment-tools { grid-column: 1 / -1; }
.workspace[data-mode="client"] .message-form label span { display: none; }
.workspace[data-mode="client"] .message-form textarea { min-height: 52px; max-height: 130px; padding: 12px; border: 1px solid var(--client-line-dark); border-radius: 8px; color: var(--client-ink); background: #fff; font-size: 11px; }
.workspace[data-mode="client"] .message-form .portal-primary-button { height: 52px; }
.workspace[data-mode="client"] .message-form .portal-status { grid-column: 1 / -1; min-height: 0; font-size: 10px; }

@media (max-width: 1080px) {
  .workspace[data-mode="client"] .detail-grid { grid-template-columns: 1fr; }
}

@media (max-width: 900px) {
  .workspace[data-mode="client"] .workspace-sidebar { transform: translateX(-102%); box-shadow: 20px 0 50px rgba(0,0,0,.25); transition: transform .22s ease; }
  .workspace[data-mode="client"].is-sidebar-open .workspace-sidebar { transform: none; }
  .client-sidebar-close { display: inline-grid; }
  .client-sidebar-scrim { position: fixed; z-index: 85; inset: 0; display: block; opacity: 0; pointer-events: none; border: 0; background: rgba(28,26,24,.55); transition: opacity .22s ease; }
  .workspace[data-mode="client"].is-sidebar-open .client-sidebar-scrim { opacity: 1; pointer-events: auto; }
  .workspace[data-mode="client"] .workspace-main { margin-left: 0; }
  .client-app-topbar { grid-template-columns: 42px minmax(0,1fr) auto; padding: 0 20px; }
  .client-menu-toggle { display: inline-grid; }
}

@media (max-width: 680px) {
  body[data-mode="client"] { --client-topbar: 72px; }
  .client-app-topbar { padding: 0 14px; gap: 10px; }
  .client-page-identity span { display: none; }
  .client-page-identity h1 { font-size: 15px; }
  .client-topbar-status span { display: none; }
  .workspace[data-mode="client"] .main-hero,
  .workspace[data-mode="client"] .detail-grid { width: calc(100% - 30px); }
  .workspace[data-mode="client"] .main-hero { grid-template-columns: 1fr; padding-top: 32px; }
  .workspace[data-mode="client"] .main-hero h2 { max-width: none; font-size: 42px; }
  .workspace[data-mode="client"] .hero-metrics { grid-template-columns: repeat(3, 1fr); }
  .workspace[data-mode="client"] .hero-metrics article { min-width: 0; min-height: 92px; padding: 12px; }
  .workspace[data-mode="client"] .hero-metrics strong { font-size: 24px; }
  .workspace[data-mode="client"] .hero-metrics span { font-size: 7px; }
  .workspace[data-mode="client"] .panel { padding: 17px; }
  .workspace[data-mode="client"] .section-head { display: grid; }
  .workspace[data-mode="client"] .panel-actions { justify-content: start; }
  .workspace[data-mode="client"] .agenda-list::before,
  .workspace[data-mode="client"] .agenda-item::before { display: none; }
  .workspace[data-mode="client"] .agenda-item { grid-template-columns: 1fr; gap: 10px; }
  .workspace[data-mode="client"] .agenda-time-grid { grid-column: 1; grid-row: auto; grid-template-columns: repeat(2,1fr); }
  .workspace[data-mode="client"] .agenda-fields,
  .workspace[data-mode="client"] .agenda-details { grid-column: 1; }
  .workspace[data-mode="client"] .agenda-fields { grid-template-columns: 1fr; }
  .workspace[data-mode="client"] .message-list { min-height: 360px; margin-right: -17px; margin-left: -17px; padding: 17px; }
  .workspace[data-mode="client"] .message-bubble { max-width: 88%; }
  .workspace[data-mode="client"] .message-form { grid-template-columns: 1fr; }
  .workspace[data-mode="client"] .message-form .portal-primary-button { width: 100%; }
}

/* Mariage collaboratif : fils, équipe, album et agenda multi-jours */
.conversation-topic-list { display: flex; gap: 7px; overflow-x: auto; margin: 0 -24px; padding: 13px 24px; border-top: 1px solid var(--client-line); scrollbar-width: thin; }
.conversation-topic-list button { flex: 0 0 auto; padding: 8px 12px; border: 1px solid var(--client-line-dark); border-radius: 999px; color: var(--client-muted); background: #fff; font: 700 9px "DM Sans",sans-serif; cursor: pointer; }
.conversation-topic-list button.is-active { color: #fff; border-color: var(--client-copper); background: var(--client-copper); }
.agenda-date { min-width: 140px; }
.agenda-item-top { align-items: end; }
.workspace[data-mode="client"] .agenda-list::before { left: 227px; }
.workspace[data-mode="client"] .agenda-item { grid-template-columns: 118px 74px minmax(0,1fr); }
.workspace[data-mode="client"] .agenda-date { grid-column: 1; grid-row: 1; align-self: start; min-width: 0; }
.workspace[data-mode="client"] .agenda-time-grid { grid-column: 2; }
.workspace[data-mode="client"] .agenda-fields,.workspace[data-mode="client"] .agenda-details { grid-column: 3; }
.workspace[data-mode="client"] .agenda-item::before { left: 223px; }
.agenda-day-separator { display: flex; align-items: center; gap: 12px; margin: 18px 0 2px; color: var(--client-copper); font: 700 10px "DM Sans",sans-serif; letter-spacing: .1em; text-transform: uppercase; }
.agenda-day-separator::after { content: ""; flex: 1; height: 1px; background: var(--client-line-dark); }
.client-photo-panel,.client-team-panel { width: min(1420px,calc(100% - 48px)); margin: 0 auto 22px; }
.photo-admin-badge { padding: 7px 11px; border-radius: 999px; color: #fff; background: var(--client-sage); font-size: 9px; font-weight: 700; }
.photo-room-summary { display: grid; grid-template-columns: 280px 1fr; gap: 28px; align-items: center; padding: 23px; color: #fff; background: #242423; border-radius: 12px; }
.photo-room-summary > div:first-child span,.photo-room-summary > div:first-child strong,.photo-room-summary > div:first-child small { display: block; }
.photo-room-summary > div:first-child span { color: #aaa49b; font-size: 9px; text-transform: uppercase; letter-spacing: .1em; }
.photo-room-summary > div:first-child strong { margin: 5px 0; font: 600 35px "Newsreader",serif; letter-spacing: .14em; }
.photo-room-summary small { color: #aaa49b; font-size: 9px; }
.photo-storage > div:first-child { display: flex; justify-content: space-between; gap: 15px; }
.photo-storage-track { height: 7px; margin-top: 13px; overflow: hidden; background: #3c3b39; }
.photo-storage-track i { display: block; width: 0; height: 100%; background: linear-gradient(90deg,var(--client-copper),#e58a51); }
.client-photo-gallery { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 14px; margin-top: 20px; }
.client-photo-card { overflow: hidden; border: 1px solid var(--client-line); border-radius: 10px; background: #fff; }
.client-photo-card img,.client-photo-video { width: 100%; height: 190px; display: grid; place-items: center; object-fit: cover; color: #fff; background: #242423; }
.client-photo-video { font: 600 24px "Newsreader",serif; }
.client-photo-card footer { display: grid; gap: 8px; padding: 12px; }
.client-photo-card footer strong { overflow: hidden; font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.client-photo-card footer div { display: flex; justify-content: space-between; gap: 8px; color: var(--client-muted); font-size: 8px; }
.client-photo-actions { display: flex; gap: 7px; }
.client-photo-actions button { flex: 1; padding: 8px; border: 1px solid var(--client-line-dark); border-radius: 6px; background: #fff; font-size: 8px; font-weight: 700; cursor: pointer; }
.client-photo-actions .is-danger { color: #9d342b; border-color: #e5c7c2; background: #fff8f7; }
.collaborator-form { display: grid; grid-template-columns: 1fr 1.2fr 1fr auto; gap: 12px; align-items: end; }
.collaborator-form label { display: grid; gap: 6px; color: var(--client-muted); font-size: 9px; font-weight: 700; }
.collaborator-form input { width: 100%; height: 43px; padding: 0 11px; border: 1px solid var(--client-line-dark); border-radius: 7px; background: #fff; }
.collaborator-list { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 10px; margin-top: 18px; }
.collaborator-card { display: flex; align-items: center; gap: 11px; padding: 13px; border: 1px solid var(--client-line); border-radius: 9px; background: #fff; }
.collaborator-card i { width: 34px; height: 34px; display: grid; place-items: center; border-radius: 50%; color: #fff; background: var(--client-copper); font-style: normal; font-size: 10px; font-weight: 800; }
.collaborator-card span,.collaborator-card strong,.collaborator-card small { min-width: 0; display: block; }
.collaborator-card strong { font-size: 10px; }.collaborator-card span { color: var(--client-muted); font-size: 8px; }.collaborator-card small { margin-left: auto; color: var(--client-sage); font-size: 8px; }
@media(max-width:900px){.client-photo-gallery{grid-template-columns:repeat(2,minmax(0,1fr))}.collaborator-form{grid-template-columns:1fr 1fr}.collaborator-list{grid-template-columns:1fr 1fr}}
@media(max-width:600px){.agenda-item-top{display:grid}.agenda-date{min-width:0}.workspace[data-mode="client"] .agenda-list::before{display:none}.workspace[data-mode="client"] .agenda-item{grid-template-columns:1fr}.workspace[data-mode="client"] .agenda-date,.workspace[data-mode="client"] .agenda-time-grid,.workspace[data-mode="client"] .agenda-fields,.workspace[data-mode="client"] .agenda-details{grid-column:1;grid-row:auto}.client-photo-panel,.client-team-panel{width:calc(100% - 30px)}.photo-room-summary{grid-template-columns:1fr}.client-photo-gallery,.collaborator-form,.collaborator-list{grid-template-columns:1fr}.conversation-topic-list{margin-right:-17px;margin-left:-17px;padding-right:17px;padding-left:17px}}

/* Vues dédiées de l'espace mariés */
.workspace[data-mode="client"][data-client-view="overview"] .detail-grid,
.workspace[data-mode="client"][data-client-view="photos"] .detail-grid,
.workspace[data-mode="client"][data-client-view="team"] .detail-grid { display: none; }
.workspace[data-mode="client"] .detail-grid { grid-template-columns: minmax(0,1fr); padding-top: 28px; }
.workspace[data-mode="client"] .agenda-panel,
.workspace[data-mode="client"] .message-panel { width: 100%; min-width: 0; }
.workspace[data-mode="client"] .agenda-panel { padding: 30px 34px 36px; }
.workspace[data-mode="client"] .agenda-panel > .section-head { margin-bottom: 20px; padding-bottom: 22px; border-bottom: 1px solid var(--client-line); }
.workspace[data-mode="client"] .agenda-panel > .section-head h3 { font-size: clamp(28px,3vw,40px); line-height: 1; }
.workspace[data-mode="client"] .agenda-panel .panel-note { margin-bottom: 24px; padding: 14px 16px; font-size: 11px; line-height: 1.55; }
.workspace[data-mode="client"] .agenda-list::before { left: 255px; }
.workspace[data-mode="client"] .agenda-item { grid-template-columns: 140px 92px minmax(0,1fr); gap: 24px; padding: 23px 0; }
.workspace[data-mode="client"] .agenda-item::before { top: 35px; left: 251px; width: 8px; height: 8px; }
.workspace[data-mode="client"] .agenda-time-grid { gap: 10px; }
.workspace[data-mode="client"] .agenda-fields { grid-template-columns: minmax(240px,1fr) 150px; gap: 14px; }
.workspace[data-mode="client"] .agenda-item label { gap: 7px; }
.workspace[data-mode="client"] .agenda-item label span { color: #69635d; font-size: 9px; font-weight: 800; }
.workspace[data-mode="client"] .agenda-item input,
.workspace[data-mode="client"] .agenda-item textarea,
.workspace[data-mode="client"] .agenda-item select { min-height: 43px; padding: 10px 12px; border-color: #cfc6ba; font-size: 12px; }
.workspace[data-mode="client"] .agenda-item textarea { min-height: 76px; line-height: 1.5; }
.workspace[data-mode="client"] .agenda-day-separator { margin: 30px 0 8px; padding: 11px 14px; border: 1px solid #ddd3c7; border-radius: 7px; color: #7d3d1b; background: #f5ede5; font-size: 11px; }
.workspace[data-mode="client"] .agenda-day-separator::after { background: #cdbdad; }
.workspace[data-mode="client"] .agenda-remove { right: 3px; bottom: 24px; min-height: auto; padding: 5px 8px; border: 1px solid #e5c7c2; border-radius: 5px; background: #fff8f7; }
.workspace[data-mode="client"] .message-panel { max-width: 980px; min-height: 680px; margin: 0 auto; padding: 30px; }
.workspace[data-mode="client"] .message-panel > .section-head h3 { font-size: clamp(28px,3vw,40px); }
.workspace[data-mode="client"] .message-list { min-height: 430px; max-height: 58vh; }
.workspace[data-mode="client"] .client-view-section { animation: client-view-in .22s ease-out; }
@keyframes client-view-in { from { opacity: 0; transform: translateY(5px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .workspace[data-mode="client"] .client-view-section { animation: none; } }
@media(max-width:980px){.workspace[data-mode="client"] .agenda-list::before{display:none}.workspace[data-mode="client"] .agenda-item{grid-template-columns:130px 90px minmax(0,1fr);gap:15px}.workspace[data-mode="client"] .agenda-item::before{display:none}.workspace[data-mode="client"] .agenda-fields{grid-template-columns:1fr 130px}}
@media(max-width:720px){.workspace[data-mode="client"] .detail-grid{padding-top:15px}.workspace[data-mode="client"] .agenda-panel,.workspace[data-mode="client"] .message-panel{padding:20px 17px}.workspace[data-mode="client"] .agenda-item{grid-template-columns:1fr;gap:12px}.workspace[data-mode="client"] .agenda-date,.workspace[data-mode="client"] .agenda-time-grid,.workspace[data-mode="client"] .agenda-fields,.workspace[data-mode="client"] .agenda-details{grid-column:1;grid-row:auto}.workspace[data-mode="client"] .agenda-time-grid{grid-template-columns:repeat(2,1fr)}.workspace[data-mode="client"] .agenda-fields{grid-template-columns:1fr}.workspace[data-mode="client"] .agenda-remove{position:static;justify-self:start}.workspace[data-mode="client"] .message-panel{min-height:0}}

body.password-setup-open { overflow: hidden; }

.password-setup-gate {
  position: fixed;
  z-index: 200;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 24px;
  background:
    linear-gradient(90deg, rgba(30,28,26,.92), rgba(30,28,26,.7)),
    url('/wp-content/uploads/2024/03/mariage-perez2.jpg') center / cover;
}

.password-setup-card {
  width: min(520px, 100%);
  padding: clamp(28px, 5vw, 48px);
  color: var(--client-ink, #1e1c1a);
  background: var(--client-surface, #fffdf9);
  border: 1px solid rgba(255,255,255,.22);
  border-radius: 14px;
  box-shadow: 0 30px 90px rgba(0,0,0,.3);
  font-family: "DM Sans", system-ui, sans-serif;
}

.password-setup-logo { display: inline-block; margin-bottom: 34px; }
.password-setup-logo img { width: 170px; max-height: 62px; object-fit: contain; object-position: left center; }
.password-setup-card h2 { margin: 8px 0 12px; font: 600 clamp(38px, 6vw, 52px)/.98 "Newsreader", Georgia, serif; letter-spacing: -.035em; }
.password-setup-card > p:not(.portal-kicker) { margin: 0 0 26px; color: var(--client-muted, #756f68); font-size: 13px; line-height: 1.65; }
.password-setup-card .stack-form input { border-color: var(--client-line-dark, #cbc1b3); border-radius: 8px; background: #fff; }
.password-setup-card .portal-primary-button { min-height: 48px; border-radius: 8px; background: var(--client-copper, #a75222); box-shadow: none; }
.password-requirements { display: flex; align-items: center; gap: 9px; color: var(--client-muted, #756f68); font-size: 10px; line-height: 1.45; }
.password-requirements i { flex: 0 0 auto; width: 7px; height: 7px; border-radius: 50%; background: var(--client-sage, #587263); }

@media (max-width: 640px) {
  .password-setup-gate { place-items: end center; padding: 12px; }
  .password-setup-card { padding: 28px 22px 32px; border-radius: 14px; }
  .password-setup-logo { margin-bottom: 24px; }
}

.guest-login-block { display: grid; gap: 17px; padding-top: 22px; border-top: 1px solid var(--border); }
.guest-login-heading h3 { margin: 12px 0 6px; font: 600 27px/1.05 "Newsreader", Georgia, serif; }
.guest-login-heading p { margin: 0; color: var(--muted); font-size: 12px; line-height: 1.6; }
.guest-code-form { display: grid; gap: 8px; }
.guest-code-form > label { color: var(--text); font-size: 12px; font-weight: 700; }
.guest-code-form > div { display: grid; grid-template-columns: 135px 1fr; gap: 10px; }
.guest-code-form input { width: 100%; height: 48px; padding: 0 15px; border: 1px solid var(--border-strong); border-radius: 12px; outline: 0; color: var(--text); background: #fff; font-size: 19px; font-weight: 800; letter-spacing: .18em; text-align: center; text-transform: uppercase; }
.guest-code-form input:focus { border-color: var(--accent); box-shadow: 0 0 0 4px rgba(143,67,13,.1); }

body.guest-room-open { overflow: hidden; }
.guest-room { position: fixed; z-index: 180; inset: 0; overflow-y: auto; color: #1e1c1a; background: #f4f0e9; font-family: "DM Sans", system-ui, sans-serif; }
.guest-room-header { position: sticky; z-index: 20; top: 0; min-height: 88px; display: grid; grid-template-columns: 220px 1fr auto; gap: 24px; align-items: center; padding: 12px clamp(20px,4vw,56px); background: rgba(244,240,233,.94); border-bottom: 1px solid #ded7cc; backdrop-filter: blur(14px); }
.guest-room-header > a img { width: 170px; max-height: 60px; object-fit: contain; object-position: left center; }
.guest-room-header > div { text-align: center; }
.guest-room-header > div span, .guest-room-header > div strong { display: block; }
.guest-room-header > div span { color: #756f68; font-size: 9px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; }
.guest-room-header > div strong { margin-top: 4px; font: 600 18px "Newsreader", Georgia, serif; }
.guest-room-main { width: min(1420px, calc(100% - 40px)); margin: 0 auto; padding: clamp(34px,5vw,70px) 0 70px; }
.guest-room-hero { display: grid; grid-template-columns: minmax(0,1.3fr) minmax(320px,.7fr); gap: clamp(30px,6vw,90px); align-items: end; padding-bottom: 34px; border-bottom: 1px solid #cbc1b3; }
.guest-room-hero h1 { max-width: 13ch; margin: 8px 0 13px; font: 600 clamp(48px,6vw,80px)/.92 "Newsreader", Georgia, serif; letter-spacing: -.045em; }
.guest-room-hero > div > p:last-child { max-width: 65ch; margin: 0; color: #756f68; font-size: 13px; line-height: 1.65; }
.guest-storage-card { padding: 24px; color: #fff; background: #242423; border-radius: 14px; box-shadow: 0 18px 50px rgba(43,35,28,.12); }
.guest-storage-card > div:first-child { display: flex; align-items: end; justify-content: space-between; gap: 18px; }
.guest-storage-card span { color: #aaa49b; font-size: 9px; font-weight: 700; letter-spacing: .11em; text-transform: uppercase; }
.guest-storage-card strong { font: 600 22px "Newsreader", Georgia, serif; }
.guest-storage-track { height: 6px; margin-top: 20px; overflow: hidden; background: rgba(255,255,255,.1); }
.guest-storage-track i { display: block; width: 0; height: 100%; background: linear-gradient(90deg,#a75222,#e58a51); transition: width .35s ease; }
.guest-storage-card small { display: block; margin-top: 9px; color: #a9a49d; font-size: 9px; text-align: right; }
.guest-upload-panel { display: grid; grid-template-columns: minmax(250px,.7fr) minmax(180px,.45fr) minmax(360px,1fr); gap: 22px; align-items: center; margin-top: 22px; padding: 26px; background: #fffdf9; border: 1px solid #ded7cc; border-radius: 14px; box-shadow: 0 18px 50px rgba(43,35,28,.06); }
.guest-upload-copy h2 { margin: 9px 0 6px; font: 600 28px/1 "Newsreader", Georgia, serif; }
.guest-upload-copy p { margin: 0; color: #756f68; font-size: 10px; line-height: 1.55; }
.guest-name-field { display: grid; gap: 7px; }
.guest-name-field span { font-size: 10px; font-weight: 700; }
.guest-name-field input { width: 100%; height: 46px; padding: 0 12px; border: 1px solid #cbc1b3; border-radius: 8px; outline: 0; background: #fff; }
.guest-dropzone { min-height: 120px; display: grid; grid-template-columns: 44px 1fr; grid-template-rows: auto auto; gap: 3px 13px; align-content: center; padding: 18px; border: 1px dashed #b98a6b; border-radius: 10px; color: #813b17; background: #fbf4ee; cursor: pointer; }
.guest-dropzone input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.guest-drop-icon { grid-row: 1 / 3; width: 42px; height: 42px; display: grid; place-items: center; border-radius: 50%; color: #fff; background: #a75222; font-size: 24px; }
.guest-dropzone strong { align-self: end; font-size: 12px; }
.guest-dropzone small { align-self: start; color: #756f68; font-size: 9px; }
.guest-upload-queue, .guest-upload-panel > .portal-status { grid-column: 1 / -1; }
.guest-upload-queue { display: grid; gap: 8px; }
.guest-upload-queue:empty { display: none; }
.guest-upload-queue article { display: grid; grid-template-columns: minmax(0,1fr) 180px; gap: 14px; align-items: center; padding: 10px 12px; background: #f4f0e9; border-radius: 8px; }
.guest-upload-queue article > div:first-child { min-width: 0; display: flex; justify-content: space-between; gap: 12px; font-size: 9px; }
.guest-upload-queue article strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.guest-upload-progress { height: 4px; overflow: hidden; background: #ded7cc; }
.guest-upload-progress i { display: block; width: 0; height: 100%; background: #a75222; transition: width .2s linear; }
.guest-upload-queue article.is-done .guest-upload-progress i { width: 100% !important; background: #587263; }
.guest-gallery-section { margin-top: 54px; }
.guest-gallery-head { display: flex; align-items: end; justify-content: space-between; gap: 20px; margin-bottom: 22px; }
.guest-gallery-head h2 { margin: 6px 0 0; font: 600 clamp(34px,4vw,48px)/1 "Newsreader", Georgia, serif; }
.guest-gallery-actions { display: flex; align-items: center; gap: 8px; }
.guest-gallery-actions > span { padding: 7px 11px; color: #813b17; background: #ead7ca; border-radius: 20px; font-size: 9px; font-weight: 700; }
.guest-gallery-actions button { width: 38px; height: 38px; display: grid; place-items: center; border: 1px solid #cbc1b3; border-radius: 50%; color: #813b17; background: #fffdf9; cursor: pointer; transition: color .2s ease,background .2s ease,border-color .2s ease; }
.guest-gallery-actions button:hover { color: #fff; border-color: #a75222; background: #a75222; }
.guest-gallery-actions button:focus-visible { outline: 3px solid rgba(167,82,34,.25); outline-offset: 2px; }
.guest-gallery-actions svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; }
.guest-gallery { display: flex; gap: 18px; overflow-x: auto; padding: 4px 2px 18px; scroll-snap-type: x mandatory; scroll-behavior: smooth; scrollbar-width: thin; scrollbar-color: #b98a6b #e7dfd4; }
.guest-media-card { flex: 0 0 min(520px,calc((100% - 36px)/3)); overflow: hidden; background: #fffdf9; border: 1px solid #ded7cc; border-radius: 12px; box-shadow: 0 14px 36px rgba(43,35,28,.06); scroll-snap-align: start; }
.guest-media-card > img, .guest-media-card > video { width: 100%; height: 280px; display: block; object-fit: cover; background: #242423; }
.guest-media-card > div { display: flex; align-items: center; justify-content: space-between; gap: 15px; padding: 14px 16px; }
.guest-media-card span, .guest-media-card strong, .guest-media-card small { min-width: 0; display: block; }
.guest-media-card strong { overflow: hidden; font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.guest-media-card small { margin-top: 4px; color: #756f68; font-size: 8px; }
.guest-media-card a { flex: 0 0 auto; color: #a75222; font-size: 9px; font-weight: 700; text-decoration: none; }
.guest-gallery-empty { grid-column: 1 / -1; min-height: 260px; display: grid; place-items: center; align-content: center; gap: 8px; color: #756f68; background: #fffdf9; border: 1px dashed #cbc1b3; border-radius: 14px; text-align: center; }
.guest-gallery-empty strong { color: #1e1c1a; font: 600 24px "Newsreader",Georgia,serif; }
.guest-gallery-empty span { font-size: 11px; }

@media (max-width: 1050px) {
  .guest-room-hero { grid-template-columns: 1fr; }
  .guest-upload-panel { grid-template-columns: 1fr 1fr; }
  .guest-dropzone { grid-column: 1 / -1; }
  .guest-media-card { flex-basis: min(520px,calc((100% - 18px)/2)); }
}

@media (max-width: 680px) {
  .guest-code-form > div { grid-template-columns: 1fr; }
  .guest-room-header { min-height: 72px; grid-template-columns: 1fr auto; padding: 9px 14px; }
  .guest-room-header > a img { width: 130px; }
  .guest-room-header > div { display: none; }
  .guest-room-header .portal-ghost-button { padding: 9px 12px; font-size: 10px; }
  .guest-room-main { width: calc(100% - 28px); padding-top: 30px; }
  .guest-room-hero h1 { font-size: 47px; }
  .guest-storage-card > div:first-child { display: grid; }
  .guest-upload-panel { grid-template-columns: 1fr; padding: 18px; }
  .guest-dropzone { grid-column: auto; }
  .guest-upload-queue article { grid-template-columns: 1fr; }
  .guest-gallery-head { align-items: start; }
  .guest-gallery-actions > span { display: none; }
  .guest-media-card { flex-basis: 88%; }
  .guest-media-card > img, .guest-media-card > video { height: 250px; }
}
