/* === OASIS — Design System === */
/* Polices auto-hébergées — voir /fonts/telecharger-polices.sh */
@import url('fonts.css');

:root {
  --vert-fonce:   #2D5016;
  --vert-moyen:   #3E6B20;
  --vert-clair:   #A8C077;
  --beige:        #F5F0E8;
  --beige-fonce:  #E8E0D0;
  --terracotta:   #C4622D;
  --brun:         #6B4C2A;
  --blanc:        #FAFAF7;
  --texte:        #2A2A22;
  --texte-leger:  #5A5A50;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

/* Compensation header sticky pour toutes les ancres */
[id] { scroll-margin-top: 160px; }

body {
  font-family: 'Source Sans 3', sans-serif;
  background: var(--blanc);
  color: var(--texte);
  font-size: 17px;
  line-height: 1.75;
}

/* ===== HEADER ===== */
.site-header {
  background: var(--vert-fonce);
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 2px 12px rgba(0,0,0,0.25);
}

/* --- bandeau défilant --- */
.header-banner {
  display: block;
  position: relative;
  height: 90px;
  padding: 0;
  overflow: hidden;
  background: var(--blanc);
  border-bottom: 4px solid var(--terracotta);
}

/* Logo fixe à gauche */
.header-logo-fixed {
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 106px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--blanc);
  border-right: 1px solid var(--beige-fonce);
  z-index: 2;
}

.header-logo-fixed img {
  height: 78px;
  width: auto;
  object-fit: contain;
}

/* Zone de défilement */
.strip-scroll-area {
  position: absolute;
  left: 106px; right: 0; top: 0; bottom: 0;
  overflow: hidden;
}

.strip-scroll-area::after {
  content: '';
  position: absolute;
  top: 0; right: 0; bottom: 0;
  width: 40px;
  background: linear-gradient(to left, var(--blanc), transparent);
  z-index: 1;
  pointer-events: none;
}

/* Bande d'images */
.image-strip {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  height: 100%;
  width: max-content;
  gap: 3px;
  animation: slideStrip 26s linear infinite;
}

.image-strip:hover { animation-play-state: paused; }

.image-strip img {
  height: 84px;
  width: auto;
  object-fit: cover;
  flex-shrink: 0;
  display: block;
}

@keyframes slideStrip {
  0%   { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

/* Les <img> directs du banner (ancien markup) sont cachés */
.header-banner > img { display: none; }

/* ===== NAV ===== */
nav {
  background: var(--vert-fonce);
}

.nav-inner {
  max-width: 1100px;
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  align-items: stretch;
}

.nav-item {
  position: relative;
}

.nav-item > a {
  display: block;
  padding: 14px 20px;
  color: var(--blanc);
  text-decoration: none;
  font-family: 'Source Sans 3', sans-serif;
  font-weight: 600;
  font-size: 0.95rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  transition: background 0.2s, color 0.2s;
  white-space: nowrap;
}

.nav-item > a:hover,
.nav-item > a.active {
  background: var(--terracotta);
  color: #fff;
}

.nav-item:hover .dropdown {
  display: block;
}

.dropdown {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  min-width: 240px;
  background: var(--vert-moyen);
  box-shadow: 0 6px 18px rgba(0,0,0,0.25);
  z-index: 200;
}

.dropdown a {
  display: block;
  padding: 11px 20px;
  color: var(--beige);
  text-decoration: none;
  font-size: 0.9rem;
  border-bottom: 1px solid rgba(255,255,255,0.08);
  transition: background 0.15s, padding-left 0.15s;
}

.dropdown a:hover {
  background: var(--terracotta);
  color: #fff;
  padding-left: 28px;
}

/* ===== MAIN CONTENT ===== */
.page-hero {
  background: linear-gradient(135deg, var(--vert-fonce) 0%, var(--vert-moyen) 100%);
  color: var(--blanc);
  padding: 1.75rem 2rem 1.5rem;
  text-align: center;
}

.page-hero h1 {
  font-family: 'Merriweather', serif;
  font-size: 2.4rem;
  font-weight: 900;
  line-height: 1.2;
  margin-bottom: 0.5rem;
  letter-spacing: -0.01em;
}

.page-hero .tagline {
  font-size: 1.1rem;
  color: var(--vert-clair);
  font-style: italic;
  font-family: 'Merriweather', serif;
}

.page-content {
  max-width: 860px;
  margin: 0 auto;
  padding: 3rem 2rem 4rem;
}

.section-block {
  margin-bottom: 3rem;
}

.section-block h2 {
  font-family: 'Merriweather', serif;
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--vert-fonce);
  margin-bottom: 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 3px solid var(--terracotta);
  display: inline-block;
}

.section-block h3 {
  font-family: 'Merriweather', serif;
  font-size: 1.2rem;
  color: var(--brun);
  margin: 1.5rem 0 0.6rem;
}

.section-block p {
  margin-bottom: 1rem;
  color: var(--texte);
}

/* ===== CARDS / GRID ===== */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 1.5rem;
  margin-top: 1.5rem;
}

