/* =========================================================
   LE COCON — styles.css (PRO / CHIC / NATURE)
   Structure :
   1) Variables + reset
   2) Base (typo, fond, container)
   3) Header fixe + navigation (desktop)
   4) Menu burger premium (mobile overlay)
   5) Layout (hero, cards, grids)
   6) UI (boutons, table, forms)
   7) Page Logement (sections + galeries pair/impair)
   8) Lightbox (aperçu photos)
   9) Transition pages (overlay)
   10) Footer
   11) Responsive global + réglages header height
========================================================= */

/* ===================== 1) Variables + reset ===================== */
:root{
  --bg:#F6F1E8;
  --surface:rgba(255,255,255,.78);
  --surface-strong:rgba(255,255,255,.92);
  --text:#1F2937;
  --muted:#5B6472;
  --line:rgba(31,41,55,.12);

  --accent:#2F6F63;     /* sauge */
  --accent2:#C9A227;    /* or doux */

  --radius:22px;
  --shadow:0 12px 30px rgba(31,41,55,.10);
  --shadow-soft:0 18px 40px rgba(31,41,55,.12);
  --max:1100px;

  --font:"Inter", system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  --font-title:"Playfair Display", Georgia, serif;

  /* Hauteur du header (sert pour l’espace au-dessus du contenu) */
  --header-h-desktop: 84px;
  --header-h-mobile: 72px;
}

*{ box-sizing:border-box; }
html, body{ overflow-x:hidden; }
body{ margin:0; }

/* ===================== 2) Base (typo, fond, container) ===================== */
body{
  font-family:var(--font);
  color:var(--text);
  line-height:1.6;

  background:
    radial-gradient(900px 420px at 12% 0%, rgba(47,111,99,.14), transparent 60%),
    radial-gradient(700px 380px at 88% 10%, rgba(201,162,39,.12), transparent 60%),
    repeating-linear-gradient(45deg, rgba(31,41,55,.02) 0 2px, transparent 2px 10px),
    var(--bg);

  /* Espace réservé au header fixe (desktop par défaut) */
  padding-top: var(--header-h-desktop);
}

a{ color:inherit; text-decoration:none; }
img{ max-width:100%; display:block; border-radius:14px; }

.container{
  max-width:var(--max);
  margin:0 auto;
  padding:0 16px;
}

h1,h2,h3{
  font-family:var(--font-title);
  letter-spacing:.2px;
  margin:0 0 8px;
}
h1{ font-size:clamp(28px, 3.2vw, 46px); }
h2{ font-size:22px; }
p{ margin:0 0 10px; }
.muted{ color:var(--muted); }
.small{ font-size:13px; color:var(--muted); }

/* ===================== 3) Header fixe + navigation (desktop) ===================== */
.header{
  position: fixed;
  top:0; left:0;
  width:100%;
  z-index:1000;

  background: rgba(246,241,232,.85);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(31,41,55,.10);
}

.nav{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:14px;
  padding:12px 0; /* desktop */
}

/* Brand (logo + texte) */
.brand{
  display:flex;
  align-items:center;
  gap:14px;
  min-width:0;
}
.brand-logo{
  height:54px;      /* desktop */
  width:auto;
  border-radius:0;  /* logo non arrondi */
}
.brand-text{
  display:flex;
  flex-direction:column;
  line-height:1.05;
}
.brand-title{
  font-family:var(--font-title);
  font-weight:700;
  font-size:20px;
  letter-spacing:.3px;
}
.brand-subtitle{
  margin-top:4px;
  font-size:12px;
  color:var(--muted);
  letter-spacing:.2px;
}

/* Menu desktop */
.menu{
  display:flex;
  gap:10px;
  align-items:center;
  justify-content:flex-end;
  flex-wrap:wrap;
}
.menu a{
  padding:9px 14px;
  border-radius:999px;
  color:var(--muted);
  border:1px solid rgba(31,41,55,.10);
  background: rgba(255,255,255,.35);
  transition: background .12s ease, border-color .12s ease, color .12s ease;
}
.menu a:hover{
  color:var(--text);
  background: rgba(255,255,255,.55);
}
.menu a.active{
  color:#fff;
  background:var(--accent);
  border-color: rgba(47,111,99,.35);
}

