/* ============================================================
   MKTJ Marchand de Biens — Charte Vert Patrimoine
   ============================================================ */

/* ── Variables ── */
:root {
  /* Couleurs principales */
  --vert-profond: #2D5F4A;
  --vert-clair: #3A7A5E;
  --or-chaud: #D4A76A;
  --or-clair: #E8C88A;
  --creme: #F5F2EC;
  --blanc: #FAFAF7;
  --gris-texte: #8B8470;
  --gris-clair: #eef1f5;
  --texte: #2c3e50;

  /* Typographie */
  --font-titre: 'Montserrat', Arial, sans-serif;
  --font-corps: 'Lora', Georgia, serif;

  /* Espacements */
  --section-py: 80px;
  --container-max: 1140px;
  --container-px: 20px;

  /* Transitions */
  --transition: 0.3s ease;
}

/* ── Reset & Base ── */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: var(--font-corps);
  color: var(--texte);
  background: var(--blanc);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

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

a {
  color: var(--vert-profond);
  text-decoration: none;
  transition: color var(--transition);
}

a:hover {
  color: var(--or-chaud);
}

/* ── Container ── */
.container {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 var(--container-px);
}

.container-narrow {
  max-width: 820px;
  margin: 0 auto;
  padding: 0 var(--container-px);
}

/* ── Typographie ── */
h1, h2, h3, h4 {
  font-family: var(--font-titre);
  font-weight: 700;
  color: var(--vert-profond);
  line-height: 1.2;
}

h1 { font-size: clamp(2rem, 5vw, 3rem); }
h2 { font-size: clamp(1.5rem, 3vw, 2rem); margin-bottom: 1rem; }
h3 { font-size: 1.25rem; }

.lead {
  font-size: 1.15rem;
  color: var(--gris-texte);
  max-width: 700px;
}

/* ── Boutons ── */
.btn {
  display: inline-block;
  padding: 14px 32px;
  font-family: var(--font-titre);
  font-weight: 600;
  font-size: 0.9rem;
  letter-spacing: 1px;
  text-transform: uppercase;
  border-radius: 4px;
  border: 2px solid transparent;
  cursor: pointer;
  transition: all var(--transition);
}

.btn-primary {
  background: var(--or-chaud);
  color: var(--vert-profond);
  border-color: var(--or-chaud);
}

.btn-primary:hover {
  background: transparent;
  color: var(--or-chaud);
}

.btn-outline {
  background: transparent;
  color: var(--vert-profond);
  border-color: var(--vert-profond);
}

.btn-outline:hover {
  background: var(--vert-profond);
  color: white;
}

/* ── Header ── */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: white;
  border-bottom: 1px solid var(--gris-clair);
  box-shadow: 0 1px 8px rgba(0, 0, 0, 0.04);
}

.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 80px;
}

.site-header .logo img {
  height: 50px;
  width: auto;
}

.main-nav ul {
  display: flex;
  list-style: none;
  gap: 32px;
}

.main-nav a {
  font-family: var(--font-titre);
  font-weight: 600;
  font-size: 0.85rem;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--texte);
  padding: 8px 0;
  position: relative;
}

.main-nav a::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--or-chaud);
  transition: width var(--transition);
}

.main-nav a:hover::after,
.main-nav a.active::after {
  width: 100%;
}

.main-nav a.active {
  color: var(--vert-profond);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 16px;
}

.lang-switch {
  font-family: var(--font-titre);
  font-weight: 700;
  font-size: 0.8rem;
  letter-spacing: 2px;
  color: var(--or-chaud);
  border: 1px solid var(--or-chaud);
  padding: 4px 12px;
  border-radius: 3px;
}

.lang-switch:hover {
  background: var(--or-chaud);
  color: white;
}

/* Burger (mobile) */
.burger {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
}

.burger span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--vert-profond);
  transition: all var(--transition);
}

