@import url("https://fonts.googleapis.com/css2?family=Inter:wght@400;500;700;900&family=Manrope:wght@600;800&display=swap");

:root {
  --core-bg: #0a0a0a;
  --core-panel: rgba(21, 21, 21, .80);
  --core-panel-soft: rgba(17, 17, 17, .80);
  --core-panel-deep: rgba(5, 5, 5, .80);
  --core-text: #f5f5f5;
  --core-muted: #8d8d8d;
  --core-dim: #4d4d4d;
  --core-line: rgba(255, 255, 255, .10);
  --core-line-strong: rgba(255, 255, 255, .28);
}

body:is(.page-home, .page-properties, .page-favorites, .page-photographie, .page-api-perso, .page-contracts) {
  background:
    radial-gradient(circle at 78% 8%, rgba(255, 255, 255, .07), transparent 24rem),
    linear-gradient(180deg, var(--core-bg) 0%, #111 100%) !important;
  color: var(--core-text) !important;
  font-family: Inter, ui-sans-serif, system-ui, sans-serif !important;
}

body:is(.page-home, .page-properties, .page-favorites, .page-photographie, .page-api-perso, .page-contracts, .page-clients, .page-demandes, .page-agenda, .page-documents, .page-monitoring, .page-socials, .page-visite-virtuelle)::before {
  background:
    linear-gradient(180deg, rgba(0, 0, 0, .12), rgba(0, 0, 0, .50)),
    url("../media/immo-core-bottom-logo.png") center center / cover no-repeat !important;
  opacity: .35 !important;
  filter: saturate(1.22) contrast(1.05) brightness(.92);
}

body:is(.page-home, .page-properties, .page-favorites, .page-photographie, .page-api-perso, .page-contracts) :is(main, footer) {
  background: transparent !important;
  color: var(--core-text) !important;
}

body:is(.page-home, .page-properties, .page-favorites, .page-photographie, .page-api-perso, .page-contracts) #sidebar,
body:is(.page-home, .page-properties, .page-favorites, .page-photographie, .page-api-perso, .page-contracts) header.glass-panel,
body:is(.page-home, .page-properties, .page-favorites, .page-photographie, .page-api-perso, .page-contracts) footer {
  background: rgba(10, 10, 10, .77) !important;
  border-color: var(--core-line) !important;
  box-shadow: none !important;
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
}

body:is(.page-home, .page-properties, .page-favorites, .page-photographie, .page-api-perso, .page-contracts) #sidebar a {
  background: transparent !important;
  border: 1px solid transparent !important;
  border-radius: 0 !important;
  color: var(--core-dim) !important;
  transition: color .18s ease, transform .18s ease, border-color .18s ease !important;
}

body:is(.page-home, .page-properties, .page-favorites, .page-photographie, .page-api-perso, .page-contracts) #sidebar a:hover,
body:is(.page-home, .page-properties, .page-favorites, .page-photographie, .page-api-perso, .page-contracts) #sidebar a.nav-active {
  color: #fff !important;
  border-color: var(--core-line-strong) !important;
  transform: translateX(4px);
}

body:is(.page-home, .page-properties, .page-favorites, .page-photographie, .page-api-perso, .page-contracts) #sidebar .material-symbols-outlined,
body:is(.page-home, .page-properties, .page-favorites, .page-photographie, .page-api-perso, .page-contracts) header.glass-panel .material-symbols-outlined {
  color: currentColor !important;
  -webkit-text-fill-color: currentColor !important;
}

body:is(.page-home, .page-properties, .page-favorites, .page-photographie, .page-api-perso, .page-contracts) :is(h1, .properties-entry-title) {
  color: #fff !important;
  -webkit-text-fill-color: #fff !important;
  font-family: Manrope, Inter, sans-serif !important;
  font-weight: 900 !important;
  letter-spacing: -.06em !important;
  line-height: .86 !important;
  text-transform: uppercase !important;
  text-shadow: none !important;
}

body:is(.page-home, .page-properties, .page-favorites, .page-photographie, .page-api-perso, .page-contracts) :is(h2, h3, h4, .font-headline, .properties-entry-card-title) {
  font-family: Manrope, Inter, sans-serif !important;
  letter-spacing: -.035em !important;
  text-transform: uppercase;
}

