/* ===================================================================
   CLARAMOUR - BASE STYLES & APPLICATION LAYOUT
   =================================================================== */

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html, body {
  width: 100%;
  height: 100%;
  font-family: var(--font-sans);
  color: var(--text-main);
  background-color: var(--bg-page);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  line-height: 1.5;
  overflow-x: hidden;
  transition: background-color var(--transition-normal), color var(--transition-normal);
}

button, input, select, textarea {
  font-family: inherit;
  color: inherit;
  font-size: 1rem;
  border: none;
  outline: none;
  background: transparent;
}

button {
  cursor: pointer;
  user-select: none;
  transition: all var(--transition-fast);
}

a {
  color: inherit;
  text-decoration: none;
}

img, svg {
  display: block;
  max-width: 100%;
}

/* -------------------------------------------------------------------
   APP SHELL
   ------------------------------------------------------------------- */
#app-root {
  display: flex;
  min-height: 100vh;
  width: 100%;
  position: relative;
}

/* ===================================================================
   SIDEBAR NAVIGATION (Matches screenshot left pane)
   =================================================================== */
.sidebar {
  width: 260px;
  min-width: 260px;
  background-color: var(--bg-sidebar);
  border-right: 1px solid var(--border-light);
  display: flex;
  flex-direction: column;
  padding: 24px 18px;
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
  z-index: 50;
  transition: transform var(--transition-smooth), background-color var(--transition-normal);
}

/* Logo brand header */
.sidebar-brand {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  margin-bottom: 24px;
}

.sidebar-logo-img {
  width: 90px;
  height: 90px;
  object-fit: cover;
  border-radius: var(--radius-full);
  box-shadow: var(--shadow-sm);
  margin-bottom: 8px;
  transition: transform var(--transition-smooth);
}
.sidebar-logo-img:hover {
  transform: scale(1.04) rotate(-2deg);
}

.sidebar-brand-title {
  font-family: var(--font-serif);
  font-size: 1.35rem;
  font-weight: 600;
  color: var(--text-main);
  letter-spacing: -0.01em;
}

/* House selector pill */
.house-selector-wrapper {
  margin-bottom: 24px;
  position: relative;
}

.house-selector-btn {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 12px;
  background-color: rgba(255, 255, 255, 0.7);
  backdrop-filter: blur(8px);
  padding: 8px 12px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-light);
  box-shadow: var(--shadow-sm);
  text-align: left;
  transition: all var(--transition-fast);
  cursor: pointer;
}
.house-selector-btn:hover {
  background-color: var(--bg-card);
  border-color: var(--color-primary);
  transform: translateY(-1px);
}

.house-selector-thumb {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-sm);
  object-fit: cover;
}

.house-selector-info {
  flex: 1;
  min-width: 0;
}

.house-selector-label {
  font-size: 0.72rem;
  text-transform: uppercase;
  color: var(--text-muted);
  font-weight: 600;
  letter-spacing: 0.05em;
}

.house-selector-name {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text-main);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.house-selector-chevron {
  color: var(--text-muted);
  transition: transform var(--transition-fast);
}
.house-selector-wrapper.open .house-selector-chevron {
  transform: rotate(180deg);
}

/* House Dropdown Menu */
.house-dropdown-menu {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  width: 100%;
  min-width: 250px;
  background: var(--bg-card);
  border-radius: var(--radius-md);
  border: 1px solid var(--border-light);
  box-shadow: var(--shadow-lg);
  padding: 8px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  z-index: 100;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-8px);
  transition: all var(--transition-normal);
}
.house-selector-wrapper.open .house-dropdown-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.house-dropdown-list {
  display: flex;
  flex-direction: column;
  gap: 4px;
  max-height: 220px;
  overflow-y: auto;
}

.house-dropdown-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all var(--transition-fast);
}
.house-dropdown-item:hover {
  background: var(--bg-card-muted);
}
.house-dropdown-item.active {
  background: var(--color-primary-light);
}

.house-item-thumb {
  width: 32px;
  height: 32px;
  border-radius: var(--radius-xs);
  object-fit: cover;
}

.house-item-details {
  flex: 1;
  min-width: 0;
}

.house-item-title {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-main);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.house-item-sub {
  font-size: 0.72rem;
  color: var(--text-muted);
}

.house-item-check {
  color: var(--color-primary);
  font-weight: 700;
  font-size: 0.9rem;
}

