/* ==========================================================================
   BRAM — Feuille de style commune
   Style coloré / dynamique — palette officielle OFB (vert foncé / marron)
   ========================================================================== */

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

:root {
  /* Palette officielle OFB */
  --green: #875E30;         /* marron (remplace le vert clair d'accent) */
  --green-dark: #6E4C26;
  --green-light: #F3EBE1;
  --blue: #2D6A4F;          /* vert foncé (remplace le bleu OFB) */
  --blue-dark: #1B4332;
  --blue-light: #E3EDE7;
  --brown: #875E30;
  --brown-light: #F3EBE1;

  --ink: #16211C;
  --ink-soft: #3E4A44;
  --ink-muted: #7C8983;
  --paper: #F5F8F5;         /* fond clair légèrement vert */
  --white: #FFFFFF;
  --border: rgba(22,33,28,0.14);

  --max-width: 1120px;
}

html, body { height: 100%; }

body {
  font-family: 'Poppins', system-ui, -apple-system, sans-serif;
  background: var(--paper);
  color: var(--ink);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; }

img { max-width: 100%; display: block; }

/* ---------- Layout helpers ---------- */

.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 2rem;
}

section {
  padding: 4.5rem 0;
}

@media (max-width: 640px) {
  section { padding: 3rem 0; }
  .container { padding: 0 1.25rem; }
}

/* ---------- Header / Navigation ---------- */

header.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--paper);
  border-bottom: 2px solid var(--ink);
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 76px;
}

.logo {
  font-family: 'Poppins', sans-serif;
  font-weight: 700;
  font-size: 1.5rem;
  letter-spacing: -0.01em;
  color: var(--blue-dark);
  text-decoration: none;
}

.logo span {
  color: var(--green-dark);
}

.nav-links {
  display: flex;
  gap: 2.25rem;
  list-style: none;
}

.nav-links a {
  text-decoration: none;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--ink-soft);
  padding: 0.4rem 0.1rem;
  border-bottom: 2px solid transparent;
  transition: color 0.15s ease, border-color 0.15s ease;
}

.nav-links a:hover,
.nav-links a[aria-current="page"] {
  color: var(--blue-dark);
  border-bottom-color: var(--green);
}

.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
}

.nav-toggle span,
.nav-toggle span::before,
.nav-toggle span::after {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--ink);
  position: relative;
  transition: transform 0.2s ease;
}

.nav-toggle span::before,
.nav-toggle span::after {
  content: '';
  position: absolute;
}

.nav-toggle span::before { top: -7px; }
.nav-toggle span::after { top: 7px; }

@media (max-width: 760px) {
  .nav-toggle { display: block; }

  .nav-links {
    position: absolute;
    top: 76px;
    left: 0;
    right: 0;
    background: var(--paper);
    border-bottom: 2px solid var(--ink);
    flex-direction: column;
    gap: 0;
    padding: 0.5rem 2rem 1.5rem;
    display: none;
  }

  .nav-links.open { display: flex; }

  .nav-links a {
    display: block;
    padding: 0.85rem 0;
    border-bottom: 1px solid var(--border);
  }
}

/* ---------- Formulaire de contact ---------- */

.contact-form {
  max-width: 560px;
  display: flex;
  flex-direction: column;
  gap: 1.1rem;
}

.form-field { display: flex; flex-direction: column; gap: 0.35rem; }

.form-field label {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--ink);
}

.form-optional { font-weight: 300; color: var(--ink-muted); }

.contact-form input[type="text"],
.contact-form input[type="email"],
.contact-form textarea {
  font-family: inherit;
  font-size: 0.95rem;
  color: var(--ink);
  background: var(--white);
  border: 2px solid var(--ink);
  border-radius: 6px;
  padding: 0.7rem 0.9rem;
  width: 100%;
}

.contact-form textarea { resize: vertical; min-height: 140px; }

.contact-form input:focus-visible,
.contact-form textarea:focus-visible {
  outline: 3px solid var(--green);
  outline-offset: 2px;
}

.contact-form .btn { align-self: flex-start; cursor: pointer; font-family: inherit; }

