/* ==================== */
/* Variables CSS */
/* ==================== */
:root {
    --primary-color: #1e5f74;
    --secondary-color: #f4a261;
    --accent-color: #e76f51;
    --text-dark: #2d3748;
    --text-light: #718096;
    --bg-light: #f7fafc;
    --bg-white: #ffffff;
    --shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 25px rgba(0, 0, 0, 0.15);
    --transition: all 0.3s ease;
    --layout-max-width: 1200px;
    --layout-gutter: 20px;
    --nav-height: 70px;
}

/* ==================== */
/* Reset & Base */
/* ==================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Poppins', sans-serif;
    color: var(--text-dark);
    line-height: 1.6;
    overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'Playfair Display', serif;
    font-weight: 600;
    line-height: 1.3;
}

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

a {
    text-decoration: none;
    color: inherit;
}

ul {
    list-style: none;
}

.container {
    max-width: var(--layout-max-width);
    margin: 0 auto;
    padding: 0 var(--layout-gutter);
}

/* ==================== */
/* Navigation */
/* ==================== */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    transition: var(--transition);
}

.navbar::before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: min(100%, var(--layout-max-width));
    height: 100%;
    background: rgba(255, 255, 255, 0.95);
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
    box-shadow: var(--shadow);
    border-radius: 0 0 18px 18px;
    transition: var(--transition);
    pointer-events: none;
    z-index: -1;
}

.navbar.is-scrolled::before {
    background: rgba(255, 255, 255, 0.98);
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.1);
}

.navbar .container {
    position: relative;
    z-index: 1;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem var(--layout-gutter);
}

.nav-brand h2 {
    color: var(--primary-color);
    font-size: 1.5rem;
}

.nav-menu {
    display: flex;
    gap: 2rem;
}

.nav-menu a {
    color: var(--text-dark);
    font-weight: 500;
    transition: var(--transition);
    position: relative;
}

.nav-menu a::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--accent-color);
    transition: var(--transition);
}

.nav-menu a:hover {
    color: var(--accent-color);
}

.nav-menu a:hover::after {
    width: 100%;
}

.nav-toggle {
    display: none;
    flex-direction: column;
    gap: 4px;
    cursor: pointer;
}

.nav-toggle span {
    width: 25px;
    height: 3px;
    background: var(--primary-color);
    transition: var(--transition);
}

/* ==================== */
/* Hero Section */
/* ==================== */
.hero {
    position: relative;
    height: 100vh;
    background: linear-gradient(135deg, #1e5f74 0%, #2d8fa8 50%, #4facfe 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: white;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1440 320"><path fill="%23ffffff" fill-opacity="0.1" d="M0,96L48,112C96,128,192,160,288,160C384,160,480,128,576,122.7C672,117,768,139,864,149.3C960,160,1056,160,1152,138.7C1248,117,1344,75,1392,53.3L1440,32L1440,320L1392,320C1344,320,1248,320,1152,320C1056,320,960,320,864,320C768,320,672,320,576,320C480,320,384,320,288,320C192,320,96,320,48,320L0,320Z"></path></svg>') bottom center no-repeat;
    background-size: cover;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.3);
}

.hero-content {
    position: relative;
    z-index: 1;
    max-width: 800px;
    padding: 0 20px;
    animation: fadeInUp 1s ease-out;
}

