/* =========================================================
   GRUPPE 6 — Design tokens · Luxe sombre
   Fond:            #14171B (anthracite profond)
   Panneau:         #1B1F24
   Panneau alt:     #21262C
   Vert:            #45B855 (accent principal)
   Vert clair:      #7BD97F
   Ivoire (texte):  #F2EEE4
   Gris chaud:      #9B968C
   Bordeaux (erreur): #8B3A3A
   Display: Fraunces / Body: Manrope / Mono: JetBrains Mono
   ========================================================= */

:root{
  color-scheme: dark;
  --bg: #14171B;
  --panel: #1B1F24;
  --panel-alt: #21262C;
  --line: rgba(69,184,85,0.20);
  --gold: #45B855;
  --gold-light: #7BD97F;
  --ivory: #F2EEE4;
  --muted: #9B968C;
  --wine: #8B3A3A;
  --wine-light: #C97B76;
  --orange: #B5701F;
  --orange-light: #E0983F;
  --on-dark: #F2EEE4;
  --on-gold: #14171B;

  --display: "Fraunces", serif;
  --body: "Manrope", sans-serif;
  --mono: "JetBrains Mono", monospace;

  --container: 1180px;
}

*,*::before,*::after{ box-sizing: border-box; }
html{ scroll-behavior: smooth; }
body{
  margin:0;
  background: radial-gradient(120% 60% at 50% -10%, rgba(69,184,85,0.06), rgba(0,0,0,0) 60%), var(--bg);
  color: var(--ivory);
  font-family: var(--body);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
img,svg{ display:block; max-width:100%; }
a{ color: inherit; text-decoration:none; }
ul,ol{ margin:0; padding:0; list-style:none; }
h1,h2,h3{ font-family: var(--display); font-weight:500; margin:0; }
p{ margin:0; }

:focus-visible{
  outline: 1.5px solid var(--gold-light);
  outline-offset: 3px;
}

.eyebrow{
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--gold);
  margin: 0 0 0.9rem;
}

@media (prefers-reduced-motion: reduce){
  *{ animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; scroll-behavior: auto !important; }
}

/* ---------- Buttons ---------- */
.btn{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  padding: 0.85rem 1.6rem;
  font-family: var(--body);
  font-weight:600;
  font-size: 0.92rem;
  border-radius: 2px;
  border: 1px solid transparent;
  background: transparent;
  color: var(--ivory);
  cursor:pointer;
  transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease, transform 0.15s ease;
}
.btn[hidden]{ display:none; }
.btn--gold{
  background: var(--gold);
  color: var(--on-gold);
  box-shadow: 0 6px 20px -8px rgba(69,184,85,0.55);
}
.btn--gold:hover{ background: var(--gold-light); transform: translateY(-1px); box-shadow: 0 10px 26px -8px rgba(69,184,85,0.7); }
.btn--outline{
  background: var(--panel-alt);
  border-color: rgba(242,238,228,0.35);
  color: var(--ivory);
}
.btn--outline:hover{ background: rgba(69,184,85,0.12); border-color: var(--gold-light); color: var(--gold-light); }
.btn--outline-danger{ border-color: rgba(201,123,118,0.45); color: var(--wine-light); }
.btn--outline-danger:hover{ background: rgba(139,58,58,0.14); border-color: var(--wine-light); color: var(--wine-light); }
.btn--ghost{
  background: transparent;
  border-color: var(--line);
  color: var(--gold-light);
  padding: 0.6rem 1.2rem;
  font-size: 0.85rem;
}
.btn--ghost:hover{ background: rgba(69,184,85,0.1); }

