/* =========================================================
   FIDES — design tokens
   ========================================================= */
:root{
  --ink:        #0A1214;   /* fond principal, noir à dominante teintée */
  --panel:      #10191C;   /* panneaux, cartes */
  --panel-alt:  #162326;
  --paper:      #F4F4F1;   /* texte clair / fond page, ton "blanc encre" du logo */
  --paper-dim:  #A9B7B9;
  --stone:      #6F8285;   /* texte secondaire */
  --accent:      #42B8CE;   /* turquoise du logo — accent */
  --accent-dark: #2A768C;
  --line:       rgba(244,244,241,0.10);

  --font-display: 'Anton', sans-serif;
  --font-body: 'Zen Kaku Gothic New', 'Hiragino Sans', sans-serif;
  --font-mono: 'JetBrains Mono', monospace;

  --radius: 3px;
  --container: 1080px;
}

*{ box-sizing: border-box; }

[hidden]{ display: none !important; }

html{ scroll-behavior: smooth; }

body{
  margin: 0;
   background: var(--ink);
  color: var(--paper);
  font-family: var(--font-body);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

img{ max-width: 100%; display: block; }
a{ color: inherit; text-decoration: none; }
button{ font-family: inherit; cursor: pointer; }
ul{ list-style: none; margin: 0; padding: 0; }
.mono{ font-family: var(--font-mono); letter-spacing: 0.02em; }

/* focus visibility */
a:focus-visible, button:focus-visible, input:focus-visible{
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce){
  *{ animation-duration: 0.001ms !important; transition-duration: 0.001ms !important; scroll-behavior: auto !important; }
}

/* =========================================================
   Header
   ========================================================= */
.site-header{
  position: sticky; top: 0; z-index: 40;
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 28px;
  background: rgba(20,17,15,0.9);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}

.brand{ display: flex; align-items: center; }
.brand-logo{ height: 44px; width: auto; }

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

.site-nav ul{ display: flex; align-items: center; gap: 28px; }
.site-nav a{
  font-size: 14px; font-weight: 500; letter-spacing: 0.03em;
  color: var(--paper-dim);
  padding: 6px 2px; border-bottom: 2px solid transparent;
  transition: color .2s, border-color .2s;
}
.site-nav a:hover{ color: var(--paper); border-color: var(--accent); }
.nav-cta{ color: var(--paper) !important; }
.soon{ font-size: 13px; color: var(--stone); }
.soon em{ font-style: normal; color: var(--accent); font-size: 11px; }

.nav-toggle{
  display: none; background: none; border: 0; width: 36px; height: 30px;
  flex-direction: column; justify-content: space-between; padding: 0;
}
.nav-toggle span{ height: 2px; background: var(--paper); border-radius: 2px; }

/* =========================================================
   Hero
   ========================================================= */
.hero{
  padding: 80px 28px 70px;
  text-align: center;
  background:
    radial-gradient(ellipse at 50% 10%, rgba(66,184,206,0.16), transparent 75%),
    url('../images/fond.webp') center / cover no-repeat,
    var(--ink);
}
.hero-inner{ max-width: 640px; margin: 0 auto; }

.eyebrow{
  font-family: var(--font-mono);
  font-size: 12px; letter-spacing: 0.18em; text-transform: uppercase;
  color: var(--accent);
  margin: 0 0 14px;
}

.hero-logo{
  width: min(800px, 78vw);
  height: auto;
  margin: 0 auto;
  filter: drop-shadow(0 0 34px rgba(66,184,206,0.28));
  animation: hero-flicker 30s ease-in-out infinite;
}
@keyframes hero-flicker{
  0%, 100%{ transform: scale(1); }
  50%{ transform: scale(1.005); }
}

.hero-tagline{
  color: var(--paper-dim);
  font-size: 17px;
  max-width: 460px;
  margin: 22px auto 36px;
}

/* signature element: reading-direction stamp diagram */
.reading-diagram{
  display: flex; align-items: center; justify-content: center; gap: 10px;
  margin-bottom: 8px;
}
.rd-panel{
  width: 44px; height: 58px;
  border: 2px solid var(--paper-dim);
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-mono); font-size: 15px; color: var(--paper-dim);
  border-radius: 2px;
}
.rd-arrow{
  font-size: 22px; color: var(--accent);
  animation: rd-flow 16s ease-in-out infinite;
}
@keyframes rd-flow{
  0%, 100%{ transform: translateX(0); opacity: .6; }
  50%{ transform: translateX(-2px); opacity: 1; }
}
.reading-diagram-caption{
  font-size: 12.5px; color: var(--stone);
  margin: 0 0 34px;
}

