/* Reset et bases */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

:root {
    --primary: #6d4aff;
    --primary-dark: #5a3dd9;
    --secondary: #2d2d2d;
    --light: #f8f9fa;
    --white: #ffffff;
    --gray: #6c757d;
    --success: #28a745;
    --danger: #dc3545;
    --shadow: 0 4px 12px rgba(0,0,0,0.1);
    --shadow-lg: 0 8px 24px rgba(0,0,0,0.15);
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
    line-height: 1.6;
    color: var(--secondary);
    background: var(--white);
}

/* Typographie */
h1, h2, h3 {
    font-weight: 600;
    line-height: 1.3;
}

h1 { font-size: clamp(2rem, 5vw, 3.5rem); }
h2 { font-size: clamp(1.5rem, 4vw, 2.5rem); margin-bottom: 1rem; margin-top: 1.5rem; }
h3 { font-size: 1.25rem; margin-bottom: 0.5rem; }

a {
    color: var(--primary);
    text-decoration: none;
    transition: color 0.2s;
}

a:hover {
    color: var(--primary-dark);
}

/* Hero Section avec Carousel */
.hero {
    position: relative;
    min-height: 70vh;
    background: linear-gradient(rgba(0,0,0,0.4), rgba(0,0,0,0.4));
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: var(--white);
}

p {
    margin-bottom: 5px;
}

.carousel-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
}

.carousel {
    width: 100%;
    height: 100%;
    position: relative;
}

.slide {
    width: 100%;
    height: 100%;
    object-fit: cover;
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    opacity: 0;
    transition: opacity 1s ease-in-out;
}

.slide.active {
    opacity: 1;
}

.carousel-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255,255,255,0.2);
    backdrop-filter: blur(4px);
    border: none;
    color: var(--white);
    font-size: 2rem;
    padding: 1rem 1.5rem;
    cursor: pointer;
    border-radius: 50%;
    transition: background 0.3s;
    z-index: 1;
}

.carousel-btn:hover {
    background: rgba(255,255,255,0.4);
}

.carousel-btn.prev { left: 20px; }
.carousel-btn.next { right: 20px; }

.carousel-dots {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 10px;
    z-index: 1;
}

.dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: rgba(255,255,255,0.5);
    border: 2px solid var(--white);
    cursor: pointer;
    transition: all 0.3s;
}

.dot.active {
    background: var(--white);
    transform: scale(1.2);
}

.hero-content {
    position: relative;
    z-index: 1;
    padding: 2rem;
    max-width: 800px;
}

.tagline {
    font-size: clamp(1rem, 2.5vw, 1.25rem);
    margin: 1rem 0 2rem;
    opacity: 0.95;
}

/* Boutons */
.btn {
    display: inline-block;
    padding: 0.875rem 2rem;
    border-radius: 8px;
    font-weight: 600;
    text-align: center;
    transition: all 0.3s;
    border: 2px solid transparent;
    cursor: pointer;
    font-size: 1rem;
}

.btn-primary {
    background: var(--primary);
    color: var(--white);
}

.btn-primary:hover {
    background: var(--primary-dark);
    color: var(--white);
}

.btn-secondary {
    background: var(--white);
    color: var(--primary);
    border-color: var(--primary);
}

.btn-secondary:hover {
    background: var(--primary);
    color: var(--white);
}

.btn-full {
    width: 100%;
}

/* Sections */
section {
    padding: 4rem 2rem;
}

.section-subtitle {
    color: var(--gray);
    margin-bottom: 2rem;
    text-align: center;
}

/* Grid Logements */
.logements {
    background: var(--light);
}

.cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

.card {
    background: var(--white);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: transform 0.3s, box-shadow 0.3s;
}

.card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-lg);
}

.card-image {
    position: relative;
    height: 110px;
    max-height: 240px;
    overflow: hidden;
}

.card-image img {
    width: 100%;
    height: 100%;
    max-height: 240px;
    object-fit: cover;
    transition: transform 0.3s;
}

.card:hover .card-image img {
    transform: scale(1.05);
}

.card-content {
    padding: 1.5rem;
}

.capacity, .location, .price {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--gray);
    margin: 0.5rem 0;
    font-size: 0.95rem;
}

.icon {
    font-size: 1.1rem;
}

