/* =========================================================================
   Mes Immo / Mes VO — feuille de style unique, partagée par mesimmo.fr
   et mesvo.fr. Charte graphique Ubiflow (refonte du 26 mai 2026) :
   vert sapin foncé #03323A, vert vif #00CC73, fond crème #FBFCF7,
   texte gris ardoise #6A6D77, typographie Plus Jakarta Sans.
   ========================================================================= */

:root {
  --color-bg: #FBFCF7;
  --color-surface: #FFFFFF;
  --color-primary-dark: #03323A;
  --color-primary: #00CC73;
  --color-primary-dark-hover: #014b57;
  --color-primary-hover: #00b366;
  --color-text: #6A6D77;
  --color-text-strong: #03323A;
  --color-border: #E7E9DF;

  --radius-sm: 8px;
  --radius-md: 10px;
  --radius-lg: 12px;

  --font-sans: "Plus Jakarta Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;

  --container-width: 1180px;
  --shadow-card: 0 1px 2px rgba(3, 50, 58, 0.06), 0 8px 24px rgba(3, 50, 58, 0.06);
  --shadow-card-hover: 0 4px 10px rgba(3, 50, 58, 0.08), 0 16px 32px rgba(3, 50, 58, 0.10);
}

/* ---------- Reset & base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font-sans);
  font-weight: 400;
  color: var(--color-text);
  background: var(--color-bg);
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; margin: 0; padding: 0; }
h1, h2, h3, h4 {
  font-weight: 700;
  color: var(--color-text-strong);
  margin: 0 0 0.5em;
  line-height: 1.2;
}
p { margin: 0 0 1em; }
button { font-family: inherit; }

.container {
  width: 100%;
  max-width: var(--container-width);
  margin: 0 auto;
  padding: 0 24px;
}

.visually-hidden {
  position: absolute;
  width: 1px; height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

/* Focus visibility for accessibility */
a:focus-visible, button:focus-visible, input:focus-visible, textarea:focus-visible {
  outline: 3px solid var(--color-primary);
  outline-offset: 2px;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 13px 26px;
  border-radius: var(--radius-md);
  font-weight: 700;
  font-size: 0.95rem;
  border: 2px solid transparent;
  cursor: pointer;
  transition: transform 0.15s ease, background-color 0.15s ease, box-shadow 0.15s ease;
  white-space: nowrap;
}
.btn:hover { transform: translateY(-1px); }
.btn-icon { width: 18px; height: 18px; flex-shrink: 0; }
.btn-primary {
  background: var(--color-primary);
  color: #fff;
}
.btn-primary:hover { background: var(--color-primary-hover); }
.btn-outline {
  background: transparent;
  border-color: var(--color-primary-dark);
  color: var(--color-primary-dark);
}
.btn-outline:hover { background: var(--color-primary-dark); color: #fff; }
.btn-block { width: 100%; }
.btn-sm { padding: 9px 18px; font-size: 0.85rem; }

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(251, 252, 247, 0.92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--color-border);
}
.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  height: 76px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  font-weight: 800;
  font-size: 1.25rem;
  color: var(--color-primary-dark);
}
.brand-badge {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  overflow: hidden;
  flex-shrink: 0;
}
.brand-badge img { width: 100%; height: 100%; object-fit: cover; display: block; }

.main-nav {
  display: flex;
  align-items: center;
  gap: 28px;
}
.main-nav a {
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--color-text-strong);
}
.main-nav a:hover { color: var(--color-primary); }
.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
}
.nav-toggle svg { width: 26px; height: 26px; color: var(--color-primary-dark); }

/* ---------- Hero ---------- */
.hero {
  padding: 72px 0 56px;
  text-align: center;
}
.hero-switch {
  display: inline-flex;
  gap: 8px;
  margin-bottom: 20px;
}
.hero-switch-option {
  display: inline-block;
  background: rgba(0, 204, 115, 0.12);
  color: var(--color-primary-dark);
  font-weight: 700;
  font-size: 0.8rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 6px 16px;
  border-radius: 999px;
  transition: background-color 0.15s ease, color 0.15s ease;
}
.hero-switch-option:hover { background: rgba(0, 204, 115, 0.22); }
.hero-switch-option.is-active {
  background: var(--color-primary);
  color: #fff;
  cursor: default;
  pointer-events: none;
}
.hero h1 {
  font-size: clamp(1.8rem, 4vw, 2.75rem);
  max-width: 780px;
  margin-left: auto;
  margin-right: auto;
}
.hero p {
  max-width: 620px;
  margin: 16px auto 32px;
  font-size: 1.05rem;
}
.hero-actions {
  display: flex;
  gap: 14px;
  justify-content: center;
  flex-wrap: wrap;
}