body:is(.page-home, .page-properties, .page-favorites, .page-photographie, .page-api-perso, .page-contracts) main :is(
  .favorites-panel,
  .photography-panel,
  .photography-card,
  .photography-lab,
  .api-perso-card,
  .properties-entry-card,
  .search-block-shell,
  .search-criteria-card,
  .search-follow-card,
  .property-sheet-shell,
  .property-card,
  .dashboard-hero,
  .dashboard-hero-header,
  .dashboard-hero-notebook,
  .dashboard-hero-agenda,
  .dashboard-property-card,
  .crm-account-button,
  .bg-surface-container-low,
  .bg-surface-container,
  .bg-surface-container-high,
  .bg-white,
  .ai-chip
) {
  background: var(--core-panel) !important;
  background-image: none !important;
  border: 1px solid var(--core-line) !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  color: #fff !important;
  filter: none !important;
  text-shadow: none !important;
}

body:is(.page-home, .page-properties, .page-favorites, .page-photographie, .page-api-perso, .page-contracts) main :is(
  .favorites-panel,
  .photography-panel,
  .photography-card,
  .api-perso-card,
  .properties-entry-card,
  .search-block-shell,
  .search-criteria-card,
  .search-follow-card,
  .property-sheet-shell,
  .property-card,
  .dashboard-hero,
  .dashboard-hero-header,
  .dashboard-hero-notebook,
  .dashboard-hero-agenda,
  .dashboard-property-card,
  .bg-surface-container-low,
  .bg-surface-container,
  .bg-surface-container-high,
  .bg-white
)::before,
body:is(.page-home, .page-properties, .page-favorites, .page-photographie, .page-api-perso, .page-contracts) main :is(
  .favorites-panel,
  .photography-panel,
  .photography-card,
  .api-perso-card,
  .properties-entry-card,
  .search-block-shell,
  .search-criteria-card,
  .search-follow-card,
  .property-sheet-shell,
  .property-card,
  .dashboard-hero,
  .dashboard-hero-header,
  .dashboard-hero-notebook,
  .dashboard-hero-agenda,
  .dashboard-property-card,
  .bg-surface-container-low,
  .bg-surface-container,
  .bg-surface-container-high,
  .bg-white
)::after {
  box-shadow: none !important;
  filter: none !important;
}

body:is(.page-home, .page-properties, .page-favorites, .page-photographie, .page-api-perso, .page-contracts) main :is(
  .properties-entry-card:hover,
  .property-card:hover,
  .photography-card:hover,
  .api-perso-card:hover,
  .favorite-client-group:hover,
  .dashboard-property-card:hover
) {
  background: var(--core-panel-soft) !important;
  border-color: var(--core-line-strong) !important;
  transform: translateY(-2px);
}

body:is(.page-home, .page-properties, .page-favorites, .page-photographie, .page-api-perso, .page-contracts) :is(
  p,
  span,
  label,
  a,
  button,
  strong,
  dd,
  dt,
  .text-on-surface,
  .text-primary
) {
  text-shadow: none !important;
}

body:is(.page-home, .page-properties, .page-favorites, .page-photographie, .page-api-perso, .page-contracts) :is(
  .text-on-surface-variant,
  .properties-entry-card-copy,
  .photography-meta dt,
  .photography-lab-title span,
  .favorite-listing-card p,
  .api-perso-card p
) {
  color: var(--core-muted) !important;
  -webkit-text-fill-color: var(--core-muted) !important;
}

body:is(.page-home, .page-properties, .page-favorites, .page-photographie, .page-api-perso, .page-contracts) :is(
  .field-input,
  input[type="text"],
  input[type="search"],
  input[type="url"],
  input[type="email"],
  input[type="number"],
  input[type="date"],
  select,
  textarea
) {
  background: #000 !important;
  background-image: none !important;
  border: 1px solid var(--core-line-strong) !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  color: #fff !important;
  -webkit-text-fill-color: #fff !important;
}

