/* ==================================================================
   Batiara — feuille de style globale
   Reprend l'identité des maquettes validées : vert sauge + ambre,
   fonds crème (jamais de blanc pur en fond de page),
   Space Grotesk pour les titres, Inter pour le texte.
   ================================================================== */

:root {
  --sage:        #2f5d46;
  --sage-dark:   #234737;
  --sage-light:  #e7efe9;
  --amber:       #e8934f;
  --amber-soft:  #fbeadc;
  --cream:       #faf8f2;
  --cream-2:     #f3efe4;
  --paper:       #ffffff;
  --ink:         #1d2620;
  --ink-2:       #4b5850;
  --ink-3:       #7d8a83;
  --line:        #e3e0d5;
  --line-soft:   #eeebe1;

  --dpe-a: #319a5a; --dpe-b: #4fb04c; --dpe-c: #a8ca43;
  --dpe-d: #f2dc3d; --dpe-e: #f2b93d; --dpe-f: #ec8038; --dpe-g: #e0492f;

  --r-sm: 8px; --r: 12px; --r-lg: 18px;
  --sh: 0 1px 2px rgba(29,38,32,.05), 0 6px 18px rgba(29,38,32,.05);
  --sh-lg: 0 10px 40px rgba(29,38,32,.10);

  --font-title: 'Space Grotesk', system-ui, sans-serif;
  --font-body: 'Inter', system-ui, -apple-system, sans-serif;
}

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

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--cream);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 15px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 { font-family: var(--font-title); color: var(--ink); margin: 0 0 .5em; line-height: 1.2; }
h1 { font-size: 30px; font-weight: 700; letter-spacing: -.5px; }
h2 { font-size: 21px; font-weight: 600; }
h3 { font-size: 17px; font-weight: 600; }

a { color: var(--sage); text-decoration: none; }
a:hover { text-decoration: underline; }

button { font-family: inherit; font-size: inherit; cursor: pointer; }

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

.wrap { max-width: 1160px; margin: 0 auto; padding: 26px 22px 60px; }
.wrap-narrow { max-width: 760px; margin: 0 auto; padding: 34px 22px 70px; }

/* ---------- Accessibilité : animations désactivables ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
    scroll-behavior: auto !important;
  }
}

/* ==================================================================
   Chargement
   ================================================================== */