/* Burger caché en desktop */
.menu-toggle{ display:none; }

/* ===================== 4) Menu burger premium (mobile overlay) ===================== */
/* Bloque le scroll quand le menu est ouvert (mobile) */
body.menu-open{
  overflow:hidden;
  position:fixed;
  width:100%;
}

/* Bouton burger (visible en mobile via media query) */
.menu-toggle{
  width:40px;
  height:40px;
  border:none;
  background:transparent;
  cursor:pointer;
  padding:0;

  display:none;
  flex-direction:column;
  justify-content:center;
  gap:6px;

  position:relative;
  z-index:10001; /* au-dessus de l’overlay */
}
.menu-toggle span{
  width:24px;
  height:2px;
  background:var(--text);
  border-radius:2px;
  transition:transform .3s ease, opacity .3s ease;
}

/* Animation burger -> croix */
.menu-open .menu-toggle span:nth-child(1){
  transform:rotate(45deg) translate(6px,6px);
}
.menu-open .menu-toggle span:nth-child(2){
  opacity:0;
}
.menu-open .menu-toggle span:nth-child(3){
  transform:rotate(-45deg) translate(6px,-6px);
}

/* Mobile overlay */
@media (max-width:900px){
  /* burger visible */
  .menu-toggle{ display:flex; }

  /* Menu devient plein écran (overlay) */
  .menu{
    position:fixed;
    inset:0;
    width:100%;
    height:100dvh;
    background: rgba(246,241,232,.98);
    backdrop-filter: blur(10px);

    display:flex;
    flex-direction:column;
    align-items:center;
    justify-content:flex-start;
    gap:22px;

    padding: 96px 0 40px;
    overflow-y:auto;
    -webkit-overflow-scrolling: touch;

    transform: translateY(-110%);
    transition: transform .30s ease; /* plus réactif */
    z-index:9999;
  }

  .menu-open .menu{ transform: translateY(0); }

  .menu a{
    font-family:var(--font-title);
    font-size:22px;
    padding:12px 22px;
    border-radius:999px;
    border:1px solid rgba(31,41,55,.10);
    background: rgba(255,255,255,.40);
    color: var(--text);
  }

  /* Actif en mobile : pilule (cohérent partout) */
  .menu a.active{
    color:var(--accent);
    background: rgba(255,255,255,.60);
    border:1px solid rgba(47,111,99,.35);
  }
}

/* Mobile compact : header plus petit + titre plus “valeur” */
@media (max-width:700px){
  body{ padding-top: var(--header-h-mobile); } /* espace contenu (mobile) */

  .nav{ padding:8px 0; }

  .brand{ gap:12px; }
  .brand-logo{ height:44px; }

  .brand-title{
    font-size:24px;      /* plus présent */
    letter-spacing:.4px;
  }

  .brand-subtitle{ display:none; }
}

/* ===================== 5) Layout (hero, cards, grids) ===================== */
.grid{ display:grid; gap:12px; padding:10px 0 22px; }
.grid2{ display:grid; gap:12px; padding:10px 0 22px; }

.card{
  background:var(--surface-strong);
  border:1px solid rgba(31,41,55,.10);
  border-radius:var(--radius);
  padding:18px;
  box-shadow:0 10px 24px rgba(31,41,55,.08);
  transition: transform .12s ease, box-shadow .12s ease, border-color .12s ease;
}
.card:hover{
  transform:translateY(-2px);
  box-shadow:var(--shadow-soft);
  border-color:rgba(47,111,99,.20);
}

.hero{
  display:grid;
  gap:14px;
  align-items:stretch;
  padding:40px 0;
}
.hero-card{
  background:var(--surface);
  border:1px solid rgba(31,41,55,.10);
  border-radius:var(--radius);
  padding:18px;
  box-shadow:var(--shadow);
}
.hero-card p{ max-width:58ch; }

.hero-media{ height:100%; }
.hero-media img{
  width:100%;
  height:100%;
  object-fit:cover;
  border-radius:var(--radius);
  border:1px solid rgba(31,41,55,.10);
  box-shadow:var(--shadow);
  filter:saturate(1.08) contrast(1.03) brightness(1.03) sepia(0.06);
}