.house-dropdown-divider {
  height: 1px;
  background: var(--border-subtle);
  margin: 4px 0;
}

.house-dropdown-add-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  border-radius: var(--radius-sm);
  color: var(--color-primary);
  font-size: 0.82rem;
  font-weight: 600;
  background: transparent;
  cursor: pointer;
  transition: all var(--transition-fast);
}
.house-dropdown-add-btn:hover {
  background: var(--bg-sidebar-hover);
}


/* Nav Menu Items */
.sidebar-nav {
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex: 1;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 10px 16px;
  border-radius: var(--radius-full);
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--text-main);
  cursor: pointer;
  transition: all var(--transition-fast);
  position: relative;
}

.nav-item-icon {
  width: 20px;
  height: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
}

.nav-item:hover {
  background-color: var(--bg-sidebar-hover);
  color: var(--color-primary);
}

.nav-item.active {
  background-color: var(--color-nav-active);
  color: var(--color-nav-active-text);
  font-weight: 600;
  box-shadow: inset 0 1px 2px rgba(255, 255, 255, 0.4), 0 2px 6px rgba(184, 107, 100, 0.12);
}

/* Badge count */
.nav-badge {
  margin-left: auto;
  font-size: 0.75rem;
  padding: 2px 7px;
  border-radius: var(--radius-full);
  background-color: rgba(255, 255, 255, 0.65);
  color: var(--text-main);
  font-weight: 600;
}

/* Sidebar footer decoration (Matches screenshot) */
.sidebar-footer {
  margin-top: auto;
  padding-top: 20px;
  text-align: center;
  position: relative;
}

.sidebar-quote {
  font-family: var(--font-handwriting);
  font-size: 1.25rem;
  color: var(--text-muted);
  line-height: 1.2;
  margin-bottom: 12px;
  letter-spacing: 0.02em;
}

.botanical-line-art {
  width: 75px;
  margin: 0 auto;
  opacity: 0.65;
  stroke: var(--text-muted);
}

/* ===================================================================
   MAIN CONTENT AREA
   =================================================================== */
.main-wrapper {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
  position: relative;
}

/* Header bar */
.top-header {
  padding: 20px 40px 10px 40px;
  position: relative;
}

.header-top-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

/* Breadcrumbs */
.breadcrumbs {
  display: flex;
  flex-wrap: wrap;
  min-width: 0;
  align-items: center;
  gap: 8px;
  font-size: 0.82rem;
  color: var(--text-muted);
}
.breadcrumbs .crumb-home {
  display: flex;
  align-items: center;
}
.breadcrumbs .crumb-sep {
  opacity: 0.5;
  font-size: 0.75rem;
}
.breadcrumbs .crumb-current {
  color: var(--text-main);
  font-weight: 500;
  overflow-wrap: anywhere;
}
.breadcrumbs .crumb-link {
  font: inherit;
  color: inherit;
  background: transparent;
  border: 0;
  border-radius: var(--radius-sm);
  padding: 6px 4px;
  cursor: pointer;
  text-align: left;
  overflow-wrap: anywhere;
}
.breadcrumbs .crumb-link:hover {
  color: var(--color-primary);
  text-decoration: underline;
  text-underline-offset: 3px;
}
.crumb-link:focus-visible,
.house-list-dialog button:focus-visible {
  outline: 2px solid var(--color-primary);
  outline-offset: 3px;
}
.house-list-dialog {
  margin: auto;
  width: min(520px, calc(100% - 32px));
  max-height: 80dvh;
  overflow-y: auto;
  padding: 24px;
  color: var(--text-main);
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
}
.house-list-dialog::backdrop {
  background: rgba(0, 0, 0, 0.4);
}
.house-list {
  display: grid;
  gap: 10px;
  margin-bottom: 20px;
}
.house-list-choice {
  display: grid;
  gap: 4px;
  width: 100%;
  padding: 14px;
  text-align: left;
  font: inherit;
  color: var(--text-main);
  background: var(--bg-card-muted);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-sm);
  overflow-wrap: anywhere;
  cursor: pointer;
}
.house-list-choice:hover {
  border-color: var(--color-primary);
}
.house-list-choice small {
  color: var(--text-muted);
}

