/* header-footer.css
   Refactored: corrections, no duplicates, consistent fallbacks.
   Relies on design variables declared in page-level CSS (--primary, --surface, --border, --text, --radius, etc.)
*/
@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:wght@400;500;600;700&display=swap');
:root { --site-font: 'Playfair Display', serif; 
  --primary: #4B2E22;
  --secondary: #7A4A2C;
  --accent: #C6A15B;
  --banner: #F3E8D8;
  --sand: #F3E8D8;
  --surface: #FBF7F1;
  --surface2: #ffffff;
  --text: #2B2B2B;
  --border: #E7DED2;
  --radius: 12px;
  --shadow-card: 0 8px 24px rgba(0, 0, 0, 0.08);
  --success: #2E7D32;
  --warning: #B7791F;
  --error: #C62828;
  --info: #2B6CB0;
  --h1-mobile: 34px;
  --h1-desktop: 48px;}
html, body,
input, textarea, select, button,
a, p, li,
h1, h2, h3, h4, h5, h6 {
  font-family: var(--site-font);
}
/* Scope / box-sizing for header/footer specific rules */
header, footer, nav, .header-inner, .footer-inner, .phone-bar { box-sizing: border-box; }
/* Fonts */
/* Skip link (accessibility) */
.skip {
  position: absolute;
  left: -999px;
  top: auto;
}
.skip:focus {
  position: static;
  margin: 12px;
  padding: 8px 12px;
  background: var(--primary);
  color: #fff;
  border-radius: 8px;
  z-index: 9999;
}

/* Header wrapper */
.header {
  position: sticky;
  top: 0;
  z-index: 60;
  background: rgba(255, 255, 255, 0.92);
  border-bottom: 1px solid var(--border, rgba(0,0,0,0.06));
  -webkit-backdrop-filter: blur(4px);
  backdrop-filter: blur(4px);
}

/* Inner wrapper: centered and flexible */
.header-inner,
.footer-inner {
  max-width: var(--layout-max-width, 100%);
  margin: 0 auto;
  padding: 12px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
}

/* Allow absolute centering of the nav while keeping brand/actions in flow */
.header-inner { position: relative; background: var(--sand);}


/* Navigation: centered (primary) with robust fallbacks */
/* Single .nav definition avoids duplication */
.nav {
  position: absolute;
  transform: translate(-50%, -50%);
  display: flex;
  gap: 12px;
  align-items: center;
  justify-content: center;
  white-space: nowrap;
  z-index: 5;
  font-size: 18px;
    font-size: 22px;
  display: flex;
  gap: 12px;
  align-items: center;
  flex-wrap: wrap
}
.nav a {
  position: relative;
  display: inline-block;
  flex: 0 0 auto;
  text-decoration: none;
}

/* Visual separator between nav items */
.nav a:not(:last-child)::after {
  content: "|";
  margin-left: 8px;
  color: rgba(0,0,0,0.18);
  font-weight: 600;
}

/* Responsive: reduce Menu font under 900px */
@media (max-width: 900px) {
  /* reduce font-size and spacing to keep the centered menu readable */
  .header-inner > [aria-label="Menu"],
  .header-inner > [aria-label="Menu"] .nav {
    font-size: 16px;        /* reduced from default (e.g. 18/22) */
    gap: 8px;               /* tighten gaps if needed */
  }
  .nav a { padding: 0 6px; } /* slightly smaller tap targets */
}

/* ===================== BURGER MENU ===================== */
/* Burger button - hidden by default on desktop */
.burger-btn {
  display: none;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 0;
  z-index: 100;
}

.burger-btn img {
  width: 32px;
  height: 32px;
  object-fit: contain;
  transition: transform 0.3s ease;
}

/* Burger animation when open */
.burger-btn.open img {
  transform: rotate(90deg);
}

/* Mobile styles < 768px */
@media (max-width: 767px) {
  /* Show burger button */
  .burger-btn {
    display: flex;
    position: relative;
    z-index: 101;
  }

  /* Hide the desktop menu wrapper (target div#nav-menu, not the burger button) */
  .header-inner > #nav-menu {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background: rgba(255, 255, 255, 0.98);
    display: flex;
    align-items: center;
    justify-content: center;
    transform: translateX(-100%);
    transition: transform 0.3s ease;
    z-index: 90;
  }

  /* When menu is open */
  .header-inner > #nav-menu.menu-open {
    transform: translateX(0);
  }

  /* Style nav for mobile - vertical layout */
  .header-inner .nav {
    position: static;
    transform: none;
    flex-direction: column;
    gap: 24px;
    font-size: 24px;
    text-align: center;
  }

  /* Remove separators on mobile */
  .nav a:not(:last-child)::after {
    content: none;
  }

  .nav a {
    padding: 12px 24px;
    display: block;
  }

  /* Hide CTA button on mobile */
  .header-inner > [aria-label="Contact"] {
    display: none;
  }

  /* Hide footer navigation on mobile */
  .footer nav[aria-label="Liens footer"] {
    display: none !important;
  }

  /* Ensure header stays above mobile menu */
  .header {
    z-index: 100;
  }
}

