/* ==========================================================
   Pôle Qualité Besançon — feuille de style du site public
   ========================================================== */
:root {
  --ink: #14213d;
  --ink-2: #24365f;
  --ink-soft: #3d4b68;
  --yellow: #f5c400;
  --yellow-soft: #fff6cc;
  --red: #d7262b;
  --teal: #0f8b8d;
  --teal-soft: #e3f4f3;
  --bg: #ffffff;
  --tint: #f4f6fa;
  --line: #e2e6ee;
  --muted: #5d6678;
  --radius: 14px;
  --radius-sm: 8px;
  --shadow: 0 1px 2px rgba(20, 33, 61, .06), 0 8px 24px rgba(20, 33, 61, .08);
  --shadow-lg: 0 18px 50px rgba(20, 33, 61, .18);
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-title: "Avenir Next", "Segoe UI", system-ui, -apple-system, Roboto, Arial, sans-serif;
  --container: 1180px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font);
  font-size: 1.0625rem;
  line-height: 1.65;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; }
a { color: var(--teal); text-underline-offset: .18em; }
a:hover { color: var(--ink); }
h1, h2, h3, h4 { font-family: var(--font-title); line-height: 1.2; letter-spacing: -.01em; margin: 0 0 .6em; color: var(--ink); }
h1 { font-size: clamp(2rem, 4.2vw, 3.1rem); font-weight: 800; }
h2 { font-size: clamp(1.5rem, 2.6vw, 2.05rem); font-weight: 750; }
h3 { font-size: 1.2rem; font-weight: 700; }
p { margin: 0 0 1em; }
:focus-visible { outline: 3px solid var(--yellow); outline-offset: 2px; border-radius: 4px; }