/* ===================== 6) UI (boutons, table, forms) ===================== */
.btn{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:8px;
  padding:10px 12px;
  border-radius:14px;
  border:1px solid var(--line);
  background:rgba(255,255,255,.55);
  color:var(--text);
  font-weight:600;
  transition: transform .08s ease, filter .08s ease, box-shadow .12s ease;
}
.btn:hover{ filter:brightness(1.02); transform:translateY(-1px); }

.btn.primary{
  background:var(--accent);
  color:#fff;
  border-color:rgba(47,111,99,.35);
  box-shadow:0 10px 22px rgba(47,111,99,.18);
}
.btn.primary:hover{ box-shadow:0 16px 34px rgba(47,111,99,.22); }

.actions{ display:flex; gap:10px; flex-wrap:wrap; margin-top:10px; }

.list{ margin:10px 0 0; padding-left:18px; }

.table{
  width:100%;
  border-collapse:separate;
  border-spacing:0;
  overflow:hidden;
  border-radius:14px;
  border:1px solid var(--line);
  background:rgba(255,255,255,.60);
}
.table th,.table td{ padding:11px 12px; border-bottom:1px solid var(--line); }
.table th{ color:var(--muted); text-align:left; font-weight:700; }
.table tr:last-child td{ border-bottom:none; }

form{ display:grid; gap:10px; }
input, textarea{
  width:100%;
  padding:12px 12px;
  border-radius:14px;
  border:1px solid var(--line);
  background:rgba(255,255,255,.65);
  color:var(--text);
  font-family:var(--font);
}
textarea{ min-height:140px; resize:vertical; }

/* ===================== 7) Logement (sections + galeries) ===================== */
.section{ margin-top:22px; }
.section h2{ margin-bottom:6px; }
.section .muted{ margin-bottom:12px; }

.gallery{
  display:grid;
  gap:14px;
}
.gallery img{
  width:100%;
  height:220px;
  object-fit:cover;
  border-radius:18px;
  transition:transform .25s ease, box-shadow .25s ease;
  cursor:zoom-in;
}
.gallery img:hover{
  transform:scale(1.02);
  box-shadow:0 16px 40px rgba(0,0,0,.14);
}

/* >= 700px : 2 colonnes stables + impair = 1 grande */
@media (min-width:700px){
  .gallery{ grid-template-columns:repeat(2, 1fr); }
  .gallery img{ height:260px; }

  .gallery--odd img:first-child{
    grid-column:1 / span 2;
    height:340px;
  }
}
/* mobile : 1 colonne */
@media (max-width:699px){
  .gallery{ grid-template-columns:1fr; }
  .gallery img{ height:220px; }
  .gallery--odd img:first-child{ height:240px; }
}

/* ===================== 8) Lightbox (aperçu photos) ===================== */
.lightbox{
  position: fixed;
  inset: 0;
  background: rgba(17, 24, 39, .72);
  backdrop-filter: blur(6px);
  display: grid;
  place-items: center;
  padding: 24px;
  opacity: 0;
  pointer-events: none;
  transition: opacity .18s ease;
  z-index: 9999;
}
.lightbox.is-open{ opacity:1; pointer-events:auto; }

.lightbox-img{
  max-width:92vw;
  max-height:85vh;
  width:auto;
  height:auto;
  display:block;
  margin:auto;
  border-radius:18px;
  box-shadow:0 30px 80px rgba(0,0,0,.35);
}
@media (max-width:700px){
  .lightbox{ padding:20px; }
  .lightbox-img{ max-width:90vw; max-height:80vh; }
}

.lightbox-caption{
  margin-top:10px;
  color: rgba(255,255,255,.9);
  font-size:14px;
  text-align:center;
  max-width:min(900px, 90vw);
}
.lightbox-close{
  position: fixed;
  top: 14px;
  right: 18px;
  width: 44px;
  height: 44px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,.18);
  background: rgba(255,255,255,.10);
  color: #fff;
  font-size: 28px;
  line-height: 1;
  cursor: pointer;
}
.lightbox-close:hover{ background: rgba(255,255,255,.18); }

