/* Shared styles for the nine-page site. Palette retained from the reference. */
:root {
  --sky: #B8E3FF;
  --white: #FFFFFF;
  --gray: #EDF2F7;
  --blue: #2563EB;
  --blue-dark: #1E40AF;
  --text: #102033;
  --muted: #536579;
  --line: rgba(37, 99, 235, .15);
  --shadow: 0 12px 36px rgba(26, 65, 116, .06);
  --radius: 24px;
  --page-width: 1180px;
  --header-offset: 96px;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: var(--header-offset); }
body {
  margin: 0;
  color: var(--text);
  background: radial-gradient(ellipse at 0 0, rgba(184,227,255,.7), transparent 800px), linear-gradient(180deg, #F8FCFF, var(--gray) 850px, #F9FBFF);
  font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
  font-size: 16px;
  line-height: 1.75;
  -webkit-text-size-adjust: 100%;
}
button, input { font: inherit; }
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; height: auto; }
button, summary, a { -webkit-tap-highlight-color: transparent; }
button { cursor: pointer; }
a, button, summary { touch-action: manipulation; }
:focus-visible { outline: 3px solid var(--blue); outline-offset: 4px; }
[tabindex="-1"]:focus { outline: none; }
::selection { color: #102033; background: #B8E3FF; }
[id] { scroll-margin-top: var(--header-offset); }
.skip-link {
  position: fixed; top: 10px; left: 16px; z-index: 100;
  padding: 12px 20px; border-radius: 12px;
  background: var(--blue); color: white; font-weight: 700;
  transform: translateY(-180%);
}
.skip-link:focus { transform: translateY(0); }
.page-container, .topbar-inner, .footer-inner {
  width: min(var(--page-width), calc(100% - 48px)); margin-inline: auto;
}
/* Navigation */
.topbar {
  position: sticky; top: 0; z-index: 30;
  border-bottom: 1px solid var(--line);
  background: rgba(255,255,255,.95);
  -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
}
.topbar-inner { min-height: 78px; display: flex; gap: 24px; align-items: center; justify-content: space-between; }
.brand { display: inline-flex; align-items: center; gap: 11px; flex: 0 0 auto; }
.brand-mark {
  width: 42px; height: 42px; display: grid; place-items: center;
  border-radius: 13px; color: white; background: var(--blue);
  box-shadow: 0 5px 15px rgba(37,99,235,.18);
  font-weight: 850; font-size: 27px; line-height: 1;
}
.brand-text { font-size: 23px; font-weight: 800; letter-spacing: -.6px; }
.nav-links { display: flex; align-items: center; gap: 4px; }
.nav-links a {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 42px; padding: 8px 11px; border-radius: 11px;
  color: var(--muted); font-size: 14px; font-weight: 650;
  transition: background .16s ease, color .16s ease;
}
.nav-links a:hover { color: var(--blue-dark); background: #EDF5FF; }
.nav-links a.active { color: white; background: var(--blue); }
.menu-toggle { display: none; }
/* Hero */
main { padding: 28px 0 64px; }
.breadcrumb { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; margin: 0 0 17px 2px; font-size: 13px; color: var(--muted); }
.breadcrumb a { color: var(--blue-dark); }
.breadcrumb a:hover { text-decoration: underline; }
.breadcrumb-separator { color: #76879B; }
.hero {
  position: relative; overflow: hidden;
  padding: clamp(26px, 4vw, 44px);
  border: 1px solid var(--line); border-radius: var(--radius);
  background: linear-gradient(112deg, #FFFFFF 32%, #E8F5FF 100%);
  box-shadow: var(--shadow);
}
.hero::after {
  content: ""; pointer-events: none;
  position: absolute; right: -95px; top: -120px;
  width: 340px; height: 340px; border: 1px solid rgba(37,99,235,.08);
  border-radius: 50%; box-shadow: 0 0 0 35px rgba(184,227,255,.12), 0 0 0 70px rgba(184,227,255,.08);
}
.hero > * { position: relative; z-index: 1; }
.eyebrow, .section-label {
  color: var(--blue-dark); font-size: 11px; line-height: 1.5;
  font-weight: 750; letter-spacing: .15em; text-transform: uppercase;
}
.eyebrow { display: inline-flex; align-items: center; gap: 9px; margin-bottom: 14px; }
.eyebrow::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--blue); }
h1 {
  max-width: 1000px; margin: 0;
  font-size: clamp(32px, 4.3vw, 54px); line-height: 1.12; letter-spacing: -.045em;
  font-weight: 800; overflow-wrap: break-word;
}
.page-jeux h1 { max-width: 960px; }
.hero-lead { max-width: 900px; margin: 20px 0 0; font-size: 17px; line-height: 1.8; color: var(--muted); }
.hero-lead strong { color: var(--text); font-weight: 650; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 26px; }
.btn { display: inline-flex; justify-content: center; align-items: center; gap: 12px; min-height: 46px; padding: 10px 19px; border: 1px solid transparent; border-radius: 12px; font-size: 14px; font-weight: 700; transition: background .16s ease, box-shadow .16s ease; }
.btn-primary { color: white; background: var(--blue); box-shadow: 0 5px 16px rgba(37,99,235,.15); }
.btn-primary:hover { background: var(--blue-dark); }
.btn-secondary { color: var(--blue-dark); background: white; border-color: var(--line); }
.btn-secondary:hover { background: #EDF5FF; }
.notice { display: flex; gap: 13px; align-items: center; padding: 16px 4px; color: var(--muted); font-size: 13px; line-height: 1.6; }
.notice p { margin: 0; }
.age-badge { flex-shrink: 0; display: grid; place-items: center; width: 35px; height: 35px; border: 1px solid var(--line); background: rgba(255,255,255,.8); border-radius: 50%; color: var(--blue-dark); font-size: 11px; font-weight: 750; }
/* Sidebar and reading column */
.page-wrap { display: grid; grid-template-columns: 266px minmax(0,1fr); gap: 26px; align-items: start; }
.toc { position: sticky; top: var(--header-offset); max-height: calc(100dvh - var(--header-offset) - 22px); overflow-y: auto; scrollbar-width: thin; padding: 1px; border-radius: 20px; }
.sidebar-group { margin-bottom: 12px; border: 1px solid var(--line); border-radius: 19px; background: rgba(255,255,255,.97); overflow: clip; }
.sidebar-group > summary { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 54px; padding: 15px 17px; list-style: none; cursor: pointer; font-size: 13px; font-weight: 750; }
.sidebar-group > summary::-webkit-details-marker { display: none; }
.sidebar-group > summary span { font-size: 20px; font-weight: 400; color: var(--blue); line-height: 1; transition: transform .15s; }
.sidebar-group[open] > summary span { transform: rotate(45deg); }
.page-list { display: grid; gap: 4px; padding: 0 9px 10px; }
.page-list a { display: grid; grid-template-columns: 20px minmax(0,1fr); gap: 10px; align-items: start; padding: 10px 10px; border-radius: 11px; color: var(--muted); font-size: 13px; line-height: 1.5; transition: background .16s ease; }
.nav-index { font-size: 10px; line-height: 1.95; font-variant-numeric: tabular-nums; color: #637B98; }
.page-list a:hover { background: #F0F6FF; color: var(--blue-dark); }
.page-list a.active { background: #EAF2FF; color: var(--blue-dark); font-weight: 700; }
.page-list a.active .nav-index { color: var(--blue); }
.section-list { display: grid; padding: 0 12px 12px; gap: 2px; }
.section-list a { padding: 8px; font-size: 12px; line-height: 1.55; color: var(--muted); border-radius: 8px; }
.section-list a:hover { color: var(--blue-dark); background: #F0F6FF; }
.reading-column, .article { min-width: 0; }
.article > * + *, .related-pages, .page-steps { margin-top: 22px; }
.intro-box, .content-section, .page-directory, .related-pages {
  padding: clamp(22px, 2.6vw, 32px); border: 1px solid var(--line);
  border-radius: var(--radius); background: var(--white); box-shadow: var(--shadow);
}
.intro-box { background: #F7FBFF; }
.article h2, .related-pages h2 { margin: 0 0 19px; color: var(--text); font-size: clamp(23px, 2.4vw, 30px); line-height: 1.28; letter-spacing: -.025em; overflow-wrap: break-word; }
.article h3 { margin: 27px 0 12px; font-size: 19px; line-height: 1.42; letter-spacing: -.012em; overflow-wrap: break-word; }
.article p, .article li { color: var(--muted); font-size: 16px; line-height: 1.8; }
.article p { margin: 0 0 17px; }
.article strong { color: var(--text); font-weight: 650; }
.article .content-section > :last-child, .intro-box > :last-child, .faq-answer > :last-child { margin-bottom: 0; }
.article ul, .article ol { padding-left: 23px; }
.article a.context-link { color: var(--blue-dark); text-decoration: underline; text-underline-offset: 3px; text-decoration-color: #B4CBF4; text-decoration-thickness: 1px; }
.article a.context-link:hover { color: var(--blue); text-decoration-color: var(--blue); }
.article blockquote { margin: 18px 0; padding: 17px 21px; border-left: 3px solid var(--blue); border-radius: 0 12px 12px 0; background: #F1F7FF; }
.article blockquote p { font-size: 15px; margin: 0 0 12px; }
.article blockquote p:last-child { margin: 0; }
.article blockquote + blockquote { margin-top: -18px; }
/* Tables scroll inside their panel rather than widening the whole page. */
.table-wrap { width: 100%; max-width: 100%; overflow-x: auto; overscroll-behavior-x: contain; -webkit-overflow-scrolling: touch; margin: 24px 0; border: 1px solid var(--line); border-radius: 14px; }
table { width: 100%; min-width: 550px; border-collapse: collapse; background: white; text-align: left; font-size: 14px; line-height: 1.65; }
th, td { padding: 15px 16px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { background: var(--blue); color: white; font-size: 13px; font-weight: 650; }
.article th strong { color: inherit; }
td { color: var(--muted); }
tbody tr:nth-child(even) { background: #F7FAFF; }
tbody tr:last-child td { border-bottom: 0; }
/* Section directory and related links */
.section-label { margin-bottom: 9px; }
.cards-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 13px; }
.link-card { display: grid; grid-template-columns: 28px minmax(0,1fr) 16px; gap: 10px; align-items: start; min-height: 136px; padding: 19px 16px; border: 1px solid var(--line); border-radius: 15px; background: linear-gradient(135deg,#FFFFFF,#F5FAFF); transition: border-color .16s ease, background .16s ease; }
.link-card:hover { border-color: #8AB4F8; background: #EFF6FF; }
.card-index { display: grid; place-items: center; min-height: 28px; border-radius: 8px; background: #E8F1FF; font-size: 10px; font-weight: 750; color: var(--blue-dark); }
.card-copy { display: block; min-width: 0; }
.card-copy > strong { display: block; margin: 2px 0 8px; color: var(--text); font-size: 15px; line-height: 1.42; font-weight: 750; }
.card-copy > span { display: block; color: var(--muted); font-size: 12px; line-height: 1.6; }
.card-arrow { color: var(--blue); font-size: 19px; line-height: 1.5; }
.related-grid { grid-template-columns: 1fr; gap: 9px; }
.related-grid .link-card { min-height: 0; padding: 15px 17px; }
.related-grid .card-copy > strong { margin-bottom: 3px; }
.page-steps { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 14px; }
.page-step { display: grid; gap: 4px; padding: 17px 20px; border: 1px solid var(--line); border-radius: 15px; background: white; }
.page-step:hover { background: #EDF5FF; border-color: #A7C6F6; }
.page-step > span { color: var(--muted); font-size: 11px; }
.page-step > strong { color: var(--blue-dark); font-size: 15px; }
.page-step.next { text-align: right; grid-column: 2; }
/* FAQ accordions: native, keyboard accessible, no JavaScript dependency. */
.faq-item { border: 1px solid var(--line); border-radius: 14px; background: #FCFDFF; overflow: clip; }
.faq-item + .faq-item { margin-top: 10px; }
.faq-item > summary { position: relative; display: flex; align-items: start; justify-content: space-between; gap: 16px; padding: 18px 19px; cursor: pointer; list-style: none; }
.faq-item > summary::-webkit-details-marker { display: none; }
.faq-item > summary::after { content: "+"; flex: 0 0 20px; text-align: center; color: var(--blue); font-size: 22px; line-height: 1.1; }
.faq-item[open] > summary::after { content: "−"; }
.faq-item > summary h3 { margin: 0; font-size: 16px; font-weight: 650; line-height: 1.55; }
.faq-item > summary:hover { background: #F0F6FF; }
.faq-item[open] { background: #F7FBFF; border-color: #B5CEF3; }
.faq-answer { padding: 0 19px 19px; }
.faq-answer p { font-size: 15px; }
/* Footer */
.footer { background: linear-gradient(180deg, #EAF7FF, #D3ECFF); border-top: 1px solid var(--line); padding: 35px 0 25px; }
.footer-heading { display: flex; align-items: center; justify-content: space-between; gap: 22px; margin-bottom: 24px; }
.back-top { color: var(--blue-dark); font-size: 13px; font-weight: 650; display: inline-flex; align-items: center; gap: 9px; min-height: 44px; }
.back-top:hover { text-decoration: underline; text-underline-offset: 3px; }
.footer-links { display: flex; flex-wrap: wrap; gap: 8px 24px; padding-bottom: 24px; }
.footer-links a { padding: 6px 0; color: var(--muted); font-size: 13px; }
.footer-links a.active, .footer-links a:hover { color: var(--blue-dark); text-decoration: underline; text-underline-offset: 4px; }
.footer-bottom { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px 20px; border-top: 1px solid var(--line); padding-top: 20px; color: #49617B; font-size: 11px; }
/* Narrow layouts and progressive enhancement */
@media (max-width: 1100px) {
  .topbar-inner { gap: 14px; }
  .nav-links { gap: 0; }
  .nav-links a { padding-inline: 9px; font-size: 13px; }
  .brand-text { font-size: 21px; }
  .page-wrap { grid-template-columns: 240px minmax(0,1fr); gap: 20px; }
}
@media (max-width: 960px) {
  :root { --header-offset: 85px; }
  .topbar-inner { position: relative; min-height: 70px; flex-wrap: wrap; padding-block: 12px; }
  .brand-mark { width: 40px; height: 40px; }
  .nav-links { width: 100%; flex-wrap: wrap; justify-content: flex-start; padding-top: 3px; gap: 5px; }
  .nav-links a { padding: 10px 13px; }
  .js .menu-toggle { display: inline-flex; align-items: center; gap: 9px; min-height: 44px; padding: 8px 12px; border: 1px solid var(--line); border-radius: 12px; background: white; color: var(--text); }
  .menu-label { font-size: 12px; font-weight: 650; }
  .menu-icon { width: 18px; display: grid; gap: 4px; }
  .menu-icon span { display: block; width: 18px; height: 2px; background: var(--blue-dark); border-radius: 2px; transition: transform .15s, opacity .15s; }
  .menu-toggle[aria-expanded="true"] .menu-icon span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
  .menu-toggle[aria-expanded="true"] .menu-icon span:nth-child(2) { opacity: 0; }
  .menu-toggle[aria-expanded="true"] .menu-icon span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }
  .js .nav-links { display: none; position: absolute; top: calc(100% + 1px); left: 0; width: 100%; padding: 12px; border: 1px solid var(--line); border-radius: 0 0 18px 18px; background: white; box-shadow: 0 18px 32px rgba(26,65,116,.12); max-height: calc(100dvh - 95px); overflow-y: auto; }
  .js .nav-links.is-open { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); }
  .js .nav-links a { justify-content: flex-start; }
  .page-wrap { grid-template-columns: minmax(0,1fr); gap: 17px; }
  .toc { position: static; max-height: none; overflow: visible; display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 12px; align-items: start; }
  .sidebar-group { margin-bottom: 0; }
  .hero { padding: 30px; }
  h1 { font-size: clamp(32px,5.4vw,45px); }
  .site-menu .page-list { max-height: 360px; overflow-y: auto; }
  .section-list { max-height: 360px; overflow-y: auto; }
}
@media (max-width: 600px) {
  .page-container, .topbar-inner, .footer-inner { width: calc(100% - 28px); }
  main { padding-top: 18px; padding-bottom: 38px; }
  .breadcrumb { font-size: 12px; margin-bottom: 13px; }
  .hero { padding: 24px 21px; border-radius: 20px; }
  h1 { font-size: 32px; line-height: 1.15; }
  .eyebrow { font-size: 10px; letter-spacing: .12em; }
  .hero-lead { font-size: 15px; line-height: 1.8; margin-top: 17px; }
  .hero-actions { gap: 9px; margin-top: 22px; }
  .btn { width: 100%; padding-inline: 14px; font-size: 13px; }
  .notice { align-items: flex-start; padding: 14px 2px; font-size: 11px; gap: 10px; }
  .age-badge { width: 32px; height: 32px; }
  .toc { grid-template-columns: minmax(0,1fr); gap: 9px; }
  .sidebar-group > summary { min-height: 49px; padding: 12px 16px; }
  .intro-box, .content-section, .page-directory, .related-pages { padding: 22px 19px; border-radius: 19px; }
  .article h2, .related-pages h2 { font-size: 23px; line-height: 1.3; margin-bottom: 16px; }
  .article h3 { font-size: 18px; }
  .article p, .article li { font-size: 15px; line-height: 1.8; }
  .article > * + *, .related-pages, .page-steps { margin-top: 16px; }
  .cards-grid { grid-template-columns: minmax(0,1fr); gap: 10px; }
  .link-card { min-height: 0; padding: 17px 13px; }
  .card-copy > strong { font-size: 15px; }
  .table-wrap { margin-block: 20px; border-radius: 11px; }
  table { min-width: 540px; font-size: 13px; }
  th, td { padding: 13px; }
  .faq-item > summary { padding: 15px 14px; gap: 10px; }
  .faq-item > summary h3 { font-size: 15px; }
  .faq-answer { padding: 0 14px 16px; }
  .faq-answer p { font-size: 14px; }
  .page-step { padding: 14px 13px; }
  .page-step > span { font-size: 10px; }
  .page-step > strong { font-size: 14px; }
  .footer { padding-top: 28px; }
  .footer-links { gap: 8px 20px; }
  .footer-heading { gap: 14px; }
  .footer-heading .brand-text { font-size: 20px; }
  .footer-heading .brand-mark { width: 34px; height: 34px; font-size: 23px; border-radius: 10px; }
  .back-top { font-size: 11px; gap: 5px; }
  .footer-bottom { flex-direction: column; font-size: 10px; }
}
@media (max-width: 360px) {
  h1 { font-size: 29px; }
  .hero { padding-inline: 18px; }
  .intro-box, .content-section, .page-directory, .related-pages { padding-inline: 16px; }
  .article h2 { font-size: 22px; }
  .js .nav-links.is-open { grid-template-columns: repeat(2,minmax(0,1fr)); }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; animation: none !important; }
}
@media print {
  body { background: white; font-size: 11pt; }
  .topbar, .toc, .footer, .skip-link, .hero-actions, .notice, .breadcrumb, .related-pages, .page-steps, .page-directory { display: none !important; }
  .page-container { width: 100%; }
  main { padding: 0; }
  .page-wrap { display: block; }
  .hero, .intro-box, .content-section { border: 0; box-shadow: none; background: white; padding: 14px 0; }
  .hero::after { display: none; }
  .hero h1 { font-size: 26pt; }
  .table-wrap { overflow: visible; border-radius: 0; }
  table { min-width: 0; font-size: 10pt; }
  .faq-item { break-inside: avoid; border: 0; }
  .faq-item > summary::after { display: none; }
  .faq-answer { display: block !important; }
  h2, h3 { break-after: avoid; }
}
