/* =============================================
   Les Amareyeurs - Stylesheet Principal
   Design : Moderne épuré, bleu/sable
   ============================================= */

/* --- Variables CSS --- */
:root {
    --sand: #FDFAF6;
    --sand-dark: #F5EDE3;
    --blue-light: #F0F7FA;
    --blue-medium: #D4E8F0;
    --blue: #4A90A4;
    --blue-dark: #1A3A4A;
    --warm: #D4A574;
    --warm-dark: #B8895A;
    --text: #2C3E50;
    --text-light: #6B7B8D;
    --white: #FFFFFF;
    --green: #27AE60;
    --red: #C0392B;
    --orange: #F39C12;
    --grey: #BDC3C7;
    --grey-light: #ECF0F1;

    --font-logo: 'Monsieur La Doulaise', cursive;
    --font-heading: 'DM Serif Display', serif;
    --font-body: 'Lato', sans-serif;

    --max-width: 1200px;
    --radius: 8px;
    --radius-lg: 16px;
    --shadow: 0 2px 12px rgba(0,0,0,0.08);
    --shadow-lg: 0 8px 32px rgba(0,0,0,0.12);
    --transition: 0.3s ease;
}

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

html { scroll-behavior: smooth; }

body {
    font-family: var(--font-body);
    font-size: 16px;
    line-height: 1.7;
    color: var(--text);
    background: var(--sand);
    -webkit-font-smoothing: antialiased;
}

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

a {
    color: var(--blue);
    text-decoration: none;
    transition: color var(--transition);
}
a:hover { color: var(--warm); }

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    color: var(--blue-dark);
    line-height: 1.3;
}

h1 { font-size: 2.5rem; margin-bottom: 1rem; }
h2 { font-size: 2rem; margin-bottom: 0.8rem; }
h3 { font-size: 1.5rem; margin-bottom: 0.6rem; }
h4 { font-size: 1.2rem; margin-bottom: 0.5rem; }

p { margin-bottom: 1rem; }

ul { list-style: none; }

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

/* --- Header Top Bar --- */
.header-top {
    background: var(--blue-dark);
    color: var(--white);
    font-size: 0.85rem;
    padding: 0.4rem 0;
}

.header-top-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.header-contact {
    display: flex;
    gap: 1.5rem;
}

.header-contact a {
    color: rgba(255,255,255,0.85);
    font-weight: 300;
}
.header-contact a:hover { color: var(--warm); }

.header-classification {
    color: var(--warm);
    font-weight: 700;
    letter-spacing: 0.5px;
}

/* --- Navigation --- */
.navbar {
    background: var(--white);
    box-shadow: var(--shadow);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.navbar-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.8rem 1.5rem;
}

.logo {
    display: flex;
    flex-direction: column;
    text-decoration: none;
}

.logo-text {
    font-family: var(--font-logo);
    font-size: 2rem;
    color: var(--blue-dark);
    line-height: 1;
}

.logo-sub {
    font-size: 0.75rem;
    color: var(--blue);
    text-transform: uppercase;
    letter-spacing: 3px;
    font-weight: 300;
}

.nav-menu {
    display: flex;
    gap: 0.2rem;
    align-items: center;
}

.nav-menu li a {
    display: block;
    padding: 0.6rem 1rem;
    color: var(--text);
    font-size: 0.95rem;
    font-weight: 400;
    border-radius: var(--radius);
    transition: all var(--transition);
}

.nav-menu li a:hover,
.nav-menu li a.active {
    color: var(--blue);
    background: var(--blue-light);
}

.nav-menu li a.nav-cta {
    background: var(--warm);
    color: var(--white);
    font-weight: 700;
    padding: 0.6rem 1.5rem;
    border-radius: 50px;
}
.nav-menu li a.nav-cta:hover {
    background: var(--warm-dark);
    color: var(--white);
}

/* Hamburger */
.nav-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 5px;
}

.nav-toggle span {
    display: block;
    width: 28px;
    height: 3px;
    background: var(--blue-dark);
    border-radius: 2px;
    transition: all var(--transition);
}

.nav-toggle.active span:nth-child(1) { transform: rotate(45deg) translate(5px, 6px); }
.nav-toggle.active span:nth-child(2) { opacity: 0; }
.nav-toggle.active span:nth-child(3) { transform: rotate(-45deg) translate(5px, -6px); }

/* --- Hero Section --- */
.hero {
    position: relative;
    height: 70vh;
    min-height: 500px;
    overflow: hidden;
}

.hero-slider {
    position: absolute;
    inset: 0;
}

.hero-slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    transition: opacity 1.5s ease;
}

.hero-slide.active { opacity: 1; }

.hero-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to bottom, rgba(26,58,74,0.2) 0%, rgba(26,58,74,0.6) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: var(--white);
    padding: 2rem;
}

