/* ===== RESET & BASE ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --gold:        #B8965A;
  --gold-light:  #D4AF7A;
  --gold-pale:   #F5EDD8;
  --dark:        #1A1A1A;
  --dark2:       #2D2D2D;
  --mid:         #6B6B6B;
  --light:       #F7F5F2;
  --white:       #FFFFFF;
  --border:      rgba(0,0,0,0.08);
  --success-bg:  #EAF3DE;
  --success-text:#3B6D11;
  --warning-bg:  #FAEEDA;
  --warning-text:#854F0B;
  --neutral-bg:  #F1EFE8;
  --neutral-text:#5F5E5A;
  --radius:      12px;
}

body {
  font-family: 'DM Sans', sans-serif;
  background: var(--light);
  color: var(--dark);
  line-height: 1.5;
}

/* Supprime tous les soulignés et couleurs par défaut des liens */
a {
  text-decoration: none;
  color: inherit;
  outline: none;
}
a:visited { color: inherit; }
a:hover   { color: inherit; }
a:focus   { outline: none; }

/* Supprime l'outline sur les boutons et inputs au clic */
button:focus,
input:focus,
select:focus,
textarea:focus { outline: none; }

/* ===== NAV ===== */
nav {
  background: var(--white);
  border-bottom: 1px solid var(--border);
  padding: 0 2rem;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 100;
}
.logo { font-family: 'Playfair Display', serif; font-size: 20px; color: var(--dark); letter-spacing: 0.02em; }
.logo span { color: var(--gold); }
.nav-links { display: flex; gap: 2rem; align-items: center; }
.nav-links a {
  font-size: 13px;
  color: var(--mid);
  cursor: pointer;
  transition: color 0.2s;
}
.nav-links a:hover,
.nav-links a.active { color: var(--dark); }
.nav-btn {
  background: var(--dark);
  color: var(--white) !important;
  padding: 9px 20px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: background 0.2s;
}
.nav-btn:hover { background: var(--dark2); color: var(--white) !important; }

/* ===== ANIMATIONS ===== */
@keyframes fadeIn { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
.fade-in { animation: fadeIn 0.3s ease; }

/* ===== HERO ===== */
.hero {
  background: var(--dark);
  color: var(--white);
  padding: 90px 2rem 70px;
  text-align: center;
}
.hero-eyebrow { font-size: 11px; letter-spacing: 0.15em; text-transform: uppercase; color: var(--gold); margin-bottom: 16px; font-weight: 500; }
.hero h1 { font-family: 'Playfair Display', serif; font-size: 46px; font-weight: 400; line-height: 1.2; margin-bottom: 16px; }
.hero h1 em { font-style: italic; color: var(--gold-light); }
.hero p { font-size: 15px; color: rgba(255,255,255,0.6); max-width: 480px; margin: 0 auto 36px; line-height: 1.7; font-weight: 300; }
.hero-actions { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }

/* ===== BOUTONS ===== */
.btn-primary {
  background: var(--gold); color: var(--white);
  padding: 13px 30px; border-radius: 6px;
  font-size: 13px; font-weight: 500;
  border: none; cursor: pointer;
  transition: background 0.2s;
}
.btn-primary:hover { background: var(--gold-light); }

.btn-outline {
  background: transparent; color: var(--white);
  padding: 13px 30px; border-radius: 6px;
  font-size: 13px; font-weight: 400;
  border: 1px solid rgba(255,255,255,0.3);
  cursor: pointer; transition: border-color 0.2s;
}
.btn-outline:hover { border-color: rgba(255,255,255,0.7); }

.btn-save {
  background: var(--dark); color: var(--white);
  border: none; padding: 12px 28px; border-radius: 6px;
  font-size: 13px; font-weight: 500; cursor: pointer;
  font-family: 'DM Sans', sans-serif; transition: background 0.2s;
}
.btn-save:hover { background: var(--dark2); }

.btn-cancel {
  background: none; color: var(--mid);
  border: 1px solid var(--border);
  padding: 12px 28px; border-radius: 6px;
  font-size: 13px; cursor: pointer;
  font-family: 'DM Sans', sans-serif;
  transition: border-color 0.2s;
}
.btn-cancel:hover { border-color: var(--mid); }

.btn-add {
  background: var(--gold); color: var(--white);
  border: none; padding: 9px 18px; border-radius: 6px;
  font-size: 12px; font-weight: 500; cursor: pointer;
  display: flex; align-items: center; gap: 6px;
  font-family: 'DM Sans', sans-serif; transition: background 0.2s;
}
.btn-add:hover { background: var(--gold-light); }

.fin-add-btn {
  background: var(--gold); color: var(--white);
  border: none; padding: 9px 16px; border-radius: 6px;
  font-size: 12px; font-weight: 500; cursor: pointer;
  display: flex; align-items: center; gap: 6px;
  font-family: 'DM Sans', sans-serif; transition: background 0.2s;
}
.fin-add-btn:hover { background: var(--gold-light); }

/* ===== FILTERS ===== */
.filters-bar {
  background: var(--white);
  border-bottom: 1px solid var(--border);
  padding: 0 2rem;
  display: flex;
  overflow-x: auto;
}
.filter-tab {
  padding: 16px 22px; font-size: 13px; color: var(--mid);
  cursor: pointer; border-bottom: 2px solid transparent;
  white-space: nowrap; transition: all 0.2s;
  background: none; border-top: none; border-left: none; border-right: none;
  font-family: 'DM Sans', sans-serif;
}
.filter-tab:hover { color: var(--dark); }
.filter-tab.active { color: var(--dark); border-bottom-color: var(--gold); font-weight: 500; }

/* ===== BIENS GRID ===== */
.section { padding: 48px 2rem; max-width: 1200px; margin: 0 auto; }
.section-header { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 28px; }
.section-title { font-family: 'Playfair Display', serif; font-size: 24px; font-weight: 400; }
.section-count { font-size: 13px; color: var(--mid); }
.biens-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 24px; }

