/* En Clair Jeux — shared typography, layout and interaction styles. */
:root {
  color-scheme: light;
  --c-bg: #f4f6f7;
  --c-surface: #ffffff;
  --c-text: #263340;
  --c-heading: #12232f;
  --c-muted: #586873;
  --c-accent: #086b64;
  --c-accent-ink: #ffffff;
  --c-link: #075c56;
  --c-border: #dce4e7;
  --c-mark: #edf5f3;
  --c-gold: #e5b756;
  --c-header-bg: #ffffff;
  --c-header-text: #12232f;
  --c-footer-bg: #12232f;
  --c-footer-text: #c0cbd2;
  --f-body: Arial, Helvetica, system-ui, sans-serif;
  --f-head: Georgia, 'Times New Roman', serif;
  --radius: 12px;
  --wrap: 1280px;
  --read: 820px;
  --header-h: 76px;
}
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 24px); -webkit-text-size-adjust: 100%; }
body { margin: 0; color: var(--c-text); background: var(--c-bg); font: 400 1.0625rem/1.78 var(--f-body); overflow-wrap: break-word; }
body.has-overlay { overflow: hidden; }
img { max-width: 100%; height: auto; display: block; }
svg { flex-shrink: 0; }
picture { display: block; }
a { color: var(--c-link); text-underline-offset: .2em; text-decoration-thickness: 1px; }
a:hover { text-decoration-thickness: 2px; }
button, input, select { font: inherit; }
button { -webkit-tap-highlight-color: transparent; }
strong { font-weight: 700; color: var(--c-heading); }
:focus-visible { outline: 3px solid var(--c-accent); outline-offset: 4px; }
[hidden] { display: none !important; }
::selection { background: #cce6df; color: var(--c-heading); }
.skip-link { position: fixed; left: 16px; top: -120px; z-index: 300; padding: 10px 18px; border-radius: 8px; background: var(--c-heading); color: white; }
.skip-link:focus { top: 12px; }

/* The same header and footer on every page. */
.site-header { position: sticky; top: 0; z-index: 50; background: var(--c-header-bg); color: var(--c-header-text); border-bottom: 1px solid var(--c-border); }
.site-header__inner { max-width: var(--wrap); min-height: var(--header-h); padding: 0 28px; margin: 0 auto; display: flex; align-items: center; gap: 28px; }
.site-home { display: inline-flex; align-items: center; flex: none; gap: 12px; padding: 4px 0; min-height: 44px; color: var(--c-heading); text-decoration: none; }
.site-home > svg { width: 36px; height: 36px; padding: 9px; border-radius: 9px; color: var(--c-accent); background: var(--c-mark); }
.site-home__name { font: 700 1.36rem/1.2 var(--f-head); letter-spacing: -.035em; white-space: nowrap; }
.site-home:hover { color: var(--c-accent); }
.site-entity { display: flex; flex: 1; min-width: 0; flex-direction: column; border-left: 1px solid var(--c-border); padding-left: 24px; line-height: 1.4; }
.site-entity__kind { color: var(--c-muted); font-size: .67rem; text-transform: uppercase; letter-spacing: .12em; }
.site-entity__name { color: var(--c-heading); font-size: .91rem; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.toc-open { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 0 14px; border: 1px solid var(--c-border); border-radius: 8px; background: white; color: var(--c-heading); cursor: pointer; font-size: .83rem; }
.toc-open:hover { border-color: var(--c-accent); background: var(--c-mark); }
.site-footer { margin-top: 80px; background: var(--c-footer-bg); color: var(--c-footer-text); border-top: 4px solid var(--c-accent); }
.site-footer__inner { max-width: var(--wrap); margin: 0 auto; padding: 44px 28px; }
.site-footer__brand { font: 700 1.6rem/1.3 var(--f-head); letter-spacing: -.035em; color: white; margin-bottom: 22px; }
.site-footer__warning { max-width: 800px; font-size: .86rem; line-height: 1.75; margin: 0 0 18px; }
.site-footer__warning strong { display: inline-block; color: white; border: 1px solid #70818c; border-radius: 4px; padding: 0 5px; margin-right: 6px; font-size: .8rem; }
.site-footer__copy { color: #a6b5bf; font-size: .79rem; margin: 0; }

/* Article introduction and reading layout. */
.art-hero { padding: 30px 0 50px; background: var(--c-surface); border-bottom: 1px solid var(--c-border); }
.art-hero__inner, .art-layout { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 28px; }
.breadcrumb { display: flex; flex-wrap: wrap; gap: 9px; color: var(--c-muted); font-size: .77rem; line-height: 1.5; margin-bottom: 34px; }
.breadcrumb a { color: inherit; text-decoration: none; }
.breadcrumb a:hover { color: var(--c-accent); text-decoration: underline; }
.art-hero__grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.02fr); gap: 52px; align-items: center; }
.art-hero__tag { display: inline-block; padding: 4px 10px; border-radius: 4px; background: var(--c-mark); color: var(--c-accent); font-size: .67rem; line-height: 1.7; font-weight: 700; letter-spacing: .13em; text-transform: uppercase; }
.art-hero h1 { font: 400 clamp(2.5rem, 4.4vw, 3.8rem)/1.06 var(--f-head); letter-spacing: -.05em; color: var(--c-heading); margin: 18px 0 24px; }
.art-hero p { margin: 0; font-size: 1.015rem; color: var(--c-muted); line-height: 1.8; }
.art-hero p br { display: block; content: ''; margin-top: 12px; }
.art-hero .art-figure { margin: 0; }
.art-hero .art-figure__zoom { border: 0; }
.art-hero .art-figure figcaption { font-size: .73rem; margin-top: 10px; }
.art-layout { display: grid; grid-template-columns: 254px minmax(0, 1fr); gap: 36px; margin-top: 42px; align-items: start; }
.art-body { min-width: 0; width: 100%; background: white; border: 1px solid var(--c-border); border-radius: var(--radius); padding: 38px 42px 8px; container-type: inline-size; }
.art-section { padding-bottom: 24px; margin-bottom: 26px; border-bottom: 1px solid var(--c-border); }
.art-section > :last-child { margin-bottom: 0; }
.art-section:last-child { border-bottom: 0; padding-bottom: 16px; margin-bottom: 0; }
.art-body h2 { margin: 0 0 24px; padding-top: 18px; position: relative; font: 400 clamp(1.68rem, 2.3vw, 2.12rem)/1.2 var(--f-head); letter-spacing: -.03em; color: var(--c-heading); }
.art-body h2::before { content: ''; position: absolute; top: 0; left: 0; width: 46px; height: 3px; background: var(--c-accent); }
.art-body h3 { font: 700 1.14rem/1.4 var(--f-body); letter-spacing: -.015em; margin: 28px 0 12px; color: var(--c-heading); }
.art-body p { margin: 0 0 .9em; }
.art-body ul { padding-left: 1.15em; margin: 0 0 1.3em; }
.art-body li { padding-left: .2em; margin-bottom: .8em; }
.art-body li::marker { color: var(--c-accent); }
.art-body h2[id], .art-body h3[id] { scroll-margin-top: calc(var(--header-h) + 18px); }
.inline-symbol { display: inline-flex; align-items: center; justify-content: center; flex: none; max-height: 28px; vertical-align: -.35em; overflow: hidden; margin: 0 .13em; line-height: 1; }
.art-body .inline-symbol .inline-icon { display: block; width: 100% !important; height: 100% !important; max-width: 100%; max-height: 100%; object-fit: contain; margin: 0; vertical-align: baseline; }

/* Navigation stays separate from the reading column. */
.art-toc { position: sticky; top: calc(var(--header-h) + 24px); max-height: calc(100dvh - var(--header-h) - 48px); align-self: start; overflow: auto; scrollbar-width: thin; scrollbar-color: #bccbc9 transparent; }
.art-toc__box { position: relative; background: white; border: 1px solid var(--c-border); border-radius: 10px; padding: 16px 12px 12px; border-top: 3px solid var(--c-accent); }
.art-toc summary { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin: 0 9px; padding: 2px 0 15px; cursor: pointer; list-style: none; font: 700 .94rem/1.4 var(--f-body); color: var(--c-heading); }
.art-toc summary::-webkit-details-marker { display: none; }
.art-toc summary::after { content: '−'; color: var(--c-accent); font-weight: 400; }
.art-toc details:not([open]) summary::after { content: '+'; }
.art-toc details:not([open]) summary { padding-bottom: 2px; }
.art-toc ol { list-style: none; padding: 0; margin: 0; }
.art-toc li { margin: 0 0 2px; }
.art-toc li a { display: block; padding: 9px 11px; border-radius: 5px; border-left: 2px solid transparent; text-decoration: none; color: var(--c-muted); font-size: .79rem; line-height: 1.48; }
.art-toc li.lvl-3 a { padding-left: 24px; font-size: .75rem; }
.art-toc li a:hover, .art-toc li a.is-active { background: var(--c-mark); color: var(--c-accent); border-left-color: var(--c-accent); }
.toc-close { display: none; }

/* Media keep their original proportions and can be opened at full size. */
.art-figure { max-width: 100%; margin: 20px auto 24px; }
.art-figure__zoom { display: block; width: 100%; max-width: 100%; margin-inline: auto; padding: 0; border: 1px solid var(--c-border); border-radius: 10px; background: #eef3f1; overflow: hidden; cursor: zoom-in; }
.art-figure__zoom:hover { border-color: #8ba8a1; }
.art-figure picture, .art-figure img { display: block; width: 100%; height: auto; }
.art-figure--portrait { max-width: 610px; margin-left: auto; margin-right: auto; }
.art-figure figcaption { font-size: .79rem; line-height: 1.65; margin-top: 10px; color: var(--c-muted); padding-left: 12px; border-left: 2px solid var(--c-border); }
/* Shared table treatment: comfortable type, clear row boundaries, stable numbers. */
.art-table { margin: 24px 0 30px; border: 1px solid var(--c-border); border-radius: 10px; overflow: auto; background: white; }
.art-table table { width: 100%; border-collapse: collapse; font-size: 1rem; line-height: 1.55; }
.art-table th, .art-table td { padding: 18px 20px; text-align: left; vertical-align: middle; border-bottom: 1px solid var(--c-border); }
.art-table thead th { color: var(--c-heading); background: var(--c-mark); font-size: .9rem; line-height: 1.5; font-weight: 700; vertical-align: top; }
.art-table tbody th { color: var(--c-heading); font-weight: 600; }
.art-table tbody tr:nth-child(even) { background: #f8faf9; }
.art-table tbody tr:last-child > * { border-bottom: 0; }
.art-table td::before, .art-table th[scope='row']::before { content: none; }
.table-value { display: inline-block; white-space: nowrap; font-variant-numeric: tabular-nums; font-size: 1.16rem; font-weight: 700; line-height: 1.35; color: var(--c-heading); }
.table-value--bonus { padding: 7px 12px; min-width: 48px; text-align: center; color: var(--c-accent); background: #e6f3ee; border: 1px solid #c7dfd5; border-radius: 7px; }
.art-table--offers tbody th { white-space: nowrap; }
.art-table--levels thead th:nth-child(1) { width: 21%; }
.art-table--levels thead th:nth-child(2) { width: 23%; }
.art-table--levels thead th:nth-child(3) { width: 56%; }
.table-techniques { display: block; line-height: 2.25; }
.technique-tag { display: inline-block; white-space: nowrap; padding: 1px 8px; margin: 2px 0; border: 1px solid #d5e3de; border-radius: 5px; background: white; color: var(--c-heading); font-size: .9rem; font-weight: 600; line-height: 1.7; }
.art-table--stakes tbody td { text-align: right; }
.art-table--stakes thead th:last-child { text-align: right; }

/* Image-based tables retain their original artwork and a readable minimum size. */
.art-figure__frame { width: 100%; max-width: 100%; margin-inline: auto; border: 1px solid var(--c-border); border-radius: 10px; overflow: hidden; }
.art-figure--table .art-figure__zoom { border: 0; border-radius: 0; }

/* Native table structure is retained for assistive technology on every screen. */
@container (max-width: 560px) {
  .art-table:not(.art-table--stakes) { border: 0; background: transparent; overflow: visible; }
  .art-table:not(.art-table--stakes) table, .art-table:not(.art-table--stakes) tbody { display: block; }
  .art-table:not(.art-table--stakes) thead { position: absolute; width: 1px; height: 1px; padding: 0; border: 0; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
  .art-table:not(.art-table--stakes) tbody tr { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); border: 1px solid var(--c-border); border-radius: 10px; overflow: hidden; margin: 0 0 14px; background: white; }
  .art-table:not(.art-table--stakes) tbody tr:last-child { margin-bottom: 0; }
  .art-table:not(.art-table--stakes) th[scope='row'] { display: block; grid-column: 1 / -1; padding: 14px 16px; border-bottom: 1px solid var(--c-border); background: var(--c-mark); font-size: 1.1rem; white-space: normal; }
  .art-table:not(.art-table--stakes) td { display: flex; flex-direction: column; align-items: flex-start; min-width: 0; padding: 14px 16px; text-align: left; font-size: 1rem; border-bottom: 0; }
  .art-table:not(.art-table--stakes) td::before, .art-table:not(.art-table--stakes) th[scope='row']::before { content: attr(data-label); display: block; color: var(--c-muted); font-size: .76rem; font-weight: 400; line-height: 1.5; margin-bottom: 7px; }
  .art-table--offers td::before { min-height: 3em; }
  .art-table--offers td + td { border-left: 1px solid var(--c-border); }
  .art-table--offers .table-value { font-size: 1.4rem; }
  .art-table.art-table--levels th[scope='row'] { grid-column: 1; border-bottom: 0; background: white; padding-bottom: 12px; }
  .art-table.art-table--levels td:nth-child(2) { grid-column: 2; justify-content: center; align-items: flex-end; padding-bottom: 12px; }
  .art-table.art-table--levels td:nth-child(2)::before { text-align: right; max-width: 130px; }
  .art-table.art-table--levels .table-cell--wide { grid-column: 1 / -1; padding-top: 12px; border-top: 1px solid var(--c-border); background: #f8faf9; }
  .art-table--levels .table-cell--wide::before { font-size: .78rem; max-width: 100%; }
  .art-table--stakes th, .art-table--stakes td { padding: 15px 16px; }
  .art-table--stakes thead th { font-size: .84rem; }
}

.to-top { position: fixed; right: 24px; bottom: calc(24px + env(safe-area-inset-bottom)); z-index: 40; display: grid; place-items: center; width: 46px; height: 46px; border: 1px solid var(--c-border); border-radius: 50%; background: white; color: var(--c-accent); cursor: pointer; box-shadow: 0 5px 20px #12232f15; font-size: 1.25rem; opacity: 0; pointer-events: none; transform: translateY(8px); transition: opacity .18s, transform .18s; }
.to-top.is-visible { opacity: 1; pointer-events: auto; transform: none; }
.lightbox { position: fixed; inset: 0; z-index: 200; display: flex; align-items: center; justify-content: center; padding: 64px 22px 22px; background: #091318ed; }
.lightbox__viewport { width: 100%; height: 100%; overflow: auto; display: flex; align-items: center; justify-content: center; overscroll-behavior: contain; }
.lightbox img { display: block; flex: none; max-width: 100%; max-height: 100%; width: auto; height: auto; object-fit: contain; border-radius: 6px; }
.lightbox--zoomed .lightbox__viewport { display: block; }
.lightbox--zoomed img { max-width: none; max-height: none; margin: 0 auto; }
.lightbox__magnify { position: absolute; top: 15px; left: 22px; min-height: 42px; padding: 9px 16px; border: 1px solid #ffffff55; border-radius: 7px; background: #ffffff19; color: white; cursor: pointer; font-size: .86rem; }
.lightbox__magnify:hover, .lightbox__magnify[aria-pressed='true'] { background: #ffffff33; }
.lightbox__close { position: absolute; right: 18px; top: 14px; display: grid; place-items: center; width: 44px; height: 44px; color: white; background: #ffffff19; border: 1px solid #ffffff35; border-radius: 50%; font-size: 1.7rem; line-height: 1; cursor: pointer; }
.lightbox__close:hover { background: #ffffff30; }
.notfound { max-width: 760px; min-height: 50vh; padding: 100px 24px 60px; margin: 0 auto; text-align: center; }
.notfound h1 { font: 400 clamp(2.2rem, 5vw, 3.6rem)/1.12 var(--f-head); letter-spacing: -.035em; margin: 0 0 20px; color: var(--c-heading); }
.notfound p { margin: 0 0 28px; }

@media (min-width: 1080px) { .toc-open { display: none; } }
@media (max-width: 1079px) {
  .art-layout { display: block; max-width: 960px; }
  .art-body { padding: 36px 36px 8px; }
  .art-toc { position: static; max-height: none; margin-bottom: 24px; }
  .art-toc__box { padding: 16px; }
  .art-toc ol { columns: 2; column-gap: 16px; }
  .art-toc li { break-inside: avoid; }
  .art-toc.is-open { position: fixed; inset: 0; z-index: 120; display: flex; justify-content: flex-end; padding: 14px; margin: 0; background: #12232f88; overflow: hidden; }
  .art-toc.is-open .art-toc__box { width: min(440px, 100%); max-height: 100%; overflow: auto; padding: 24px 20px 20px; box-shadow: 0 20px 80px #09131833; }
  .art-toc.is-open summary { padding-right: 44px; }
  .art-toc.is-open summary::after { display: none; }
  .art-toc.is-open ol { columns: 1; }
  .art-toc.is-open .toc-close { position: absolute; top: 14px; right: 14px; width: 40px; height: 40px; display: grid; place-items: center; border: 1px solid var(--c-border); border-radius: 7px; background: white; color: var(--c-heading); cursor: pointer; }
}
@media (max-width: 859px) {
  .art-hero__grid { grid-template-columns: 1fr; gap: 28px; }
  .art-hero h1 { font-size: clamp(2.4rem, 7vw, 3.9rem); max-width: 760px; }
  .art-hero__media { width: 100%; max-width: 740px; margin-inline: auto; }
  .art-hero p { max-width: 760px; }
}
@media (max-width: 639px) {
  :root { --header-h: 66px; }
  body { font-size: 1rem; line-height: 1.78; }
  .site-header__inner { padding: 0 18px; gap: 12px; }
  .site-home { gap: 9px; }
  .site-home__name { font-size: 1.12rem; }
  .site-home > svg { width: 32px; height: 32px; padding: 8px; }
  .site-entity { display: none; }
  .toc-open { margin-left: auto; min-height: 40px; padding: 0 10px; font-size: .75rem; }
  .art-hero { padding: 22px 0 30px; }
  .art-hero__inner, .art-layout { padding: 0 18px; }
  .breadcrumb { font-size: .7rem; margin-bottom: 24px; }
  .art-hero h1 { font-size: clamp(2.25rem, 8vw, 3rem); margin: 16px 0 22px; }
  .art-hero p { font-size: .96rem; }
  .art-layout { margin-top: 26px; }
  .art-body { border: 0; border-radius: 9px; padding: 26px 20px 6px; }
  .art-body h2 { font-size: 1.65rem; }
  .art-body h2 { padding-top: 14px; margin-bottom: 18px; }
  .art-body h3 { font-size: 1.08rem; margin-top: 24px; margin-bottom: 10px; }
  .art-body p { margin-bottom: .85em; }
  .art-section { margin-bottom: 20px; padding-bottom: 18px; }
  .art-section > :last-child { margin-bottom: 0; }
  .art-toc ol { columns: 1; }
  .art-figure { margin: 18px auto 20px; }
  .art-figure figcaption { font-size: .73rem; }
  .site-footer { margin-top: 48px; }
  .site-footer__inner { padding: 32px 22px; }
  .to-top { right: 14px; bottom: calc(14px + env(safe-area-inset-bottom)); width: 42px; height: 42px; }
  .lightbox { padding: 64px 12px 20px; }
}
@media (max-width: 359px) { .toc-open span { display: none; } }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}
@media print {
  .site-header, .site-footer, .art-toc, .to-top, .lightbox, .table-hint { display: none !important; }
  body, .art-hero { background: white; color: black; }
  .art-layout, .art-hero__grid { display: block; margin: 0; padding: 0; }
  .art-body { border: 0; padding: 0; }
  .art-section, .art-figure, .info-card { break-inside: avoid; }
}