/* ---------- Listings grid ---------- */
.listings {
  padding: 40px 0 72px;
}
.section-heading {
  text-align: center;
  max-width: 620px;
  margin: 0 auto 40px;
}
.section-heading h2 { font-size: clamp(1.5rem, 3vw, 2rem); }

.listings-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 20px;
}
.listings-status {
  grid-column: 1 / -1;
  text-align: center;
  margin: 12px 0;
  color: var(--color-text);
  font-weight: 500;
}
@media (max-width: 1080px) {
  .listings-grid { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 720px) {
  .listings-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 460px) {
  .listings-grid { grid-template-columns: 1fr; }
}

.listing-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-card);
  transition: transform 0.18s ease, box-shadow 0.18s ease;
  display: flex;
  flex-direction: column;
}
.listing-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-card-hover);
}
.listing-photo-link {
  display: block;
  position: relative;
  aspect-ratio: 4 / 3;
  background: var(--color-border);
  overflow: hidden;
}
.listing-photo-link img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.35s ease;
}
.listing-card:hover .listing-photo-link img { transform: scale(1.05); }
.listing-price-tag {
  position: absolute;
  top: 10px;
  left: 10px;
  background: var(--color-primary-dark);
  color: #fff;
  font-weight: 700;
  font-size: 0.85rem;
  padding: 5px 12px;
  border-radius: var(--radius-sm);
}
.listing-body {
  padding: 14px 16px 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  flex: 1;
}
.listing-type {
  font-weight: 700;
  color: var(--color-text-strong);
  font-size: 0.98rem;
}
.listing-meta {
  font-size: 0.85rem;
  color: var(--color-text);
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}
.listing-meta span:not(:last-child)::after {
  content: "·";
  margin-left: 6px;
  color: var(--color-border);
}
.listing-cta {
  margin-top: auto;
}