.hero-title {
    font-size: clamp(2.5rem, 6vw, 4rem);
    margin-bottom: 1rem;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.hero-subtitle {
    font-size: clamp(1.2rem, 3vw, 1.5rem);
    margin-bottom: 2rem;
    font-weight: 300;
}

.scroll-indicator {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 1;
}

.scroll-indicator span {
    display: block;
    width: 30px;
    height: 50px;
    border: 2px solid white;
    border-radius: 25px;
    position: relative;
}

.scroll-indicator span::before {
    content: '';
    position: absolute;
    top: 8px;
    left: 50%;
    transform: translateX(-50%);
    width: 6px;
    height: 6px;
    background: white;
    border-radius: 50%;
    animation: scroll 2s infinite;
}

@keyframes scroll {
    0% { transform: translate(-50%, 0); opacity: 0; }
    50% { opacity: 1; }
    100% { transform: translate(-50%, 20px); opacity: 0; }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ==================== */
/* Buttons */
/* ==================== */
.btn {
    display: inline-block;
    padding: 1rem 2.5rem;
    border-radius: 50px;
    font-weight: 500;
    transition: var(--transition);
    cursor: pointer;
    border: none;
    font-size: 1rem;
}

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

.btn-primary:hover {
    background: #d65a3d;
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

/* ==================== */
/* Section Styles */
/* ==================== */
section {
    padding: 5rem 0;
}

.section-title {
    text-align: center;
    font-size: clamp(2rem, 4vw, 2.5rem);
    color: var(--primary-color);
    margin-bottom: 3rem;
    position: relative;
}

.section-title::after {
    content: '';
    display: block;
    width: 80px;
    height: 4px;
    background: var(--secondary-color);
    margin: 1rem auto 0;
    border-radius: 2px;
}

/* ==================== */
/* Introduction Section */
/* ==================== */
.intro {
    background: var(--bg-light);
}

.intro-content {
    max-width: 800px;
    margin: 0 auto;
    text-align: center;
}

.intro-text {
    font-size: 1.125rem;
    color: var(--text-light);
    line-height: 1.8;
}

/* ==================== */
/* Villa Section */
/* ==================== */
.villa-section {
    background: white;
}

.villa-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
    justify-items: center;
}

/* Alternative pour mieux contrôler le layout sur les grandes largeurs */
@media (min-width: 1200px) {
    .villa-grid {
        grid-template-columns: repeat(4, minmax(280px, 1fr));
    }
}

@media (min-width: 768px) and (max-width: 1199px) {
    .villa-grid {
        grid-template-columns: repeat(3, minmax(280px, 1fr));
    }
}

@media (min-width: 640px) and (max-width: 767px) {
    .villa-grid {
        grid-template-columns: repeat(2, minmax(280px, 1fr));
    }
}

/* Mode carrousel pour mobile */
@media (max-width: 639px) {
    .villa-grid {
        display: flex;
        overflow-x: auto;
        scroll-snap-type: x mandatory;
        gap: 1.5rem;
        padding: 1rem 0;
        -ms-overflow-style: none; /* IE/Edge */
    }
    
    .villa-grid::-webkit-scrollbar {
        display: none; /* Chrome/Safari/Edge */
    }
    
    .villa-card {
        flex: 0 0 85%;
        scroll-snap-align: center;
        scroll-snap-stop: always;
        min-width: 280px;
    }
    
    /* Indicateur visuel pour le scroll */
    .villa-section .container::after {
        content: '← Swipez →';
        display: block;
        text-align: center;
        margin-top: 1rem;
        color: var(--text-light);
        font-size: 0.9rem;
        animation: pulse 2s infinite;
    }
}

@keyframes pulse {
    0%, 100% { opacity: 0.5; }
    50% { opacity: 1; }
}

.villa-card {
    background: var(--bg-light);
    padding: 2.5rem 2rem;
    border-radius: 15px;
    text-align: center;
    transition: var(--transition);
    border: 2px solid transparent;
}

.villa-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-lg);
    border-color: var(--secondary-color);
}

/* Ajuster le padding des cartes sur mobile pour un meilleur rendu */
@media (max-width: 639px) {
    .villa-card {
        padding: 2rem 1.5rem;
    }
}

.villa-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.villa-card h3 {
    color: var(--primary-color);
    margin-bottom: 1rem;
    font-size: 1.5rem;
}

.villa-card p {
    color: var(--text-light);
}

/* ==================== */
/* Gallery Section */
/* ==================== */
.gallery-section {
    background: var(--bg-light);
}

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

.gallery-item {
    position: relative;
    overflow: hidden;
    border-radius: 15px;
    height: 250px;
    cursor: pointer;
    transition: var(--transition);
}

.gallery-item-tall {
    height: 350px;
}

.gallery-item-large {
    grid-column: span 2;
    height: 350px;
}

.gallery-item:hover {
    transform: scale(1.05);
    box-shadow: var(--shadow-lg);
}