/* Header actions right */
.theme-card { border: 2px solid var(--border-light); }
.theme-card.is-selected { border-color: var(--color-primary); box-shadow: 0 0 0 2px var(--color-primary-light); }
.project-context { margin-bottom: 16px; color: var(--text-muted); }
.project-edit-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 18px; }
.project-edit-btn, .project-delete-btn { display: inline-flex; align-items: center; justify-content: center; width: 32px; height: 32px; padding: 4px; font-size: 0.9rem; flex-shrink: 0; }
#wishlist-table-body td:last-child { white-space: nowrap; }
#project-edit-error { color: #a51d31; }
.header-title-row { flex-wrap: wrap; gap: 16px; }
.header-top-row { flex-wrap: wrap; gap: 12px; }

@keyframes page-appear {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes dialog-appear {
  from { opacity: 0; transform: translateY(8px) scale(0.98); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}
@keyframes soft-pop {
  from { opacity: 0; transform: scale(0.82); }
  to { opacity: 1; transform: scale(1); }
}
@media (prefers-reduced-motion: no-preference) {
  .app-page-view, #view-home, #view-projects { animation: page-appear 240ms ease-out both; }
  .house-list-dialog[open], .modal-overlay.open .modal-content { animation: dialog-appear 180ms ease-out both; }
  .gallery-card, .palette-swatch-card, .inbox-item-card { transition: transform 180ms ease, box-shadow 180ms ease; }
  .gallery-card:hover, .palette-swatch-card:hover { transform: translateY(-2px); }
  button:active { transform: scale(0.97); }
  .theme-dropdown-menu, .user-dropdown-menu { transform-origin: top right; }
  .theme-selector-dropdown-wrapper.open .theme-dropdown-menu, .user-dropdown-menu.open { animation: dialog-appear 160ms ease-out both; }
  .nav-badge, .project-type-badge { animation: soft-pop 220ms ease-out; }
  .toast { animation: page-appear 220ms ease-out both; }
  .house-list-choice { animation: page-appear 200ms ease-out backwards; }
  .house-list-choice:nth-child(2) { animation-delay: 30ms; }
  .house-list-choice:nth-child(3) { animation-delay: 60ms; }
  .nav-item:hover .nav-icon, .mobile-nav-btn:hover .icon { transform: translateY(-2px) rotate(-4deg); }
  .nav-icon, .mobile-nav-btn .icon { transition: transform 180ms ease; }
  .form-input:focus, .form-textarea:focus, .form-select:focus { transition: border-color 180ms ease, box-shadow 180ms ease; box-shadow: 0 0 0 3px var(--color-primary-light); }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}

.header-actions-right {
  display: flex;
  align-items: center;
  gap: 14px;
}

.icon-btn {
  width: 38px;
  height: 38px;
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-main);
  background: transparent;
  transition: all var(--transition-fast);
}
.icon-btn:hover {
  background: rgba(0, 0, 0, 0.04);
  color: var(--color-primary);
}

.user-avatar {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-full);
  background-color: var(--color-primary-light);
  color: var(--color-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  font-size: 0.9rem;
  border: 1px solid var(--border-light);
  cursor: pointer;
  transition: transform var(--transition-fast), box-shadow var(--transition-fast);
}
.user-avatar:hover {
  transform: scale(1.06);
  box-shadow: var(--shadow-sm);
}

/* Theme selector dropdown pill */
.theme-selector-dropdown-wrapper {
  position: relative;
}

.theme-pill-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  background-color: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-full);
  padding: 6px 14px;
  font-size: 0.86rem;
  font-weight: 600;
  color: var(--text-main);
  box-shadow: var(--shadow-sm);
  cursor: pointer;
  transition: all var(--transition-fast);
}
.theme-pill-btn:hover {
  border-color: var(--color-primary);
  transform: translateY(-1px);
}

.theme-dropdown-menu {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  width: 220px;
  background: var(--bg-card);
  border-radius: var(--radius-md);
  border: 1px solid var(--border-light);
  box-shadow: var(--shadow-lg);
  padding: 6px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  z-index: 120;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-6px);
  transition: all var(--transition-normal);
}
.theme-selector-dropdown-wrapper.open .theme-dropdown-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.theme-dropdown-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
  font-weight: 500;
  cursor: pointer;
  color: var(--text-main);
  transition: all var(--transition-fast);
}
.theme-dropdown-item:hover {
  background: var(--bg-card-muted);
  color: var(--color-primary);
}
.theme-dropdown-item.active {
  background: var(--color-primary-light);
  color: var(--color-primary);
  font-weight: 600;
}

