/* Charte graphique « Commun » : tout se règle ici */

@font-face {
  font-family: "Atkinson Hyperlegible";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("../fonts/atkinson-hyperlegible-400.woff2") format("woff2");
}
@font-face {
  font-family: "Atkinson Hyperlegible";
  font-style: italic;
  font-weight: 400;
  font-display: swap;
  src: url("../fonts/atkinson-hyperlegible-400-italic.woff2") format("woff2");
}
@font-face {
  font-family: "Atkinson Hyperlegible";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("../fonts/atkinson-hyperlegible-700.woff2") format("woff2");
}
@font-face {
  font-family: "Bricolage Grotesque";
  font-style: normal;
  font-weight: 600 800;
  font-display: swap;
  src: url("../fonts/bricolage-grotesque-variable.woff2") format("woff2");
}

:root {
  --color-bg: #fbf8f3;
  --color-text: #1d2621;
  --color-muted: #5a6660;
  --color-accent: #1f4d3a;
  --color-highlight: #e9b949;
  --color-border: #dde3dc;

  --font-body: "Atkinson Hyperlegible", system-ui, sans-serif;
  --font-heading: "Bricolage Grotesque", system-ui, sans-serif;

  --size-base: 1.0625rem;
  --line-height: 1.6;
  --container: 66rem;
  --measure: 41rem; /* largeur de lecture du texte courant */
  --space: 1.5rem;
}

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

body {
  margin: 0;
  background: var(--color-bg);
  color: var(--color-text);
  font-family: var(--font-body);
  font-size: var(--size-base);
  line-height: var(--line-height);
}

h1, h2, h3 { font-family: var(--font-heading); font-weight: 700; line-height: 1.2; color: var(--color-accent); }
a { color: var(--color-accent); }
img { max-width: 100%; height: auto; }

.container {
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: var(--space);
}

.site-header { border-bottom: 1px solid var(--color-border); padding-block: var(--space); }
.site-header .container { display: flex; flex-wrap: wrap; gap: 1rem; align-items: center; justify-content: space-between; }
.site-title { display: inline-flex; align-items: center; gap: 0.6rem; font-family: var(--font-heading); font-weight: 800; font-size: 1.25rem; text-decoration: none; color: var(--color-accent); }
.site-title .logo-symbol { width: 2.75rem; height: 2.75rem; flex-shrink: 0; }
.site-nav ul { display: flex; flex-wrap: wrap; gap: 1rem; list-style: none; margin: 0; padding: 0; }
.site-nav a { text-decoration: none; color: var(--color-muted); }
.site-nav a[aria-current="page"] { color: var(--color-text); font-weight: 700; }

/* Menu dépliant sur petit écran (seulement si JavaScript est actif) */
.nav-toggle {
  font: inherit;
  font-weight: 700;
  color: var(--color-accent);
  background: none;
  border: 2px solid var(--color-accent);
  border-radius: 0.375rem;
  padding: 0.25rem 0.75rem;
  cursor: pointer;
}
.nav-toggle::after { content: " ▾"; }
.nav-toggle[aria-expanded="true"]::after { content: " ▴"; }
@media (max-width: 47.99rem) {
  .js .site-header .container { align-items: center; }
  .js .site-nav { display: contents; }
  .js .site-nav ul { display: none; flex-basis: 100%; flex-direction: column; gap: 0.75rem; padding-top: 0.5rem; }
  .js .nav-toggle[aria-expanded="true"] + ul { display: flex; }
}
@media (min-width: 48rem) {
  .nav-toggle { display: none; }
}

main { padding-block: calc(var(--space) * 2); }
.site-footer { border-top: 1px solid var(--color-border); padding-block: var(--space); font-size: 0.9375rem; }
.site-footer a { color: var(--color-muted); }
.site-footer a:hover { color: var(--color-accent); }


/* Fil d'Ariane */
.breadcrumb ol { display: flex; flex-wrap: wrap; gap: 0.25rem 0.5rem; list-style: none; margin: 0 0 var(--space); padding: 0; font-size: 0.9375rem; color: var(--color-muted); }
.breadcrumb li + li::before { content: "›"; margin-right: 0.5rem; color: var(--color-muted); }
.breadcrumb a { color: var(--color-muted); }
.breadcrumb a:hover { color: var(--color-accent); }
.breadcrumb + h1 { margin-top: 0; }
@media (max-width: 47.99rem) { .breadcrumb li:last-child { display: none; } } /* le titre suit juste en dessous */

