<!DOCTYPE html>
<html lang="fr">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title><%= typo.nom %> · <%= bien.titre %> — Benammar Promotion</title>
<meta name="description" content="<%= typo.nom %> — <%= bien.titre %>, Oran. <%= (typo.description || '').slice(0,120) %>">
<link rel="canonical" href="<%= canonical %>">
<meta name="robots" content="index, follow">
<meta property="og:type" content="website">
<meta property="og:site_name" content="Benammar Promotion">
<meta property="og:title" content="<%= typo.nom %> · <%= bien.titre %>">
<meta property="og:url" content="<%= canonical %>">
<link rel="icon" type="image/png" href="/img/logo.png">
<link rel="preconnect" href="https://fonts.googleapis.com">
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
<link href="https://fonts.googleapis.com/css2?family=Cormorant+Garamond:ital,wght@0,300;0,400;0,500;1,300;1,400&family=Jost:wght@300;400;500&display=swap" rel="stylesheet">
<link rel="stylesheet" href="/css/style.css?v=26">
</head>
<body class="pub">
<% var catUrl = bien.categorie === 'villa' ? '/projets/villas' : '/projets/residences'; %>
<% var catLabel = bien.categorie === 'villa' ? 'Villas' : 'Résidences'; %>
<% var photos = (typo.photos || '').split(/[,\n]/).map(function(s){return s.trim();}).filter(Boolean); %>
<% if (typo.photo && photos.indexOf(typo.photo) === -1) photos.unshift(typo.photo); %>

<header class="pub-header">
  <div class="pub-brand-wrap">
    <a href="/" class="pub-brand"><img src="/img/logo-trans.png" alt="Benammar Promotion Immobilière" style="height:44px;width:auto;display:block"></a>
    <span class="pub-exp-badge" aria-label="30 ans d'expérience"><b>30</b><i>ans d'expérience</i></span>
  </div>
  <nav class="pub-nav">
    <a href="/">Accueil</a>
    <a href="/projets/residences">Résidences</a>
    <a href="/projets/villas">Villas</a>
    <a href="#coords" class="pub-cta">Nous contacter</a>
  </nav>
</header>

<main class="pub-wrap">
  <nav class="crumb"><a href="/">Accueil</a> › <a href="<%= catUrl %>"><%= catLabel %></a> › <a href="/bien/<%= bien.slug %>"><%= bien.titre %></a> › <span><%= typo.nom %></span></nav>

  <div class="bien-top">
    <div class="bien-gallery">
      <div class="main">
        <% if (photos.length) { %>
          <img id="mainPhoto" src="<%= photos[0] %>" alt="<%= typo.nom %>">
        <% } else { %>
          <span class="badge"><%= typo.nom %></span>
        <% } %>
      </div>
      <% if (photos.length > 1) { %>
        <div class="bien-thumbs">
          <% photos.forEach(function(p){ %>
            <img src="<%= p %>" alt="" onclick="document.getElementById('mainPhoto').src=this.src">
          <% }) %>
        </div>
      <% } %>
    </div>

    <div class="bien-info">
      <p class="cat"><%= bien.titre %></p>
      <h1><%= typo.nom %></h1>
      <div class="bien-specs">
        <% if (typo.superficie) { %><div><span class="v"><%= typo.superficie %></span><span class="k">superficie</span></div><% } %>
        <% if (typo.nb) { %><div><span class="v"><%= typo.nb %></span><span class="k">disponibilité</span></div><% } %>
      </div>
      <% if (typo.description) { %><p class="desc"><%= typo.description %></p><% } %>
      <div class="bien-cta">
        <a href="#coords" class="btn">Nous contacter</a>
        <button type="button" class="btn btn-ghost" onclick="document.getElementById('formModal').classList.add('open')">Remplir le formulaire</button>
      </div>
    </div>
  </div>

  <% var avs = (typo.avantages || '').split(/\r?\n/).map(function(s){return s.trim();}).filter(Boolean); %>
  <% if (avs.length) { %>
    <section class="bien-section">
      <h2>Les avantages</h2>
      <ul class="equip-list">
        <% avs.forEach(function(a){ %><li><%= a %></li><% }) %>
      </ul>
    </section>
  <% } %>

  <% if (typo.plan) { %>
    <section class="bien-section">
      <h2>Le plan</h2>
      <div class="plan-box"><img src="<%= typo.plan %>" alt="Plan <%= typo.nom %>"></div>
    </section>
  <% } %>

  <div class="bien-section">
    <a href="/bien/<%= bien.slug %>" class="back-link">← Retour à <%= bien.titre %></a>
  </div>
</main>

<%- include('_contact') %>
</body>
</html>