/* Champ anti-spam : invisible pour les humains */
.form-hp {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.form-status {
  max-width: 560px;
  padding: 0.8rem 1rem;
  border: 2px solid var(--ink);
  border-radius: 6px;
  font-size: 0.9rem;
  font-weight: 500;
  margin-bottom: 1.25rem;
}

.form-status-ok { background: var(--blue-light); color: var(--blue-dark); }
.form-status-erreur { background: var(--brown-light); color: var(--green-dark); }

/* ---------- Buttons ---------- */

.btn {
  display: inline-block;
  font-size: 0.95rem;
  font-weight: 600;
  text-decoration: none;
  padding: 0.8rem 1.7rem;
  border-radius: 6px;
  border: 2px solid var(--ink);
  transition: transform 0.12s ease, box-shadow 0.12s ease;
}

.btn-primary {
  background: var(--blue);
  color: var(--white);
  border-color: var(--ink);
  box-shadow: 4px 4px 0 var(--green);
}

.btn-primary:hover {
  transform: translate(2px, 2px);
  box-shadow: 2px 2px 0 var(--green);
}

.btn-outline {
  background: var(--white);
  color: var(--ink);
  border-color: var(--ink);
  box-shadow: 4px 4px 0 var(--brown);
}

.btn-outline:hover {
  transform: translate(2px, 2px);
  box-shadow: 2px 2px 0 var(--brown);
}

/* ---------- Hero ---------- */

.hero {
  padding: 5.5rem 0 5rem;
  border-bottom: 2px solid var(--ink);
}

.eyebrow {
  display: inline-block;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--green-dark);
  background: var(--green-light);
  padding: 6px 14px;
  border-radius: 6px;
  margin-bottom: 1.75rem;
}

h1, h2, h3 {
  font-family: 'Poppins', sans-serif;
  font-weight: 700;
  color: var(--blue-dark);
  letter-spacing: -0.01em;
}

h1 {
  font-size: clamp(2.4rem, 5vw, 3.4rem);
  line-height: 1.1;
  max-width: 680px;
  margin-bottom: 1.25rem;
}

h2 {
  font-size: clamp(1.7rem, 3vw, 2.2rem);
  margin-bottom: 0.75rem;
}

h3 {
  font-size: 1.15rem;
  margin-bottom: 0.5rem;
}

.lede {
  font-size: 1.05rem;
  font-weight: 400;
  color: var(--ink-soft);
  max-width: 560px;
  margin-bottom: 2.25rem;
}

.hero-actions {
  display: flex;
  gap: 1.1rem;
  flex-wrap: wrap;
}

/* Hero en deux colonnes : texte + bulles de logos */
.hero-split {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.3fr);
  gap: 2.5rem;
  align-items: center;
}

.logo-bubbles {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(2, 270px);  /* 2 colonnes, soit 3 lignes pour 6 logos */
  justify-content: center;
  gap: 1.25rem;
  justify-self: end;
}

.logo-bubble {
  width: 270px;
  height: 190px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem 2rem;
  background: var(--white);
  border: 2px solid var(--ink);
  border-radius: 48px;
  box-shadow: 6px 6px 0 var(--brown);
}

.logo-bubble img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  display: block;
}

@media (max-width: 900px) {
  .hero-split { grid-template-columns: 1fr; gap: 2.25rem; }
  .logo-bubbles { justify-self: start; justify-content: start; }
}

@media (max-width: 600px) {
  .logo-bubbles { grid-template-columns: repeat(2, 150px); gap: 1rem; }
  .logo-bubble { width: 150px; height: 106px; padding: 0.9rem 1.1rem; border-radius: 32px; }
}

/* ---------- Section header ---------- */

.section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 2rem;
  margin-bottom: 2.5rem;
  flex-wrap: wrap;
}

.section-head p {
  color: var(--ink-muted);
  font-weight: 400;
  max-width: 480px;
}

.section-alt {
  background: var(--white);
  border-top: 2px solid var(--ink);
  border-bottom: 2px solid var(--ink);
}

/* ---------- Cards / Grids ---------- */

.grid {
  display: grid;
  gap: 1.85rem;
}

.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }

@media (max-width: 900px) {
  .grid-3, .grid-4 { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 600px) {
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
}

.card {
  background: var(--white);
  border: 2px solid var(--ink);
  border-radius: 8px;
  padding: 1.75rem;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  box-shadow: 5px 5px 0 var(--green);
}

.card-media {
  aspect-ratio: 16 / 10;
  background: var(--blue);
  border-radius: 5px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--white);
  font-size: 0.8rem;
  font-weight: 600;
  margin-bottom: 0.75rem;
  overflow: hidden;
}

.card-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.card .meta {
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--green-dark);
}

.card p {
  color: var(--ink-soft);
  font-size: 0.95rem;
  font-weight: 400;
}

