:root {
  --taito: #168bd2;
  --taito-dark: #06689f;
  --red: #e32636;
  --yellow: #ffd52f;
  --ink: #20242a;
  --muted: #66717a;
  --paper: #fff;
  --page: #e9edf0;
  --line: #cbd3d9;
  --soft-blue: #eaf6fc;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; scroll-padding-top: 4.25rem; }

body {
  margin: 0;
  min-width: 280px;
  color: var(--ink);
  background: #cbd2d6;
  font-family: Arial, Helvetica, sans-serif;
  font-size: 1rem;
  line-height: 1.5;
}

.tv-static {
  position: fixed;
  inset: 0;
  z-index: 0;
  width: 100%;
  height: 100%;
  opacity: .2;
  filter: contrast(1.35);
  image-rendering: pixelated;
  pointer-events: none;
}

body::before {
  content: "";
  position: fixed;
  inset: 0 0 auto;
  z-index: 10;
  height: 5px;
  background: linear-gradient(90deg, var(--taito) 0 72%, var(--red) 72% 86%, var(--yellow) 86%);
  pointer-events: none;
}

a { color: var(--taito-dark); text-decoration-thickness: 1px; text-underline-offset: .15em; }
a:hover { color: var(--red); }

a:focus-visible,
input:focus-visible,
textarea:focus-visible { outline: 3px solid var(--red); outline-offset: 3px; }

#global {
  position: relative;
  z-index: 1;
  width: min(100% - 1.5rem, 920px);
  margin: 0 auto;
  padding: 1.25rem 0 1rem;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: stretch;
  min-height: 2.8rem;
  border: 1px solid #aeb9c1;
  background: #fff;
  box-shadow: 0 4px 12px rgba(26, 44, 55, .16);
}

.home-link {
  align-self: stretch;
  display: inline-flex;
  align-items: center;
  gap: .3rem;
  padding: .4rem .6rem;
  color: #fff;
  background: var(--taito);
  font-weight: 800;
  font-size: .72rem;
  text-decoration: none;
  text-transform: uppercase;
  letter-spacing: .02em;
}

.home-link span { font-size: 1rem; line-height: 1; }
.home-link:hover { color: #fff; background: var(--red); }

.menu-toggle { display: none; }

.hero {
  position: relative;
  overflow: hidden;
  margin: 0;
  border: 1px solid var(--line);
  border-bottom: 0;
  background: #fff;
}

.hero::after {
  content: "";
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  height: 7px;
  background: linear-gradient(90deg, var(--taito) 0 78%, var(--red) 78% 89%, var(--yellow) 89%);
}

.hero img { display: block; width: 100%; height: auto; }

.story-nav {
  position: relative;
  flex: 1 1 auto;
  min-width: 0;
  overflow-x: auto;
  border: 0;
  border-left: 1px solid #c7d0d6;
  background: #fff;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.story-nav::-webkit-scrollbar { display: none; }

.story-nav ol {
  display: flex;
  width: 100%;
  min-width: 100%;
  margin: 0;
  padding: .45rem .4rem .35rem;
  list-style: none;
}

.story-nav li {
  position: relative;
  flex: 1 1 0;
  min-width: 5.1rem;
  text-align: center;
}

.story-nav li:not(:last-child)::after {
  content: "";
  position: absolute;
  top: .55rem;
  right: -50%;
  left: 50%;
  height: 2px;
  background: #b8c4cb;
}

.story-nav a {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: .2rem;
  padding: 0 .25rem;
  color: #45535d;
  font-size: .66rem;
  font-weight: 700;
  line-height: 1.2;
  text-decoration: none;
  white-space: nowrap;
}

.story-nav a span {
  display: grid;
  width: 1.2rem;
  height: 1.2rem;
  place-items: center;
  border: 2px solid #fff;
  border-radius: 50%;
  color: #fff;
  background: var(--taito);
  box-shadow: 0 0 0 1px var(--taito-dark);
  font-size: .52rem;
}

.story-nav a:hover { color: var(--red); }
.story-nav a:hover span { background: var(--red); box-shadow: 0 0 0 1px #a50e1c; }
.story-nav a[aria-current="location"] { color: #101820; }
.story-nav a[aria-current="location"] span { background: var(--red); box-shadow: 0 0 0 1px #a50e1c, 0 0 0 4px rgba(227, 38, 54, .12); }

#contenu {
  --gutter: clamp(1.25rem, 4vw, 2.75rem);
  position: relative;
  padding: 1.65rem var(--gutter) 0;
  border: 1px solid var(--line);
  border-top: 0;
  background: var(--paper);
  box-shadow: 0 5px 18px rgba(28, 48, 61, .13);
}

#contenu br { line-height: .65; }

#contenu > b[id] {
  position: relative;
  display: block;
  margin: 1.8rem 0 0;
  color: #101820;
  font-family: "Arial Black", Impact, sans-serif;
  font-size: clamp(1.15rem, 3vw, 1.55rem);
  line-height: 1.15;
  letter-spacing: -.025em;
}

#contenu > b[id]:first-child { margin-top: 0; }

#contenu > b[id],
#commentaires { scroll-margin-top: 4.25rem; }

#contenu > b[id]::before {
  content: "";
  position: absolute;
  top: .05em;
  left: -1rem;
  display: block;
  width: .42rem;
  height: 1em;
  background: var(--taito);
  box-shadow: 3px 0 0 var(--red);
}

#contenu > img[src$="trait.png"] {
  display: block;
  width: 100%;
  height: 2px;
  margin: .3rem 0 .25rem;
  object-fit: cover;
  opacity: .35;
}

#contenu > img[src$="trait.png"] + i {
  display: block;
  margin: 0 0 .65rem 1rem;
  color: #485761;
  font-family: Arial, Helvetica, sans-serif;
  font-size: 1rem;
  font-style: normal;
  font-weight: 700;
  line-height: 1.35;
}

