﻿/* Reset et base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary: #4a5568;
    --secondary: #FF4A52;
    --accent: #1EC6B6;
    --text-dark: #2d3748;
    --text-light: #718096;
    --bg-light: #f8fafc;
    --white: #fff;
    --border: #e2e8f0;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: #f5f5f5;
    color: var(--text-dark);
    font-size: 16px;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Accessibilité */
*:focus-visible {
    outline: 3px solid var(--accent);
    outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* Header */
.header {
    background: white;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    padding: 1rem;
    position: sticky;
    top: 0;
    z-index: 1000;
    backface-visibility: hidden;
}

.header-container {
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
}

.logo img {
    height: 40px;
    width: auto;
}

.header-buttons {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.btn {
    padding: 0.625rem 1.25rem;
    border-radius: 8px;
    font-size: 0.875rem;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.3s ease;
    white-space: nowrap;
    border: none;
    cursor: pointer;
    display: inline-block;
}

.btn-primary {
    background: var(--primary);
    color: white;
}

    .btn-primary:hover {
        background: #2d3748;
        transform: translateY(-1px);
    }

.btn-outline {
    background: transparent;
    color: var(--primary);
    border: 1px solid var(--primary);
}

    .btn-outline:hover {
        background: #f7fafc;
    }

.help-icon {
    width: 35px;
    height: 35px;
    background: #f7fafc;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary);
    text-decoration: none;
    flex-shrink: 0;
}

/* Hero Section */
.hero-section {
    background: linear-gradient(rgba(0,0,0,0.3), rgba(0,0,0,0.3)), url('https://images.unsplash.com/photo-1523755231516-e43fd2e8dca5?w=1200');
    background-size: cover;
    background-position: center;
    min-height: 450px;
    display: flex;
    align-items: center;
    padding: 2rem 1rem;
}

.hero-content {
    max-width: 1200px;
    margin: 0 auto;
    width: 100%;
}

.hero-title {
    font-size: clamp(1.5rem, 5vw, 2.5rem);
    font-weight: bold;
    color: white;
    margin-bottom: 1rem;
    text-align: center;
}

.hero-subtitle {
    font-size: clamp(1rem, 3vw, 1.3rem);
    color: white;
    font-weight: 600;
    margin-bottom: 2rem;
    text-align: center;
}

/* Search Form */
.search-container {
    max-width: 1200px;
    margin: 2rem auto 0;
    padding: 0 1rem;
}

.search-form {
    background: #FFA500;
    border-radius: 8px;
    padding: 0.5rem;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.search-field {
    background: white;
    border: none;
    border-radius: 6px;
    padding: 0.75rem 1rem;
    font-size: 0.875rem;
    font-weight: 500;
    color: #333;
    outline: none;
    transition: all 0.3s ease;
    flex: 1 1 auto;
    min-width: 0;
}

    .search-field:focus {
        box-shadow: 0 0 0 3px rgba(255, 165, 0, 0.3);
    }

.field-dates {
    flex: 1 1 auto;
    min-width: 0;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: white;
    border-radius: 6px;
    padding: 0.5rem 0.75rem;
}

.date-input {
    flex: 1;
    border: none;
    background: transparent;
    outline: none;
    font-size: 0.875rem;
    font-weight: 500;
    color: #333;
    min-width: 0;
}

.date-separator {
    color: #999;
    font-weight: 500;
    flex-shrink: 0;
}

.btn-search {
    background: var(--primary);
    color: white;
    border: none;
    border-radius: 6px;
    padding: 0.75rem 1.5rem;
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
}

    .btn-search:hover {
        background: #2d3748;
        transform: translateY(-1px);
    }

/* Section commune */
.section {
    padding: 2rem 1rem;
}

.section-title {
    font-size: clamp(1.5rem, 4vw, 2.5rem);
    font-weight: bold;
    color: var(--text-dark);
    margin-bottom: 1rem;
    text-align: center;
}

.section-subtitle {
    font-size: clamp(0.875rem, 2.5vw, 1.1rem);
    color: var(--text-light);
    text-align: center;
    margin-bottom: 2rem;
}

/* Grid responsive */
.grid {
    display: grid;
    gap: 1.5rem;
    max-width: 1200px;
    margin: 0 auto;
}

.grid-1 {
    grid-template-columns: 1fr;
}

.grid-2 {
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

.grid-3 {
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
}

/* Destination Card */
.destination-card {
    background: white;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 5px 20px rgba(0,0,0,0.1);
    transition: transform 0.3s ease;
    height: 250px;
    position: relative;
}

    .destination-card:hover {
        transform: translateY(-5px);
    }

.destination-image {
    height: 100%;
    background-size: cover;
    background-position: center;
    position: relative;
}

    .destination-image::before {
        content: '';
        position: absolute;
        inset: 0;
        background: linear-gradient(rgba(0,0,0,0.3), rgba(0,0,0,0.3));
    }

.destination-overlay {
    position: absolute;
    bottom: 1.25rem;
    left: 1.25rem;
    color: white;
    z-index: 1;
}

    .destination-overlay h4 {
        font-size: clamp(1.25rem, 3vw, 1.5rem);
        font-weight: bold;
        margin-bottom: 0.25rem;
    }

    .destination-overlay p {
        font-size: clamp(0.75rem, 2vw, 0.9rem);
        opacity: 0.9;
    }

/* Property Card */
.property-card {
    background: white;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 5px 20px rgba(0,0,0,0.1);
    transition: transform 0.3s ease;
    cursor: pointer;
    height: 100%;
    display: flex;
    flex-direction: column;
}

    .property-card:hover {
        transform: translateY(-5px);
    }

.property-image {
    height: 200px;
    background-size: cover;
    background-position: center;
    position: relative;
}

.property-badge {
    position: absolute;
    top: 0.9375rem;
    left: 0.9375rem;
    background: var(--primary);
    color: white;
    padding: 0.375rem 0.75rem;
    border-radius: 15px;
    font-size: 0.75rem;
    font-weight: bold;
}

.price-badge {
    position: absolute;
    top: 0.9375rem;
    right: 0.9375rem;
    background: rgba(0,0,0,0.8);
    color: white;
    padding: 0.5rem 0.75rem;
    border-radius: 20px;
    font-weight: bold;
    font-size: 0.875rem;
}

.property-content {
    padding: 1.25rem;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.property-title {
    font-size: clamp(1rem, 2.5vw, 1.3rem);
    font-weight: bold;
    color: var(--text-dark);
    margin-bottom: 0.625rem;
}

.property-location {
    display: flex;
    align-items: center;
    color: var(--text-light);
    font-size: 0.875rem;
    margin-bottom: 0.9375rem;
    gap: 0.25rem;
}

.property-features {
    display: flex;
    flex-wrap: wrap;
    gap: 0.9375rem;
    margin-bottom: 0.9375rem;
    font-size: 0.875rem;
}

.feature-item {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.property-description {
    color: var(--text-light);
    font-size: 0.875rem;
    line-height: 1.5;
    margin-bottom: 0.9375rem;
    flex: 1;
}

.property-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 0.9375rem;
    border-top: 1px solid var(--border);
    margin-top: auto;
}

.property-price {
    font-size: 1rem;
    font-weight: bold;
    color: var(--text-dark);
}

    .property-price small {
        font-size: 0.875rem;
        color: var(--text-light);
        font-weight: normal;
    }

.btn-view-details {
    background: var(--primary);
    color: white;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 6px;
    font-size: 0.875rem;
    font-weight: 500;
    transition: background 0.3s;
    cursor: pointer;
    text-decoration: none;
}

    .btn-view-details:hover {
        background: #2d3748;
    }

/* Why Choose Us */
.why-choose-us {
    background: var(--primary);
    color: white;
}

.feature-item-text {
    text-align: center;
    padding: 1.5rem 1rem;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.feature-icon {
    width: 80px;
    height: 80px;
    background: rgba(255,255,255,0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1rem;
    flex-shrink: 0;
}

.feature-item-text h4 {
    font-size: clamp(1rem, 2.5vw, 1.3rem);
    font-weight: bold;
    margin-bottom: 0.75rem;
    margin-top: 0;
}

.feature-item-text p {
    font-size: clamp(0.875rem, 2vw, 1rem);
    opacity: 0.9;
    margin: 0;
    line-height: 1.6;
}

/* CTA Section */
.cta-section {
    background: var(--bg-light);
}

.cta-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    align-items: center;
    text-align: center;
}

.cta-text h3 {
    font-size: clamp(1.25rem, 3vw, 2rem);
    font-weight: bold;
    color: var(--text-dark);
    margin-bottom: 0.9375rem;
}

.cta-text p {
    font-size: clamp(0.875rem, 2.5vw, 1.1rem);
    color: var(--text-light);
}

/* Footer */
.footer {
    background: var(--primary);
    color: white;
    padding: 3rem 1rem 1.5rem;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer-widget h3 {
    font-size: 1.25rem;
    font-weight: 400;
    margin-bottom: 1.5rem;
}

.footer-widget p, .footer-widget a {
    color: rgba(255,255,255,0.8);
    text-decoration: none;
    font-size: 0.875rem;
    line-height: 1.8;
}

    .footer-widget a:hover {
        color: white;
    }

.footer-links {
    list-style: none;
}

    .footer-links li {
        margin-bottom: 0.75rem;
    }

.footer-bottom {
    border-top: 1px solid rgba(255,255,255,0.2);
    padding-top: 1.5rem;
    text-align: center;
}

    .footer-bottom p {
        color: rgba(255,255,255,0.7);
        font-size: 0.875rem;
    }

/* Breakpoints détaillés */

/* 280px - 320px : Très petits smartphones */
@media (max-width: 320px) {
    .header-container {
        flex-direction: column;
        align-items: stretch;
    }

    .header-buttons {
        flex-direction: column;
        width: 100%;
    }

    .btn, .btn-search {
        width: 100%;
        padding: 0.625rem;
        font-size: 0.75rem;
    }

    .search-form {
        flex-direction: column;
    }

    .search-field, .field-dates {
        width: 100%;
    }

    .hero-section {
        min-height: 350px;
    }

    .grid {
        gap: 1rem;
    }
}

/* 321px - 374px : Petits smartphones */
@media (min-width: 321px) and (max-width: 374px) {
    .search-form {
        flex-direction: column;
    }

    .search-field, .field-dates, .btn-search {
        width: 100%;
    }
}

/* 375px - 413px : Smartphones standards */
@media (min-width: 375px) and (max-width: 413px) {
    .search-form {
        flex-direction: column;
    }

    .property-image {
        height: 180px;
    }
}

/* 414px - 599px : Smartphones moyens à grands */
@media (min-width: 414px) and (max-width: 599px) {
    .search-field {
        flex: 1 1 calc(50% - 0.25rem);
    }

    .field-dates, .btn-search {
        flex: 1 1 100%;
    }
}

/* 568px - 667px landscape : Mode paysage smartphones */
@media (min-width: 568px) and (max-width: 667px) and (orientation: landscape) {
    .hero-section {
        min-height: 300px;
    }

    .search-form {
        flex-direction: row;
        flex-wrap: wrap;
    }

    .search-field {
        flex: 1 1 calc(33.333% - 0.5rem);
    }
}

/* 600px - 767px : Petites tablettes */
@media (min-width: 600px) and (max-width: 767px) {
    .search-field {
        flex: 1 1 calc(50% - 0.25rem);
    }

    .grid-2, .grid-3 {
        grid-template-columns: repeat(2, 1fr);
    }

    .footer-content {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* 768px - 1023px : Tablettes standard */
@media (min-width: 768px) and (max-width: 1023px) {
    .search-form {
        flex-wrap: wrap;
    }

    .search-field {
        flex: 1 1 calc(50% - 0.25rem);
    }

    .field-dates {
        flex: 1 1 100%;
    }

    .grid-2 {
        grid-template-columns: repeat(2, 1fr);
    }

    .grid-3 {
        grid-template-columns: repeat(3, 1fr);
    }

    .footer-content {
        grid-template-columns: repeat(3, 1fr);
    }

    .cta-content {
        flex-direction: row;
        justify-content: space-between;
        text-align: left;
    }
}

/* 1024px - 1279px : Grandes tablettes/petits laptops */
@media (min-width: 1024px) and (max-width: 1279px) {
    .search-form {
        flex-wrap: nowrap;
    }

    .search-field {
        flex: 1;
    }

    .field-dates {
        flex: 2;
    }

    .cta-content {
        flex-direction: row;
        justify-content: space-between;
        text-align: left;
    }
}

/* 1280px+ : Desktop et plus */
@media (min-width: 1280px) {
    .container {
        max-width: 1400px;
    }

    .search-field {
        flex: 1.2;
    }

    .field-dates {
        flex: 2.5;
    }

    .cta-content {
        flex-direction: row;
        justify-content: space-between;
        text-align: left;
    }

    .footer-content {
        grid-template-columns: 2fr 1fr 1.5fr 1fr;
    }
}

/* Mode contraste élevé */
@media (prefers-contrast: high) {
    .btn, .search-field, .property-card {
        border: 2px solid currentColor;
    }
}

/* Performance */
.property-card, .destination-card, .btn {
    will-change: transform;
    backface-visibility: hidden;
}

/* Utilitaires */
.hidden {
    display: none;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0,0,0,0);
    white-space: nowrap;
    border-width: 0;
}