/* Reset et styles de base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'verdana', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f4f4f4;
}

/* Navigation Bar */
.navbar {
    background: linear-gradient(135deg, #2c3e50 0%, #3498db 100%);
    padding: 0;
    position: sticky;
    top: 0;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
    z-index: 100;
}

.nav-container {
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.3rem 1rem;
}

.logo img, 
.navbar-brand img, 
nav img,
.site-logo {
    height: 70px !important;       
    width: auto !important;        
    max-height: 100%;   
    object-fit: contain;
    clip-path: inset(10px 5px 9px 5px);
}

/* Sélecteur de langue (aligné à droite du logo et agrandi) */
.logo-container {
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    gap: 15px;
    flex-wrap: nowrap;
}

.lang-switch {
    display: flex;
    flex-direction: row;
    gap: 6px;
    align-items: center;
}

.lang-btn {
    background: transparent;
    border: 1px solid transparent;
    font-size: 1.8rem;
    cursor: pointer;
    padding: 2px 6px;
    border-radius: 6px;
    transition: transform 0.2s, background-color 0.2s;
    line-height: 1;
}

.lang-btn:hover {
    transform: scale(1.15);
}

.lang-btn.active {
    border-color: rgba(255, 255, 255, 0.6);
    background-color: rgba(255, 255, 255, 0.2);
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 0.6rem;
    align-items: center;
}

.nav-link {
    color: white;
    text-decoration: none;
    font-weight: 800;
    padding: 0.5rem 0.8rem;
    border-radius: 4px;
    transition: all 0.3s ease;
    cursor: pointer;
    font-size: 0.95rem;
    white-space: nowrap;
}

.nav-link:hover {
    background-color: rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
}

.nav-link.active {
    background-color: rgba(255, 255, 255, 0.3);
    border-bottom: 3px solid white;
}

/* Bouton Je Réserve */
.nav-btn-reserve {
    background-color: #e74c3c;
    color: white !important;
    text-decoration: none;
    font-weight: 800;
    padding: 0.5rem 1.2rem;
    border-radius: 25px;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0,0,0,0.2);
    white-space: nowrap;
    font-size: 0.95rem;
    display: inline-block;
}

.nav-btn-reserve:hover {
    background-color: #c0392b;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.3);
}

/* Pages Container */
.pages-container {
    max-width: 1300px;
    margin: 0 auto;
    min-height: calc(100vh - 200px);
}

.page {
    display: none;
    animation: fadeIn 0.5s ease-in;
}

.page.active {
    display: block;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* HERO SECTION */
.hero-section {
    position: relative;
    height: 60vh;
    background: linear-gradient(rgba(0, 0, 0, 0.4), rgba(0, 0, 0, 0.4)), 
                url('images/couverture.jpg?v=2') center/cover no-repeat;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: #ffffff !important;
    margin-top: 0;
    border-radius: 0 0 12px 12px;
    overflow: hidden;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(78, 77, 77, 0.4);
    z-index: 1;
}

.hero-content {
    position: relative;
    z-index: 2;
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    animation: slideUp 0.8s ease-out;
}

.hero-content h1 {
    font-size: 4rem;
    margin-bottom: 1rem;
    color: #ffffff !important;
    text-shadow: 2px 2px 8px rgba(0, 0, 0, 0.6);
    font-weight: 550;
    font-style: italic;
    text-align: center;
}

.hero-subtitle {
    font-size: 2rem;
    margin-bottom: 2rem;
    color: #ffffff !important;
    text-shadow: 1px 1px 4px rgba(0, 0, 0, 0.6);
    letter-spacing: 2px;
    text-align: center;
}   

/* Footer */
.footer {
    background: #2c3e50;
    color: white;
    text-align: center;
    padding: 2rem;
    margin-top: 3rem;
}

/* BLOCS DE CONTENU (Appartement, Valloire, Tarifs) */
.page-content {
    max-width: 1200px;
    margin: 2rem auto;
    padding: 0 1.5rem;
}

.content-box {
    background: #f9f9f9;
    padding: 1.5rem;
    border-radius: 8px;
    border-left: 4px solid #3498db;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05);
    margin-bottom: 1.5rem;
}

.content-box h2 {
    margin-bottom: 1rem;
}    

.content-box.warning-box {
    border-left-color: #2c3e50;
}

/* RESERVATION & CONTACT */
.reservation-form,
.contact-info {
    margin-top: 2rem;
    padding: 2rem;
    border-radius: 8px;
    box-sizing: border-box;
    width: 100%;
}

.reservation-form {
    background: #f9f9f9;                
    border-left: 4px solid #3498db;
}

.contact-info {
    background: #2c3e50;
    border-left: 4px solid #f7f7f8;
    text-align: center;
}

.contact-info h3 {
    color: #f7f7f8;
    margin-bottom: 0.8rem;
    font-size: 1.3rem;
}

.contact-info p {
    color: #f7f7f8;
    font-size: 1rem;
    line-height: 1.6;
}

.contact-info a {
    color: #ffffff;
    text-decoration: none;
    font-weight: bold;
    transition: opacity 0.3s ease;
    overflow-wrap: anywhere;
}

.contact-info a:hover {
    opacity: 0.8;
    text-decoration: underline;
}

.content-subtitle {
    margin-bottom: 1.2rem;
    font-style: italic;
    color: #555;
    font-size: 0.95rem;
}

/* FORMULAIRE */
.form-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-bottom: 1.5rem;
}