#contenu > div[style*="table-cell"] {
  display: inline-block !important;
  width: auto !important;
  min-width: min(100%, 15rem);
  margin: .4rem 0 .8rem;
  padding: .65rem .85rem;
  vertical-align: top;
  border-top: 2px solid var(--taito);
  background: var(--soft-blue);
  font-size: .93rem;
}

center {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: .65rem;
  margin: .55rem 0;
}

center a { display: inline-flex; }

center img {
  display: block;
  max-width: 100%;
  height: auto;
}

center a img,
center iframe {
  border: 1px solid #aeb8c0;
  background: #fff;
  box-shadow: 2px 2px 0 #dce2e6;
}

center a img { transition: border-color .15s ease, box-shadow .15s ease, transform .15s ease; }

center a:hover img {
  border-color: var(--taito);
  box-shadow: 3px 3px 0 rgba(22, 139, 210, .22);
  transform: translateY(-1px);
}

iframe { width: min(100%, 190px); min-height: 267px; }

.final-hardware {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: start;
  gap: .75rem;
  margin: .35rem 0 .8rem;
}

.final-hardware img {
  display: block;
  width: 100%;
  height: auto;
}

#commentaires {
  margin: 2rem calc(-1 * var(--gutter)) 0;
  padding: 1.35rem var(--gutter) 1.75rem;
  border-top: 6px solid var(--taito);
  background: #f4f6f7;
}

#commentaires > hr { display: none; }

#commentaires > b {
  display: block;
  margin: 0 0 .85rem;
  color: #101820;
  font-family: "Arial Black", Impact, sans-serif;
  font-size: clamp(1.2rem, 3vw, 1.55rem);
  line-height: 1.2;
}

.comment {
  width: 100%;
  margin: 0 0 .65rem;
  padding: .75rem .9rem .6rem;
  overflow-wrap: anywhere;
  border: 1px solid var(--line);
  border-left: 4px solid var(--taito);
  background: #fff;
}