/* Footer */
.footer {
  background: var(--primary);
  color: var(--surface);
  padding: 20px 0;
  margin-top: 28px;
}
.footer a {
  color: var(--surface);
  text-decoration: none;
}
.footer-inner {
  align-items: flex-start;
  gap: 14px;
}
.footer .col {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
@media (min-width:1024px) {
  :root {
    --h1-desktop: 56px;
  }
}

/* Fonts */

/* Reset / base */
* {
  box-sizing: border-box
}

html,
body {
  height: 100%;
  margin: 0;
  background: var(--sand);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
}

a {
  color: var(--secondary);
  text-decoration: none
}

img {
  max-width: 100%;
  height: auto;
  display: block
}

/* Layout containers */
.container {
  max-width: 2100px;
  margin: 0 auto;
  padding: 0 16px;
}

/* Brand / CTA */
.site-brand {
  display: flex;
  gap: 12px;
  align-items: center;
  flex: 0 0 auto
}

.site-brand img {
  width: 56px;
  height: 56px;
  object-fit: cover;
  border-radius: 8px
}

.site-title {
  font-family: serif;
  color: var(--primary);
  font-size: 1.1rem
}

.cta-book {
  flex: 0 0 auto;
  background: var(--primary);
  color: var(--surface);
  padding: 8px 12px;
  border-radius: 10px;
  font-weight: 600;
  border: 0
}


/* Skip link */
.skip {
  position: absolute;
  left: -999px
}

.skip:focus {
  position: static;
  margin: 12px;
  padding: 8px 12px;
  background: var(--primary);
  color: white;
  border-radius: 8px;
  z-index: 9999
}

/* Hero */
.hero {
  position: relative;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: var(--shadow-card)
}

.hero .media {
  height: 320px;
  background-size: cover;
  background-position: center
}

@media(min-width:768px) {
  .hero .media {
    height: 420px
  }
}

.hero .overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(rgba(0, 0, 0, 0.18), rgba(0, 0, 0, 0.18));
  display: flex;
  align-items: center
}

.hero .content {
  color: white;
  padding: 20px;
  max-width: 720px
}

.h1 {
  font-family: serif;
  font-size: var(--h1-mobile);
  line-height: 1;
  margin: 0
}

@media(min-width:768px) {
  .h1 {
    font-size: var(--h1-desktop)
  }
}

.lead {
  margin-top: 8px;
  font-size: 15px;
  color: rgba(255, 255, 255, 0.9)
}

/* Sections */
.section {
  margin-top: 20px;
  max-width: 1300px;
  margin-left: auto;
  margin-right: auto;
}

.section-title {
  font-family: serif;
  color: var(--primary);
  font-size: 1.25rem;
  margin-bottom: 12px
}
.grid.grid-2 {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
}
/* Grid utilities */
.grid {
  display: grid;
  gap: 12px
}

.grid-2 {
  grid-template-columns: 1fr
}

.grid-3 {
  grid-template-columns: 1fr
}

@media(min-width:768px) {
  .grid-2 {
    grid-template-columns: repeat(2, 1fr)
  }
  .grid-3 {
    grid-template-columns: repeat(3, 1fr)
  }
}
/* Larger screens: keep equal widths, optional max width */
@media (min-width: 1100px) {
  .grid.grid-2 {
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
  }
}
/* Cards */
.card {
  background: var(--surface);
  border-top-left-radius: var(--radius);
  border-top-right-radius: var(--radius);
  box-shadow: var(--shadow-card);
  overflow: hidden
}

.card .media {
  min-height: 300px;
  background-size: cover;
  background-position: center
}

/* cardImage variant */
.cardImage {
  overflow: hidden
}

.cardImage .media2 {
  min-height: 300px;
  border-top-left-radius: var(--radius);
  border-top-right-radius: var(--radius);
  background-size: cover;
  background-position: center
}

/* Domaine block */
.domaine-grid {
  gap: 16px;
  grid-template-columns: 1fr;
  align-items: start
}

@media(min-width:768px) {
  .domaine-grid {
    grid-template-columns: 1fr 420px
  }
}

.domaine-grid h3 {
  font-size: 38px;
  line-height: 1.5;
  margin-bottom: 12px;
}

.domaine-grid p {
  font-size: 22px;
  line-height: 1.5;
  margin-bottom: 12px;
}

