/* ============================================================
   Variables
   ============================================================ */
:root {
  /* Couleurs extraites du logo */
  --blue-deep:   #147aba;
  --blue-main:   #4282ba;
  --blue-mid:    #3d87c0;
  --blue-link:   #0076ba;
  --blue-light:  #8eb4d3;
  --blue-pale:   #a2c7e0;
  --slate:       #648faf;

  /* Neutres */
  --white:       #ffffff;
  --off-white:   #f5f8fb;
  --gray-light:  #e8f0f7;
  --gray-mid:    #b0bec8;
  --gray-dark:   #444f5a;
  --black:       #1a2230;

  /* Sémantique */
  --color-bg:         var(--white);
  --color-bg-alt:     var(--off-white);
  --color-text:       var(--black);
  --color-text-muted: var(--slate);
  --color-primary:    var(--blue-main);
  --color-primary-dk: var(--blue-deep);
  --color-link:       var(--blue-link);
  --color-border:     var(--gray-light);

  /* Typo */
  --font-sans:   'Segoe UI', system-ui, -apple-system, Arial, sans-serif;
  --font-size:   1rem;
  --line-height: 1.65;

  /* Espacement */
  --space-xs:  0.25rem;
  --space-sm:  0.5rem;
  --space-md:  1rem;
  --space-lg:  2rem;
  --space-xl:  4rem;

  /* Largeurs */
  --container: 72rem;
  --container-sm: 48rem;

  /* Radius */
  --radius:    0.5rem;
  --radius-lg: 1rem;
}

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

html {
  font-size: 16px;
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-sans);
  font-size: var(--font-size);
  line-height: var(--line-height);
  color: var(--color-text);
  background: var(--color-bg);
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
}

img, video { display: block; max-width: 100%; height: auto; }
a { color: var(--color-link); text-decoration: none; }
a:hover { text-decoration: underline; }
ul, ol { list-style: none; }

/* ============================================================
   Typographie
   ============================================================ */
h1, h2, h3, h4, h5, h6 {
  line-height: 1.25;
  font-weight: 700;
  color: var(--black);
}

h1 { font-size: clamp(1.75rem, 4vw, 2.75rem); }
h2 { font-size: clamp(1.35rem, 3vw, 2rem); }
h3 { font-size: clamp(1.1rem, 2.5vw, 1.5rem); }

.rich-text p,
.page-content p {
  margin: 0;
  margin-bottom: 0.5rem;
  overflow-wrap: break-word;
}
.rich-text p:last-child,
.page-content p:last-child {
  margin: 0;
}

/* ============================================================
   Layout utilitaires
   ============================================================ */
.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: var(--space-lg);
}

.container--sm {
  max-width: var(--container-sm);
}

.grid {
  display: grid;
  gap: var(--space-lg);
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 20rem), 1fr));
}

.grid--2 { grid-template-columns: repeat(auto-fill, minmax(min(100%, 26rem), 1fr)); }
.grid--3 { grid-template-columns: repeat(auto-fill, minmax(min(100%, 18rem), 1fr)); }

/* ============================================================
   Header & navigation
   ============================================================ */
.site-header {
  background: var(--white);
  border-bottom: none;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 2px 8px rgba(20, 122, 186, 0.08);
}

.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-md);
  padding-block: var(--space-sm);
}

.site-logo {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  flex-shrink: 0;
  text-decoration: none;
}

.site-logo img {
  height: 4.5rem;
  width: auto;
  min-width: 7rem;
}

.site-nav {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-xs) var(--space-md);
  align-items: center;
}

.site-nav a {
  color: var(--gray-dark);
  font-size: 0.9rem;
  font-weight: 500;
  padding: var(--space-xs) var(--space-sm);
  border-radius: var(--radius);
  transition: color 0.15s, background 0.15s;
}

.site-nav a:hover,
.site-nav a[aria-current="page"] {
  color: var(--blue-deep);
  background: var(--blue-pale);
  text-decoration: none;
}

.site-nav a.btn-nav {
  background: var(--blue-main);
  color: var(--white);
  padding: var(--space-xs) var(--space-md);
}

.site-nav a.btn-nav:hover {
  background: var(--blue-deep);
  color: var(--white);
}

/* ============================================================
   Hero
   ============================================================ */
.hero {
  background: transparent;
  color: var(--white);
  text-align: center;
  min-height: 30rem;
}

.hero__content {
  padding: var(--space-xl) 0;
}

.hero h1 { color: var(--white); margin-bottom: var(--space-md); }
.hero .lead { font-size: 1.2rem; opacity: 0.9; max-width: 40rem; margin-inline: auto; margin-bottom: var(--space-lg); }
.hero__btns { display: flex; gap: var(--space-md); justify-content: center; flex-wrap: wrap; }

/* ============================================================
   Boutons
   ============================================================ */
