/* =========================================================
   Moon Inspiration — thème Bootstrap 5.3 (v3)
   COULEURS : uniquement les 6 de la charte (+ blanc, neutres de texte).
   CONTRASTE : texte blanc seulement sur #0452ec ou sur un dégradé qui
   part de #0452ec ; jamais sur cyan, ciel, vert, jaune ou orange.
   Les liens des zones sombres ciblent a:not(.btn) pour ne jamais
   écraser la couleur des boutons.
   Charger APRÈS bootstrap.min.css. Django : static/css/moon.css
   Les formes organiques (clipPath) et dégradés SVG sont définis
   une seule fois dans partials/svg_defs.html (inclus dans base.html).
   ========================================================= */

:root {
  /* Charte */
  --moon-blue: #0452ec;
  --moon-sky: #0daceb;
  --moon-cyan: #00e4ec;
  --moon-orange: #fa6b02;
  --moon-yellow: #fffd06;
  --moon-green: #49fd49;

  /* Dérivées */
  --moon-navy: #0452ec;      /* titres = bleu charte */
  --moon-ink: #1b2233;
  --moon-muted: #5b6472;
  --moon-line: #e3e8f2;
  --moon-soft: #f3f7ff;

  /* Dégradés */
  --moon-grad-cta: linear-gradient(90deg, #0452ec 0%, #0daceb 100%);
  --moon-grad-band: linear-gradient(100deg, #0452ec 0%, #0daceb 62%, #00e4ec 100%);
  --moon-grad-footer: linear-gradient(200deg, #0daceb 0%, #0452ec 42%, #0452ec 100%);
  --moon-ring-cool: linear-gradient(200deg, var(--moon-cyan) 0%, var(--moon-green) 100%);
  --moon-ring-warm: linear-gradient(160deg, var(--moon-cyan) 0%, var(--moon-green) 50%, var(--moon-yellow) 100%);

  /* Typo : Achiko / Averta en production, substituts Google en attendant */
  --moon-font-display: "Achiko", "Chewy", system-ui, sans-serif;
  --moon-font-body: "Averta", "Figtree", system-ui, sans-serif;

  /* Bootstrap */
  --bs-primary: #0452ec;
  --bs-primary-rgb: 4, 82, 236;
  --bs-body-font-family: var(--moon-font-body);
  --bs-body-color: var(--moon-ink);
  --bs-link-color: #0452ec;
  --bs-link-color-rgb: 4, 82, 236;
  --bs-link-hover-color: #0336b8;
  --bs-border-radius: .75rem;
  --bs-border-radius-lg: 1.25rem;
  --bs-focus-ring-color: rgba(4, 82, 236, .3);
}

body { font-family: var(--moon-font-body); color: var(--moon-ink); }

/* ---------- Typographie ---------- */
.moon-display { font-family: var(--moon-font-display); font-weight: 400; line-height: 1; color: var(--moon-navy); }
.moon-title { font-weight: 800; letter-spacing: -.02em; line-height: 1.05; color: var(--moon-navy); }
.moon-lead { font-weight: 600; font-style: italic; color: var(--moon-navy); }
.moon-eyebrow { font-size: .8rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--moon-blue); }
.text-moon-muted { color: var(--moon-muted) !important; }

/* ---------- Boutons ---------- */
.btn-moon {
  --bs-btn-padding-x: 1.75rem; --bs-btn-padding-y: .7rem; --bs-btn-font-weight: 700;
  --bs-btn-color: #fff; --bs-btn-hover-color: #fff; --bs-btn-active-color: #fff; --bs-btn-border-width: 0;
  border-radius: 50rem; background-image: var(--moon-grad-cta); min-height: 44px;
  transition: transform .15s ease, box-shadow .15s ease;
}
.btn-moon:hover { transform: translateY(-1px); box-shadow: 0 8px 20px rgba(4, 82, 236, .25); }
.btn-moon-outline {
  --bs-btn-padding-x: 1.75rem; --bs-btn-padding-y: .6rem; --bs-btn-font-weight: 700;
  --bs-btn-color: var(--moon-ink); --bs-btn-hover-color: var(--moon-navy); --bs-btn-border-width: 0;
  min-height: 44px; border-radius: 50rem; border: 3px solid transparent;
  background: linear-gradient(#fff, #fff) padding-box, linear-gradient(90deg, #0339c9, var(--moon-cyan)) border-box;
}
.btn-moon-white, .btn-moon-white:visited { --bs-btn-color: #0452ec; --bs-btn-bg: #fff; --bs-btn-border-color: #fff; --bs-btn-hover-bg: var(--moon-soft); --bs-btn-hover-color: #0452ec; --bs-btn-hover-border-color: #fff; --bs-btn-active-color: #0452ec; --bs-btn-active-bg: #fff; --bs-btn-font-weight: 700; border-radius: 50rem; min-height: 44px; padding: .6rem 1.6rem; }

/* ---------- Logo (image + mot « Inspiration ») ---------- */
.moon-logo { display: inline-flex; flex-direction: column; align-items: flex-end; text-decoration: none; line-height: 1; }
.moon-logo__mark { display: block; width: 170px; height: auto; }
.moon-logo__sub { font-weight: 600; font-size: 1.3rem; color: var(--moon-blue); margin-top: -.35rem; letter-spacing: .01em; }
.moon-logo--sm .moon-logo__mark { width: 118px; }
.moon-logo--sm .moon-logo__sub { font-size: .95rem; margin-top: -.25rem; }
.moon-logo--white .moon-logo__mark { filter: brightness(0) invert(1); }
.moon-logo--white .moon-logo__sub { color: #fff; }

/* ---------- En-tête ---------- */
.moon-header { position: absolute; inset: 0 0 auto 0; z-index: 1030; padding: 36px 0; transition: background .2s, padding .2s, box-shadow .2s; }
.moon-header .container { display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.moon-header__actions { display: flex; align-items: center; gap: .75rem; }
.moon-header.is-scrolled { position: fixed; padding: 12px 0; background: rgba(255, 255, 255, .92); backdrop-filter: blur(10px); box-shadow: 0 6px 24px rgba(11, 58, 159, .08); }

.moon-search {
  display: inline-flex; align-items: center; gap: .5rem; height: 44px; padding: 0 .4rem 0 1.1rem;
  border: 1.5px solid #fa6b02; border-radius: 50rem; background: rgba(255, 255, 255, .9); color: var(--moon-ink);
}
.moon-search input { border: 0; outline: 0; background: transparent; width: 92px; font-weight: 600; color: var(--moon-ink); transition: width .25s; }
.moon-search input::placeholder { color: var(--moon-ink); opacity: 1; }
.moon-search svg, .moon-burger svg { color: #fa6b02; }
.moon-search.is-open { border-color: var(--moon-blue); }
.moon-search.is-open input { width: 260px; }
.moon-search.is-open input::placeholder { color: var(--moon-muted); }
.moon-search button { border: 0; background: transparent; color: inherit; width: 36px; height: 36px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; }
.moon-burger {
  width: 52px; height: 44px; border-radius: 50rem; border: 1.5px solid #fa6b02; background: rgba(255, 255, 255, .9);
  color: var(--moon-ink); display: inline-flex; align-items: center; justify-content: center;
}
.moon-burger:hover, .moon-search button:hover { background: #fff4ec; }
.moon-burger--light { border-color: #fff; background: transparent; }
.moon-burger--light svg { color: #fff; }

/* Menu plein écran (offcanvas) */
.moon-menu { --bs-offcanvas-width: min(100%, 560px); background: var(--moon-grad-footer); color: #fff; }
.moon-menu .nav-link { font-family: var(--moon-font-display); font-size: 2.2rem; color: #fff; padding: .3rem 0; }
.moon-menu .nav-link:hover, .moon-menu .nav-link.active { color: #fff; text-decoration: underline; text-decoration-color: var(--moon-yellow); text-decoration-thickness: 5px; text-underline-offset: 8px; }

/* Menu ouvert plein écran (desktop : 2 panneaux ; mobile : 1 panneau) */
.moon-overlay { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); min-height: 100vh; }
.moon-overlay__main { position: relative; overflow: hidden; background: var(--moon-grad-footer); color: #fff; padding: 36px 64px 56px; display: flex; flex-direction: column; }
.moon-overlay__side { background: #fff; padding: 36px 56px 56px; display: flex; flex-direction: column; gap: 28px; }
.moon-overlay__nav { list-style: none; margin: auto 0; padding: 0; display: grid; gap: .4rem; position: relative; z-index: 1; }
.moon-overlay__nav a { display: inline-flex; align-items: baseline; gap: 1.2rem; font-family: var(--moon-font-display); font-size: clamp(2.4rem, 4.2vw, 3.6rem); line-height: 1.15; color: #fff; text-decoration: none; }
.moon-overlay__nav small { font-family: var(--moon-font-body); font-size: .9rem; font-weight: 700; opacity: .7; width: 1.6rem; }

.moon-submenu { list-style: none; padding: 0; margin: 0; display: grid; gap: .25rem; }
.moon-submenu a { display: flex; gap: 1rem; align-items: center; padding: .7rem .8rem; border-radius: 16px; color: var(--moon-ink); text-decoration: none; }
.moon-submenu a:hover { background: var(--moon-soft); }
.moon-submenu svg { width: 36px; height: 36px; flex: none; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.moon-submenu strong { display: block; font-weight: 800; }
.moon-submenu span { color: var(--moon-muted); font-size: .9rem; }
.moon-close { width: 52px; height: 44px; border-radius: 50rem; border: 1.5px solid #fa6b02; background: #fff; display: inline-flex; align-items: center; justify-content: center; }
.moon-close svg { color: #fa6b02; }
@media (max-width: 991.98px) { .moon-overlay { grid-template-columns: 1fr; } .moon-overlay__side { display: none; } .moon-overlay__main { padding: 24px; } }

/* ---------- Héros en calques ---------- */
/* calque 0 : graphiques · calque 1 : photo détourée · calque 2 : texte · calque 10 : en-tête */
.moon-hero { position: relative; isolation: isolate; min-height: 820px; overflow: hidden; }
.moon-hero__bg { position: absolute; inset: 0; z-index: 0; width: 100%; height: 100%; pointer-events: none; }
.moon-hero__photo { position: absolute; z-index: 1; bottom: 0; right: max(2%, calc(50% - 640px)); height: 86%; width: auto; max-width: 56%; object-fit: contain; object-position: bottom; }
.moon-hero__content { position: relative; z-index: 2; padding: 230px 0 160px; max-width: 620px; }
.moon-hero__dots { display: flex; gap: .7rem; margin-top: 2.5rem; }
.moon-hero__dots button { width: 14px; height: 14px; padding: 0; border-radius: 50%; border: 2px solid var(--moon-sky); background: var(--moon-sky); }
.moon-hero__dots button.active { background: #fff; border-color: var(--moon-navy); }
@media (max-width: 991.98px) {
  .moon-hero { min-height: 0; }
  .moon-hero__content { padding: 170px 0 0; }
  .moon-hero__photo { position: relative; display: block; right: auto; height: auto; max-width: 78%; margin: 1rem 0 0 auto; }
}

/* ---------- Bande dégradée à vague ---------- */
.moon-band { position: relative; z-index: 3; margin-top: -90px; color: #fff; }
.moon-band__wave { display: block; width: 100%; height: 90px; }
.moon-band__body { background: var(--moon-grad-band); padding: 40px 0 110px; margin-top: -1px; }
.moon-band__bottom { display: block; width: 100%; height: 60px; margin-top: -1px; }
.moon-band__objects { position: relative; min-height: 300px; }

/* ---------- CADRAGE A : galet + liseré dégradé décalé ---------- */
.moon-frame { position: relative; width: 100%; aspect-ratio: 1 / 1; }
.moon-frame--tall { aspect-ratio: 4 / 5; }
.moon-frame__ring, .moon-frame__img { position: absolute; inset: 0; }
.moon-frame__ring { background: var(--moon-ring-cool); }
.moon-frame--warm .moon-frame__ring { background: var(--moon-ring-warm); }
.moon-frame--tl .moon-frame__ring { transform: translate(-14px, -12px); }
.moon-frame--tr .moon-frame__ring { transform: translate(14px, -12px); }
.moon-frame__img { width: 100%; height: 100%; object-fit: cover; }

/* ---------- CADRAGE B : détouré posé sur la composition ---------- */
.moon-cutout { position: absolute; height: auto; pointer-events: none; filter: drop-shadow(0 18px 24px rgba(3, 30, 90, .25)); }

/* ---------- Icônes ---------- */
.moon-icon { width: 64px; height: 64px; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
/* Icônes Bootstrap Icons (choisies au tableau de bord) : même gabarit que les icônes au trait. */
.moon-bi { display: inline-flex; align-items: center; justify-content: center; line-height: 1; stroke: none; }
.moon-icon.moon-bi { font-size: 56px; }
.moon-bi--degrade { background: linear-gradient(135deg, #00e4ec, #49fd49); -webkit-background-clip: text; background-clip: text; color: transparent; }
.moon-submenu .moon-bi { width: 36px; height: 36px; flex: none; font-size: 30px; }
.moon-mini .moon-bi { font-size: 40px; margin-bottom: 1rem; }
.moon-icon-sm { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

/* ---------- Spécialité ---------- */
.moon-feature { text-align: center; padding: 1rem 1.5rem; }
.moon-feature__title { font-weight: 800; font-size: 1.25rem; color: var(--moon-ink); margin: 1rem 0 .6rem; }
.moon-feature__text { color: var(--moon-muted); font-size: .95rem; margin: 0; }

/* ---------- Chiffres ---------- */
.moon-stat__value { font-weight: 800; font-size: 4rem; line-height: 1; letter-spacing: -.03em; color: var(--moon-navy); }
.moon-stat__label { color: var(--moon-muted); font-size: .95rem; line-height: 1.3; }

.moon-checks { list-style: none; padding: 0; margin: 0; display: grid; gap: 1rem; }
.moon-checks li { padding-left: 1.4rem; position: relative; }
.moon-checks li::before { content: ""; position: absolute; left: 0; top: .5rem; width: .55rem; height: .55rem; border-radius: 50%; background: var(--moon-blue); }
.moon-checks strong { display: block; }
.moon-checks span { color: var(--moon-muted); }

/* ---------- Logos clients ---------- */
.moon-logo-tile { display: flex; align-items: center; justify-content: center; height: 72px; padding: 0 1rem; border: 1px dashed #b9c3d6; border-radius: .75rem; color: var(--moon-muted); font-size: .8rem; font-weight: 600; text-align: center; }
.moon-logo-tile img { max-height: 48px; max-width: 100%; filter: grayscale(1); opacity: .7; transition: .2s; }
.moon-logo-tile:hover img { filter: none; opacity: 1; }

/* ---------- Formulaires ---------- */
.form-control, .form-select { border-radius: .75rem; border-color: #c9d2e3; min-height: 48px; }
.form-control:focus, .form-select:focus { border-color: var(--moon-blue); box-shadow: 0 0 0 .25rem rgba(4, 82, 236, .2); }
.form-label { font-weight: 600; }

/* ---------- Pied de page ---------- */
.moon-footer { position: relative; overflow: hidden; background: var(--moon-grad-footer); color: #fff; padding: 88px 0 40px; }
.moon-footer__mark { position: absolute; left: -3%; bottom: -12%; width: 62%; max-width: 900px; filter: brightness(0) invert(1); opacity: .07; pointer-events: none; }
.moon-footer > .container { position: relative; z-index: 1; }
.moon-footer h3 { font-size: .8rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: rgba(255, 255, 255, .75); margin: 0 0 1rem; }
.moon-footer ul { list-style: none; padding: 0; margin: 0; display: grid; gap: .55rem; }
.moon-footer a:not(.btn) { color: #fff; text-decoration: none; font-weight: 600; }
.moon-footer a:not(.btn):hover { text-decoration: underline; }
.moon-footer__bottom { border-top: 1px solid rgba(255, 255, 255, .25); margin-top: 64px; padding-top: 24px; display: flex; flex-wrap: wrap; gap: 1rem 2rem; align-items: center; justify-content: space-between; font-size: .9rem; }
.moon-social { display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px; border-radius: 50%; border: 1.5px solid rgba(255, 255, 255, .5); }
.moon-social:hover { background: rgba(255, 255, 255, .15); }

/* =========================================================
   EXTENSIONS
   ========================================================= */

/* Bannière de page intérieure (héros réduit, mêmes calques) */
.moon-page-banner { position: relative; isolation: isolate; overflow: hidden; min-height: 460px; background: var(--moon-soft); }
.moon-page-banner__content { position: relative; z-index: 2; padding: 190px 0 80px; max-width: 640px; }
.breadcrumb { --bs-breadcrumb-divider-color: var(--moon-muted); --bs-breadcrumb-item-active-color: var(--moon-muted); font-weight: 600; font-size: .9rem; }

/* Offre */
.moon-offer { height: 100%; display: flex; flex-direction: column; gap: 1rem; padding: 2rem; border-radius: 24px; background: #fff; border: 1px solid var(--moon-line); transition: .2s; }
.moon-offer:hover { border-color: transparent; box-shadow: 0 18px 40px rgba(11, 58, 159, .12); transform: translateY(-3px); }
.moon-offer--featured { background: var(--moon-grad-footer); color: #fff; border: 0; }
.moon-offer--featured .moon-offer__title, .moon-offer--featured .moon-offer__text { color: #fff; }
.moon-tag--yellow { background: var(--moon-yellow); color: var(--moon-ink); }
.moon-offer__title { font-weight: 800; font-size: 1.4rem; color: var(--moon-navy); margin: 0; }
.moon-offer__text { color: var(--moon-muted); margin: 0; }
.moon-offer ul { list-style: none; padding: 0; margin: 0 0 auto; display: grid; gap: .5rem; }
.moon-offer li { display: flex; gap: .6rem; align-items: flex-start; }

/* Étude de cas / actualité */
.moon-card { height: 100%; display: flex; flex-direction: column; border-radius: 24px; overflow: hidden; background: #fff; border: 1px solid var(--moon-line); text-decoration: none; color: inherit; transition: .2s; }
.moon-card:hover { box-shadow: 0 18px 40px rgba(11, 58, 159, .12); color: inherit; }
.moon-card__media { aspect-ratio: 16 / 10; overflow: hidden; }
.moon-card__media img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s; }
.moon-card:hover .moon-card__media img { transform: scale(1.04); }
.moon-card__body { padding: 1.5rem; display: flex; flex-direction: column; gap: .6rem; flex: 1; }
.moon-card__title { font-weight: 800; font-size: 1.2rem; margin: 0; color: var(--moon-ink); }
.moon-tag { display: inline-block; padding: .25rem .7rem; border-radius: 50rem; background: var(--moon-soft); color: var(--moon-navy); font-size: .78rem; font-weight: 700; }

/* Témoignage */
.moon-quote { position: relative; padding: 2.5rem; border-radius: 28px; background: var(--moon-soft); }
.moon-quote__text { font-size: 1.25rem; line-height: 1.5; font-weight: 600; color: var(--moon-navy); margin: 0 0 1.5rem; }
.moon-quote__author { display: flex; align-items: center; gap: 1rem; }
.moon-quote__author .moon-frame { width: 64px; flex: none; }

/* Méthode (étapes) */
.moon-steps { counter-reset: step; display: grid; gap: 1.5rem; }
.moon-step { position: relative; padding: 2rem 2rem 2rem 6rem; border-radius: 24px; background: #fff; border: 1px solid var(--moon-line); }
.moon-step::before { counter-increment: step; content: counter(step, decimal-leading-zero); position: absolute; left: 1.6rem; top: 1.6rem; font-family: var(--moon-font-display); font-size: 2.6rem; line-height: 1; color: var(--moon-blue); }
.moon-step h3 { font-weight: 800; font-size: 1.3rem; margin: 0 0 .4rem; color: var(--moon-ink); }
.moon-step p { margin: 0; color: var(--moon-muted); }

/* FAQ */
.moon-accordion { --bs-accordion-border-color: var(--moon-line); --bs-accordion-border-radius: 18px; --bs-accordion-inner-border-radius: 18px; --bs-accordion-active-bg: var(--moon-soft); --bs-accordion-active-color: var(--moon-navy); --bs-accordion-btn-focus-box-shadow: 0 0 0 .25rem rgba(4, 82, 236, .2); }
.moon-accordion .accordion-button { font-weight: 700; padding: 1.2rem 1.5rem; }

/* Événement */
.moon-event { display: flex; gap: 1.5rem; align-items: center; padding: 1.5rem; border-radius: 24px; background: #fff; border: 1px solid var(--moon-line); }
.moon-event__date { flex: none; width: 92px; height: 92px; border-radius: 22px; background: var(--moon-grad-cta); color: #fff; display: flex; flex-direction: column; align-items: center; justify-content: center; line-height: 1; }
.moon-event__date strong { font-family: var(--moon-font-display); font-size: 2.2rem; font-weight: 400; }
.moon-event__date span { font-size: .8rem; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; margin-top: .25rem; }

/* Équipe */
.moon-team { text-align: center; }
.moon-team .moon-frame { max-width: 220px; margin: 0 auto 1.25rem; }
.moon-team__name { font-weight: 800; font-size: 1.15rem; margin: 0; }
.moon-team__role { color: var(--moon-muted); margin: 0; }

/* Bandeau CTA */
.moon-cta-band { position: relative; overflow: hidden; border-radius: 32px; background: var(--moon-grad-band); color: #fff; padding: 3.5rem; }

/* Pagination */
.pagination { --bs-pagination-border-radius: 50rem; --bs-pagination-color: var(--moon-navy); --bs-pagination-active-bg: var(--moon-blue); --bs-pagination-active-border-color: var(--moon-blue); gap: .4rem; }
.pagination .page-link { border-radius: 50rem !important; min-width: 44px; height: 44px; display: flex; align-items: center; justify-content: center; font-weight: 700; }

/* Ruban bleu avec boucle (avant « Nos spécialités ») */
.moon-ribbon-loop { display: block; width: 100%; height: auto; margin-top: -240px; position: relative; z-index: 0; pointer-events: none; }
@media (max-width: 991.98px) { .moon-ribbon-loop { margin-top: -40px; } }

/* Page détail */
.moon-chip { display: inline-flex; align-items: center; gap: .5rem; padding: .55rem 1.1rem; min-height: 44px; border-radius: 50rem; border: 1.5px solid var(--moon-line); color: var(--moon-ink); font-weight: 600; text-decoration: none; }
.moon-chip:hover { border-color: var(--moon-blue); color: var(--moon-blue); }
.moon-mini { padding: 1.75rem; border-radius: 24px; background: var(--moon-soft); height: 100%; }
.moon-mini svg { width: 44px; height: 44px; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; margin-bottom: 1rem; }
.moon-mini h3 { font-weight: 800; font-size: 1.15rem; margin: 0 0 .4rem; }
.moon-mini p { color: var(--moon-muted); margin: 0; }

/* =========================================================
   MENU — composant partagé (partials/menu.html)
   Calque au-dessus de la page : voile bleu transparent flouté
   + panneau à droite (ordinateur) ou plein écran (téléphone).
   ========================================================= */
.moon-menu-layer { position: fixed; top: 0; left: 0; right: 0; height: min(100vh, 960px); z-index: 1050; }
.moon-menu-layer__backdrop { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; padding: 0; background: rgba(4, 82, 236, .22); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); cursor: pointer; }
.moon-menu-layer .moon-overlay { position: absolute; top: 0; right: 0; bottom: 0; width: min(1120px, 100%); min-height: 0; box-shadow: -24px 0 60px rgba(4, 82, 236, .25); }
.moon-menu-mobile-sub { list-style: none; padding: 0 0 .5rem 2.8rem; margin: 0; display: grid; gap: .1rem; }
.moon-menu-mobile-sub a { display: block; padding: .45rem 0; color: #fff; font-weight: 600; text-decoration: none; }
@media (max-width: 991.98px) {
  .moon-menu-layer { height: 100vh; }
  .moon-overlay__main { padding: 20px 24px 28px; gap: 16px; }
  .moon-overlay__nav { margin: 0; }
  .moon-overlay__nav a { font-size: 1.9rem; gap: .8rem; }
}

/* =========================================================
   MOTION — inspirée de generousbranding.com
   Courbe « expo-out » partout : rapide au départ, très douce à l'arrivée.
   ========================================================= */
:root { --moon-ease: cubic-bezier(.19, 1, .22, 1); --moon-ease-in: cubic-bezier(.7, 0, .84, 0); }
@keyframes moonFadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes moonFadeOut { from { opacity: 1; } to { opacity: 0; } }
@keyframes moonReveal { from { clip-path: circle(0% at calc(100% - 64px) 58px); } to { clip-path: circle(150% at calc(100% - 64px) 58px); } }
@keyframes moonConceal { from { clip-path: circle(150% at calc(100% - 64px) 58px); } to { clip-path: circle(0% at calc(100% - 64px) 58px); } }
@keyframes moonRise { from { transform: translateY(105%); } to { transform: translateY(0); } }
@keyframes moonSlideIn { from { opacity: 0; transform: translateX(36px); } to { opacity: 1; transform: none; } }
@keyframes moonDraw { from { stroke-dashoffset: 1600; } to { stroke-dashoffset: 0; } }
@keyframes moonSpin { to { transform: rotate(360deg); } }

/* 1. Ouverture : voile qui apparaît + panneau révélé en cercle depuis le bouton ☰ */
.moon-menu-layer__backdrop { animation: moonFadeIn .5s ease both; }
.moon-menu-layer .moon-overlay { animation: moonReveal 1s var(--moon-ease) both; }

/* 2. Rubriques : chaque ligne monte depuis un masque, l'une après l'autre */
.moon-overlay__nav > li { overflow: hidden; }
.moon-overlay__nav > li > a { animation: moonRise 1s var(--moon-ease) both; animation-delay: calc(.22s + var(--i, 0) * .07s); }
.moon-overlay__nav > li > a > span {
  display: inline-block; transition: transform .6s var(--moon-ease), opacity .45s var(--moon-ease), background-size .6s var(--moon-ease);
  background: linear-gradient(var(--moon-yellow), var(--moon-yellow)) left bottom / 0% 5px no-repeat; padding-bottom: 4px;
}
/* 3. Survol : la rubrique visée glisse et se souligne, les autres s'effacent */
.moon-overlay__nav:hover > li > a > span { opacity: .45; }
.moon-overlay__nav > li > a:hover > span, .moon-overlay__nav > li > a:focus-visible > span { opacity: 1; transform: translateX(14px); background-size: 100% 5px; }
.moon-overlay__nav > li > a.active > span { background-size: 100% 5px; }

/* 4. Ruban qui se dessine, panneau blanc et sous-menu qui glissent en cascade */
.moon-menu-wave { stroke-dasharray: 1600; animation: moonDraw 1.8s var(--moon-ease) .35s both; }
.moon-overlay__side > * { animation: moonSlideIn .9s var(--moon-ease) both; animation-delay: calc(.4s + var(--i, 0) * .1s); }
.moon-submenu > li { animation: moonSlideIn .8s var(--moon-ease) both; animation-delay: calc(.55s + var(--i, 0) * .06s); }
.moon-submenu a { transition: background .3s, transform .5s var(--moon-ease); }
.moon-submenu a:hover { transform: translateX(6px); }
.moon-close svg, .moon-burger svg { transition: transform .5s var(--moon-ease); }
.moon-close:hover svg { transform: rotate(90deg); }

/* 5. Fermeture : le cercle se referme vers le bouton */
.moon-menu-layer.is-closing .moon-overlay { animation: moonConceal .55s var(--moon-ease-in) both; }
.moon-menu-layer.is-closing .moon-menu-layer__backdrop { animation: moonFadeOut .5s ease both; }

/* Badge « Défiler » qui tourne (héros) */
.moon-scroll-badge { position: absolute; right: max(24px, calc(50% - 680px)); bottom: 120px; z-index: 3; width: 112px; height: 112px; display: grid; place-items: center; color: var(--moon-blue); text-decoration: none; }
.moon-scroll-badge svg.moon-scroll-badge__ring { position: absolute; inset: 0; width: 100%; height: 100%; animation: moonSpin 14s linear infinite; }
.moon-scroll-badge:hover svg.moon-scroll-badge__ring { animation-duration: 4s; }
@media (max-width: 991.98px) { .moon-scroll-badge { display: none; } }

@media (prefers-reduced-motion: reduce) {
  .moon-menu-layer, .moon-menu-layer *, .moon-scroll-badge * { animation: none !important; transition: none !important; }
}

/* Filtre actif (actualités) */
.moon-chip.active { background: var(--moon-blue); border-color: var(--moon-blue); color: #fff; }
.moon-chip.active:hover { color: #fff; }
.form-control.is-invalid, .form-select.is-invalid { border-color: var(--moon-orange); }

/* Sélecteur de langue (FR / EN / BM) */
.moon-langues { display: inline-flex; border: 1.5px solid #fa6b02; border-radius: 50rem; padding: 3px; background: #fff; }
.moon-langues a { display: inline-flex; align-items: center; justify-content: center; text-decoration: none; font-weight: 700; font-size: .78rem; min-width: 34px; height: 30px; border-radius: 50rem; color: var(--moon-ink); }
.moon-langues a.active { background: var(--moon-blue); color: #fff; }
.moon-langues a:hover:not(.active) { background: #fff4ec; }
@media (max-width: 575.98px) { .moon-langues { display: none; } }

/* Texte long (pages légales, descriptions, actualités) */
.moon-prose { font-size: 1.05rem; line-height: 1.75; color: var(--moon-muted); }
.moon-prose h2 { font-weight: 800; font-size: 1.5rem; color: var(--moon-navy); margin: 2.5rem 0 .75rem; }
.moon-prose h3 { font-weight: 800; font-size: 1.2rem; color: var(--moon-navy); margin: 2rem 0 .5rem; }
.moon-prose a { font-weight: 600; }
.moon-prose ul { padding-left: 1.25rem; }
.moon-prose li { margin-bottom: .4rem; }
.moon-prose img { max-width: 100%; height: auto; border-radius: 18px; }
/* Contenus de l'éditeur (core/richtext.py) : médias, vidéos, tableaux, crédits. */
.moon-prose > :first-child { margin-top: 0; }
.moon-prose h4 { font-weight: 800; font-size: 1.05rem; color: var(--moon-navy); margin: 1.5rem 0 .4rem; }
.moon-prose blockquote { margin: 1.75rem 0; padding: .25rem 0 .25rem 1.25rem; border-left: 4px solid var(--moon-orange); font-size: 1.15rem; font-style: italic; color: var(--moon-navy); }
.moon-prose hr { border: 0; height: 4px; border-radius: 4px; margin: 2.5rem auto; width: 120px; opacity: 1; background: linear-gradient(90deg, #00e4ec, #49fd49, #fffd06); }
.moon-prose iframe { display: block; width: 100%; aspect-ratio: 16 / 9; height: auto; border: 0; border-radius: 18px; margin: 1.75rem 0; }
.moon-prose .moon-tableau { overflow-x: auto; margin: 1.5rem 0; }
.moon-prose table { width: 100%; border-collapse: collapse; font-size: .98rem; }
.moon-prose th, .moon-prose td { border: 1px solid #e3e8f2; padding: .55rem .75rem; vertical-align: top; text-align: left; }
.moon-prose th { background: var(--moon-soft); color: var(--moon-navy); font-weight: 800; }
.moon-prose .moon-figure-ligne { display: inline-block; position: relative; max-width: 100%; }
.moon-prose .moon-credit { display: block; font-size: .78rem; color: var(--moon-muted); margin-top: .3rem; }
.moon-prose .moon-w-full, .moon-prose .moon-wb-full { width: 100%; }
.moon-prose .moon-w-half, .moon-prose .moon-wb-half { width: 50%; }
.moon-prose .moon-w-third, .moon-prose .moon-wb-third { width: 33.333%; }
.moon-prose .moon-pos-left, .moon-prose .moon-posb-left { float: left; margin: .3rem 1.5rem 1rem 0; }
.moon-prose .moon-pos-right, .moon-prose .moon-posb-right { float: right; margin: .3rem 0 1rem 1.5rem; }
.moon-prose .moon-pos-center, .moon-prose .moon-posb-center { display: block; margin-left: auto; margin-right: auto; }
.moon-prose::after { content: ""; display: table; clear: both; }
@media (max-width: 599.98px) { .moon-prose [class*="moon-w-"], .moon-prose [class*="moon-wb-"] { width: 100%; float: none; margin: 1rem 0; } }
