/* =============================================
   Vacances à la Baule — Feuille de style principale
   ============================================= */

:root {
    --navy:  #1a3c5e;
    --navy2: #16324e;
    --sand:  #f5e6c8;
    --sand2: #f0d9a8;
    --coral: #e07d5a;
    --teal:  #2e9caa;
    --white: #ffffff;
    --gray:  #f4f6f8;
    --text:  #333333;
    --muted: #888888;
    --error: #e74c3c;
    --ok:    #27ae60;
    --radius: 10px;
    --shadow: 0 4px 16px rgba(0,0,0,.1);
    --transition: .25s ease;
}

/* === Reset & Base === */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body { font-family: 'Segoe UI', Arial, sans-serif; color: var(--text); background: #fff; line-height: 1.6; }
img { max-width: 100%; height: auto; display: block; }
a { color: var(--navy); text-decoration: none; }

/* === Header === */
.site-header {
    position: sticky; top: 0; z-index: 100;
    background: var(--navy);
    box-shadow: 0 2px 8px rgba(0,0,0,.2);
}
.header-inner {
    max-width: 1100px; margin: 0 auto;
    display: flex; align-items: center; justify-content: space-between;
    padding: 14px 20px;
}
.site-logo { color: #fff; font-size: 20px; font-weight: bold; letter-spacing: .5px; }
.site-logo span { color: var(--sand); }
.site-nav a {
    color: rgba(255,255,255,.85); font-size: 14px; margin-left: 24px;
    transition: color var(--transition);
}
.site-nav a:hover { color: #fff; }
.btn-reserve-header {
    background: var(--coral); color: #fff !important; padding: 8px 18px;
    border-radius: 20px; font-weight: bold; font-size: 13px;
    transition: background var(--transition);
}
.btn-reserve-header:hover { background: #c96744; }

/* === Hero === */
.hero {
    position: relative; height: 90vh; min-height: 540px;
    overflow: hidden; display: flex; align-items: center; justify-content: center;
}
.hero-bg {
    position: absolute; inset: 0;
    background-size: cover; background-position: center;
    transform: scale(1.05);
    transition: transform 8s ease-out;
}
.hero-bg.loaded { transform: scale(1); }
.hero-overlay { position: absolute; inset: 0; background: linear-gradient(to bottom, rgba(10,30,50,.35) 0%, rgba(10,30,50,.7) 100%); }
.hero-content { position: relative; z-index: 2; text-align: center; color: #fff; padding: 20px; }
.hero-content h1 { font-size: clamp(2rem, 5vw, 3.5rem); font-weight: bold; text-shadow: 0 2px 8px rgba(0,0,0,.4); margin-bottom: 12px; }
.hero-content .subtitle { font-size: clamp(1rem, 2.5vw, 1.3rem); opacity: .9; margin-bottom: 8px; }
.hero-badges { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; margin: 20px 0; }
.hero-badge { background: rgba(255,255,255,.2); backdrop-filter: blur(4px); border: 1px solid rgba(255,255,255,.3); color: #fff; padding: 6px 16px; border-radius: 20px; font-size: 14px; }
.hero-badge strong { color: var(--sand); }
.btn-hero {
    display: inline-block; background: var(--coral); color: #fff; padding: 16px 40px;
    border-radius: 30px; font-size: 18px; font-weight: bold;
    box-shadow: 0 4px 16px rgba(224,125,90,.5);
    transition: transform var(--transition), box-shadow var(--transition);
}
.btn-hero:hover { transform: translateY(-2px); box-shadow: 0 8px 24px rgba(224,125,90,.6); }
.hero-scroll { position: absolute; bottom: 28px; left: 50%; transform: translateX(-50%); color: rgba(255,255,255,.7); font-size: 13px; animation: bounce 2s infinite; }
@keyframes bounce { 0%,100%{transform:translateX(-50%) translateY(0)} 50%{transform:translateX(-50%) translateY(8px)} }

/* === Sections === */
.section { padding: 80px 20px; }
.section-alt { background: var(--gray); }
.section-dark { background: var(--navy); color: #fff; }
.container { max-width: 1100px; margin: 0 auto; }
.section-title { text-align: center; margin-bottom: 48px; }
.section-title h2 { font-size: clamp(1.6rem, 3vw, 2.2rem); color: var(--navy); margin-bottom: 10px; }
.section-dark .section-title h2 { color: var(--sand); }
.section-title p { color: var(--muted); font-size: 16px; }
.section-dark .section-title p { color: rgba(255,255,255,.7); }
.section-title::after { content: ''; display: block; width: 60px; height: 3px; background: var(--coral); margin: 16px auto 0; border-radius: 2px; }

/* === Highlights === */
.highlights { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 24px; margin-bottom: 40px; }
.highlight-card { background: #fff; border-radius: var(--radius); padding: 24px; box-shadow: var(--shadow); text-align: center; transition: transform var(--transition); }
.highlight-card:hover { transform: translateY(-4px); }
.highlight-icon { font-size: 36px; margin-bottom: 12px; }
.highlight-card h3 { font-size: 16px; color: var(--navy); margin-bottom: 6px; }
.highlight-card p { font-size: 14px; color: var(--muted); }

/* === Description === */
.desc-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: center; }
.desc-text h2 { font-size: 1.8rem; color: var(--navy); margin-bottom: 16px; }
.desc-text p { color: #555; margin-bottom: 14px; line-height: 1.8; }
.desc-text .note { background: var(--sand); border-left: 4px solid var(--coral); padding: 12px 16px; border-radius: 0 6px 6px 0; font-size: 14px; color: #664; }
.desc-img { border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); aspect-ratio: 4/3; }
.desc-img img { width: 100%; height: 100%; object-fit: cover; }
@media(max-width:768px) { .desc-grid { grid-template-columns: 1fr; } }

/* === Galerie === */
.gallery { display: grid; grid-template-columns: 2fr 1fr 1fr; grid-template-rows: 260px 260px 260px; gap: 8px; border-radius: var(--radius); overflow: hidden; }
.gallery-item { overflow: hidden; cursor: pointer; }
.gallery-item img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s ease; }
.gallery-item:hover img { transform: scale(1.06); }
.gallery-item.main { grid-row: span 2; }
/* Combler la case vide dans la galerie appartement (7 photos, grille 3 col) */
.gallery:not(.gallery-dest) .gallery-item:last-child:nth-child(3n+1) { grid-column: span 2; }
/* Galerie destination : layout 3 photos (ligne 1) + 2 photos (ligne 2) */
.gallery.gallery-dest { grid-template-columns: repeat(6, 1fr); grid-template-rows: 260px 260px; }
.gallery.gallery-dest .gallery-item:nth-child(-n+3) { grid-column: span 2; }
.gallery.gallery-dest .gallery-item:nth-child(n+4)  { grid-column: span 3; }
@media(max-width:600px) { .gallery { grid-template-columns: 1fr 1fr; grid-template-rows: auto; } .gallery-item.main { grid-row: span 1; } }

/* Lightbox */
.lightbox { display: none; position: fixed; inset: 0; background: rgba(0,0,0,.92); z-index: 500; align-items: center; justify-content: center; }
.lightbox.open { display: flex; }
.lightbox img { max-width: 92vw; max-height: 88vh; border-radius: 6px; box-shadow: 0 8px 40px rgba(0,0,0,.6); }
.lightbox-close { position: absolute; top: 20px; right: 24px; color: #fff; font-size: 36px; cursor: pointer; line-height: 1; }
.lightbox-nav { position: absolute; top: 50%; transform: translateY(-50%); background: rgba(255,255,255,.15); color: #fff; border: none; font-size: 28px; padding: 12px 18px; cursor: pointer; border-radius: 4px; }
.lightbox-nav.prev { left: 12px; }
.lightbox-nav.next { right: 12px; }

/* === Chambres === */
.rooms { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 24px; }
.room-card { background: #fff; border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); }
.room-card img { width: 100%; height: 200px; object-fit: cover; }
.room-info { padding: 20px; }
.room-info h3 { font-size: 17px; color: var(--navy); margin-bottom: 8px; }
.room-info p { font-size: 14px; color: var(--muted); }

/* === Équipements === */
.amenities-cats-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
/* Combler la case vide quand le dernier item est 2e dans sa rangée (ex: 8 catégories) */
.amenities-cats-grid .amenities-category:last-child:nth-child(3n+2) { grid-column: span 2; }
@media (max-width: 900px) { .amenities-cats-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .amenities-cats-grid { grid-template-columns: 1fr; } }
.amenities-category { background: #fff; border: 1px solid #e4e0d8; border-radius: var(--radius); padding: 20px 22px; box-shadow: 0 2px 8px rgba(0,0,0,.06); }
.amenities-cat-title { font-size: 13px; font-weight: 700; color: var(--navy); text-transform: uppercase; letter-spacing: .07em; margin-bottom: 14px; padding-bottom: 8px; border-bottom: 2px solid var(--sand); display: block; }
.amenities-grid { display: flex; flex-direction: column; gap: 9px; }
.amenity { display: flex; align-items: center; gap: 10px; font-size: 14px; color: #444; }
.amenity .ico { font-size: 17px; width: 26px; text-align: center; flex-shrink: 0; }

/* === Tarifs === */
.tarifs { display: flex; gap: 20px; justify-content: center; flex-wrap: wrap; }
.tarif-card { background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.2); border-radius: var(--radius); padding: 28px; text-align: center; min-width: 200px; }
.tarif-card .prix { font-size: 2rem; font-weight: bold; color: var(--sand); }
.tarif-card .saison { font-size: 14px; color: rgba(255,255,255,.7); margin-top: 4px; }
.tarif-card .mention { font-size: 12px; opacity: .6; margin-top: 8px; }
.tarif-note { text-align: center; margin-top: 24px; font-size: 14px; opacity: .75; }

/* === Avis === */
.reviews { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 20px; }
.review-card { background: #fff; border-radius: var(--radius); padding: 24px; box-shadow: var(--shadow); }
.review-stars { color: #f39c12; font-size: 16px; margin-bottom: 12px; }
.review-text { font-size: 14px; color: #555; font-style: italic; line-height: 1.7; margin-bottom: 14px; }
.review-author { font-size: 13px; color: var(--navy); font-weight: bold; }
.review-date { font-size: 12px; color: var(--muted); }
.rating-summary { text-align: center; margin-bottom: 40px; }
.rating-big { font-size: 4rem; font-weight: bold; color: var(--navy); line-height: 1; }
.rating-stars { color: #f39c12; font-size: 24px; margin: 4px 0; }
.rating-count { color: var(--muted); font-size: 14px; }

/* === Calendrier === */
.cal-wrap { background: #fff; border-radius: var(--radius); box-shadow: var(--shadow); padding: 24px; max-width: 700px; margin: 0 auto; }
.cal-nav { display: flex; align-items: center; justify-content: space-between; margin-bottom: 20px; }
.cal-nav button { background: none; border: 2px solid var(--navy); color: var(--navy); padding: 6px 16px; border-radius: 20px; cursor: pointer; font-size: 16px; transition: all var(--transition); }
.cal-nav button:hover { background: var(--navy); color: #fff; }
.cal-title { font-size: 18px; color: var(--navy); font-weight: bold; }
.cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; }
.cal-day-header { text-align: center; font-size: 12px; font-weight: bold; color: var(--muted); padding: 6px 0; }
.cal-day {
    text-align: center; padding: 8px 4px; border-radius: 6px; font-size: 14px;
    cursor: pointer; transition: all .15s; border: 2px solid transparent;
    position: relative;
}
.cal-day.empty { pointer-events: none; }
.cal-day.past { color: #ccc; pointer-events: none; }
.cal-day.occupied { background: #fde8e8; color: #c0392b; pointer-events: none; font-size: 13px; }
.cal-day.occupied::after { content: ''; position: absolute; bottom: 3px; left: 50%; transform: translateX(-50%); width: 4px; height: 4px; background: #e74c3c; border-radius: 50%; }
.cal-day.pending {
    background: repeating-linear-gradient(
        45deg,
        #fff8ec,
        #fff8ec 4px,
        #fde9b8 4px,
        #fde9b8 8px
    );
    color: #9a6700;
    pointer-events: none;
    font-size: 13px;
}
.cal-day.pending::after { content: ''; position: absolute; bottom: 3px; left: 50%; transform: translateX(-50%); width: 4px; height: 4px; background: #f39c12; border-radius: 50%; }
.cal-day.available:hover { background: var(--sand); border-color: var(--coral); }
.cal-day.selected-start, .cal-day.selected-end { background: var(--navy); color: #fff; border-color: var(--navy); }
.cal-day.in-range { background: var(--sand); }
.cal-legend { display: flex; gap: 20px; justify-content: center; margin-top: 16px; font-size: 13px; color: var(--muted); flex-wrap: wrap; }
.cal-legend span { display: flex; align-items: center; gap: 6px; }
.cal-legend .dot { width: 12px; height: 12px; border-radius: 3px; }

/* === Formulaire de réservation === */
#reservation { background: linear-gradient(135deg, #e8f4f8 0%, #f5e6c8 100%); }
.booking-form { background: #fff; border-radius: var(--radius); box-shadow: var(--shadow); padding: 40px; max-width: 720px; margin: 0 auto; }
.booking-form h3 { color: var(--navy); font-size: 20px; margin-bottom: 8px; }
.booking-form .subtitle { color: var(--muted); font-size: 14px; margin-bottom: 28px; border-bottom: 2px solid var(--sand); padding-bottom: 16px; }
.form-section { margin-bottom: 28px; }
.form-section-title { font-size: 15px; font-weight: bold; color: var(--navy); margin-bottom: 14px; padding-bottom: 6px; border-bottom: 1px solid #eee; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form-group { margin-bottom: 16px; }
.form-group.full { grid-column: span 2; }
label { display: block; font-size: 13px; color: #555; margin-bottom: 5px; font-weight: 600; }
label span { color: var(--error); }
input[type=text], input[type=email], input[type=tel], input[type=date], input[type=number], textarea, select {
    width: 100%; padding: 11px 14px;
    border: 2px solid #ddd; border-radius: 6px; font-size: 15px;
    transition: border-color var(--transition);
    background: #fff; color: var(--text); font-family: inherit;
}
input:focus, textarea:focus, select:focus { outline: none; border-color: var(--navy); }
input.error-field { border-color: var(--error); }
textarea { resize: vertical; min-height: 90px; }
.date-info { background: var(--sand); border-radius: 6px; padding: 10px 14px; font-size: 13px; color: #664; margin-top: 8px; }
.price-preview { background: var(--navy); color: #fff; border-radius: 8px; padding: 16px 20px; margin: 16px 0; display: none; }
.price-preview.show { display: block; }
.price-preview .total { font-size: 24px; font-weight: bold; color: var(--sand); }
.dispo-ok  { color: var(--ok); font-size: 13px; margin-top: 6px; }
.dispo-err { color: var(--error); font-size: 13px; margin-top: 6px; }
.btn-submit {
    width: 100%; padding: 16px; background: var(--coral); color: #fff; border: none;
    border-radius: 30px; font-size: 18px; font-weight: bold; cursor: pointer;
    transition: all var(--transition); margin-top: 8px;
    box-shadow: 0 4px 16px rgba(224,125,90,.4);
}
.btn-submit:hover { background: #c96744; transform: translateY(-1px); }
.btn-submit:disabled { background: #ccc; cursor: not-allowed; transform: none; box-shadow: none; }
.form-notice { font-size: 12px; color: var(--muted); text-align: center; margin-top: 12px; line-height: 1.6; }
.form-success { display: none; text-align: center; padding: 40px 20px; }
.form-success.show { display: block; }
.form-success .icon { font-size: 64px; margin-bottom: 16px; }
.form-success h3 { color: var(--ok); font-size: 22px; margin-bottom: 10px; }
.form-success p { color: #555; }

/* === Emplacement === */
.location-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; align-items: center; }
.location-text h2 { font-size: 1.8rem; color: var(--navy); margin-bottom: 16px; }
.location-list { list-style: none; }
.location-list li { display: flex; align-items: flex-start; gap: 10px; margin-bottom: 12px; font-size: 15px; color: #555; }
.location-list li::before { content: '📍'; }
.location-map { border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); }
.location-map iframe { width: 100%; height: 340px; border: none; }
@media(max-width:768px) { .location-grid { grid-template-columns: 1fr; } }

/* === Footer === */
.site-footer { background: #0f2538; color: rgba(255,255,255,.7); padding: 40px 20px; text-align: center; font-size: 14px; }
.site-footer .footer-inner { max-width: 600px; margin: 0 auto; }
.site-footer a { color: var(--sand); }
.site-footer .links { margin: 16px 0; display: flex; gap: 20px; justify-content: center; flex-wrap: wrap; }
.site-footer .copy { margin-top: 16px; font-size: 12px; opacity: .6; }

/* === Toast notifications === */
.toast-wrap { position: fixed; top: 80px; right: 20px; z-index: 999; display: flex; flex-direction: column; gap: 8px; }
.toast { background: #fff; border-radius: 8px; padding: 14px 20px; box-shadow: 0 4px 16px rgba(0,0,0,.15); font-size: 14px; max-width: 340px; border-left: 4px solid var(--navy); animation: slideIn .3s ease; }
.toast.ok { border-color: var(--ok); }
.toast.err { border-color: var(--error); }
@keyframes slideIn { from { transform: translateX(100%); opacity: 0; } to { transform: translateX(0); opacity: 1; } }

/* === Responsive === */
@media(max-width:900px) { .gallery { grid-template-columns: 1fr 1fr; } .gallery-item.main { grid-row: span 1; grid-column: span 2; } .gallery.gallery-dest { grid-template-columns: 1fr 1fr; grid-template-rows: auto; } .gallery.gallery-dest .gallery-item { grid-column: span 1; } }
@media(max-width:600px) {
    .site-nav { display: none; }
    .form-grid { grid-template-columns: 1fr; }
    .form-group.full { grid-column: span 1; }
    .section { padding: 48px 16px; }
    .booking-form { padding: 24px 16px; }
}