.card {
  background: var(--beige);
  border-radius: 6px;
  padding: 1.5rem;
  border-left: 4px solid var(--vert-clair);
  transition: transform 0.2s, box-shadow 0.2s;
}

.card:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 18px rgba(0,0,0,0.1);
}

.card h3 {
  font-family: 'Merriweather', serif;
  font-size: 1.05rem;
  color: var(--vert-fonce);
  margin-bottom: 0.5rem;
}

/* ===== HORAIRES TABLE ===== */
.horaires-bloc {
  background: var(--beige);
  border-radius: 8px;
  padding: 1.5rem 2rem;
  margin-bottom: 1.5rem;
  border-left: 5px solid var(--vert-moyen);
}

.horaires-bloc h3 {
  font-family: 'Merriweather', serif;
  font-size: 1.15rem;
  color: var(--vert-fonce);
  margin-bottom: 0.6rem;
}

.horaires-bloc p, .horaires-bloc ul {
  color: var(--texte);
  font-size: 0.96rem;
}

.horaires-bloc ul {
  padding-left: 1.2rem;
  margin-top: 0.4rem;
}

.horaires-bloc ul li {
  margin-bottom: 0.3rem;
}

/* ===== BUTTONS / LINKS ===== */
.btn {
  display: inline-block;
  padding: 0.75rem 1.75rem;
  border-radius: 4px;
  font-weight: 700;
  font-size: 0.95rem;
  text-decoration: none;
  transition: background 0.2s, transform 0.15s;
  cursor: pointer;
}

.btn-primary {
  background: var(--terracotta);
  color: #fff;
}

.btn-primary:hover {
  background: #a84f23;
  transform: translateY(-1px);
}

.btn-secondary {
  background: var(--vert-fonce);
  color: #fff;
}

.btn-secondary:hover {
  background: var(--vert-moyen);
  transform: translateY(-1px);
}

.doc-link {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 1rem 1.25rem;
  background: var(--beige);
  border-radius: 6px;
  text-decoration: none;
  color: var(--vert-fonce);
  font-weight: 600;
  margin-bottom: 0.75rem;
  border: 1px solid var(--beige-fonce);
  transition: background 0.2s, border-color 0.2s;
}

.doc-link:hover {
  background: var(--beige-fonce);
  border-color: var(--vert-clair);
}

.doc-link::before {
  content: '📄';
  font-size: 1.3rem;
}

/* ===== IFRAME ===== */
.fb-iframe-wrap {
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 4px 18px rgba(0,0,0,0.1);
  margin-top: 1.5rem;
}

.fb-iframe-wrap iframe {
  display: block;
  width: 100%;
  border: none;
}

/* ===== FOOTER ===== */
.site-footer {
  background: var(--vert-fonce);
  color: var(--beige);
  text-align: center;
  padding: 2rem;
  font-size: 0.9rem;
}

.site-footer .contact-line {
  margin-bottom: 0.5rem;
}

.site-footer a {
  color: var(--vert-clair);
  text-decoration: none;
  font-weight: 600;
}

.site-footer a:hover {
  color: #fff;
  text-decoration: underline;
}

.footer-separator {
  width: 50px;
  height: 3px;
  background: var(--terracotta);
  margin: 1rem auto;
}

/* Mise en exergue inline */
.exergue {
  color: var(--terracotta);
  font-style: normal;
}

/* Bloc exergue (paragraphe entier) */
.bloc-exergue {
  border-left: 4px solid var(--terracotta);
  background: var(--beige);
  padding: 0.9rem 1.25rem;
  border-radius: 0 6px 6px 0;
  font-style: italic;
  color: var(--brun);
  margin: 1rem 0;
}

/* ===== EXERGUE DEPUIS .TXT ===== */
.txt-exergue {
  margin: 1.25rem 0;
  padding: 1rem 1.25rem;
  border-left: 5px solid var(--terracotta);
  background: var(--beige);
  border-radius: 0 6px 6px 0;
  font-family: 'Merriweather', serif;
  font-style: italic;
  color: var(--brun);
  font-size: 1rem;
  line-height: 1.7;
  /* Annuler les marges par défaut du navigateur sur <blockquote> */
  -webkit-margin-start: 0;
  -webkit-margin-end: 0;
  margin-inline-start: 0;
  margin-inline-end: 0;
  /* Empêcher tout débordement horizontal */
  max-width: 100%;
  box-sizing: border-box;
  overflow-wrap: break-word;
  word-break: break-word;
}