.btn{
  display: inline-block;
  font-family: var(--font-mono); font-weight: 600; font-size: 14px;
  letter-spacing: 0.04em;
  padding: 14px 30px;
  border-radius: 2px;
  border: 1px solid transparent;
  transition: transform .15s ease, background .2s ease;
}
.btn-primary{ background: var(--accent); color: var(--paper); }
.btn-primary:hover{ background: var(--accent-dark); transform: translateY(-1px); }

/* =========================================================
   Sections
   ========================================================= */
.section{
  max-width: var(--container);
  margin: 0 auto;
  padding: 64px 28px;
  border-top: 1px solid var(--line);
}

.section-title{
  font-family: var(--font-display);
  font-size: 26px; letter-spacing: 0.04em;
  display: flex; align-items: baseline; gap: 12px;
  margin: 0 0 26px;
}
.section-title span{
  font-family: var(--font-mono); font-size: 14px; font-weight: 600;
  color: var(--accent);
}

.placeholder-copy{ color: var(--paper-dim); max-width: 640px; }

/* =========================================================
   Reader toolbar
   ========================================================= */
.reading-notice{
  display: flex; align-items: center; gap: 12px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-left: 3px solid var(--accent);
  padding: 14px 16px;
  border-radius: var(--radius);
  margin-bottom: 22px;
}
.reading-notice p{ margin: 0; font-size: 14px; color: var(--paper-dim); flex: 1; }
.reading-notice strong{ color: var(--paper); }
.rn-icon{ width: 20px; height: 20px; flex-shrink: 0; stroke: var(--accent); fill: none; stroke-width: 2; }
#closeNotice{
  background: none; border: 0; color: var(--stone); font-size: 16px; line-height: 1;
  padding: 4px;
}
#closeNotice:hover{ color: var(--paper); }
.reading-notice.is-hidden{ display: none; }

.reader-toolbar{
  display: flex; align-items: center; justify-content: space-between;
  gap: 18px; flex-wrap: wrap;
  margin-bottom: 18px;
}

.mode-switch{
  display: flex; background: var(--panel); border: 1px solid var(--line);
  border-radius: 20px; padding: 3px;
}
.mode-btn{
  display: flex; align-items: center; gap: 7px;
  background: none; border: 0; color: var(--stone);
  font-size: 13px; font-weight: 500;
  padding: 7px 15px; border-radius: 18px;
  transition: background .2s, color .2s;
}
.mode-btn svg{ width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 1.6; }
.mode-btn.is-active{ background: var(--accent); color: var(--paper); }

.page-indicator{ display: flex; align-items: center; gap: 12px; min-width: 200px; }
#pageCounter{ font-size: 13px; color: var(--paper-dim); white-space: nowrap; }
.progress-track{
  position: relative; flex: 1; height: 4px; background: var(--panel-alt);
  border-radius: 2px; overflow: hidden;
}
.progress-fill{
  position: absolute; top: 0; right: 0; height: 100%;
  background: var(--accent); width: 2.6%;
  transition: width .25s ease;
}

.zoom-btn{
  display: flex; align-items: center; gap: 7px;
  background: var(--panel); border: 1px solid var(--line); color: var(--paper-dim);
  font-size: 13px; padding: 8px 14px; border-radius: 18px;
  transition: color .2s, border-color .2s;
}
.zoom-btn svg{ width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 1.8; }
.zoom-btn:hover{ color: var(--paper); border-color: var(--accent); }

/* ad slots */
.ad-slot{
  display: flex; align-items: center; justify-content: center;
  border: 1px dashed var(--line);
  color: var(--stone); font-family: var(--font-mono); font-size: 12px;
  border-radius: var(--radius);
  margin: 18px 0;
}
.ad-slot--leaderboard{ min-height: 90px; }

/* =========================================================
   Reader viewport — horizontal (page) mode
   ========================================================= */
.reader-viewport{ position: relative; }

.page-frame{
  display: flex; justify-content: center; align-items: center;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 14px;
}
.page-frame img{
  width: 100%; height: auto; max-height: 82vh;
  object-fit: contain;
  border-radius: 1px;
  user-select: none;
  cursor: zoom-in;
}

.page-click-zone{
  position: absolute; top: 0; bottom: 0; width: 32%;
  background: none; border: 0; z-index: 5;
  opacity: 0;
}
.zone-next{ left: 0; }   /* japonais : la page suivante est à gauche */
.zone-prev{ right: 0; }  /* la page précédente est à droite */