.form-group {
    display: flex;
    flex-direction: column;
}

.form-group label {
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: #333;
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    height: 40px;
    padding: 6px 12px;
    border: 2px solid #ddd;
    border-radius: 4px;
    font-size: 16px;
    line-height: 1.5;
    font-family: inherit;
    box-sizing: border-box;
    background-color: #ffffff;
    transition: border-color 0.3s ease;
}

.form-group textarea {
    height: auto;
    min-height: 100px;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: #3498db;
    box-shadow: 0 0 5px rgba(52, 152, 219, 0.2);
}

.btn {
    background: linear-gradient(135deg, #2c3e50 0%, #3498db 100%);
    color: white;
    padding: 0.75rem 2rem;
    border: none;
    border-radius: 4px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(52, 152, 219, 0.3);
}

.btn-large {
    padding: 1rem 3rem;
    font-size: 1.1rem;
    width: 100%;
    max-width: 300px;
    margin: 0 auto;
    display: block;
}

/* GALERIE */
.gallery-section {
    max-width: 1200px;
    margin: 40px auto;
    padding: 0 20px;
    font-family: sans-serif;
}

.gallery-tabs {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-bottom: 30px;
    flex-wrap: wrap;
}

.tab-btn {
    padding: 10px 20px;
    border: 2px solid #2c3e50;
    background-color: transparent;
    color: #2c3e50;
    font-size: 1rem;
    font-weight: bold;
    cursor: pointer;
    border-radius: 25px;
    transition: all 0.3s ease;
    text-transform: capitalize;
}

.tab-btn:hover, .tab-btn.active {
    background-color: #2c3e50;
    color: #fff;
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

.gallery-item {
    display: none;
    overflow: hidden;
    border-radius: 15px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    aspect-ratio: 4 / 3;
}

.gallery-item.active {
    display: block;
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 15px;
    transition: transform 0.4s ease;
}

.gallery-item:hover img {
    transform: scale(1.05);
}

/* LIGHTBOX */
.lightbox {
    display: none;
    position: fixed;
    z-index: 9999;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.9);
    justify-content: center;
    align-items: center;
}

.lightbox.active {
    display: flex;
}

.lightbox-content-wrapper {
    max-width: 80%;
    max-height: 80%;
    display: flex;
    justify-content: center;
    align-items: center;
}

.lightbox-content-wrapper img {
    max-width: 100%;
    max-height: 80vh;
    object-fit: contain;
    border-radius: 4px;
    box-shadow: 0 5px 25px rgba(0,0,0,0.5);
}

.lightbox-close, .lightbox-arrow {
    position: absolute;
    color: white !important;
    background-color: rgba(0, 123, 255, 0.5) !important;
    border: none !important;
    cursor: pointer;
    transition: background-color 0.2s, transform 0.2s;
    user-select: none;
    z-index: 10000;
    width: 45px !important;
    height: 45px !important;
    border-radius: 50% !important;
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
}

.lightbox-close:hover, .lightbox-arrow:hover {
    background-color: rgba(0, 86, 179, 0.75) !important;
    transform: scale(1.05);
}

.lightbox-close {
    top: 20px;
    right: 20px;
    font-size: 2.2rem !important;
    font-weight: 300 !important;
    line-height: 0 !important;
    padding: 0 0 6px 0 !important;
}

.lightbox-prev {
    left: 20px;
    font-size: 1.2rem !important;
    padding: 0 3px 0 0 !important;
}

.lightbox-next {
    right: 20px;
    font-size: 1.2rem !important;
    padding: 0 0 0 3px !important;
}

/* CALENDRIER ANNUEL */
.dispo-calendar-container {
    max-width: 1200px;
    margin: 3rem auto;
    padding: 0 1.5rem;
    font-family: inherit;
}

.calendar-main-title {
    text-align: center;
    color: #2c3e50;
    margin-bottom: 1rem;
    font-size: 2rem;
}

.calendar-legend {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-bottom: 2.5rem;
    font-weight: 600;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.95rem;
    color: #555;
}

.legend-box {
    display: inline-block;
    width: 16px;
    height: 16px;
    border-radius: 4px;
}

.legend-box.libre { background-color: #2ecc71; }
.legend-box.occupe { background-color: #e74c3c; }

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

.month-box {
    background: #ffffff;
    padding: 1.5rem;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
    border: 1px solid #eef2f5;
}

.month-title {
    text-align: center;
    color: #2c3e50;
    margin-bottom: 1rem;
    font-size: 1.15rem;
    text-transform: capitalize;
    font-weight: bold;
}

.week-days-labels, .days-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    text-align: center;
    font-size: 0.85rem;
}

.week-days-labels {
    font-weight: bold;
    color: #7f8c8d;
    margin-bottom: 0.5rem;
    border-bottom: 1px solid #eee;
    padding-bottom: 0.3rem;
}

.days-grid div {
    padding: 8px 0;
    margin: 2px;
    border-radius: 4px;
    font-weight: 500;
}

.day-cell.empty {
    background: transparent !important;
}

.day-cell.libre {
    background-color: rgba(46, 204, 113, 0.15);
    color: #27ae60;
}

.day-cell.occupe {
    background-color: rgba(231, 76, 60, 0.35) !important;
    color: #a2453b !important;
    font-weight: normal;
    text-decoration: line-through;
}

/* RESPONSIVE TABLETTE */
@media (max-width: 992px) {
    .nav-container {
        flex-direction: column;
        gap: 0.8rem;
    }

    .nav-menu {
        flex-wrap: wrap;
        justify-content: center;
        gap: 0.4rem;
        width: 100%;
    }

    .nav-link, .nav-btn-reserve {
        display: block;
        padding: 0.5rem 0.8rem;
        text-align: center;
    }
}

/* RESPONSIVE MOBILE (OPTIMISÉ IPHONE) */
@media (max-width: 768px) {
    .navbar {
        position: relative;
    }

    .nav-container {
        flex-direction: column;
        gap: 0.2rem;
        padding: 0.3rem 0.5rem;
    }

    .logo img, 
    .navbar-brand img, 
    nav img,
    .site-logo {
        height: 22px !important;
        clip-path: none !important;
    }

    .nav-menu {
        flex-wrap: wrap;
        justify-content: center;
        gap: 0.2rem 0.3rem;
        width: 100%;
    }

    .nav-link {
        padding: 0.25rem 0.45rem;
        font-size: 0.78rem;
    }

    .nav-btn-reserve {
        padding: 0.3rem 0.7rem;
        font-size: 0.78rem;
    }

    .page-content {
        padding: 1.2rem;
        margin: 0.8rem;
    }

    .hero-content h1 {
        font-size: 2rem;
    }

    .hero-subtitle {
        font-size: 1.1rem;
    }

    .hero-section {
        height: 50vh;
    }

    .gallery-grid {
        grid-template-columns: repeat(1, 1fr);
    }

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