:root {
  --ink: #15212b;
  --teal: #1e5b63;
  --teal-dark: #17484f;
  --lagoon: #3a8fa0;
  --terracotta: #c4622d;
  --sand: #efe8dc;
  --mist: #e6ecee;
  --stone: #5b6670;
  --white: #ffffff;
  --rule: #d5dade;
  --font: "Segoe UI", system-ui, -apple-system, sans-serif;
  --header-h: 5.25rem;
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font);
  font-size: 1rem;
  line-height: 1.55;
  color: var(--ink);
  background: var(--white);
}

body.is-locked {
  overflow: hidden;
}

a {
  color: var(--teal);
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

a:hover {
  color: var(--lagoon);
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--white);
  border-bottom: 1px solid var(--rule);
  box-shadow: 0 1px 0 rgba(21, 33, 43, 0.04);
}

.header-inner {
  max-width: 72rem;
  margin: 0 auto;
  padding: 0.75rem 1.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.75rem 1.5rem;
  min-height: var(--header-h);
}

.header-tools {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  margin-left: auto;
}

.lang-switch {
  display: inline-flex;
  padding: 2px;
  border: 1px solid var(--rule);
  border-radius: 999px;
  background: var(--white);
}

.lang-switch button {
  appearance: none;
  border: none;
  background: transparent;
  font: inherit;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  padding: 0.32rem 0.55rem;
  border-radius: 999px;
  color: var(--stone);
  cursor: pointer;
}

.lang-switch button.is-active {
  background: var(--teal);
  color: var(--white);
}

body.theme-cours .lang-switch button.is-active {
  background: #8a3e24;
}

.logo-link {
  display: flex;
  align-items: center;
  flex-shrink: 0;
  text-decoration: none;
  line-height: 0;
}

.contact-links {
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.contact-links a {
  width: 2rem;
  height: 2rem;
  display: grid;
  place-items: center;
  border-radius: 999px;
  border: 1px solid var(--rule);
  color: var(--ink);
  background: var(--white);
}

.contact-links a:hover {
  color: var(--teal);
  border-color: var(--teal);
}

.contact-links svg {
  width: 1rem;
  height: 1rem;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* Logo vectoriel officiel (symbole + bukalab, sans baseline sous le header) */
.logo-img {
  display: block;
  height: 3.35rem;
  width: auto;
  max-width: min(14.5rem, 42vw);
}

@media (min-width: 768px) {
  .logo-img {
    height: 3.85rem;
    max-width: 16.5rem;
  }
}

.site-nav {
  display: flex;
  gap: 0.25rem;
  flex-wrap: wrap;
  margin-right: auto;
}

.nav-btn {
  appearance: none;
  border: none;
  background: transparent;
  font: inherit;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--stone);
  padding: 0.5rem 0.85rem;
  border-radius: 6px;
  cursor: pointer;
  transition: color 0.15s, background 0.15s;
}

.nav-btn:hover {
  color: var(--ink);
  background: var(--mist);
}

.nav-btn.is-active {
  color: var(--teal);
  background: rgba(30, 91, 99, 0.08);
}

/* Panels */
.panel {
  display: none;
  animation: fade 0.25s ease;
}

.panel.is-active {
  display: block;
}

@keyframes fade {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

.wrap {
  max-width: 72rem;
  margin: 0 auto;
  padding: 2rem 1.25rem 4rem;
}

/* Accueil */
.hero {
  padding: 2.5rem 0 2rem;
}

.hero-title {
  margin: 0 0 1.35rem;
  max-width: 100%;
  line-height: 1.05;
}

.hero-main {
  display: block;
  font-size: clamp(1.55rem, 3.5vw, 2.55rem);
  font-weight: 700;
  letter-spacing: -0.035em;
  line-height: 1.15;
  white-space: nowrap;
  color: var(--ink);
}

.hero-domains {
  display: block;
  margin-top: 0.45rem;
  font-size: clamp(1.2rem, 2.3vw, 1.55rem);
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.3;
  color: var(--teal);
}

.hero-aside {
  margin: 0.9rem 0 0;
  color: var(--stone);
  font-size: 0.98rem;
}

.hero-aside button {
  appearance: none;
  border: none;
  background: none;
  padding: 0;
  font: inherit;
  color: var(--teal);
  font-weight: 600;
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.hero-aside button:hover {
  color: var(--lagoon);
}

.hero-next {
  margin: 0 0 1.75rem;
  padding: 0.15rem 0 0.15rem 0.95rem;
  border-left: 2px solid var(--teal);
}

.hero-next p {
  margin: 0 0 0.3rem;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--lagoon);
}

.hero-next ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

.hero-next li {
  font-size: 1.05rem;
  line-height: 1.45;
  color: var(--ink);
}

@media (max-width: 720px) {
  .hero-main {
    white-space: normal;
  }
}

.hero-lead {
  font-size: 1.1rem;
  color: var(--stone);
  max-width: 42rem;
  margin: 0 0 1.5rem;
}

.btn-primary {
  display: inline-block;
  background: var(--teal);
  color: var(--white) !important;
  font-weight: 600;
  padding: 0.65rem 1.25rem;
  border-radius: 8px;
  text-decoration: none;
  border: none;
  cursor: pointer;
  font-size: 1rem;
}

.btn-primary:hover {
  background: var(--teal-dark);
  color: var(--white) !important;
}

.hero-band {
  margin-top: 3rem;
  padding: 2rem;
  background: linear-gradient(135deg, var(--teal) 0%, var(--teal-dark) 100%);
  border-radius: 12px;
  color: var(--sand);
}

.hero-band p {
  margin: 0;
  font-size: 1.05rem;
  max-width: 40rem;
}

.hero-map-teaser {
  display: block;
  width: 100%;
  margin: 2rem 0 1.5rem;
  padding: 0;
  border: 1px solid var(--rule);
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 8px 32px rgba(21, 33, 43, 0.08);
  text-align: left;
  color: inherit;
  background: var(--white);
  cursor: pointer;
  transition: border-color 0.15s, box-shadow 0.2s, transform 0.2s;
}

.hero-map-teaser:hover {
  border-color: var(--lagoon);
  box-shadow: 0 14px 44px rgba(30, 91, 99, 0.14);
  transform: translateY(-2px);
}

.hero-map-frame {
  position: relative;
  display: block;
  background: var(--mist);
}

.hero-map-teaser img {
  width: 100%;
  height: auto;
  display: block;
  vertical-align: middle;
}

.hero-map-badge {
  position: absolute;
  right: 0.85rem;
  bottom: 0.85rem;
  padding: 0.4rem 0.8rem;
  border-radius: 999px;
  background: rgba(21, 33, 43, 0.82);
  color: var(--white);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  opacity: 0;
  transform: translateY(4px);
  transition: opacity 0.2s, transform 0.2s;
}

.hero-map-teaser:hover .hero-map-badge,
.hero-map-teaser:focus-visible .hero-map-badge {
  opacity: 1;
  transform: translateY(0);
}

.hero-map-caption {
  display: block;
  padding: 0.7rem 1rem;
  font-size: 0.88rem;
  color: var(--stone);
  background: var(--white);
  border-top: 1px solid var(--rule);
}

/* ------------------------------------------------------------------ */
/* Cartographie — galerie                                              */
/* ------------------------------------------------------------------ */
.carto-intro {
  margin-bottom: 2rem;
}

.carto-eyebrow {
  margin: 0 0 0.35rem;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--lagoon);
}

.carto-intro h1 {
  margin: 0 0 0.6rem;
  font-size: clamp(1.5rem, 3.2vw, 2rem);
  line-height: 1.2;
}

.carto-lead {
  margin: 0;
  color: var(--stone);
  max-width: 46rem;
}

.carto-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem 1rem;
  margin-top: 1.5rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--rule);
}