/* ── Hero ── */
.hero {
  background: linear-gradient(135deg, var(--vert-profond) 0%, var(--vert-clair) 50%, var(--vert-profond) 100%);
  color: white;
  padding: 120px 0 100px;
  text-align: center;
  position: relative;
}

.hero::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--or-chaud), var(--vert-profond));
}

.hero h1 {
  color: white;
  font-size: clamp(2.5rem, 6vw, 3.5rem);
  margin-bottom: 16px;
}

.hero .hero-subline {
  font-family: var(--font-titre);
  font-weight: 300;
  font-size: 1.2rem;
  color: var(--or-clair);
  letter-spacing: 1px;
  margin-bottom: 40px;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

.hero .btn-primary {
  font-size: 1rem;
}

/* ── Page Header ── */
.page-header {
  background: var(--creme);
  padding: 60px 0 50px;
  border-bottom: 3px solid var(--or-chaud);
}

.page-header h1 {
  margin-bottom: 12px;
}

/* ── Sections ── */
.section {
  padding: var(--section-py) 0;
}

.section + .section {
  border-top: 1px solid var(--gris-clair);
}

/* ── Values Grid ── */
.values-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 40px;
  margin-top: 40px;
}

.value-card {
  text-align: center;
  padding: 40px 24px;
  border: 1px solid var(--gris-clair);
  border-radius: 8px;
  transition: box-shadow var(--transition);
}

.value-card:hover {
  box-shadow: 0 8px 24px rgba(45, 95, 74, 0.08);
}

.value-icon {
  display: inline-flex;
  color: var(--or-chaud);
  margin-bottom: 4px;
}

.value-card h3 {
  margin: 16px 0 8px;
}

.value-card p {
  color: var(--gris-texte);
  font-size: 0.95rem;
}

/* ── Projects Grid ── */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 32px;
}

.project-card {
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid var(--gris-clair);
  transition: box-shadow var(--transition);
}

.project-card:hover {
  box-shadow: 0 8px 24px rgba(45, 95, 74, 0.08);
}

.project-card a {
  color: inherit;
  text-decoration: none;
  display: block;
}

.project-card img {
  width: 100%;
  height: 220px;
  object-fit: cover;
}

.project-thumb-placeholder {
  width: 100%;
  height: 220px;
  background: linear-gradient(135deg, var(--vert-profond) 0%, var(--vert-clair) 50%, var(--vert-profond) 100%);
  position: relative;
}

.project-thumb-placeholder::after {
  content: 'MKTJ';
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-titre);
  font-weight: 800;
  font-size: 2rem;
  letter-spacing: 8px;
  color: rgba(232, 200, 138, 0.4);
}

.project-card-body {
  padding: 24px;
}

.project-card-body h3 {
  margin-bottom: 8px;
}

.project-meta {
  font-family: var(--font-titre);
  font-size: 0.78rem;
  color: var(--gris-texte);
  letter-spacing: 0.5px;
  margin-bottom: 12px;
  text-transform: uppercase;
}

.project-description {
  color: var(--gris-texte);
  font-size: 0.95rem;
  margin-bottom: 16px;
  line-height: 1.6;
}

.project-link {
  display: inline-block;
  font-family: var(--font-titre);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--or-chaud);
  transition: transform var(--transition);
}

.project-card:hover .project-link {
  transform: translateX(4px);
}

.project-status {
  display: inline-block;
  font-family: var(--font-titre);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 2px;
  text-transform: uppercase;
  padding: 4px 12px;
  border-radius: 20px;
  margin-bottom: 12px;
}

.project-status.in-progress {
  background: var(--or-chaud);
  color: var(--vert-profond);
}

.project-status.completed {
  background: var(--vert-profond);
  color: white;
}

.coming-soon {
  grid-column: 1 / -1;
  text-align: center;
  padding: 60px 20px;
  color: var(--gris-texte);
  font-style: italic;
  font-size: 1.1rem;
}

/* ── Project Detail ── */
.back-link {
  display: inline-block;
  font-family: var(--font-titre);
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 1px;
  color: var(--vert-profond);
  margin-bottom: 16px;
}