.title-heart {
  font-weight: 400;
  color: var(--color-primary);
  margin-left: 4px;
}

/* Header Title Row (Matches screenshot) */
.header-title-row {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  padding-bottom: 16px;
  border-bottom: 1px solid rgba(184, 107, 100, 0.12);
  position: relative;
}

.header-title-group h1 {
  font-family: var(--font-serif);
  font-size: 2.75rem;
  font-weight: 500;
  color: var(--text-main);
  line-height: 1.1;
  margin-bottom: 4px;
  letter-spacing: -0.02em;
}

.header-title-group .header-subtitle {
  font-size: 0.76rem;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: var(--text-muted);
  font-weight: 600;
}

/* Main primary action button (e.g. + Ajouter une image) */
.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background-color: var(--color-primary);
  color: var(--text-inverse);
  padding: 10px 22px;
  border-radius: var(--radius-md);
  font-size: 0.92rem;
  font-weight: 500;
  box-shadow: 0 4px 14px rgba(184, 107, 100, 0.28);
  transition: all var(--transition-fast);
}
.btn-primary:hover {
  background-color: var(--color-primary-hover);
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(184, 107, 100, 0.35);
}
.btn-primary:active {
  transform: translateY(0);
}

.btn-secondary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background-color: rgba(255, 255, 255, 0.85);
  color: var(--text-main);
  padding: 9px 18px;
  border-radius: var(--radius-md);
  font-size: 0.9rem;
  font-weight: 500;
  border: 1px solid var(--border-light);
  box-shadow: var(--shadow-sm);
  transition: all var(--transition-fast);
}
.btn-secondary:hover {
  background-color: var(--bg-card);
  border-color: var(--color-primary);
  color: var(--color-primary);
  transform: translateY(-1px);
}

/* Category Filter Pills (Matches screenshot) */
.category-filter-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 18px;
  margin-bottom: 22px;
  overflow-x: auto;
  padding-bottom: 4px;
}

.filter-pill {
  padding: 8px 22px;
  border-radius: var(--radius-full);
  font-size: 0.92rem;
  font-weight: 500;
  color: var(--text-muted);
  background-color: transparent;
  cursor: pointer;
  transition: all var(--transition-fast);
  white-space: nowrap;
}
.filter-pill:hover {
  color: var(--text-main);
  background-color: rgba(184, 107, 100, 0.08);
}
.filter-pill.active {
  background-color: var(--color-nav-active);
  color: var(--color-nav-active-text);
  font-weight: 600;
  box-shadow: 0 2px 6px rgba(184, 107, 100, 0.12);
}

/* Content Container */
.page-container {
  padding: 0 40px 40px 40px;
  flex: 1;
  display: flex;
  flex-direction: column;
}

/* Modals */
.modal-overlay {
  position: fixed;
  inset: 0;
  background-color: var(--bg-overlay);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  opacity: 0;
  visibility: hidden;
  transition: opacity var(--transition-normal), visibility var(--transition-normal);
  padding: 20px;
}
.modal-overlay.open {
  opacity: 1;
  visibility: visible;
}

.modal-content {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  padding: 28px;
  max-width: 650px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--border-light);
  transform: translateY(12px) scale(0.97);
  transition: transform var(--transition-smooth);
}
.modal-overlay.open .modal-content {
  transform: translateY(0) scale(1);
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border-subtle);
}
.modal-title {
  font-family: var(--font-serif);
  font-size: 1.6rem;
  color: var(--text-main);
}
.modal-close-btn {
  font-size: 1.4rem;
  line-height: 1;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-full);
  color: var(--text-muted);
}
.modal-close-btn:hover {
  background: rgba(0, 0, 0, 0.05);
  color: var(--text-main);
}

/* Form controls */
.form-group {
  margin-bottom: 18px;
}
.form-label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-main);
  margin-bottom: 6px;
}
.form-input, .form-select, .form-textarea {
  width: 100%;
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-subtle);
  background: var(--bg-card-muted);
  color: var(--text-main);
  font-size: 0.95rem;
  transition: all var(--transition-fast);
}
.form-input:focus, .form-select:focus, .form-textarea:focus {
  border-color: var(--color-primary);
  background: var(--bg-card);
  box-shadow: 0 0 0 3px var(--color-primary-light);
}

.form-row {
  display: flex;
  gap: 14px;
}
.form-row > * {
  flex: 1;
}