.bien-card {
  background: var(--white); border-radius: var(--radius);
  border: 1px solid var(--border); overflow: hidden;
  cursor: pointer; transition: transform 0.2s, box-shadow 0.2s;
}
.bien-card:hover { transform: translateY(-4px); box-shadow: 0 12px 32px rgba(0,0,0,0.08); }
.bien-img { height: 200px; position: relative; overflow: hidden; }
.bien-img-bg { width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; font-size: 56px; }
.tag-type { position: absolute; top: 12px; left: 12px; background: var(--dark); color: var(--white); font-size: 10px; font-weight: 500; padding: 5px 12px; border-radius: 4px; text-transform: uppercase; letter-spacing: 0.08em; }
.tag-new  { position: absolute; top: 12px; right: 12px; background: var(--gold); color: var(--white); font-size: 10px; font-weight: 500; padding: 5px 12px; border-radius: 4px; }
.bien-body { padding: 20px; }
.bien-title    { font-weight: 500; font-size: 15px; margin-bottom: 5px; }
.bien-location { font-size: 12px; color: var(--mid); margin-bottom: 14px; display: flex; align-items: center; gap: 4px; }
.bien-price    { font-family: 'Playfair Display', serif; font-size: 22px; color: var(--dark); margin-bottom: 14px; }
.bien-details  { display: flex; gap: 16px; padding-top: 14px; border-top: 1px solid var(--border); align-items: center; flex-wrap: wrap; }
.bien-detail   { font-size: 12px; color: var(--mid); display: flex; align-items: center; gap: 4px; }