body:is(.page-home, .page-properties, .page-favorites, .page-photographie, .page-api-perso, .page-contracts) :is(input::placeholder, textarea::placeholder) {
  color: rgba(255, 255, 255, .42) !important;
  -webkit-text-fill-color: rgba(255, 255, 255, .42) !important;
}

body:is(.page-home, .page-properties, .page-favorites, .page-photographie, .page-api-perso, .page-contracts) :is(
  .btn-primary,
  .favorite-action-primary,
  .photography-action-primary,
  .property-share-option,
  #property-submit-button,
  #property-import-submit,
  #refresh-favorites,
  #api-perso-search-submit,
  #api-perso-save-search,
  #contract-submit-button
) {
  background: #fff !important;
  border: 1px solid #fff !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  color: #000 !important;
  -webkit-text-fill-color: #000 !important;
}

body:is(.page-home, .page-properties, .page-favorites, .page-photographie, .page-api-perso, .page-contracts) :is(
  .favorite-action-secondary,
  .photography-action-secondary,
  .dashboard-hero-link,
  .property-selection-toolbar button,
  #property-cancel-edit,
  #property-share-back
) {
  background: #000 !important;
  border: 1px solid var(--core-line-strong) !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  color: #fff !important;
  -webkit-text-fill-color: #fff !important;
}

body.page-properties .properties-entry-title {
  font-size: clamp(4.5rem, 11vw, 10rem) !important;
}

body.page-properties .properties-entry-grid {
  max-width: 80rem !important;
}

body.page-properties .properties-entry-card {
  min-height: 19rem !important;
  justify-items: start !important;
  align-content: end !important;
  text-align: left !important;
  padding: clamp(1.5rem, 3vw, 3rem) !important;
}

body.page-properties .properties-entry-card .material-symbols-outlined {
  color: var(--core-muted) !important;
  -webkit-text-fill-color: var(--core-muted) !important;
}

body.page-home .dashboard-hero {
  padding: clamp(1.25rem, 3vw, 2.5rem) !important;
}

body.page-home .dashboard-hero-page-title {
  margin: 0 0 .35rem !important;
  color: #fff !important;
  -webkit-text-fill-color: #fff !important;
  -webkit-text-stroke: 0 transparent !important;
  text-stroke: 0 transparent !important;
  font-family: Manrope, Inter, sans-serif !important;
  font-size: clamp(4.5rem, 11vw, 10rem) !important;
  font-weight: 900 !important;
  line-height: .76 !important;
  letter-spacing: -.075em !important;
  text-transform: uppercase !important;
}

html body.page-home .dashboard-hero .dashboard-hero-page-title,
html body.page-home .dashboard-hero .dashboard-hero-page-title:is(h1) {
  color: #fff !important;
  -webkit-text-fill-color: #fff !important;
  -webkit-text-stroke: 0 transparent !important;
  text-stroke: 0 transparent !important;
}

html body.page-home main .dashboard-page-shell .dashboard-hero-shell .dashboard-hero.editorial-shadow .dashboard-hero-copy > h1.dashboard-hero-page-title {
  color: #fff !important;
  -webkit-text-fill-color: #fff !important;
  -webkit-text-stroke-color: transparent !important;
  -webkit-text-stroke-width: 0 !important;
}

body.page-home .dashboard-hero-brand-mark {
  max-width: min(100%, 42rem) !important;
}

body.page-home .dashboard-hero-summary {
  gap: 1rem !important;
}

body.page-favorites .favorites-panel h1,
body.page-photographie .photography-panel h1,
body.page-api-perso main h2,
body.page-contracts main h1 {
  font-size: clamp(3.4rem, 8vw, 7.8rem) !important;
}

body.page-photographie .photography-grid {
  gap: 1rem !important;
}

body.page-photographie .photography-frame img,
body.page-photographie .photography-lab-frame img,
body.page-properties .property-card-visual img,
body.page-properties #property-sheet-image {
  filter: saturate(.92) contrast(1.04);
}

body.page-api-perso .api-perso-card {
  grid-template-columns: 9rem minmax(0, 1fr) !important;
}

body.page-contracts .ai-chip {
  padding: .75rem 1rem !important;
}