/* Toast notifications */
.toast-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  z-index: 2000;
  pointer-events: none;
}
.toast {
  background: var(--bg-card);
  color: var(--text-main);
  border: 1px solid var(--border-light);
  box-shadow: var(--shadow-md);
  padding: 12px 20px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.9rem;
  pointer-events: auto;
  animation: toastIn 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}
@keyframes toastIn {
  from { transform: translateY(20px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

/* Modal Tab switchers (Image vs Note) */
.modal-type-tabs {
  display: flex;
  gap: 10px;
  background: var(--bg-card-muted);
  padding: 4px;
  border-radius: var(--radius-full);
  margin-bottom: 20px;
}
.modal-type-tab {
  flex: 1;
  padding: 8px 16px;
  border-radius: var(--radius-full);
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-muted);
  text-align: center;
  cursor: pointer;
  transition: all var(--transition-fast);
}
.modal-type-tab.active {
  background: var(--bg-card);
  color: var(--color-primary);
  box-shadow: var(--shadow-sm);
}

/* Image dropzone / file upload preview */
.file-upload-dropzone {
  border: 2px dashed var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 24px;
  text-align: center;
  cursor: pointer;
  background: var(--bg-card-muted);
  transition: all var(--transition-fast);
  position: relative;
}
.file-upload-dropzone:hover {
  border-color: var(--color-primary);
  background: var(--bg-card);
}
.file-upload-preview {
  max-height: 200px;
  border-radius: var(--radius-sm);
  margin: 10px auto 0 auto;
  object-fit: cover;
  display: none;
}

/* Visionneuse / Lightbox modal */
.visionneuse-img-wrap {
  width: 100%;
  max-height: 480px;
  border-radius: var(--radius-md);
  overflow: hidden;
  background: #111;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 18px;
}
.visionneuse-img-wrap img {
  max-height: 480px;
  width: 100%;
  object-fit: contain;
}
.visionneuse-nav-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid var(--border-subtle);
}

/* Storage Quota Progress Bar (P0 test.txt) */
.storage-quota-bar-wrap {
  width: 100%;
  height: 10px;
  background: var(--bg-card-muted);
  border-radius: var(--radius-full);
  overflow: hidden;
  margin: 10px 0;
  border: 1px solid var(--border-subtle);
}
.storage-quota-bar-fill {
  height: 100%;
  background: var(--color-primary);
  border-radius: var(--radius-full);
  transition: width 0.4s ease;
}

/* Activity & Search Results lists */
.modal-item-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-height: 380px;
  overflow-y: auto;
}
.modal-list-card {
  padding: 12px 16px;
  background: var(--bg-card-muted);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  gap: 14px;
  transition: background var(--transition-fast);
  cursor: pointer;
}
.modal-list-card:hover {
  background: var(--color-primary-light);
}

/* Sidebar Logo & Footer SVGs */
.sidebar-logo-container {
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 10px;
}
.logo-hellokitty {
  width: 115px;
  height: 98px;
  object-fit: contain;
  transition: transform var(--transition-smooth);
}
.logo-hellokitty:hover {
  transform: scale(1.05) rotate(2deg);
}

.sidebar-footer-kitty {
  margin-top: auto;
  width: 100%;
  padding-top: 10px;
}
.kitty-footer-img {
  width: 100%;
  height: auto;
  max-height: 150px;
  object-fit: contain;
}

/* User Switcher Pill in Header */
.user-pill-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-full);
  padding: 4px 12px 4px 6px;
  cursor: pointer;
  box-shadow: var(--shadow-sm);
  transition: all var(--transition-fast);
}
.user-pill-btn:hover {
  border-color: var(--color-primary);
  transform: translateY(-1px);
}
.user-pill-avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  object-fit: cover;
  background: var(--color-primary-light);
}

/* Project Type Badge */
.project-type-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: var(--radius-full);
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
}
.project-type-badge.common {
  background: #E8F5E9;
  color: #2E7D32;
  border: 1px solid #C8E6C9;
}
.project-type-badge.personal {
  background: #EDE7F6;
  color: #5E35B1;
  border: 1px solid #D1C4E9;
}