.nav-arrows{
  display: flex; align-items: center; justify-content: space-between;
  margin-top: 14px;
}
.arrow-btn{
  display: flex; align-items: center; gap: 8px;
  background: var(--panel); border: 1px solid var(--line); color: var(--paper-dim);
  padding: 10px 18px; border-radius: 20px; font-size: 13.5px;
  transition: color .2s, border-color .2s;
}
.arrow-btn svg{ width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2; }
.arrow-btn:hover{ color: var(--paper); border-color: var(--accent); }
.arrow-btn:disabled{ opacity: .35; pointer-events: none; }

/* filmstrip */
.filmstrip{
  display: flex; gap: 8px; overflow-x: auto;
  margin-top: 18px; padding-bottom: 6px;
}
.filmstrip::-webkit-scrollbar{ height: 6px; }
.filmstrip::-webkit-scrollbar-thumb{ background: var(--panel-alt); border-radius: 4px; }
.fs-thumb{
  flex-shrink: 0; width: 92px; height: 64px;
  border: 2px solid transparent; border-radius: 2px;
  overflow: hidden; opacity: .55; background: var(--panel);
  transition: opacity .2s, border-color .2s;
}
.fs-thumb img{ width: 100%; height: 100%; object-fit: cover; }
.fs-thumb.is-active{ opacity: 1; border-color: var(--accent); }
.fs-thumb:hover{ opacity: 1; }

/* =========================================================
   Webtoon mode
   ========================================================= */
.webtoon-viewer{
  display: flex; flex-direction: column; align-items: center;
  gap: 4px;
}
.webtoon-viewer img{
  width: 100%; max-width: 980px;
  cursor: zoom-in;
}
.webtoon-viewer .ad-slot{ width: 100%; max-width: 980px; }

/* =========================================================
   Social
   ========================================================= */
.social-list{ display: flex; gap: 16px; flex-wrap: wrap; }
.social-list a{
  display: flex; align-items: center; gap: 10px;
  background: var(--panel); border: 1px solid var(--line);
  padding: 12px 20px; border-radius: 24px;
  font-size: 14px; font-weight: 500;
  transition: border-color .2s, transform .15s;
}
.social-list a:hover{ border-color: var(--accent); transform: translateY(-2px); }
.social-icon{ width: 20px; height: 20px; }

/* =========================================================
   Footer
   ========================================================= */
.site-footer{
  max-width: var(--container); margin: 0 auto;
  padding: 40px 28px 60px;
  text-align: center;
  color: var(--stone); font-size: 13px;
}

/* =========================================================
   Zoom lightbox
   ========================================================= */
.zoom-overlay{
  position: fixed; inset: 0; z-index: 100;
  background: rgba(10,8,7,0.96);
  display: flex; flex-direction: column;
}
.zoom-toolbar{
  display: flex; align-items: center; justify-content: center; gap: 14px;
  padding: 14px; border-bottom: 1px solid var(--line);
}
.zoom-toolbar button{
  background: var(--panel); border: 1px solid var(--line); color: var(--paper);
  width: 34px; height: 34px; border-radius: 50%; font-size: 16px;
}
.zoom-toolbar .zoom-reset, .zoom-toolbar .zoom-close{
  width: auto; border-radius: 18px; padding: 0 16px; font-size: 13px;
}
.zoom-toolbar .zoom-close{ margin-left: 10px; color: var(--accent); }
#zoomLevel{ min-width: 52px; text-align: center; color: var(--paper-dim); font-size: 13px; }

.zoom-stage{
  flex: 1; overflow: auto; display: flex; align-items: flex-start; justify-content: center;
  padding: 20px; cursor: grab;
}
.zoom-stage.is-grabbing{ cursor: grabbing; }
.zoom-stage img{
  transform-origin: top center;
  transition: transform .08s linear;
  user-select: none;
  max-width: none;
}

/* =========================================================
   Responsive
   ========================================================= */
@media (max-width: 780px){
  .nav-toggle{ display: flex; }
  .site-nav{
    position: absolute; top: 100%; left: 0; right: 0;
    background: var(--ink); border-bottom: 1px solid var(--line);
    max-height: 0; overflow: hidden; transition: max-height .25s ease;
  }
  .site-nav.is-open{ max-height: 300px; }
  .site-nav ul{ flex-direction: column; align-items: flex-start; gap: 0; padding: 10px 28px 20px; }
  .site-nav li{ width: 100%; padding: 10px 0; border-bottom: 1px solid var(--line); }

  .reader-toolbar{ flex-direction: column; align-items: stretch; }
  .page-indicator{ order: 3; }
  .page-frame img{ max-height: 62vh; }
}