.carto-toolbar[hidden] {
  display: none;
}

.search-field input {
  font: inherit;
  font-size: 0.92rem;
  padding: 0.5rem 0.85rem;
  min-width: min(22rem, 70vw);
  border: 1px solid var(--rule);
  border-radius: 8px;
  background: var(--white);
  color: var(--ink);
}

.search-field input:focus {
  outline: 2px solid rgba(58, 143, 160, 0.4);
  outline-offset: 1px;
  border-color: var(--lagoon);
}

.chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}

.chip {
  appearance: none;
  font: inherit;
  font-size: 0.82rem;
  font-weight: 600;
  padding: 0.35rem 0.75rem;
  border: 1px solid var(--rule);
  border-radius: 999px;
  background: var(--white);
  color: var(--stone);
  cursor: pointer;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
}

.chip:hover {
  border-color: var(--lagoon);
  color: var(--ink);
}

.chip.is-active {
  background: var(--teal);
  border-color: var(--teal);
  color: var(--white);
}

.carto-count {
  margin: 0 0 0 auto;
  font-size: 0.85rem;
  color: var(--stone);
}

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

.carto-card {
  position: relative;
  display: flex;
  flex-direction: column;
  background: var(--white);
  border: 1px solid var(--rule);
  border-radius: 14px;
  overflow: hidden;
  transition: border-color 0.15s, box-shadow 0.2s, transform 0.2s;
}

.carto-card:hover,
.carto-card:focus-within {
  border-color: var(--lagoon);
  box-shadow: 0 14px 40px rgba(30, 91, 99, 0.14);
  transform: translateY(-3px);
}

/* Le titre porte le clic et couvre toute la carte */
.carto-card-link {
  appearance: none;
  border: none;
  background: none;
  padding: 0;
  font: inherit;
  color: inherit;
  text-align: left;
  cursor: pointer;
}

.carto-card-link::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
}

.carto-card-link:hover {
  color: var(--teal);
}

.carto-card-figure {
  position: relative;
  background: var(--mist);
  aspect-ratio: 1.414 / 1;
  overflow: hidden;
}

.carto-card-figure img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.35s ease;
}

.carto-card:hover .carto-card-figure img {
  transform: scale(1.03);
}

.carto-card-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(21, 33, 43, 0.45);
  opacity: 0;
  transition: opacity 0.2s;
}

.carto-card:hover .carto-card-overlay,
.carto-card:focus-within .carto-card-overlay {
  opacity: 1;
}

.carto-card-overlay span {
  padding: 0.45rem 0.95rem;
  border-radius: 999px;
  background: var(--white);
  color: var(--teal);
  font-size: 0.85rem;
  font-weight: 700;
}

.carto-card-body {
  padding: 1rem 1.1rem 1.15rem;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  flex: 1;
}

.carto-card-body h2 {
  margin: 0;
  font-size: 1.02rem;
  line-height: 1.35;
  font-weight: 600;
}

.carto-card-body p {
  margin: 0;
  font-size: 0.86rem;
  color: var(--stone);
}

.carto-card-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem;
  margin-top: auto;
  padding-top: 0.5rem;
}

.carto-card-tags span {
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: var(--teal);
  background: rgba(30, 91, 99, 0.08);
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
}

.carto-empty {
  margin: 2rem 0 0;
  color: var(--stone);
}

/* ------------------------------------------------------------------ */
/* Visionneuse plein écran                                             */
/* ------------------------------------------------------------------ */
.viewer {
  position: fixed;
  inset: 0;
  z-index: 300;
  display: flex;
}