body.page-demandes {
  background:
    radial-gradient(circle at 78% 8%, rgba(255, 255, 255, .07), transparent 24rem),
    linear-gradient(180deg, var(--core-bg) 0%, #111 100%) !important;
  color: var(--core-text) !important;
  font-family: Inter, ui-sans-serif, system-ui, sans-serif !important;
}

body.page-demandes :is(main, footer) {
  background: transparent !important;
}

body.page-demandes #sidebar,
body.page-demandes header.glass-panel,
body.page-demandes footer {
  background: rgba(10, 10, 10, .96) !important;
  border-color: var(--core-line) !important;
  box-shadow: none !important;
}

body.page-demandes #sidebar a {
  background: transparent !important;
  border: 1px solid transparent !important;
  border-radius: 0 !important;
  color: var(--core-dim) !important;
  transition: color .18s ease, transform .18s ease, border-color .18s ease !important;
}

body.page-demandes #sidebar a:hover,
body.page-demandes #sidebar a.nav-active {
  color: #fff !important;
  border-color: var(--core-line-strong) !important;
  transform: translateX(4px);
}

body.page-demandes .requests-hero {
  background: var(--core-panel) !important;
  background-image: none !important;
  border: 1px solid var(--core-line) !important;
  border-radius: 0 !important;
  box-shadow: none !important;
}

body.page-demandes .requests-hero h1 {
  color: #fff !important;
  -webkit-text-fill-color: #fff !important;
  font-family: Manrope, Inter, sans-serif !important;
  font-size: clamp(4.5rem, 11vw, 10rem) !important;
  font-weight: 900 !important;
  line-height: .86 !important;
  letter-spacing: -.06em !important;
  text-transform: uppercase !important;
}

body.page-demandes :is(.request-stat, .request-card, .request-detail-row, .request-empty) {
  background: var(--core-panel) !important;
  border: 1px solid var(--core-line) !important;
  border-radius: 0 !important;
  box-shadow: none !important;
}

body:is(.page-agenda, .page-documents, .page-monitoring) {
  background:
    radial-gradient(circle at 78% 8%, rgba(255, 255, 255, .07), transparent 24rem),
    linear-gradient(180deg, var(--core-bg) 0%, #111 100%) !important;
  color: var(--core-text) !important;
  font-family: Inter, ui-sans-serif, system-ui, sans-serif !important;
}

body:is(.page-agenda, .page-documents, .page-monitoring)::before {
  opacity: .10 !important;
  filter: saturate(.88) contrast(1.08) brightness(.72);
}

body:is(.page-agenda, .page-documents, .page-monitoring) :is(main, footer) {
  background: transparent !important;
}

body:is(.page-agenda, .page-documents, .page-monitoring) #sidebar,
body:is(.page-agenda, .page-documents, .page-monitoring) header.glass-panel,
body:is(.page-agenda, .page-documents, .page-monitoring) footer {
  background: rgba(10, 10, 10, .96) !important;
  border-color: var(--core-line) !important;
  box-shadow: none !important;
}

body:is(.page-agenda, .page-documents, .page-monitoring) #sidebar a {
  background: transparent !important;
  border: 1px solid transparent !important;
  border-radius: 0 !important;
  color: var(--core-dim) !important;
  transition: color .18s ease, transform .18s ease, border-color .18s ease !important;
}

body:is(.page-agenda, .page-documents, .page-monitoring) #sidebar a:hover,
body:is(.page-agenda, .page-documents, .page-monitoring) #sidebar a.nav-active {
  color: #fff !important;
  border-color: var(--core-line-strong) !important;
  transform: translateX(4px);
}

body:is(.page-agenda, .page-documents, .page-monitoring) main :is(
  .bg-surface-container-low,
  .bg-surface-container,
  .bg-surface-container-high,
  .bg-white,
  .agenda-day-column,
  .agenda-slot-card,
  .documents-metric-card,
  .documents-logo-preview,
  .documents-template-card,
  .documents-property-explorer,
  .monitoring-panel,
  .monitoring-stat
) {
  background: var(--core-panel) !important;
  background-image: none !important;
  border: 1px solid var(--core-line) !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  color: #fff !important;
}