/* ===== STATUS BADGES ===== */
.status-badge   { display: inline-block; padding: 4px 12px; border-radius: 100px; font-size: 11px; font-weight: 500; }
.status-dispo   { background: var(--success-bg);  color: var(--success-text); }
.status-vendu   { background: var(--neutral-bg);  color: var(--neutral-text); }
.status-option  { background: var(--warning-bg);  color: var(--warning-text); }
.status-travaux { background: #E8F0FE; color: #1A56DB; }

/* ===== MODAL ===== */
.modal-overlay { position: fixed; inset: 0; background: rgba(0,0,0,0.55); z-index: 200; display: flex; align-items: center; justify-content: center; padding: 20px; }
.modal-overlay.hidden { display: none; }
.modal { background: var(--white); border-radius: 14px; max-width: 580px; width: 100%; max-height: 85vh; overflow-y: auto; }
.modal-header { display: flex; justify-content: space-between; align-items: center; padding: 22px 26px 18px; border-bottom: 1px solid var(--border); }
.modal-title { font-family: 'Playfair Display', serif; font-size: 20px; font-weight: 400; }
.close-btn { width: 32px; height: 32px; border-radius: 50%; border: 1px solid var(--border); background: none; cursor: pointer; font-size: 16px; color: var(--mid); display: flex; align-items: center; justify-content: center; transition: background 0.2s; }
.close-btn:hover { background: var(--light); }
.modal-body { padding: 26px; }
.modal-img-bg { height: 220px; border-radius: 10px; margin-bottom: 22px; display: flex; align-items: center; justify-content: center; font-size: 72px; }
.modal-price    { font-family: 'Playfair Display', serif; font-size: 30px; margin-bottom: 8px; }
.modal-location { font-size: 13px; color: var(--mid); margin-bottom: 22px; }
.modal-specs    { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 22px; }
.spec-item  { background: var(--light); border-radius: 8px; padding: 14px; }
.spec-label { font-size: 11px; color: var(--mid); text-transform: uppercase; letter-spacing: 0.08em; margin-bottom: 5px; }
.spec-value { font-size: 16px; font-weight: 500; }
.modal-desc { font-size: 14px; color: var(--mid); line-height: 1.75; margin-bottom: 22px; }
.contact-form-modal { background: var(--light); border-radius: 10px; padding: 20px; }
.contact-form-modal h4 { font-size: 14px; font-weight: 500; margin-bottom: 14px; }
.form-row   { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 10px; }
.form-input { width: 100%; padding: 11px 14px; border: 1px solid var(--border); border-radius: 6px; font-size: 13px; font-family: 'DM Sans', sans-serif; background: var(--white); color: var(--dark); transition: border-color 0.2s; }
.form-input:focus { border-color: var(--gold); }

/* ===== CONTACT ===== */
.contact-section { max-width: 640px; margin: 0 auto; padding: 60px 2rem; }
.contact-section h2 { font-family: 'Playfair Display', serif; font-size: 32px; font-weight: 400; margin-bottom: 8px; }
.contact-section p  { color: var(--mid); font-size: 14px; margin-bottom: 36px; }

/* ===== FORMULAIRES ===== */
.form-panel { background: var(--white); border: 1px solid var(--border); border-radius: var(--radius); padding: 32px; margin-bottom: 24px; }
.form-panel h3 { font-size: 16px; font-weight: 500; margin-bottom: 22px; padding-bottom: 14px; border-bottom: 1px solid var(--border); }
.form-grid  { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.field-group { display: flex; flex-direction: column; gap: 7px; }
.field-group.full { grid-column: 1 / -1; }
label { font-size: 11px; color: var(--mid); font-weight: 500; text-transform: uppercase; letter-spacing: 0.07em; }
input, select, textarea {
  padding: 11px 14px; border: 1px solid var(--border); border-radius: 6px;
  font-size: 13px; font-family: 'DM Sans', sans-serif;
  background: var(--white); color: var(--dark);
  transition: border-color 0.2s; width: 100%;
}
input:focus, select:focus, textarea:focus { border-color: var(--gold); }
textarea { resize: vertical; min-height: 90px; }
.form-actions { display: flex; gap: 12px; margin-top: 24px; }

/* ===== ADMIN LAYOUT ===== */
.admin-layout { display: grid; grid-template-columns: 240px 1fr; min-height: 100vh; }
.admin-sidebar {
  background: var(--dark); padding: 28px 0;
  position: sticky; top: 0; height: 100vh; overflow-y: auto;
}
.sidebar-section { padding: 0 16px 24px; }
.sidebar-label { font-size: 10px; text-transform: uppercase; letter-spacing: 0.12em; color: rgba(255,255,255,0.3); margin-bottom: 8px; font-weight: 500; padding: 0 8px; }
.sidebar-item,
a.sidebar-item,
a.sidebar-item:visited,
a.sidebar-item:link {
  display: flex; align-items: center; gap: 10px;
  padding: 10px; border-radius: 6px; cursor: pointer;
  font-size: 13px; color: rgba(255,255,255,0.55);
  transition: all 0.2s; border: none; background: none;
  width: 100%; text-align: left; font-family: 'DM Sans', sans-serif;
  text-decoration: none;
}
a.sidebar-item:hover,
.sidebar-item:hover  { background: rgba(255,255,255,0.06); color: rgba(255,255,255,0.85); }
a.sidebar-item.active,
.sidebar-item.active { background: rgba(184,150,90,0.15); color: var(--gold-light); }
.sidebar-item i { font-size: 17px; }
.admin-content { padding: 36px; overflow-y: auto; }

/* ===== STATS ===== */
.stats-row { display: grid; grid-template-columns: repeat(5, 1fr); gap: 18px; margin-bottom: 36px; }
.stat-card  { background: var(--white); border: 1px solid var(--border); border-radius: var(--radius); padding: 22px; }
.stat-label { font-size: 11px; color: var(--mid); margin-bottom: 10px; text-transform: uppercase; letter-spacing: 0.08em; }
.stat-val   { font-family: 'Playfair Display', serif; font-size: 32px; font-weight: 400; }
.stat-delta { font-size: 12px; color: var(--success-text); margin-top: 6px; }

/* ===== ADMIN TABLE ===== */
.admin-table-wrap { background: var(--white); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; }
.table-head { display: flex; justify-content: space-between; align-items: center; padding: 18px 22px; border-bottom: 1px solid var(--border); }
.table-head-title { font-weight: 500; font-size: 15px; }
.admin-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.admin-table th { text-align: left; padding: 11px 18px; font-size: 11px; text-transform: uppercase; letter-spacing: 0.08em; color: var(--mid); font-weight: 500; background: var(--light); border-bottom: 1px solid var(--border); }
.admin-table td { padding: 15px 18px; border-bottom: 1px solid var(--border); vertical-align: middle; }
.admin-table tr:last-child td { border-bottom: none; }
.admin-table tr:hover td { background: var(--light); }
.action-btn { background: none; border: 1px solid var(--border); border-radius: 5px; padding: 6px 12px; font-size: 12px; cursor: pointer; color: var(--mid); transition: all 0.2s; margin-right: 4px; font-family: 'DM Sans', sans-serif; }
.action-btn:hover { border-color: var(--gold); color: var(--gold); }
.action-btn.danger:hover { border-color: #E24B4A; color: #E24B4A; }

/* ===== TOAST ===== */
.toast { position: fixed; bottom: 28px; right: 28px; background: var(--dark); color: var(--white); padding: 14px 22px; border-radius: 10px; font-size: 13px; z-index: 9999; display: flex; align-items: center; gap: 10px; transform: translateY(80px); opacity: 0; transition: all 0.3s; font-family: 'DM Sans', sans-serif; }
.toast.show { transform: none; opacity: 1; }
.toast i { color: var(--gold); }

/* ===== EMPTY STATE ===== */
.empty-state { text-align: center; padding: 60px 20px; color: var(--mid); }
.empty-state i { font-size: 40px; margin-bottom: 12px; display: block; }

/* ===== FINANCE ===== */
.fin-kpi-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-bottom: 28px; }
.fin-kpi { background: var(--white); border: 1px solid var(--border); border-radius: var(--radius); padding: 20px; }
.fin-kpi-label { font-size: 11px; color: var(--mid); text-transform: uppercase; letter-spacing: 0.08em; margin-bottom: 8px; }
.fin-kpi-val   { font-family: 'Playfair Display', serif; font-size: 26px; font-weight: 400; line-height: 1; }
.fin-kpi-sub   { font-size: 12px; margin-top: 6px; }
.fin-charts-row { display: grid; grid-template-columns: 1.4fr 1fr; gap: 20px; margin-bottom: 24px; }
.fin-chart-box  { background: var(--white); border: 1px solid var(--border); border-radius: var(--radius); padding: 22px; }
.fin-chart-box.full { grid-column: 1 / -1; }
.fin-chart-title { font-size: 14px; font-weight: 500; margin-bottom: 4px; }
.fin-chart-sub   { font-size: 12px; color: var(--mid); margin-bottom: 18px; }
.chart-wrap { position: relative; }
.fin-table-wrap  { background: var(--white); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; margin-bottom: 24px; }
.fin-table-head  { display: flex; justify-content: space-between; align-items: center; padding: 16px 20px; border-bottom: 1px solid var(--border); }
.fin-table-head-title { font-size: 14px; font-weight: 500; }
.fin-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.fin-table th { text-align: left; padding: 10px 16px; font-size: 11px; text-transform: uppercase; letter-spacing: 0.08em; color: var(--mid); font-weight: 500; background: var(--light); border-bottom: 1px solid var(--border); }
.fin-table td { padding: 13px 16px; border-bottom: 1px solid var(--border); vertical-align: middle; }
.fin-table tr:last-child td { border-bottom: none; }
.fin-table tr:hover td { background: var(--light); }
.marge-bar-wrap { display: flex; align-items: center; gap: 8px; }
.marge-bar-bg   { flex: 1; background: var(--light); border-radius: 3px; height: 6px; overflow: hidden; }
.marge-bar-fill { height: 6px; border-radius: 3px; background: var(--gold); }
.pill-positive  { background: var(--success-bg); color: var(--success-text); padding: 3px 10px; border-radius: 100px; font-size: 11px; font-weight: 500; }
.pill-negative  { background: #FCEBEB; color: #A32D2D; padding: 3px 10px; border-radius: 100px; font-size: 11px; font-weight: 500; }
.fin-op-form      { background: var(--light); border-radius: 10px; padding: 18px 20px; margin: 0 20px 20px; }
.fin-op-form-grid { display: grid; grid-template-columns: 1fr 1fr 1fr 1fr auto; gap: 10px; align-items: end; }
.legend-dot { width: 10px; height: 10px; border-radius: 50%; display: inline-block; margin-right: 5px; }

/* ===== DIVISIONS ===== */
.div-ops-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 18px; margin-bottom: 32px; }
.div-op-card { background: var(--white); border: 1px solid var(--border); border-radius: 14px; overflow: hidden; }
.div-op-card-header { padding: 18px 20px 14px; border-bottom: 1px solid var(--border); display: flex; justify-content: space-between; align-items: flex-start; }
.div-op-card-title { font-size: 14px; font-weight: 500; }
.div-op-card-ville { font-size: 11px; color: var(--mid); margin-top: 3px; }
.div-op-card-body  { padding: 14px 20px; }
.div-op-row        { display: flex; justify-content: space-between; font-size: 12px; padding: 5px 0; border-bottom: 0.5px solid var(--border); }
.div-op-row:last-child { border-bottom: none; }
.div-op-row-label  { color: var(--mid); }
.div-op-row-val    { font-weight: 500; }
.div-op-card-footer { padding: 12px 20px; background: var(--light); display: flex; gap: 8px; }
.div-lots-progress { display: flex; gap: 4px; margin: 12px 0 4px; }
.div-lot-dot           { flex: 1; height: 6px; border-radius: 3px; }
.div-lot-dot.vendu     { background: var(--success-text); }
.div-lot-dot.option    { background: var(--warning-text); }
.div-lot-dot.disponible{ background: #D3D1C7; }
.div-lot-dot.travaux   { background: #1A56DB; }
.div-marge-banner  { background: var(--dark); color: var(--white); border-radius: 10px; padding: 16px 20px; margin: 14px 20px; display: flex; justify-content: space-between; align-items: center; gap: 16px; }
.div-marge-label   { font-size: 11px; color: rgba(255,255,255,0.45); margin-bottom: 4px; }
.div-marge-val     { font-family: 'Playfair Display', serif; font-size: 22px; }
.div-detail-kpi    { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-bottom: 24px; }
.div-detail-kpi-card  { background: var(--white); border: 1px solid var(--border); border-radius: 10px; padding: 16px; }
.div-detail-kpi-label { font-size: 11px; color: var(--mid); text-transform: uppercase; letter-spacing: 0.07em; margin-bottom: 7px; }
.div-detail-kpi-val   { font-family: 'Playfair Display', serif; font-size: 22px; }
.div-detail-kpi-sub   { font-size: 11px; color: var(--mid); margin-top: 4px; }
.div-lots-table-wrap  { background: var(--white); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; margin-bottom: 24px; }
.div-lots-form        { background: var(--light); border-radius: 10px; padding: 16px 18px; margin: 0 0 16px; }
.div-lots-form-grid   { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr 1fr auto; gap: 10px; align-items: end; }
.div-cout-repartition { background: var(--white); border: 1px solid var(--border); border-radius: var(--radius); padding: 20px; margin-bottom: 24px; }
.div-cout-repartition h4 { font-size: 14px; font-weight: 500; margin-bottom: 16px; display: flex; align-items: center; gap: 8px; }
.div-cout-row      { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-bottom: 0.5px solid var(--border); font-size: 13px; }
.div-cout-row:last-child { border-bottom: none; }
.div-cout-lot      { flex: 1.5; font-weight: 500; }
.div-cout-surface  { flex: 0.8; color: var(--mid); font-size: 12px; }
.div-cout-pct      { flex: 0.8; font-size: 12px; color: var(--mid); }
.div-cout-charge   { flex: 1; color: #A32D2D; font-weight: 500; }
.div-cout-px-vente { flex: 1; color: var(--success-text); font-weight: 500; }
.div-cout-marge    { flex: 1; }
.div-cout-bar      { flex: 1.5; }

/* ===== TRÉSORERIE ===== */
.tr-section       { margin-bottom: 28px; }
.tr-section-title { font-size: 16px; font-weight: 500; margin-bottom: 16px; display: flex; align-items: center; gap: 8px; }
.tr-section-title i { font-size: 18px; color: var(--gold); }
.tr-kpi-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-bottom: 28px; }
.tr-kpi { background: var(--white); border: 1px solid var(--border); border-radius: var(--radius); padding: 20px; position: relative; overflow: hidden; }
.tr-kpi::before { content:''; position:absolute; top:0; left:0; width:3px; height:100%; border-radius:12px 0 0 12px; }
.tr-kpi.positive::before { background: var(--success-text); }
.tr-kpi.negative::before { background: #E24B4A; }
.tr-kpi.neutral::before  { background: var(--gold); }
.tr-kpi.info::before     { background: #185FA5; }
.tr-kpi-label { font-size: 11px; color: var(--mid); text-transform: uppercase; letter-spacing: 0.08em; margin-bottom: 8px; }
.tr-kpi-val   { font-family: 'Playfair Display', serif; font-size: 24px; font-weight: 400; }
.tr-kpi-sub   { font-size: 11px; color: var(--mid); margin-top: 5px; }
.tr-bien-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 16px; margin-bottom: 28px; }
.tr-bien-card  { background: var(--white); border: 1px solid var(--border); border-radius: var(--radius); padding: 18px 20px; }
.tr-bien-card-header { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 14px; }
.tr-bien-card-title  { font-size: 13px; font-weight: 500; line-height: 1.3; }
.tr-bien-card-ville  { font-size: 11px; color: var(--mid); margin-top: 2px; }
.tr-bien-row         { display: flex; justify-content: space-between; align-items: center; padding: 6px 0; border-bottom: 0.5px solid var(--border); font-size: 12px; }
.tr-bien-row:last-child { border-bottom: none; }
.tr-bien-row-label   { color: var(--mid); }
.tr-bien-row-val     { font-weight: 500; }
.tr-bien-marge       { margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--border); display: flex; justify-content: space-between; align-items: center; }
.tr-bien-marge-label { font-size: 11px; text-transform: uppercase; letter-spacing: 0.06em; color: var(--mid); }
.tr-bien-marge-val   { font-family: 'Playfair Display', serif; font-size: 18px; }
.tr-progress         { height: 4px; background: var(--light); border-radius: 2px; margin-top: 8px; overflow: hidden; }
.tr-progress-fill    { height: 4px; border-radius: 2px; transition: width 0.5s; }
.tr-pret-grid  { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 16px; margin-bottom: 28px; }
.tr-pret-card  { background: var(--white); border: 1px solid var(--border); border-radius: var(--radius); padding: 18px 20px; }
.tr-pret-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 14px; }
.tr-pret-title  { font-size: 13px; font-weight: 500; }
.tr-pret-bank   { font-size: 11px; color: var(--mid); }
.tr-pret-body   { display: flex; flex-direction: column; gap: 8px; }
.tr-pret-row    { display: flex; justify-content: space-between; font-size: 12px; }
.tr-pret-row span:first-child { color: var(--mid); }
.tr-pret-row span:last-child  { font-weight: 500; }
.tr-pret-progress-wrap  { margin-top: 12px; }
.tr-pret-progress-label { display: flex; justify-content: space-between; font-size: 11px; color: var(--mid); margin-bottom: 5px; }
.tr-pret-bar-bg   { background: var(--light); border-radius: 4px; height: 8px; overflow: hidden; }
.tr-pret-bar-fill { height: 8px; border-radius: 4px; background: var(--gold); transition: width 0.5s; }
.tr-depenses-form  { background: var(--light); border-radius: 10px; padding: 18px 20px; margin-bottom: 16px; }
.tr-depenses-grid  { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr auto; gap: 10px; align-items: end; }
.tr-solde-banner   { background: var(--dark); color: var(--white); border-radius: var(--radius); padding: 24px 28px; margin-bottom: 28px; display: flex; justify-content: space-between; align-items: center; }
.tr-solde-banner-label { font-size: 12px; color: rgba(255,255,255,0.5); text-transform: uppercase; letter-spacing: 0.08em; margin-bottom: 6px; }
.tr-solde-banner-val   { font-family: 'Playfair Display', serif; font-size: 36px; color: var(--white); }
.tr-solde-items    { display: flex; gap: 32px; }
.tr-solde-item-label { font-size: 11px; color: rgba(255,255,255,0.45); margin-bottom: 4px; }
.tr-solde-item-val   { font-size: 16px; font-weight: 500; }

/* ===== DOSSIERS ===== */
.dos-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 16px; margin-bottom: 32px; }
.dos-card { background: var(--white); border: 1px solid var(--border); border-radius: var(--radius); padding: 18px 20px; cursor: pointer; transition: transform 0.15s, box-shadow 0.15s; }
.dos-card:hover { transform: translateY(-2px); box-shadow: 0 6px 20px rgba(0,0,0,0.07); }
.dos-card-header   { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 12px; }
.dos-card-title    { font-size: 13px; font-weight: 500; line-height: 1.3; }
.dos-card-ville    { font-size: 11px; color: var(--mid); margin-top: 2px; }
.dos-card-progress { margin-top: 12px; }
.dos-progress-label{ display: flex; justify-content: space-between; font-size: 11px; color: var(--mid); margin-bottom: 5px; }
.dos-progress-bg   { background: var(--light); border-radius: 3px; height: 5px; overflow: hidden; }
.dos-progress-fill { height: 5px; border-radius: 3px; background: var(--gold); transition: width 0.4s; }
.dos-card-counts   { display: flex; gap: 12px; margin-top: 10px; }
.dos-card-count    { font-size: 11px; color: var(--mid); display: flex; align-items: center; gap: 4px; }
.dos-detail-header { display: flex; align-items: center; gap: 14px; margin-bottom: 28px; }
.dos-back-btn  { display: flex; align-items: center; gap: 6px; font-size: 13px; color: var(--mid); background: none; border: 1px solid var(--border); border-radius: 6px; padding: 8px 14px; cursor: pointer; transition: all 0.2s; font-family: 'DM Sans', sans-serif; text-decoration: none; }
.dos-back-btn:hover { color: var(--dark); border-color: var(--mid); }
.dos-detail-title  { font-family: 'Playfair Display', serif; font-size: 22px; font-weight: 400; }
.dos-detail-sub    { font-size: 13px; color: var(--mid); margin-top: 2px; }
.dos-tabs          { display: flex; border-bottom: 1px solid var(--border); margin-bottom: 28px; overflow-x: auto; }
.dos-tab { padding: 12px 20px; font-size: 13px; color: var(--mid); cursor: pointer; border-bottom: 2px solid transparent; background: none; border-top: none; border-left: none; border-right: none; font-family: 'DM Sans', sans-serif; transition: all 0.2s; white-space: nowrap; }
.dos-tab:hover  { color: var(--dark); }
.dos-tab.active { color: var(--dark); border-bottom-color: var(--gold); font-weight: 500; }
.dos-tab-content        { display: none; }
.dos-tab-content.active { display: block; animation: fadeIn 0.2s ease; }
.etapes-list { display: flex; flex-direction: column; }
.etape-item  { display: flex; align-items: flex-start; gap: 16px; padding: 16px 0; border-bottom: 1px solid var(--border); }
.etape-item:last-child { border-bottom: none; }
.etape-num     { width: 32px; height: 32px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 12px; font-weight: 500; flex-shrink: 0; margin-top: 1px; }
.etape-done    { background: var(--success-bg); color: var(--success-text); }
.etape-current { background: var(--warning-bg); color: var(--warning-text); }
.etape-todo    { background: var(--light); color: var(--mid); }
.etape-body    { flex: 1; }
.etape-title   { font-size: 13px; font-weight: 500; margin-bottom: 3px; }
.etape-date    { font-size: 11px; color: var(--mid); }
.etape-note    { font-size: 12px; color: var(--mid); margin-top: 4px; font-style: italic; }
.etape-actions { display: flex; gap: 6px; }
.checklist  { display: flex; flex-direction: column; }
.check-item { display: flex; align-items: center; gap: 12px; padding: 13px 0; border-bottom: 1px solid var(--border); }
.check-item:last-child { border-bottom: none; }
.check-box { width: 20px; height: 20px; border-radius: 4px; border: 1.5px solid var(--border); display: flex; align-items: center; justify-content: center; cursor: pointer; flex-shrink: 0; transition: all 0.15s; background: var(--white); }
.check-box.checked { background: var(--success-text); border-color: var(--success-text); }
.check-box.checked::after { content: '✓'; color: white; font-size: 11px; font-weight: 700; }
.check-label  { font-size: 13px; flex: 1; }
.check-label.done { text-decoration: line-through; color: var(--mid); }
.check-category { font-size: 10px; text-transform: uppercase; letter-spacing: 0.08em; color: var(--mid); padding: 2px 8px; background: var(--light); border-radius: 100px; }
.offre-form      { background: var(--light); border-radius: 10px; padding: 16px 18px; margin-bottom: 16px; }
.offre-form-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr auto; gap: 10px; align-items: end; }
.offre-item    { background: var(--white); border: 1px solid var(--border); border-radius: 10px; padding: 16px 18px; margin-bottom: 10px; display: flex; justify-content: space-between; align-items: center; gap: 16px; }
.offre-acheteur{ font-size: 14px; font-weight: 500; }
.offre-date    { font-size: 12px; color: var(--mid); margin-top: 2px; }
.offre-montant { font-family: 'Playfair Display', serif; font-size: 20px; }
.offre-delta   { font-size: 11px; margin-top: 3px; }
.badge-accepted{ background: var(--success-bg); color: var(--success-text); padding: 4px 12px; border-radius: 100px; font-size: 11px; font-weight: 500; }
.badge-refused { background: var(--neutral-bg);  color: var(--neutral-text); padding: 4px 12px; border-radius: 100px; font-size: 11px; font-weight: 500; }
.badge-pending { background: var(--warning-bg);  color: var(--warning-text); padding: 4px 12px; border-radius: 100px; font-size: 11px; font-weight: 500; }
.note-form   { display: flex; flex-direction: column; gap: 10px; margin-bottom: 20px; }
.note-item   { background: var(--white); border: 1px solid var(--border); border-radius: 10px; padding: 14px 16px; }
.note-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; }
.note-author { font-size: 12px; font-weight: 500; }
.note-date   { font-size: 11px; color: var(--mid); }
.note-text   { font-size: 13px; color: var(--dark); line-height: 1.6; }
.contact-lie-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; margin-bottom: 20px; }
.contact-lie-card { background: var(--white); border: 1px solid var(--border); border-radius: 10px; padding: 14px 16px; }
.contact-lie-role { font-size: 10px; text-transform: uppercase; letter-spacing: 0.1em; color: var(--gold); font-weight: 500; margin-bottom: 6px; }
.contact-lie-name { font-size: 14px; font-weight: 500; margin-bottom: 4px; }
.contact-lie-info { font-size: 12px; color: var(--mid); }

/* ===== RESPONSIVE ===== */
@media (max-width: 900px) {
  .fin-kpi-grid       { grid-template-columns: 1fr 1fr; }
  .fin-charts-row     { grid-template-columns: 1fr; }
  .fin-op-form-grid   { grid-template-columns: 1fr 1fr; }
  .div-detail-kpi     { grid-template-columns: 1fr 1fr; }
  .div-lots-form-grid { grid-template-columns: 1fr 1fr; }
  .tr-kpi-grid        { grid-template-columns: 1fr 1fr; }
  .tr-depenses-grid   { grid-template-columns: 1fr 1fr; }
  .tr-solde-banner    { flex-direction: column; gap: 16px; align-items: flex-start; }
  .offre-form-grid    { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 768px) {
  .hero h1          { font-size: 30px; }
  .stats-row        { grid-template-columns: 1fr 1fr; }
  .admin-layout     { grid-template-columns: 1fr; }
  .admin-sidebar    { display: none; }
  .form-grid        { grid-template-columns: 1fr; }
  .biens-grid       { grid-template-columns: 1fr; }
  .form-row         { grid-template-columns: 1fr; }
  .modal-specs      { grid-template-columns: 1fr 1fr; }
  .nav-links        { gap: 1rem; }
}
