.dashboard-page { --sidebar-width: 270px; min-height: 100vh; color: var(--ink); background: #f2f6f9; }
.dashboard-page.menu-open { overflow: hidden; }
.dashboard-sidebar { position: fixed; z-index: 300; inset: 0 auto 0 0; width: var(--sidebar-width); display: flex; flex-direction: column; padding: 22px 16px 18px; color: #d8e7f1; background: linear-gradient(180deg, var(--navy-950), var(--navy-900)); border-right: 1px solid rgba(255,255,255,.08); overflow-y: auto; }
.sidebar-brand { display: flex; align-items: center; justify-content: space-between; min-height: 68px; padding: 0 8px 20px; border-bottom: 1px solid rgba(255,255,255,.1); }
.sidebar-brand > a { min-width: 0; display: flex; align-items: center; gap: 11px; }
.sidebar-logo { width: 54px; height: 48px; overflow: hidden; flex: 0 0 auto; background: transparent; }
.sidebar-logo img { width: 100%; height: 100%; object-fit: contain; }
.sidebar-brand strong { display: block; color: var(--white); font-size: 1.12rem; letter-spacing: .05em; }
.sidebar-brand small { display: block; margin-top: 2px; color: #8fb9d3; font-size: .68rem; }
.sidebar-close { display: none; width: 42px; height: 42px; place-items: center; color: var(--white); background: rgba(255,255,255,.08); border: 0; border-radius: 10px; font-size: 1.15rem; }
.sidebar-nav { display: grid; gap: 5px; margin-top: 22px; }
.sidebar-label { margin: 0 12px 6px; color: #7ea1ba; font-size: .66rem; font-weight: 800; letter-spacing: .13em; text-transform: uppercase; }
.sidebar-nav a { min-height: 46px; display: flex; align-items: center; gap: 12px; padding: 10px 12px; color: #bfd1dd; border-radius: 10px; font-size: .84rem; font-weight: 600; transition: background .2s, color .2s, transform .2s; }
.sidebar-nav a:hover { color: var(--white); background: rgba(255,255,255,.08); transform: translateX(2px); }
.sidebar-nav a.active { color: var(--white); background: linear-gradient(135deg, rgba(8,116,189,.82), rgba(5,184,200,.54)); box-shadow: 0 10px 22px rgba(0,0,0,.14); }
.sidebar-nav a > i { width: 22px; color: #6fdce4; font-size: 1.05rem; text-align: center; }
.sidebar-nav a.active > i { color: var(--white); }
.sidebar-nav a > span { min-width: 0; flex: 1; }
.sidebar-nav a > b { min-width: 23px; padding: 2px 6px; color: var(--navy-900); background: #79e2ea; border-radius: 999px; font-size: .65rem; text-align: center; }
.sidebar-nav-bottom { margin-top: auto; padding-top: 20px; }
.sidebar-demo { margin: 14px 10px 0; color: #7498b1; font-size: .68rem; }
.sidebar-demo i { margin-right: 5px; }
.dashboard-overlay { position: fixed; z-index: 250; inset: 0; display: none; width: 100%; height: 100%; padding: 0; background: rgba(4,19,36,.65); border: 0; opacity: 0; }
.dashboard-shell { min-width: 0; min-height: 100vh; margin-left: var(--sidebar-width); }
.dashboard-topbar { position: sticky; z-index: 200; top: 0; min-height: 82px; display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 13px clamp(22px, 3vw, 44px); background: rgba(255,255,255,.97); border-bottom: 1px solid var(--line); box-shadow: 0 6px 18px rgba(8,43,76,.04); backdrop-filter: blur(12px); }
.topbar-title { min-width: 0; display: flex; align-items: center; gap: 14px; }
.topbar-title h1 { margin: 0 0 2px; font-size: 1.34rem; }
.topbar-title p { margin: 0; color: var(--muted); font-size: .76rem; }
.sidebar-toggle { display: none; width: 44px; height: 44px; flex: 0 0 auto; color: var(--navy-800); background: var(--surface); border: 1px solid var(--line); border-radius: 10px; font-size: 1.35rem; }
.topbar-actions { display: flex; align-items: center; gap: 10px; }
.dropdown { position: relative; }
.topbar-icon { position: relative; display: grid; width: 44px; height: 44px; place-items: center; color: var(--navy-800); background: var(--surface); border: 1px solid var(--line); border-radius: 11px; font-size: 1.08rem; }
.topbar-icon > span { position: absolute; top: -5px; right: -4px; min-width: 20px; height: 20px; display: grid; place-items: center; color: var(--white); background: var(--orange-500); border: 2px solid var(--white); border-radius: 50%; font-size: .59rem; font-weight: 800; }
.profile-toggle { min-height: 50px; display: flex; align-items: center; gap: 10px; padding: 5px 10px 5px 6px; color: var(--ink); background: transparent; border: 1px solid transparent; border-radius: 12px; text-align: left; }
.profile-toggle:hover, .profile-toggle[aria-expanded="true"] { background: var(--surface); border-color: var(--line); }
.avatar { width: 40px; height: 40px; display: grid; place-items: center; flex: 0 0 auto; color: var(--white); background: linear-gradient(135deg, var(--blue-700), var(--cyan-500)); border-radius: 11px; font-size: .78rem; font-weight: 800; }
.profile-name strong, .profile-name small { display: block; line-height: 1.3; white-space: nowrap; }
.profile-name strong { font-size: .8rem; }
.profile-name small { color: var(--muted); font-size: .67rem; }
.profile-toggle > i { color: var(--muted); font-size: .7rem; }
.dropdown-menu { position: absolute; z-index: 20; top: calc(100% + 10px); right: 0; width: min(340px, calc(100vw - 30px)); padding: 8px; background: var(--white); border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--shadow-lg); }
.dropdown-menu[hidden] { display: none; }
.dropdown-heading { display: flex; align-items: center; justify-content: space-between; padding: 10px 10px 12px; border-bottom: 1px solid var(--line); }
.dropdown-heading strong { color: var(--navy-900); font-size: .88rem; }
.dropdown-heading span { padding: 3px 7px; color: var(--blue-700); background: #eaf4fb; border-radius: 999px; font-size: .62rem; font-weight: 700; }
.dropdown-menu a { display: flex; align-items: center; gap: 11px; padding: 11px 10px; color: var(--ink); border-radius: 9px; font-size: .78rem; }
.dropdown-menu a:hover { background: var(--surface); color: var(--blue-700); }
.notification-menu > a > i { width: 33px; height: 33px; display: grid; place-items: center; flex: 0 0 auto; color: var(--blue-700); background: #eaf4fb; border-radius: 9px; }
.notification-menu a span { min-width: 0; }
.notification-menu a strong, .notification-menu a small { display: block; }
.notification-menu a small { margin-top: 2px; overflow: hidden; color: var(--muted); font-size: .67rem; text-overflow: ellipsis; white-space: nowrap; }
.dropdown-menu a.dropdown-footer { justify-content: center; padding-top: 12px; color: var(--blue-700); border-top: 1px solid var(--line); font-weight: 700; }
.profile-menu { width: 220px; }
.profile-menu a i { width: 20px; color: var(--blue-600); }
.profile-menu a:last-child { color: #ad3c3c; border-top: 1px solid var(--line); }
.dashboard-main { width: min(100%, 1540px); margin-inline: auto; padding: 28px clamp(22px, 3vw, 44px) 50px; }
.demo-notice { display: flex; align-items: flex-start; gap: 9px; margin-bottom: 20px; padding: 11px 14px; color: #4c6171; background: #eaf4fb; border: 1px solid #d4e9f7; border-radius: 10px; font-size: .75rem; }
.demo-notice i { flex: 0 0 auto; color: var(--blue-600); }
.welcome-panel { position: relative; overflow: hidden; display: flex; align-items: center; justify-content: space-between; gap: 30px; padding: clamp(28px, 4vw, 48px); color: var(--white); background: linear-gradient(120deg, var(--navy-900), #075080 72%, #07859a); border-radius: var(--radius-md); box-shadow: var(--shadow-lg); }
.welcome-panel::after { content: ""; position: absolute; right: -90px; bottom: -120px; width: 330px; height: 330px; border: 50px solid rgba(255,255,255,.06); border-radius: 50%; }
.welcome-panel > * { position: relative; z-index: 1; }
.dashboard-kicker { margin: 0 0 7px; color: var(--cyan-500); font-size: .67rem; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; }
.welcome-panel .dashboard-kicker { color: #8ce9ee; }
.welcome-panel h2 { max-width: 790px; margin: 0 0 12px; color: var(--white); font-size: clamp(1.55rem, 2.4vw, 2.45rem); letter-spacing: -.03em; }
.welcome-panel p:last-child { max-width: 700px; margin: 0; color: #c8dce8; font-size: .9rem; }
.welcome-panel .btn { flex: 0 0 auto; }
.dashboard-section { margin-top: 34px; }
.section-title-row, .panel-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; margin-bottom: 17px; }
.section-title-row h2, .panel-heading h2, .compact-heading h2 { margin: 0; font-size: 1.18rem; }
.demo-tag { flex: 0 0 auto; padding: 6px 10px; color: var(--blue-700); background: var(--white); border: 1px solid var(--line); border-radius: 999px; font-size: .65rem; font-weight: 700; }
.stats-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.stat-card { min-width: 0; display: flex; align-items: center; gap: 13px; padding: 20px; background: var(--white); border: 1px solid var(--line); border-radius: 15px; box-shadow: var(--shadow-sm); transition: transform .2s, box-shadow .2s; }
.stat-card:hover { transform: translateY(-3px); box-shadow: 0 14px 30px rgba(8,43,76,.12); }
.stat-icon { width: 46px; height: 46px; display: grid; place-items: center; flex: 0 0 auto; color: var(--blue-700); background: #eaf4fb; border-radius: 12px; font-size: 1.18rem; }
.stat-icon.cyan { color: #057b85; background: var(--cyan-100); }
.stat-icon.green { color: #08714e; background: #e1f8ef; }
.stat-icon.orange { color: #b95700; background: #fff0df; }
.stat-card > span:nth-child(2) { min-width: 0; flex: 1; }
.stat-card strong, .stat-card small { display: block; }
.stat-card strong { color: var(--navy-900); font-size: 1.65rem; line-height: 1.15; }
.stat-card small { overflow: hidden; color: var(--muted); font-size: .7rem; text-overflow: ellipsis; white-space: nowrap; }
.stat-card > i { color: #9babb7; font-size: .72rem; }
.dashboard-columns { display: grid; grid-template-columns: minmax(0, 1.65fr) minmax(300px, .75fr); align-items: start; gap: 20px; margin-top: 34px; }
.panel { background: var(--white); border: 1px solid var(--line); border-radius: 17px; box-shadow: var(--shadow-sm); }
.requests-panel { min-width: 0; padding: 24px; }
.panel-heading > a, .section-link { color: var(--blue-700); font-size: .75rem; font-weight: 700; white-space: nowrap; }
.request-list { display: grid; }
.request-row { min-width: 0; display: grid; grid-template-columns: minmax(190px, 1.3fr) minmax(100px, .55fr) minmax(115px, .62fr) auto; align-items: center; gap: 15px; padding: 17px 0; border-top: 1px solid var(--line); }
.request-property { min-width: 0; display: flex; align-items: center; gap: 11px; }
.request-icon { width: 40px; height: 40px; display: grid; place-items: center; flex: 0 0 auto; color: var(--blue-700); background: #eaf4fb; border-radius: 10px; }
.request-row h3 { margin: 0 0 2px; font-size: .84rem; }
.request-row p, .request-row small, .request-row strong { display: block; margin: 0; }
.request-row p, .request-row small { overflow: hidden; color: var(--muted); font-size: .65rem; text-overflow: ellipsis; white-space: nowrap; }
.request-row strong { margin-top: 2px; color: var(--navy-900); font-size: .73rem; }
.status { width: fit-content; display: inline-flex; align-items: center; gap: 5px; padding: 6px 9px; border-radius: 999px; font-size: .63rem; font-weight: 800; line-height: 1.25; white-space: nowrap; }
.status-pending { color: #805200; background: #fff2cd; }
.status-visit { color: #07559d; background: #e3f1fb; }
.status-review { color: #6845a1; background: #f0eafa; }
.status-approved, .status-active, .status-paid { color: #08714e; background: #e1f8ef; }
.status-warning { color: #a44700; background: #ffead6; }
.mobile-panel-link { display: none; }
.side-panels { display: grid; gap: 20px; }
.compact-panel { padding: 22px; }
.compact-heading { display: flex; align-items: center; gap: 11px; margin-bottom: 17px; }
.compact-icon { width: 42px; height: 42px; display: grid; place-items: center; flex: 0 0 auto; color: var(--white); background: linear-gradient(135deg, var(--blue-700), var(--cyan-500)); border-radius: 11px; }
.compact-icon.orange { background: linear-gradient(135deg, var(--orange-500), var(--orange-600)); }
.appointment-date { display: flex; align-items: center; gap: 9px; margin: 4px 0 16px; padding: 12px; background: var(--surface); border-radius: 12px; }
.appointment-date > strong { color: var(--blue-700); font-size: 2rem; line-height: 1; }
.appointment-date > span { color: var(--navy-900); font-size: .76rem; font-weight: 800; text-transform: uppercase; }
.appointment-date > span small { display: block; color: var(--muted); font-size: .6rem; font-weight: 500; }
.appointment-date time { margin-left: auto; padding: 5px 9px; color: var(--white); background: var(--navy-800); border-radius: 7px; font-size: .72rem; font-weight: 800; }
.compact-panel > h3 { margin: 0 0 6px; font-size: .96rem; }
.compact-panel > p { margin: 5px 0; color: var(--muted); font-size: .72rem; }
.compact-panel > p i { width: 17px; color: var(--blue-600); }
.compact-panel > .status { margin-top: 11px; }
.compact-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 9px; margin-top: 17px; }
.compact-actions .btn { min-height: 42px; padding: 9px; font-size: .7rem; }
.payment-label { margin-bottom: 0 !important; }
.payment-amount { display: block; margin: 0 0 13px; color: var(--navy-900); font-size: 1.85rem; }
.payment-amount small { color: var(--blue-700); font-size: .75rem; }
.full-button { width: 100%; margin-top: 17px; font-size: .75rem; }
.recommendation-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
.recommendation-card { min-width: 0; overflow: hidden; background: var(--white); border: 1px solid var(--line); border-radius: 17px; box-shadow: var(--shadow-sm); transition: transform .22s, box-shadow .22s; }
.recommendation-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.recommendation-image { position: relative; height: 205px; overflow: hidden; background: linear-gradient(135deg, var(--navy-800), var(--cyan-500)); }
.recommendation-image > img { width: 100%; height: 100%; object-fit: cover; transition: transform .45s; }
.recommendation-card:hover .recommendation-image > img { transform: scale(1.04); }
.recommendation-image > .status { position: absolute; z-index: 2; top: 13px; left: 13px; }
.recommendation-image .favorite-button { position: absolute; z-index: 2; top: 12px; right: 12px; box-shadow: 0 5px 14px rgba(0,0,0,.18); }
.recommendation-body { padding: 18px; }
.recommendation-body > p { margin: 0 0 6px; color: var(--muted); font-size: .68rem; }
.recommendation-body > p i { color: var(--orange-500); }
.recommendation-body h3 { margin: 0 0 7px; font-size: 1rem; }
.recommendation-price { display: block; color: var(--blue-700); font-size: 1.05rem; }
.recommendation-price small { color: var(--muted); font-size: .68rem; font-weight: 500; }
.recommendation-body ul { display: flex; gap: 8px; margin: 14px 0; padding: 11px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.recommendation-body li { flex: 1; color: var(--muted); font-size: .65rem; white-space: nowrap; }
.recommendation-body li i { color: var(--blue-600); }
.recommendation-body > a { display: flex; align-items: center; justify-content: space-between; color: var(--navy-800); font-size: .75rem; font-weight: 800; }
.recommendation-body > a:hover { color: var(--blue-600); }
.activity-panel { margin-top: 34px; padding: 24px; }
.activity-list { position: relative; display: grid; }
.activity-list::before { content: ""; position: absolute; top: 23px; bottom: 23px; left: 18px; width: 1px; background: var(--line); }
.activity-list li { position: relative; z-index: 1; display: grid; grid-template-columns: 37px 1fr auto; align-items: center; gap: 13px; padding: 11px 0; }
.activity-icon { width: 37px; height: 37px; display: grid; place-items: center; padding: 0; border: 4px solid var(--white); border-radius: 50%; }
.activity-list strong { display: block; color: var(--navy-900); font-size: .78rem; }
.activity-list p { margin: 2px 0 0; color: var(--muted); font-size: .68rem; }
.activity-list time { color: var(--muted); font-size: .65rem; white-space: nowrap; }
.dashboard-footer { display: flex; justify-content: space-between; gap: 20px; padding: 22px clamp(22px, 3vw, 44px); color: #8495a3; background: var(--white); border-top: 1px solid var(--line); font-size: .65rem; }
.dashboard-footer p { margin: 0; }

@media (max-width: 1199px) {
  .dashboard-page { --sidebar-width: 235px; }
  .sidebar-nav a { font-size: .78rem; }
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .dashboard-columns { grid-template-columns: 1fr; }
  .side-panels { grid-template-columns: repeat(2, 1fr); }
  .request-row { grid-template-columns: minmax(190px, 1.3fr) minmax(100px, .55fr) minmax(115px, .62fr) auto; }
}

@media (max-width: 991px) {
  .dashboard-sidebar { width: min(290px, 84vw); transform: translateX(-102%); transition: transform .25s ease; box-shadow: 20px 0 50px rgba(4,19,36,.28); }
  .dashboard-page.menu-open .dashboard-sidebar { transform: translateX(0); }
  .dashboard-page.menu-open .dashboard-overlay { display: block; opacity: 1; }
  .sidebar-close { display: grid; }
  .dashboard-shell { margin-left: 0; }
  .sidebar-toggle { display: grid; place-items: center; }
  .dashboard-main { padding-top: 22px; }
}

@media (max-width: 767px) {
  .dashboard-topbar { min-height: 72px; padding: 10px 16px; }
  .topbar-title h1 { font-size: 1.08rem; }
  .topbar-title p { display: none; }
  .profile-name { display: none; }
  .profile-toggle { padding-right: 6px; }
  .profile-toggle > i { display: none; }
  .dashboard-main { padding: 18px 16px 38px; }
  .demo-notice { font-size: .7rem; }
  .welcome-panel { align-items: flex-start; flex-direction: column; padding: 26px 22px; }
  .welcome-panel .btn { width: 100%; }
  .stats-grid { grid-template-columns: 1fr 1fr; gap: 11px; }
  .stat-card { align-items: flex-start; padding: 15px; }
  .stat-card > i { display: none; }
  .stat-icon { width: 38px; height: 38px; }
  .stat-card strong { font-size: 1.4rem; }
  .stat-card small { white-space: normal; line-height: 1.35; }
  .section-title-row { align-items: flex-start; }
  .demo-tag, .section-link, .panel-heading > a { display: none; }
  .requests-panel { padding: 20px; }
  .request-row { grid-template-columns: 1fr auto; align-items: start; gap: 9px 14px; }
  .request-property { grid-column: 1 / -1; }
  .request-row > div:nth-child(2), .request-row > div:nth-child(3) { padding-left: 51px; }
  .request-row > .status { align-self: end; grid-column: 2; grid-row: 2 / span 2; white-space: normal; text-align: left; }
  .mobile-panel-link { display: flex; align-items: center; justify-content: center; gap: 7px; margin-top: 12px; padding-top: 16px; color: var(--blue-700); border-top: 1px solid var(--line); font-size: .75rem; font-weight: 700; }
  .side-panels { grid-template-columns: 1fr; }
  .recommendation-grid { grid-template-columns: 1fr; }
  .recommendation-image { height: 235px; }
  .activity-list li { grid-template-columns: 37px 1fr; align-items: start; }
  .activity-list time { grid-column: 2; }
  .dashboard-footer { flex-direction: column; text-align: center; }
}

@media (max-width: 479px) {
  .topbar-actions { gap: 4px; }
  .topbar-icon, .sidebar-toggle { width: 42px; height: 42px; }
  .avatar { width: 38px; height: 38px; }
  .stats-grid { grid-template-columns: 1fr; }
  .stat-card { align-items: center; }
  .stat-card small { white-space: nowrap; }
  .welcome-panel h2 { font-size: 1.5rem; }
  .request-row { grid-template-columns: 1fr; }
  .request-row > div:nth-child(2), .request-row > div:nth-child(3) { padding-left: 51px; }
  .request-row > .status { grid-column: 1; grid-row: auto; margin-left: 51px; }
  .compact-actions { grid-template-columns: 1fr; }
  .recommendation-image { height: 205px; }
  .dropdown-menu { position: fixed; top: 68px; right: 12px; }
}

@media (prefers-reduced-motion: reduce) {
  .dashboard-sidebar, .stat-card, .recommendation-card, .recommendation-image > img { transition: none; }
}

/* Pages internes de l'espace Locataire */
.page-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; margin-bottom: 22px; }
.page-heading h2 { margin: 0 0 7px; font-size: clamp(1.45rem, 2.5vw, 2.1rem); }
.page-heading p { margin: 0; color: var(--muted); font-size: .88rem; }
.page-heading-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.page-content { display: grid; gap: 22px; }
.content-panel { padding: 24px; background: var(--white); border: 1px solid var(--line); border-radius: 17px; box-shadow: var(--shadow-sm); }
.content-panel-heading { display: flex; align-items: center; justify-content: space-between; gap: 18px; margin-bottom: 20px; }
.content-panel-heading h2 { margin: 0; font-size: 1.12rem; }
.search-filters { display: grid; grid-template-columns: 1.15fr 1fr .9fr .7fr auto; align-items: end; gap: 12px; }
.dashboard-field label { display: block; margin-bottom: 6px; color: var(--navy-800); font-size: .72rem; font-weight: 700; }
.dashboard-field select, .dashboard-field input, .dashboard-field textarea { width: 100%; min-height: 46px; padding: 10px 12px; color: var(--ink); background: var(--surface); border: 1px solid var(--line); border-radius: 9px; }
.dashboard-field textarea { min-height: 100px; resize: vertical; }
.search-filters .btn { min-height: 46px; }
.results-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 18px; margin: 28px 0 15px; }
.results-toolbar h2 { margin: 0; font-size: 1.15rem; }
.results-toolbar p { min-height: 20px; margin: 3px 0 0; color: var(--muted); font-size: .72rem; }
.sort-control { display: flex; align-items: center; gap: 8px; }
.sort-control label { color: var(--muted); font-size: .72rem; }
.sort-control select { min-height: 40px; padding: 7px 30px 7px 10px; color: var(--ink); background: var(--white); border: 1px solid var(--line); border-radius: 8px; }
.property-results-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
.property-results-grid [hidden] { display: none; }

@media (max-width: 1199px) {
  .search-filters { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .search-filters .btn { width: 100%; }
}

@media (max-width: 767px) {
  .page-heading { align-items: flex-start; flex-direction: column; }
  .page-heading-actions { width: 100%; }
  .page-heading-actions .btn { flex: 1 1 220px; }
  .content-panel { padding: 19px; }
  .search-filters, .property-results-grid { grid-template-columns: 1fr; }
  .results-toolbar { align-items: flex-start; flex-direction: column; }
  .sort-control { width: 100%; }
  .sort-control select { min-width: 0; flex: 1; }
}

.status-cancelled { color: #9a3030; background: #fde7e7; }
.status-ended { color: #586875; background: #eaf0f4; }
.detail-layout { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(300px, .65fr); align-items: start; gap: 22px; }
.property-gallery { display: grid; grid-template-columns: 2fr 1fr; grid-template-rows: repeat(2, 170px); gap: 10px; overflow: hidden; border-radius: 17px; }
.property-gallery .image-fallback { position: relative; overflow: hidden; min-height: 0; background: linear-gradient(135deg, var(--navy-800), var(--cyan-500)); }
.property-gallery .gallery-main { grid-row: 1 / 3; }
.property-gallery img { width: 100%; height: 100%; object-fit: cover; }
.detail-card { padding: 25px; }
.detail-title-row { display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; }
.detail-title-row h2 { margin: 7px 0 5px; font-size: 1.55rem; }
.detail-title-row p { margin: 0; color: var(--muted); font-size: .78rem; }
.detail-price { display: block; margin: 18px 0; color: var(--blue-700); font-size: 1.65rem; }
.detail-price small { color: var(--muted); font-size: .75rem; font-weight: 500; }
.detail-facts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin: 18px 0; }
.detail-facts li { padding: 12px; color: var(--muted); background: var(--surface); border-radius: 10px; font-size: .72rem; text-align: center; }
.detail-facts i { display: block; margin-bottom: 3px; color: var(--blue-600); font-size: 1.05rem; }
.detail-description { color: var(--muted); font-size: .82rem; }
.feature-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.feature-grid li { display: flex; align-items: center; gap: 8px; padding: 11px; color: var(--navy-800); background: var(--surface); border-radius: 9px; font-size: .72rem; }
.feature-grid i { color: var(--green-500); }
.location-placeholder { display: flex; align-items: center; gap: 12px; padding: 18px; background: linear-gradient(135deg, #eaf4fb, var(--cyan-100)); border-radius: 12px; }
.location-placeholder i { font-size: 1.45rem; color: var(--orange-500); }
.location-placeholder strong, .location-placeholder small { display: block; }
.location-placeholder small { color: var(--muted); font-size: .68rem; }
.agent-card { position: sticky; top: 104px; padding: 24px; }
.agent-avatar { width: 52px; height: 52px; display: grid; place-items: center; margin-bottom: 15px; color: var(--white); background: linear-gradient(135deg, var(--blue-700), var(--cyan-500)); border-radius: 14px; font-size: 1.3rem; }
.agent-card h2 { margin-bottom: 5px; font-size: 1.12rem; }
.agent-card > p { color: var(--muted); font-size: .74rem; }
.agent-actions { display: grid; gap: 10px; margin-top: 20px; }
.agent-actions .btn { width: 100%; }
.mini-counts { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 13px; }
.mini-count { padding: 18px; background: var(--white); border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--shadow-sm); }
.mini-count strong, .mini-count small { display: block; }
.mini-count strong { color: var(--navy-900); font-size: 1.5rem; }
.mini-count small { color: var(--muted); font-size: .7rem; }
.record-list { display: grid; gap: 12px; }
.record-card { display: grid; grid-template-columns: minmax(210px, 1.25fr) repeat(2, minmax(110px, .55fr)) auto auto; align-items: center; gap: 15px; padding: 18px; background: var(--white); border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--shadow-sm); }
.record-card h3 { margin: 0 0 3px; font-size: .9rem; }
.record-card p, .record-card small { display: block; margin: 0; color: var(--muted); font-size: .68rem; }
.record-card strong { display: block; color: var(--navy-900); font-size: .76rem; }
.record-card .btn { min-height: 40px; padding: 8px 12px; font-size: .68rem; }
.featured-visit { overflow: hidden; display: grid; grid-template-columns: minmax(260px, .8fr) 1.2fr; }
.featured-visit-visual { min-height: 300px; position: relative; background: linear-gradient(135deg, var(--navy-800), var(--cyan-500)); }
.featured-visit-visual img { width: 100%; height: 100%; object-fit: cover; }
.featured-visit-content { padding: 30px; }
.featured-visit-content h2 { margin: 6px 0; font-size: 1.45rem; }
.featured-visit-content > p { margin: 5px 0; color: var(--muted); font-size: .76rem; }
.visit-datetime { display: flex; gap: 12px; margin: 20px 0; }
.visit-datetime span { padding: 11px 14px; color: var(--navy-800); background: var(--surface); border-radius: 10px; font-size: .75rem; font-weight: 700; }
.visit-datetime i { color: var(--blue-600); }
.visit-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 20px; }
.contract-card { display: grid; grid-template-columns: 54px 1fr auto; gap: 18px; padding: 24px; }
.contract-icon { width: 54px; height: 54px; display: grid; place-items: center; color: var(--white); background: linear-gradient(135deg, var(--blue-700), var(--cyan-500)); border-radius: 14px; font-size: 1.35rem; }
.contract-card h2 { margin: 0 0 4px; font-size: 1.12rem; }
.contract-card > div > p { margin: 0; color: var(--muted); font-size: .72rem; }
.contract-meta { grid-column: 2 / 4; display: grid; grid-template-columns: repeat(5, 1fr); gap: 10px; padding-top: 16px; border-top: 1px solid var(--line); }
.contract-meta span { color: var(--muted); font-size: .65rem; }
.contract-meta strong { display: block; margin-top: 2px; color: var(--navy-900); font-size: .73rem; }
.contract-actions { display: flex; gap: 8px; align-items: center; }
.payment-summary { display: grid; grid-template-columns: 1.2fr repeat(2, .8fr) auto; align-items: center; gap: 18px; padding: 26px; color: var(--white); background: linear-gradient(120deg, var(--navy-900), #075080); border-radius: 17px; box-shadow: var(--shadow-lg); }
.payment-summary p, .payment-summary small { display: block; margin: 0; color: #bdd1df; font-size: .69rem; }
.payment-summary strong { display: block; color: var(--white); font-size: 1rem; }
.payment-summary .amount { font-size: 2rem; }
.payment-history { width: 100%; border-collapse: collapse; }
.payment-history th, .payment-history td { padding: 14px 12px; border-bottom: 1px solid var(--line); text-align: left; font-size: .74rem; }
.payment-history th { color: var(--muted); font-size: .65rem; text-transform: uppercase; }
.notification-list { display: grid; gap: 9px; }
.notification-item { position: relative; display: grid; grid-template-columns: 44px 1fr auto; align-items: center; gap: 13px; padding: 16px; background: var(--white); border: 1px solid var(--line); border-radius: 13px; }
.notification-item.unread { background: #f3f9fd; border-color: #cde5f5; }
.notification-item.unread::after { content: ""; position: absolute; top: 16px; right: 16px; width: 7px; height: 7px; background: var(--blue-600); border-radius: 50%; }
.notification-list-icon { width: 44px; height: 44px; display: grid; place-items: center; color: var(--blue-700); background: #eaf4fb; border-radius: 11px; }
.notification-item h2 { margin: 0 0 3px; padding-right: 15px; font-size: .84rem; }
.notification-item p { margin: 0; color: var(--muted); font-size: .7rem; }
.notification-item time { padding-right: 12px; color: var(--muted); font-size: .65rem; white-space: nowrap; }
.profile-layout { display: grid; grid-template-columns: minmax(0, 1fr) 300px; align-items: start; gap: 22px; }
.profile-card-header { display: flex; align-items: center; gap: 14px; margin-bottom: 22px; }
.profile-card-header .avatar { width: 58px; height: 58px; font-size: 1rem; }
.profile-card-header h2 { margin: 0 0 2px; font-size: 1.15rem; }
.profile-card-header p { margin: 0; color: var(--muted); font-size: .72rem; }
.profile-form-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
.profile-form-grid .full { grid-column: 1 / -1; }
.profile-form-actions { display: flex; justify-content: flex-end; margin-top: 20px; }
.security-card { padding: 24px; }
.security-card h2 { font-size: 1.05rem; }
.security-card p { color: var(--muted); font-size: .72rem; }
.demo-modal[hidden] { display: none; }
.demo-modal { position: fixed; z-index: 1000; inset: 0; display: grid; place-items: center; padding: 18px; background: rgba(4,19,36,.68); }
.modal-dialog { width: min(520px, 100%); max-height: calc(100vh - 36px); overflow-y: auto; padding: 26px; background: var(--white); border-radius: 17px; box-shadow: var(--shadow-lg); }
.modal-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; margin-bottom: 18px; }
.modal-heading h2 { margin: 0; font-size: 1.25rem; }
.modal-close { width: 40px; height: 40px; display: grid; place-items: center; flex: 0 0 auto; color: var(--navy-800); background: var(--surface); border: 0; border-radius: 10px; }
.modal-dialog > p { color: var(--muted); font-size: .78rem; }
.modal-summary { display: grid; gap: 8px; margin: 18px 0; padding: 15px; background: var(--surface); border-radius: 11px; }
.modal-summary span { display: flex; justify-content: space-between; gap: 12px; color: var(--muted); font-size: .72rem; }
.modal-summary strong { color: var(--navy-900); text-align: right; }
.modal-form { display: grid; gap: 16px; }
.modal-form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.modal-form-grid .full { grid-column: 1 / -1; }
.modal-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 10px; }
.payment-methods { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin: 18px 0; }
.payment-method { min-height: 86px; padding: 12px; color: var(--navy-800); background: var(--surface); border: 1px solid var(--line); border-radius: 11px; text-align: center; }
.payment-method i { display: block; margin-bottom: 5px; color: var(--blue-600); font-size: 1.3rem; }
.payment-method span { font-size: .68rem; font-weight: 700; }
.dashboard-toast { position: fixed; z-index: 1100; right: 24px; bottom: 24px; max-width: 390px; padding: 13px 17px; color: var(--white); background: var(--navy-900); border-left: 4px solid var(--cyan-500); border-radius: 10px; box-shadow: var(--shadow-lg); font-size: .75rem; opacity: 0; transform: translateY(18px); pointer-events: none; transition: opacity .2s, transform .2s; }
.dashboard-toast.show { opacity: 1; transform: translateY(0); }
body.modal-open { overflow: hidden; }

@media (max-width: 1199px) {
  .detail-layout, .profile-layout { grid-template-columns: 1fr; }
  .agent-card { position: static; }
  .record-card { grid-template-columns: minmax(190px, 1fr) repeat(2, minmax(100px, .55fr)) auto; }
  .record-card .btn { grid-column: 1 / -1; width: fit-content; }
  .contract-meta { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 767px) {
  .property-gallery { grid-template-columns: 1fr 1fr; grid-template-rows: 230px 100px; }
  .property-gallery .gallery-main { grid-column: 1 / -1; grid-row: 1; }
  .feature-grid { grid-template-columns: repeat(2, 1fr); }
  .mini-counts { grid-template-columns: repeat(2, 1fr); }
  .record-card { grid-template-columns: 1fr 1fr; }
  .record-card > :first-child { grid-column: 1 / -1; }
  .record-card .status { justify-self: start; }
  .featured-visit { grid-template-columns: 1fr; }
  .featured-visit-visual { min-height: 230px; }
  .contract-card { grid-template-columns: 46px 1fr; padding: 20px; }
  .contract-actions, .contract-meta { grid-column: 1 / -1; }
  .contract-actions { flex-wrap: wrap; }
  .contract-meta { grid-template-columns: repeat(2, 1fr); }
  .payment-summary { grid-template-columns: 1fr 1fr; }
  .payment-summary > :first-child, .payment-summary .btn { grid-column: 1 / -1; }
  .payment-summary .btn { width: 100%; }
  .payment-history thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .payment-history tr { display: grid; grid-template-columns: 1fr auto; padding: 12px 0; border-bottom: 1px solid var(--line); }
  .payment-history td { padding: 3px 0; border: 0; }
  .payment-history td:nth-child(2) { text-align: right; }
  .payment-history td:last-child { grid-column: 1 / -1; }
  .notification-item { grid-template-columns: 40px 1fr; align-items: start; }
  .notification-item time { grid-column: 2; }
  .profile-form-grid { grid-template-columns: 1fr; }
  .profile-form-grid .full { grid-column: auto; }
  .profile-form-actions .btn { width: 100%; }
  .modal-dialog { padding: 20px; }
  .modal-form-grid { grid-template-columns: 1fr; }
  .modal-form-grid .full { grid-column: auto; }
  .modal-actions .btn { width: 100%; }
  .payment-methods { grid-template-columns: 1fr; }
  .dashboard-toast { right: 16px; bottom: 16px; left: 16px; max-width: none; }
}

@media (max-width: 479px) {
  .detail-title-row { align-items: flex-start; flex-direction: column-reverse; }
  .detail-facts, .mini-counts { grid-template-columns: 1fr; }
  .record-card { grid-template-columns: 1fr; }
  .record-card > :first-child, .record-card .btn { grid-column: auto; width: 100%; }
  .visit-actions .btn, .contract-actions .btn { width: 100%; }
  .contract-meta, .payment-summary { grid-template-columns: 1fr; }
  .payment-summary > :first-child, .payment-summary .btn { grid-column: auto; }
}

/* Composants légers de l'espace Bailleur */
.landlord-split { display: grid; grid-template-columns: 1fr 1fr; align-items: start; gap: 22px; }
.landlord-form { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.landlord-form .field-wide { grid-column: 1 / -1; }
.landlord-form-actions { grid-column: 1 / -1; display: flex; justify-content: flex-end; padding-top: 4px; }
.landlord-property-meta { display: flex; flex-wrap: wrap; gap: 8px; margin: 13px 0; }
.landlord-property-meta span { padding: 5px 8px; color: var(--muted); background: var(--surface); border-radius: 7px; font-size: .65rem; }
.status-published { color: #07559d; background: #e3f1fb; }
.status-rented { color: #08714e; background: #e1f8ef; }
.status-unavailable, .status-refused { color: #9a3030; background: #fde7e7; }

@media (max-width: 991px) {
  .landlord-split { grid-template-columns: 1fr; }
}

@media (max-width: 767px) {
  .landlord-form { grid-template-columns: 1fr; }
  .landlord-form .field-wide, .landlord-form-actions { grid-column: auto; }
  .landlord-form-actions .btn { width: 100%; }
}

/* Composants légers de l'espace Agence */
.agency-client-sections { display: grid; grid-template-columns: 1fr 1fr; align-items: start; gap: 22px; }
.agency-client-list { display: grid; gap: 12px; }
.agency-client-card { display: grid; grid-template-columns: 46px minmax(0, 1fr) auto; align-items: center; gap: 13px; padding: 15px; background: var(--surface); border: 1px solid var(--line); border-radius: 13px; }
.agency-client-card h3 { margin: 0 0 3px; font-size: .88rem; }
.agency-client-card p, .agency-client-card small { display: block; margin: 0; color: var(--muted); font-size: .68rem; }
.agency-client-card .record-icon { width: 46px; height: 46px; }
.agency-owner { margin: 10px 0 0; color: var(--muted); font-size: .68rem; }
.agency-owner strong { color: var(--navy-900); }
.agency-record-list, .workspace-record-list { display: grid; gap: 12px; }
.agency-record, .workspace-record { grid-template-columns: minmax(220px, 1.25fr) repeat(3, minmax(110px, .6fr)) auto; }
.record-actions { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 8px; }
.status-available, .status-confirmed { color: #08714e; background: #e1f8ef; }
.status-to-confirm { color: #6845a1; background: #f0eafa; }

@media (max-width: 1199px) {
  .agency-record, .workspace-record { grid-template-columns: minmax(200px, 1.2fr) repeat(2, minmax(105px, .55fr)) auto; }
  .agency-record > :nth-child(4), .workspace-record > :nth-child(4) { grid-column: 2; }
}

@media (max-width: 767px) {
  .agency-client-sections { grid-template-columns: 1fr; }
  .agency-record, .workspace-record { grid-template-columns: 1fr 1fr; }
  .agency-record > :first-child, .workspace-record > :first-child { grid-column: 1 / -1; }
  .agency-record > :nth-child(4), .workspace-record > :nth-child(4) { grid-column: auto; }
  .agency-record .status, .workspace-record .status { justify-self: start; }
  .agency-record .record-actions, .workspace-record .record-actions { grid-column: 1 / -1; justify-content: flex-start; }
}

@media (max-width: 479px) {
  .agency-record, .workspace-record { grid-template-columns: 1fr; }
  .agency-record > :first-child, .workspace-record > :first-child { grid-column: auto; }
  .agency-client-card { grid-template-columns: 42px minmax(0, 1fr); }
  .agency-client-card .status { grid-column: 2; justify-self: start; }
}

/* Composants de synthèse de l'espace Institution */
.institution-dashboard-grid { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(340px, .95fr); align-items: start; gap: 22px; }
.institution-activity-list { display: grid; gap: 12px; }
.institution-activity { display: grid; grid-template-columns: 42px minmax(0, 1fr) auto; align-items: center; gap: 12px; padding: 13px; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; }
.institution-activity > i { width: 42px; height: 42px; display: grid; place-items: center; color: var(--blue-700); background: #e8f4fb; border-radius: 10px; }
.institution-activity h3 { margin: 0 0 3px; font-size: .82rem; }
.institution-activity p, .institution-activity time { margin: 0; color: var(--muted); font-size: .66rem; }
.institution-progress-list { display: grid; gap: 16px; }
.institution-progress-heading { display: flex; justify-content: space-between; gap: 16px; margin-bottom: 7px; color: var(--navy-900); font-size: .72rem; font-weight: 700; }
.institution-progress-heading span:last-child { color: var(--muted); }
.institution-progress-track { height: 9px; overflow: hidden; background: #e7eef3; border-radius: 999px; }
.institution-progress-fill { width: var(--value); height: 100%; background: linear-gradient(90deg, var(--blue-600), var(--cyan-500)); border-radius: inherit; }
.institution-stat-sections { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: start; gap: 22px; }
.institution-report-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
.institution-report-card { display: flex; min-width: 0; flex-direction: column; gap: 12px; padding: 22px; background: var(--white); border: 1px solid var(--line); border-radius: 15px; box-shadow: var(--shadow-sm); }
.institution-report-icon { width: 48px; height: 48px; display: grid; place-items: center; color: var(--blue-700); background: #e8f4fb; border-radius: 12px; font-size: 1.2rem; }
.institution-report-card h2 { margin: 0; font-size: .94rem; }
.institution-report-card p { margin: 0; color: var(--muted); font-size: .7rem; }
.institution-report-card .report-period { margin-top: auto; color: var(--navy-900); font-weight: 700; }
.institution-report-card .status { margin-top: 2px; }
.institution-note { margin: 18px 0 0; color: var(--muted); font-size: .68rem; }

@media (max-width: 1100px) {
  .institution-report-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 991px) {
  .institution-dashboard-grid { grid-template-columns: 1fr; }
}

@media (max-width: 767px) {
  .institution-stat-sections, .institution-report-grid { grid-template-columns: 1fr; }
  .institution-activity { grid-template-columns: 40px minmax(0, 1fr); }
  .institution-activity time { grid-column: 2; }
}