.hero-content h1 {
    font-family: 'Playfair Display', serif;
    font-size: 3rem;
    font-weight: 700;
    color: var(--white);
    margin-bottom: 0.5rem;
    text-shadow: 0 2px 8px rgba(0,0,0,0.3);
}

.hero-content p {
    font-size: 1.3rem;
    font-weight: 300;
    margin-bottom: 2rem;
    text-shadow: 0 1px 4px rgba(0,0,0,0.3);
}

.hero-stars {
    font-size: 1.1rem;
    color: var(--warm);
    margin-bottom: 1rem;
    letter-spacing: 3px;
}

/* --- Buttons --- */
.btn {
    display: inline-block;
    padding: 0.8rem 2rem;
    border-radius: 50px;
    font-weight: 700;
    font-size: 1rem;
    cursor: pointer;
    border: none;
    transition: all var(--transition);
    text-align: center;
    text-decoration: none;
}

.btn-primary {
    background: var(--warm);
    color: var(--white);
}
.btn-primary:hover {
    background: var(--warm-dark);
    color: var(--white);
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(212,165,116,0.4);
}

.btn-secondary {
    background: var(--blue);
    color: var(--white);
}
.btn-secondary:hover {
    background: var(--blue-dark);
    color: var(--white);
    transform: translateY(-2px);
}

.btn-outline {
    background: transparent;
    color: var(--white);
    border: 2px solid var(--white);
}
.btn-outline:hover {
    background: var(--white);
    color: var(--blue-dark);
}

/* --- Sections --- */
.section {
    padding: 5rem 0;
}

.section-alt {
    background: var(--blue-light);
}

.section-title {
    text-align: center;
    margin-bottom: 3rem;
}

.section-title h2 {
    position: relative;
    display: inline-block;
}

.section-title h2::after {
    content: '';
    display: block;
    width: 60px;
    height: 3px;
    background: var(--warm);
    margin: 0.8rem auto 0;
    border-radius: 2px;
}

.section-title p {
    color: var(--text-light);
    font-size: 1.1rem;
    margin-top: 0.5rem;
}

/* --- Feature Cards (Accueil) --- */
.features-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
}

.feature-card {
    background: var(--white);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: transform var(--transition), box-shadow var(--transition);
    text-align: center;
}

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

.feature-card-img {
    height: 200px;
    overflow: hidden;
}

.feature-card-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

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

.feature-card-body {
    padding: 1.5rem;
}

.feature-card-body h3 {
    margin-bottom: 0.5rem;
}

.feature-card-body p {
    color: var(--text-light);
    font-size: 0.95rem;
}

/* --- Photo Grid --- */
.photo-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1rem;
}

.photo-grid-item {
    border-radius: var(--radius);
    overflow: hidden;
    cursor: pointer;
    aspect-ratio: 4/3;
    position: relative;
}

.photo-grid-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.photo-grid-item:hover img {
    transform: scale(1.08);
}

/* --- Lightbox --- */
.lightbox {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 2000;
    background: rgba(0,0,0,0.9);
    align-items: center;
    justify-content: center;
    padding: 2rem;
}

.lightbox.active { display: flex; }

.lightbox img {
    max-width: 90%;
    max-height: 85vh;
    border-radius: var(--radius);
    object-fit: contain;
}

.lightbox-close {
    position: absolute;
    top: 1.5rem;
    right: 1.5rem;
    background: none;
    border: none;
    color: var(--white);
    font-size: 2.5rem;
    cursor: pointer;
    line-height: 1;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.lightbox-prev,
.lightbox-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255,255,255,0.1);
    border: none;
    color: var(--white);
    font-size: 2rem;
    cursor: pointer;
    padding: 1rem;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background var(--transition);
}

.lightbox-prev:hover,
.lightbox-next:hover { background: rgba(255,255,255,0.2); }

.lightbox-prev { left: 1.5rem; }
.lightbox-next { right: 1.5rem; }

/* --- Tarifs Table --- */
.tarifs-year-nav {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 2rem;
    margin-bottom: 2rem;
}

.tarifs-year-nav a {
    font-size: 1.1rem;
    font-weight: 700;
}

.tarifs-year-nav .current-year {
    font-size: 1.8rem;
    font-family: var(--font-heading);
    color: var(--blue-dark);
}

.tarifs-month {
    margin-bottom: 2rem;
}

.tarifs-month h3 {
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--blue-medium);
}

.tarifs-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    margin-bottom: 1rem;
}

.tarifs-table th,
.tarifs-table td {
    padding: 0.7rem 0.5rem;
    text-align: center;
    border-bottom: 1px solid var(--grey-light);
    font-size: 0.9rem;
}