.viewer[hidden] {
  display: none;
}

.viewer-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(10, 16, 21, 0.9);
  backdrop-filter: blur(3px);
  border: none;
  animation: fade 0.2s ease;
}

.viewer-shell {
  position: relative;
  display: grid;
  grid-template-rows: auto 1fr auto;
  width: 100%;
  height: 100%;
  animation: viewer-in 0.22s ease;
}

@keyframes viewer-in {
  from {
    opacity: 0;
    transform: scale(0.985);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

.viewer-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 0.75rem 1.25rem;
  padding: 0.85rem 1.25rem;
  background: rgba(21, 33, 43, 0.72);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  color: var(--white);
}

.viewer-meta {
  min-width: 0;
}

.viewer-eyebrow {
  margin: 0 0 0.15rem;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #9fd0d8;
}

.viewer-bar h2 {
  margin: 0;
  font-size: clamp(0.98rem, 1.8vw, 1.2rem);
  line-height: 1.3;
  font-weight: 600;
}

.viewer-sub {
  margin: 0.2rem 0 0;
  font-size: 0.84rem;
  color: rgba(239, 232, 220, 0.72);
}

.viewer-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
}

.format-switch {
  display: inline-flex;
  padding: 3px;
  background: rgba(255, 255, 255, 0.12);
  border-radius: 8px;
}

.format-btn {
  appearance: none;
  border: none;
  background: transparent;
  font: inherit;
  font-size: 0.85rem;
  font-weight: 600;
  padding: 0.4rem 0.9rem;
  border-radius: 6px;
  cursor: pointer;
  color: rgba(255, 255, 255, 0.78);
  transition: background 0.15s, color 0.15s;
}

.format-btn.is-active {
  background: var(--white);
  color: var(--teal);
}

.format-btn:hover:not(.is-active) {
  color: var(--white);
}

.zoom-tools {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
}

.zoom-tools[hidden] {
  display: none;
}

.zoom-level {
  min-width: 3.6rem;
  text-align: center;
  font-size: 0.8rem;
  font-variant-numeric: tabular-nums;
  color: rgba(239, 232, 220, 0.75);
}

.tool-btn {
  appearance: none;
  border: 1px solid rgba(255, 255, 255, 0.22);
  background: rgba(255, 255, 255, 0.06);
  font: inherit;
  font-size: 0.85rem;
  padding: 0.4rem 0.8rem;
  border-radius: 6px;
  cursor: pointer;
  color: var(--white);
  text-decoration: none;
  line-height: 1.2;
  transition: background 0.15s, border-color 0.15s;
}

.tool-btn:hover {
  background: rgba(255, 255, 255, 0.16);
  border-color: rgba(255, 255, 255, 0.4);
  color: var(--white);
}

.tool-btn-icon {
  min-width: 2.1rem;
  font-size: 1.05rem;
  padding: 0.3rem 0.5rem;
}

.tool-btn-download {
  font-weight: 600;
  border-color: #9fd0d8;
  color: #d8eef1;
}

.tool-btn-close {
  font-size: 0.95rem;
  min-width: 2.4rem;
}

.viewer-stage {
  position: relative;
  overflow: hidden;
  min-height: 0;
}

.viewer-canvas {
  position: absolute;
  inset: 0;
  overflow: hidden;
  cursor: grab;
  touch-action: none;
}

.viewer-canvas.is-panning {
  cursor: grabbing;
}

.viewer-canvas[hidden] {
  display: none;
}

.viewer-image {
  position: absolute;
  top: 0;
  left: 0;
  width: auto;
  height: auto;
  max-width: none;
  transform-origin: 0 0;
  image-rendering: auto;
  user-select: none;
  -webkit-user-drag: none;
  background: var(--white);
  box-shadow: 0 10px 50px rgba(0, 0, 0, 0.45);
  opacity: 0;
  transition: opacity 0.2s ease;
}

.viewer-image.is-ready {
  opacity: 1;
}

.viewer-pdf {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: none;
  background: #525659;
}

.viewer-pdf[hidden] {
  display: none;
}

.viewer-spinner {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  pointer-events: none;
}

.viewer-spinner span {
  display: block;
  width: 2.2rem;
  height: 2.2rem;
  border: 3px solid rgba(255, 255, 255, 0.25);
  border-top-color: #9fd0d8;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.viewer-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 3;
  appearance: none;
  width: 2.9rem;
  height: 2.9rem;
  display: grid;
  place-items: center;
  font-size: 1.8rem;
  line-height: 1;
  padding-bottom: 0.2rem;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 50%;
  background: rgba(21, 33, 43, 0.72);
  color: var(--white);
  cursor: pointer;
  transition: background 0.15s, opacity 0.15s;
}

.viewer-arrow:hover {
  background: var(--teal);
}

.viewer-arrow[hidden] {
  display: none;
}

.viewer-arrow--prev {
  left: 0.9rem;
}

.viewer-arrow--next {
  right: 0.9rem;
}

.viewer-foot {
  padding: 0.65rem 1.25rem 0.9rem;
  background: rgba(21, 33, 43, 0.72);
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.viewer-strip {
  display: flex;
  gap: 0.5rem;
  overflow-x: auto;
  padding-bottom: 0.35rem;
  scrollbar-width: thin;
}

.viewer-strip[hidden] {
  display: none;
}

.strip-thumb {
  appearance: none;
  flex: 0 0 auto;
  width: 6.5rem;
  padding: 0;
  border: 2px solid transparent;
  border-radius: 7px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.08);
  cursor: pointer;
  opacity: 0.6;
  transition: opacity 0.15s, border-color 0.15s;
}

.strip-thumb img {
  display: block;
  width: 100%;
  aspect-ratio: 1.414 / 1;
  object-fit: cover;
}

