/* Identité commune aux pages intérieures de Jour de ouf. */
.site-nav {
  position: sticky;
  z-index: 50;
  top: 10px;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  width: min(100% - 28px, 980px);
  margin: 18px auto 22px;
  padding: 4px;
  border: 1px solid #c8d9d7;
  border-radius: 15px;
  background: #ffffffeb;
  box-shadow: 0 7px 24px #052e4c0c;
  backdrop-filter: blur(10px);
}

.site-nav-links {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 3px;
}

.site-nav-mobile,
.site-nav-panel { display: none; }

.site-nav a {
  min-width: 0;
  padding: 9px 7px;
  border-radius: 11px;
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 800;
  line-height: 1.15;
  text-align: center;
  text-decoration: none;
}

.site-nav a:hover { color: var(--teal); }

.site-nav a[aria-current="page"] {
  background: var(--navy);
  color: white;
}

.site-nav a:focus-visible,
.site-nav button:focus-visible {
  outline: 3px solid var(--teal);
  outline-offset: 2px;
}

.programme-page header {
  padding: 14px 24px;
  border: 1px solid #e0e9e8;
  border-radius: 24px;
  background: white;
  box-shadow: 0 16px 60px #052e4c08;
}

html[data-style="b"] {
  --navy: #062f4d;
  --teal: #00a5a5;
  --background: #fff9df;
  --surface: #bce9dd;
  --surface-hover: #a7ded1;
  --muted: #173f57;
  --border: #062f4d;
}