.btn {
  display: inline-flex;
  align-items: center;
  gap: var(--space-xs);
  padding: 0.6rem 1.5rem;
  border-radius: var(--radius);
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
  transition: background 0.15s, transform 0.1s;
  text-decoration: none;
}

.btn--primary {
  background: var(--blue-main);
  color: var(--white);
}

.btn--primary:hover {
  background: var(--blue-deep);
  color: var(--white);
  text-decoration: none;
  transform: translateY(-1px);
}

.btn--outline {
  background: transparent;
  color: var(--white);
  border: 2px solid var(--white);
}

.btn--outline:hover {
  background: rgba(255,255,255,0.15);
  color: var(--white);
  text-decoration: none;
}

/* ============================================================
   Sections
   ============================================================ */
.section {
  padding: var(--space-xl) 0;
}

.section--alt {
  background: var(--off-white);
}

.section__header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: var(--space-lg);
  gap: var(--space-md);
}

.section__header h2 { margin-bottom: 0; }

.section__more {
  color: var(--blue-link);
  font-size: 0.9rem;
  white-space: nowrap;
}

/* ============================================================
   Card
   ============================================================ */
.card {
  background: var(--white);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: box-shadow 0.2s, transform 0.2s;
  display: flex;
  flex-direction: column;
  text-decoration: none;
  color: inherit;
}

.card:hover {
  box-shadow: 0 4px 20px rgba(20, 122, 186, 0.12);
  transform: translateY(-3px);
  text-decoration: none;
}

.card__image {
  width: 100%;
  height: 9rem;
  overflow: hidden;
  background: var(--gray-light);
}

.card__image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.card__body {
  padding: var(--space-md) var(--space-lg);
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
}

.card__body h3 { color: var(--blue-deep); }
.card__body p { color: var(--gray-dark); font-size: 0.92rem; }

.card__tag {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  background: var(--blue-pale);
  color: var(--blue-deep);
  padding: 0.15rem 0.6rem;
  border-radius: 99px;
}

/* ============================================================
   Agenda / liste d'événements
   ============================================================ */
.event-list { display: flex; flex-direction: column; gap: var(--space-md); }

.event-item {
  display: flex;
  gap: var(--space-md);
  align-items: flex-start;
  padding: var(--space-md);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  transition: background 0.15s;
}

.event-item:hover { background: var(--off-white); }

.event-date {
  background: var(--blue-main);
  color: var(--white);
  border-radius: var(--radius);
  padding: var(--space-sm) var(--space-md);
  text-align: center;
  min-width: 4rem;
  flex-shrink: 0;
}

.event-date .day { font-size: 1.5rem; font-weight: 700; line-height: 1; }
.event-date .month { font-size: 0.7rem; text-transform: uppercase; letter-spacing: 0.05em; }

/* ============================================================
   Rich text (contenu Lexical rendu en HTML)
   ============================================================ */
.rich-text h2 { margin-top: var(--space-lg); margin-bottom: var(--space-md); }
.rich-text h3 { margin-top: var(--space-md); margin-bottom: var(--space-sm); }
.rich-text ul, .rich-text ol { padding-left: var(--space-lg); margin-bottom: var(--space-md); list-style: disc; }
.rich-text ol { list-style: decimal; }
.rich-text li { margin-bottom: var(--space-xs); }
.page-content {
  display: block;
}

.page-content h1,
.page-content h2,
.page-content h3 {
  margin-top: 1.5rem;
  margin-bottom: 1rem;
}

.blockquotes-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-md);
  margin: var(--space-md) 0;
}

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

.page-content ul,
.rich-text ul {
  list-style: disc;
  margin-left: 1.5rem;
  margin-bottom: 1rem;
}

.page-content ol,
.rich-text ol {
  list-style: decimal;
  margin-left: 1.5rem;
  margin-bottom: 1rem;
}

.page-content li,
.rich-text li {
  margin-bottom: 0.5rem;
}

.rich-text blockquote,
.page-content blockquote {
  border-left: 4px solid var(--blue-deep);
  padding: var(--space-md) var(--space-lg);
  background: var(--gray-light);
  margin: 0;
  border-radius: var(--radius);
  font-style: normal;
  color: var(--gray-dark);
  white-space: pre-wrap;
  word-wrap: break-word;
  line-height: 1.3;
}

.rich-text blockquote br,
.page-content blockquote br {
  display: block;
  content: "";
  margin: -0.6em 0;
}

.rich-text blockquote p,
.page-content blockquote p {
  margin: 0;
}

.rich-text blockquote strong,
.page-content blockquote strong {
  color: var(--blue-deep);
  font-weight: 600;
}
.rich-text a { color: var(--color-link); text-decoration: underline; }
.rich-text img { margin: var(--space-md) 0; }

/* ============================================================
   Formulaires
   ============================================================ */
.form { display: flex; flex-direction: column; gap: var(--space-md); }

.form__group { display: flex; flex-direction: column; gap: var(--space-xs); }