.strip-thumb:hover {
  opacity: 0.9;
}

.strip-thumb.is-active {
  opacity: 1;
  border-color: #9fd0d8;
}

.viewer-hint {
  margin: 0.4rem 0 0;
  font-size: 0.76rem;
  color: rgba(239, 232, 220, 0.6);
}

.viewer-hint kbd {
  font-family: inherit;
  font-size: 0.72rem;
  padding: 0.05rem 0.3rem;
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 4px;
}

@media (max-width: 720px) {
  .viewer-bar {
    align-items: flex-start;
  }

  .viewer-sub,
  .viewer-hint {
    display: none;
  }

  .viewer-arrow {
    width: 2.4rem;
    height: 2.4rem;
    font-size: 1.4rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}

/* Cours — feuille d'exercices, pas la charte des cartes */
body.theme-cours {
  background: #f4efe4;
}

body.theme-cours .site-header {
  background: #f4efe4;
  border-bottom-color: #e3d7c4;
}

body.theme-cours .nav-btn.is-active {
  color: #8a3e24;
  background: rgba(184, 92, 56, 0.12);
}

body.theme-cours .site-footer {
  background: #f4efe4;
  border-top-color: #e3d7c4;
}

.panel-cours {
  position: relative;
}

.cours-sheet {
  position: relative;
  overflow: hidden;
  background-image: radial-gradient(rgba(36, 44, 58, 0.16) 1px, transparent 1px);
  background-size: 22px 22px;
  background-position: 0 12px;
}

.cours {
  position: relative;
  max-width: 72rem;
  padding-top: 1.75rem;
  padding-left: 1.25rem;
}

.cours-layout {
  display: grid;
  grid-template-columns: minmax(0, 34rem) minmax(22rem, 31rem);
  gap: 2.5rem 3rem;
  align-items: start;
  justify-content: start;
}

.cours-copy {
  min-width: 0;
}

.cours-kicker {
  margin: 0 0 0.4rem;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #c46a45;
}

.cours h1 {
  margin: 0 0 0.8rem;
  max-width: 16ch;
  font-size: clamp(1.8rem, 4vw, 2.6rem);
  line-height: 1.12;
  letter-spacing: -0.03em;
}

.cours-lead {
  margin: 0 0 2rem;
  max-width: 38rem;
  font-size: 1.08rem;
  color: #3c4654;
}

.cours a {
  color: #8a3e24;
}

.cours-board {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.85rem;
}

.cours-board > li {
  display: flex;
  gap: 0.85rem;
  align-items: flex-start;
  margin: 0;
  padding: 0.95rem 1rem;
  background: rgba(255, 252, 247, 0.88);
  border: 1px solid #e4d5c0;
  border-radius: 12px;
}

.cours-board ul {
  margin: 0.35rem 0 0;
  padding-left: 1.05rem;
}

.cours-board ul li {
  margin: 0;
  padding: 0;
  font-size: 0.88rem;
  line-height: 1.45;
  color: #5c6570;
  background: none;
  border: none;
}

.cours-board h2 {
  margin: 0 0 0.2rem;
  font-size: 1.02rem;
  color: #24303f;
}

.cours-board p {
  margin: 0;
  font-size: 0.92rem;
  color: #5c6570;
}

.cours-fig {
  flex: 0 0 3.4rem;
  height: 2.4rem;
  display: grid;
  place-items: center;
}

.cours-fig svg {
  width: 3.2rem;
  height: 2rem;
}

.cours-fig rect,
.cours-fig circle {
  fill: none;
  stroke: #24303f;
  stroke-width: 1.6;
}

.cours-fig path {
  fill: none;
  stroke: #c46a45;
  stroke-width: 1.8;
  stroke-linecap: round;
}

.cours-note {
  margin: 1.5rem 0 0;
  max-width: 34rem;
  font-size: 0.95rem;
  color: #5c6570;
}

.cours-lab {
  margin: 0;
  padding: 1.1rem 1.15rem 1rem;
  background: rgba(255, 252, 247, 0.96);
  border: 1px solid #e4d5c0;
  border-radius: 16px;
  box-shadow: 0 18px 40px -28px rgba(36, 48, 63, 0.45);
  position: sticky;
  top: calc(var(--header-h) + 1rem);
}

/* Le labo : une expérience par chapitre */
.lab-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.2rem 1rem;
  margin-bottom: 0.7rem;
}

.lab-kicker {
  margin: 0;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #c46a45;
}

.lab-intro {
  margin: 0;
  font-size: 0.82rem;
  color: #5c6570;
}

.lab-tabs {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.25rem;
  padding: 0.25rem;
  background: #f1e8da;
  border-radius: 11px;
}

.lab-tab {
  appearance: none;
  border: 0;
  background: transparent;
  font: inherit;
  font-size: 0.84rem;
  font-weight: 600;
  color: #5c6570;
  padding: 0.45rem 0.3rem;
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.15s, color 0.15s, box-shadow 0.15s;
}

.lab-tab:hover {
  color: #24303f;
}

.lab-tab[aria-selected="true"] {
  background: #fffcf7;
  color: #8a3e24;
  box-shadow: 0 1px 3px rgba(36, 48, 63, 0.14);
}

.lab-title {
  margin: 0.95rem 0 0.45rem;
  font-size: 1.12rem;
  line-height: 1.25;
  color: #24303f;
}

.lab-svg {
  display: block;
  width: 100%;
  height: auto;
  margin: 0.2rem 0 0.1rem;
}

.lab-svg text {
  font-family: var(--font);
  font-size: 11px;
  fill: #5c6570;
}

.lab-svg .lab-tag {
  font-size: 11.5px;
  font-weight: 700;
}

