:root {
    --primary: #2c3e50;
    --accent: #d4af37;
    --bg: #f9f9f9;
    --text: #333;
}

body { font-family: 'Helvetica Neue', Liberation, sans-serif; margin: 0; background: var(--bg); color: var(--text); line-height: 1.6; }
header { background: var(--primary); color: white; text-align: center; padding: 3rem 1rem; position: relative; }
.h1-title { font-size: 2rem; font-weight: bold; margin: 0.67em 0; }
.container { max-width: 1200px; margin: 2rem auto; padding: 0 20px; }

h2 { border-bottom: 2px solid var(--accent); display: inline-block; padding-bottom: 5px; margin-top: 3rem; }
.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(350px, 1fr)); gap: 2.5rem; margin-top: 2rem; }

/* Card Style */
.apt-card { background: white; border-radius: 12px; overflow: hidden; box-shadow: 0 10px 20px rgba(0,0,0,0.05); transition: 0.3s; border: 1px solid #eee; }
.apt-card:hover { transform: translateY(-5px); box-shadow: 0 15px 30px rgba(0,0,0,0.1); }

/* Gallery Preview */
.gallery-preview { display: grid; grid-template-columns: 2fr 1fr; grid-template-rows: 160px; gap: 4px; cursor: pointer; }
.gallery-preview img { width: 100%; height: 100%; object-fit: cover; transition: opacity 0.3s; }
.gallery-preview img:hover { opacity: 0.9; }

.card-body { padding: 1.5rem; }
.card-body a { text-decoration: none; color: inherit; display: block; }
.card-body a p { cursor: pointer; }
.card-body a:hover p { text-decoration: underline; }

.badge { background: var(--primary); color: white; padding: 4px 12px; border-radius: 20px; font-size: 0.8rem; text-transform: uppercase; white-space: nowrap; }
h3.badge { margin: 0; display: inline-block; font-weight: 600; }
.lang-fr, .lang-en { margin-top: 10px; }
.lang-fr p { font-weight: 500; color: var(--primary); }
.lang-en p { font-style: italic; color: #777; font-size: 0.95rem; }
.lang-fr .badge + .badge, .lang-en .badge + .badge { margin-left: 6px; }

/* Lightbox Style */
#lightbox {
    display: none;
    position: fixed;
    z-index: 1000;
    top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0,0,0,0.9);
    justify-content: center; align-items: center;
}
#lightbox.active { display: flex; }
#lightbox-img { max-width: 85%; max-height: 80%; border: 3px solid white; object-fit: contain; }
.close, .nav-btn { position: absolute; color: white; font-size: 40px; cursor: pointer; user-select: none; }
.close { top: 20px; right: 30px; }
.prev { left: 30px; }
.next { right: 30px; }

.lang-toggle {
    position: absolute;
    top: 20px;
    right: 20px;
    display: flex;
    gap: 4px;
    background: rgba(255,255,255,0.15);
    border-radius: 8px;
    padding: 4px;
}
.lang-toggle button {
    background: none;
    border: none;
    color: #fff;
    padding: 6px 14px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 600;
    transition: 0.2s;
    opacity: 0.6;
}
.lang-toggle button.active {
    background: rgba(255,255,255,0.25);
    opacity: 1;
}
.lang-toggle button:hover { opacity: 0.9; }

body.lang-en .lang-fr { display: none; }
body.lang-fr .lang-en { display: none; }

.apt-card[data-disponible="false"] { position: relative; opacity: 0.5; }
.apt-card[data-disponible="false"]::after {
    content: "LOUÉ";
    position: absolute; top: 50%; left: 50%;
    transform: translate(-50%, -50%) rotate(-20deg);
    color: #dc3545; font-size: 3rem; font-weight: 900;
    border: 4px solid #dc3545; padding: 5px 25px;
    z-index: 10; letter-spacing: 3px; pointer-events: none;
    white-space: nowrap;
}
body.lang-en .apt-card[data-disponible="false"]::after { content: "RENTED"; }

footer { text-align: center; padding: 4rem 0; background: var(--primary); color: white; margin-top: 4rem; }
footer .lang-fr p, footer .lang-en p { color: white; }

/* Page Appartement */
.back-link {
    display: inline-block;
    color: rgba(255,255,255,0.8);
    text-decoration: none;
    margin-top: 1rem;
    font-size: 0.9rem;
    transition: 0.2s;
}
.back-link:hover { color: #fff; text-decoration: underline; }

.photo-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 8px;
    margin: 2rem 0;
}
.photo-grid img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    cursor: pointer;
    border-radius: 8px;
    transition: opacity 0.3s;
}
.photo-grid img:hover { opacity: 0.85; }

.description {
    background: white;
    border-radius: 12px;
    padding: 2rem;
    margin: 2rem 0;
    border: 1px solid #eee;
}
.description h2 {
    margin-top: 0;
}
.price-tag {
    background: var(--accent);
    color: var(--primary);
    padding: 6px 18px;
    border-radius: 20px;
    font-size: 1.1rem;
    font-weight: 700;
    display: inline-block;
    margin-bottom: 1rem;
}

/* En bref / Key facts */
.en-bref {
    background: white;
    border-radius: 12px;
    padding: 1.5rem 2rem;
    margin: 2rem 0 0;
    border: 1px solid #eee;
    display: flex;
    flex-wrap: wrap;
    gap: 1.5rem 3rem;
}
.en-bref h2 { margin-top: 0; width: 100%; }
.en-bref dl { margin: 0; min-width: 180px; }
.en-bref dt { font-weight: 600; color: var(--primary); font-size: 0.85rem; text-transform: uppercase; }
.en-bref dd { margin: 0 0 0.5rem; font-size: 1rem; }

/* Quartier */
.quartier {
    background: white;
    border-radius: 12px;
    padding: 2rem;
    margin: 2rem 0;
    border: 1px solid #eee;
}
.quartier h2 { margin-top: 0; }

/* FAQ */
.faq { margin: 2rem 0; }
.faq h2 { margin-bottom: 1.5rem; }
.faq-item {
    background: white;
    border-radius: 12px;
    padding: 1.5rem 2rem;
    margin-bottom: 1rem;
    border: 1px solid #eee;
}
.faq-item h3 { margin: 0 0 0.5rem; color: var(--primary); font-size: 1.05rem; }
.faq-item p { margin: 0; color: #555; }