.back-link:hover {
  color: var(--or-chaud);
}

.page-header .project-status {
  margin-top: 12px;
}

.project-meta-list {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0;
  padding: 28px 32px;
  background: var(--creme);
  border-radius: 8px;
  border-left: 4px solid var(--or-chaud);
  margin-bottom: 48px;
}

.project-meta-list > div + div {
  border-left: 1px solid var(--gris-clair);
  padding-left: 28px;
}

.project-meta-list dt {
  font-family: var(--font-titre);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--gris-texte);
  margin-bottom: 6px;
}

.project-meta-list dd {
  font-family: var(--font-corps);
  font-size: 1.1rem;
  color: var(--vert-profond);
  font-weight: 600;
}

.project-details {
  line-height: 1.8;
}

.project-details .lead {
  margin-bottom: 20px;
}

.project-details p + p {
  margin-top: 16px;
}

/* ── Contact ── */
.contact-grid {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 60px;
  align-items: start;
}

.contact-form label {
  display: block;
  font-family: var(--font-titre);
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--vert-profond);
  margin-bottom: 6px;
  letter-spacing: 0.5px;
}

.contact-form .label-optional {
  color: var(--gris-texte);
  font-weight: 400;
  font-size: 0.8rem;
  letter-spacing: 0;
}

.contact-form input,
.contact-form select,
.contact-form textarea {
  width: 100%;
  padding: 12px 16px;
  border: 1px solid var(--gris-clair);
  border-radius: 4px;
  font-family: var(--font-corps);
  font-size: 1rem;
  margin-bottom: 20px;
  background: white;
  color: var(--texte);
  transition: border-color var(--transition), box-shadow var(--transition);
}

.contact-form input:focus,
.contact-form select:focus,
.contact-form textarea:focus {
  outline: none;
  border-color: var(--or-chaud);
  box-shadow: 0 0 0 3px rgba(212, 167, 106, 0.15);
}

.contact-form .is-invalid {
  border-color: #c0392b;
  background: #fdf5f4;
}

.contact-form textarea {
  min-height: 150px;
  resize: vertical;
}

.contact-form .btn {
  margin-top: 8px;
}