.lab-axis {
  stroke: #24303f;
  stroke-width: 1;
  opacity: 0.4;
}

.lab-dot {
  transition: fill 0.45s, stroke 0.45s, r 0.45s;
  stroke-width: 1.3;
}

.ci {
  opacity: 0;
  transition: opacity 0.25s;
}

.ci.on {
  opacity: 1;
}

.lab-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 0.9rem;
  margin: 0.35rem 0 0;
  font-size: 0.76rem;
  color: #5c6570;
}

.lab-legend span {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.lab-legend i {
  display: inline-block;
  width: 0.7rem;
  height: 0.7rem;
  border-radius: 50%;
  border: 1.5px solid transparent;
}

.lab-legend b {
  font-variant-numeric: tabular-nums;
  color: #24303f;
}

.lab-read {
  margin: 0.7rem 0 0.15rem;
  font-size: 0.93rem;
  font-weight: 650;
  font-variant-numeric: tabular-nums;
  color: #24303f;
}

.lab-read--big {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.15rem 0.45rem;
  font-weight: 500;
  color: #3c4654;
}

.lab-big {
  font-size: 1.9rem;
  line-height: 1;
  font-weight: 750;
  letter-spacing: -0.02em;
  color: #c46a45;
}

.lab-sub,
.lab-hint,
.lab-note {
  margin: 0.2rem 0 0;
  font-size: 0.83rem;
  line-height: 1.45;
  color: #5c6570;
}

.lab-note {
  margin-top: 0.6rem;
  font-size: 0.75rem;
  opacity: 0.85;
}

.lab-controls {
  display: grid;
  gap: 0.7rem;
  margin-top: 0.85rem;
  padding-top: 0.85rem;
  border-top: 1px dashed #e4d5c0;
}

.lab-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.lab-slider {
  display: grid;
  gap: 0.2rem;
  font-size: 0.82rem;
  color: #3c4654;
}

.lab-slider strong {
  color: #8a3e24;
  font-variant-numeric: tabular-nums;
}

.lab-slider input[type="range"] {
  width: 100%;
  accent-color: #c46a45;
}

.lab-check {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  font-size: 0.82rem;
  color: #3c4654;
  cursor: pointer;
}

.lab-check input {
  accent-color: #1e5b63;
}

.lab-field {
  display: grid;
  gap: 0.3rem;
}

.lab-field-label {
  font-size: 0.82rem;
  color: #3c4654;
}

.lab-seg {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 0.2rem;
  padding: 0.2rem;
  background: #f1e8da;
  border-radius: 9px;
  justify-self: start;
}

.lab-pane > .lab-seg {
  margin-bottom: 0.2rem;
}

.lab-seg button {
  appearance: none;
  border: 0;
  background: transparent;
  font: inherit;
  font-size: 0.8rem;
  font-weight: 600;
  color: #5c6570;
  padding: 0.32rem 0.7rem;
  border-radius: 7px;
  cursor: pointer;
}

.lab-seg button[aria-pressed="true"] {
  background: #24303f;
  color: #fffcf7;
}

.lab-btn {
  appearance: none;
  font: inherit;
  font-size: 0.82rem;
  font-weight: 600;
  padding: 0.45rem 0.85rem;
  border-radius: 8px;
  border: 1px solid #c46a45;
  background: transparent;
  color: #8a3e24;
  cursor: pointer;
  transition: background 0.15s;
}

.lab-btn:hover {
  background: rgba(196, 106, 69, 0.1);
}

.lab-btn--solid {
  background: #c46a45;
  color: #fffcf7;
}

.lab-btn--solid:hover {
  background: #b25a37;
}

/* les cartes du programme ouvrent l'expérience correspondante */
.cours-board > li[data-lab] {
  cursor: pointer;
  transition: border-color 0.15s, box-shadow 0.15s, transform 0.15s;
}

.cours-board > li[data-lab]:hover {
  border-color: #d9a88f;
  transform: translateY(-1px);
}

.cours-board > li.is-lab {
  border-color: #c46a45;
  box-shadow: 0 0 0 3px rgba(196, 106, 69, 0.14);
}

.cours-board > li[data-lab]:focus-visible {
  outline: 2px solid #c46a45;
  outline-offset: 2px;
}

.cours-lab figcaption {
  margin: 0 0 0.35rem;
  font-size: 0.82rem;
  font-weight: 600;
  color: #24303f;
}

#gauss-plot {
  display: block;
  width: 100%;
  height: auto;
}

.gauss-axis {
  stroke: #24303f;
  stroke-width: 1.2;
  opacity: 0.45;
}

#gauss-ghost {
  fill: none;
  stroke: #b7aea2;
  stroke-width: 1.6;
  stroke-dasharray: 4 4;
}

#gauss-curve {
  fill: rgba(196, 106, 69, 0.12);
  stroke: #c46a45;
  stroke-width: 2.4;
  stroke-linejoin: round;
  stroke-linecap: round;
}

#gauss-mean {
  stroke: #24303f;
  stroke-width: 1.2;
  stroke-dasharray: 3 3;
}

.cours-sliders {
  display: grid;
  gap: 0.65rem;
  margin-top: 0.35rem;
}

.cours-sliders label {
  display: grid;
  gap: 0.25rem;
  font-size: 0.84rem;
  color: #3c4654;
}

.cours-sliders input[type="range"] {
  width: 100%;
  accent-color: #c46a45;
}

.cours-readout {
  margin: 0.55rem 0 0.15rem;
  font-variant-numeric: tabular-nums;
  font-size: 0.92rem;
  font-weight: 600;
  color: #8a3e24;
}