/* Votes Row */
.vote-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 10px;
  padding-top: 8px;
  border-top: 1px dashed var(--border-subtle);
}
.vote-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  border-radius: var(--radius-full);
  font-size: 0.8rem;
  background: var(--bg-card-muted);
  border: 1px solid var(--border-subtle);
  color: var(--text-main);
  cursor: pointer;
  transition: all var(--transition-fast);
}
.vote-btn:hover {
  background: var(--bg-card);
  border-color: var(--color-primary);
}
.vote-btn.active-adore {
  background: #FFEBEE;
  color: #C62828;
  border-color: #EF9A9A;
  font-weight: 700;
}
.vote-btn.active-pourquoi {
  background: #FFF8E1;
  color: #F57F17;
  border-color: #FFE082;
  font-weight: 700;
}
.vote-btn.active-pas {
  background: #ECEFF1;
  color: #546E7A;
  border-color: #CFD8DC;
  font-weight: 700;
}

/* Surprise Badge */
.surprise-tag {
  background: #FFF3E0;
  color: #E65100;
  border: 1px solid #FFE0B2;
  padding: 2px 8px;
  border-radius: var(--radius-full);
  font-size: 0.72rem;
  font-weight: 700;
}

/* Wishlist Table & Items */
.wishlist-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 12px;
}
.wishlist-table th, .wishlist-table td {
  padding: 12px 14px;
  text-align: left;
  border-bottom: 1px solid var(--border-subtle);
}
.wishlist-table th {
  font-size: 0.82rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

/* Palettes Grid */
.palette-swatches-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 16px;
}
.palette-swatch-card {
  background: var(--bg-card);
  border-radius: var(--radius-md);
  border: 1px solid var(--border-subtle);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}
.palette-color-block {
  height: 90px;
  width: 100%;
  position: relative;
}

/* Floating Decorative Companion (Section 19) */
.floating-companion {
  position: fixed;
  bottom: 24px;
  left: 24px;
  z-index: 1500;
  display: flex;
  align-items: flex-end;
  gap: 10px;
  pointer-events: none;
}
.companion-bubble {
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: 16px 16px 16px 2px;
  padding: 10px 14px;
  font-size: 0.82rem;
  color: var(--text-main);
  box-shadow: var(--shadow-md);
  max-width: 220px;
  line-height: 1.35;
  pointer-events: auto;
  animation: floatBubble 4s ease-in-out infinite;
}
.companion-char {
  width: 52px;
  height: 52px;
  pointer-events: auto;
  cursor: pointer;
  transition: transform var(--transition-fast);
  filter: drop-shadow(0 4px 8px rgba(0,0,0,0.12));
}
.companion-char:hover {
  transform: scale(1.12) rotate(5deg);
}

@keyframes floatBubble {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-4px); }
}

@media (max-width: 768px) {
  .floating-companion {
    display: none;
  }
}

/* User Switcher Pill & Dropdown */
.user-pill-wrapper {
  position: relative;
}
.user-pill-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-full);
  padding: 4px 12px 4px 5px;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-main);
  cursor: pointer;
  transition: all var(--transition-fast);
  box-shadow: var(--shadow-sm);
}
.user-pill-btn:hover {
  background: var(--bg-card-muted);
  border-color: var(--color-primary);
}
.user-pill-avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  object-fit: cover;
  background: var(--color-primary-light);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--color-primary);
}
.user-dropdown-menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  min-width: 240px;
  background: var(--bg-card);
  border-radius: var(--radius-md);
  border: 1px solid var(--border-light);
  box-shadow: var(--shadow-lg);
  padding: 8px;
  display: none;
  flex-direction: column;
  gap: 4px;
  z-index: 200;
}
.user-dropdown-menu.open {
  display: flex;
}
.user-dropdown-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-size: 0.85rem;
  transition: all var(--transition-fast);
}
.user-dropdown-item:hover {
  background: var(--bg-card-muted);
}
.user-dropdown-item.active {
  background: var(--color-primary-light);
  font-weight: 600;
}

/* Project Type Badge */
.project-type-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: var(--radius-full);
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition-fast);
}
.project-type-badge.common {
  background: #E8F5E9;
  color: #2E7D32;
  border: 1px solid #C8E6C9;
}
.project-type-badge.personal {
  background: #FFF8E1;
  color: #F57F17;
  border: 1px solid #FFE082;
}
.project-type-badge:hover {
  filter: brightness(0.95);
  transform: translateY(-1px);
}

