/* QUINTA LIBÉLULA — THEME (v2 superposition hero) */
:root{
  --bg: #FAF8F3;          /* Warm White */
  --text: #2C2B28;        /* Charcoal Gray */
  --gold: #C4A965;        /* Soft Gold (accents) */
  --sand: #D2C7B3;        /* Sand Beige (alt sections) */
  --olive: #A39C89;       /* Olive Gray (muted accents) */
  --container: 1200px;
  --radius: 10px;
  --shadow: 0 24px 48px rgba(0,0,0,.08);
  --fade: 420ms ease;
}

*{ box-sizing:border-box; }
html{ height:100%; scroll-behavior:smooth; }
body{
  margin:0; background:var(--bg); color:var(--text);
  font-family: Inter, system-ui, -apple-system, Segoe UI, Roboto, "Helvetica Neue", Arial, sans-serif;
  line-height:1.6; font-size: clamp(16px, 1.2vw, 18px);
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
}

h1,h2,h3{ font-family: "Playfair Display", Georgia, serif; line-height:1.2; margin:0 0 .6em; }
h1.display{ font-size: clamp(40px, 6vw, 64px); font-weight:700; letter-spacing:.5px; }
h2{ font-size: clamp(28px, 3vw, 40px); font-weight:600; }
p{ margin:0 0 1.1em; }
.lead{ font-size: clamp(18px, 2.2vw, 22px); max-width: 48ch; }
.subtitle{ font-family: "Cormorant Garamond", Georgia, serif; font-style: italic; font-size: clamp(18px, 2vw, 22px); opacity:.9; margin:.2rem 0 1rem; }

.container{ width:100%; max-width:var(--container); margin:0 auto; padding:0 24px; }
.center{ text-align:center; }
.muted{ color:rgba(44,43,40,.75); }
.small{ font-size:.9rem; }

/* Header */
.site-header{
  position:sticky; top:0; z-index:1000; height:64px;
  background:rgba(250,248,243,.88); backdrop-filter: blur(6px);
  border-bottom:1px solid rgba(196,169,101,.25);
}
.header-inner{
  display:flex;
  align-items:center;          /* centre verticalement */
  justify-content:space-between;
  height:100%;
  padding-top: 2px;            /* ajuste très finement le centrage */
}
.brand{ display:flex; align-items:center; gap:.6rem; font-family:"Playfair Display", Georgia, serif; font-weight:700; font-size:1.2rem; color:var(--text); text-decoration:none; }
.brand-mark{ color:var(--gold); font-size:1.1rem; }
.brand-logo {
  width: 36px;
  height: 36px;
  display: block;
  margin-top: 1px;   /* centre encore mieux avec le texte du logo */
}
.brand-name {
  position: relative;
  top: 1px;   /* remonte juste le texte de la marque */
}
/* Nav */
.main-nav ul{ display:flex; gap:28px; list-style:none; margin:0; padding:0; }
.main-nav a{ color:var(--text); text-decoration:none; font-weight:500; }
.main-nav a:hover{ opacity:.85; }
.nav-toggle{ display:none; background:none; border:0; font-size:26px; }
.main-nav a.btn {
  display:flex;
  align-items:center;
  justify-content:center;
  height: 36px;          /* cohérent avec le logo */
  line-height: 1;        /* évite que le texte tire vers le haut */
  padding: 0 24px;
}
/* ===== HERO (vidéo en fond + texte superposé) ===== */
.hero{
  position:relative;
  min-height: 92vh;        /* Sur desktop, plein écran confortable */
  display:flex;
  align-items:center;
  justify-content:center;
  text-align:center;
  overflow:hidden;
}

.hero-media{
  position:absolute; inset:0; z-index:0;
  pointer-events:none;      /* clics passent au CTA */
}

.hero-video{
  width:100%; height:100%;
  object-fit:cover; object-position:center;
  filter: saturate(.95) contrast(.98) brightness(.98);
}

.hero-overlay{
  position:absolute; inset:0; z-index:1;
  /* Dégradé radial doux pour assurer la lisibilité du texte sur toute vidéo */
  background: rgba(250,248,243,0.20);  /* uniforme, plus doux */
}

.hero-content{
  position:relative; z-index:2;
  padding: 80px 24px 60px;
  color: var(--text);
  text-shadow: 0 1px 12px rgba(250,248,243,0.45);
  animation: fadeUp var(--fade) both;
}

.hero .subtitle,
.hero .lead{ color: rgba(44,43,40,0.88); }

.scroll-cue{
  position:absolute; bottom:22px; left:50%; width:1px; height:42px;
  background: linear-gradient(to bottom, rgba(196,169,101,0), var(--gold));
  transform:translateX(-50%); z-index:2;
}