/* Honeypot anti-spam : invisible à l'humain et au lecteur d'écran */
.honeypot {
  position: absolute;
  left: -10000px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.form-banner {
  padding: 16px 20px;
  border-radius: 4px;
  margin-bottom: 24px;
  font-size: 0.95rem;
  line-height: 1.5;
  border-left: 4px solid;
}

.form-banner-success {
  background: #eaf5ef;
  border-color: var(--vert-clair);
  color: var(--vert-profond);
}

.form-banner-error {
  background: #fdf5f4;
  border-color: #c0392b;
  color: #922b21;
}

.form-privacy {
  margin-top: 16px;
  font-size: 0.8rem;
  color: var(--gris-texte);
  line-height: 1.5;
}

.form-privacy a {
  color: var(--or-chaud);
  text-decoration: underline;
}

.contact-info h3 {
  margin-bottom: 16px;
  color: var(--or-chaud);
}

.contact-info p {
  margin-bottom: 8px;
  color: var(--gris-texte);
}

.contact-info a {
  color: var(--vert-profond);
}

/* ── Footer ── */
.site-footer {
  background: var(--vert-profond);
  color: var(--creme);
  padding: 60px 0 0;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 40px;
  padding-bottom: 40px;
}

.footer-brand img {
  margin-bottom: 16px;
}

.footer-brand p {
  font-size: 0.9rem;
  opacity: 0.7;
}

.footer-nav ul {
  list-style: none;
}

.footer-nav a {
  color: var(--creme);
  font-family: var(--font-titre);
  font-size: 0.85rem;
  display: block;
  padding: 4px 0;
}

.footer-nav a:hover {
  color: var(--or-chaud);
}

.footer-contact p {
  font-size: 0.9rem;
  margin-bottom: 4px;
  opacity: 0.8;
}

.footer-contact a {
  color: var(--or-chaud);
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding: 20px 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.8rem;
  opacity: 0.6;
}

.footer-bottom a {
  color: var(--creme);
}

/* ── Legal ── */
.legal-content h2 {
  margin-top: 2rem;
}

.legal-content p {
  margin-bottom: 1rem;
}

/* ── 404 ── */
.section-404 h1 {
  font-size: 3rem;
  margin-bottom: 16px;
}

/* ── Responsive ── */
@media (max-width: 768px) {
  :root {
    --section-py: 50px;
  }

  .main-nav {
    display: none;
    position: absolute;
    top: 80px;
    left: 0;
    right: 0;
    background: white;
    border-bottom: 2px solid var(--or-chaud);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
  }

  .main-nav.open {
    display: block;
  }

  .main-nav ul {
    flex-direction: column;
    gap: 0;
    padding: 16px 0;
  }

  .main-nav a {
    display: block;
    padding: 12px 24px;
  }

  .burger {
    display: flex;
  }

  .values-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .contact-grid {
    grid-template-columns: 1fr;
    gap: 40px;
  }

  .footer-grid {
    grid-template-columns: 1fr;
    gap: 30px;
  }

  .project-meta-list {
    grid-template-columns: 1fr;
    gap: 16px;
    padding: 20px 24px;
  }

  .project-meta-list > div + div {
    border-left: none;
    border-top: 1px solid var(--gris-clair);
    padding-left: 0;
    padding-top: 16px;
  }

  .footer-bottom {
    flex-direction: column;
    gap: 8px;
    text-align: center;
  }

  .hero {
    padding: 80px 0 60px;
  }
}

@media (max-width: 480px) {
  .site-header .container {
    height: 64px;
  }

  .site-header .logo img {
    height: 36px;
  }

  .projects-grid {
    grid-template-columns: 1fr;
  }
}

/* ── Project detail : hero, avancement chantier & galerie ── */
.section-alt {
  background: var(--creme);
}

.section + .section-alt {
  border-top: 1px solid var(--gris-clair);
}

.section-title {
  font-family: var(--font-titre);
  color: var(--vert-profond);
  font-size: 1.75rem;
  margin-bottom: 40px;
}

.section-title::after {
  content: "";
  display: block;
  width: 56px;
  height: 3px;
  margin-top: 12px;
  background: var(--or-chaud);
  border-radius: 2px;
}

.project-hero {
  margin: 0 0 40px;
}

.project-hero img {
  width: 100%;
  max-height: 480px;
  object-fit: cover;
  border-radius: 8px;
  display: block;
}

.phase-timeline {
  list-style: none;
  margin: 0;
  padding: 0;
}

.phase {
  position: relative;
  padding: 0 0 48px 36px;
}

.phase::before {
  content: "";
  position: absolute;
  left: 8px;
  top: 6px;
  bottom: 0;
  width: 2px;
  background: var(--gris-clair);
}

.phase:last-child {
  padding-bottom: 0;
}

.phase:last-child::before {
  display: none;
}

.phase-marker {
  position: absolute;
  left: 0;
  top: 4px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--blanc);
  border: 3px solid var(--gris-texte);
}

.phase-done .phase-marker {
  background: var(--vert-profond);
  border-color: var(--vert-profond);
}

.phase-current .phase-marker {
  background: var(--or-chaud);
  border-color: var(--or-chaud);
  box-shadow: 0 0 0 5px rgba(212, 167, 106, 0.25);
}

.phase-date {
  font-family: var(--font-titre);
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--gris-texte);
  margin-bottom: 6px;
}

.phase-status {
  display: inline-block;
  margin-left: 10px;
  padding: 2px 10px;
  border-radius: 999px;
  font-size: 0.75rem;
  letter-spacing: 0.04em;
  background: var(--gris-clair);
  color: var(--texte);
}

.phase-current .phase-status {
  background: var(--or-chaud);
  color: #fff;
}