/* Inbox Styles */
.inbox-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
  flex-wrap: wrap;
  gap: 12px;
}
.inbox-item-card {
  display: flex;
  gap: 16px;
  padding: 16px;
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  transition: all var(--transition-fast);
  position: relative;
}
.inbox-item-card:hover {
  border-color: var(--color-primary);
  box-shadow: var(--shadow-md);
}
.inbox-item-card.selected {
  border-color: var(--color-primary);
  background: var(--color-primary-light);
}
.inbox-thumb {
  width: 90px;
  height: 90px;
  border-radius: var(--radius-sm);
  object-fit: cover;
  background: var(--bg-card-muted);
}

/* Members & Collaboration */
.member-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  margin-bottom: 8px;
}
.member-role-tag {
  font-size: 0.72rem;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: var(--radius-full);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.member-role-tag.owner {
  background: #E3F2FD;
  color: #1565C0;
}
.member-role-tag.editor {
  background: #E8F5E9;
  color: #2E7D32;
}
.member-role-tag.viewer {
  background: #ECEFF1;
  color: #455A64;
}

/* Journal Timeline */
.journal-timeline {
  position: relative;
  padding-left: 28px;
  margin-top: 20px;
}
.journal-timeline::before {
  content: '';
  position: absolute;
  top: 0;
  bottom: 0;
  left: 10px;
  width: 2px;
  background: var(--border-light);
}
.journal-entry {
  position: relative;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 16px;
  margin-bottom: 16px;
  box-shadow: var(--shadow-sm);
}
.journal-entry::before {
  content: '';
  position: absolute;
  left: -24px;
  top: 18px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--color-primary);
  border: 2px solid #FFFFFF;
  box-shadow: 0 0 0 2px var(--color-primary-light);
}

/* Tour Presentation Mode */
.tour-stage {
  text-align: center;
  padding: 20px;
}
.tour-main-img {
  max-height: 420px;
  width: auto;
  max-width: 100%;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  margin: 16px auto;
  object-fit: cover;
}
.tour-nav-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 24px;
  padding-top: 16px;
  border-top: 1px solid var(--border-subtle);
}

/* Compare Grid */
.compare-container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
  margin-top: 20px;
}
.compare-card {
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: 18px;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  gap: 12px;
}

/* ===================================================================
   PERMANENT CLARAMOUR GLOBAL NAVBAR (Section 2)
   =================================================================== */
.claramour-global-navbar {
  position: sticky;
  top: 0;
  left: 0;
  right: 0;
  height: 60px;
  background: var(--bg-card);
  border-bottom: 1px solid var(--border-light);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 20px;
  z-index: 1100;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

.nav-brand-group {
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  text-decoration: none;
}
.nav-brand-logo {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  object-fit: cover;
  transition: transform var(--transition-fast);
}
.nav-brand-group:hover .nav-brand-logo {
  transform: scale(1.08) rotate(3deg);
}
.nav-brand-text {
  font-family: var(--font-serif);
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--color-primary);
  display: flex;
  align-items: center;
  gap: 4px;
}
.nav-brand-heart {
  color: #E6002B;
  font-size: 1.1rem;
}

.nav-main-links {
  display: flex;
  align-items: center;
  gap: 6px;
}
.nav-link-btn {
  padding: 8px 16px;
  border-radius: var(--radius-full);
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text-main);
  transition: all var(--transition-fast);
  background: transparent;
  cursor: pointer;
}
.nav-link-btn:hover {
  background: var(--bg-card-muted);
  color: var(--color-primary);
}
.nav-link-btn.active {
  background: var(--color-primary-light);
  color: var(--color-primary);
  font-weight: 700;
}

.nav-right-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

/* Guest Mode Discreet Banner (Section 7) */
.guest-mode-banner {
  background: #FFF8E1;
  border-bottom: 1px solid #FFE082;
  color: #8D6E63;
  padding: 8px 20px;
  font-size: 0.82rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  z-index: 1050;
  position: sticky;
  top: 60px;
}
.guest-banner-text {
  display: flex;
  align-items: center;
  gap: 6px;
  color: #E65100;
  font-weight: 600;
}

/* ===================================================================
   ACCUEIL CLARAMOUR (Sections 3, 4, 5, 11, 12, 14)
   =================================================================== */
.home-wrapper {
  max-width: 1140px;
  margin: 0 auto;
  padding: 32px 20px 80px 20px;
  display: flex;
  flex-direction: column;
  gap: 48px;
}