@media (max-width: 860px) {
  .cours-layout {
    grid-template-columns: 1fr;
  }

  .cours-lab {
    position: static;
    scroll-margin-top: calc(var(--header-h) + 0.5rem);
  }
}

@media (max-width: 640px) {
  .cours-board {
    grid-template-columns: 1fr;
  }

  .header-tools {
    gap: 0.45rem;
  }

  .contact-links a {
    width: 1.75rem;
    height: 1.75rem;
  }
}

/* À propos + CV */
.about-intro {
  max-width: none;
}

.about-intro h1 {
  margin: 0;
  font-size: clamp(1.7rem, 3vw, 2.2rem);
  letter-spacing: -0.03em;
  line-height: 1.15;
}

.about-role {
  margin: 0.35rem 0 0.9rem;
  font-weight: 600;
  color: var(--teal);
}

.about-copy {
  margin: 0 0 0.95rem;
}

.about-intro h2 {
  margin: 1.4rem 0 0.4rem;
  font-size: 1rem;
  color: var(--teal);
}

.about-intro .cours-kicker {
  color: var(--lagoon);
}

.cv-block {
  margin-top: 2.4rem;
  padding: 1.15rem 1.15rem 1.25rem;
  background: #f3f6f7;
  border: 1px solid var(--rule);
  border-radius: 16px;
}

.cv-toolbar {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 0.85rem;
}

.cv-toolbar h2 {
  margin: 0;
  font-size: 1.05rem;
}

.cv-hint {
  margin: 0.2rem 0 0;
  font-size: 0.85rem;
  color: var(--stone);
}

.cv-switch {
  display: inline-flex;
  padding: 3px;
  border: 1px solid var(--rule);
  border-radius: 999px;
  background: var(--white);
  flex-shrink: 0;
}

.cv-switch button {
  appearance: none;
  border: none;
  background: transparent;
  font: inherit;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  padding: 0.35rem 0.75rem;
  border-radius: 999px;
  color: var(--stone);
  cursor: pointer;
}

.cv-switch button.is-active {
  background: var(--ink);
  color: var(--white);
}

.cv-spread {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.85rem;
  align-items: start;
}

.cv-spread button {
  appearance: none;
  padding: 0;
  border: 1px solid var(--rule);
  border-radius: 10px;
  overflow: hidden;
  background: var(--white);
  cursor: zoom-in;
  box-shadow: 0 10px 32px rgba(21, 33, 43, 0.08);
}

.cv-spread button:hover {
  border-color: var(--lagoon);
}

.cv-spread img {
  display: block;
  width: 100%;
  height: auto;
}

.cv-zoom {
  position: fixed;
  inset: 0;
  z-index: 400;
  overflow: auto;
  background: rgba(15, 20, 26, 0.82);
}

.cv-zoom[hidden] {
  display: none;
}

.cv-zoom-stage {
  box-sizing: border-box;
  min-height: 100%;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  padding: 3.25rem 1rem 2.5rem;
  cursor: zoom-out;
}

.cv-zoom img {
  width: min(48rem, 100%);
  height: auto;
  background: white;
  box-shadow: 0 16px 60px rgba(0, 0, 0, 0.4);
  cursor: default;
}

.cv-zoom-close {
  position: absolute;
  top: 0.8rem;
  right: 0.8rem;
  z-index: 1;
  width: 2.4rem;
  height: 2.4rem;
  border: 1px solid rgba(255, 255, 255, 0.35);
  border-radius: 999px;
  background: rgba(21, 33, 43, 0.7);
  color: white;
  cursor: pointer;
}

@media (max-width: 800px) {
  .cv-spread {
    grid-template-columns: 1fr;
  }
}

/* À propos */
.about-grid {
  display: grid;
  gap: 1.5rem;
  max-width: 40rem;
}

.about-grid h2 {
  font-size: 1.15rem;
  color: var(--teal);
  margin: 0 0 0.5rem;
}

/* Footer */
.site-footer {
  border-top: 1px solid var(--rule);
  padding: 1.5rem 1.25rem;
  text-align: center;
  font-size: 0.82rem;
  letter-spacing: 0.03em;
  line-height: 1.6;
  color: var(--stone);
}

.site-footer strong {
  color: var(--teal);
}

.site-footer .contact-links {
  justify-content: center;
  margin-bottom: 0.65rem;
}

.site-footer p {
  margin: 0.2rem 0;
}

.about-grid .contact-links {
  margin-top: 0.75rem;
}

/* ------------------------------------------------------------------ */
/* Vidéos — lecture silencieuse dans la page + grand format            */
/* ------------------------------------------------------------------ */
:root {
  --night: #0c1a2c;
  --night-2: #12243a;
  --ember: #ef8a2e;
  --serif: "Palatino Linotype", Palatino, "Book Antiqua", Georgia, serif;
  /* Palette des décennies de « Mémoire du feu » (1970 → 2020) */
  --decades: linear-gradient(90deg, #4a68d8 0%, #9a46bd 22%, #d0437c 42%, #e2552f 62%, #ef8a2e 80%, #f2c64a 100%);
}

.home-films {
  margin: 3.25rem 0 0.5rem;
}

.home-films-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1rem;
}

.home-films-head h2 {
  margin: 0;
  font-size: clamp(1.25rem, 2.3vw, 1.55rem);
  letter-spacing: -0.02em;
  line-height: 1.2;
}

.home-films-link {
  appearance: none;
  border: none;
  background: none;
  padding: 0.2rem 0;
  font: inherit;
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--teal);
  cursor: pointer;
  white-space: nowrap;
}

.home-films-link::after {
  content: " →";
  display: inline-block;
  margin-left: 0.25rem;
  transition: transform 0.2s;
}

.home-films-link:hover {
  color: var(--lagoon);
}