/* ---------- Nav ---------- */
.nav{
  position: sticky;
  top:0;
  z-index: 50;
  background: rgba(20,23,27,0.86);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.nav__inner{
  max-width: var(--container);
  margin: 0 auto;
  padding: 1.1rem 1.5rem;
  display:flex;
  align-items:center;
  gap: 2.5rem;
}
.brand{ display:flex; align-items:center; gap:0.6rem; margin-right:auto; color: var(--ivory); }
.brand__mark{ width: 26px; height:26px; color: var(--gold); flex-shrink:0; }
.brand__logo{ height: 38px; width: auto; display:block; border-radius: 4px; }
.brand__word{
  font-family: var(--display);
  letter-spacing: 0.18em;
  font-size: 1rem;
  font-weight: 500;
}
.nav__links{ display:flex; gap: 2rem; }
.nav__links a{
  position:relative;
  font-size: 0.88rem;
  color: var(--muted);
  transition: color 0.25s ease;
}
.nav__links a::after{
  content:'';
  position:absolute;
  left:0; right:100%;
  bottom:-4px;
  height:1px;
  background: var(--gold-light);
  transition: right 0.28s ease;
}
.nav__links a:hover{ color: var(--gold-light); }
.nav__links a:hover::after{ right:0; }
.nav__cta{ flex-shrink:0; transition: transform 0.2s ease; }
.nav__cta:hover{ transform: translateY(-1px); }
.nav__burger{
  display:none;
  flex-direction:column;
  justify-content:center;
  gap:5px;
  background:none;
  border:none;
  cursor:pointer;
  padding: 6px;
  width: 32px;
  height: 32px;
}
.nav__burger span{
  width:20px;
  height:1.5px;
  background: var(--ivory);
  display:block;
  transform-origin: center;
  transition: transform 0.3s ease, opacity 0.2s ease, width 0.3s ease;
}
.nav__burger[aria-expanded="true"] span:nth-child(1){ transform: translateY(6.5px) rotate(45deg); }
.nav__burger[aria-expanded="true"] span:nth-child(2){ opacity:0; }
.nav__burger[aria-expanded="true"] span:nth-child(3){ transform: translateY(-6.5px) rotate(-45deg); }
.nav__mobile{
  display:grid;
  grid-template-rows: 0fr;
  overflow:hidden;
  border-top: 1px solid transparent;
  transition: grid-template-rows 0.32s ease, border-color 0.32s ease;
}
.nav__mobile__inner{
  min-height:0;
  overflow:hidden;
  display:flex;
  flex-direction:column;
  padding: 0 1.5rem;
}
.nav__mobile a{
  padding: 0.7rem 0;
  color: var(--muted);
  font-size:0.95rem;
  border-bottom: 1px solid var(--line);
  opacity:0;
  transform: translateY(-6px);
  transition: opacity 0.25s ease, transform 0.25s ease, color 0.2s ease;
}
.nav__mobile a:hover{ color: var(--gold-light); }
.nav__mobile.is-open{
  grid-template-rows: 1fr;
  border-top-color: var(--line);
}
.nav__mobile.is-open .nav__mobile__inner{ padding: 0.5rem 1.5rem 1.2rem; }
.nav__mobile.is-open a{ opacity:1; transform:translateY(0); }
.nav__mobile.is-open a:nth-child(1){ transition-delay: 0.05s; }
.nav__mobile.is-open a:nth-child(2){ transition-delay: 0.1s; }
.nav__mobile.is-open a:nth-child(3){ transition-delay: 0.15s; }
.nav__mobile.is-open a:nth-child(4){ transition-delay: 0.2s; }

@media (max-width: 860px){
  .nav__links, .nav__cta{ display:none; }
  .nav__burger{ display:flex; }
}

/* ---------- Hero ---------- */
.hero{
  position:relative;
  padding: 7.5rem 1.5rem 0;
  overflow:hidden;
  min-height: 88vh;
  display:flex;
  align-items:center;
}
.hero__glow{
  position:absolute;
  top: -20%;
  left: 50%;
  transform: translateX(-50%);
  width: 900px;
  height: 900px;
  background: radial-gradient(circle, rgba(69,184,85,0.14) 0%, rgba(69,184,85,0) 65%);
  pointer-events:none;
}
.hero__inner{
  max-width: var(--container);
  width: 100%;
  margin: 0 auto;
  position:relative;
  z-index:2;
  padding-bottom: 8rem;
  display:grid;
  grid-template-columns: 1.05fr 0.95fr;
  align-items:center;
  gap: 3rem;
}
.hero__text{ min-width: 0; }
.hero__title{
  font-size: clamp(2.1rem, 3.8vw, 3.6rem);
  line-height: 1.12;
  max-width: 15ch;
  font-weight: 500;
}
.hero__title em{ font-style: italic; color: var(--gold-light); }
.hero__sub{
  margin-top: 1.8rem;
  max-width: 42ch;
  color: var(--muted);
  font-size: 1.08rem;
}
.hero__cta{ display:flex; gap:1rem; margin-top: 2.6rem; flex-wrap:wrap; }
.hero__slider{
  position:relative;
  width: 100%;
  aspect-ratio: 16/15;
  border-radius: 4px;
  overflow:hidden;
  border: 1px solid rgba(69,184,85,0.35);
  background: linear-gradient(160deg, var(--panel-alt), var(--bg));
  box-shadow: 0 30px 70px -25px rgba(0,0,0,0.6), 0 0 0 1px rgba(69,184,85,0.08);
  display:none;
}
.hero__slider--active{ display:block; }
.hero__slide{
  position:absolute;
  inset:0;
  width:100%;
  height:100%;
  object-fit:cover;
  opacity:0;
  transform: scale(1.06);
  transition: opacity 1.1s ease, transform 3.4s ease;
}
.hero__slide.is-active{
  opacity:1;
  transform: scale(1);
}

@media (max-width: 900px){
  .hero__inner{ grid-template-columns: 1fr; }
  .hero__slider{ aspect-ratio: 16/10; }
}

.hero__grid{
  position:absolute;
  left:0; right:0; bottom:0;
  width:100%;
  height: 220px;
  color: rgba(69,184,85,0.28);
  pointer-events:none;
}
.hero__radar{
  position:absolute;
  right: 4%;
  bottom: 6%;
  width: 200px;
  height: 200px;
  color: var(--gold);
  opacity: 0.55;
  pointer-events:none;
}

@media (max-width: 640px){
  .hero{ min-height: auto; padding-top: 6.5rem;}
  .hero__inner{ padding-bottom: 5rem; }
  .hero__grid{ height: 130px; }
  .hero__radar{ width: 130px; height: 130px; right: 6%; bottom: 4%; }
}

/* ---------- Trust strip ---------- */
.trust{
  max-width: var(--container);
  margin: 0 auto;
  padding: 3rem 1.5rem;
  display:flex;
  align-items:center;
  justify-content:center;
  gap: 3rem;
  border-bottom: 1px solid var(--line);
  flex-wrap:wrap;
}
.trust__item{ display:flex; flex-direction:column; align-items:center; text-align:center; gap:0.35rem; }
.trust__num{ font-family: var(--display); font-size: 2rem; color: var(--gold-light); }
.trust__label{ font-size: 0.8rem; color: var(--muted); max-width: 18ch; }
.trust__div{ width:1px; height: 40px; background: var(--line); }
@media (max-width: 640px){ .trust__div{ display:none; } }

/* ---------- Section shared ---------- */
.section__head{ max-width: var(--container); margin: 0 auto; padding: 0 1.5rem; text-align:center; }
.section__title{ font-size: clamp(1.9rem, 3.6vw, 2.7rem); }
.section__sub{ color: var(--muted); max-width: 52ch; margin: 1rem auto 0; }

/* ---------- Listings ---------- */
.listings{ padding: 7rem 0 6rem; }
.filters{
  max-width: var(--container);
  margin: 3rem auto 0;
  padding: 0 1.5rem;
  display:flex;
  gap: 0.6rem;
  flex-wrap:wrap;
  justify-content:center;
}
.filter{
  font-family: var(--mono);
  font-size: 0.75rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  background: transparent;
  border: 1px solid var(--line);
  color: var(--muted);
  padding: 0.55rem 1.1rem;
  border-radius: 2px;
  cursor:pointer;
  transition: all 0.2s ease;
}
.filter:hover{ border-color: var(--gold); color: var(--gold-light); }
.filter.is-active{ background: var(--gold); border-color: var(--gold); color: var(--on-gold); }

.grid{
  max-width: var(--container);
  margin: 3rem auto 0;
  padding: 0 1.5rem;
  display:grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.6rem;
}
.grid__empty{
  text-align:center;
  color: var(--muted);
  padding: 3rem 1.5rem 0;
  display:none;
}
.grid__empty[hidden]{ display:none; }

@media (max-width: 980px){ .grid{ grid-template-columns: repeat(2,1fr);} }
@media (max-width: 640px){ .grid{ grid-template-columns: 1fr; } }

.card{
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 4px;
  overflow:hidden;
  display:flex;
  flex-direction:column;
  transition: border-color 0.3s ease, transform 0.3s ease, box-shadow 0.3s ease;
}
.card:hover{ border-color: rgba(69,184,85,0.5); transform: translateY(-4px); box-shadow: 0 20px 44px -18px rgba(69,184,85,0.35); }
.card[hidden]{ display:none; }
.card--btn{
  width:100%;
  text-align:left;
  font: inherit;
  color: inherit;
  cursor:pointer;
  padding:0;
  margin:0;
  appearance:none;
}
.card__visual{
  position:relative;
  aspect-ratio: 4/3;
  background: linear-gradient(160deg, var(--panel-alt), var(--bg));
  padding: 1.4rem 1.4rem 0.6rem;
  color: rgba(69,184,85,0.7);
  overflow:hidden;
}
.card__visual--photo{ padding:0; }
.card__visual--photo img{ width:100%; height:100%; object-fit:cover; display:block; transition: transform 0.5s ease; }
.card:hover .card__visual--photo img{ transform: scale(1.06); }
.card__prices{
  display:flex;
  flex-direction:column;
  gap: 0.35rem;
  border-top: 1px solid var(--line);
  padding-top: 0.75rem;
  margin-top: 0.1rem;
}
.card__prices li{
  display:flex;
  align-items:baseline;
  justify-content:space-between;
  gap: 0.6rem;
  font-size: 0.85rem;
}
.card__price-label{ color: var(--muted); }
.card__price-value{ font-family: var(--mono); color: var(--gold-light); font-size: 0.95rem; white-space:nowrap; }
.modal__body .card__prices{ margin-top: 0.5rem; padding-top: 0.9rem; }
.modal__body .card__price-value{ font-size: 1.05rem; }
.card__tag{
  position:absolute;
  top: 1rem; left: 1rem;
  font-family: var(--mono);
  font-size: 0.68rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--on-dark);
  background: rgba(11,10,8,0.7);
  border: 1px solid var(--line);
  padding: 0.3rem 0.6rem;
  border-radius: 2px;
}
.card__indispo-tag{
  position:absolute;
  top: 1.1rem; right: -0.3rem;
  font-family: var(--mono);
  font-size: 0.66rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #ffe8e4;
  background: linear-gradient(135deg, #a02318, #6b0f0f);
  padding: 0.4rem 1.3rem 0.4rem 0.85rem;
  clip-path: polygon(16px 0, 100% 0, 100% 100%, 16px 100%, 0 50%);
  box-shadow: 0 6px 14px rgba(0,0,0,0.4);
  transform: rotate(4deg);
  transform-origin: right center;
}
.card__indispo-tag::after{
  content:'';
  position:absolute;
  top:50%; right:9px;
  width:5px; height:5px;
  border-radius:50%;
  background: rgba(255,255,255,0.5);
  box-shadow: 0 0 0 1.5px rgba(255,255,255,0.3);
  transform: translateY(-50%);
}
.modal__body .card__indispo-tag{
  position:static;
  display:inline-block;
  align-self: flex-start;
  width: fit-content;
  margin-left: 0.6rem;
  top:auto; right:auto;
  transform: rotate(-3deg);
  transform-origin: center;
  vertical-align: middle;
}
.modal__body .card__indispo-tag[hidden]{ display:none; }
.card__body{ padding: 1.4rem; display:flex; flex-direction:column; gap: 0.65rem; flex:1; }
.card__row{ display:flex; align-items:baseline; justify-content:space-between; gap:0.6rem; }
.card__row h3{ font-size: 1.15rem; }
.card__ref{ font-family: var(--mono); font-size: 0.72rem; color: var(--muted); flex-shrink:0; }
.card__loc{ font-size: 0.85rem; color: var(--gold); }
.card__desc{
  font-size: 0.9rem;
  color: var(--muted);
  flex:1;
  display:-webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow:hidden;
}
.card__specs{ display:flex; flex-wrap:wrap; gap: 0.45rem; font-size: 0.72rem; color: var(--muted); border-top: 1px solid var(--line); padding-top: 0.85rem; margin-top:0.1rem; }
.card__specs li{
  font-family: var(--mono);
  letter-spacing: 0.02em;
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 0.28rem 0.7rem;
}
.card__foot{ display:flex; align-items:center; justify-content:space-between; margin-top: 0.3rem; }
.card__price{ font-family: var(--mono); color: var(--gold-light); font-size: 1.05rem; }
.card__link{ font-size: 0.85rem; color: var(--ivory); border-bottom: 1px solid var(--line); padding-bottom: 2px; transition: color 0.2s ease, border-color 0.2s ease; }
.card__link:hover{ color: var(--gold-light); border-color: var(--gold-light); }
.card--btn:hover .card__link{ color: var(--gold-light); border-color: var(--gold-light); }

/* ---------- Why ---------- */
.why{
  position:relative;
  background: var(--panel);
  padding: 7rem 0 6rem;
  overflow:hidden;
}
.why__grid-strip{
  position:absolute;
  top:0; left:0; right:0;
  width:100%; height:70px;
  color: var(--bg);
}
.why__grid{
  max-width: var(--container);
  margin: 3.5rem auto 0;
  padding: 0 1.5rem;
  display:grid;
  grid-template-columns: repeat(3,1fr);
  gap: 2.5rem;
}
.why__item{
  border-top: 1px solid var(--line);
  padding-top: 1.6rem;
}
.why__icon{ width:34px; height:34px; color: var(--gold); margin-bottom: 1.1rem; }
.why__item h3{ font-size: 1.15rem; margin-bottom: 0.6rem; }
.why__item p{ color: var(--muted); font-size: 0.92rem; }
@media (max-width: 780px){ .why__grid{ grid-template-columns: 1fr; } }

/* ---------- Process ---------- */
.process{ padding: 7rem 0; position:relative; }
.process__sub{
  color: var(--muted);
  font-size: 0.95rem;
  margin: 0.9rem auto 0;
  max-width: 42ch;
}
.process__rail{
  position: relative;
  max-width: var(--container);
  margin: 4.5rem auto 0;
  padding: 0 1.5rem;
  display:grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 2rem;
}
.process__rail::before{
  content:"";
  position:absolute;
  top: 27px;
  left: calc(1.5rem + 27px);
  right: calc(1.5rem + 27px);
  height: 1px;
  background: linear-gradient(90deg, var(--line), var(--gold) 15%, var(--gold) 85%, var(--line));
  opacity: 0.5;
}
.process__node{
  position:relative;
  display:flex;
  flex-direction:column;
  align-items:flex-start;
}
.process__marker{
  position:relative;
  width: 54px;
  height: 54px;
  border-radius: 50%;
  background: var(--panel);
  border: 1px solid var(--line);
  display:flex;
  align-items:center;
  justify-content:center;
  margin-bottom: 1.6rem;
  transition: border-color 0.25s ease, transform 0.25s ease, background 0.25s ease;
}
.process__icon{
  width: 22px; height: 22px;
  color: var(--gold);
  transition: opacity 0.2s ease;
}
.process__index{
  position:absolute;
  bottom: -0.55rem;
  right: -0.4rem;
  font-family: var(--mono);
  font-size: 0.68rem;
  letter-spacing: 0.04em;
  color: var(--bg);
  background: var(--gold);
  border-radius: 50%;
  width: 1.6rem;
  height: 1.6rem;
  display:flex;
  align-items:center;
  justify-content:center;
}
.process__node:hover .process__marker{
  border-color: var(--gold);
  transform: translateY(-3px);
}
.process__node--final .process__marker{
  background: var(--gold);
}
.process__node--final .process__icon{ color: var(--on-gold); }
.process__node--final .process__index{
  background: var(--ivory);
  color: var(--on-gold);
}
.process__body{ padding-right: 0.5rem; }
.process__node h3{ font-size: 1.05rem; margin-bottom: 0.5rem; }
.process__node p{ color: var(--muted); font-size: 0.9rem; max-width: 30ch; }

@media (max-width: 900px){
  .process__rail{
    grid-template-columns: 1fr;
    gap: 2.6rem;
    max-width: 480px;
  }
  .process__rail::before{
    top: 27px;
    bottom: 27px;
    left: calc(1.5rem + 27px);
    right: auto;
    width: 1px;
    height: auto;
    background: linear-gradient(180deg, var(--line), var(--gold) 15%, var(--gold) 85%, var(--line));
  }
  .process__node{
    flex-direction:row;
    align-items:flex-start;
    gap: 1.5rem;
  }
  .process__marker{ margin-bottom:0; flex-shrink:0; }
  .process__node p{ max-width: 44ch; }
}

/* ---------- Contact ---------- */
.contact{ background: var(--panel); padding: 7rem 0; }
.contact__inner{
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 1.5rem;
  display:grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
}
.contact__text .section__title{ text-align:left; }
.contact__text .section__sub{ text-align:left; margin-left:0; }
.contact__list{ margin-top: 2.2rem; display:flex; flex-direction:column; gap: 1rem; }
.contact__list li{ font-size: 0.95rem; color: var(--ivory); display:flex; gap: 1rem; }
.contact__list span{ font-family: var(--mono); font-size: 0.72rem; color: var(--gold); text-transform:uppercase; letter-spacing:0.05em; width: 5.5rem; flex-shrink:0; padding-top:0.15rem; }

.contact__form{ display:flex; flex-direction:column; gap: 1.1rem; }
.contact__form label{ display:flex; flex-direction:column; gap: 0.5rem; font-size: 0.82rem; color: var(--muted); }
.contact__form input, .contact__form select, .contact__form textarea{
  background: var(--bg);
  border: 1px solid var(--line);
  color: var(--ivory);
  padding: 0.75rem 0.9rem;
  border-radius: 2px;
  font-family: var(--body);
  font-size: 0.95rem;
  resize: vertical;
}
.contact__form input:focus, .contact__form select:focus, .contact__form textarea:focus{
  outline: none;
  border-color: var(--gold);
}
.contact__note{ font-size: 0.78rem; color: var(--muted); margin-top: 0.2rem; }

@media (max-width: 860px){ .contact__inner{ grid-template-columns: 1fr; gap: 3rem; } }

/* ---------- Footer ---------- */
.footer{ padding: 3rem 0 2.5rem; border-top: 1px solid var(--line); }
.footer__inner{
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 1.5rem;
  display:flex;
  align-items:center;
  justify-content:space-between;
  flex-wrap:wrap;
  gap: 1.5rem;
}
.footer__links{ display:flex; gap: 1.6rem; }
.footer__links a{ font-size: 0.85rem; color: var(--muted); }
.footer__links a:hover{ color: var(--gold-light); }
.footer__legal{ width:100%; font-size: 0.76rem; color: var(--muted); opacity:0.7; text-align:center; margin-top: 1rem; }
/* ---------- Nav: lien actif ---------- */
.nav__links a.is-current{ color: var(--gold-light); }

/* ---------- Teaser (accueil) ---------- */
.grid--teaser{ grid-template-columns: repeat(3, 1fr); }
.listings__more{ display:flex; justify-content:center; margin: 3rem auto 0; padding: 0 1.5rem; }
.catalog__loading{ text-align:center; color: var(--muted); padding: 2rem 1.5rem; grid-column: 1 / -1; }

/* ---------- Page-head (biens / admin) ---------- */
.page-head{ position:relative; padding: 6.5rem 0 1.5rem; overflow:hidden; }
.page-head__glow{
  position:absolute;
  top: -60%;
  left: 50%;
  transform: translateX(-50%);
  width: 700px;
  height: 500px;
  background: radial-gradient(circle, rgba(69,184,85,0.16) 0%, rgba(69,184,85,0) 68%);
  pointer-events:none;
}
.page-head__stats{
  display:flex;
  align-items:center;
  justify-content:center;
  gap: 0.9rem;
  margin: 1.8rem auto 0;
  font-family: var(--mono);
  font-size: 0.78rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted);
}
.page-head__stats[hidden]{ display:none; }
.page-head__stats strong{ color: var(--gold-light); font-weight:600; }
.page-head__stats span.dot{ width:3px; height:3px; border-radius:50%; background: var(--line); }
.page-head .section__title::after{
  content:'';
  display:block;
  width: 60px;
  height: 2px;
  margin: 1.3rem auto 0;
  background: linear-gradient(90deg, transparent, var(--gold), transparent);
}