/* Hero Section */
.home-hero-card {
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  padding: 40px;
  position: relative;
  overflow: hidden;
  box-shadow: var(--shadow-md);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
}
.home-hero-content {
  flex: 1;
  max-width: 580px;
  z-index: 2;
}
.home-hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--color-primary-light);
  color: var(--color-primary);
  padding: 4px 12px;
  border-radius: var(--radius-full);
  font-size: 0.8rem;
  font-weight: 700;
  margin-bottom: 14px;
}
.home-hero-title {
  font-family: var(--font-serif);
  font-size: 2.6rem;
  line-height: 1.15;
  margin-bottom: 12px;
  color: var(--text-main);
}
.home-hero-subtitle {
  font-size: 1.1rem;
  color: var(--text-muted);
  line-height: 1.45;
  margin-bottom: 24px;
}
.home-hero-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}
.home-hero-illustration {
  width: 320px;
  max-width: 40%;
  display: flex;
  align-items: center;
  justify-content: center;
}
.home-hero-img {
  width: 100%;
  max-height: 240px;
  object-fit: contain;
  filter: drop-shadow(0 8px 16px rgba(0, 0, 0, 0.08));
}

/* Personalized Dashboard on Home (Section 5) */
.home-personal-dashboard {
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: 24px;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  gap: 20px;
}
.home-section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 4px;
}
.home-section-title {
  font-family: var(--font-serif);
  font-size: 1.6rem;
  color: var(--text-main);
}
.home-section-desc {
  font-size: 0.88rem;
  color: var(--text-muted);
}

/* Onboarding Checklist for new users */
.onboarding-box {
  background: var(--bg-card-muted);
  border: 1px dashed var(--border-light);
  border-radius: var(--radius-sm);
  padding: 16px 20px;
}
.onboarding-steps-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 12px;
  margin-top: 12px;
}
.onboarding-step-item {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  padding: 8px 12px;
  background: var(--bg-card);
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-subtle);
  transition: all var(--transition-fast);
}
.onboarding-step-item:hover {
  border-color: var(--color-primary);
  transform: translateY(-1px);
}

/* Spaces Catalog Grid (Section 4) */
.home-spaces-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 20px;
}
.home-space-card {
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: 22px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  box-shadow: var(--shadow-sm);
  transition: all var(--transition-normal);
  position: relative;
}
.home-space-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
  border-color: var(--color-primary);
}
.home-space-cover {
  width: 100%;
  height: 140px;
  border-radius: var(--radius-sm);
  object-fit: cover;
  background: var(--bg-card-muted);
}
.home-space-badge {
  position: absolute;
  top: 32px;
  right: 32px;
  padding: 3px 10px;
  border-radius: var(--radius-full);
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.home-space-badge.available {
  background: #E8F5E9;
  color: #2E7D32;
}
.home-space-badge.soon {
  background: #FFF3E0;
  color: #E65100;
}
.home-space-title {
  font-family: var(--font-serif);
  font-size: 1.3rem;
  font-weight: 700;
}
.home-space-desc {
  font-size: 0.85rem;
  color: var(--text-muted);
  line-height: 1.4;
  flex: 1;
}

/* 3 Steps Presentation (Section 14) */
.home-steps-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 20px;
}
.home-step-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 24px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}
.home-step-icon {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: var(--color-primary-light);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.6rem;
  margin-bottom: 4px;
}
.home-step-title {
  font-weight: 700;
  font-size: 1.05rem;
}
.home-step-desc {
  font-size: 0.85rem;
  color: var(--text-muted);
  line-height: 1.35;
}

/* FAQ & Help Section */
.home-faq-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.home-faq-item {
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-sm);
  padding: 16px 20px;
}
.home-faq-question {
  font-weight: 700;
  font-size: 0.95rem;
  margin-bottom: 6px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.home-faq-answer {
  font-size: 0.85rem;
  color: var(--text-muted);
  line-height: 1.45;
}

/* Footer (Section 14) */
.home-footer {
  margin-top: 40px;
  padding-top: 32px;
  border-top: 1px solid var(--border-light);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 20px;
  font-size: 0.82rem;
  color: var(--text-muted);
}
.home-footer-links {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}
.home-footer-links a:hover {
  color: var(--color-primary);
  text-decoration: underline;
}

@media (max-width: 768px) {
  .home-hero-card {
    flex-direction: column;
    padding: 24px;
    text-align: center;
  }
  .home-hero-actions {
    justify-content: center;
  }
  .home-hero-illustration {
    max-width: 180px;
  }
  .nav-main-links {
    display: none;
  }
}


