/* --- VARIABLES & DESIGN SYSTEM --- */
:root {
  --bg-main: #fafafa;
  --bg-card: #ffffff;
  --text-main: #1a1a1a;
  --text-muted: #666666;
  
  /* Palette Logements 1 & 2 (Blanc / Gris) */
  --gris-border: #e2e8f0;
  --gris-accent: #64748b;
  --gris-bg-badge: #f1f5f9;
  
  /* Palette Logement 3 (Blanc / Noir) */
  --noir-border: #18181b;
  --noir-accent: #09090b;
  --noir-bg-badge: #18181b;

  --radius: 12px;
  --transition: all 0.3s ease;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: 'Plus Jakarta Sans', sans-serif;
  background-color: var(--bg-main);
  color: var(--text-main);
  line-height: 1.6;
}

/* --- NAVIGATION --- */
.navbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.5rem 2rem;
  background: #ffffff;
  border-bottom: 1px solid var(--gris-border);
  position: sticky;
  top: 0;
  z-index: 100;
}

.logo {
  font-weight: 700;
  letter-spacing: 2px;
  font-size: 1.1rem;
}

.navbar a {
  text-decoration: none;
  color: var(--text-main);
  margin-left: 1.5rem;
  font-size: 0.95rem;
  font-weight: 600;
}

/* --- HERO --- */
.hero {
  text-align: center;
  padding: 5rem 1rem 3rem;
}

.hero h1 {
  font-size: 2.5rem;
  font-weight: 700;
  letter-spacing: -1px;
}

.hero p {
  color: var(--text-muted);
  margin-top: 0.5rem;
}

/* --- GRILLE & CARTE --- */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 2rem 1rem;
}

.container h2 {
  margin-bottom: 2rem;
  font-size: 1.5rem;
}

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
}

.card {
  background: var(--bg-card);
  border-radius: var(--radius);
  overflow: hidden;
  transition: var(--transition);
  display: flex;
  flex-direction: column;
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 24px rgba(0,0,0,0.06);
}

/* Différenciation subtile des cartes */
.card-gris {
  border: 1px solid var(--gris-border);
}

.card-noir {
  border: 1px solid var(--noir-border);
}

/* Image */
.card-image {
  position: relative;
  height: 220px;
}

.card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.badge {
  position: absolute;
  top: 1rem;
  left: 1rem;
  background: var(--gris-bg-badge);
  color: var(--gris-accent);
  padding: 0.25rem 0.75rem;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 600;
}

.badge-dark {
  background: var(--noir-bg-badge);
  color: #ffffff;
}

/* Contenu de la carte */
.card-content {
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

.card-content h3 {
  font-size: 1.25rem;
}

.subtitle {
  color: var(--text-muted);
  font-size: 0.85rem;
  margin-bottom: 1rem;
}

.features {
  list-style: none;
  display: flex;
  gap: 1rem;
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 1.5rem;
  border-top: 1px solid #f1f5f9;
  padding-top: 1rem;
}

.card-footer {
  margin-top: auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.price {
  font-weight: 700;
  font-size: 1.1rem;
}

.price span {
  font-size: 0.8rem;
  color: var(--text-muted);
  font-weight: 400;
}

/* Boutons */
.btn-card {
  background: transparent;
  border: 1px solid var(--text-main);
  padding: 0.5rem 1rem;
  border-radius: 6px;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
}

.btn-card:hover {
  background: var(--text-main);
  color: #ffffff;
}

.btn-dark {
  background: var(--noir-accent);
  color: #ffffff;
  border: none;
}

.btn-dark:hover {
  background: #27272a;
}

/* --- MODALE --- */
.modal {
  display: none;
  position: fixed;
  top: 0; left: 0; width: 100%; height: 100%;
  background: rgba(0,0,0,0.5);
  justify-content: center;
  align-items: center;
  z-index: 200;
}

.modal-content {
  background: #fff;
  padding: 2rem;
  border-radius: var(--radius);
  max-width: 500px;
  width: 90%;
  position: relative;
}

.close-modal {
  position: absolute;
  top: 1rem;
  right: 1rem;
  cursor: pointer;
  font-size: 1.5rem;
}

footer {
  text-align: center;
  padding: 3rem 1rem;
  border-top: 1px solid var(--gris-border);
  color: var(--text-muted);
  font-size: 0.85rem;
  margin-top: 4rem;
}