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

:root {
    --primary-color: #ffffff;
    --text-color: #333333;
    --text-light: #666666;
    --border-color: #e0e0e0;
    --hover-color: #f5f5f5;
    --accent-color: #000000;
    --shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 4px 16px rgba(0, 0, 0, 0.15);
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    background-color: var(--primary-color);
}

.container {
    max-width: 900px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header */
header {
    background-color: #add8e6;
    background-image: 
        linear-gradient(white 1px, transparent 1px),
        linear-gradient(90deg, white 1px, transparent 1px);
    background-size: 20px 20px;
    padding: 40px 0;
    border-bottom: 1px solid var(--border-color);
    text-align: center;
}

header .logo {
    max-width: 300px;
    height: auto;
    margin-bottom: 0;
}

header h1 {
    font-size: 2.5rem;
    font-weight: 300;
    letter-spacing: 1px;
    margin-bottom: 8px;
    color: #333;
}

.subtitle {
    font-family: 'Kalam', cursive;
    color: white;
    font-size: 1.8rem;
    font-weight: 400;
}

/* Sections */
.section {
    margin: 60px 0;
}

.section h2 {
    font-size: 2rem;
    font-weight: 300;
    margin-bottom: 30px;
    padding-bottom: 15px;
    border-bottom: 1px solid var(--border-color);
}

/* Galerie */
.gallery {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.gallery-main {
    width: 100%;
    height: 600px;
    overflow: hidden;
    border-radius: 8px;
    box-shadow: var(--shadow);
    position: relative;
}

.gallery-main img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: opacity 0.4s ease, transform 0.3s ease;
}

.gallery-main img:hover {
    transform: scale(1.02);
}

.gallery-main img.fade-out {
    opacity: 0;
}

/* Boutons de navigation desktop */
.gallery-nav-desktop {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.9);
    border: none;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    z-index: 10;
    opacity: 1;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.gallery-nav-desktop:hover {
    background: white;
    transform: translateY(-50%) scale(1.1);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.gallery-nav-desktop:active {
    transform: translateY(-50%) scale(0.95);
}

.gallery-nav-prev {
    left: 20px;
}

.gallery-nav-next {
    right: 20px;
}

.gallery-nav-desktop svg {
    color: var(--accent-color);
}

/* Navigation mobile */
.gallery-nav-mobile {
    display: none;
    justify-content: center;
    gap: 20px;
    margin-top: 15px;
}

.gallery-nav-mobile-btn {
    background: rgba(0, 0, 0, 0.8);
    border: none;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.gallery-nav-mobile-btn:hover {
    background: rgba(0, 0, 0, 0.9);
    transform: scale(1.1);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.gallery-nav-mobile-btn:active {
    transform: scale(0.95);
}

.gallery-nav-mobile-btn svg {
    color: white;
}

/* Indicateur de swipe */
.swipe-indicator {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.7);
    color: white;
    padding: 12px 20px;
    border-radius: 30px;
    display: none;
    align-items: center;
    gap: 10px;
    font-size: 0.9rem;
    animation: swipePulse 2s ease-in-out infinite;
    z-index: 5;
}

.swipe-indicator svg {
    animation: swipeArrows 1.5s ease-in-out infinite;
}

@keyframes swipePulse {
    0%, 100% { opacity: 0.8; }
    50% { opacity: 1; }
}

@keyframes swipeArrows {
    0%, 100% { transform: translateX(0); }
    50% { transform: translateX(3px); }
}



/* Description */
.description-content {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 40px;
}

.description-main h3 {
    font-size: 1.5rem;
    font-weight: 400;
    margin-bottom: 20px;
}

.description-main p {
    color: var(--text-light);
    font-size: 1.05rem;
    margin-bottom: 30px;
    line-height: 1.8;
}

.features {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 20px;
}

.feature-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 15px;
    background-color: var(--hover-color);
    border-radius: 6px;
    transition: transform 0.2s ease;
}

.feature-item:hover {
    transform: translateY(-2px);
}

.feature-item .icon {
    font-size: 1.5rem;
}

.price-box {
    background-color: var(--hover-color);
    padding: 30px;
    border-radius: 8px;
    text-align: center;
    position: sticky;
    top: 20px;
}

.price {
    font-size: 2.5rem;
    font-weight: 300;
    margin-bottom: 10px;
}

.price span {
    font-size: 1rem;
    color: var(--text-light);
}

.price-note {
    color: var(--text-light);
    font-size: 0.9rem;
}

/* Carte */
#map {
    height: 400px;
    border-radius: 8px;
    box-shadow: var(--shadow);
}

/* Calendrier et Réservation */
.reservation-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
}

.calendar-container {
    background-color: var(--hover-color);
    padding: 25px;
    border-radius: 8px;
}

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