html[data-style="b"] body {
  overflow-x: hidden;
  background:
    radial-gradient(circle, #062f4d 0 2px, transparent 2.5px) 0 0 / 25px 25px,
    linear-gradient(135deg, #fff9df, #e5f5ef 60%, #ffe5dd);
}

html[data-style="b"] body::before {
  height: 7px;
  background: linear-gradient(90deg, #ff6b57 0 34%, #ffd447 34% 66%, #00a5a5 66%);
}

html[data-style="b"] main { width: min(100% - 28px, 820px); }

html[data-style="b"] .top-nav,
html[data-style="b"] .songs-page .back-link {
  position: relative;
  z-index: 2;
}

html[data-style="b"] .back-link,
html[data-style="b"] .songs-link {
  padding: 6px 9px;
  border: 2px solid #062f4d;
  border-radius: 999px;
  background: #fffdf5;
  color: #062f4d;
  font-size: 0.76rem;
  text-decoration: none;
  box-shadow: 2px 2px 0 #062f4d;
}

html[data-style="b"] .site-nav {
  border: 2px solid #062f4d;
  border-radius: 9px 20px 8px 18px;
  background: #fffdf5;
  box-shadow: 4px 4px 0 #062f4d;
  transform: rotate(-0.25deg);
}

html[data-style="b"] .site-nav a { color: #062f4d; }
html[data-style="b"] .site-nav a[aria-current="page"] { background: #ff6b57; color: #062f4d; }

html[data-style="b"] header {
  border: 3px solid #062f4d;
  border-radius: 9px 34px 14px 30px;
  background: #ff6b57;
  box-shadow: 7px 7px 0 #062f4d;
  transform: rotate(-0.7deg);
}

html[data-style="b"] .programme-page header {
  padding: 18px 22px;
  justify-content: flex-start;
}

html[data-style="b"] header .logo {
  padding: 5px;
  border: 2px solid #062f4d;
  border-radius: 26px 8px 24px 10px;
  background: white;
}

html[data-style="b"] header h1 {
  color: #062f4d;
  font-weight: 900;
  letter-spacing: -0.055em;
  text-transform: uppercase;
}

html[data-style="b"] .programme {
  border-top: 5px solid #062f4d;
}

html[data-style="b"] .programme li {
  border-bottom-color: #062f4d88;
}

html[data-style="b"] .programme li::before {
  color: #062f4d;
  font-weight: 900;
}

html[data-style="b"] .programme .section {
  border-top: 4px solid #062f4d;
  border-bottom: 3px solid #062f4d;
  background: #ffd447;
  color: #062f4d;
}

html[data-style="b"] .programme .section:nth-of-type(3n) { background: #f7a8c4; }
html[data-style="b"] .programme .music { border-bottom-width: 3px; background: #bce9dd; }
html[data-style="b"] .programme .transition { border-bottom-color: #062f4d99; }
html[data-style="b"] .programme .subordinate::after { background: #ff6b57; }

html[data-style="b"] .audio-link,
html[data-style="b"] .song-action {
  border: 2px solid #062f4d;
  border-radius: 6px;
  background: white;
  color: #062f4d;
  box-shadow: 2px 2px 0 #062f4d;
}

html[data-style="b"] .audio-link.youtube,
html[data-style="b"] .song-action.listen {
  border-color: #062f4d;
  background: #ffd447;
  color: #062f4d;
}

html[data-style="b"] .audio-link:hover,
html[data-style="b"] .song-action:hover {
  border-color: #062f4d;
  background: #062f4d;
  color: white;
}

html[data-style="b"] .songs-page header { padding-top: 12px; }

html[data-style="b"] .eyebrow {
  border: 2px solid #062f4d;
  background: #fffdf5;
  color: #062f4d;
  box-shadow: 3px 3px 0 #062f4d;
  transform: rotate(1deg);
}

html[data-style="b"] .eyebrow::before { background: #ff6b57; }
html[data-style="b"] .intro { color: #062f4d; font-weight: 650; }
html[data-style="b"] .songs-page ol { gap: 15px; }

html[data-style="b"] .song {
  border: 3px solid #062f4d;
  border-radius: 10px 28px 12px 24px;
  background: #bce9dd;
  box-shadow: 6px 6px 0 #062f4d;
  transform: rotate(-0.25deg);
}

html[data-style="b"] .songs-page li:nth-child(3n + 2) .song {
  border-radius: 26px 9px 24px 12px;
  background: #ffd447;
  transform: rotate(0.3deg);
}

html[data-style="b"] .songs-page li:nth-child(3n) .song {
  background: #f7a8c4;
}

html[data-style="b"] .song::before,
html[data-style="b"] .artist { color: #062f4d; }
html[data-style="b"] .song::before { font-weight: 900; }

html[data-style="b"] .homage-card {
  border: 3px solid #062f4d;
  border-radius: 28px 9px 30px 12px;
  background: #ffd447;
  box-shadow: 7px 7px 0 #062f4d;
  transform: rotate(0.35deg);
}

html[data-style="b"] .page-intro,
html[data-style="b"] .tribute-card,
html[data-style="b"] .institution-card {
  border: 3px solid #062f4d;
  color: #062f4d;
  box-shadow: 5px 5px 0 #062f4d;
}

html[data-style="b"] .page-intro {
  border-radius: 9px 28px 12px 25px;
  background: #bce9dd;
  transform: rotate(-0.3deg);
}

html[data-style="b"] .section-heading {
  border-bottom: 5px solid #062f4d;
  color: #062f4d;
  font-weight: 900;
  letter-spacing: -0.035em;
  text-transform: uppercase;
}

html[data-style="b"] .tribute-card,
html[data-style="b"] .institution-card {
  border-radius: 10px 25px 11px 22px;
  background: #fffdf5;
}

html[data-style="b"] .tribute-card:nth-child(3n + 2),
html[data-style="b"] .institution-card:nth-child(3n + 2) { background: #ffd447; }

html[data-style="b"] .tribute-card:nth-child(3n),
html[data-style="b"] .institution-card:nth-child(3n) { background: #f7a8c4; }

html[data-style="b"] .tribute-card p,
html[data-style="b"] .institution-card p,
html[data-style="b"] .page-intro p,
html[data-style="b"] .homage-card p,
html[data-style="b"] .research-list,
html[data-style="b"] .section-intro { color: #173f57; }

html[data-style="b"] .role,
html[data-style="b"] .source-link { color: #062f4d; }

@media (max-width: 720px) {
  body.mobile-menu-open { overflow: hidden; }

  .site-nav {
    position: sticky;
    z-index: 100;
    top: 0;
    width: 100%;
    margin: 0;
    padding: 0 16px;
    border-width: 0 0 1px;
    border-radius: 0;
    background: #fffdf8f5;
    box-shadow: none;
    backdrop-filter: none;
  }

  .site-nav-links { display: none; }

  .site-nav-mobile {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 54px;
  }

  .site-nav .site-nav-brand {
    padding: 8px 0;
    border-radius: 0;
    color: var(--navy);
    font-family: system-ui, -apple-system, "Segoe UI", sans-serif;
    font-size: 1rem;
    font-weight: 900;
    letter-spacing: -0.025em;
    text-align: left;
  }

  .site-nav-mobile button {
    position: relative;
    display: grid;
    width: 44px;
    height: 44px;
    place-items: center;
    border: 0;
    border-radius: 8px;
    background: transparent;
    color: var(--navy);
    cursor: pointer;
  }

  .site-nav-icon,
  .site-nav-icon::before,
  .site-nav-icon::after {
    display: block;
    width: 20px;
    height: 2px;
    border-radius: 2px;
    background: currentColor;
    transition: transform 180ms ease, opacity 180ms ease;
  }

  .site-nav-icon { position: relative; }
  .site-nav-icon::before,
  .site-nav-icon::after { position: absolute; left: 0; content: ''; }
  .site-nav-icon::before { transform: translateY(-6px); }
  .site-nav-icon::after { transform: translateY(6px); }
  .site-nav-mobile button[aria-expanded="true"] .site-nav-icon { background: transparent; }
  .site-nav-mobile button[aria-expanded="true"] .site-nav-icon::before { transform: rotate(45deg); }
  .site-nav-mobile button[aria-expanded="true"] .site-nav-icon::after { transform: rotate(-45deg); }

  .site-nav-panel:not([hidden]) {
    position: fixed;
    top: 54px;
    right: 0;
    bottom: 0;
    left: 0;
    display: block;
    overflow-y: auto;
    padding: 18px max(24px, calc((100vw - 480px) / 2)) calc(24px + env(safe-area-inset-bottom));
    background: #fffdf8;
    box-shadow: 0 12px 24px #052e4c1a;
  }

  .site-nav-panel a {
    display: block;
    min-height: 60px;
    padding: 14px 8px;
    border-bottom: 1px solid #c8d9d7;
    border-radius: 0;
    color: var(--navy);
    font-size: clamp(1.4rem, 6vw, 1.7rem);
    font-weight: 750;
    line-height: 1.25;
    text-align: left;
  }

  .site-nav-panel a[aria-current="page"] {
    background: transparent;
    color: var(--teal);
  }

  html[data-style="b"] .site-nav {
    border-width: 0 0 2px;
    border-radius: 0;
    box-shadow: none;
    transform: none;
  }

  html[data-style="b"] .site-nav-panel:not([hidden]) { background: #fffdf5; }
  html[data-style="b"] .site-nav-panel a { border-bottom: 2px solid #062f4d; }
  html[data-style="b"] .site-nav-panel a[aria-current="page"] { background: transparent; color: #b34833; }

  .programme-page header { padding: 10px 14px; border-radius: 18px; }
  html[data-style="b"] main { width: calc(100% - 24px); margin-top: 22px; }
  html[data-style="b"] .top-nav { gap: 6px; }
  html[data-style="b"] .back-link,
  html[data-style="b"] .songs-link { padding: 5px 7px; font-size: 0.68rem; }
  html[data-style="b"] .programme-page header { padding: 12px 14px; }
  html[data-style="b"] .programme-page .logo { width: 108px; }
  html[data-style="b"] .programme-page h1 { font-size: 1.65rem; }
  html[data-style="b"] .song { padding: 15px 12px 16px 8px; }
}

@media (prefers-reduced-motion: reduce) {
  html[data-style="b"] header,
  html[data-style="b"] .song { transform: none; }
}