.tarifs-table thead th {
    background: var(--blue-dark);
    color: var(--white);
    font-weight: 700;
    font-size: 0.8rem;
    line-height: 1.3;
}

.tarifs-table thead th.vacances {
    background: var(--orange);
}

.tarifs-table tbody tr:last-child td {
    border-bottom: none;
}

.tarifs-table td.status-available {
    background: #E8F5E9;
}

.tarifs-table td.status-available a {
    color: var(--green);
    font-weight: 700;
    text-decoration: none;
}
.tarifs-table td.status-available a:hover {
    text-decoration: underline;
}

.tarifs-table td.status-booked {
    background: #FFEBEE;
    color: var(--red);
    font-weight: 700;
}

.tarifs-table td.status-option {
    background: #FFF8E1;
    color: var(--orange);
    font-weight: 700;
}

.tarifs-table td.status-blocked {
    background: var(--grey-light);
    color: var(--grey);
}

.tarifs-legend {
    display: flex;
    gap: 1.5rem;
    flex-wrap: wrap;
    margin: 1rem 0 2rem;
    font-size: 0.9rem;
}

.tarifs-legend-item {
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.tarifs-legend-color {
    width: 16px;
    height: 16px;
    border-radius: 3px;
}

/* --- Amenities Grid --- */
.amenities-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 1.5rem;
}

.amenity-item {
    display: flex;
    align-items: flex-start;
    gap: 0.8rem;
    padding: 1rem;
    background: var(--white);
    border-radius: var(--radius);
    box-shadow: 0 1px 4px rgba(0,0,0,0.05);
}

.amenity-icon {
    font-size: 1.5rem;
    flex-shrink: 0;
    width: 40px;
    height: 40px;
    background: var(--blue-light);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.amenity-text h4 {
    font-size: 1rem;
    margin-bottom: 0.2rem;
}

.amenity-text p {
    font-size: 0.85rem;
    color: var(--text-light);
    margin-bottom: 0;
}

/* --- Property Description --- */
.property-intro {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    align-items: center;
}

.property-intro-img {
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-lg);
}

.property-intro-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* --- Floor Details --- */
.floor-section {
    margin-bottom: 3rem;
}

.floor-section h3 {
    position: relative;
    padding-left: 1rem;
}

.floor-section h3::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 4px;
    background: var(--warm);
    border-radius: 2px;
}

.floor-details {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1rem;
    margin-top: 1rem;
}

.floor-detail-item {
    padding: 1rem 1.2rem;
    background: var(--white);
    border-radius: var(--radius);
    border-left: 3px solid var(--blue);
}

/* --- Forms --- */
.form-section {
    max-width: 700px;
    margin: 0 auto;
}

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

.form-group label {
    display: block;
    margin-bottom: 0.4rem;
    font-weight: 700;
    color: var(--blue-dark);
    font-size: 0.95rem;
}

.form-group label .required {
    color: var(--red);
}

.form-control {
    width: 100%;
    padding: 0.8rem 1rem;
    border: 2px solid var(--grey-light);
    border-radius: var(--radius);
    font-family: var(--font-body);
    font-size: 1rem;
    color: var(--text);
    background: var(--white);
    transition: border-color var(--transition);
}

.form-control:focus {
    outline: none;
    border-color: var(--blue);
    box-shadow: 0 0 0 3px rgba(74,144,164,0.15);
}

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

select.form-control {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%232C3E50' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 1rem center;
    padding-right: 2.5rem;
}

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

.form-errors {
    background: #FFEBEE;
    border: 1px solid var(--red);
    border-radius: var(--radius);
    padding: 1rem 1.5rem;
    margin-bottom: 1.5rem;
}

.form-errors ul {
    list-style: disc;
    padding-left: 1.2rem;
}

.form-errors li {
    color: var(--red);
    font-size: 0.9rem;
}

/* Honeypot */
.hp-field { position: absolute; left: -9999px; }

/* --- Flash Messages --- */
.flash {
    max-width: var(--max-width);
    margin: 1rem auto;
    padding: 1rem 1.5rem;
    border-radius: var(--radius);
    font-weight: 700;
}

.flash-success {
    background: #E8F5E9;
    color: var(--green);
    border: 1px solid var(--green);
}

.flash-error {
    background: #FFEBEE;
    color: var(--red);
    border: 1px solid var(--red);
}

/* --- Confirmation Page --- */
.confirmation-box {
    text-align: center;
    padding: 4rem 2rem;
    max-width: 600px;
    margin: 0 auto;
}

.confirmation-icon {
    font-size: 4rem;
    color: var(--green);
    margin-bottom: 1rem;
}

/* --- Oleron Page --- */
.oleron-section {
    margin-bottom: 3rem;
}

.oleron-card {
    display: grid;
    grid-template-columns: 300px 1fr;
    gap: 2rem;
    background: var(--white);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow);
    margin-bottom: 2rem;
}

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

