/* ======================================================
   VARIABLES & IMPORTATIONS (Design System)
====================================================== */
@import url('https://fonts.googleapis.com/css2?family=Lora:ital,wght@0,400;0,600&family=Nunito:wght@400;600;700&display=swap');

:root {
    --primary: #9a6b45;
    --primary-hover: #7c5436;
    --bg-color: #fdfbf7;
    --card-bg: #ffffff;
    --text-main: #2d3748;
    --text-muted: #718096;
    --font-heading: 'Lora', serif;
    --font-body: 'Nunito', sans-serif;
    --shadow-sm: 0 2px 10px rgba(0,0,0,0.05);
    --shadow-md: 0 8px 25px rgba(0,0,0,0.08);
    --border-rad: 12px;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: var(--font-body);
    color: var(--text-main);
    background-color: var(--bg-color);
    line-height: 1.6;
}

h1, h2, h3, .logo, .prix {
    font-family: var(--font-heading);
    color: #1a202c;
}

/* ======================================================
   MENU (HEADER)
====================================================== */
.menu {
    height: auto;
    min-height: 75px;
    background-color: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 15px 8%;
    box-shadow: var(--shadow-sm);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.logo {
    font-size: 24px;
    font-weight: 600;
    color: var(--primary);
    text-decoration: none;
}

nav {
    display: flex;
    gap: 25px;
    align-items: center;
}

nav a {
    text-decoration: none;
    color: var(--text-main);
    font-weight: 600;
    font-size: 16px;
    transition: color 0.3s ease;
}

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

/* ======================================================
   GRANDE IMAGE (HERO)
====================================================== */
.hero {
    height: 65vh;
    min-height: 500px;
    background-image: linear-gradient(rgba(0,0,0,0.3), rgba(0,0,0,0.5)), url("images/gite.jpg");
    background-size: cover;
    background-position: center;
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
}

.hero-content {
    color: white;
    max-width: 800px;
    padding: 20px;
    animation: fadeIn 1s ease-out;
}

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

.hero h1 {
    font-size: 60px;
    margin-bottom: 20px;
    color: white;
    text-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

.hero p {
    font-size: 22px;
    margin-bottom: 40px;
    font-weight: 400;
}

/* ======================================================
   BOUTONS
====================================================== */
.bouton {
    display: inline-block;
    background-color: var(--primary);
    color: white;
    padding: 14px 32px;
    text-decoration: none;
    border-radius: 30px; /* Arrondi style pilule, plus moderne */
    font-weight: 700;
    font-size: 16px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(154, 107, 69, 0.3);
    border: none;
    cursor: pointer;
    text-align: center;
}

.bouton:hover {
    background-color: var(--primary-hover);
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(154, 107, 69, 0.4);
}

/* ======================================================
   SECTIONS GENERALES
====================================================== */
.section {
    max-width: 1100px;
    margin: auto;
    padding: 80px 20px;
    text-align: center;
}

.section h2, .prix-section h2 {
    font-size: 38px;
    margin-bottom: 30px;
    color: var(--primary);
}

.section p {
    font-size: 18px;
    color: var(--text-muted);
    max-width: 800px;
    margin: 0 auto 15px auto;
}

/* ======================================================
   INFORMATIONS (CHIFFRES)
====================================================== */
.infos {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 25px;
    margin-top: 50px;
}

.info {
    background-color: var(--card-bg);
    padding: 40px 20px;
    border-radius: var(--border-rad);
    box-shadow: var(--shadow-md);
    transition: transform 0.3s ease;
}

.info:hover {
    transform: translateY(-5px);
}

.info span {
    font-size: 45px;
    display: block;
    margin-bottom: 15px;
}

.info h3 {
    margin-bottom: 8px;
    font-size: 20px;
}

.info p {
    font-size: 15px;
    margin: 0;
}

/* ======================================================
   GALERIE (ACCUEIL & PAGE GALERIE)
====================================================== */
.galerie {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    margin-bottom: 40px;
}

/* Redéfinition pour l'accueil spécifiquement */
.section .galerie {
    grid-template-columns: 1fr 1fr;
    grid-template-rows: 1fr 1fr;
}

.galerie img, .img-more-container {
    width: 100%;
    height: 260px;
    object-fit: cover;
    border-radius: var(--border-rad);
    box-shadow: var(--shadow-sm);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    cursor: pointer;
}

.galerie img:hover, .img-more-container:hover {
    transform: scale(1.02);
    box-shadow: var(--shadow-md);
    z-index: 2;
}

.galerie-page h2 {
    margin-top: 60px;
    text-align: left;
    border-bottom: 2px solid #eaeaea;
    padding-bottom: 10px;
    margin-bottom: 30px;
}

/* Bouton Voir plus d'images */
.voir-plus {
    margin-top: 40px;
}

/* ======================================================
   PRIX
====================================================== */
.prix-section {
    background-color: #f4efe9;
    text-align: center;
    padding: 80px 20px;
}

.prix {
    font-size: 60px;
    font-weight: bold;
    margin-bottom: 35px;
    color: var(--primary);
}

.prix span {
    font-size: 24px;
    font-weight: normal;
    color: var(--text-muted);
}

/* ======================================================
   RESERVATION (CALENDRIER ET FORMULAIRE)
====================================================== */
.reservation-page {
    max-width: 1200px;
}

.info-saison {
    background: #fff8e7;
    padding: 18px 25px;
    border-radius: var(--border-rad);
    margin: 25px auto;
    max-width: 800px;
    color: #8a6d3b;
    border-left: 5px solid #f0c36d;
}

.booking-grid {
    display: grid;
    grid-template-columns: 1.4fr 1fr;
    gap: 30px;
    text-align: left;
    margin-top: 45px;
}

.calendar-card, .booking-card {
    background-color: var(--card-bg);
    padding: 35px;
    border-radius: var(--border-rad);
    box-shadow: var(--shadow-md);
}

.calendar-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
}

.calendar-head h2 {
    margin: 0;
    font-size: 24px;
}

.calendar-head button {
    border: none;
    background-color: #f0f0f0;
    border-radius: 50%;
    font-size: 24px;
    width: 45px;
    height: 45px;
    cursor: pointer;
    transition: background 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.calendar-head button:hover {
    background-color: #e2e2e2;
}

.weekdays, .calendar {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 8px;
}

.weekdays {
    font-weight: 700;
    text-align: center;
    font-size: 15px;
    color: var(--text-muted);
    margin-bottom: 10px;
}

.day {
    min-height: 55px;
    border: 1px solid #edf2f7;
    border-radius: 8px;
    background-color: #f7fafc;
    cursor: pointer;
    font-size: 16px;
    font-family: var(--font-body);
    transition: all 0.2s;
    font-weight: 600;
}

.day:not(.empty):not(.reserved):hover {
    background-color: #e2e8f0;
    border-color: #cbd5e0;
}

.day.empty { background-color: transparent; border: none; cursor: default; }

.day.reserved {
    background-color: #fff5f5;
    color: #feb2b2;
    cursor: not-allowed;
    text-decoration: line-through;
    border-color: #fed7d7;
}

.day.selected {
    background-color: var(--primary);
    color: white;
    border-color: var(--primary-hover);
    box-shadow: 0 2px 10px rgba(154, 107, 69, 0.4);
}

.day.today {
    outline: 2px solid var(--primary);
    outline-offset: -2px;
}

.legend {
    display: flex;
    gap: 20px;
    margin-top: 25px;
    font-size: 14px;
    justify-content: center;
    color: var(--text-muted);
}

/* Formulaire de réservation */
.booking-card label {
    display: block;
    font-weight: 700;
    margin: 20px 0 8px;
    color: var(--text-main);
}

.booking-card input, .booking-card textarea {
    width: 100%;
    padding: 14px;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    font-size: 16px;
    font-family: var(--font-body);
    transition: border-color 0.3s;
}

.booking-card input:focus, .booking-card textarea:focus {
    outline: none;
    border-color: var(--primary);
}

.price-box {
    background-color: #f8f6f2;
    padding: 20px;
    border-radius: 8px;
    margin: 25px 0;
    border: 1px solid #eaddcf;
}

.price-box div {
    display: flex;
    justify-content: space-between;
    font-size: 18px;
}

.price-box strong {
    color: var(--primary);
    font-size: 20px;
}

.status {
    padding: 15px;
    border-radius: 8px;
    font-weight: 600;
    margin-bottom: 20px;
}
.status.ok { background-color: #e6ffed; color: #22863a; }
.status.error { background-color: #ffeef0; color: #cb2431; }

/* ======================================================
   LIGHTBOX
====================================================== */
.lightbox {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.95);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

.lightbox.active { display: flex; }

.lightbox img {
    max-width: 90%;
    max-height: 85vh;
    object-fit: contain;
    border-radius: 8px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.5);
}

.fermer-lightbox {
    position: absolute;
    top: 30px;
    right: 40px;
    background: none;
    border: none;
    color: white;
    font-size: 50px;
    cursor: pointer;
    line-height: 1;
    transition: color 0.2s;
}
.fermer-lightbox:hover { color: var(--primary); }

.fleche {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.1);
    border: none;
    color: white;
    font-size: 40px;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.3s;
}
.fleche:hover { background: var(--primary); }
.fleche.gauche { left: 30px; }
.fleche.droite { right: 30px; }

/* ======================================================
   PIED DE PAGE
====================================================== */
footer {
    background-color: #1a202c;
    color: #a0aec0;
    text-align: center;
    padding: 30px;
    font-size: 15px;
}

/* ======================================================
   ADAPTATION MOBILE (RESPONSIVE)
====================================================== */
@media (max-width: 900px) {
    .galerie { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 800px) {
    .booking-grid { grid-template-columns: 1fr; }
    .infos { grid-template-columns: repeat(2, 1fr); gap: 15px; }
    .hero h1 { font-size: 42px; }
    .section { padding: 50px 20px; }
}

@media (max-width: 600px) {
    /* Menu Mobile */
    .menu {
        flex-direction: column;
        padding: 15px;
        gap: 15px;
    }
    nav {
        width: 100%;
        justify-content: center;
        flex-wrap: wrap;
        gap: 15px 25px;
    }
    
    .hero { min-height: 400px; height: 50vh; }
    .hero h1 { font-size: 35px; }
    .hero p { font-size: 18px; }
    
    .section .galerie { grid-template-columns: 1fr; }
    .galerie img, .img-more-container { height: 220px; }
    
    .calendar-card, .booking-card { padding: 20px; }
    .day { min-height: 45px; font-size: 14px; }
    
    .fleche { width: 45px; height: 45px; font-size: 25px; }
    .fleche.gauche { left: 10px; }
    .fleche.droite { right: 10px; }
    .fermer-lightbox { top: 15px; right: 20px; font-size: 40px; }
}

@media (max-width: 400px) {
    .infos { grid-template-columns: 1fr; }
    .galerie { grid-template-columns: 1fr; }
}