.container { width: min(100% - 2.5rem, var(--container)); margin-inline: auto; }
.container--narrow { width: min(100% - 2.5rem, 860px); }
.sr-only { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip-link { position: absolute; left: -999px; top: 8px; z-index: 100; background: var(--yellow); color: var(--ink); padding: .5em 1em; border-radius: 6px; font-weight: 700; }
.skip-link:focus { left: 8px; }
.muted { color: var(--muted); }
.small { font-size: .875rem; }
.center { text-align: center; }
.plain { list-style: none; margin: 0; padding: 0; }
.no-scroll { overflow: hidden; }

/* ---------- Boutons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .4em;
  padding: .78em 1.35em; border-radius: 999px; border: 2px solid transparent;
  font: inherit; font-weight: 700; font-size: .98rem; line-height: 1.1;
  text-decoration: none; cursor: pointer; transition: transform .15s, background .15s, color .15s, border-color .15s;
}
.btn:hover { transform: translateY(-1px); }
.btn--sm { padding: .5em 1em; font-size: .9rem; }
.btn--accent { background: var(--yellow); color: var(--ink); }
.btn--accent:hover { background: #ffd633; color: var(--ink); }
.btn--ghost { border-color: rgba(255, 255, 255, .55); color: #fff; }
.btn--ghost:hover { background: #fff; color: var(--ink); }
.btn--outline { border-color: var(--ink); color: var(--ink); background: transparent; }
.btn--outline:hover { background: var(--ink); color: #fff; }
.link-arrow { font-weight: 700; color: var(--ink); text-decoration: none; border-bottom: 2px solid var(--yellow); padding-bottom: 2px; }
.link-arrow::after { content: " →"; }
.link-arrow:hover { color: var(--teal); }
.link-arrow--light { color: #fff; }
.link-arrow--light:hover { color: var(--yellow); }
.badge { display: inline-block; font-size: .75rem; font-weight: 700; padding: .2em .6em; border-radius: 999px; background: var(--line); color: var(--ink); vertical-align: middle; }
.badge--draft { background: #ffe3e3; color: #9b1c1c; }

/* ---------- Barres du haut ---------- */
.adminbar { background: #111827; color: #e5e7eb; font-size: .85rem; padding: .35rem 1rem; display: flex; gap: 1.2rem; flex-wrap: wrap; }
.adminbar a { color: var(--yellow); }
.topbar { background: var(--ink); color: #c9d2e6; font-size: .82rem; }
.topbar__inner { display: flex; justify-content: space-between; gap: 1rem; padding: .45rem 0; flex-wrap: wrap; }
.topbar a { color: #fff; text-decoration: none; margin-left: 1.2rem; }
.topbar a:hover { color: var(--yellow); }

/* ---------- En-tête ---------- */
.site-header { position: sticky; top: 0; z-index: 50; background: rgba(255, 255, 255, .96); backdrop-filter: saturate(1.4) blur(10px); border-bottom: 1px solid var(--line); transition: box-shadow .2s; }
.site-header.is-scrolled { box-shadow: 0 6px 24px rgba(20, 33, 61, .08); }
.site-header__inner { display: flex; align-items: center; justify-content: space-between; gap: 1rem; min-height: 78px; }
.brand { display: flex; align-items: center; gap: .7rem; text-decoration: none; color: var(--ink); }
.brand img { width: 58px; height: auto; }
.brand__text { display: flex; flex-direction: column; line-height: 1.15; }
.brand__text strong { font-family: var(--font-title); font-size: 1.25rem; font-weight: 800; letter-spacing: -.01em; }
.brand__text small { font-size: .78rem; color: var(--muted); font-weight: 600; letter-spacing: .02em; }
.brand--light { color: #fff; }
.brand--light small { color: #b9c3da; }

.main-nav > ul { list-style: none; display: flex; align-items: center; gap: .15rem; margin: 0; padding: 0; }
.main-nav a, .sub-toggle {
  display: block; padding: .6rem .8rem; border-radius: 8px; color: var(--ink); text-decoration: none;
  font-weight: 650; font-size: .96rem; background: none; border: 0; font-family: inherit; cursor: pointer;
}
.main-nav > ul > li > a:hover, .sub-toggle:hover { background: var(--tint); }
.main-nav .is-active > a, .main-nav .is-active > .sub-toggle { color: var(--teal); }
.main-nav .is-active > a::after, .main-nav .is-active > .sub-toggle::after { content: ""; display: block; height: 3px; border-radius: 2px; background: var(--yellow); margin-top: 3px; }
.caret { display: inline-block; width: .45em; height: .45em; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: rotate(45deg) translateY(-3px); margin-left: .45em; }
.has-sub { position: relative; }
.sub { list-style: none; margin: 0; padding: .45rem; position: absolute; top: calc(100% + 6px); left: 0; min-width: 260px; background: #fff; border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow-lg); opacity: 0; visibility: hidden; transform: translateY(6px); transition: .15s; }
.sub a { font-weight: 550; padding: .55rem .8rem; }
.sub a:hover, .sub a[aria-current] { background: var(--teal-soft); color: var(--ink); }
.sub-toggle[aria-expanded="true"] + .sub { opacity: 1; visibility: visible; transform: none; }
@media (hover: hover) and (min-width: 1061px) {
  .has-sub:hover .sub, .has-sub:focus-within .sub { opacity: 1; visibility: visible; transform: none; }
}
.nav-cta { margin-left: .5rem; }
.main-nav .nav-cta a { padding: .62em 1.2em; }
.main-nav .nav-cta a:hover { background: #ffd633; }

.nav-toggle { display: none; width: 46px; height: 46px; border: 0; border-radius: 10px; background: var(--tint); cursor: pointer; position: relative; }
.nav-toggle__bar, .nav-toggle__bar::before, .nav-toggle__bar::after { position: absolute; left: 12px; right: 12px; height: 2px; background: var(--ink); border-radius: 2px; content: ""; transition: .2s; }
.nav-toggle__bar { top: 22px; }
.nav-toggle__bar::before { top: -7px; left: 0; right: 0; }
.nav-toggle__bar::after { top: 7px; left: 0; right: 0; }
.nav-toggle[aria-expanded="true"] .nav-toggle__bar { background: transparent; }
.nav-toggle[aria-expanded="true"] .nav-toggle__bar::before { top: 0; transform: rotate(45deg); }
.nav-toggle[aria-expanded="true"] .nav-toggle__bar::after { top: 0; transform: rotate(-45deg); }

@media (max-width: 1060px) {
  .nav-toggle { display: block; }
  .main-nav { position: fixed; inset: 0 0 0 auto; width: min(88vw, 380px); background: #fff; padding: 5.5rem 1.2rem 2rem; box-shadow: var(--shadow-lg); transform: translateX(100%); transition: transform .25s, visibility .25s; overflow-y: auto; z-index: -1; visibility: hidden; }
  .main-nav.is-open { transform: none; visibility: visible; }
  .main-nav > ul { flex-direction: column; align-items: stretch; gap: .1rem; }
  .main-nav a, .sub-toggle { width: 100%; text-align: left; font-size: 1.05rem; padding: .8rem .9rem; }
  .sub { position: static; box-shadow: none; border: 0; padding: 0 0 0 .8rem; min-width: 0; display: none; opacity: 1; visibility: visible; transform: none; }
  .sub-toggle[aria-expanded="true"] + .sub { display: block; }
  .main-nav .is-active > a::after, .main-nav .is-active > .sub-toggle::after { display: none; }
  .nav-cta { margin: 1rem 0 0; }
  body.nav-open::after { content: ""; position: fixed; inset: 0; background: rgba(20, 33, 61, .35); z-index: 40; }
  .site-header { z-index: 60; backdrop-filter: none; -webkit-backdrop-filter: none; background: #fff; }
  .topbar__org { display: none; }
}

/* ---------- Héros ---------- */
.hero {
  position: relative; color: #fff; overflow: hidden;
  background:
    radial-gradient(1200px 500px at 85% -10%, rgba(15, 139, 141, .55), transparent 60%),
    radial-gradient(800px 420px at -10% 110%, rgba(215, 38, 43, .35), transparent 60%),
    linear-gradient(135deg, #14213d 0%, #1c2d52 60%, #14213d 100%);
}
.hero--photo { background: linear-gradient(100deg, rgba(20, 33, 61, .96) 0%, rgba(20, 33, 61, .82) 45%, rgba(20, 33, 61, .35) 100%), var(--hero-img) center / cover no-repeat; }
.hero::after { content: ""; position: absolute; right: -80px; bottom: -120px; width: 420px; height: 420px; border-radius: 50%; border: 60px solid rgba(245, 196, 0, .12); pointer-events: none; }
.hero__inner { position: relative; z-index: 1; display: grid; grid-template-columns: 1.35fr 1fr; gap: 3rem; align-items: center; padding: clamp(3.5rem, 8vw, 6.5rem) 0; }
.hero h1 { color: #fff; margin-bottom: .45em; }
.hero h1::after { content: ""; display: block; width: 84px; height: 5px; border-radius: 3px; background: var(--yellow); margin-top: .45em; }
.hero__lead { font-size: 1.15rem; color: #dbe2f0; max-width: 40em; }
.hero__actions { display: flex; flex-wrap: wrap; gap: .8rem; margin-top: 1.6rem; }
.kicker { text-transform: uppercase; letter-spacing: .12em; font-size: .78rem; font-weight: 800; color: var(--yellow); margin-bottom: .9em; }
.kicker a { color: inherit; text-decoration: none; }
.kicker a:hover { text-decoration: underline; }
.kicker--dark { color: var(--teal); }
.hero__badges { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.hero__badges li { background: rgba(255, 255, 255, .08); border: 1px solid rgba(255, 255, 255, .16); border-radius: var(--radius); padding: 1.2rem 1.3rem; backdrop-filter: blur(6px); }
.hero__badges strong { display: block; font-family: var(--font-title); font-size: 1.9rem; line-height: 1.1; color: var(--yellow); }
.hero__badges span { font-size: .92rem; color: #dbe2f0; }

/* ---------- Sections ---------- */
.section { padding: clamp(3rem, 6vw, 5rem) 0; }
.section--tight { padding: clamp(2rem, 4vw, 3.2rem) 0; }
.section--tint { background: var(--tint); }
.section--dark { background: var(--ink); color: #dbe2f0; }
.section--dark h2 { color: #fff; }
.section__head { max-width: 720px; margin-bottom: 2rem; }
.section__head--row { max-width: none; display: flex; justify-content: space-between; align-items: end; gap: 1rem; flex-wrap: wrap; }
.split { display: grid; grid-template-columns: 1fr 1.1fr; gap: clamp(2rem, 5vw, 4.5rem); align-items: start; }
.split--even { grid-template-columns: 1fr 1fr; }

.pillars { display: grid; gap: 1rem; }
.pillar { position: relative; padding: 1.4rem 1.5rem 1.4rem 5.2rem; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.pillar h3 { margin-bottom: .3em; }
.pillar p { margin: 0; color: var(--ink-soft); font-size: .98rem; }
.pillar__letter { position: absolute; left: 1.3rem; top: 1.3rem; width: 2.8rem; height: 2.8rem; display: grid; place-items: center; border-radius: 12px; font-family: var(--font-title); font-weight: 900; font-size: 1.5rem; color: #fff; }
.pillar--q .pillar__letter { background: var(--ink); }
.pillar--s .pillar__letter { background: var(--red); }
.pillar--e .pillar__letter { background: var(--teal); }

.timeline { list-style: none; margin: 0 0 2rem; padding: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.2rem; counter-reset: step; }
.timeline li { position: relative; background: #fff; border-radius: var(--radius); padding: 1.5rem 1.4rem; border-top: 5px solid var(--ink); box-shadow: var(--shadow); }
.timeline li:nth-child(2) { border-top-color: var(--yellow); }
.timeline li:nth-child(3) { border-top-color: var(--teal); }
.timeline li:nth-child(4) { border-top-color: var(--red); }
.timeline__when { display: block; font-size: .8rem; font-weight: 800; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); margin-bottom: .4rem; }
.timeline p { margin: 0; font-size: .96rem; color: var(--ink-soft); }

/* ---------- Cartes actualités ---------- */
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 1.6rem; }
.card { display: flex; flex-direction: column; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); transition: transform .2s, box-shadow .2s; }
.card:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); }
.card__media { display: block; aspect-ratio: 16 / 10; background: var(--tint); overflow: hidden; }
.card__media img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s; }
.card:hover .card__media img { transform: scale(1.04); }
.card__placeholder { display: grid; place-items: center; height: 100%; font-family: var(--font-title); font-weight: 900; font-size: 2.4rem; color: rgba(20, 33, 61, .18); background: linear-gradient(135deg, var(--yellow-soft), var(--teal-soft)); }
.card__body { padding: 1.2rem 1.35rem 1.4rem; display: flex; flex-direction: column; gap: .35rem; flex: 1; }
.card__date { font-size: .82rem; font-weight: 700; color: var(--teal); text-transform: uppercase; letter-spacing: .05em; }
.card__title { font-size: 1.15rem; margin: 0; }
.card__title a { color: var(--ink); text-decoration: none; }
.card__title a::after { content: ""; position: absolute; inset: 0; }
.card { position: relative; }
.card__title a:hover { color: var(--teal); }
.card__text { color: var(--muted); font-size: .96rem; margin: 0; }

/* ---------- Agenda (liste) ---------- */
.event-list { list-style: none; margin: 0 0 1.5rem; padding: 0; display: grid; gap: .7rem; }
.event-item a { display: flex; gap: 1rem; align-items: center; padding: .8rem; border-radius: 12px; text-decoration: none; color: inherit; background: #fff; border: 1px solid var(--line); transition: border-color .15s, transform .15s; }
.event-item a:hover { border-color: var(--teal); transform: translateX(2px); }
.event-item__date { flex: none; width: 3.6rem; height: 3.6rem; border-radius: 12px; background: var(--cat, var(--teal)); color: #fff; display: flex; flex-direction: column; align-items: center; justify-content: center; line-height: 1; }
.event-item__date .d { font-family: var(--font-title); font-size: 1.45rem; font-weight: 800; }
.event-item__date .m { font-size: .72rem; text-transform: uppercase; font-weight: 700; letter-spacing: .05em; margin-top: 2px; }
.event-item__body { display: flex; flex-direction: column; gap: .1rem; min-width: 0; }
.event-item__body strong { color: var(--ink); line-height: 1.3; }
.event-item__cat { display: inline-flex; align-items: center; gap: .35em; font-size: .72rem; font-weight: 800; text-transform: uppercase; letter-spacing: .06em; color: var(--cat, var(--teal)); }
.event-item__cat::before { content: ""; width: .55em; height: .55em; border-radius: 50%; background: var(--cat, var(--teal)); }
.event-item__when { font-size: .88rem; color: var(--muted); }
.event-list--light .event-item a { background: rgba(255, 255, 255, .06); border-color: rgba(255, 255, 255, .14); }
.event-list--light .event-item a:hover { border-color: var(--yellow); }
.event-list--light .event-item__body strong { color: #fff; }
.event-list--light .event-item__when { color: #b9c3da; }
.event-list--light .event-item__cat { filter: brightness(1.6); }

.cta-card { background: linear-gradient(160deg, rgba(255, 255, 255, .1), rgba(255, 255, 255, .03)); border: 1px solid rgba(255, 255, 255, .16); border-radius: var(--radius); padding: clamp(1.5rem, 3vw, 2.4rem); }
.checks { list-style: none; padding: 0; margin: 0 0 1rem; display: grid; gap: .55rem; }
.checks li { position: relative; padding-left: 1.9rem; }
.checks li::before { content: "✓"; position: absolute; left: 0; top: .05em; width: 1.3rem; height: 1.3rem; border-radius: 50%; background: var(--yellow); color: var(--ink); font-size: .8rem; font-weight: 900; display: grid; place-items: center; }
.checks--dark li::before { background: var(--teal); color: #fff; }
.contact-card { background: var(--tint); border-radius: var(--radius); padding: clamp(1.5rem, 3vw, 2.2rem); border-left: 6px solid var(--yellow); }
.big-link { font-size: 1.25rem; font-weight: 700; color: var(--ink); }

/* ---------- En-têtes de pages ---------- */
.page-head { background: linear-gradient(135deg, #14213d, #22355e); color: #dbe2f0; padding: clamp(2.5rem, 6vw, 4.2rem) 0 clamp(2rem, 4vw, 3rem); position: relative; overflow: hidden; }
.page-head::after { content: ""; position: absolute; right: -60px; top: -80px; width: 280px; height: 280px; border-radius: 50%; border: 40px solid rgba(245, 196, 0, .1); }
.page-head h1 { color: #fff; margin-bottom: .3em; font-size: clamp(1.8rem, 3.6vw, 2.7rem); }
.page-head__lead { font-size: 1.12rem; max-width: 46em; margin: 0; }
.page-head__meta { margin: 0; color: #b9c3da; }

/* ---------- Contenu riche (pages, actualités, éditeur) ---------- */
.richtext { overflow-wrap: break-word; }
.richtext > *:first-child { margin-top: 0; }
.richtext h2 { font-size: 1.55rem; margin-top: 1.6em; }
.richtext h3 { font-size: 1.25rem; margin-top: 1.5em; color: var(--ink-2); }
.richtext h4, .richtext h5 { font-size: 1.08rem; margin-top: 1.3em; }
.richtext ul, .richtext ol { padding-left: 1.35em; margin: 0 0 1.1em; }
.richtext li { margin-bottom: .35em; }
.richtext li::marker { color: var(--teal); }
.richtext img { border-radius: 10px; height: auto; }
.richtext img[style*="float: left"] { margin: .3em 1.4em 1em 0; }
.richtext img[style*="float: right"] { margin: .3em 0 1em 1.4em; }
.richtext figure { margin: 1.5em 0; }
.richtext figcaption { font-size: .88rem; color: var(--muted); margin-top: .4em; }
.richtext blockquote { margin: 1.5em 0; padding: 1em 1.4em; border-left: 5px solid var(--yellow); background: var(--yellow-soft); border-radius: 0 10px 10px 0; }
.richtext table { width: 100%; border-collapse: collapse; margin: 1.2em 0 1.6em; font-size: .96rem; display: block; overflow-x: auto; }
.richtext th, .richtext td { border: 1px solid var(--line); padding: .6em .8em; text-align: left; vertical-align: top; }
.richtext th { background: var(--tint); }
.richtext thead th { background: var(--ink); color: #fff; border-color: var(--ink); }
.richtext hr { border: 0; border-top: 1px solid var(--line); margin: 2em 0; }
.richtext a { font-weight: 600; }
.richtext iframe { max-width: 100%; border: 0; border-radius: 10px; }
.richtext .lead { font-size: 1.15rem; color: var(--ink-soft); }
.richtext::after { content: ""; display: table; clear: both; }

.notice { padding: .9rem 1.1rem; border-radius: 10px; background: var(--teal-soft); border: 1px solid #bfe3e1; }
.article-cover { margin: 0 0 1.8rem; }
.article-cover img { width: 100%; border-radius: var(--radius); box-shadow: var(--shadow); }
.gallery-title { margin-top: 2.2rem; font-size: 1.35rem; }
.gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: .7rem; }
.gallery__item { display: block; aspect-ratio: 1; overflow: hidden; border-radius: 10px; background: var(--tint); }
.gallery__item img { width: 100%; height: 100%; object-fit: cover; transition: transform .35s, opacity .2s; }
.gallery__item:hover img { transform: scale(1.06); }
.back { margin-top: 2.5rem; }
.actions { display: flex; flex-wrap: wrap; gap: .7rem; margin-top: 1.5rem; }

.event-facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 1rem; margin: 0 0 1.8rem; }
.event-facts div { background: var(--tint); border-radius: 12px; padding: 1rem 1.2rem; }
.event-facts dt { font-size: .78rem; font-weight: 800; text-transform: uppercase; letter-spacing: .08em; color: var(--teal); }
.event-facts dd { margin: .2rem 0 0; font-weight: 650; }

/* ---------- Calendrier ---------- */
.agenda-layout { display: grid; grid-template-columns: 1.7fr 1fr; gap: 2.2rem; align-items: start; }
.calendar { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 1.2rem; box-shadow: var(--shadow); }
.calendar__head { display: flex; justify-content: space-between; align-items: center; margin-bottom: .6rem; }
.calendar__head h2 { margin: 0; font-size: 1.45rem; }
.calendar__nav { width: 2.6rem; height: 2.6rem; border-radius: 50%; display: grid; place-items: center; background: var(--tint); color: var(--ink); text-decoration: none; font-size: 1.6rem; line-height: 1; }
.calendar__nav:hover { background: var(--yellow); color: var(--ink); }
.calendar__grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; }
.calendar__dow { text-align: center; font-size: .75rem; font-weight: 800; text-transform: uppercase; color: var(--muted); padding: .4rem 0; }
.calendar__cell { min-height: 96px; border-radius: 8px; background: var(--tint); padding: .35rem; display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.calendar__cell--empty { background: transparent; }
.calendar__day { font-size: .82rem; font-weight: 700; color: var(--muted); }
.calendar__cell.is-today { background: var(--yellow-soft); box-shadow: inset 0 0 0 2px var(--yellow); }
.calendar__cell.is-today .calendar__day { color: var(--ink); }
.calendar__event { display: block; font-size: .74rem; line-height: 1.25; padding: 2px 5px; border-radius: 4px; background: var(--cat); color: #fff; text-decoration: none; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-weight: 600; }
.calendar__event:hover { color: #fff; filter: brightness(1.15); }
.legend { list-style: none; padding: 0; margin: 1rem 0 0; display: flex; flex-wrap: wrap; gap: .4rem 1.1rem; font-size: .82rem; color: var(--muted); }
.legend li::before { content: ""; display: inline-block; width: .75em; height: .75em; border-radius: 3px; background: var(--cat); margin-right: .4em; vertical-align: -1px; }
.agenda-side h2 { font-size: 1.25rem; }
@media (max-width: 700px) {
  .calendar { padding: .6rem; }
  .calendar__cell { min-height: 52px; }
  .calendar__event { font-size: 0; height: 6px; padding: 0; }
}

/* ---------- Pagination ---------- */
.pager { display: flex; gap: .4rem; justify-content: center; margin-top: 2.5rem; flex-wrap: wrap; }
.pager a { min-width: 2.6rem; height: 2.6rem; display: grid; place-items: center; border-radius: 10px; border: 1px solid var(--line); text-decoration: none; color: var(--ink); font-weight: 700; }
.pager a:hover { border-color: var(--ink); }
.pager a.is-current { background: var(--ink); color: #fff; border-color: var(--ink); }

/* ---------- Contact ---------- */
.plan-link { display: block; text-decoration: none; }
.plan-link img { border-radius: var(--radius); box-shadow: var(--shadow); display: block; margin-bottom: .6rem; max-height: 640px; width: auto; }
.plan-link span { font-weight: 700; }

/* ---------- Partenaires ---------- */
.partners { border-top: 1px solid var(--line); padding: 2.4rem 0; background: #fff; }
.partners__title { font-size: .8rem; text-transform: uppercase; letter-spacing: .14em; color: var(--muted); text-align: center; margin-bottom: 1.4rem; font-weight: 800; }
.partners__logos { text-align: center; }
.partners__logos p { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 1.5rem 3rem; margin: 0 0 1rem; }
.partners__logos img { max-height: 84px; width: auto; border-radius: 0; filter: grayscale(.15); transition: filter .2s, transform .2s; }
.partners__logos a:hover img { filter: none; transform: scale(1.03); }

/* ---------- Pied de page ---------- */
.site-footer { background: #0f1a31; color: #b9c3da; font-size: .95rem; padding-top: 3rem; }
.site-footer a { color: #fff; text-decoration: none; }
.site-footer a:hover { color: var(--yellow); text-decoration: underline; }
.site-footer h2 { font-size: .82rem; text-transform: uppercase; letter-spacing: .12em; color: var(--yellow); margin-bottom: 1rem; }
.site-footer__grid { display: grid; grid-template-columns: 1.3fr 1fr 1fr 1fr; gap: 2rem; padding-bottom: 2.4rem; }
.site-footer__grid li { margin-bottom: .45rem; }
.site-footer__note { margin-top: 1rem; font-size: .9rem; }
.site-footer__note p { margin: 0 0 .5em; }
.site-footer__bottom { border-top: 1px solid rgba(255, 255, 255, .1); padding: 1.1rem 0 1.4rem; display: flex; justify-content: space-between; flex-wrap: wrap; gap: .6rem; font-size: .85rem; }

/* ---------- Visionneuse ---------- */
.lightbox { position: fixed; inset: 0; z-index: 200; background: rgba(8, 13, 26, .94); display: none; align-items: center; justify-content: center; }
.lightbox.is-open { display: flex; }
.lightbox figure { margin: 0; max-width: 92vw; max-height: 88vh; text-align: center; }
.lightbox img { max-width: 92vw; max-height: 82vh; border-radius: 8px; object-fit: contain; }
.lightbox figcaption { color: #b9c3da; font-size: .9rem; margin-top: .6rem; }
.lightbox button { position: absolute; background: rgba(255, 255, 255, .1); color: #fff; border: 0; width: 3.2rem; height: 3.2rem; border-radius: 50%; font-size: 1.8rem; cursor: pointer; line-height: 1; }
.lightbox button:hover { background: var(--yellow); color: var(--ink); }
.lightbox__close { top: 1rem; right: 1rem; font-size: 1.3rem !important; }
.lightbox__prev { left: 1rem; top: 50%; transform: translateY(-50%); }
.lightbox__next { right: 1rem; top: 50%; transform: translateY(-50%); }

/* ---------- Responsive ---------- */
@media (max-width: 1000px) {
  .hero__inner, .split, .split--even, .agenda-layout { grid-template-columns: 1fr; }
  .timeline { grid-template-columns: 1fr 1fr; }
  .site-footer__grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 620px) {
  body { font-size: 1rem; }
  .timeline, .site-footer__grid { grid-template-columns: 1fr; }
  .hero__badges strong { font-size: 1.5rem; }
  .topbar a { margin-left: 0; margin-right: 1rem; }
  .brand__text small { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; scroll-behavior: auto !important; }
}
@media print {
  .topbar, .site-header, .site-footer, .partners, .adminbar, .hero__actions { display: none !important; }
  .page-head, .hero { background: none !important; color: #000; }
  .page-head h1, .hero h1 { color: #000; }
}
.brand--light img { background: #fff; border-radius: 10px; padding: 4px; }

/* ---------- Diaporama 3D (photos & vidéos) ---------- */
.slider3d {
  position: relative; margin: 1rem 0 1.4rem; padding: 2.2rem 0 4.2rem; overflow: hidden;
  border-radius: var(--radius);
  background: radial-gradient(900px 380px at 50% 10%, #2a3f6e 0%, #14213d 55%, #0b1428 100%);
  perspective: 1400px; outline: none;
}
.slider3d:focus-visible { box-shadow: 0 0 0 3px var(--yellow); }
.slider3d__stage { position: relative; height: clamp(200px, 32vw, 340px); transform-style: preserve-3d; }
.slider3d__item {
  position: absolute; top: 0; left: 50%; width: min(50%, 540px); height: 100%; margin: 0 0 0 calc(min(50%, 540px) / -2);
  border-radius: 12px; overflow: visible; cursor: pointer; background: #0b1428;
  transition: transform .7s cubic-bezier(.2, .7, .2, 1), opacity .7s; will-change: transform;
  -webkit-box-reflect: below 8px linear-gradient(transparent 62%, rgba(255, 255, 255, .22));
  user-select: none; -webkit-user-select: none; touch-action: pan-y;
}
.slider3d:not(.is-ready) .slider3d__item:not(:first-child) { opacity: 0; }
.slider3d__item img, .slider3d__item video, .slider3d__noposter {
  display: block; width: 100%; height: 100%; object-fit: cover; border-radius: 12px;
  box-shadow: 0 24px 50px rgba(0, 0, 0, .45); pointer-events: none; background: #0b1428;
}
.slider3d__noposter { display: grid; place-items: center; color: #b9c3da; font-weight: 800; font-size: 1.3rem; }
.slider3d__item::after { content: ""; position: absolute; inset: 0; border-radius: 12px; background: rgba(11, 20, 40, .45); transition: background .5s; pointer-events: none; }
.slider3d__item.is-active::after { background: transparent; box-shadow: inset 0 0 0 3px rgba(245, 196, 0, .0); }
.slider3d__item.is-active:hover::after { box-shadow: inset 0 0 0 3px var(--yellow); }
.slider3d__item figcaption { position: absolute; left: 0; right: 0; bottom: 0; padding: 2.2rem 1rem .8rem; color: #fff; font-size: .9rem; font-weight: 600; background: linear-gradient(transparent, rgba(0, 0, 0, .7)); border-radius: 0 0 12px 12px; opacity: 0; transition: opacity .4s; pointer-events: none; }
.slider3d__item.is-active figcaption { opacity: 1; }
.slider3d__play { position: absolute; left: 50%; top: 50%; width: 68px; height: 68px; margin: -34px 0 0 -34px; border-radius: 50%; background: rgba(215, 38, 43, .92); box-shadow: 0 8px 24px rgba(0, 0, 0, .4); z-index: 2; pointer-events: none; transition: transform .2s; }
.slider3d__play::before { content: ""; position: absolute; left: 27px; top: 21px; border-style: solid; border-width: 13px 0 13px 21px; border-color: transparent transparent transparent #fff; }
.slider3d__item.is-active:hover .slider3d__play { transform: scale(1.1); }
.slider3d__item:not(.is-active) .slider3d__play { transform: scale(.7); opacity: .7; }
.slider3d__nav { position: absolute; top: calc(2.2rem + clamp(200px, 32vw, 340px) / 2); transform: translateY(-50%); z-index: 200; width: 3rem; height: 3rem; border-radius: 50%; border: 0; background: rgba(255, 255, 255, .14); color: #fff; font-size: 1.9rem; line-height: 1; cursor: pointer; backdrop-filter: blur(4px); }
.slider3d__nav:hover { background: var(--yellow); color: var(--ink); }
.slider3d__nav--prev { left: 1rem; }
.slider3d__nav--next { right: 1rem; }
.slider3d__bar { position: absolute; left: 0; right: 0; bottom: 1rem; display: flex; justify-content: center; align-items: center; gap: .8rem; z-index: 200; color: #dbe2f0; font-size: .88rem; font-weight: 700; }
.slider3d__pause { border: 1px solid rgba(255, 255, 255, .3); background: transparent; color: #fff; border-radius: 999px; padding: .2rem .7rem; font-size: .75rem; cursor: pointer; }
.slider3d__pause:hover { border-color: var(--yellow); color: var(--yellow); }
@media (max-width: 640px) {
  .slider3d__item { width: 62%; margin-left: -31%; }
  .slider3d__nav { width: 2.4rem; height: 2.4rem; font-size: 1.5rem; }
  .slider3d__nav--prev { left: .4rem; }
  .slider3d__nav--next { right: .4rem; }
}
@media (prefers-reduced-motion: reduce) { .slider3d__item { transition: none; } }

.gallery-all { margin-top: .4rem; }
.gallery-all summary { cursor: pointer; font-weight: 700; color: var(--teal); margin-bottom: .8rem; }
.gallery__item { position: relative; }
.gallery__item video { width: 100%; height: 100%; object-fit: cover; }
.gallery__item--video::after, .gallery__item--youtube::after, .gallery__item--vimeo::after { content: "▶"; position: absolute; inset: 0; display: grid; place-items: center; color: #fff; font-size: 1.6rem; text-shadow: 0 2px 8px rgba(0, 0, 0, .6); background: rgba(0, 0, 0, .15); }

/* Visionneuse : vidéos */
.lightbox__stage { display: flex; align-items: center; justify-content: center; }
.lightbox__stage video { max-width: 92vw; max-height: 82vh; border-radius: 8px; background: #000; }
.lightbox__embed { width: min(92vw, 1280px); aspect-ratio: 16 / 9; max-height: 82vh; border: 0; border-radius: 8px; background: #000; }

/* Vidéos insérées dans le texte */
.richtext video { max-width: 100%; height: auto; border-radius: 10px; background: #000; }
.richtext iframe[src*="youtube"], .richtext iframe[src*="vimeo"], .richtext iframe[src*="dailymotion"] { width: 100%; height: auto; aspect-ratio: 16 / 9; }