/* Sections */
.section{ padding: clamp(50px, 12vw, 50px) 0; }
.section-alt{ background: linear-gradient(180deg, var(--bg) 0%, #F4EFE6 100%); }
.section-soft{ background: #F6F1E9; }
.section-image-bg{ position:relative; padding: clamp(50px, 14vw, 50px) 0; }
.section-image-bg .image-bg{
  position:absolute; inset:0; background-size:cover; background-position:center;
  filter: saturate(.95) contrast(.95) brightness(.95);
  transform: translateY(var(--parallaxY, 0px)); will-change: transform;
}
.section-image-bg .overlay-card{
  position:relative; max-width: 840px; background: rgba(250,248,243,.92);
  border:1px solid rgba(196,169,101,.35); border-radius: var(--radius);
  padding: 40px; box-shadow: var(--shadow);
}

/* Split layout */
.section-split .split{ display:grid; grid-template-columns: 1.1fr .9fr; gap: clamp(28px, 6vw, 64px); align-items:center; }
.split-media img{ width:100%; height:auto; border-radius: var(--radius); box-shadow: var(--shadow); }
.reveal{ opacity:0; transform: translateY(16px); transition: opacity var(--fade), transform var(--fade); }
.reveal.in{ opacity:1; transform: translateY(0); }

.link-underline{ position:relative; color:var(--text); text-decoration:none; font-weight:600; padding-bottom:4px; }
.link-underline::after{
  content:""; position:absolute; left:0; bottom:0; width:100%; height:1px; background:var(--gold);
  transform-origin:left; transform: scaleX(0); transition: transform var(--fade);
}
.link-underline:hover::after{ transform: scaleX(1); }

/* Grid */
.grid{ display:grid; gap: 48px; }
.grid-2{ grid-template-columns: repeat(2,1fr); }
.align-center{ align-items:center; }

/* Gallery */
.gallery{ display:grid; grid-template-columns: repeat(2,1fr); gap:16px; }
.gallery img{
  width:100%; height: clamp(160px, 22vw, 240px);
  object-fit:cover; border-radius: var(--radius);
  transition: transform var(--fade), filter var(--fade);
  filter: saturate(.9) contrast(.98);
}
.gallery img:hover{ transform: scale(1.02); filter: saturate(1); }

/* Feature list */
.feature-list{ list-style:none; padding:0; margin: 1rem 0 0; display:grid; gap:.4rem; }
.feature-list li{ padding-left: 22px; position:relative; }
.feature-list li::before{
  content:""; position:absolute; left:0; top:.55em; width:10px; height:10px;
  border:1px solid var(--gold); border-radius:50%;
}

/* Buttons */
.btn{
  display:inline-flex; align-items:center; justify-content:center; gap:.5rem;
  text-decoration:none; cursor:pointer; transition: all var(--fade);
  padding: 12px 28px; border-radius: 999px; font-weight:600; letter-spacing:.5px;
}
.btn-lg{ padding: 14px 36px; }
.btn-outline{ color:var(--text); background:transparent; border:1px solid var(--gold); }
.btn-outline:hover{ background: var(--gold); color: #1e1d1a; }

/* Quotes */
.quotes{ display:grid; grid-template-columns: repeat(2,1fr); gap: 28px; }
blockquote{
  margin:0; padding: 24px 28px; background:#F3EEE6;
  border:1px solid rgba(196,169,101,.32); border-radius: var(--radius);
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: clamp(18px, 2vw, 20px); line-height:1.5;
}
blockquote cite{
  display:block; margin-top:10px; font-style:normal;
  font-family: Inter, sans-serif; font-size:.9rem; color:rgba(44,43,40,.72);
}

/* Enquiry form */
.narrow{ max-width: 760px; }
.enquiry-form{ margin-top: 28px; }
.form-row{ display:flex; flex-direction:column; gap:8px; margin-bottom:16px; }
label{ font-weight:600; }
input, textarea{
  width:100%; padding:14px 16px; border-radius: 12px;
  border:1px solid rgba(44,43,40,.18); background: #FFFEFB; font: inherit; color: var(--text);
}
input:focus, textarea:focus{ outline:2px solid rgba(196,169,101,.45); }

/* Footer */
.site-footer{ background: linear-gradient(180deg, #EFE8DC 0%, #E7DFD1 100%); border-top:1px solid rgba(196,169,101,.35); }
.footer-inner{ display:flex; gap:20px; justify-content:space-between; align-items:center; padding: 26px 0; }
.site-footer nav{ display:flex; gap:16px; }
.site-footer a{ color:var(--text); text-decoration:none; opacity:.85; }
.site-footer a:hover{ opacity:1; }

/* Mobile */
/* ====== MENU MOBILE LISIBLE ====== */
@media (max-width: 980px){
  /* Le body ne défile plus quand le menu est ouvert */
  body.menu-open { overflow: hidden; }

  /* Backdrop sombre sous le panneau de menu (sans toucher au HTML) */
  body.menu-open::before{
    content: "";
    position: fixed;
    inset: 64px 0 0 0;               /* sous le header */
    background: rgba(0,0,0,.28);     /* voile sombre */
    z-index: 1099;                    /* juste sous le panneau du menu */
  }

  /* Panneau de menu : plein écran (sous le header), fond OPAQUE */
  .main-nav{
    position: fixed !important;
    inset: 64px 0 auto 0 !important; /* colle au bas du header */
    height: calc(100vh - 64px);
    background: var(--bg);           /* opaque, plus de .98 */
    z-index: 1100;
    transform: translateY(-100%);
    transition: transform var(--fade);
    overflow: auto;                  /* si la liste déborde */
    display: block;
    box-shadow: 0 12px 40px rgba(0,0,0,.15);
  }
  .main-nav.open{ transform: translateY(0); }

  .main-nav ul{
    display: flex; flex-direction: column; align-items: center;
    gap: 20px; padding: 24px 16px; margin: 0;
  }

  /* Bouton hamburger : au-dessus de tout, clic sûr */
  .nav-toggle{
    display: inline-flex;
    align-items: center; justify-content: center;
    width: 44px; height: 44px;
    font-size: 22px; line-height: 1;
    border: 1px solid var(--gold);
    border-radius: 50%;
    background: rgba(250,248,243,.95);
    z-index: 1201;
  }
}
/* === IMAGES MOBILE — PLEIN LARGEUR & BELLE PROPORTION === */
@media (max-width: 980px){

  /* Les sections en split deviennent une seule colonne centrée */
  .section-split .split{
    grid-template-columns: 1fr !important;
    gap: 24px !important;
  }
  .split-text, .split-media{
    max-width: 680px; margin: 0 auto;
  }

  /* Image de split : largeur 100%, plus de hauteur figée */
  .split-media img{
    width: 100% !important;
    height: auto !important;
    object-fit: cover;
  }

  /* Galerie : une seule colonne et images larges */
  .gallery{
    grid-template-columns: 1fr !important;
    gap: 12px !important;
  }

  /* Supprime la contrainte de hauteur et garde un ratio élégant */
  .gallery img{
    width: 100% !important;
    height: auto !important;        /* enlève le clamp(160px, 22vw, 240px) */
    object-fit: cover;
    /* Option : impose un ratio visuel régulier pour une grille harmonieuse */
    aspect-ratio: 4 / 3;            /* ou 16/10 si tu préfères plus panoramique */
  }

  /* Carte overlay Arrábida : évite les marges écrasées */
  .section-image-bg .overlay-card{
    margin: 0 16px;
    padding: 24px;
  }
}
/* ====== THE VILLA — empilement propre en mobile ====== */
@media (max-width: 980px){
  /* 1 colonne pleine largeur */
  #villa .grid-2{
    grid-template-columns: 1fr !important;
    gap: 20px !important;
  }

  /* Assure que les colonnes ne débordent pas */
  #villa .grid-2 > *{ min-width: 0; }

  /* IMAGE au-dessus, TEXTE en dessous (ordre recommandé) */
  #villa .media-shadow{ order: 1; }
  #villa .grid-2 > div:not(.media-shadow){ order: 2; }

  /* Si tu préfères TEXTE puis IMAGE, inverse simplement : */
  /* #villa .media-shadow{ order: 2; } */
  /* #villa .grid-2 > div:not(.media-shadow){ order: 1; } */

  /* Image pleine largeur, pas de hauteur forcée */
  #villa .media-shadow img{
    width: 100% !important;
    height: auto !important;     /* enlève tout étirement vertical */
    object-fit: cover;
  }

  /* Confort de lecture : texte en pleine largeur */
  #villa .grid-2 > div:not(.media-shadow){
    max-width: 680px;
    margin: 0 auto;
  }
}
/* Par défaut: le contenu est visible (même sans JS) */
.reveal { opacity: 1; transform: none; }

/* Seulement si le JS a marqué le document, on applique l'animation */
.js .reveal { opacity: 0; transform: translateY(16px); transition: opacity var(--fade), transform var(--fade); }
.js .reveal.in { opacity: 1; transform: translateY(0); }

/* Accessibilité: si l’utilisateur préfère moins d’animations, toujours visible */
@media (prefers-reduced-motion: reduce){
  .reveal, .js .reveal, .js .reveal.in { opacity: 1 !important; transform: none !important; }
}
/* Reduced motion */
@media (prefers-reduced-motion: reduce){
  *{ animation: none !important; transition: none !important; }
  .section-image-bg .image-bg{ transform: none !important; }
}

@keyframes fadeUp{
  from{ opacity:0; transform: translateY(12px); }
  to{ opacity:1; transform: translateY(0); }
}
.honeypot {
  position: absolute;
  left: -9999px;
  top: -9999px;
  visibility: hidden;
  height: 0;
  width: 0;
  overflow: hidden;
}