@font-face {
  font-family: 'MontserratExtraBold';
  src: url("/static/fonts/Montserrat-ExtraBold.8a50619755ab.ttf") format('truetype');
  font-weight: 900;
  font-style: normal;
}

@font-face {
  font-family: 'Montserrat';
  src: url("/static/fonts/Montserrat-Regular.203d753a8055.ttf") format('truetype');
  font-weight: normal;
  font-style: normal;
}

@font-face {
  font-family: 'OpenSans';
  src: url("/static/fonts/OpenSans-Regular.94d168f74b7d.ttf") format('truetype');
  font-weight: normal;
  font-style: normal;
}

.font-Montserrat-bold {
  font-family: 'MontserratExtraBold', sans-serif;
}

.font-montserrat {
  font-family: 'Montserrat', sans-serif;
}

.font-open-sans {
  font-family: 'OpenSans';
}

:root {
  /* Fonds */
  --bg: #F2B705;
  --card: #FFFFFF;
  --tint: #F6EAE4;

  /* Texte */
  --text: #2B2B2B;
  --muted: #6B5F55;

  /* Identité MIAM */
  --primary: #D27A6A;
  /* terracotta façade */
  --secondary: #2E3A59;
  /* bleu enseigne */
  --accent: #F2B705;
  /* jaune logo */

  /* UI */
  --border: #E4D7CF;
  --shadow: 0 10px 30px rgba(0, 0, 0, .08);

  --radius: 16px;
  --maxw: 1040px;
  --pad: 20px;

  /* Fonts */
  --font-title: 'MontserratExtraBold', sans-serif;
  --font-body: 'OpenSans', sans-serif;
  --font-text: 'Montserrat', sans-serif;
}


* {
  box-sizing: border-box;
}

html,
body {
  height: 100%;
}

body {
  margin: 0;
  padding: 0 10%;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

a {
  color: var(--secondary);
  text-decoration: none;
}

a:hover {
  color: var(--primary);
  text-decoration: underline;
}

.nav-link {
  color: var(--muted);
}

.nav-link.is-active {
  color: var(--accent);
  border-color: color-mix(in srgb, var(--accent) 25%, var(--border));
  background: color-mix(in srgb, var(--accent) 10%, white);
}

.page-title {
  margin: 28px 0 10px;
  font-size: clamp(28px, 4vw, 44px);
  line-height: 1.05;
  letter-spacing: -0.02em;
  position: relative;
  font-family: var(--font-title);
  font-weight: bold;
}

.page-title::after {
  background: linear-gradient(90deg,
      var(--primary),
      var(--accent));
}

.page-header-img {
  width: 100%;
  max-height: 400px;
  object-fit: cover;
  margin-bottom: 24px;
  display: block;
}

.lead {
  margin: 0 0 18px;
  color: var(--muted);
  font-size: 18px;
  max-width: 70ch;
}

.richtext p {
  margin: 0 0 12px;
  font-family: var(--font-text);
}

.richtext a {
  text-decoration: underline;
}

.richtext ul,
.richtext ol {
  padding-left: 18px;
}

/* Dans miam.css, remplace la section images par : */

.richtext img.richtext-image {
  width: 100%;
  height: auto;
  display: block;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  margin-bottom: 1.5rem;
}

/* Grille d'images côte à côte sur écran large */
@media (min-width: 768px) {
  .body {
    padding: 0;
  }

  .richtext {
    /* display: grid; */
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
  }

  /* Les éléments texte prennent toute la largeur */
  .richtext h1,
  .richtext h2,
  .richtext h3,
  .richtext h4,
  .richtext p,
  .richtext ul,
  .richtext ol,
  .richtext blockquote {
    grid-column: 1 / -1;
  }

  /* Les images prennent une colonne chacune */
  .richtext img.richtext-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    margin-bottom: 0;
  }
}


.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--bg);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
  --header-height: 64px;
  /* ajuste à ta vraie hauteur */
}

@media (max-width: 768px) {
  .nav {
    position: fixed;
    top: var(--header-height);
    left: 0;
    right: 0;
    z-index: 49;
    /* juste en dessous du header */
  }
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-around;
  gap: 16px;
  padding: 14px 0;
}

.brand {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 160px;
}


.brand-logo {
  display: block;
  width: 150px;
  /* height: auto; */
  margin: 0 auto;
}

/* Display none du logo sur ecran rikiki */
@media (max-width: 768px) {
  .brand-logo {
    display: none;
  }
}

/* Réseaux sociaux header */
.nav-social {
  display: flex;
  align-items: center;
  gap: 4px;
}

.social-link {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  color: var(--muted);
  transition: color .15s ease, background .15s ease;
}

.social-link:hover {
  color: var(--primary);
  background: rgba(0, 0, 0, .04);
  text-decoration: none;
}