/* ---------- Catalogue (biens.html) ---------- */
.catalog{ max-width: var(--container); margin: 0 auto; padding: 2rem 1.5rem 6rem; }
.catgroup{ padding-top: 3.2rem; }
.catgroup:first-child{ padding-top: 1rem; }
.catgroup__head{
  display:flex;
  align-items:baseline;
  justify-content:space-between;
  gap: 1rem;
  border-bottom: 1px solid var(--line);
  padding-bottom: 0.9rem;
  margin-bottom: 1.6rem;
}
.catgroup__head h2{ font-size: 1.4rem; }
.catgroup__count{ font-family: var(--mono); font-size: 0.75rem; color: var(--muted); text-transform: uppercase; letter-spacing: 0.05em; flex-shrink:0; }

.mini-grid{
  display:grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.6rem;
}
@media (max-width: 980px){ .mini-grid{ grid-template-columns: repeat(2,1fr);} }
@media (max-width: 640px){ .mini-grid{ grid-template-columns: 1fr; } }

/* ---------- Page "Employés" (trombinoscope public) ---------- */
.team-grid{
  display:flex;
  flex-wrap:wrap;
  justify-content:center;
  grid-template-columns: none;
}
.team-card{ width: 220px; flex: 0 0 auto; }
@media (max-width: 640px){ .team-card{ width: 45%; } }
.team-card{
  display:flex;
  flex-direction:column;
  align-items:center;
  text-align:center;
  padding: 1.6rem 1.2rem 1.4rem;
  gap: 0.9rem;
}
.team-card:hover{ border-color: rgba(69,184,85,0.5); transform: translateY(-4px); box-shadow: 0 20px 44px -18px rgba(69,184,85,0.35); }
.team-card__visual{
  width: 96px;
  height: 96px;
  border-radius: 50%;
  overflow:hidden;
  background: var(--panel-alt);
  border: 1px solid var(--line);
  display:flex;
  align-items:center;
  justify-content:center;
  color: var(--gold);
  flex-shrink:0;
}
.team-card__visual svg{ width: 62%; height: 62%; }
.team-card__visual--photo{ padding:0; }
.team-card__visual--photo img{ width:100%; height:100%; object-fit:cover; display:block; }
.team-card__body{ display:flex; flex-direction:column; align-items:center; gap: 0.55rem; }
.team-card__name{ font-size: 1.02rem; }