.form__group label {
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--gray-dark);
}

.form__group input,
.form__group textarea,
.form__group select {
  padding: 0.6rem 0.75rem;
  border: 1.5px solid var(--gray-mid);
  border-radius: var(--radius);
  font-family: var(--font-sans);
  font-size: 1rem;
  color: var(--color-text);
  background: var(--white);
  transition: border-color 0.15s;
}

.form__group input:focus,
.form__group textarea:focus,
.form__group select:focus {
  outline: none;
  border-color: var(--blue-main);
  box-shadow: 0 0 0 3px rgba(66, 130, 186, 0.15);
}

.form__group textarea { min-height: 8rem; resize: vertical; }

/* ============================================================
   Footer
   ============================================================ */
.site-footer {
  background: var(--black);
  color: var(--gray-mid);
  padding: var(--space-xl) 0 var(--space-lg);
  margin-top: auto;
}

.site-footer__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 14rem), 1fr));
  gap: var(--space-xl);
  margin-bottom: var(--space-xl);
}

.site-footer__col h4 {
  color: var(--blue-pale);
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: var(--space-md);
}

.site-footer__col a {
  display: block;
  color: var(--gray-mid);
  font-size: 0.9rem;
  margin-bottom: var(--space-xs);
  transition: color 0.15s;
}

.site-footer__col a:hover { color: var(--white); text-decoration: none; }

.site-footer__logo img { height: 5.5rem; width: auto; margin-bottom: 0.5rem; }

.site-footer__bottom {
  border-top: 1px solid rgba(255,255,255,0.1);
  padding-top: var(--space-md);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: var(--space-sm);
  font-size: 0.85rem;
}

.site-footer__bottom a { color: var(--gray-mid); }
.site-footer__bottom a:hover { color: var(--white); }

/* ============================================================
   Page hero (sous-pages)
   ============================================================ */
.page-hero {
  background: linear-gradient(135deg, var(--blue-deep) 0%, var(--blue-mid) 100%);
  color: var(--white);
  padding: var(--space-xl) 0 var(--space-lg);
}

.page-hero h1 { color: var(--white); }
.page-hero p { color: rgba(255,255,255,0.85); font-size: 1.1rem; }

/* ============================================================
   Badges / Tags
   ============================================================ */
.badge {
  display: inline-block;
  padding: 0.2rem 0.7rem;
  border-radius: 99px;
  font-size: 0.78rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.badge--ongoing  { background: #d1f0e0; color: #1a7a45; }
.badge--upcoming { background: #ffe4cc; color: #b8580a; }
.badge--completed{ background: var(--gray-light); color: var(--gray-dark); }

/* ============================================================
   Galerie photo
   ============================================================ */
.photo-grid {
  display: grid;
  gap: var(--space-sm);
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 16rem), 1fr));
}

.photo-grid img {
  width: 100%;
  height: 14rem;
  object-fit: cover;
  transition: transform 0.2s;
}

.photo-grid img:hover { transform: scale(1.02); }

/* ============================================================
   Témoignages
   ============================================================ */
.quote {
  background: var(--off-white);
  border-left: 4px solid var(--blue-main);
  border-radius: var(--radius);
  padding: var(--space-lg);
  position: relative;
}

.quote__text {
  font-size: 1.05rem;
  font-style: italic;
  color: var(--gray-dark);
  margin-bottom: var(--space-md);
}

.quote__author { font-weight: 700; color: var(--blue-deep); }
.quote__context { font-size: 0.85rem; color: var(--slate); }

/* ============================================================
   Livre
   ============================================================ */
.book-card {
  display: flex;
  gap: var(--space-lg);
  background: var(--white);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: var(--space-lg);
  align-items: flex-start;
}

.book-card__cover {
  width: 10rem;
  flex-shrink: 0;
}

.book-card__cover img {
  width: 100%;
  height: auto;
  box-shadow: 4px 4px 16px rgba(0,0,0,0.15);
}

.book-card__info { flex: 1; }
.book-card__info h3 { color: var(--blue-deep); margin-bottom: var(--space-xs); }
.book-card__info .author { color: var(--slate); font-size: 0.9rem; margin-bottom: var(--space-md); }

/* ============================================================
   Utilitaires
   ============================================================ */
.text-center { text-align: center; }
.text-muted   { color: var(--color-text-muted); }
.mt-lg        { margin-top: var(--space-lg); }
.mb-lg        { margin-bottom: var(--space-lg); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); }

/* ============================================================
   Responsive
   ============================================================ */
@media (max-width: 48rem) {
  .container { padding-inline: var(--space-md); }

  .site-header__inner { flex-direction: column; align-items: flex-start; gap: var(--space-sm); }
  .site-nav { gap: var(--space-xs); }
  .site-nav a { font-size: 0.82rem; }

  .book-card { flex-direction: column; }
  .book-card__cover { width: 8rem; }

  .section__header { flex-direction: column; }
}
