/* Les Hauts d'Eyragues — reprise statique du thème Joomla YOOtheme (réglages du site d'origine) */
@font-face {
  font-family: "Mulish";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url(/assets/polices/mulish.woff2) format("woff2");
}

:root {
  --fond: #fee1b9;
  --barre: #e2caae;
  --trait: #572c03;
  --texte: #522f02;
  --titre: #262626;
  --actif: #ba3404;
  --survol: #fe8007;
  --cadre: #cf8906;
  --pied: #4f2819;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --serif: Georgia, "Times New Roman", Times, serif;
  --largeur: 1200px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; background: var(--fond); }
body {
  margin: 0;
  color: var(--texte);
  font: 16px/1.5 var(--serif);
  -webkit-text-size-adjust: 100%;
  background: var(--fond);
}
img { max-width: 100%; height: auto; vertical-align: middle; }
a { color: var(--actif); }
a:hover { color: var(--survol); }

/* ------------------------------------------------------------------ en-tête */
.entete { position: relative; z-index: 50; }
.logo { display: block; max-width: 1140px; margin: 0 auto; padding: 20px; line-height: 0; }  /* 1140 - 2×20 = 1100 px = taille réelle du bandeau, pas de flou */
.logo img { display: block; width: 100%; }

.barre {
  position: relative; background: var(--barre); box-shadow: 1px 1px 0 0 var(--trait);
  display: flex; justify-content: center; min-height: 50px;
}
.entete.colle .barre { position: fixed; left: 0; right: 0; top: 0; }
.entete.colle { padding-bottom: 50px; }
.menu { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; justify-content: center; }
.menu > li { position: relative; }
.menu a, .menu button {
  display: block; padding: 0 20px; line-height: 50px; background: none; border: 0; cursor: pointer;
  color: var(--texte); text-decoration: none; text-transform: uppercase;
  font: 600 14px/50px var(--sans);
}
.menu a:hover, .menu a:focus-visible, .menu button:hover, .menu button:focus-visible { color: var(--survol); }
.menu a[aria-current="page"], .menu .actif > button { color: var(--actif); }
.sous-menu {
  list-style: none; margin: 0; padding: 12px 0; min-width: 250px;
  position: absolute; left: 50%; top: 100%; background: var(--fond);
  box-shadow: 0 5px 12px rgba(0, 0, 0, .15);
  visibility: hidden; opacity: 0; transform: translate(-50%, 6px); transition: opacity .2s, transform .2s, visibility .2s;
}
.sous-menu a { line-height: 1.4; padding: 8px 24px; font-weight: 400; }
.parent:hover .sous-menu, .parent:focus-within .sous-menu, .parent.ouvert .sous-menu {
  visibility: visible; opacity: 1; transform: translate(-50%, 0);
}
.burger { display: none; }

/* ------------------------------------------------------------------ contenu */
.contenu { max-width: var(--largeur); margin: 0 auto; padding: 70px 40px 60px; }
.contenu article::after { content: ""; display: block; clear: both; }
.contenu h1 {
  margin: 0 0 40px; color: var(--titre);
  font: 400 21.25px/1.2 "Mulish", var(--sans); font-weight: 600; text-transform: uppercase; letter-spacing: .75px;
}
.contenu p { margin: 0 0 20px; }
.contenu ul, .contenu ol { margin: 0 0 20px; }
.contenu table { max-width: 100%; }
.contenu iframe { max-width: 100%; }

/* photos de l'accueil : la grande photo apparaît au survol (comme l'original) */
.acc-hover-wrapper { text-align: center; }
.acc-hover { position: relative; display: inline-block; }
.acc-hover .acc-small { display: block; }
.acc-hover .acc-large {
  position: absolute; top: 50%; left: 50%; width: 85%; transform: translate(-50%, -50%);
  opacity: 0; transition: opacity .3s ease; z-index: 5;
}
.acc-hover:hover .acc-large { opacity: 1; }
.acc-hover .acc-large, .acc-hover .acc-small { border-radius: 12px; }

/* galeries photos des gîtes (remplace Droppics) */
.galerie {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 26px 20px;
  max-width: 1000px; margin: 10px auto 40px; justify-items: center; align-items: center;
}
.vignette { display: block; min-width: 0; line-height: 0; border: 1px solid var(--cadre); box-shadow: 0 0 2px rgba(0, 0, 0, .25); }
.vignette img { display: block; width: 180px; max-width: 100%; height: auto; transition: filter .2s; }
.vignette:hover img { filter: brightness(1.08); }
.vignette:focus-visible { outline: 3px solid var(--survol); outline-offset: 2px; }