.boot-loader {
  min-height: 60vh; display: flex; align-items: center; justify-content: center;
}
.spinner {
  width: 26px; height: 26px; border-radius: 50%;
  border: 2.5px solid var(--sage-light); border-top-color: var(--sage);
  animation: spin .7s linear infinite;
  display: inline-block;
}
.spinner.sm { width: 15px; height: 15px; border-width: 2px; border-top-color: #fff; border-color: rgba(255,255,255,.35); }
@keyframes spin { to { transform: rotate(360deg); } }

.skeleton {
  border-radius: var(--r);
  background: linear-gradient(100deg, var(--cream-2) 30%, #ece8dc 50%, var(--cream-2) 70%);
  background-size: 220% 100%;
  animation: sweep 1.3s ease-in-out infinite;
}
@keyframes sweep { 0% { background-position: 130% 0; } 100% { background-position: -30% 0; } }

/* ==================================================================
   En-tête
   ================================================================== */
.topnav {
  background: var(--paper);
  border-bottom: 1px solid var(--line);
  position: sticky; top: 0; z-index: 60;
}
.topnav-inner {
  max-width: 1160px; margin: 0 auto; padding: 0 22px;
  height: 64px; display: flex; align-items: center; gap: 26px;
}
.logo {
  display: flex; align-items: center; gap: 10px;
  font-family: var(--font-title); font-weight: 700; font-size: 18px;
  color: var(--ink); text-decoration: none; white-space: nowrap;
}
.logo:hover { text-decoration: none; }
.logo .mark {
  width: 32px; height: 32px; border-radius: 9px;
  background: var(--sage); display: grid; place-items: center; flex: none;
}
.logo .tag {
  display: block; font-family: var(--font-body); font-weight: 500;
  font-size: 10.5px; color: var(--ink-3); letter-spacing: .3px;
}
.main-links { display: flex; gap: 20px; margin-left: 8px; flex: 1; }
.main-links a { color: var(--ink-2); font-weight: 500; font-size: 14px; }
.main-links a:hover { color: var(--sage); text-decoration: none; }
.nav-right { display: flex; align-items: center; gap: 10px; }
.nav-right > a { font-size: 14px; font-weight: 500; }

.btn-outline {
  background: transparent; border: 1px solid var(--line);
  color: var(--ink-2); padding: 8px 14px; border-radius: 999px;
  font-size: 13.5px; font-weight: 600;
}
.btn-outline:hover { border-color: var(--sage); color: var(--sage); text-decoration: none; }

.btn-amber {
  background: var(--amber); border: 1px solid var(--amber); color: #fff;
  padding: 8px 16px; border-radius: 999px; font-size: 13.5px; font-weight: 600;
}
.btn-amber:hover { background: #dd8442; color: #fff; text-decoration: none; }

.btn-sage {
  background: var(--sage); border: 1px solid var(--sage); color: #fff;
  padding: 9px 18px; border-radius: 999px; font-size: 14px; font-weight: 600;
}
.btn-sage:hover { background: var(--sage-dark); color: #fff; text-decoration: none; }

.btn-ghost {
  background: transparent; border: 1px solid var(--line); color: var(--ink-2);
  padding: 7px 13px; border-radius: var(--r-sm); font-size: 13px; font-weight: 500;
}
.btn-ghost:hover { border-color: var(--ink-3); }

.btn-danger {
  background: #fff; border: 1px solid #e6c3bc; color: #b23c28;
  padding: 7px 13px; border-radius: var(--r-sm); font-size: 13px; font-weight: 500;
}
.btn-danger:hover { background: #fdf3f1; }

/* ==================================================================
   Pied de page
   ================================================================== */
.site-footer { background: var(--sage-dark); color: #cfdcd4; margin-top: 40px; }
.footer-inner {
  max-width: 1160px; margin: 0 auto; padding: 44px 22px 30px;
  display: grid; grid-template-columns: 1.6fr repeat(auto-fit, minmax(140px, 1fr)); gap: 30px;
}
.footer-brand b { font-family: var(--font-title); font-size: 18px; color: #fff; display: block; margin-bottom: 8px; }
.footer-brand p { font-size: 13.5px; line-height: 1.6; margin: 0; max-width: 320px; }
.footer-col { display: flex; flex-direction: column; gap: 9px; }
.footer-col a { color: #cfdcd4; font-size: 13.5px; }
.footer-col a:hover { color: #fff; }
.footer-legal {
  border-top: 1px solid rgba(255,255,255,.12); padding: 16px 22px;
  text-align: center; font-size: 12.5px; color: #9db3a7;
}

/* ==================================================================
   Barre de recherche
   ================================================================== */
.search-wrap { position: relative; width: 100%; }
.search-box {
  display: flex; align-items: center; gap: 10px;
  background: var(--paper); border: 1px solid var(--line);
  border-radius: 999px; padding: 6px 6px 6px 18px; box-shadow: var(--sh);
}
.search-box:focus-within { border-color: var(--sage); box-shadow: 0 0 0 3px var(--sage-light); }
.search-box > svg { color: var(--ink-3); flex: none; }
.search-box input {
  flex: 1; border: 0; outline: 0; background: transparent;
  font-family: inherit; font-size: 15px; color: var(--ink); min-width: 0; padding: 8px 0;
}
.search-box input::placeholder { color: var(--ink-3); }
.search-box .clear {
  border: 0; background: transparent; color: var(--ink-3);
  font-size: 20px; line-height: 1; padding: 0 6px;
}
.search-cta {
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--sage); color: #fff; border: 0;
  padding: 11px 20px; border-radius: 999px; font-weight: 600; font-size: 14px;
  transition: background .15s;
}
.search-cta:hover { background: var(--sage-dark); }

.search-wrap.big .search-box { padding: 8px 8px 8px 22px; }
.search-wrap.big input { font-size: 16.5px; padding: 10px 0; }

.suggest {
  position: absolute; left: 0; right: 0; top: calc(100% + 8px); z-index: 70;
  margin: 0; padding: 6px; list-style: none;
  background: var(--paper); border: 1px solid var(--line);
  border-radius: var(--r); box-shadow: var(--sh-lg); max-height: 340px; overflow: auto;
}
.suggest li {
  display: flex; align-items: center; gap: 11px;
  padding: 9px 11px; border-radius: var(--r-sm); cursor: pointer;
}
.suggest li.on { background: var(--sage-light); }
.suggest .kind { font-size: 15px; flex: none; width: 20px; text-align: center; }
.suggest .txt { flex: 1; min-width: 0; }
.suggest .txt b { display: block; font-size: 14px; font-weight: 600; }
.suggest .txt small { color: var(--ink-3); font-size: 12.5px; }

.dpe-chip {
  flex: none; width: 22px; height: 22px; border-radius: 6px;
  display: grid; place-items: center; color: #fff; font-weight: 700; font-size: 12px;
}
.dpe-chip.cA { background: var(--dpe-a); } .dpe-chip.cB { background: var(--dpe-b); }
.dpe-chip.cC { background: var(--dpe-c); color: #2c3a1f; } .dpe-chip.cD { background: var(--dpe-d); color: #453d0d; }
.dpe-chip.cE { background: var(--dpe-e); color: #45330d; } .dpe-chip.cF { background: var(--dpe-f); }
.dpe-chip.cG { background: var(--dpe-g); }

.search-band { background: var(--sage); padding: 18px 0; }
.search-inner { max-width: 1160px; margin: 0 auto; padding: 0 22px; }

/* ==================================================================
   Accueil
   ================================================================== */
.hero {
  background:
    radial-gradient(900px 380px at 12% -10%, #eef4ef 0%, transparent 62%),
    radial-gradient(700px 340px at 92% 0%, var(--amber-soft) 0%, transparent 60%),
    var(--cream);
  border-bottom: 1px solid var(--line-soft);
}
.hero-inner { max-width: 1160px; margin: 0 auto; padding: 56px 22px 46px; text-align: center; }
.hero .eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--paper); border: 1px solid var(--line);
  border-radius: 999px; padding: 6px 14px; font-size: 12.5px;
  font-weight: 600; color: var(--sage); margin-bottom: 18px;
}
.hero h1 { font-size: 44px; letter-spacing: -1.2px; margin-bottom: 12px; }
.hero .lead { font-size: 17px; color: var(--ink-2); max-width: 620px; margin: 0 auto 26px; }
.hero-search { max-width: 720px; margin: 0 auto; }

.cat-chips {
  display: flex; flex-wrap: wrap; justify-content: center;
  gap: 10px; margin-top: 22px;
}
.cat-chip {
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--paper); border: 1px solid var(--line);
  border-radius: 999px; padding: 8px 15px; font-size: 13px; font-weight: 600; color: var(--ink-2);
}
.cat-chip .ic { width: 20px; height: 20px; display: grid; place-items: center; color: var(--sage); }

.stats-row {
  display: flex; justify-content: center; gap: 52px; flex-wrap: wrap;
  margin-top: 38px; padding-top: 30px; border-top: 1px solid var(--line-soft);
}
.stat { text-align: center; }
.stat b { display: block; font-family: var(--font-title); font-size: 30px; color: var(--sage); }
.stat span { font-size: 13px; color: var(--ink-3); }

.home-section { max-width: 1160px; margin: 0 auto; padding: 50px 22px 0; }
.home-section > h2 { font-size: 25px; margin-bottom: 6px; }
.home-section > .sub { color: var(--ink-2); margin-bottom: 24px; }

.feature-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 18px; }
.feature {
  background: var(--paper); border: 1px solid var(--line);
  border-radius: var(--r-lg); padding: 22px; box-shadow: var(--sh);
}
.feature .ic {
  width: 42px; height: 42px; border-radius: 12px; background: var(--sage-light);
  display: grid; place-items: center; color: var(--sage); margin-bottom: 14px;
}
.feature h3 { margin-bottom: 6px; }
.feature p { color: var(--ink-2); font-size: 14px; margin: 0; }

.news-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 20px; }
.news-card {
  background: var(--paper); border: 1px solid var(--line);
  border-radius: var(--r-lg); overflow: hidden; box-shadow: var(--sh);
  display: flex; flex-direction: column;
}
.news-card .cover { height: 158px; }
.news-card .body { padding: 16px 18px 20px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.news-card h3 { font-size: 16.5px; margin: 0; }
.news-card p { color: var(--ink-2); font-size: 13.5px; margin: 0; flex: 1; }
.news-meta { font-size: 12.5px; color: var(--ink-3); display: flex; gap: 10px; align-items: center; }
.pill {
  display: inline-block; border-radius: 999px; padding: 3px 10px;
  font-size: 11.5px; font-weight: 600; background: var(--sage-light); color: var(--sage);
}

/* ==================================================================
   Placeholders photo (identiques aux maquettes)
   ================================================================== */
.photo-placeholder {
  position: relative;
  background:
    repeating-linear-gradient(135deg, #d9d6cc 0 10px, #cfccc0 10px 20px);
  border: 1px solid var(--line);
  border-radius: var(--r);
  display: grid; place-items: center; overflow: hidden;
}
.ph-badge {
  display: inline-flex; align-items: center; gap: 7px;
  background: rgba(255,255,255,.94); border-radius: 999px;
  padding: 7px 14px; font-size: 12.5px; font-weight: 600; color: var(--ink-2);
  box-shadow: 0 1px 4px rgba(0,0,0,.08);
}
.ph-badge::before {
  content: ''; width: 15px; height: 12px; flex: none;
  background: currentColor;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 20'%3E%3Cpath d='M9 1 7.6 3.5H3A2 2 0 0 0 1 5.5v11A2 2 0 0 0 3 18.5h18a2 2 0 0 0 2-2v-11a2 2 0 0 0-2-2h-4.6L15 1Zm3 5a5 5 0 1 1 0 10 5 5 0 0 1 0-10Z'/%3E%3C/svg%3E") center/contain no-repeat;
          mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 20'%3E%3Cpath d='M9 1 7.6 3.5H3A2 2 0 0 0 1 5.5v11A2 2 0 0 0 3 18.5h18a2 2 0 0 0 2-2v-11a2 2 0 0 0-2-2h-4.6L15 1Zm3 5a5 5 0 1 1 0 10 5 5 0 0 1 0-10Z'/%3E%3C/svg%3E") center/contain no-repeat;
}
.ph-badge.sm { padding: 5px 10px; font-size: 11px; }

/* ==================================================================
   Fiche adresse
   ================================================================== */
.breadcrumb { display: flex; gap: 8px; align-items: center; font-size: 13px; color: var(--ink-3); margin-bottom: 18px; }
.breadcrumb .current { color: var(--ink-2); font-weight: 500; }

.prop-header { display: grid; grid-template-columns: 1.35fr 1fr; gap: 18px; margin-bottom: 20px; }
.prop-photo { height: 290px; }
.map-card { height: 290px; border-radius: var(--r); border: 1px solid var(--line); overflow: hidden; background: var(--cream-2); }
.leaflet-container { font: inherit; }

.prop-info-full {
  background: var(--paper); border: 1px solid var(--line); border-radius: var(--r-lg);
  padding: 22px 24px; margin-bottom: 22px; box-shadow: var(--sh);
}
.prop-info-full h1 { font-size: 26px; margin-bottom: 4px; }
.prop-info-full .sub { color: var(--ink-2); font-size: 14.5px; }
.prop-meta { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 14px; }
.prop-meta .val {
  display: inline-block; background: var(--cream-2); border: 1px solid var(--line-soft);
  border-radius: 999px; padding: 5px 13px; font-size: 13px; font-weight: 600; color: var(--ink-2);
}

.grid3 { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 18px; margin-bottom: 18px; }

.card {
  background: var(--paper); border: 1px solid var(--line); border-radius: var(--r-lg);
  padding: 20px; box-shadow: var(--sh);
}
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 14px; }
.card-title { font-family: var(--font-title); font-weight: 600; font-size: 16px; display: flex; align-items: center; gap: 8px; }
.card-title .beta {
  background: var(--amber-soft); color: #a05c22; border-radius: 999px;
  padding: 2px 8px; font-size: 10.5px; font-weight: 700; letter-spacing: .3px; text-transform: uppercase;
}
.card-link { font-size: 12.5px; color: var(--sage); font-weight: 600; cursor: pointer; }
.section-title { margin: 30px 0 16px; font-size: 21px; }

.empty-note { color: var(--ink-3); font-size: 13.5px; line-height: 1.6; margin: 0; }
.note-small { color: var(--ink-3); font-size: 12.5px; margin: 10px 0 0; }
.alert { border-radius: var(--r); padding: 14px 16px; font-size: 14px; }
.alert.err { background: #fdf1ee; border: 1px solid #edcbc2; color: #a5381f; }
.alert.ok { background: #eef7f1; border: 1px solid #c3e0ce; color: #21603f; }
.alert.info { background: var(--cream-2); border: 1px solid var(--line); color: var(--ink-2); }

/* --- Échelle DPE --- */
.dpe-scale { display: flex; flex-direction: column; gap: 4px; }
.dpe-row { display: flex; align-items: center; gap: 10px; }
.dpe-bar {
  height: 22px; border-radius: 4px; color: #fff; font-weight: 700; font-size: 12px;
  display: flex; align-items: center; padding-left: 9px; position: relative; flex: none;
}
.dpe-row.on .dpe-bar { outline: 2px solid var(--ink); outline-offset: 1px; }
.dpe-row .who { font-size: 12px; color: var(--ink-3); }
.dpe-row.on .who { color: var(--ink); font-weight: 600; }
.dpe-figures { display: flex; gap: 22px; margin-top: 14px; }
.dpe-fig b { display: block; font-family: var(--font-title); font-size: 19px; }
.dpe-fig span { font-size: 11.5px; color: var(--ink-3); }
.dpe-foot { margin-top: 12px; font-size: 12px; color: var(--ink-3); }

/* --- Prix --- */
.price-lead, .estim-lead { font-size: 13px; color: var(--ink-3); }
.price-value { display: flex; align-items: baseline; gap: 10px; margin: 4px 0 12px; }
.price-value b { font-family: var(--font-title); font-size: 27px; }
.pct-up { color: #2b7a4b; font-size: 13px; font-weight: 600; }
.pct-up.down { color: #b23c28; }

.price-chart { width: 100%; height: 92px; display: block; }
.price-chart .fill { fill: var(--sage); opacity: .12; }
.price-chart .line { fill: none; stroke: var(--sage); stroke-width: 2; stroke-linejoin: round; }
.price-chart .dot { fill: var(--sage); }
.chart-labels { display: flex; justify-content: space-between; font-size: 11px; color: var(--ink-3); margin-top: 4px; }

.estim-value { font-family: var(--font-title); font-size: 24px; margin: 4px 0 2px; }
.estim-sub { font-size: 13px; color: var(--ink-2); }
.estim-note { margin-top: 12px; font-size: 11.5px; color: var(--ink-3); line-height: 1.55; }

/* --- Listes --- */
.cad-info { font-size: 14px; line-height: 1.8; color: var(--ink-2); }
.risk-list, .kv-list, .tc-list { display: flex; flex-direction: column; }
.risk-row, .kv-row {
  display: flex; justify-content: space-between; align-items: center; gap: 10px;
  padding: 8px 0; border-bottom: 1px solid var(--line-soft); font-size: 13.5px;
}
.risk-row:last-child, .kv-row:last-child { border-bottom: 0; }
.risk-row .l, .kv-row span { color: var(--ink-2); }
.lvl { border-radius: 999px; padding: 3px 10px; font-size: 11.5px; font-weight: 700; }
.lvl.high { background: #fbe5e0; color: #a5381f; }
.lvl.mid  { background: #fdf0dc; color: #92601c; }
.lvl.low  { background: #e9f3ec; color: #2b6a48; }
.lvl.none { background: var(--cream-2); color: var(--ink-3); }

.tc-row { padding: 8px 0; border-bottom: 1px solid var(--line-soft); font-size: 13.5px; }
.tc-row:last-child { border-bottom: 0; }
.tc-row b { display: block; }
.tc-row span { color: var(--ink-3); font-size: 12.5px; }

.tl { display: flex; flex-direction: column; gap: 0; }
.tl-item {
  display: flex; align-items: center; gap: 14px; padding: 11px 0 11px 18px;
  border-left: 2px solid var(--line); position: relative; font-size: 14px;
}
.tl-item::before {
  content: ''; position: absolute; left: -5px; top: 18px;
  width: 8px; height: 8px; border-radius: 50%; background: var(--sage);
}
.tl-date { font-size: 12.5px; color: var(--ink-3); min-width: 84px; }
.tl-item .area { color: var(--ink-3); font-size: 12.5px; }

.sim-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 18px; }
.sim-card { background: var(--paper); border: 1px solid var(--line); border-radius: var(--r-lg); overflow: hidden; box-shadow: var(--sh); }
.sim-photo { height: 148px; border: 0; border-radius: 0; }
.sim-badge {
  position: absolute; top: 10px; left: 10px; border-radius: 999px;
  padding: 4px 10px; font-size: 11px; font-weight: 700; background: var(--sage); color: #fff;
}
.sim-body { padding: 14px 16px 18px; }
.sim-body h4 { font-size: 15px; margin: 0 0 4px; }
.sim-body .m { font-size: 12.5px; color: var(--ink-3); }
.sim-body .price { font-family: var(--font-title); font-size: 18px; margin-top: 8px; }
.sim-body .price small { font-family: var(--font-body); font-size: 12px; color: var(--ink-3); font-weight: 400; }
.sim-body .date { font-size: 12px; color: var(--ink-3); margin-top: 3px; }

/* ==================================================================
   Contenu éditorial (pages et articles)
   ================================================================== */
.prose { font-size: 15.5px; line-height: 1.72; color: var(--ink-2); }
.prose h2 { margin-top: 1.7em; color: var(--ink); }
.prose h3 { margin-top: 1.4em; color: var(--ink); }
.prose ul, .prose ol { padding-left: 1.25em; }
.prose li { margin-bottom: .4em; }
.prose img { border-radius: var(--r); margin: 1.2em 0; }
.prose table { width: 100%; border-collapse: collapse; margin: 1.2em 0; font-size: 14px; }
.prose th, .prose td { border: 1px solid var(--line); padding: 8px 11px; text-align: left; }
.prose th { background: var(--cream-2); }
.prose blockquote {
  margin: 1.3em 0; padding: 12px 18px; border-left: 3px solid var(--amber);
  background: var(--paper); border-radius: 0 var(--r) var(--r) 0; color: var(--ink);
}

.article-head { margin-bottom: 24px; }
.article-head h1 { margin-bottom: 10px; }
.article-cover { height: 320px; border-radius: var(--r-lg); margin-bottom: 26px; }

/* ==================================================================
   Formulaires
   ================================================================== */
.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 14px; }
.field label { font-size: 13px; font-weight: 600; color: var(--ink-2); }
.field .hint { font-size: 12px; color: var(--ink-3); }
input[type=text], input[type=email], input[type=password], input[type=number],
input[type=url], input[type=date], select, textarea {
  width: 100%; font-family: inherit; font-size: 14px; color: var(--ink);
  background: var(--paper); border: 1px solid var(--line);
  border-radius: var(--r-sm); padding: 9px 12px; outline: 0;
}
input:focus, select:focus, textarea:focus { border-color: var(--sage); box-shadow: 0 0 0 3px var(--sage-light); }
textarea { resize: vertical; min-height: 90px; line-height: 1.55; }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.check { display: flex; align-items: center; gap: 8px; font-size: 13.5px; color: var(--ink-2); }
.check input { width: auto; }

.auth-card {
  max-width: 430px; margin: 44px auto; background: var(--paper);
  border: 1px solid var(--line); border-radius: var(--r-lg); padding: 30px 28px; box-shadow: var(--sh);
}
.auth-card h1 { font-size: 23px; }
.auth-switch { text-align: center; font-size: 13.5px; color: var(--ink-3); margin-top: 16px; }

/* ==================================================================
   Administration
   ================================================================== */
.admin-shell { display: grid; grid-template-columns: 236px 1fr; min-height: 100vh; background: var(--cream); }
.admin-side {
  background: var(--sage-dark); color: #cfdcd4; padding: 20px 14px;
  display: flex; flex-direction: column; gap: 22px; position: sticky; top: 0; height: 100vh;
}
.admin-brand {
  display: flex; align-items: center; gap: 10px;
  font-family: var(--font-title); font-weight: 600; color: #fff; font-size: 15px;
}
.admin-brand .mark {
  width: 28px; height: 28px; border-radius: 8px; background: var(--amber);
  display: grid; place-items: center; font-weight: 700; color: #fff;
}
.admin-side nav { display: flex; flex-direction: column; gap: 2px; flex: 1; }
.admin-side nav a {
  color: #cfdcd4; padding: 9px 12px; border-radius: var(--r-sm);
  font-size: 14px; font-weight: 500;
}
.admin-side nav a:hover { background: rgba(255,255,255,.07); color: #fff; text-decoration: none; }
.admin-side nav a.on { background: rgba(255,255,255,.14); color: #fff; }
.admin-user { border-top: 1px solid rgba(255,255,255,.12); padding-top: 14px; font-size: 13px; }
.admin-user b { display: block; color: #fff; }
.admin-user small { display: block; color: #9db3a7; margin-bottom: 8px; }
.admin-user a { color: #cfdcd4; font-size: 12.5px; }

.admin-main { padding: 26px 30px 60px; max-width: 1180px; }
.admin-head { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin-bottom: 20px; }
.admin-head h1 { font-size: 24px; margin: 0; }
.admin-head .sub { font-size: 13.5px; color: var(--ink-3); margin-top: 3px; }

.panel {
  background: var(--paper); border: 1px solid var(--line);
  border-radius: var(--r-lg); padding: 20px; box-shadow: var(--sh); margin-bottom: 18px;
}
.panel > h2 { font-size: 17px; margin-bottom: 4px; }
.panel > .sub { font-size: 13px; color: var(--ink-3); margin-bottom: 16px; }

.tabs { display: flex; gap: 6px; border-bottom: 1px solid var(--line); margin-bottom: 18px; flex-wrap: wrap; }
.tabs button {
  border: 0; background: transparent; padding: 9px 14px; font-size: 14px; font-weight: 500;
  color: var(--ink-2); border-bottom: 2px solid transparent; margin-bottom: -1px;
}
.tabs button.on { color: var(--sage); border-bottom-color: var(--sage); font-weight: 600; }

table.grid { width: 100%; border-collapse: collapse; font-size: 13.5px; }
table.grid th {
  text-align: left; font-size: 11.5px; text-transform: uppercase; letter-spacing: .4px;
  color: var(--ink-3); padding: 0 10px 9px; border-bottom: 1px solid var(--line); font-weight: 600;
}
table.grid td { padding: 11px 10px; border-bottom: 1px solid var(--line-soft); vertical-align: middle; }
table.grid tr:last-child td { border-bottom: 0; }
table.grid .actions { display: flex; gap: 6px; justify-content: flex-end; }
table.grid .mono { font-family: ui-monospace, Menlo, monospace; font-size: 12.5px; color: var(--ink-3); }

.badge { display: inline-block; border-radius: 999px; padding: 3px 10px; font-size: 11.5px; font-weight: 600; }
.badge.pub { background: #e9f3ec; color: #2b6a48; }
.badge.draft { background: var(--cream-2); color: var(--ink-3); }
.badge.err { background: #fbe5e0; color: #a5381f; }
.badge.warn { background: #fdf0dc; color: #92601c; }
.badge.sys { background: var(--sage-light); color: var(--sage); }

.stat-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 14px; margin-bottom: 20px; }
.stat-card {
  background: var(--paper); border: 1px solid var(--line);
  border-radius: var(--r); padding: 16px 18px; box-shadow: var(--sh);
}
.stat-card b { display: block; font-family: var(--font-title); font-size: 27px; line-height: 1.1; }
.stat-card span { font-size: 12.5px; color: var(--ink-3); }
.stat-card.alert-tone b { color: #b23c28; }

.spark { display: flex; align-items: flex-end; gap: 6px; height: 90px; margin-top: 8px; }
.spark div { flex: 1; background: var(--sage-light); border-radius: 4px 4px 0 0; position: relative; min-height: 3px; }
.spark div span {
  position: absolute; top: -18px; left: 0; right: 0; text-align: center;
  font-size: 11px; color: var(--ink-3);
}
.spark-labels { display: flex; gap: 6px; margin-top: 6px; }
.spark-labels span { flex: 1; text-align: center; font-size: 10.5px; color: var(--ink-3); }

.editor-layout { display: grid; grid-template-columns: 1fr 300px; gap: 18px; align-items: start; }
.editor-layout textarea.body { min-height: 420px; font-family: ui-monospace, Menlo, monospace; font-size: 13px; }
.perm-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 8px; }
.perm-grid label {
  display: flex; align-items: center; gap: 8px; font-size: 13px;
  background: var(--cream); border: 1px solid var(--line-soft);
  border-radius: var(--r-sm); padding: 7px 10px;
}
.perm-grid input { width: auto; }

.toolbar { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-bottom: 14px; }
.toolbar input, .toolbar select { width: auto; min-width: 170px; }
.pager { display: flex; gap: 8px; align-items: center; justify-content: center; margin-top: 16px; font-size: 13px; }

.switch { display: flex; align-items: center; gap: 10px; font-size: 13.5px; }
.switch input { width: auto; }

/* ==================================================================
   Adaptations écran
   ================================================================== */
@media (max-width: 900px) {
  .prop-header { grid-template-columns: 1fr; }
  .map-card, .prop-photo { height: 230px; }
  .editor-layout { grid-template-columns: 1fr; }
  .admin-shell { grid-template-columns: 1fr; }
  .admin-side { position: static; height: auto; }
  .admin-side nav { flex-direction: row; flex-wrap: wrap; }
  .admin-main { padding: 20px 16px 50px; }
  .main-links { display: none; }
  .hero h1 { font-size: 32px; }
  .row2 { grid-template-columns: 1fr; }
}

.perm-group { font-size: 13px; font-weight: 600; color: var(--ink-3); margin-bottom: 8px; }

/* ---------- Preuve de correspondance du DPE ---------- */
.match-proof {
  margin-top: 10px; padding: 9px 12px;
  background: var(--cream-2); border: 1px solid var(--line-soft);
  border-radius: var(--r-sm); font-size: 12.5px; color: var(--ink-2); line-height: 1.5;
}
.match-proof b { color: var(--ink); }
.more-dpe { margin-top: 10px; font-size: 13px; }
.more-dpe summary { cursor: pointer; color: var(--sage); font-weight: 600; font-size: 12.5px; }

/* ---------- Urbanisme ---------- */
.urba-zone {
  padding: 9px 0; border-bottom: 1px solid var(--line-soft);
}
.urba-zone:last-of-type { border-bottom: 0; }
.urba-zone b { display: block; font-family: var(--font-title); font-size: 15px; }
.urba-zone span { font-size: 12.5px; color: var(--ink-2); }