.gallery-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.5rem;
    font-weight: 600;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

/* Gallery placeholder background variants */
.gallery-bg-1 { background: linear-gradient(135deg, #667eea 0%, #764ba2 100%); }
.gallery-bg-2 { background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%); }
.gallery-bg-3 { background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%); }
.gallery-bg-4 { background: linear-gradient(135deg, #43e97b 0%, #38f9d7 100%); }
.gallery-bg-5 { background: linear-gradient(135deg, #fa709a 0%, #fee140 100%); }
.gallery-bg-6 { background: linear-gradient(135deg, #30cfd0 0%, #330867 100%); }

/* ==================== */
/* Amenities Section */
/* ==================== */
.amenities-section {
    background: white;
}

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

.amenity-category {
    background: var(--bg-light);
    padding: 2rem;
    border-radius: 15px;
    border-left: 4px solid var(--secondary-color);
}

.amenity-category h3 {
    color: var(--primary-color);
    margin-bottom: 1.5rem;
    font-size: 1.3rem;
}

.amenity-category ul {
    list-style: none;
}

.amenity-category li {
    padding: 0.5rem 0;
    color: var(--text-light);
    font-size: 0.95rem;
}

/* ==================== */
/* Location Section */
/* ==================== */
.location-section {
    background: var(--bg-light);
}

.location-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    align-items: start;
}

.location-text h3 {
    color: var(--primary-color);
    margin-bottom: 1rem;
    font-size: 1.5rem;
}

.location-text p {
    color: var(--text-light);
    margin-bottom: 2rem;
    line-height: 1.8;
}

.location-list {
    list-style: none;
}

.location-list li {
    padding: 0.75rem 0;
    color: var(--text-light);
    border-bottom: 1px solid #e2e8f0;
}

.location-list li:last-child {
    border-bottom: none;
}

.location-map {
    position: sticky;
    top: 100px;
}

.map-placeholder {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    height: 400px;
    border-radius: 15px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: white;
    box-shadow: var(--shadow-lg);
}

.map-icon {
    font-size: 4rem;
    margin-bottom: 1rem;
}

.map-placeholder p {
    font-size: 1.2rem;
    font-weight: 600;
}

.map-coordinates {
    font-size: 0.9rem !important;
    opacity: 0.8;
    margin-top: 0.5rem;
}

/* Video Container */
.video-container {
    position: relative;
    width: 100%;
    padding-bottom: 56.25%; /* Ratio 16:9 */
    height: 0;
    overflow: hidden;
    border-radius: 15px;
    box-shadow: var(--shadow-lg);
}

.video-container iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border-radius: 15px;
}

/* ==================== */
/* Pricing Section */
/* ==================== */
.pricing-section {
    background: white;
}

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

.pricing-card {
    background: var(--bg-light);
    padding: 2.5rem 2rem;
    border-radius: 15px;
    text-align: center;
    transition: var(--transition);
    border: 2px solid transparent;
    position: relative;
}

.pricing-card.featured {
    border-color: var(--accent-color);
    transform: scale(1.05);
}

.popular-badge {
    position: absolute;
    top: -15px;
    right: 20px;
    background: var(--accent-color);
    color: white;
    padding: 0.5rem 1.5rem;
    border-radius: 25px;
    font-size: 0.85rem;
    font-weight: 600;
}

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

.pricing-card.featured:hover {
    transform: scale(1.05) translateY(-10px);
}

.pricing-card h3 {
    color: var(--primary-color);
    margin-bottom: 0.5rem;
    font-size: 1.8rem;
}

.season-dates {
    color: var(--text-light);
    font-size: 0.9rem;
    margin-bottom: 1.5rem;
}

.price {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--accent-color);
    margin-bottom: 2rem;
}

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

.pricing-card ul {
    text-align: left;
    margin-top: 1.5rem;
}

.pricing-card li {
    padding: 0.5rem 0;
    color: var(--text-light);
}

.pricing-note {
    text-align: center;
    color: var(--text-light);
    font-size: 0.9rem;
    max-width: 800px;
    margin: 0 auto;
    font-style: italic;
}

/* ==================== */
/* Contact Section */
/* ==================== */
.contact-section {
    background: var(--bg-light);
}

.contact-content {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 3rem;
}

.contact-info h3 {
    color: var(--primary-color);
    margin-bottom: 2rem;
    font-size: 1.5rem;
}

.contact-item {
    display: flex;
    gap: 1rem;
    margin-bottom: 2rem;
    align-items: start;
}

.contact-icon {
    font-size: 2rem;
    color: var(--accent-color);
}

.contact-item strong {
    display: block;
    color: var(--primary-color);
    margin-bottom: 0.25rem;
}

.contact-item p {
    color: var(--text-light);
}

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

.social-link {
    padding: 0.75rem 1.5rem;
    background: var(--primary-color);
    color: white;
    border-radius: 25px;
    transition: var(--transition);
    font-size: 0.9rem;
    flex: 1 1 150px;
    min-width: 140px;
    text-align: center;
}
@media (min-width: 769px) {
    .social-links {
        justify-content: flex-start;
    }

    .social-link {
        flex: 0 0 auto;
        min-width: auto;
    }
}


.social-link:hover {
    background: var(--accent-color);
    transform: translateY(-2px);
}

.contact-form {
    background: white;
    padding: clamp(1.5rem, 4vw, 2.5rem);
    border-radius: 15px;
    box-shadow: var(--shadow);
}

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

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

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

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 0.875rem;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    font-family: 'Poppins', sans-serif;
    font-size: 1rem;
    transition: var(--transition);
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--accent-color);
}

.form-group textarea {
    resize: vertical;
}

.contact-form .btn {
    width: 100%;
    margin-top: 1rem;
}

/* ==================== */
/* Footer */
/* ==================== */
.footer {
    background: var(--primary-color);
    color: white;
    padding: 3rem 0 1rem;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer-section h4 {
    margin-bottom: 1rem;
    color: var(--secondary-color);
}

.footer-section p {
    color: rgba(255, 255, 255, 0.8);
    line-height: 1.6;
}

.footer-section ul li {
    margin-bottom: 0.5rem;
}

.footer-section a {
    color: rgba(255, 255, 255, 0.8);
    transition: var(--transition);
}

.footer-section a:hover {
    color: var(--secondary-color);
}

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.6);
}