.home-films-link:hover::after {
  transform: translateX(3px);
}

.film-list {
  display: grid;
  gap: 2.5rem;
}

/* Carte vidéo : une petite salle de projection dans la page blanche */
.film {
  margin: 0;
  border-radius: 14px;
  overflow: hidden;
  background: var(--night);
  color: var(--sand);
  box-shadow: 0 10px 40px rgba(12, 26, 44, 0.16);
  transition: box-shadow 0.25s;
}

.film:hover {
  box-shadow: 0 18px 54px rgba(12, 26, 44, 0.26);
}

.film-frame {
  position: relative;
  width: 100%;
  background: var(--night);
  overflow: hidden;
}

.film-video {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  background: var(--night);
}

.film-open {
  position: absolute;
  inset: 0;
  z-index: 1;
  appearance: none;
  border: none;
  padding: 0;
  margin: 0;
  background: linear-gradient(180deg, rgba(12, 26, 44, 0) 70%, rgba(12, 26, 44, 0.5) 100%);
  cursor: zoom-in;
}

.film-open:focus-visible {
  outline: 2px solid #9fd0d8;
  outline-offset: -4px;
}

.film-badge {
  position: absolute;
  bottom: 0.95rem;
  right: 0.9rem;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.42rem 0.8rem 0.42rem 0.65rem;
  border-radius: 999px;
  background: rgba(12, 26, 44, 0.72);
  backdrop-filter: blur(6px);
  border: 1px solid rgba(239, 232, 220, 0.18);
  color: var(--sand);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  opacity: 0;
  transform: translateY(4px);
  transition: opacity 0.2s, transform 0.2s;
}

.film-badge svg {
  width: 0.95rem;
  height: 0.95rem;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.film-frame:hover .film-badge,
.film-open:focus-visible .film-badge {
  opacity: 1;
  transform: translateY(0);
}

.film-controls {
  position: absolute;
  left: 0.8rem;
  bottom: 0.95rem;
  z-index: 2;
  display: flex;
  align-items: center;
  gap: 0.35rem;
  opacity: 0;
  transform: translateY(4px);
  transition: opacity 0.2s, transform 0.2s;
}

.film-frame:hover .film-controls,
.film-frame:focus-within .film-controls,
.film:not(.is-playing) .film-controls {
  opacity: 1;
  transform: translateY(0);
}

@media (hover: none) {
  .film-controls,
  .film-badge {
    opacity: 1;
    transform: none;
  }
}

.film-ctl {
  appearance: none;
  width: 2.1rem;
  height: 2.1rem;
  display: grid;
  place-items: center;
  padding: 0;
  border-radius: 999px;
  border: 1px solid rgba(239, 232, 220, 0.2);
  background: rgba(12, 26, 44, 0.72);
  backdrop-filter: blur(6px);
  color: var(--sand);
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s;
}

.film-ctl:hover {
  background: var(--teal);
  border-color: rgba(239, 232, 220, 0.4);
}

.film-ctl svg {
  width: 1.05rem;
  height: 1.05rem;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
}

.film-ctl svg .fill {
  fill: currentColor;
  stroke: none;
}

.film-time {
  margin-left: 0.3rem;
  font-size: 0.76rem;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.02em;
  color: rgba(239, 232, 220, 0.85);
  text-shadow: 0 1px 6px rgba(0, 0, 0, 0.5);
}

/* Fil de lecture aux couleurs des décennies, avec repères de chapitres */
.film-progress {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 2;
  height: 3px;
  background: rgba(239, 232, 220, 0.14);
  pointer-events: none;
}

.film-progress-fill {
  position: absolute;
  inset: 0;
  background: var(--decades);
  clip-path: inset(0 100% 0 0);
}

.film-progress i {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 2px;
  margin-left: -1px;
  background: var(--night);
}

.film-caption {
  padding: 1rem 1.2rem 1.15rem;
  border-top: 1px solid rgba(239, 232, 220, 0.08);
}

.film-eyebrow {
  margin: 0 0 0.2rem;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ember);
}

.film-title {
  margin: 0;
  font-family: var(--serif);
  font-size: clamp(1.3rem, 2.4vw, 1.65rem);
  font-weight: 400;
  letter-spacing: -0.005em;
  line-height: 1.2;
  color: #f6f1e8;
}

.film-sub {
  margin: 0.25rem 0 0;
  font-size: 0.88rem;
  color: rgba(239, 232, 220, 0.68);
}

/* Version « vedette » (onglet Vidéos) */
.film--feature .film-caption {
  padding: 1.4rem 1.5rem 1.6rem;
}

.film--feature .film-title {
  font-size: clamp(1.6rem, 3.2vw, 2.15rem);
}

.film-details {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.35fr);
  gap: 1.5rem 2.5rem;
  margin-top: 1.25rem;
  padding-top: 1.25rem;
  border-top: 1px solid rgba(239, 232, 220, 0.1);
}

.film-desc {
  margin: 0;
  font-size: 0.96rem;
  line-height: 1.65;
  color: rgba(246, 241, 232, 0.86);
}

.film-sources {
  margin: 0.9rem 0 0;
  font-size: 0.78rem;
  color: rgba(239, 232, 220, 0.5);
}

.film-chapters-title {
  margin: 0 0 0.6rem;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #9fd0d8;
}

.film-chapters {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 0.6rem;
}

.film-chapter {
  appearance: none;
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  width: 100%;
  padding: 0;
  border: none;
  background: none;
  font: inherit;
  text-align: left;
  color: inherit;
  cursor: pointer;
}

.film-chapter-thumb {
  position: relative;
  display: block;
  aspect-ratio: 16 / 9;
  border-radius: 6px;
  overflow: hidden;
  background: var(--night-2);
  outline: 1px solid rgba(239, 232, 220, 0.1);
  transition: outline-color 0.15s;
}