.nav {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.nav-link {
  padding: 8px 12px;
  border-radius: 999px;
  border: 1px solid transparent;
  color: var(--muted);
  font-size: 24px;
  transition: background .15s ease, border-color .15s ease, color .15s ease;
}

.nav-link:hover {
  text-decoration: none;
  background: rgba(0, 0, 0, .04);
}

.nav-link.is-active {
  color: var(--secondary);
  background: color-mix(in srgb, var(--accent) 25%, white);
  border-color: var(--accent);
}

/* Dropdown nav */
.nav-item.nav-dropdown {
  position: relative;
  display: inline-flex;
  align-items: center;
}

/* Le bouton garde le look du lien */
.nav-toggle {
  background: none;
  border: 0;
  /* font: inherit; */
  cursor: pointer;
}

.nav-toggle:focus-visible {
  outline: 2px solid currentColor;
  outline-offset: 2px;
  border-radius: 8px;
}

/* Sous-menu */
.nav-submenu {
  display: none;
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  min-width: 220px;
  padding: 8px;
  margin: 0;
  list-style: none;
  background: #fff;
  border: 1px solid rgba(0, 0, 0, .12);
  border-radius: 12px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, .12);
  z-index: 1000;
}

.nav-dropdown.is-open>.nav-submenu {
  display: block;
}

.nav-submenu-link {
  display: block;
  padding: 10px 10px;
  border-radius: 10px;
  text-decoration: none;
}

.nav-submenu-link:hover,
.nav-submenu-link:focus-visible {
  background: rgba(0, 0, 0, .06);
  outline: none;
}

/* Petit caret */
.nav-caret {
  display: inline-block;
  margin-left: 6px;
  transition: transform .15s ease;
}

.nav-dropdown.is-open .nav-caret {
  transform: rotate(180deg);
}


main.container {
  padding-bottom: 34px;
}

.grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
  margin-top: 18px;
}

@media (min-width: 768px) {
  .grid.grid-2 {
    grid-template-columns: 1.2fr .8fr;
  }
}

.card {
  background: var(--card);
  border: 1px solid var(--border);
  /* border-radius: var(--radius); */
  padding: 18px;
  box-shadow: var(--shadow);
}

@media (min-width: 768px) {
  .card.h1 {
    font-size: medium;
  }
}

/*adapter le texte en mobile en moins gros*/

.card h2 {
  margin: 0 0 10px;
  font-size: 20px;
  letter-spacing: -0.01em;
}

.meta {
  color: var(--muted);
  font-size: 14px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 14px;
  border: 1px solid var(--primary);
  /* background: color-mix(in srgb, var(--primary) 12%, white); */
  background: rgb(25, 0, 138);
  color: rgb(251, 255, 0);
  box-shadow: 0 6px 16px rgba(0, 0, 0, .05);
  transition: transform .06s ease, box-shadow .15s ease, background .15s ease;
  font-family: var(--font-title);
}

.btn:hover {
  text-decoration: none;
  background: color-mix(in srgb, var(--primary) 18%, white);
}

.btn:active {
  transform: translateY(1px);
}

.site-footer {
  margin-top: 46px;
  padding: 3% 10%;
  border-top: 1px solid var(--border);
  background: rgba(255, 255, 255, 1);
}

.footer-inner {
  display: flex;
  gap: 22px;
  justify-content: space-between;
  flex-wrap: wrap;
  padding: 24px 0;
}

.footer-col {
  color: var(--muted);
  font-size: 14px;
}

.footer-col strong {
  color: var(--text);
}

.partners {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 14px;
  margin-top: 10px;
  align-items: center;
}

.partner {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 6px 10px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, .7);
}

.partner-logo {
  height: 80px;
  width: auto;
  display: block;
}

@media (max-width: 768px) {
  .partner-logo {
    height: 60px;
    width: auto;
    display: block;
  }
}

.partner-name {
  font-size: 14px;
  color: var(--muted);
}

.donation-embed {
  width: 100%;
  overflow: hidden;
  border-radius: var(--radius);
  background: #fff;
}

.carousel {
  width: 100%;
  height: 400px;
  /* Hauteur fixe comme page-header-img */
  position: relative;
  overflow: hidden;
  margin-bottom: 24px;
  /* Même espacement que page-header-img */
}

@media (max-width: 768px) {
  .carousel {
    height: 250px;
    /* Hauteur réduite sur mobile */
  }
}

.carousel__slide {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  /* Même propriété que page-header-img */
  opacity: 0;
  transition: opacity 400ms ease;
}

.carousel__slide.is-active {
  opacity: 1;
}

/* ─── Hamburger (mobile) ───────────────────────────── */
.nav-hamburger {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
}

.nav-hamburger span {
  display: block;
  width: 26px;
  height: 3px;
  background: white;
  border-radius: 2px;
  transition: transform 0.25s, opacity 0.25s;
}

/* Animation croix quand ouvert */
.nav-hamburger[aria-expanded="true"] span:nth-child(1) {
  transform: translateY(8px) rotate(45deg);
}

.nav-hamburger[aria-expanded="true"] span:nth-child(2) {
  opacity: 0;
}

.nav-hamburger[aria-expanded="true"] span:nth-child(3) {
  transform: translateY(-8px) rotate(-45deg);
}

@media (max-width: 768px) {
  .nav-hamburger {
    display: flex;
  }

  .nav {
    /* Menu caché par défaut sur mobile */
    display: none;
    flex-direction: column;
    align-items: flex-start;
    position: absolute;
    top: 100%;
    /* juste sous le header */
    left: 0;
    right: 0;
    background: #f5a800;
    /* ta couleur jaune */
    padding: 16px 24px 24px;
    z-index: 100;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  }

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