.oleron-card-body {
    padding: 2rem;
}

.oleron-activities {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 1rem;
}

.oleron-activity {
    padding: 1rem;
    background: var(--white);
    border-radius: var(--radius);
    text-align: center;
    box-shadow: 0 1px 4px rgba(0,0,0,0.05);
}

.oleron-activity-icon {
    font-size: 2rem;
    margin-bottom: 0.5rem;
}

/* --- Conditions Page --- */
.conditions-content {
    max-width: 800px;
    margin: 0 auto;
}

.conditions-content h3 {
    margin-top: 2rem;
    color: var(--blue);
}

.conditions-content ul {
    list-style: disc;
    padding-left: 1.5rem;
    margin-bottom: 1rem;
}

.conditions-content li {
    margin-bottom: 0.3rem;
}

/* --- Info Box --- */
.info-box {
    background: var(--blue-light);
    border-left: 4px solid var(--blue);
    padding: 1.5rem;
    border-radius: 0 var(--radius) var(--radius) 0;
    margin: 1.5rem 0;
}

.info-box strong {
    color: var(--blue-dark);
}

/* --- Page Hero (small) --- */
.page-hero {
    position: relative;
    padding: 4rem 0;
    text-align: center;
    color: var(--white);
    background-color: var(--blue-dark);
    background-size: cover;
    background-position: center;
    min-height: 220px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.page-hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(26, 58, 74, 0.6);
}

.page-hero .container {
    position: relative;
    z-index: 1;
}

.page-hero h1 {
    font-family: 'Playfair Display', serif;
    font-weight: 700;
    color: var(--white);
    margin-bottom: 0.5rem;
    text-shadow: 0 2px 8px rgba(0,0,0,0.3);
}

.page-hero p {
    color: rgba(255,255,255,0.85);
    font-size: 1.1rem;
    text-shadow: 0 1px 4px rgba(0,0,0,0.3);
}

/* --- Footer --- */
.site-footer {
    background: var(--blue-dark);
    color: rgba(255,255,255,0.8);
    padding: 4rem 0 0;
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.5fr 1fr 1fr 1fr;
    gap: 2rem;
}

.footer-logo {
    font-family: var(--font-logo);
    font-size: 2rem;
    color: var(--white);
    margin-bottom: 1rem;
}

.footer-stars {
    color: var(--warm);
    font-weight: 700;
}

.site-footer h4 {
    color: var(--white);
    font-size: 1rem;
    margin-bottom: 1rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.site-footer a {
    color: rgba(255,255,255,0.7);
}
.site-footer a:hover {
    color: var(--warm);
}

.footer-col ul li {
    margin-bottom: 0.4rem;
}

.footer-bottom {
    margin-top: 3rem;
    padding: 1.5rem 0;
    border-top: 1px solid rgba(255,255,255,0.1);
    text-align: center;
    font-size: 0.85rem;
}

/* --- Responsive --- */
@media (max-width: 1024px) {
    .features-grid { grid-template-columns: repeat(2, 1fr); }
    .property-intro { grid-template-columns: 1fr; }
    .oleron-card { grid-template-columns: 1fr; }
    .oleron-card-img { height: 250px; }
    .footer-grid { grid-template-columns: 1fr 1fr; gap: 2rem; }
}

@media (max-width: 768px) {
    h1 { font-size: 2rem; }
    h2 { font-size: 1.6rem; }

    .header-top { display: none; }

    .nav-toggle { display: flex; }

    .nav-menu {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: var(--white);
        box-shadow: var(--shadow-lg);
        flex-direction: column;
        padding: 1rem;
    }

    .nav-menu.active { display: flex; }

    .nav-menu li a {
        padding: 0.8rem 1rem;
        border-bottom: 1px solid var(--grey-light);
    }

    .hero { height: 50vh; min-height: 350px; }
    .hero-content h1 { font-size: 2.5rem; }
    .hero-content p { font-size: 1rem; }

    .features-grid { grid-template-columns: 1fr; }
    .form-row { grid-template-columns: 1fr; }
    .footer-grid { grid-template-columns: 1fr; }

    .tarifs-table { font-size: 0.8rem; }
    .tarifs-table th, .tarifs-table td { padding: 0.4rem 0.3rem; }

    .section { padding: 3rem 0; }
}

@media (max-width: 480px) {
    .hero-content h1 { font-size: 2rem; }
    .btn { padding: 0.7rem 1.5rem; font-size: 0.9rem; }

    .tarifs-table-wrapper { overflow-x: auto; }
}

/* --- Utility --- */
.text-center { text-align: center; }
.text-light { color: var(--text-light); }
.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.mb-4 { margin-bottom: 2rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mt-4 { margin-top: 2rem; }