.comment--author { border-left-color: var(--red); background: #fffdf7; }
.comment:target { animation: published-comment 1.8s ease-out; }
.comment__body { color: var(--ink); }

.comment__meta {
  margin-top: .4rem;
  color: var(--muted);
  font-size: .8rem;
  line-height: 1.35;
  text-align: right;
}

.comment__meta strong { color: var(--red); }
.comments__all { margin: .75rem 0 1rem; text-align: right; }

.comments__all a {
  display: inline-block;
  padding: .35rem .65rem;
  border: 1px solid var(--taito);
  background: #fff;
  font-size: .85rem;
  font-weight: 700;
  text-decoration: none;
}

.comment-form { width: 100%; }

.comment-form textarea,
.comment-form input[type="text"] {
  width: 100%;
  min-height: 2.65rem;
  padding: .65rem .75rem;
  border: 1px solid #97a5af;
  border-radius: 0;
  color: var(--ink);
  background: #fff;
  font: inherit;
}

.comment-form textarea { display: block; min-height: 7.5rem; resize: vertical; }

.comment-form textarea::placeholder,
.comment-form input::placeholder { color: #65727c; opacity: 1; }

.comment-form__actions {
  display: grid;
  grid-template-columns: minmax(10rem, 1fr) auto auto;
  align-items: end;
  gap: .6rem;
  margin-top: .6rem;
}

.comment-form input[type="submit"] {
  min-width: 6.5rem;
  padding: .65rem 1.1rem;
  border: 1px solid var(--taito-dark);
  color: #fff;
  background: var(--taito);
  box-shadow: 2px 2px 0 #a7cfe5;
  font: 700 .92rem/1 Arial, sans-serif;
  cursor: pointer;
}

.comment-form input[type="submit"]:hover { background: var(--taito-dark); }
.comment-form input[type="submit"]:active { box-shadow: none; transform: translate(2px, 2px); }
.comment-form input[type="submit"]:disabled { opacity: .65; cursor: wait; }

.captcha-row {
  display: grid;
  grid-template-columns: auto 4.5rem;
  align-items: center;
  justify-content: end;
  gap: .65rem;
  color: #47545d;
  font-size: .9rem;
  font-weight: 700;
}

.captcha-row input[type="number"] {
  width: 100%;
  min-height: 2.65rem;
  padding: .5rem;
  border: 1px solid #97a5af;
  border-radius: 0;
  color: var(--ink);
  background: #fff;
  font: inherit;
  text-align: center;
}

.showme {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  min-height: 0 !important;
  margin: -1px !important;
  padding: 0 !important;
  overflow: hidden !important;
  clip: rect(0 0 0 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

#commback { min-height: 1px; margin-top: .65rem; }

.comment-feedback {
  padding: .7rem .85rem;
  border-left: 4px solid var(--taito);
  background: #e8f5fc;
  color: #075a87;
  font-weight: 700;
}

.comment-feedback--pending { border-left-color: var(--yellow); background: #fff9dd; color: #665400; }
.comment-feedback--success { border-left-color: #2d9b55; background: #eaf7ee; color: #176534; }
.comment-feedback--error { border-left-color: var(--red); background: #fff0f1; color: #9c1724; }

.page-footer {
  display: flex;
  justify-content: center;
  padding: 1.4rem 0 .55rem;
}

.page-footer a {
  display: inline-flex;
  align-items: center;
  gap: .7rem;
  padding: .65rem 1rem .65rem .7rem;
  border: 1px solid #9eabb4;
  color: #26343d;
  background: rgba(255, 255, 255, .9);
  box-shadow: 3px 3px 0 rgba(41, 60, 71, .14);
  font-size: .85rem;
  text-decoration: none;
}

.page-footer a span {
  display: grid;
  width: 2rem;
  height: 2rem;
  place-items: center;
  color: #fff;
  background: var(--taito);
  font-size: 1.25rem;
}

.page-footer a:hover { color: #fff; border-color: var(--taito-dark); background: var(--taito-dark); }
.page-footer a:hover span { background: #fff; color: var(--taito-dark); }

@media (max-width: 640px) {
  #global { width: 100%; padding: 5px 0 0; }
  .topbar, .hero, .story-nav, #contenu { border-inline: 0; }
  .home-link { flex: 0 0 auto; justify-content: center; padding-inline: .5rem; font-size: .7rem; }
  .menu-toggle {
    display: grid;
    width: 2.8rem;
    margin-left: auto;
    padding: .65rem .75rem;
    place-content: center;
    gap: .27rem;
    border: 0;
    border-left: 1px solid #c7d0d6;
    color: #26343d;
    background: #fff;
    cursor: pointer;
  }
  .menu-toggle span {
    display: block;
    width: 1.2rem;
    height: 2px;
    background: currentColor;
    transition: transform .18s ease, opacity .18s ease;
  }
  .menu-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(.29rem) rotate(45deg); }
  .menu-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
  .menu-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-.29rem) rotate(-45deg); }
  .story-nav {
    position: absolute;
    top: 100%;
    right: 0;
    left: 0;
    max-height: 0;
    overflow: hidden;
    border: 0;
    border-bottom: 1px solid #aeb9c1;
    opacity: 0;
    visibility: hidden;
    box-shadow: 0 8px 16px rgba(26, 44, 55, .18);
    transition: max-height .2s ease, opacity .15s ease, visibility .15s ease;
  }
  .story-nav--open {
    max-height: calc(100vh - 3.5rem);
    overflow-y: auto;
    opacity: 1;
    visibility: visible;
  }
  .story-nav ol {
    display: block;
    width: 100%;
    padding: .25rem 0;
  }
  .story-nav li { min-width: 0; text-align: left; }
  .story-nav li:not(:last-child)::after { display: none; }
  .story-nav a {
    flex-direction: row;
    gap: .7rem;
    min-height: 2.8rem;
    padding: .55rem 1rem;
    border-bottom: 1px solid #e1e6e9;
    font-size: .85rem;
  }
  .story-nav li:last-child a { border-bottom: 0; }
  .story-nav a span { flex: 0 0 auto; }
  #contenu { --gutter: 1rem; padding-top: 1.1rem; }
  #contenu > b[id] { margin-top: 1.45rem; }
  #contenu > div[style*="table-cell"] { display: block !important; margin-block: 0 .35rem; }
  #commentaires { margin-top: 1.6rem; padding-block: 1rem; }
  .comment-form__actions { grid-template-columns: 1fr; }
  .final-hardware { grid-template-columns: 1fr; }
  .captcha-row { grid-template-columns: 1fr 5.5rem; justify-content: stretch; }
  .comment-form input[type="submit"] { min-height: 2.9rem; }
}

@keyframes published-comment {
  0%, 45% { border-color: var(--taito); background: #dff3ff; box-shadow: 0 0 0 5px rgba(22, 139, 210, .18); }
  100% { box-shadow: none; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: .01ms !important; }
}