/* ---------- Modal (fiche bien) ---------- */
body.no-scroll{ overflow: hidden; }
.modal{ position:fixed; inset:0; z-index: 100; display:flex; align-items:center; justify-content:center; padding: 1.5rem; }
.modal[hidden]{ display:none; }
.modal__backdrop{ position:absolute; inset:0; background: rgba(6,8,7,0.78); backdrop-filter: blur(3px); }
.modal__panel{
  position:relative;
  z-index:1;
  max-width: 660px;
  width:100%;
  max-height: 88vh;
  overflow-y:auto;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 6px;
  box-shadow: 0 40px 90px -30px rgba(0,0,0,0.7);
}
.modal__close{
  position:absolute;
  top: 0.9rem; right: 0.9rem;
  z-index: 2;
  width: 36px; height:36px;
  border-radius: 50%;
  border: 1px solid rgba(69,184,85,0.35);
  background: rgba(11,10,8,0.75);
  color: var(--on-dark);
  font-size: 1.3rem;
  line-height: 1;
  display:flex;
  align-items:center;
  justify-content:center;
  padding:0;
  cursor:pointer;
  transition: border-color 0.2s ease, color 0.2s ease, transform 0.2s ease;
}
.modal__close:hover{ border-color: var(--gold-light); color: var(--gold-light); transform: rotate(90deg); }
.modal__visual{
  background: linear-gradient(160deg, var(--panel-alt), var(--bg));
  color: rgba(69,184,85,0.7);
  padding: 2rem 2rem 0.5rem;
}
.modal__body{ padding: 1.8rem 2rem 2rem; display:flex; flex-direction:column; gap: 0.85rem; }
.modal__body .card__row h3{ font-size: 1.55rem; }
.modal__body .card__loc{ font-size: 0.92rem; }
.modal__body .card__desc{ -webkit-line-clamp: unset; font-size: 0.95rem; line-height:1.65; }
.modal__body .card__specs{ font-size: 0.76rem; }
.modal__body .card__foot{ margin-top: 0.5rem; padding-top: 0.9rem; border-top: 1px solid var(--line); }
.modal__body .card__price{ font-size: 1.25rem; }

/* ---------- Admin: login ---------- */
.admin-login{ min-height: 70vh; display:flex; align-items:center; justify-content:center; padding: 6.5rem 1.5rem 4rem; }
.admin-login[hidden]{ display:none; }
.admin-panel[hidden]{ display:none; }
.admin-login__box{ max-width: 420px; width:100%; }
.admin-login__box .section__title{ text-align:left; margin-bottom: 0.6rem; }
.admin-login__form{ display:flex; flex-direction:column; gap: 1.1rem; margin-top: 1.8rem; }
.admin-login__form label{ display:flex; flex-direction:column; gap: 0.5rem; font-size: 0.82rem; color: var(--muted); }
.admin-login__form input{
  background: var(--bg);
  border: 1px solid var(--line);
  color: var(--ivory);
  padding: 0.75rem 0.9rem;
  border-radius: 2px;
  font-family: var(--body);
  font-size: 0.95rem;
}
.admin-login__form input:focus{ outline:none; border-color: var(--gold); }
.admin-login__error{ color: var(--wine-light); font-size: 0.85rem; }
.admin-login__note{ margin-top: 1.6rem; font-size: 0.78rem; color: var(--muted); line-height:1.6; }

/* ---------- Admin: panel ---------- */
.admin-panel{ padding: 6.5rem 0 6rem; }

/* ---------- Admin: tableau de bord (tuiles-popup) ---------- */
.admin-dashboard{
  max-width: var(--container); margin: 2.4rem auto 0; padding: 0 1.5rem;
  display:grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 1.1rem;
}
.admin-tile{
  position:relative;
  text-align:left;
  display:flex; flex-direction:column; align-items:flex-start; gap: 0.7rem;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 1.6rem 1.5rem 1.7rem;
  cursor:pointer;
  color: var(--ivory);
  font-family: var(--body);
  transition: border-color 0.2s ease, transform 0.2s ease, background 0.2s ease;
}
.admin-tile[hidden]{ display:none; }
.admin-tile:hover{ border-color: var(--gold); transform: translateY(-3px); background: var(--panel-alt); }
.admin-tile__icon{ width: 40px; height:40px; color: var(--gold); }
.admin-tile__icon svg{ width:100%; height:100%; }
.admin-tile__title{ font-family: var(--display); font-size: 1.15rem; font-weight:500; color: var(--ivory); }
.admin-tile__desc{ font-size: 0.85rem; color: var(--muted); line-height:1.5; }
.admin-tile__count{
  font-family: var(--mono); font-size: 0.7rem; letter-spacing:0.05em; color: var(--gold-light);
  min-height: 1em;
}

.admin-toolbar{
  display:flex; gap: 0.8rem; flex-wrap:wrap; margin-bottom: 1.6rem;
}
.admin-search{
  background: var(--bg);
  border: 1px solid var(--line);
  color: var(--ivory);
  padding: 0.7rem 0.85rem;
  border-radius: 2px;
  font-family: var(--body);
  font-size: 0.92rem;
  min-width: 240px;
  flex: 1 1 240px;
  max-width: 360px;
}
.admin-search:focus{ outline:none; border-color: var(--gold); }
.admin-search::placeholder{ color: var(--muted); }

/* ---------- Tableau "Tarifs Construction" (reproduit la mise en
   page Excel fournie : en-têtes pastel, sections colorées, note
   finale en rouge). Volontairement clair pour rester lisible tel
   quel, même dans le panel admin sombre. ---------- */