body:is(.page-agenda, .page-documents, .page-monitoring) :is(
  .field-input,
  input[type="text"],
  input[type="search"],
  input[type="url"],
  input[type="email"],
  input[type="number"],
  input[type="date"],
  select,
  textarea,
  .monitoring-input,
  .monitoring-select
) {
  background: #000 !important;
  background-image: none !important;
  border: 1px solid var(--core-line-strong) !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  color: #fff !important;
  -webkit-text-fill-color: #fff !important;
}

body:is(.page-agenda, .page-documents, .page-monitoring) :is(.btn-primary, .monitoring-button, .documents-header-action) {
  background: #fff !important;
  border: 1px solid #fff !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  color: #000 !important;
  -webkit-text-fill-color: #000 !important;
}

body:is(.page-agenda, .page-documents, .page-monitoring) main > div > section:first-child h1,
body.page-monitoring .monitoring-panel:first-of-type h1 {
  color: #fff !important;
  -webkit-text-fill-color: #fff !important;
  font-family: Manrope, Inter, sans-serif !important;
  font-size: clamp(4.5rem, 11vw, 10rem) !important;
  font-weight: 900 !important;
  line-height: .86 !important;
  letter-spacing: -.06em !important;
  text-transform: uppercase !important;
}

body:is(.page-home, .page-properties, .page-favorites, .page-photographie, .page-api-perso, .page-contracts, .page-demandes, .page-agenda, .page-documents, .page-monitoring) main section :is(
  h1,
  h2,
  h3,
  .properties-entry-title,
  .properties-entry-card-title,
  .dashboard-hero-page-title,
  .dashboard-hero-notebook-title,
  .dashboard-hero-agenda-title
) {
  width: 100% !important;
  text-align: center !important;
  margin-left: auto !important;
  margin-right: auto !important;
}

body:is(.page-home, .page-properties, .page-favorites, .page-photographie, .page-api-perso, .page-contracts, .page-demandes, .page-agenda, .page-documents, .page-monitoring) main section :is(
  .properties-entry-card-title,
  .properties-entry-card .material-symbols-outlined
) {
  justify-self: center !important;
}

body:is(.page-home, .page-properties, .page-favorites, .page-photographie, .page-api-perso, .page-contracts, .page-demandes, .page-agenda, .page-documents, .page-monitoring) main section :is(
  div:has(> h1),
  div:has(> h2),
  div:has(> h3)
) {
  text-align: center !important;
}

body:is(.page-home, .page-properties, .page-favorites, .page-photographie, .page-api-perso, .page-contracts, .page-demandes, .page-agenda, .page-documents, .page-monitoring) main section :is(
  .flex > div:has(> h1),
  .flex > div:has(> h2),
  .flex > div:has(> h3),
  .monitoring-toolbar > div:has(> h1),
  .monitoring-toolbar > div:has(> h2)
) {
  flex: 1 1 auto !important;
  min-width: 0 !important;
}

body:is(.page-agenda, .page-documents, .page-monitoring, .page-contracts, .page-properties) main section > .flex:has(> div h2):has(> div:nth-child(2)),
body:is(.page-agenda, .page-documents, .page-monitoring, .page-contracts, .page-properties) main section > .flex:has(> div h2):has(> :nth-child(2)),
body.page-monitoring main section .monitoring-toolbar:has(h1),
body.page-monitoring main section .monitoring-toolbar:has(h2) {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr) !important;
  align-items: center !important;
  gap: 1rem !important;
}

body:is(.page-agenda, .page-documents, .page-monitoring, .page-contracts, .page-properties) main section > .flex:has(> div h2):has(> div:nth-child(2)) > div:first-child,
body:is(.page-agenda, .page-documents, .page-monitoring, .page-contracts, .page-properties) main section > .flex:has(> div h2):has(> :nth-child(2)) > div:first-child,
body.page-monitoring main section .monitoring-toolbar:has(h1) > div:first-child,
body.page-monitoring main section .monitoring-toolbar:has(h2) > div:first-child {
  grid-column: 2 !important;
  justify-self: center !important;
  width: auto !important;
}