/* ===================== 9) Transition pages (overlay) ===================== */
.page-wipe{
  position: fixed;
  inset: 0;
  background: rgba(246,241,232, 0.92);
  backdrop-filter: blur(6px);
  opacity: 0;
  pointer-events: none;
  transition: opacity .10s ease-out; /* rapide + doux */
  z-index: 100000;
}
.page-wipe.is-on{
  opacity: 1;
  pointer-events: auto;
}
@media (prefers-reduced-motion: reduce){
  .page-wipe{ transition:none; }
}

/* ===================== 10) Footer ===================== */
.footer{
  margin-top:40px;
  border-top:1px solid var(--line);
  background:rgba(246,241,232,.70);
}

.footer-row{
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:10px;
  flex-wrap:wrap;

  padding:22px 24px;   /* 🔥 espace intérieur horizontal */
  max-width:var(--max);
  margin:0 auto;       /* centre comme le reste */
}
/* ===================== 11) Responsive global ===================== */
@media (min-width:900px){
  .hero{ grid-template-columns:1.1fr .9fr; }
  .grid{ grid-template-columns:repeat(3,1fr); }
  .grid2{ grid-template-columns:repeat(2,1fr); }
}
@media (max-width:700px){
  .hero-media img{ height:300px; }
  .hero-card{ padding:22px; box-shadow:0 8px 24px rgba(0,0,0,.08); }
}

/* ===================== Encadré Airbnb premium ===================== */

.airbnb-box{
  margin-top:34px;
  background:
    linear-gradient(180deg, rgba(255,255,255,.95), rgba(255,255,255,.88));
  border:1px solid rgba(31,41,55,.10);
  box-shadow:0 16px 36px rgba(0,0,0,.08);
  transition:transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}

.airbnb-box:hover{
  transform:translateY(-2px);
  box-shadow:0 22px 42px rgba(0,0,0,.10);
  border-color:rgba(255,90,95,.25);
}

.airbnb-header{
  display:flex;
  align-items:center;
  gap:16px;
  margin-bottom:12px;
}

.airbnb-icon{
  width:100px;
  height:60px;
  display:flex;
  align-items:center;
  justify-content:center;
  background:rgba(255,255,255,.96);
  border:1px solid rgba(255,90,95,.14);
  border-radius:16px;
  box-shadow:0 8px 18px rgba(0,0,0,.06);
  flex-shrink:0;
}

.airbnb-logo{
  width:80px;
  height:auto;
  display:block;
}

.airbnb-title-wrap{
  display:flex;
  align-items:center;
  gap:10px;
  flex-wrap:wrap;
}

.airbnb-title-wrap h2{
  margin:0;
}

.airbnb-badge{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  padding:5px 10px;
  border-radius:999px;
  background:#FF5A5F;
  color:#fff;
  font-size:12px;
  font-weight:700;
  letter-spacing:.2px;
  box-shadow:0 8px 18px rgba(255,90,95,.20);
}

.airbnb-note{
  margin-top:6px;
  color:var(--muted);
}

/* Bouton Airbnb premium */
.airbnb-btn{
  background:#FF5A5F;
  color:#fff;
  border:1px solid rgba(255,90,95,.28);
  box-shadow:0 12px 24px rgba(255,90,95,.18);
  transition:transform .14s ease, box-shadow .18s ease, filter .18s ease;
}

.airbnb-btn:hover{
  transform:translateY(-2px);
  filter:brightness(1.02);
  box-shadow:0 18px 32px rgba(255,90,95,.24);
}

.airbnb-btn:active{
  transform:translateY(0);
}

/* Mobile */
@media (max-width:700px){
  .airbnb-header{
    align-items:flex-start;
    gap:12px;
  }

  .airbnb-icon{
    width:80px;
    height:52px;
    border-radius:14px;
  }

  .airbnb-logo{
    width:60px;
  }

  .airbnb-title-wrap{
    gap:8px;
  }

  .airbnb-badge{
    font-size:11px;
    padding:4px 9px;
  }

  .airbnb-btn{
    width:100%;
  }
}