.card-link {
  margin-top: auto;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--blue-dark);
  text-decoration: none;
  border-bottom: 2px solid var(--blue);
  align-self: flex-start;
}

/* ---------- Vignettes dépliables (événements / projets) ---------- */

/* Chaque vignette garde sa propre hauteur : en ouvrir une
   n'étire pas les voisines de la même rangée. */
.grid-expand { align-items: start; }

.card-expandable { gap: 0; }

.card-expandable summary {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  cursor: pointer;
  list-style: none;
}

.card-expandable summary::-webkit-details-marker { display: none; }

.card-expandable summary:focus-visible {
  outline: 3px solid var(--blue);
  outline-offset: 6px;
  border-radius: 4px;
}

.card-toggle {
  align-self: flex-start;
  margin-top: 0.25rem;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--blue-dark);
  border-bottom: 2px solid var(--blue);
}

.card-toggle::after { content: "Lire la suite  +"; }
.card-expandable details[open] .card-toggle::after { content: "Réduire  −"; }

.card-more {
  margin-top: 1.1rem;
  padding-top: 1.1rem;
  border-top: 2px dashed var(--border);
}

.card-more p {
  color: var(--ink-soft);
  font-size: 0.95rem;
  line-height: 1.7;
}

@media (prefers-reduced-motion: no-preference) {
  .card-expandable details[open] .card-more {
    animation: card-reveal 0.25s ease-out;
  }
}

@keyframes card-reveal {
  from { opacity: 0; transform: translateY(-6px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ---------- Member card ---------- */

.member-card {
  text-align: center;
  align-items: center;
  box-shadow: 5px 5px 0 var(--brown);
}

.member-photo {
  width: 96px;
  height: 96px;
  border-radius: 50%;
  background: var(--brown-light);
  border: 2px solid var(--ink);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--brown);
  font-size: 0.75rem;
  font-weight: 600;
  margin: 0 auto 0.5rem;
}

.member-role {
  font-size: 0.85rem;
  color: var(--green-dark);
  font-weight: 600;
}

/* ---------- Placeholder blocks (contenu à venir) ---------- */

.placeholder {
  border: 2px dashed var(--ink);
  background: var(--blue-light);
  color: var(--ink-soft);
  font-weight: 500;
  font-size: 0.85rem;
  text-align: center;
  padding: 2.5rem 1.5rem;
  border-radius: 8px;
}

/* ---------- Filters (événements / projets) ---------- */

.filters {
  display: flex;
  gap: 0.6rem;
  flex-wrap: wrap;
  margin-bottom: 2.5rem;
}

.filter-btn {
  font-size: 0.85rem;
  font-weight: 600;
  padding: 0.5rem 1.1rem;
  border-radius: 20px;
  border: 2px solid var(--ink);
  background: var(--white);
  color: var(--ink-soft);
  cursor: pointer;
}

.filter-btn.active {
  background: var(--green);
  border-color: var(--ink);
  color: var(--white);
}

/* ---------- CTA band ---------- */

.cta-band {
  background: var(--blue-dark);
  color: var(--white);
  border-top: 2px solid var(--ink);
  border-bottom: 2px solid var(--ink);
}

.cta-band h2 {
  color: var(--white);
}

.cta-band p {
  color: rgba(255,255,255,0.85);
  font-weight: 400;
  max-width: 480px;
}

.cta-band .btn-primary {
  background: var(--green);
  border-color: var(--ink);
  box-shadow: 4px 4px 0 var(--brown);
}

.cta-band .btn-primary:hover {
  transform: translate(2px, 2px);
  box-shadow: 2px 2px 0 var(--brown);
}

/* ---------- Footer ---------- */

footer.site-footer {
  border-top: 2px solid var(--ink);
  padding: 3rem 0 2rem;
  background: var(--white);
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 2rem;
  margin-bottom: 2.5rem;
}

@media (max-width: 700px) {
  .footer-grid { grid-template-columns: 1fr 1fr; }
}

.footer-grid h4 {
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-muted);
  margin-bottom: 0.9rem;
}

.footer-grid ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
}

.footer-grid a {
  text-decoration: none;
  color: var(--ink-soft);
  font-size: 0.9rem;
  font-weight: 500;
}

.footer-grid a:hover { color: var(--blue-dark); }

.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
  font-size: 0.8rem;
  color: var(--ink-muted);
  border-top: 1px solid var(--border);
  padding-top: 1.5rem;
}

.footer-bottom a {
  text-decoration: none;
  color: inherit;
  border-bottom: 1px solid var(--border);
}