body:is(.page-agenda, .page-documents, .page-monitoring, .page-contracts, .page-properties) main section > .flex:has(> div h2):has(> div:nth-child(2)) > div:nth-child(2),
body:is(.page-agenda, .page-documents, .page-monitoring, .page-contracts, .page-properties) main section > .flex:has(> div h2):has(> :nth-child(2)) > :nth-child(2),
body.page-monitoring main section .monitoring-toolbar:has(h1) > div:nth-child(2),
body.page-monitoring main section .monitoring-toolbar:has(h2) > div:nth-child(2) {
  grid-column: 3 !important;
  justify-self: end !important;
}

body.page-monitoring :is(.monitoring-panel, .monitoring-stat),
body.page-contracts main :is(.bg-surface-container-low, .bg-tertiary-container, .bg-white) {
  background: transparent !important;
  background-image: none !important;
}

body:is(
  .page-home,
  .page-properties,
  .page-demandes,
  .page-agenda,
  .page-documents,
  .page-monitoring,
  .page-photographie,
  .page-api-perso,
  .page-contracts,
  .page-favorites,
  .page-socials,
  .page-visite-virtuelle
) main :is(
  section,
  article,
  .bg-surface-container-low,
  .bg-surface-container,
  .bg-surface-container-high,
  .bg-surface-container-lowest,
  .bg-white,
  [class*="-panel"],
  [class*="-card"],
  [class*="-shell"]
) {
  background: transparent !important;
  background-image: none !important;
}

body.page-home main :is(
  .dashboard-hero,
  .dashboard-hero-header,
  .dashboard-hero-notebook,
  .dashboard-hero-agenda,
  .dashboard-hero-notebook-preview,
  .dashboard-property-card,
  #recent-clients > *,
  #dashboard-alert-box,
  .dashboard-quicklink,
  .dashboard-hero-link
) {
  background: rgba(10, 10, 10, .10) !important;
  background-image: none !important;
}

@media (max-width: 760px) {
  body:is(.page-home, .page-properties, .page-favorites, .page-photographie, .page-api-perso, .page-contracts) :is(h1, .properties-entry-title) {
    letter-spacing: -.045em !important;
  }

  body.page-properties .properties-entry-card {
    min-height: 13rem !important;
  }

  body.page-api-perso .api-perso-card {
    grid-template-columns: 1fr !important;
  }
}

/* Mobile/tablet title-first layout.
   Match the document module behavior: the big page title is the visual width
   reference, and functional blocks wrap below it instead of hiding content. */
body.page-home .dashboard-hero-page-title {
  width: min(100%, 11ch) !important;
  max-width: 100% !important;
  margin-left: auto !important;
  margin-right: auto !important;
  text-align: center !important;
  text-wrap: balance;
  overflow-wrap: normal !important;
}

@media (max-width: 1279px) {
  body.page-home .dashboard-hero {
    padding: clamp(1rem, 3vw, 1.75rem) !important;
  }

  body.page-home .dashboard-hero-page-title {
    font-size: clamp(4rem, 12vw, 7.4rem) !important;
    line-height: .82 !important;
    letter-spacing: -.06em !important;
    white-space: normal !important;
  }

  body.page-home .dashboard-hero-copy {
    width: 100% !important;
    max-width: min(100%, 62rem) !important;
    margin-left: auto !important;
    margin-right: auto !important;
  }

  body.page-home .dashboard-hero-actions {
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 12rem), 1fr)) !important;
    align-items: stretch !important;
  }

  body.page-home .dashboard-hero-link {
    min-height: 3.4rem !important;
    white-space: normal !important;
    line-height: 1.18 !important;
    text-align: center !important;
    overflow-wrap: anywhere !important;
  }

  body.page-home .dashboard-property-grid {
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 18rem), 1fr)) !important;
  }
}

@media (max-width: 520px) {
  body.page-home .dashboard-hero-page-title {
    width: min(100%, 7ch) !important;
    font-size: clamp(3.25rem, 16vw, 4.35rem) !important;
    letter-spacing: -.045em !important;
  }

  body.page-home .dashboard-hero-actions,
  body.page-home .dashboard-property-grid {
    grid-template-columns: 1fr !important;
  }

  body.page-home .dashboard-hero-link {
    min-height: 3.05rem !important;
  }
}