.calendar-header h3 {
    font-size: 1.3rem;
    font-weight: 400;
}

.nav-btn {
    background: none;
    border: 1px solid var(--border-color);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    font-size: 1.5rem;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.nav-btn:hover {
    background-color: var(--accent-color);
    color: white;
    border-color: var(--accent-color);
}

#calendar {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 5px;
    margin-bottom: 20px;
}

.calendar-day {
    aspect-ratio: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.2s ease;
    background-color: white;
    border: 1px solid var(--border-color);
}

.calendar-day.header {
    background-color: transparent;
    border: none;
    font-weight: 600;
    cursor: default;
    color: var(--text-light);
}

.calendar-day.other-month {
    color: #ccc;
    background-color: transparent;
}

.calendar-day.available:hover {
    background-color: var(--hover-color);
    transform: scale(1.05);
}

.calendar-day.occupied {
    background-color: #ffebee;
    color: #c62828;
    cursor: not-allowed;
    text-decoration: line-through;
}

.calendar-day.selected {
    background-color: var(--accent-color);
    color: white;
    font-weight: 600;
}

.calendar-day.in-range {
    background-color: #e0e0e0;
}

.calendar-legend {
    display: flex;
    gap: 20px;
    justify-content: center;
    margin-top: 20px;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.9rem;
}

.legend-color {
    width: 20px;
    height: 20px;
    border-radius: 4px;
    border: 1px solid var(--border-color);
}

.legend-color.available {
    background-color: white;
}

.legend-color.occupied {
    background-color: #ffebee;
}

.legend-color.selected {
    background-color: var(--accent-color);
}

/* Formulaire */
.form-container {
    background-color: var(--hover-color);
    padding: 25px;
    border-radius: 8px;
}

.form-group {
    margin-bottom: 20px;
}

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

label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    font-size: 0.95rem;
}

input,
select,
textarea {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    font-size: 1rem;
    font-family: inherit;
    background-color: white;
    transition: border-color 0.2s ease;
}

input:focus,
select:focus,
textarea:focus {
    outline: none;
    border-color: var(--accent-color);
}

textarea {
    resize: vertical;
}

.btn-submit {
    width: 100%;
    padding: 15px;
    background-color: var(--accent-color);
    color: white;
    border: none;
    border-radius: 4px;
    font-size: 1.05rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-submit:hover {
    background-color: #333;
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.btn-submit:active {
    transform: translateY(0);
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    animation: fadeIn 0.3s ease;
}

.modal.show {
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-content {
    background-color: white;
    padding: 40px;
    border-radius: 8px;
    max-width: 500px;
    width: 90%;
    text-align: center;
    animation: slideIn 0.3s ease;
}

.modal-close {
    float: right;
    font-size: 2rem;
    font-weight: 300;
    cursor: pointer;
    line-height: 1;
    margin-top: -20px;
    margin-right: -20px;
}

.modal-close:hover {
    color: var(--accent-color);
}

.modal-content h2 {
    border: none;
    margin-bottom: 20px;
    padding: 0;
}

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

@keyframes slideIn {
    from {
        transform: translateY(-50px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* Footer */
footer {
    background-color: var(--hover-color);
    padding: 30px 0;
    margin-top: 80px;
    border-top: 1px solid var(--border-color);
    text-align: center;
    color: var(--text-light);
}

/* Responsive */
@media (max-width: 768px) {
    header h1 {
        font-size: 2rem;
    }

    .subtitle {
        font-size: 1rem;
    }

    .section h2 {
        font-size: 1.5rem;
    }

    .gallery-main {
        height: 300px;
        position: relative;
        touch-action: pan-y;
        user-select: none;
    }
    
    .gallery-main img {
        cursor: grab;
    }
    
    .gallery-main img:active {
        cursor: grabbing;
    }
    
    /* Masquer les boutons de navigation desktop */
    .gallery-nav-desktop {
        display: none;
    }
    
    /* Afficher la navigation mobile */
    .gallery-nav-mobile {
        display: flex;
    }

    .description-content {
        grid-template-columns: 1fr;
    }

    .price-box {
        position: static;
    }

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

    .reservation-container {
        grid-template-columns: 1fr;
    }

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

    #map {
        height: 300px;
    }

    .calendar-day {
        font-size: 0.8rem;
    }

    .calendar-legend {
        flex-direction: column;
        align-items: flex-start;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 15px;
    }

    header {
        padding: 30px 0;
    }

    header h1 {
        font-size: 1.5rem;
    }

    .section {
        margin: 40px 0;
    }

    .gallery-main {
        height: 250px;
    }

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

    .feature-item {
        padding: 12px;
    }

    .price {
        font-size: 2rem;
    }

    .modal-content {
        padding: 30px 20px;
    }
}
