/* styles.css - simple responsive layout for listings, carousel, bottom nav and footer */
:root{
  --bg:#fff; /* fond blanc */
  --card:#fff; /* cartes blanches */
  --accent:#e8e1d6; /* beige très clair */
  --muted:#a39b8f; /* beige grisé */
}
*{box-sizing:border-box}
html,body{height:100%}
body{margin:0;font-family:system-ui,-apple-system,Segoe UI,Roboto,'Helvetica Neue',Arial; background:var(--bg); color:#2c2824}
.container{max-width:1100px;margin:0 auto;padding:1rem}
.site-header{padding:0.8rem 0;text-align:left;border-bottom:1px solid var(--accent)}
.header-inner{display:flex;justify-content:space-between;align-items:center}
.header-main h1{margin:0 0 .15rem;color:#2c2824;font-size:1.25rem}
.header-main p{margin:0;font-size:.88rem}
.brand{display:flex;align-items:center;gap:0.7rem}
.logo{height:55px;width:auto;object-fit:contain;border-radius:6px}
.brand-text h1{margin:0;font-size:1.2rem}
.brand-text p{margin:0;font-size:.85rem;color:var(--muted)}
.header-nav{display:flex;gap:1rem;align-items:center}
.header-nav a{text-decoration:none;color:#2c2824;padding:.35rem .6rem;font-size:.95rem}
.header-nav a.active{background:var(--accent);border-radius:4px}
.site-header.small{padding:0.6rem 0}
.hero{padding:1rem 0}
.listings h3{margin:0 0 .5rem}
.grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(260px,1fr));gap:1rem;align-items:start}
.card{background:var(--card);border-radius:10px;overflow:hidden;box-shadow:0 6px 18px rgba(17,17,17,.04);display:flex;flex-direction:column;max-width:700px;margin:0 auto}
.carousel{position:relative;background:#ddd}
.carousel img{position:absolute;left:0;top:0;width:auto;height:auto;max-width:100%;opacity:0;transition:opacity .5s ease;display:none}
.carousel img.active{opacity:1;position:static;display:block}
.carousel button.prev, .carousel button.next{position:absolute;top:50%;transform:translateY(-50%);background:rgba(0,0,0,.35);color:#fff;border:0;padding:.35rem .6rem;border-radius:4px;cursor:pointer}
.carousel button.prev{left:.5rem}
.carousel button.next{right:.5rem}
.card-body{padding:1rem;display:flex;flex-direction:column;gap:.5rem}
.card-body h4{margin:.2rem 0}
.features{display:flex;gap:1rem;margin:.5rem 0;font-size:.9rem}
.feature{background:var(--accent);color:#2c2824;padding:.2rem .6rem;border-radius:4px;font-weight:500}
.description{margin:1rem 0}
.description p{margin:0 0 1rem;line-height:1.4}
.amenities ul{margin:0;padding-left:1.2rem;columns:2;font-size:.9rem}
.amenities li{margin-bottom:.4rem;line-height:1.3}
.details-toggle{display:inline-block;margin-top:.6rem;padding:.5rem .75rem;border:1px solid var(--muted);background:transparent;color:var(--muted);border-radius:6px;cursor:pointer}
.details-toggle[aria-expanded="true"]{background:var(--accent);color:#2c2824}
.full-description{overflow:hidden;max-height:0;transition:max-height .38s ease, opacity .25s ease;opacity:0;padding:0 .25rem}
.full-description.expanded{opacity:1;max-height:1200px;padding-top:.75rem;padding-bottom:.75rem}
.full-description h5{margin:.6rem 0 .25rem}
.full-description ul{margin:0 0 0 1.1rem;padding:0;list-style:disc}
.meta{font-size:.9rem;color:var(--muted);display:flex;gap:1rem;flex-wrap:wrap}
.meta span{position:relative;padding-left:1rem}
.meta span:before{content:"•";position:absolute;left:0;color:var(--accent)}
.meta span:first-child{padding-left:0}
.meta span:first-child:before{display:none}
.btn{display:inline-block;margin-top:.5rem;padding:.55rem .85rem;background:var(--accent);color:#2c2824;border-radius:6px;text-decoration:none;font-weight:500;border:1px solid var(--muted)}
.site-footer{padding:1rem 0;background:var(--bg);border-top:1px solid var(--accent);margin-top:2rem}
.footer-inner{display:flex;justify-content:space-between;align-items:center;gap:1rem;flex-wrap:wrap}
.footer-links {
    display: flex;
    gap: 2rem;
    align-items: center;
    flex-wrap: wrap;
}
.socials a{margin-right:1.2rem;color:var(--muted);text-decoration:none}
.socials a:hover{color:#2c2824}
.contact-info .phone {
    color: var(--muted);
    text-decoration: none;
    font-size: 0.95rem;
    display: flex;
    align-items: center;
    gap: 0.4rem;
}
.contact-info .phone:hover {
    color: #2c2824;
}
.copy{font-size:.9rem;color:var(--muted)}

/* style pour fallback mailto */
.mailto-fallback a{font-weight:600}
.mailto-fallback .btn{background:transparent;border:1px solid var(--muted)}

/* Form alert (success / error) */
.form-alert{display:none;padding:.65rem 0.9rem;border-radius:6px;margin-top:0.8rem;font-size:0.95rem}
.form-alert.success{background:#e7f6ee;border:1px solid #b9e6c9;color:#1b6b3a}
.form-alert.error{background:#fff0f0;border:1px solid #f1c2c2;color:#8a1b1b}
.form-alert.info{background:#f8fbff;border:1px solid #d7e9ff;color:#1b4b8a}

/* Reviews styles */
.reviews-section {
    background: var(--bg);
    border: 1px solid var(--accent);
    border-radius: 10px;
    padding: 1.5rem;
    margin: 2rem 0;
}

.reviews-header {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    margin-bottom: 1.5rem;
}

.overall-rating {
    text-align: center;
}

.overall-rating .rating-value {
    font-size: 2.5rem;
    font-weight: 600;
    margin: 0;
    line-height: 1;
}

.overall-rating .total-reviews {
    color: var(--muted);
    font-size: 0.9rem;
    margin-top: 0.3rem;
}

.rating-badge {
    background: #f4efe9;
    padding: 1rem;
    border-radius: 8px;
    font-size: 0.95rem;
}

.rating-badge strong {
    display: block;
    margin-bottom: 0.4rem;
}

.rating-categories {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin: 1.5rem 0;
}

.rating-category {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.95rem;
}

.rating-stars {
    color: #e8b321;
}

.reviews-list {
    margin-top: 2rem;
    display: grid;
    gap: 1.5rem;
}

.review {
    padding: 1rem;
    background: #fcfbf9;
    border-radius: 8px;
}

.review-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.8rem;
}

.reviewer-info {
    font-size: 0.9rem;
}

.review-date {
    color: var(--muted);
    font-size: 0.85rem;
}

.review-content {
    font-size: 0.95rem;
    line-height: 1.5;
}

/* Modal styles */
.modal {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.55);
    /* subtle blur behind modal for a more modern look (supported browsers) */
    backdrop-filter: blur(6px) saturate(120%);
    z-index: 1000;
    padding: 1rem;
    /* center content both vertically and horizontally */
    align-items: center;
    justify-content: center;
    overflow: auto; /* allow scroll when content is larger than viewport */
}

.modal.show {
    display: flex;
}

.modal-content {
    width: min(1200px, 95vw); /* limit width but allow shrinking */
    max-height: 90vh; /* ensure modal content never exceeds viewport height */
    background: white;
    padding: 1.5rem;
    border-radius: 10px;
    position: relative;
    overflow: auto; /* allow scrolling inside the modal content if needed */
    box-sizing: border-box;
}

/* entrance animation for modal content */
.modal-content {
    transform-origin: center center;
    transition: transform 260ms cubic-bezier(.2,.9,.2,1), opacity 220ms ease, box-shadow 260ms ease;
    opacity: 0;
    transform: translateY(8px) scale(0.996);
}
.modal.show .modal-content {
    opacity: 1;
    transform: translateY(0) scale(1);
    box-shadow: 0 20px 60px rgba(12, 18, 22, 0.45);
}

/* When showing video in a large modal, use this class to increase the modal frame
   while keeping the video centered inside. The modal remains bounded by viewport. */
.modal-content.video-large {
    width: min(1100px, 95vw);
    padding: 2rem;
    display: flex;
    flex-direction: column;
    align-items: center; /* center video horizontally */
    justify-content: center; /* center video vertically if space */
    min-height: 60vh; /* give vertical space so centering is visible */
}

/* Make photo modal larger and center content inside */
#photos-modal .modal-content{
    width: min(1300px, 96vw);
    padding: 1.25rem 1.75rem;
    display: block;
    box-sizing: border-box;
}

/* PHOTO GRID: 4 columns max (responsive), thumbnails reduced so modal won't overflow */
.photo-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr); /* up to 4 columns */
    gap: 0.75rem;
    margin-top: 0.75rem;
    width: 100%;
    /* let grid adapt to content */
    overflow: visible;
    padding: 4px;
}

.photo-grid img {
    width: 100%;
    height: 180px; /* taller but will scale down if needed */
    object-fit: cover;
    border-radius: 8px;
    cursor: pointer;
    transition: transform 150ms ease, box-shadow 150ms ease;
}

/* responsive adjustments: 3 cols on medium, 2 on small, 1 on very small */
@media (max-width: 1150px){
    .photo-grid{ grid-template-columns: repeat(3, 1fr); }
    .photo-grid img{ height: 160px; }
}
@media (max-width: 820px){
    .photo-grid{ grid-template-columns: repeat(2, 1fr); }
    .photo-grid img{ height: 140px; }
}
@media (max-width: 480px){
    .photo-grid{ grid-template-columns: repeat(1, 1fr); }
    .photo-grid img{ height: 200px; }
}

/* hover lift kept but subtle */
.photo-grid img:hover { transform: translateY(-6px) scale(1.03); box-shadow: 0 14px 36px rgba(12,18,22,0.12); }


.modal-close {
    position: absolute;
    top: 0.8rem;
    right: 0.8rem;
    background: rgba(255,255,255,0.92);
    border: 1px solid rgba(0,0,0,0.06);
    padding: 0.5rem 0.7rem;
    border-radius: 6px;
    cursor: pointer;
    font-size: 1.05rem;
    box-shadow: 0 6px 18px rgba(12,18,22,0.08);
    backdrop-filter: blur(4px);
}

.photo-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1rem;
    margin-top: 1rem;
}

.photo-grid img {
    width: 100%;
    height: 320px;
    object-fit: cover;
    border-radius: 8px;
    cursor: pointer;
    transition: transform 180ms ease, box-shadow 180ms ease;
}

.photo-grid img:hover {
    transform: translateY(-6px) scale(1.04);
    box-shadow: 0 18px 40px rgba(12,18,22,0.12);
}

/* subtle overlay magnifier on thumbnail hover */
.photo-grid .thumb-wrap{ position: relative; overflow: hidden; border-radius: 8px; }
.photo-grid .thumb-wrap::after{
    content: '\1F50D'; /* magnifying glass */
    position: absolute; inset: auto 12px 12px auto; /* bottom-left */
    opacity: 0; transform: translateY(6px);
    transition: opacity 200ms ease, transform 200ms ease;
    background: rgba(255,255,255,0.82); padding: 6px 8px; border-radius: 6px; font-size: 16px;
}
.photo-grid .thumb-wrap:hover::after{ opacity: 1; transform: translateY(0); }

/* Styles pour la grille vidéos dans le modal */
.video-grid{
        display:grid;
        grid-template-columns:1fr;
        gap:1rem;
}
@media (min-width:900px){
  .video-grid{grid-template-columns:repeat(2,1fr)}
}
.video-item{
    position:relative;
    width:100%;
    aspect-ratio: 16/9;
    overflow:hidden;
    border-radius:6px;
    background:#000;
}
.video-item video{
    position:absolute;
    inset:0;
    width:100%;
    height:100%;
    object-fit:cover;
}

/* If we only have a single video, show it centered at its natural aspect (no cropping) */
.video-item.single-video{
    aspect-ratio: auto;
    height: auto;
    overflow: visible;
    display:flex;
    justify-content:center;
    align-items:center;
    background: transparent;
}
.video-grid, .video-grid .video-item.single-video {
    /* ensure the grid and the single video item center their content */
    display: flex;
    justify-content: center;
    align-items: center;
}
.video-item.single-video{
    margin: 1rem 0;
}
.video-item.single-video video{
    position:relative;
    width:auto;
    max-width:95%;
    max-height:85vh;
    height:auto;
    object-fit:contain;
}

/* style the video player container for pro look */
.video-item.single-video{
    padding: 6px; /* frame */
    background: linear-gradient(180deg, #111 0%, #0a0a0a 100%);
    border-radius: 12px;
    box-shadow: 0 20px 50px rgba(8,10,12,0.5);
}

/* modal header/title styling inside modals */
.modal-content h3{
    margin: 0 0 1rem 0;
    font-size: 1.2rem;
    letter-spacing: 0.2px;
    color: #222;
}

/* make sure fullscreen view has higher z-index and fade */
.fullscreen-view{ transition: opacity 200ms ease; }
.fullscreen-view.show{ opacity: 1; }

/* Styles for fullscreen image view */
.fullscreen-view {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.95);
    z-index: 1100;
    cursor: zoom-out;
}

.fullscreen-view.show {
    display: flex;
    justify-content: center;
    align-items: center;
}

.fullscreen-view img {
    max-width: 90%;
    max-height: 90vh;
    width: auto;
    height: auto;
    object-fit: contain;
    border-radius: 4px;
}

.fullscreen-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    color: white;
    background: rgba(0, 0, 0, 0.5);
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 4px;
    cursor: pointer;
    font-size: 1rem;
}

.fullscreen-nav {
    position: absolute;
    bottom: 1rem;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 1rem;
    background: rgba(0, 0, 0, 0.5);
    padding: 0.5rem 1rem;
    border-radius: 4px;
}

.fullscreen-nav button {
    color: white;
    background: none;
    border: none;
    cursor: pointer;
    font-size: 1.5rem;
    padding: 0.2rem 0.8rem;
}

.fullscreen-nav button:hover {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
}

.show-all-photos {
    display: block;
    margin: 1rem auto;
    padding: 0.6rem 1.2rem;
    background: var(--accent);
    border: none;
    border-radius: 6px;
    font-size: 0.95rem;
    cursor: pointer;
    color: #2c2824;
}

.show-all-photos:hover {
    background: #dfd8cd;
}

/* contact page specific */
.contact-page{display:grid;grid-template-columns:1fr 300px;gap:1rem;padding:1rem 0}
.contact-form form{display:flex;flex-direction:column;gap:.6rem}
.contact-form input[type=text],.contact-form input[type=email],.contact-form textarea{padding:.6rem;border:1px solid #ddd;border-radius:6px}
.contact-info{background:var(--card);padding:1rem;border-radius:8px}
.hint{font-size:.85rem;color:var(--muted)}
/* responsive tweaks */
@media (max-width:700px){
  .contact-page{grid-template-columns:1fr}
}
@media (max-width:420px){
  .bottom-nav{height:64px}
  .logo{height:45px}
  .site-header{padding:0.6rem 0}
  .brand-text h1{font-size:1.05rem}
}