/* ---------- CTA download section ---------- */
.cta-section {
  background: var(--color-primary-dark);
  color: #EAF3EF;
  padding: 64px 0;
}
.cta-card {
  max-width: 720px;
  margin: 0 auto;
  text-align: center;
}
.cta-card h2 { color: #fff; }
.cta-card p { color: #C9DCD5; font-size: 1.02rem; }
.cta-example {
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: var(--radius-md);
  padding: 14px 18px;
  font-style: italic;
  color: #EAF3EF;
  margin: 0 auto 32px;
  max-width: 520px;
}
.cta-steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin: 32px 0 36px;
  text-align: left;
}
@media (max-width: 720px) { .cta-steps { grid-template-columns: 1fr; } }
.cta-step {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--radius-md);
  padding: 18px;
}
.cta-step-number {
  width: 28px; height: 28px;
  border-radius: 50%;
  background: var(--color-primary);
  color: #fff;
  font-weight: 800;
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 10px;
  font-size: 0.9rem;
}
.cta-step p { color: #DCEAE4; font-size: 0.9rem; margin-bottom: 0; }
.cta-links {
  display: flex;
  gap: 14px;
  justify-content: center;
  flex-wrap: wrap;
}
.cta-links .btn-outline {
  border-color: rgba(255, 255, 255, 0.5);
  color: #fff;
}
.cta-links .btn-outline:hover { background: #fff; color: var(--color-primary-dark); }
.cta-links .btn { padding-top: 8px; padding-bottom: 8px; gap: 12px; }
.cta-links .btn-icon { width: 36px; height: 36px; }

/* ---------- Generic content sections (legal / doc / support pages) ---------- */
.page-header {
  padding: 56px 0 32px;
  text-align: center;
}
.page-header p { max-width: 640px; margin: 0 auto; }

.content-section {
  padding: 0 0 64px;
}
.content-card {
  max-width: 820px;
  margin: 0 auto;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 40px clamp(20px, 5vw, 48px);
  box-shadow: var(--shadow-card);
}
.content-card h2 {
  font-size: 1.15rem;
  margin-top: 2em;
}
.content-card h2:first-child { margin-top: 0; }
.content-card ul { padding-left: 1.2em; list-style: disc; margin-bottom: 1em; }
.content-card li { margin-bottom: 0.4em; }
.content-card .legal-meta {
  color: var(--color-text);
  font-size: 0.9rem;
  margin-top: -0.5em;
}
.content-card table {
  width: 100%;
  border-collapse: collapse;
  margin: 4px 0 24px;
  font-size: 0.92rem;
}
.content-card table th,
.content-card table td {
  text-align: left;
  padding: 10px 14px;
  border-bottom: 1px solid var(--color-border);
  vertical-align: top;
}
.content-card table th {
  width: 38%;
  color: var(--color-text-strong);
  font-weight: 700;
}

/* ---------- Documentation page ---------- */
.assistant-tabs {
  display: flex;
  gap: 10px;
  justify-content: center;
  margin-bottom: 32px;
  flex-wrap: wrap;
}
.assistant-tabs button {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  padding: 10px 22px;
  border-radius: 999px;
  font-weight: 700;
  color: var(--color-text-strong);
  cursor: pointer;
}
.assistant-tabs button[aria-selected="true"] {
  background: var(--color-primary-dark);
  border-color: var(--color-primary-dark);
  color: #fff;
}
.assistant-panel { display: none; }
.assistant-panel.is-active { display: block; }

.doc-steps { display: flex; flex-direction: column; gap: 20px; }
.doc-step {
  display: flex;
  gap: 18px;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 22px;
  box-shadow: var(--shadow-card);
}
.doc-step-number {
  flex-shrink: 0;
  width: 36px; height: 36px;
  border-radius: 50%;
  background: rgba(0, 204, 115, 0.14);
  color: var(--color-primary-dark);
  font-weight: 800;
  display: flex; align-items: center; justify-content: center;
}
.doc-step-body h3 { font-size: 1rem; margin-bottom: 6px; }
.doc-step-body p { margin-bottom: 12px; font-size: 0.95rem; }
.doc-screenshot {
  border: 2px dashed var(--color-border);
  border-radius: var(--radius-md);
  padding: 28px 16px;
  text-align: center;
  color: var(--color-text);
  font-size: 0.85rem;
  background: #FAFBF6;
}

/* ---------- Support / contact form ---------- */
.support-form {
  max-width: 620px;
  margin: 0 auto;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: clamp(24px, 5vw, 40px);
  box-shadow: var(--shadow-card);
}
.form-row { margin-bottom: 20px; }
.form-row-group {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
@media (max-width: 560px) { .form-row-group { grid-template-columns: 1fr; } }
label {
  display: block;
  font-weight: 700;
  font-size: 0.9rem;
  color: var(--color-text-strong);
  margin-bottom: 6px;
}
input, textarea {
  width: 100%;
  font-family: inherit;
  font-size: 0.95rem;
  color: var(--color-text-strong);
  padding: 12px 14px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  background: #fff;
}
textarea { resize: vertical; min-height: 140px; }
input:focus, textarea:focus {
  border-color: var(--color-primary);
}
.form-note {
  font-size: 0.82rem;
  margin-top: 16px;
  color: var(--color-text);
}
.form-feedback {
  display: none;
  margin-bottom: 20px;
  padding: 14px 16px;
  border-radius: var(--radius-sm);
  background: rgba(0, 204, 115, 0.12);
  color: var(--color-primary-dark);
  font-weight: 600;
  font-size: 0.9rem;
}
.form-feedback.is-visible { display: block; }
.form-feedback.is-error {
  background: rgba(220, 53, 69, 0.12);
  color: #a71d2a;
}

/* ---------- Footer ---------- */
.site-footer {
  background: var(--color-primary-dark);
  color: #C9DCD5;
  padding: 48px 0 28px;
}
.footer-grid {
  display: flex;
  justify-content: space-between;
  gap: 32px;
  flex-wrap: wrap;
  padding-bottom: 28px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}
.footer-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  font-weight: 800;
  font-size: 1.1rem;
  color: #fff;
}
.footer-brand .brand-badge { background: var(--color-primary); }
.footer-tagline {
  color: #9FBBB0;
  font-size: 0.88rem;
  margin-top: 8px;
  max-width: 260px;
}
.footer-links {
  display: flex;
  gap: 48px;
  flex-wrap: wrap;
}
.footer-links h4 {
  color: #fff;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 14px;
}
.footer-links ul { display: flex; flex-direction: column; gap: 10px; }
.footer-links a { font-size: 0.92rem; color: #C9DCD5; }
.footer-links a:hover { color: #fff; }
.footer-bottom {
  padding-top: 22px;
  display: flex;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  font-size: 0.82rem;
  color: #8FADA2;
}

/* ---------- Mobile nav ---------- */
@media (max-width: 780px) {
  .main-nav {
    position: absolute;
    top: 76px;
    left: 0;
    right: 0;
    background: var(--color-bg);
    border-bottom: 1px solid var(--color-border);
    flex-direction: column;
    align-items: flex-start;
    padding: 20px 24px 28px;
    gap: 18px;
    display: none;
  }
  .main-nav.is-open { display: flex; }
  .nav-toggle { display: inline-flex; }
}