.film-chapter-thumb img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.8;
  transition: opacity 0.2s, transform 0.35s;
}

.film-chapter:hover .film-chapter-thumb img,
.film-chapter.is-active .film-chapter-thumb img {
  opacity: 1;
  transform: scale(1.04);
}

.film-chapter:hover .film-chapter-thumb,
.film-chapter:focus-visible .film-chapter-thumb {
  outline-color: rgba(239, 232, 220, 0.45);
}

.film-chapter:focus-visible {
  outline: none;
}

.film-chapter-text {
  display: grid;
  grid-template-columns: auto 1fr;
  column-gap: 0.4rem;
  font-size: 0.8rem;
  line-height: 1.3;
}

.film-chapter-num {
  grid-row: span 2;
  font-family: var(--serif);
  font-size: 1.05rem;
  line-height: 1.05;
  color: var(--ember);
}

.film-chapter-label {
  font-weight: 600;
  color: rgba(246, 241, 232, 0.9);
}

.film-chapter-time {
  font-size: 0.72rem;
  font-variant-numeric: tabular-nums;
  color: rgba(239, 232, 220, 0.5);
}

@media (max-width: 860px) {
  .film-details {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .film-chapters {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .home-films-head {
    align-items: flex-start;
    flex-direction: column;
    gap: 0.35rem;
  }
}

/* Visionneuse vidéo plein écran */
.film-viewer {
  position: fixed;
  inset: 0;
  z-index: 300;
  display: flex;
}

.film-viewer[hidden] {
  display: none;
}

.film-viewer-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(7, 15, 26, 0.94);
  backdrop-filter: blur(4px);
  animation: fade 0.2s ease;
}

.film-viewer-shell {
  position: relative;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  width: 100%;
  height: 100%;
  animation: viewer-in 0.22s ease;
}

.film-viewer-bar {
  background: rgba(12, 26, 44, 0.75);
}

.film-viewer-bar h2 {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(1.1rem, 2vw, 1.4rem);
}

.film-viewer-bar .viewer-eyebrow {
  color: var(--ember);
}

.film-viewer-stage {
  position: relative;
  min-height: 0;
  display: grid;
  place-items: center;
  padding: 1.25rem;
  container-type: size;
}

.film-viewer-video {
  display: block;
  width: min(100cqw, 100cqh * 16 / 9);
  height: auto;
  aspect-ratio: 16 / 9;
  background: var(--night);
  border-radius: 6px;
  box-shadow: 0 20px 70px rgba(0, 0, 0, 0.55);
  outline: none;
}

.film-viewer-foot {
  background: rgba(12, 26, 44, 0.75);
}

.film-chapters--strip {
  display: flex;
  gap: 0.75rem;
  overflow-x: auto;
  padding: 0.15rem 0.1rem 0.4rem;
  scrollbar-width: thin;
}

.film-chapters--strip li {
  flex: 0 0 9.5rem;
}

.film-chapters--strip .film-chapter.is-active .film-chapter-thumb {
  outline: 2px solid var(--ember);
}

.film-chapters--strip .film-chapter.is-active .film-chapter-label {
  color: #fff;
}

@media (max-width: 720px) {
  .film-viewer-stage {
    padding: 0.5rem 0;
  }

  .film-chapters--strip li {
    flex-basis: 7.5rem;
  }

  #film-fullscreen {
    display: none;
  }
}

/* ------------------------------------------------------------------ */
/* Outils — cartes interactives en iframe, avec plein écran            */
/* ------------------------------------------------------------------ */
.tool-card {
  background: var(--white);
  border: 1px solid var(--rule);
  border-radius: 12px;
  overflow: hidden;
}

.tool-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1rem 1.5rem;
  padding: 1.25rem 1.4rem 1.1rem;
}

.tool-head h2 {
  margin: 0 0 0.35rem;
  font-size: 1.25rem;
}

.tool-sub {
  margin: 0;
  color: var(--stone);
  max-width: 44rem;
}

.tool-src {
  margin: 0.4rem 0 0;
  font-size: 0.8rem;
  color: var(--stone);
}

.tool-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.6rem;
}

.btn-ghost {
  display: inline-block;
  padding: 0.6rem 1.1rem;
  border: 1px solid var(--teal);
  border-radius: 8px;
  color: var(--teal);
  font-weight: 600;
  text-decoration: none;
}

.btn-ghost:hover {
  background: var(--mist);
}

.tool-frame {
  position: relative;
  height: min(78vh, 760px);
  min-height: 460px;
  border-top: 1px solid var(--rule);
  background: #4f8fae;
}

.tool-frame iframe {
  display: block;
  width: 100%;
  height: 100%;
  border: 0;
}

.tool-exit {
  display: none;
}

.tool-frame:fullscreen {
  height: 100vh;
  min-height: 0;
  border: 0;
}

.tool-frame:-webkit-full-screen {
  height: 100vh;
  min-height: 0;
  border: 0;
}

/* en plein écran, un bouton visible pour sortir (indispensable sur écran tactile) */
.tool-frame:fullscreen .tool-exit,
.tool-frame:-webkit-full-screen .tool-exit {
  display: block;
  position: absolute;
  left: 50%;
  bottom: 1rem;
  transform: translateX(-50%);
  padding: 0.5rem 1rem;
  border: 0;
  border-radius: 999px;
  background: rgba(21, 33, 43, 0.82);
  color: var(--white);
  font: inherit;
  font-size: 0.85rem;
  cursor: pointer;
}

@media (max-width: 640px) {
  .tool-frame {
    height: 80vh;
    min-height: 0;
  }
}