.phase-done .phase-status {
  background: var(--vert-profond);
  color: #fff;
}

.phase-content h3 {
  font-family: var(--font-titre);
  color: var(--vert-profond);
  font-size: 1.25rem;
  margin-bottom: 10px;
}

.phase-gallery {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin-top: 24px;
}

.phase-gallery figure {
  margin: 0;
}

.phase-gallery img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: 6px;
  display: block;
  transition: transform var(--transition), box-shadow var(--transition);
}

.phase-gallery figure:hover img {
  transform: scale(1.02);
  box-shadow: 0 8px 24px rgba(45, 95, 74, 0.15);
}

.phase-gallery figcaption {
  font-size: 0.85rem;
  color: var(--gris-texte);
  margin-top: 8px;
  line-height: 1.4;
}

@media (max-width: 768px) {
  .phase-gallery {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 480px) {
  .phase-gallery {
    grid-template-columns: 1fr;
  }

  .phase {
    padding-left: 30px;
  }
}

.footer-siret {
  font-size: 0.8rem;
  opacity: 0.7;
  margin-top: 4px;
}

/* ── Vente sur plan ── */
.sale-banner {
  margin-top: 48px;
  padding: 36px 32px;
  background: var(--vert-profond);
  border-radius: 8px;
  text-align: center;
  color: var(--creme);
}

.sale-banner h2 {
  font-family: var(--font-titre);
  color: var(--or-clair);
  font-size: 1.5rem;
  margin-bottom: 12px;
}

.sale-banner p {
  max-width: 560px;
  margin: 0 auto 24px;
  line-height: 1.6;
}

.project-status.for-sale {
  background: var(--or-chaud);
  color: #fff;
  margin-left: 8px;
}

.page-header .project-status.for-sale {
  margin-left: 10px;
}

/* ── Accueil : à vendre en ce moment ── */
.section-sale {
  background: var(--creme);
}

.sale-highlight {
  display: grid;
  grid-template-columns: 320px 1fr;
  gap: 32px;
  align-items: center;
  background: var(--blanc);
  border: 1px solid var(--gris-clair);
  border-radius: 8px;
  overflow: hidden;
  text-decoration: none;
  color: var(--texte);
  transition: box-shadow var(--transition);
}

.sale-highlight:hover {
  box-shadow: 0 8px 24px rgba(45, 95, 74, 0.12);
}

.sale-highlight img {
  width: 100%;
  height: 100%;
  min-height: 220px;
  object-fit: cover;
  display: block;
}

.sale-highlight-body {
  padding: 28px 32px 28px 0;
}

.sale-highlight-body h3 {
  font-family: var(--font-titre);
  color: var(--vert-profond);
  font-size: 1.3rem;
  margin: 12px 0 10px;
}

.sale-highlight-body p {
  margin-bottom: 16px;
  line-height: 1.6;
}

@media (max-width: 768px) {
  .sale-highlight {
    grid-template-columns: 1fr;
    gap: 0;
  }

  .sale-highlight-body {
    padding: 24px;
  }
}

/* ── L'entreprise : méthode en 4 étapes & CTA ── */
.method-grid {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 32px;
  margin: 40px 0 0;
  padding: 0;
}

.method-step {
  position: relative;
  padding: 28px 24px;
  border: 1px solid var(--gris-clair);
  border-radius: 8px;
  background: var(--blanc);
}

.method-step-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--vert-profond);
  color: var(--or-clair);
  font-family: var(--font-titre);
  font-weight: 700;
  margin-bottom: 16px;
}

.method-step h3 {
  font-family: var(--font-titre);
  color: var(--vert-profond);
  font-size: 1.1rem;
  margin-bottom: 10px;
}

.method-step p {
  font-size: 0.95rem;
  line-height: 1.6;
}

.about-cta {
  text-align: center;
}

.about-cta .lead {
  margin-bottom: 24px;
}

@media (max-width: 900px) {
  .method-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 520px) {
  .method-grid {
    grid-template-columns: 1fr;
  }
}