.domaine-grid .small {
  font-size: 13px;
  color: #444
}

@media(max-width:767px) {
  .domaine-grid p {
    column-count: 1;
    font-size: 18px
  }
}

/* Typography */
h2,
h3 {
  margin: 0 0 8px 0
}

p {
  margin: 0 0 12px 0;
  line-height: 1.6;
  font-size: 15px
}

/* Buttons */
.btn {
  display: inline-block;
  padding: 8px 12px;
  border-radius: 10px;
  font-weight: 600;
  cursor: pointer
}

.btn-primary {
  background: var(--primary);
  color: var(--surface)
}

.btn-primary:hover {
  background: #3E251B
}

.btn-secondary {
  background: transparent;
  border: 2px solid var(--secondary);
  color: var(--secondary)
}

.btn-secondary:hover {
  background: var(--sand)
}

/* Testimonial */
.testimonial {
  padding: 16px;
  background: var(--surface);
  border-radius: 12px;
  box-shadow: var(--shadow-card)
}

/* Forms */
.input,
textarea {
  display: block;
  width: 100%;
  padding: 10px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: white
}

.input:focus,
textarea:focus {
  outline: 3px solid rgba(198, 161, 91, 0.25);
  box-shadow: 0 4px 12px rgba(198, 161, 91, 0.08)
}

/* Utilities */
.small {
  font-size: 13px;
  color: #444
}

.center {
  text-align: center
}

.visually-hidden {
  position: absolute !important;
  height: 1px;
  width: 1px;
  overflow: hidden;
  clip: rect(1px, 1px, 1px, 1px);
  white-space: nowrap
}

/* Partners (preserve existing ids/paths) */
#fondPatr {
  height: 68px;
  width: 68px;
  background: url('../images/Accueil/fonda-patri_resized.jpg') no-repeat;
  display: block
}

#Gonm {
  height: 68px;
  width: 68px;
  background: url('../images/Accueil/ornito_resized.jpg') no-repeat;
  display: block
}

#Ancv {
  height: 68px;
  width: 102px;
  background: url('../images/Accueil/ancv_logo_resized.jpg') no-repeat;
  display: block
}

#HumaniteBiod {
  height: 94px;
  width: 160px;
  border-radius: 5px;
  background: url('../images/Accueil/humanitebiod_logo.jpg') no-repeat;
  box-shadow: 0 4px 4px rgba(28, 26, 25, 0.6);
  display: block;
  margin-left: 0
}

/* Partners card layout */
.card.partners {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  padding: 12px;
  border-top-left-radius: var(--radius);
  border-top-right-radius: var(--radius);
  box-shadow: var(--shadow-card);
  background: var(--surface)
}

.card.partners a {
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 1 1 220px;
  min-width: 160px;
  height: 72px;
  padding: 8px;
  text-decoration: none;
  color: inherit
}

.card.partners a>div {
  width: 100%;
  height: 56px;
  border-radius: 8px;
  background: #fff;
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  color: var(--text);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04)
}

@media(max-width:520px) {
  .card.partners a {
    flex: 1 1 100%;
    min-width: 0
  }
}

/* Recommended list */
.card.recommended {
  padding: 12px
}

.recommended-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  align-items: center
}

.recommended-list li {
  flex: 1 1 160px;
  min-width: 140px
}

.recommended-list a {
  display: inline-block;
  width: 100%;
  text-align: center;
  padding: 10px 12px;
  border-radius: 8px;
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--primary);
  font-weight: 600;
  text-decoration: none
}

.recommended-list a:hover,
.recommended-list a:focus {
  background: rgba(75, 46, 34, 0.04);
  box-shadow: 0 4px 12px rgba(198, 161, 91, 0.08);
  text-decoration: underline
}

@media(max-width:520px) {
  .recommended-list li {
    flex: 1 1 100%;
  }
}

/* Hebergements page helpers (scoped) */
.page-hebergements .section>* {
  max-width: 920px;
  margin: 0 auto;
}

.page-hebergements .card {
  width: 100%;
  box-sizing: border-box
}

.page-hebergements .card .media {
  min-height: 400px;
  background-size: cover;
  background-position: center;
  border-radius: var(--radius)
}

@media(min-width:768px) {
  .page-hebergements .card {
    display: block
  }
}

/* Responsive tweaks */
@media(max-width:1024px) {
  aside {
    width: auto;
    height: auto
  }
}

@media(max-width:767px) {
  .domaine-grid p {
    column-count: 1
  }

  .recommended-list li {
    flex: 1 1 100%;
    min-width: 0
  }

  .card.partners a {
    flex: 1 1 100%;
    min-width: 0
  }
}

/* End of file */