/* Accueil et chapeaux */
.hero {
  display: grid;
  gap: calc(var(--space) * 2);
  align-items: center;
}
@media (min-width: 48rem) {
  .hero { grid-template-columns: 1fr 1fr; }
}
.hero-image { display: block; width: 100%; border-radius: 0.5rem; }
.hero h1 { font-size: clamp(2rem, 5vw, 3rem); font-weight: 800; margin-top: 0; }
.hero p { font-size: 1.25rem; }
.lead { font-family: var(--font-heading); font-size: 1.25rem; font-weight: 600; }
.lead, .hero p {
  text-decoration: underline var(--color-highlight);
  text-decoration-thickness: 0.2em;
  text-underline-offset: 0.3em;
  text-decoration-skip-ink: none;
  line-height: 1.8;
}
.page h2 {
  display: inline-block;
  margin-top: calc(var(--space) * 2);
  padding-bottom: 0.25rem;
  border-bottom: 3px solid var(--color-highlight);
}

/* Sections de l'accueil */
.home-section { margin-top: calc(var(--space) * 4); }
.cards { list-style: none; padding: 0; margin: 0; display: grid; gap: var(--space); grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr)); }
.card { display: flex; flex-direction: column; padding: var(--space); background: #fff; border: 1px solid var(--color-border); border-radius: 0.5rem; }
.card h2, .card h3 { margin-block: 0 0.5rem; }
.home-section .card p { flex-grow: 1; }
.card p:last-child { margin-bottom: 0; }

/* Le texte courant garde une largeur de lecture confortable */
.page > p, .page > ul:not(.cards), .page > ol { max-width: var(--measure); }

/* Image dans une page */
.page-image { display: block; max-width: var(--measure); width: 100%; border-radius: 0.5rem; }
.page-banner { display: block; width: 100%; height: clamp(10rem, 28vw, 18rem); object-fit: cover; object-position: center 35%; border-radius: 0.5rem; margin-bottom: calc(var(--space) * 1.5); }

/* Photo et intention côte à côte (pages de formation) */
.intro-grid { display: grid; gap: calc(var(--space) * 2); align-items: start; margin-bottom: calc(var(--space) * 2); }
@media (min-width: 48rem) { .intro-grid { grid-template-columns: 1fr 1fr; } }
.intro-grid p:first-child, .intro-grid > p { margin-top: 0; }
.cta-inline { font-weight: 700; margin-top: var(--space); }

/* Cartes sur deux colonnes (Nos outils, pages de formation) */
.page .cards { margin-bottom: calc(var(--space) * 2); }
.cards-2 .card, .outils .card { display: block; }
.cards-2 .card p { margin-block: 0 0.75rem; }
.cards-2 .card p:last-child { margin-bottom: 0; }
.cards-2, .outils .cards { grid-template-columns: 1fr; }
@media (min-width: 48rem) {
  .cards-2, .outils .cards { grid-template-columns: 1fr 1fr; }
}

/* Page Nos outils */
.outils { margin-top: calc(var(--space) * 2); }
.outils h2 { display: inline-block; padding-bottom: 0.25rem; border-bottom: 3px solid var(--color-highlight); }
.card-link { font-weight: 700; text-decoration: none; }
.card-link:hover { text-decoration: underline; }

.button {
  display: inline-block;
  margin-top: 0.5rem;
  padding: 0.75rem 1.25rem;
  background: var(--color-highlight);
  color: var(--color-text);
  font-weight: 700;
  text-decoration: none;
  border-radius: 0.375rem;
}
.button:hover { background: #f2cc6b; }

/* Appel à l'action en fin de page */
.cta {
  margin-top: calc(var(--space) * 2);
  padding: calc(var(--space) * 1.5);
  background: var(--color-accent);
  color: var(--color-bg);
  border-radius: 0.5rem;
}
.page .cta h2 { color: var(--color-bg); margin-block: 0 0.5rem; border-bottom: 0; padding-bottom: 0; }
.cta p { max-width: var(--measure); }

/* Équipe */
.membres { list-style: none; padding: 0; display: grid; gap: calc(var(--space) * 1.5); grid-template-columns: 1fr; }
@media (min-width: 30rem) { .membres { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 48rem) { .membres { grid-template-columns: repeat(3, 1fr); } }
.membre img { width: 8rem; height: 8rem; object-fit: cover; border-radius: 50%; }
.membre h3 { margin-bottom: 0.25rem; }
.membre-role { color: var(--color-muted); font-size: 0.9375rem; margin-top: 0; }
.membre-liens { font-size: 0.875rem; }
