* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: #f4f6f3; color: #17211c; font-family: Inter, -apple-system, sans-serif; line-height: 1.5; }

.hidden { display: none !important; }
.topbar { height: 72px; background: rgba(255, 255, 255, 0.94); border-bottom: 1px solid #e3e8e4; display: flex; align-items: center; justify-content: space-between; padding: 0 32px; position: sticky; top: 0; z-index: 50; backdrop-filter: blur(12px); }
.brand { display: flex; align-items: center; gap: 12px; font-size: 21px; font-weight: 500; }
.brand strong { font-weight: 800; }
.brand-icon { width: 38px; height: 38px; border-radius: 11px; background: #17211c; color: white; display: grid; place-items: center; font-size: 22px; }
.user { display: flex; align-items: center; gap: 9px; font-size: 14px; color: #59645d; }
.user-icon { width: 34px; height: 34px; border-radius: 50%; background: #e8eee9; display: grid; place-items: center; font-size: 17px; }
.container { width: min(1180px, calc(100% - 40px)); margin: 0 auto; padding: 48px 0 80px; }

.button, .link-button { border: 0; cursor: pointer; font: inherit; transition: transform 0.15s ease; }
.button { padding: 12px 18px; border-radius: 12px; font-weight: 600; }
.button:hover, .link-button:hover { transform: translateY(-1px); }
.button.primary { background: #17211c; color: white; box-shadow: 0 8px 20px rgba(23, 33, 28, 0.15); }
.button.primary:hover { background: #26342d; }
.button.secondary { background: #edf1ee; color: #26332c; }
.button.secondary:hover { background: #e2e8e3; }
.link-button { background: transparent; color: #536159; font-size: 13px; font-weight: 700; padding: 8px 0; }

.onboarding-card { width: 100%; max-width: 500px; background: white; padding: 40px; border-radius: 24px; box-shadow: 0 20px 50px rgba(23, 33, 28, 0.08); text-align: center; }
.onboarding-icon { font-size: 48px; margin-bottom: 15px; }
.onboarding-card h1 { font-family: Georgia, serif; font-size: 32px; margin: 0 0 10px 0; }
.onboarding-card p { color: #667169; margin-bottom: 30px; font-size: 15px; }
.onboarding-form { text-align: left; display: flex; flex-direction: column; gap: 16px; }
.form-group label { display: block; font-size: 12px; font-weight: 700; color: #59645d; margin-bottom: 6px; }
.form-group input { width: 100%; padding: 12px; border-radius: 10px; border: 1px solid #cdd4ce; font-family: inherit; font-size: 14px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }

.welcome { display: flex; justify-content: space-between; align-items: flex-end; gap: 30px; margin-bottom: 30px; }
.eyebrow { color: #77827a; font-size: 11px; font-weight: 700; letter-spacing: 0.16em; text-transform: uppercase; margin-bottom: 8px; }
.welcome h1 { margin: 0; font-family: Georgia, serif; font-size: clamp(44px, 6vw, 72px); font-weight: 500; letter-spacing: -0.04em; }
.welcome p { max-width: 650px; margin: 18px 0 0; color: #667169; font-size: 17px; }

.house-card { background: #17211c; color: white; border-radius: 26px; padding: 32px; margin-bottom: 22px; box-shadow: 0 20px 50px rgba(23, 33, 28, 0.12); }
.house-info { display: flex; align-items: flex-start; gap: 20px; }
.house-image { width: 66px; height: 66px; flex: 0 0 66px; border-radius: 18px; background: #29372f; display: grid; place-items: center; font-size: 32px; }
.house-card .eyebrow { color: #aab7af; }
.house-card h2 { margin: 0; font-family: Georgia, serif; font-size: clamp(27px, 4vw, 40px); font-weight: 500; }
.house-card p { margin: 7px 0 0; color: #aebbb2; }
.house-details { display: flex; flex-wrap: wrap; gap: 45px; margin: 30px 0 24px; padding-top: 25px; border-top: 1px solid rgba(255, 255, 255, 0.12); }
.house-details div { display: flex; flex-direction: column; gap: 2px; }
.house-details span { color: #94a199; font-size: 12px; }
.house-details strong { font-size: 19px; font-weight: 650; }

.dashboard-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 22px; }
.card { background: white; border: 1px solid #e4e9e5; border-radius: 22px; padding: 25px; box-shadow: 0 8px 25px rgba(31, 45, 37, 0.04); }
.card.documents-card { grid-column: 1 / -1; }
.card-header { display: flex; justify-content: space-between; align-items: flex-start; gap: 20px; margin-bottom: 22px; }
.card h2 { margin: 0; font-family: Georgia, serif; font-size: 30px; font-weight: 500; }

.systems { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.system { min-height: 145px; padding: 17px; border: 1px solid #e3e9e4; border-radius: 17px; background: #fafcfb; cursor: pointer; transition: transform 0.18s ease; }
.system:hover { transform: translateY(-3px); border-color: #cbd5ce; box-shadow: 0 10px 25px rgba(31, 45, 37, 0.08); }
.system-icon { width: 42px; height: 42px; border-radius: 13px; background: #edf2ee; display: grid; place-items: center; font-size: 22px; margin-bottom: 13px; }
.system-name { font-size: 14px; font-weight: 700; margin-bottom: 8px; }
.status { display: flex; align-items: center; gap: 6px; font-size: 11px; font-weight: 650; }
.dot { width: 7px; height: 7px; border-radius: 50%; display: inline-block; }
.status.green { color: #36714d; } .status.green .dot { background: #4b9b69; }
.status.orange { color: #a26b28; } .status.orange .dot { background: #d18a35; }
.status.red { color: #a24b4b; } .status.red .dot { background: #c65b5b; }

.alert, .pro { padding: 15px 0; border-bottom: 1px solid #e8ece9; }
.alert:last-child, .pro:last-child { border-bottom: 0; }
.alert .date { display: inline-block; font-size: 11px; color: #7b867f; margin-bottom: 3px; }
.alert strong, .pro strong { display: block; font-size: 14px; margin-top: 5px; }
.alert p, .pro p { margin: 3px 0 0; color: #6d7771; font-size: 12px; }
.access-active { display: inline-flex; padding: 4px 8px; border-radius: 20px; background: #e7f2ea; color: #39724e; font-size: 10px; font-weight: 700; }

.documents { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
.document { min-height: 130px; padding: 18px; border-radius: 16px; background: #f7f9f7; border: 1px solid #e5eae6; display: flex; flex-direction: column; justify-content: space-between; cursor: pointer; transition: transform 0.15s ease; }
.document:hover { transform: translateY(-2px); }
.document-icon { font-size: 25px; }
.document strong { font-size: 14px; }
.document span { font-size: 12px; color: #78827b; }

/* STYLE DES ÉQUIPEMENTS EXPERTS */
.equipment-deep { background: #ffffff; border: 1px solid #e3e8e4; border-radius: 12px; padding: 16px; margin-bottom: 12px; box-shadow: 0 4px 10px rgba(0,0,0,0.02); }
.equip-header { display: flex; justify-content: space-between; align-items: center; border-bottom: 1px dashed #e3e8e4; padding-bottom: 8px; margin-bottom: 12px; }
.equip-header strong { font-size: 15px; color: #17211c; }
.equip-model { font-size: 12px; color: #77827a; font-family: monospace; background: #f4f6f3; padding: 2px 6px; border-radius: 6px; }
.specs-grid { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 12px; }
.spec-tag { background: #eef2ef; color: #3b453f; font-size: 11px; padding: 5px 10px; border-radius: 8px; border: 1px solid #dce2dd; }
.equip-footer { font-size: 11px; color: #94a199; text-align: right; }
.spec-input { width:100%; padding:10px; border-radius:8px; border:1px solid #cdd4ce; background:#ffffff; font-family:inherit; font-size:13px; }

.modal { position: fixed; inset: 0; z-index: 100; background: rgba(17, 24, 20, 0.52); display: grid; place-items: center; padding: 20px; backdrop-filter: blur(5px); }
.modal-content { width: min(620px, 100%); max-height: 85vh; overflow-y: auto; background: white; border-radius: 24px; padding: 30px; position: relative; box-shadow: 0 30px 80px rgba(0, 0, 0, 0.2); }
.modal-content h2 { margin: 0 0 15px; font-family: Georgia, serif; font-size: 34px; font-weight: 500; }
.close { position: absolute; top: 16px; right: 18px; width: 35px; height: 35px; border: 0; border-radius: 50%; background: #eef2ef; cursor: pointer; font-size: 22px; line-height: 1; }

.toast { position: fixed; left: 50%; bottom: 25px; transform: translate(-50%, 20px); background: #17211c; color: white; padding: 12px 18px; border-radius: 12px; font-size: 13px; opacity: 0; pointer-events: none; transition: opacity 0.2s ease, transform 0.2s ease; z-index: 200; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }

@media (max-width: 850px) { .dashboard-grid { grid-template-columns: 1fr; } .systems, .documents { grid-template-columns: repeat(2, minmax(0, 1fr)); } .card.documents-card { grid-column: auto; } }
@media (max-width: 600px) {
  .topbar { height: 62px; padding: 0 17px; } .container { width: min(100% - 28px, 1180px); padding: 30px 0 55px; }
  .welcome h1 { font-size: 48px; } .house-card { padding: 22px; } .dashboard-grid { gap: 16px; }
  .card { padding: 20px; border-radius: 19px; } .systems { gap: 9px; }
  .onboarding-card { padding: 25px; margin: 20px; } .form-row { grid-template-columns: 1fr; }
}