/* ------------------------------------------------------------------ pied */
.pied {
  max-width: var(--largeur); margin: 0 auto; padding: 40px 20px 60px;
  text-align: center; color: var(--pied); font: 16px/1.25 Helvetica, Arial, sans-serif;
}
.pied p { margin: 0 0 20px; }
.pied a { color: var(--pied); text-decoration: none; }
.pied a:hover { color: var(--actif); }

.haut {
  position: fixed; right: 18px; bottom: 18px; width: 44px; height: 44px; border-radius: 50%;
  background: rgba(82, 47, 2, .75); opacity: 0; pointer-events: none; transition: opacity .3s;
}
.haut::before {
  content: ""; position: absolute; left: 15px; top: 18px; width: 12px; height: 12px;
  border: solid #fff; border-width: 2px 0 0 2px; transform: rotate(45deg);
}
.haut.visible { opacity: 1; pointer-events: auto; }

/* ------------------------------------------------------------------ visionneuse */
.visionneuse {
  position: fixed; inset: 0; z-index: 1000; background: rgba(0, 0, 0, .9);
  display: flex; align-items: center; justify-content: center;
}
.visionneuse img { max-width: 92vw; max-height: 86vh; width: auto; height: auto; box-shadow: 0 0 30px #000; }
.visionneuse button {
  position: absolute; background: none; border: 0; color: #fff; cursor: pointer;
  font: 42px/1 var(--serif); padding: 14px 18px; opacity: .8;
}
.visionneuse button:hover, .visionneuse button:focus-visible { opacity: 1; color: var(--survol); }
.visionneuse .fermer { top: 6px; right: 8px; }
.visionneuse .prec { left: 4px; top: 50%; transform: translateY(-50%); }
.visionneuse .suiv { right: 4px; top: 50%; transform: translateY(-50%); }
.visionneuse .compteur { position: absolute; bottom: 14px; left: 0; right: 0; text-align: center; color: #ccc; font-size: 14px; }

/* ------------------------------------------------------------------ largeur moyenne / mobile */
@media (max-width: 1050px) {
  .menu a, .menu button { padding: 0 12px; font-size: 13px; }
}
@media (max-width: 860px) {
  .logo { padding: 12px; }
  .barre { justify-content: flex-end; }
  .burger {
    display: block; width: 56px; height: 50px; background: none; border: 0; cursor: pointer; position: relative;
  }
  .burger span, .burger span::before, .burger span::after {
    position: absolute; left: 16px; width: 24px; height: 2px; background: var(--texte); content: ""; transition: transform .2s, opacity .2s;
  }
  .burger span { top: 24px; }
  .burger span::before { left: 0; top: -7px; }
  .burger span::after { left: 0; top: 7px; }
  .burger[aria-expanded="true"] span { background: transparent; }
  .burger[aria-expanded="true"] span::before { transform: translateY(7px) rotate(45deg); }
  .burger[aria-expanded="true"] span::after { transform: translateY(-7px) rotate(-45deg); }
  .menu {
    display: none; position: absolute; left: 0; right: 0; top: 100%;
    flex-direction: column; background: var(--barre); box-shadow: 0 8px 14px rgba(0, 0, 0, .2);
    max-height: calc(100vh - 50px); overflow-y: auto;
  }
  .menu.ouvert { display: flex; }
  .menu a, .menu button { width: 100%; text-align: left; padding: 0 20px; border-top: 1px solid rgba(87, 44, 3, .2); font-size: 14px; }
  .sous-menu {
    position: static; display: none; visibility: visible; opacity: 1; transform: none;
    box-shadow: none; padding: 0; background: rgba(254, 225, 185, .6);
  }
  .parent:hover .sous-menu, .parent:focus-within .sous-menu { display: none; transform: none; }
  .parent.ouvert .sous-menu { display: block; }
  .sous-menu a { padding-left: 38px; line-height: 46px; }
  .contenu { padding: 34px 16px 40px; }
  .contenu h1 { margin-bottom: 24px; font-size: 18px; }
  .galerie { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
  .vignette img { width: 100%; }
  /* textes repris de Joomla : tailles imposées trop grandes sur téléphone */
  .contenu [style*="font-size: 24pt"] { font-size: 20pt !important; }
  .contenu [style*="font-size: 18pt"] { font-size: 15pt !important; }
  .contenu [style*="font-size: 14pt"] { font-size: 12.5pt !important; }
  .contenu [style*="text-align: justify"] { text-align: left !important; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; }
}