.tarif-construction{
  border-collapse: collapse;
  width: 100%;
  background: #808080;
  border: 4px solid #808080;
  font-family: var(--body);
}
.tarif-construction th, .tarif-construction td{
  border: 1px solid #808080;
  padding: 0.5rem 0.8rem;
  text-align: center;
  font-size: 0.92rem;
  color: #1a1a1a;
}
.tarif-construction caption{
  background: #f6cf9e;
  font-weight: 700;
  padding: 0.5rem;
  font-style: italic;
}
.tarif-construction .tarif-head{ background: #d8ead3; font-weight: 700; font-style: italic; }
.tarif-construction .tarif-blue td{ background: #cfe2f3; }
.tarif-construction .tarif-blue td:last-child{ background: #d9ead3; }
.tarif-construction .tarif-pink td{ background: #f4cccc; }
.tarif-construction .tarif-pink td:last-child{ background: #d9ead3; }
.tarif-construction .tarif-purple td{ background: #d9d2e9; }
.tarif-construction .tarif-purple td:last-child{ background: #d9ead3; }
.tarif-construction .tarif-type{ text-align:left; font-style: italic; }
.tarif-construction .tarif-spacer td{ background:#808080; border:none; padding: 0.35rem; }
.tarif-construction .tarif-note td{ background:#ea9999; font-style:italic; font-weight:600; padding: 0.9rem; }
.tarif-construction input{
  width: 100px;
  text-align: center;
  border: 1px solid #999;
  border-radius: 2px;
  padding: 0.3rem 0.4rem;
  font-family: var(--body);
  font-size: 0.9rem;
  background: #fff;
  color: #1a1a1a;
}
.tarif-construction input:disabled{ background: transparent; border-color: transparent; color:#1a1a1a; }

/* ---------- Tableau "Tarif immobilier" (Barème Achat + Location) ---------- */
.tarif-immo{
  border-collapse: collapse;
  width: 100%;
  background: #808080;
  border: 4px solid #808080;
  font-family: var(--body);
  font-size: 0.88rem;
}
.tarif-immo th, .tarif-immo td{
  border: 1px solid #808080;
  padding: 0.45rem 0.7rem;
  text-align: center;
  color: #1a1a1a;
}
.tarif-immo caption{
  background: #9fc3c9;
  font-weight: 700;
  font-style: italic;
  padding: 0.55rem;
}
.tarif-immo .immo-f1{ background: #a9c98f; font-style: italic; font-weight: 600; }
.tarif-immo .immo-f2{ background: #4a7ebb; color:#fff; font-style: italic; font-weight: 600; }
.tarif-immo .immo-f3{ background: #e69138; font-style: italic; font-weight: 600; }
.tarif-immo .immo-f4{ background: #d16b60; font-style: italic; font-weight: 600; }
.tarif-immo .immo-f1-title, .tarif-immo .immo-f2-title, .tarif-immo .immo-f3-title, .tarif-immo .immo-f4-title{ font-weight: 700; }
.tarif-immo .immo-crit{ text-align:left; }
.tarif-immo .immo-spacer td{ background:#808080; border:none; padding:0.3rem; }
.tarif-immo .immo-maison-head{ background:#9fc3c9; font-weight:700; }
.tarif-immo .immo-col-head{ background:#9fc3c9; font-weight:700; font-size:0.82rem; }
.tarif-immo .immo-row-1500{ background: #e6dff2; }
.tarif-immo .immo-row-2500{ background: #fce5cd; }
.tarif-immo .immo-row-5000{ background: #cfe0d0; }
.tarif-immo .immo-dot{ display:inline-block; width:10px; height:10px; border-radius:50%; margin-right:6px; vertical-align:middle; }
.tarif-immo .immo-note td{ background:#f4cccc; font-style:italic; font-weight:600; padding:0.7rem; }
.tarif-immo input, .tarif-immo textarea{
  width: 100%;
  min-width: 70px;
  text-align: center;
  border: 1px solid #999;
  border-radius: 2px;
  padding: 0.25rem 0.35rem;
  font-family: var(--body);
  font-size: 0.85rem;
  background: #fff;
  color: #1a1a1a;
  box-sizing: border-box;
}
.tarif-immo .immo-crit input{ text-align:left; }
.tarif-immo input:disabled, .tarif-immo textarea:disabled{ background: transparent; border-color: transparent; color:#1a1a1a; }

/* ---------- Tableau "Hangar" ---------- */
.hangar-table tbody tr:nth-child(even){ background: rgba(120,170,200,0.08); }
.hangar-table select, .hangar-table input[type="text"]{
  background: var(--bg);
  border: 1px solid var(--line);
  color: var(--ivory);
  padding: 0.4rem 0.5rem;
  border-radius: 2px;
  font-family: var(--body);
  font-size: 0.85rem;
  width: 100%;
  box-sizing: border-box;
}
.hangar-table select:disabled, .hangar-table input:disabled{ opacity:0.7; background:transparent; border-color:transparent; }
.hangar-taille--petit{ color:#e07a7a; font-weight:600; }
.hangar-taille--moyen{ color:#7fbf7f; font-weight:600; }
.hangar-taille--grand{ color:#b39ddb; font-weight:600; }
.hangar-taille--inconnu{ color:#e0a84a; font-weight:600; }
.hangar-dispo--disponible{ color:#7fbf7f; font-weight:600; }
.hangar-dispo--louer{ color:#b39ddb; font-weight:600; }
.hangar-dispo--vendu{ color:#3a9d5d; font-weight:600; }
.hangar-dispo--non-dispo{ color:#e07a7a; font-weight:600; }
.hangar-dispo--loa{ color:#3d6fb3; font-weight:600; }
.hangar-dispo--reserve{ color:#6fa8dc; font-weight:600; }
.hangar-dispo--a-verifier{ color:#6fc9c9; font-weight:600; }
.hangar-dispo--construction{ color:#e0a84a; font-weight:600; }
.hangar-dispo--vide-en-cours{ color:#c9a84a; font-weight:600; }
.hangar-dispo--a-vide{ color:#8f9aa8; font-weight:600; }
.garage-dispo--vide-en-cours{ color:#c9a84a; font-weight:600; }
.garage-dispo--a-vide{ color:#8f9aa8; font-weight:600; }
.garage-dispo--disponible{ color:#7fbf7f; font-weight:600; }
.garage-dispo--non-dispo{ color:#e07a7a; font-weight:600; }
.garage-dispo--reserve{ color:#6fa8dc; font-weight:600; }
.garage-dispo--a-verifier{ color:#b39ddb; font-weight:600; }
.garage-dispo--achat{ color:#1f6f78; font-weight:600; }
.garage-dispo--location{ color:#e0a05a; font-weight:600; }
.garage-dispo--location-expire{ color:#a33a3a; font-weight:600; }
.garage-dispo--loa{ color:#d4b84a; font-weight:600; }
.hangar-table .secteur-nord{ color:#7fbf7f; }
.hangar-table .secteur-centre{ color:#e0a05a; }
.hangar-table .secteur-frathover{ color:#d6c34a; }
.hangar-table .secteur-est{ color:#b39ddb; }
.hangar-table .secteur-ouest{ color:#6fa8dc; }
.hangar-table .secteur-sud{ color:#e07a7a; }
.hangar-table .secteur-mirror{ color:#8fa5b0; }
.admin-table-wrap{
  overflow-x:auto;
  padding-bottom: 0.6rem;
  margin: 0 -0.2rem;
  padding-left: 0.2rem;
  padding-right: 0.2rem;
}
.admin-table-wrap::-webkit-scrollbar{ height: 8px; }
.admin-table-wrap::-webkit-scrollbar-track{ background: rgba(255,255,255,0.03); border-radius: 10px; }
.admin-table-wrap::-webkit-scrollbar-thumb{ background: rgba(69,184,85,0.35); border-radius: 10px; }
.admin-table-wrap::-webkit-scrollbar-thumb:hover{ background: rgba(69,184,85,0.55); }
.admin-table-wrap{ scrollbar-width: thin; scrollbar-color: rgba(69,184,85,0.35) rgba(255,255,255,0.03); }
.admin-table{
  width:100%;
  min-width: 900px;
  border-collapse: separate;
  border-spacing: 0 0.6rem;
  font-size: 0.87rem;
}
.admin-table thead th{
  text-align:left; font-family: var(--mono); font-size: 0.66rem; text-transform:uppercase; letter-spacing:0.09em;
  color: var(--gold-light); opacity: 0.85; padding: 0 1rem 0.85rem;
  border-bottom: 1px solid var(--line);
}
.admin-table tbody tr{
  background: var(--panel-alt);
  transition: background 0.18s ease, box-shadow 0.18s ease, transform 0.18s ease, border-color 0.18s ease;
}
.admin-table tbody tr:hover{
  background: rgba(69,184,85,0.08);
  box-shadow: 0 14px 30px -16px rgba(0,0,0,0.7);
  transform: translateY(-1px);
}
.admin-table td{
  padding: 1.05rem 1rem;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  vertical-align:middle;
  color: var(--ivory);
  line-height: 1.45;
}
.admin-table__nowrap{ white-space: nowrap; font-variant-numeric: tabular-nums; }
.admin-table__adresse{ max-width: 220px; line-height: 1.45; color: var(--ivory); }
.badge-indispo{
  display:inline-block;
  font-family: var(--mono);
  font-size: 0.66rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: #ffb4a8;
  background: rgba(120,20,10,0.35);
  border: 1px solid rgba(255,120,100,0.5);
  padding: 0.18rem 0.5rem;
  border-radius: 2px;
  margin-left: 0.4rem;
}
.admin-table tbody tr td:first-child{
  border-left: 1px solid var(--line);
  border-radius: 8px 0 0 8px;
  font-family: var(--mono);
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--gold-light);
  letter-spacing: 0.03em;
}
.admin-table tbody tr td:last-child{
  border-right: 1px solid var(--line);
  border-radius: 0 8px 8px 0;
}
.admin-table__montant{ font-variant-numeric: tabular-nums; font-weight: 600; }
.admin-table__montant--neg{ color: var(--wine-light); }
.admin-table__montant--pos{ color: #8FCB9C; }
.admin-table__muted{ color: var(--muted); }
.admin-table__actions{ vertical-align: middle; }
.admin-table__actions-inner{ display:flex; align-items:center; gap: 0.4rem; white-space:nowrap; justify-content:flex-end; }
.admin-table__actions .btn{ padding: 0.5rem 0.95rem; font-size: 0.76rem; border-radius: 4px; font-weight:600; }
.admin-table__actions .btn--ghost{
  border-color: rgba(69,184,85,0.4);
}
.admin-table__actions .btn--link{
  background: transparent;
  border: none;
  color: var(--muted);
  text-decoration: underline;
  text-underline-offset: 3px;
  padding: 0.5rem 0.5rem;
  font-size: 0.76rem;
}
.admin-table__actions .btn--link:hover{ color: var(--gold-light); background: transparent; }
.admin-table__actions .btn--link-danger{ color: var(--wine-light); }
.admin-table__actions .btn--link-danger:hover{ color: var(--wine); background: transparent; }
.admin-table__actions--divider{
  display:flex; align-items:center; gap: 0.4rem;
  padding-left: 0.65rem;
  margin-left: 0.25rem;
  border-left: 1px solid var(--line);
}
.admin-table__actions .btn--outline{
  background: transparent;
  border-color: rgba(139,58,58,0.45);
  color: var(--wine-light);
}
.admin-table__actions .btn--outline:hover{
  background: rgba(139,58,58,0.14);
  border-color: var(--wine-light);
  color: var(--wine-light);
}
.admin-table th:last-child,
.admin-table td:last-child{ padding-right: 1.1rem; }
.admin-empty{ text-align:center; color: var(--muted); padding: 2.5rem 0; }

/* ---------- Admin: popup large (Gestion des biens) ---------- */
.affiches-grid{
  display:grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
  max-height: 72vh;
  overflow-y: auto;
  padding-top: 0.3rem;
}
.affiches-grid img{
  width:100%;
  height:auto;
  display:block;
  border-radius: 10px;
  border: 1px solid var(--line);
  cursor: zoom-in;
}
@media (max-width: 720px){
  .affiches-grid{ grid-template-columns: 1fr; }
}

.modal__panel--wide{ max-width: 1040px; }
/* ---------- Admin: lightbox photo (agrandissement d'une miniature) ---------- */
.img-lightbox__panel{
  position:relative;
  max-width: 92vw;
  max-height: 92vh;
  display:flex;
  align-items:center;
  justify-content:center;
}
.img-lightbox__panel img{
  max-width: 92vw;
  max-height: 92vh;
  border-radius: 10px;
  border: 1px solid var(--line);
  box-shadow: 0 20px 60px rgba(0,0,0,0.55);
  display:block;
}
.img-lightbox__close{
  position:absolute;
  top:-14px; right:-14px;
}
@media (max-width: 640px){
  .img-lightbox__close{ top:-10px; right:-10px; }
}
.admin-photo-zoomable{ cursor: zoom-in; }

.modal__panel--wide::before{
  content:'';
  position:absolute;
  top:0; left:0; right:0;
  height: 3px;
  border-radius: 6px 6px 0 0;
  background: linear-gradient(90deg, transparent, var(--gold), transparent);
}
.modal__body--wide{ padding: 2.1rem 2.2rem 2.3rem; }
.modal__body--wide h3{
  font-family: var(--display); font-size: 1.45rem; font-weight:500; margin-bottom: 1.5rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--line);
}

/* ---------- Admin: popup "Messages" (chat visiteurs ↔ agents) ---------- */
.chat-shell{
  display:grid;
  grid-template-columns: 260px 1fr;
  gap: 1.2rem;
  height: 520px;
  max-height: 65vh;
}
.chat-list{
  overflow-y:auto;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--panel);
}
.chat-list__toggle{
  display:flex;
  align-items:center;
  gap: 0.5rem;
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--line);
  font-size: 0.76rem;
  color: var(--muted);
  cursor:pointer;
}
.chat-list__item{
  display:flex;
  flex-direction:column;
  gap: 0.25rem;
  width:100%;
  text-align:left;
  padding: 0.85rem 1rem;
  border: none;
  border-bottom: 1px solid var(--line);
  background: transparent;
  color: var(--ivory);
  cursor:pointer;
  font-family: var(--body);
}
.chat-list__item:hover{ background: rgba(69,184,85,0.08); }
.chat-list__item.is-active{ background: rgba(69,184,85,0.14); }
.chat-list__item.is-closed{ opacity: 0.6; }
.chat-list__closed-tag{
  font-size: 0.64rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--wine-light);
  border: 1px solid rgba(201,123,118,0.45);
  border-radius: 999px;
  padding: 0.05rem 0.4rem;
  margin-left: 0.4rem;
}
.chat-list__item-top{ display:flex; align-items:center; justify-content:space-between; gap: 0.5rem; }
.chat-list__name{ font-weight:600; font-size: 0.88rem; }
.chat-list__dot{
  width: 9px; height:9px; border-radius:50%;
  background: var(--gold); flex-shrink:0;
}
.chat-list__preview{
  font-size: 0.78rem; color: var(--muted);
  overflow:hidden; text-overflow:ellipsis; white-space:nowrap;
}
.chat-list__time{ font-size: 0.68rem; color: var(--muted); font-family: var(--mono); }
.chat-thread{
  display:flex;
  flex-direction:column;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--panel);
  min-width:0;
}
.chat-thread__head{
  padding: 0.9rem 1.1rem;
  border-bottom: 1px solid var(--line);
  font-weight:600;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap: 0.8rem;
}
.btn--sm{ padding: 0.5rem 0.9rem; font-size: 0.78rem; flex-shrink:0; }
.chat-thread__messages{
  flex:1;
  overflow-y:auto;
  padding: 1rem 1.1rem;
  display:flex;
  flex-direction:column;
  gap: 0.6rem;
}
.chat-bubble{
  max-width: 72%;
  padding: 0.6rem 0.85rem;
  border-radius: 12px;
  font-size: 0.86rem;
  line-height: 1.4;
  white-space: pre-wrap;
  word-break: break-word;
}
.chat-bubble--visitor{
  align-self:flex-start;
  background: var(--panel-alt);
  border: 1px solid var(--line);
  border-bottom-left-radius: 3px;
}
.chat-bubble--agent{
  align-self:flex-end;
  background: var(--gold);
  color: var(--on-gold);
  border-bottom-right-radius: 3px;
}
.chat-bubble__meta{
  display:block;
  margin-top: 0.3rem;
  font-family: var(--mono);
  font-size: 0.62rem;
  opacity: 0.7;
}
/* ---------- Carte "rendez-vous" (formulaire envoyé depuis le panel
   admin, popup Messages) ---------- */
.chat-bubble--rdv{ max-width: 82%; background: var(--panel-alt); border: 1px solid rgba(69,184,85,0.4); color: var(--ivory); }
.rdv-card{ display:flex; flex-direction:column; gap: 0.5rem; }
.rdv-card__title{ font-weight:700; color: var(--gold-light); font-size: 0.88rem; }
.rdv-card__list{ display:flex; flex-direction:column; gap: 0.3rem; font-size: 0.82rem; }
.rdv-card__list strong{ color: var(--gold-light); font-weight:600; }
.rdv-card__pending{ font-size: 0.8rem; color: var(--muted); font-style:italic; }
.chat-thread__form{
  display:flex;
  gap: 0.7rem;
  align-items:flex-end;
  padding: 0.9rem 1.1rem;
  border-top: 1px solid var(--line);
}
.chat-thread__form[hidden]{ display:none; }
.chat-thread__form textarea{
  flex:1;
  resize: vertical;
  min-height: 42px;
  max-height: 140px;
  padding: 0.6rem 0.75rem;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: var(--bg);
  color: var(--ivory);
  font-family: var(--body);
  font-size: 0.86rem;
}
.chat-thread__form textarea:focus{ outline:none; border-color: var(--gold); }
@media (max-width: 720px){
  .chat-shell{ grid-template-columns: 1fr; height: auto; max-height: none; }
  .chat-list{ max-height: 180px; }
  .chat-thread__messages{ max-height: 320px; }
}

/* ---------- Admin: statuts d'habitation ---------- */
.status-badge{
  display:inline-flex;
  align-items:center;
  gap: 0.42rem;
  padding: 0.34rem 0.8rem 0.34rem 0.65rem;
  border-radius: 20px;
  font-family: var(--mono);
  font-size: 0.66rem;
  font-weight: 700;
  letter-spacing: 0.055em;
  text-transform: uppercase;
  border: 1px solid transparent;
  white-space: nowrap;
  line-height: 1;
}
.status-badge::before{
  content:'';
  width: 6px; height:6px;
  border-radius:50%;
  background: currentColor;
  flex-shrink:0;
  box-shadow: 0 0 6px currentColor;
}
.paiements-stack{
  display:flex;
  flex-direction: column;
  align-items:flex-start;
  gap: 0.45rem;
}
.status-badge--loyer,
.status-badge--location{
  background: rgba(94,150,201,0.14);
  border-color: rgba(94,150,201,0.4);
  color: #8FC1E8;
}
.status-badge--loa{
  background: rgba(69,184,85,0.14);
  border-color: rgba(69,184,85,0.4);
  color: var(--gold-light);
}
.status-badge--achat,
.status-badge--achete,
.status-badge--oui{
  background: rgba(97,163,110,0.14);
  border-color: rgba(97,163,110,0.4);
  color: #8FCB9C;
}
.status-badge--non{
  background: rgba(139,58,58,0.16);
  border-color: rgba(139,58,58,0.45);
  color: var(--wine-light);
}
.status-badge--neutral{
  background: rgba(155,150,140,0.12);
  border-color: rgba(155,150,140,0.35);
  color: var(--muted);
}

/* ---------- Admin: formulaire ajout/edition ---------- */
.modal__panel--form{ max-width: 560px; padding: 2rem 1.8rem; }
.modal__panel--form h3{ font-size: 1.25rem; margin-bottom: 1.4rem; }
.modal__panel--form-wide{ max-width: 780px; }
.admin-form--grid{
  display:grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem 1.2rem;
}
.admin-form--grid .admin-form__span2{ grid-column: 1 / -1; }
@media (max-width: 640px){
  .admin-form--grid{ grid-template-columns: 1fr; }
}
.admin-form{ display:flex; flex-direction:column; gap: 1rem; }
.admin-form label{ display:flex; flex-direction:column; gap: 0.5rem; font-size: 0.82rem; color: var(--muted); }
.admin-form input, .admin-form select, .admin-form textarea{
  background: var(--bg);
  border: 1px solid var(--line);
  color: var(--ivory);
  padding: 0.7rem 0.85rem;
  border-radius: 2px;
  font-family: var(--body);
  font-size: 0.92rem;
  resize: vertical;
}
.admin-form input:focus, .admin-form select:focus, .admin-form textarea:focus{ outline:none; border-color: var(--gold); }
.admin-form input:disabled{ opacity: 0.55; }
.admin-form input:read-only{ opacity: 0.6; cursor: not-allowed; }

/* ---------- Admin: popup "Horaire" ---------- */
.horaire-days{ display:flex; flex-direction:column; gap: 0.6rem; }
.horaire-day-row{
  display:grid;
  grid-template-columns: 92px auto 1fr 1fr;
  align-items:center;
  gap: 0.7rem;
  padding: 0.6rem 0.8rem;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: rgba(255,255,255,0.02);
  transition: opacity 0.15s ease;
}
.horaire-day-row .horaire-day-name{
  font-family: var(--mono);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: var(--gold-light);
}
.horaire-day-row .horaire-check{
  flex-direction: row !important;
  align-items:center;
  gap: 0.4rem !important;
  font-size: 0.82rem;
  white-space: nowrap;
}
.horaire-day-row .horaire-check input[type="checkbox"]{
  width: 16px; height: 16px; accent-color: var(--gold); cursor:pointer;
}
.horaire-day-row label{ gap: 0.3rem; }
.horaire-day-row.is-off input[type="time"]{ opacity: 0.4; pointer-events: none; }
.horaire-day-row.is-off{ opacity: 0.65; }
@media (max-width: 640px){
  .horaire-day-row{ grid-template-columns: 1fr; }
}
.admin-form__checkboxes{
  grid-column: 1 / -1;
  display:flex;
  flex-wrap: wrap;
  gap: 0.9rem 1.6rem;
  border: 1px solid var(--line);
  border-radius: 2px;
  padding: 1rem 1.1rem 1.2rem;
  margin: 0;
}
.admin-form__checkboxes legend{
  padding: 0 0.4rem;
  font-family: var(--mono);
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--gold-light);
}
.admin-form__checkbox{
  display:flex !important;
  flex-direction: row !important;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.86rem;
  color: var(--ivory);
  cursor: pointer;
}
.admin-form__checkbox input[type="checkbox"]{
  width: 16px;
  height: 16px;
  accent-color: var(--gold);
  cursor: pointer;
}
.field-hint{
  font-family: var(--mono);
  font-size: 0.72rem;
  color: var(--gold-light);
  min-height: 1em;
}
.admin-form__actions{ display:flex; gap: 0.8rem; margin-top: 0.4rem; }

/* ---------- Admin: fiche "Détails" habitation (lecture seule) ---------- */
.modal__panel--detail{ max-width: 700px; }
.detail-head{
  display:flex; align-items:center; justify-content:space-between; gap: 1rem;
  padding-right: 2.4rem;
  margin-bottom: 1.4rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--line);
}
.detail-head h3{
  font-family: var(--display); font-size: 1.25rem; font-weight:500; margin:0;
  color: var(--ivory);
}

/* Popup en orange : échéance de paiement proche (2 jours ou moins). */
.modal__panel--warning{
  border-color: var(--orange-light);
  box-shadow: 0 40px 90px -30px rgba(0,0,0,0.7), 0 0 0 1px rgba(181,112,31,0.35), 0 0 40px -10px rgba(181,112,31,0.5);
}
.modal__panel--warning::before{
  content:'';
  position:absolute;
  top:0; left:0; right:0;
  height: 3px;
  border-radius: 6px 6px 0 0;
  background: linear-gradient(90deg, transparent, var(--orange-light), transparent);
}
.modal__panel--warning .detail-head{
  border-bottom-color: rgba(181,112,31,0.45);
}
.modal__panel--warning .detail-head h3{
  color: var(--orange-light);
}
.modal__panel--warning #dValidite,
.modal__panel--warning #dJoursRestants{
  color: var(--orange-light);
  font-weight: 700;
}

/* Popup en rouge quand la validité du loyer n'est plus "Valide"
   (non payé, en attente, ou proche de l'expiration). */
.modal__panel--invalid{
  border-color: var(--wine-light);
  box-shadow: 0 40px 90px -30px rgba(0,0,0,0.7), 0 0 0 1px rgba(139,58,58,0.35), 0 0 40px -10px rgba(139,58,58,0.5);
}
.modal__panel--invalid::before{
  content:'';
  position:absolute;
  top:0; left:0; right:0;
  height: 3px;
  border-radius: 6px 6px 0 0;
  background: linear-gradient(90deg, transparent, var(--wine-light), transparent);
}
.modal__panel--invalid .detail-head{
  border-bottom-color: rgba(139,58,58,0.45);
}
.modal__panel--invalid .detail-head h3{
  color: var(--wine-light);
}
.modal__panel--invalid #dValidite{
  color: var(--wine-light);
  font-weight: 700;
}
.detail-section{ margin-bottom: 1.5rem; }
.detail-section:last-of-type{ margin-bottom: 0; }
.detail-section__title{
  font-family: var(--mono); font-size: 0.68rem; text-transform:uppercase; letter-spacing:0.08em;
  color: var(--gold-light); opacity: 0.9; margin: 0 0 0.8rem;
}
.detail-grid{
  display:grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.9rem 1.4rem;
}
.detail-item{ display:flex; flex-direction:column; gap: 0.3rem; min-width:0; }
.detail-item--span2{ grid-column: 1 / -1; }
.detail-label{ font-size: 0.72rem; color: var(--muted); }
.detail-value{
  font-size: 0.92rem; color: var(--ivory); font-weight: 500;
  word-break: break-word;
}
.detail-badges{ display:flex; flex-wrap:wrap; gap: 0.6rem; }
.detail-comment{
  font-size: 0.9rem; color: var(--ivory); line-height:1.6;
  background: var(--bg); border: 1px solid var(--line); border-radius: 4px;
  padding: 0.9rem 1rem; margin:0; white-space: pre-wrap;
}
.detail-divider{ border:none; border-top:1px solid var(--line); margin: 0.9rem 0; }
@media (max-width: 640px){
  .detail-grid{ grid-template-columns: 1fr; }
}

/* ---------- Footer: lien admin discret ---------- */
.footer__admin{ opacity: 0.55; }
.footer__admin:hover{ opacity: 1; }

/* ---------- Admin: page isolée (aucun élément du site visible avant connexion) ---------- */
.admin-body{ min-height: 100vh; }
.admin-login--standalone{
  min-height: 100vh;
  padding: 3rem 1.5rem;
}
.admin-login__back{
  display:inline-flex;
  margin: 0 0 1.8rem;
  padding: 0.5rem 1rem;
  font-size: 0.82rem;
}
.admin-login__brand{
  margin-bottom: 2.2rem;
  margin-right: 0;
  display: flex;
}

/* ---------- Admin: bandeau après connexion ---------- */
.admin-bar{
  position: sticky;
  top: 0;
  z-index: 40;
  display:flex;
  align-items:center;
  justify-content:space-between;
  padding: 1rem 1.5rem;
  background: rgba(20,23,27,0.9);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.admin-bar__brand{ margin-right:0; }
.admin-bar__brand .brand__logo{ height: 30px; }
.admin-bar .brand__word{ font-size: 0.85rem; }
.admin-bar__right{ display:flex; align-items:center; gap: 1rem; }
.admin-bar__user{ display:flex; align-items:center; gap: 0.6rem; }
.admin-bar__user-name{ font-size: 0.85rem; color: var(--muted); }
@media (max-width: 640px){ .admin-bar__user-name{ display:none; } }

/* ---------- Admin: grades employés ---------- */
.status-badge--operateur{
  background: rgba(139,58,58,0.16);
  border-color: rgba(139,58,58,0.45);
  color: var(--wine-light);
}
.status-badge--pdg{
  background: rgba(69,184,85,0.16);
  border-color: rgba(69,184,85,0.45);
  color: var(--gold-light);
}
.status-badge--co-pdg{
  background: rgba(94,150,201,0.14);
  border-color: rgba(94,150,201,0.4);
  color: #8FC1E8;
}
.status-badge--district-manager{
  background: rgba(150,110,201,0.14);
  border-color: rgba(150,110,201,0.4);
  color: #C5A6E8;
}
.status-badge--manager{
  background: rgba(201,120,150,0.14);
  border-color: rgba(201,120,150,0.4);
  color: #E8A6C0;
}
.status-badge--promoteur-immo{
  background: rgba(97,163,110,0.14);
  border-color: rgba(97,163,110,0.4);
  color: #8FCB9C;
}
.status-badge--conseiller-immo{
  background: rgba(201,150,94,0.14);
  border-color: rgba(201,150,94,0.4);
  color: #E0B98A;
}
.status-badge--stagiaire{
  background: rgba(155,150,140,0.14);
  border-color: rgba(155,150,140,0.4);
  color: var(--muted);
}
.status-badge--impots{
  background: rgba(94,201,180,0.14);
  border-color: rgba(94,201,180,0.4);
  color: #7FE0CB;
}
.status-badge--actif{
  background: rgba(97,163,110,0.14);
  border-color: rgba(97,163,110,0.4);
  color: #8FCB9C;
}
.status-badge--inactif{
  background: rgba(139,58,58,0.16);
  border-color: rgba(139,58,58,0.45);
  color: var(--wine-light);
}

/* ---------- Admin: matrice de permissions ---------- */
.perm-badges{
  display:flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}
.perm-badge{
  display:inline-flex;
  align-items:center;
  padding: 0.3rem 0.65rem;
  border-radius: 20px;
  font-family: var(--mono);
  font-size: 0.65rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  border: 1px solid transparent;
  white-space: nowrap;
}
.perm-badge--edit{
  background: rgba(97,163,110,0.14);
  border-color: rgba(97,163,110,0.4);
  color: #8FCB9C;
}
.perm-badge--view{
  background: rgba(69,184,85,0.14);
  border-color: rgba(69,184,85,0.4);
  color: var(--gold-light);
}
.perm-badge--none{
  background: rgba(139,58,58,0.16);
  border-color: rgba(139,58,58,0.45);
  color: var(--wine-light);
}
.admin-form__grid-inner{
  display:grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem 1.2rem;
}
@media (max-width: 640px){
  .admin-form__grid-inner{ grid-template-columns: 1fr; }
}

/* ---------- Photos des biens ---------- */
.modal__visual{ padding: 0; overflow:hidden; }
.modal__visual svg{ padding: 2rem 2rem 0.5rem; width:100%; height:auto; }
.modal-gallery__main{ width:100%; height: 360px; object-fit:cover; display:block; }
.modal-gallery__thumbs{ display:flex; gap:0.55rem; padding: 0.8rem; overflow-x:auto; background: rgba(11,10,8,0.5); }
.modal-gallery__thumb{
  flex-shrink:0;
  width: 68px; height: 52px;
  border-radius: 3px;
  overflow:hidden;
  border: 1px solid var(--line);
  cursor:pointer;
  padding:0;
  opacity:0.55;
  transition: opacity 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}
.modal-gallery__thumb img{ width:100%; height:100%; object-fit:cover; display:block; }
.modal-gallery__thumb.is-active,
.modal-gallery__thumb:hover{ opacity:1; border-color: var(--gold-light); transform: translateY(-1px); }

/* ---------- Admin: grille de prévisualisation des photos ---------- */
.admin-form__hint{ font-size: 0.8rem; color: var(--gold-light); min-height: 1.1rem; }
.admin-photo-grid{
  display:grid;
  grid-template-columns: repeat(auto-fill, minmax(84px, 1fr));
  gap: 0.6rem;
}
.admin-photo-grid__item{
  position:relative;
  aspect-ratio: 4/3;
  border-radius: 3px;
  overflow:hidden;
  border: 1px solid var(--line);
}
.admin-photo-grid__item img{ width:100%; height:100%; object-fit:cover; display:block; }
.admin-photo-grid__remove{
  position:absolute;
  top:4px; right:4px;
  width:22px; height:22px;
  border-radius:50%;
  border:none;
  background: rgba(6,8,7,0.85);
  color: var(--on-dark);
  font-size:1rem;
  line-height:1;
  cursor:pointer;
}
.admin-photo-grid__remove:hover{ background: var(--gold-light); color: var(--on-gold); }
/* ---------- Admin: Calculateur Prime & Commission ---------- */
.prime-table{ min-width: 1020px; }
.prime-table thead th:first-child{ min-width: 90px; }

.prime-table__group-row td{
  border: none;
  background: transparent;
  padding: 1.1rem 0.4rem 0.4rem;
}
.prime-table tbody tr.prime-table__group-row:hover{
  background: transparent;
  box-shadow: none;
  transform: none;
}
.prime-table__group-head{
  display:flex; align-items:center; justify-content:space-between;
  gap: 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--line);
  font-family: var(--mono); font-size: 0.72rem; text-transform:uppercase; letter-spacing:0.08em;
  color: var(--gold-light);
}
.prime-table__group-head .btn--link{ text-transform:none; letter-spacing:normal; font-family: var(--body); }

/* ---------- Admin: Archive (regroupée par propriétaire) ---------- */
.archive-table__group-row td{
  border: none;
  background: transparent;
  padding: 1.1rem 0.4rem 0.4rem;
}
.archive-table tbody tr.archive-table__group-row:hover{
  background: transparent;
  box-shadow: none;
  transform: none;
}
.archive-table__group-head{
  display:flex; align-items:center; justify-content:space-between;
  gap: 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--line);
  font-family: var(--mono); font-size: 0.72rem; text-transform:uppercase; letter-spacing:0.08em;
  color: var(--gold-light);
}

.prime-table__emp{ font-weight: 700; }

/* Couleurs par employé, façon tableur (pastel, en pastille sur la
   première lettre de la cellule "Employé"). */
.prime-table__row--violet td:nth-child(2){ color: #C9A6E6; }
.prime-table__row--vert td:nth-child(2){ color: #8FCB9C; }
.prime-table__row--orange td:nth-child(2){ color: var(--orange-light); }
.prime-table__row--bleu td:nth-child(2){ color: #8FC1E8; }
.prime-table__row--rose td:nth-child(2){ color: #E6A0B8; }
.prime-table__row--jaune td:nth-child(2){ color: var(--gold-light); }

.prime-input-wrap{
  display:inline-flex; align-items:center; gap: 0.3rem;
  color: var(--muted); font-size: 0.8rem;
}
.prime-input{
  width: 90px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 0.4rem 0.5rem;
  color: var(--ivory);
  font-family: var(--body);
  font-size: 0.85rem;
  font-variant-numeric: tabular-nums;
}
.prime-input:focus{ outline: none; border-color: var(--gold-light); }
.prime-input:disabled{ opacity: 0.6; }
.prime-input::-webkit-outer-spin-button,
.prime-input::-webkit-inner-spin-button{ opacity: 0.4; }

.prime-total{
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  color: #8FCB9C;
}

.prime-checkbox{
  width: 20px; height: 20px;
  accent-color: var(--gold);
  cursor: pointer;
}
.prime-checkbox:disabled{ cursor: default; opacity: 0.6; }s