/* Section "Pourquoi en direct" */
.why-direct {
    background: var(--white);
    text-align: center;
}

.benefits-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
    max-width: 1000px;
    margin: 0 auto;
}

.benefit {
    padding: 2rem;
    background: var(--light);
    border-radius: 12px;
    transition: transform 0.3s;
}

.benefit:hover {
    transform: translateY(-4px);
}

.benefit-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 50px;
    height: 50px;
    background: var(--primary);
    color: var(--white);
    border-radius: 50%;
    font-size: 1.5rem;
    margin-bottom: 1rem;
}

/* Footer */
footer {
    background: var(--secondary);
    color: var(--white);
    padding: 2rem;
    text-align: center;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
}

.footer-links {
    margin-top: 1rem;
    display: flex;
    justify-content: center;
    gap: 2rem;
    flex-wrap: wrap;
}

.footer-links a {
    color: rgba(255,255,255,0.8);
    font-size: 0.9rem;
}

.footer-links a:hover {
    color: var(--white);
}

/* --- Pages appartement --- */
.appartement-header {
    padding: 3rem 2rem;
    background: var(--light);
}

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

.appartement-gallery img {
    width: 100%;
    height: 250px;
    object-fit: cover;
    border-radius: 8px;
    cursor: pointer;
    transition: transform 0.3s;
}

.appartement-gallery img:hover {
    transform: scale(1.03);
}

.appartement-info {
    max-width: 800px;
    margin: 0 auto;
    padding: 2rem;
}

.equipment-list {
    list-style: none;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    /*margin: 1.5rem 0;*/
}

.equipment-list li {
    padding: 0.5rem 0;
    border-bottom: 1px solid #eee;
}

.equipment-list li::before {
    content: "✓ ";
    color: var(--success);
    font-weight: bold;
}

.equipment-listX {
    list-style: none;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin: 1.5rem 0;
}

.equipment-listX li {
    padding: 0.5rem 0;
    border-bottom: 1px solid #eee;
}

.equipment-listX li::before {
    content: "✕ ";
    color: var(--danger);
    font-weight: bold;
}

/* Calendrier */
.calendar-section {
    background: var(--light);
    padding: 3rem 2rem;
}

.calendar-frame {
    width: 100%;
    max-width: 1000px;
    margin: 0 auto;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--shadow);
    background: var(--white);
}

/* Formulaire de contact */
.contact-section {
    max-width: 600px;
    margin: 0 auto;
    padding: 3rem 2rem;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: var(--secondary);
}

.form-control {
    width: 100%;
    padding: 0.875rem 1rem;
    border: 2px solid #ddd;
    border-radius: 8px;
    font-size: 1rem;
    transition: border-color 0.3s;
}

.form-control:focus {
    outline: none;
    border-color: var(--primary);
}

select.form-control {
    appearance: none;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%23333' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M2 5l6 6 6-6'/%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 1rem center;
    background-size: 1em;
}

textarea.form-control {
    resize: vertical;
    min-height: 120px;
}

.rgdpd-checkbox {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin: 1.5rem 0;
}

.rgdpd-checkbox input {
    width: 18px;
    height: 18px;
    cursor: pointer;
}

/* Responsive mobile */
@media (max-width: 768px) {
    .hero {
        min-height: 50vh;
    }
    
    section {
        padding: 3rem 1rem;
    }
    
    .carousel-btn {
        padding: 0.5rem 1rem;
        font-size: 1.5rem;
    }
    
    .carousel-btn.prev { left: 10px; }
    .carousel-btn.next { right: 10px; }
    
    .cards-grid {
        grid-template-columns: 1fr;
    }
}

/* --- Lightbox pour galerie --- */
.lightbox {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.9);
    z-index: 1000;
    justify-content: center;
    align-items: center;
}

.lightbox.active {
    display: flex;
}

.lightbox img {
    max-width: 90%;
    max-height: 90%;
    border-radius: 4px;
}

.lightbox-close {
    position: absolute;
    top: 20px;
    right: 30px;
    color: var(--white);
    font-size: 3rem;
    cursor: pointer;
}

/* Utilitaires */
.text-center { text-align: center; }
.mt-2 { margin-top: 2rem; }
.mb-2 { margin-bottom: 2rem; }