/* ==================== */
/* Responsive Design */
/* ==================== */
@media (max-width: 968px) {
    .nav-menu {
        position: fixed;
        left: -100%;
        top: calc(var(--nav-height, 70px) + 0.75rem);
        flex-direction: column;
        background: white;
        width: 100%;
        text-align: center;
        padding: 2rem;
        box-shadow: var(--shadow-lg);
        transition: var(--transition);
        gap: 1rem;
    }
    
    .nav-menu.active {
        left: 0;
    }
    
    .nav-toggle {
        display: flex;
    }
    
    .location-content,
    .contact-content {
        grid-template-columns: 1fr;
    }
    
    .gallery-item-large {
        grid-column: span 1;
        height: 250px;
    }
    
    .form-row {
        grid-template-columns: 1fr;
    }

    .gallery-grid {
        grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    }
}

@media (max-width: 1200px) {
    .navbar::before {
        width: 100%;
        border-radius: 0;
    }
}

@media (max-width: 480px) {
    :root {
        --layout-gutter: 16px;
    }
}

@media (max-width: 640px) {
    .hero-title {
        font-size: 2rem;
    }
    
    .hero-subtitle {
        font-size: 1rem;
    }
    
    section {
        padding: 3rem 0;
    }
    
    .villa-grid,
    .amenities-grid,
    .pricing-grid {
        grid-template-columns: 1fr;
    }
    
    .pricing-card.featured {
        transform: scale(1);
    }
    
    .contact-form {
        padding: 1.5rem;
    }

    .gallery-grid {
        grid-template-columns: 1fr;
        gap: 1.25rem;
    }

    .gallery-item,
    .gallery-item-large,
    .gallery-item-tall {
        height: 220px;
    }

    .social-link {
        flex: 1 1 100%;
    }
}