.txt-exergue p { margin-bottom: 0.5rem; }
.txt-exergue p:last-child { margin-bottom: 0; }

/* ===== TABLEAUX DEPUIS .TXT ===== */
.txt-tableau-wrap {
  overflow-x: auto;
  margin: 1rem 0;
}

.txt-tableau {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.95rem;
  font-family: 'Source Sans 3', sans-serif;
}

.txt-tableau th {
  background: var(--vert-fonce);
  color: var(--blanc);
  padding: 0.6rem 1rem;
  text-align: left;
  font-weight: 700;
  white-space: nowrap;
}

.txt-tableau td {
  padding: 0.55rem 1rem;
  border-bottom: 1px solid var(--beige-fonce);
  color: var(--texte);
}

.txt-tableau tr:nth-child(even) td {
  background: var(--beige);
}

.txt-tableau tr:hover td {
  background: var(--beige-fonce);
}

/* ===== PAGE NOUS AIDER ===== */
.don-options {
  display: flex;
  align-items: stretch;
  gap: 1.5rem;
  flex-wrap: wrap;
  justify-content: center;
  margin-bottom: 1.25rem;
}

.don-option {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  flex: 1;
  min-width: 220px;
  padding: 1rem;
  background: var(--blanc);
  border-radius: 6px;
  border: 1px solid var(--beige-fonce);
}

.don-option h3 {
  font-family: 'Merriweather', serif;
  font-size: 1.05rem;
  color: var(--vert-fonce);
  margin: 0;
  text-align: center;
}

.don-fiscal {
  font-size: 0.88rem;
  color: var(--texte-leger);
  text-align: center;
  margin: 0;
  font-style: italic;
}

@media (max-width: 500px) {
  .don-options { flex-direction: column; }
  .don-option  { min-width: 0; width: 100%; }
}

/* ===== HAMBURGER ===== */
.hamburger {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 10px 16px;
  margin-right: auto;
  flex-direction: column;
  gap: 5px;
  align-self: center;
}

.hamburger span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--blanc);
  border-radius: 2px;
  transition: transform 0.25s, opacity 0.25s;
}

.hamburger[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.hamburger[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.hamburger[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* Chevron sous-menu mobile */
.nav-chevron {
  display: none;
  background: none;
  border: none;
  color: var(--blanc);
  font-size: 1.5rem;
  cursor: pointer;
  padding: 0 0 0 8px;
  line-height: 1;
  vertical-align: middle;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
  .header-banner {
    height: 68px;
  }

  .header-logo-fixed {
    width: 80px;
  }

  .header-logo-fixed img {
    height: 58px;
  }

  .strip-scroll-area {
    left: 80px;
  }

  .image-strip img {
    height: 62px;
  }

  /* Nav mobile */
  nav {
    display: flex;
    align-items: center;
    padding: 0;
  }

  .hamburger {
    display: flex;
  }

  .nav-inner {
    display: none;
    flex-direction: column;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--vert-fonce);
    z-index: 300;
    max-height: 70vh;
    overflow-y: auto;
    box-shadow: 0 8px 24px rgba(0,0,0,0.35);
  }

  .nav-inner.mobile-open {
    display: flex;
  }

  .nav-chevron {
    display: inline;
  }

  .nav-item > a {
    padding: 12px 18px;
    font-size: 0.9rem;
    border-bottom: 1px solid rgba(255,255,255,0.07);
  }

  /* Désactiver le hover desktop */
  .nav-item:hover .dropdown {
    display: none;
  }

  .dropdown {
    display: none;
    position: static;
    background: rgba(0,0,0,0.25);
    box-shadow: none;
    max-height: none;
  }

  .nav-item.open > a {
    background: var(--terracotta);
  }

  .nav-item.open .dropdown {
    display: block;
  }

  .dropdown a {
    padding: 10px 18px 10px 32px;
    font-size: 0.85rem;
  }

  .dropdown a:hover {
    padding-left: 38px;
  }

  .page-hero h1 {
    font-size: 1.55rem;
  }

  .page-content {
    padding: 2rem 1.25rem 3rem;
  }

  .btn-communautaire {
    width: 100%;
    text-align: center;
    box-sizing: border-box;
  }
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; }
}

/* ===== ACCESSIBILITÉ ===== */

/* Skip link — visible uniquement au focus clavier */
.skip-link {
  position: absolute;
  top: -100%;
  left: 1rem;
  z-index: 9999;
  background: var(--vert-fonce);
  color: #fff;
  padding: 0.6rem 1.2rem;
  border-radius: 0 0 4px 4px;
  font-weight: 600;
  font-size: 0.95rem;
  text-decoration: none;
  transition: top 0.15s;
}

.skip-link:focus {
  top: 0;
}
