/* ============================================================
   Le Manuel — Flipbook éditorial
   Palette : crème éditorial + bleu #1a74cc + vert #98d83e
   ============================================================ */

.pdf-page{width:100%;height:100%;object-fit:cover;display:block}

:root{
  /* Crème / encre */
  --cream:    #F3ECDD;
  --cream-2:  #EBE2CF;
  --paper:    #F5F0E4;
  --paper-2:  #EFE7D6;
  --ink:      #1B2433;
  --ink-soft: #4A5468;

  /* Bleu principal #1a74cc + nuances */
  --blue-900: #0D3A66;
  --blue-800: #114C86;
  --blue-700: #155EA8;
  --blue-500: #1A74CC;
  --blue-300: #74AEE8;

  /* Accent vert #98d83e */
  --green:    #98D83E;
  --green-700:#6FA82A;
  --brass:    #98D83E;

  --line:     rgba(27,36,51,.14);
  --shadow:   0 30px 80px -30px rgba(8,22,42,.55);

  --ff-display: "Cormorant Garamond", Georgia, serif;
  --ff-body:    "Spectral", Georgia, serif;
  --ff-ui:      "Archivo", system-ui, sans-serif;
}

*{ box-sizing:border-box; }
html,body{ margin:0; padding:0; }
body{
  font-family:var(--ff-body);
  color:var(--ink);
  background:var(--cream);
  -webkit-font-smoothing:antialiased;
  text-rendering:optimizeLegibility;
}
img{ display:block; max-width:100%; }

.u-mono{ font-family:"Archivo", monospace; }

/* ============================================================
   RTL / ARABE — swap des polices + ajustements direction
   ============================================================ */
html[dir="rtl"]{
  --ff-display:"Cairo","Tajawal",serif;
  --ff-body:"Tajawal","Cairo",sans-serif;
  --ff-ui:"Cairo","Tajawal",sans-serif;
}
html[dir="rtl"] em{ font-style:normal; }
/* le lecteur reste en LTR : sens de feuilletage et ordre des commandes conservés */
html[dir="rtl"] .reader-center,
html[dir="rtl"] .stage,
html[dir="rtl"] .controls,
html[dir="rtl"] .thumbs,
html[dir="rtl"] .book{ direction:ltr; }
/* la dimension pub reste lisible en chiffres latins */
html[dir="rtl"] .ad-dim{ direction:ltr; }
.eyebrow{
  font-family:var(--ff-ui);
  font-size:12px;
  letter-spacing:.28em;
  text-transform:uppercase;
  font-weight:600;
}

/* ============================================================
   TOP BAR
   ============================================================ */
.topbar{
  position:fixed; inset:0 0 auto 0; z-index:60;
  display:flex; align-items:center; justify-content:space-between;
  padding:20px clamp(20px,5vw,64px);
  transition:background .4s ease, box-shadow .4s ease, padding .4s ease;
}
.topbar.scrolled{
  background:rgba(243,236,221,.86);
  backdrop-filter:blur(12px);
  box-shadow:0 1px 0 var(--line);
  padding-top:14px; padding-bottom:14px;
}
.brand{ display:flex; align-items:center; gap:12px; text-decoration:none; color:var(--ink); }
.brand-logo{ height:38px; width:auto; max-width:199px; display:block; }
.topnav{ display:flex; gap:32px; align-items:center; }
.topnav a{
  font-family:var(--ff-ui); font-size:13px; letter-spacing:.04em;
  color:var(--ink-soft); text-decoration:none; transition:color .2s;
}
.topnav a:hover{ color:var(--blue-700); }
.btn-nav{
  font-family:var(--ff-ui); font-size:12.5px; letter-spacing:.08em; font-weight:600;
  padding:9px 18px; border-radius:999px;
  background:var(--blue-800); color:var(--cream); text-decoration:none;
  transition:background .2s, transform .2s;
}
.btn-nav:hover{ background:var(--blue-900); transform:translateY(-1px); }
@media (max-width:880px){ .topnav .lnk{ display:none; } }

/* ============================================================
   HERO
   ============================================================ */
.hero{
  position:relative; min-height:100vh;
  display:grid; grid-template-columns:1.05fr .95fr; align-items:center;
  gap:clamp(24px,4vw,56px); padding:120px clamp(20px,5vw,64px) 80px;
  overflow:hidden;
}
.hero::before{
  content:""; position:absolute; inset:0; z-index:0;
  background:
    radial-gradient(900px 600px at 88% 18%, rgba(44,121,192,.10), transparent 60%),
    radial-gradient(700px 500px at 6% 90%, rgba(179,139,77,.08), transparent 60%);
}
.hero-copy{ position:relative; z-index:2; max-width:560px; }
.hero .eyebrow{ color:var(--blue-700); margin-bottom:22px; display:flex; align-items:center; gap:12px; }
.hero .eyebrow::before{ content:""; width:34px; height:1px; background:var(--brass); }
.hero h1{
  font-family:var(--ff-display); font-weight:600;
  font-size:clamp(48px,7vw,92px); line-height:.96; letter-spacing:-.01em;
  margin:0 0 26px;
}
.hero h1 em{ font-style:italic; color:var(--blue-700); }
.hero-lede{
  font-size:clamp(17px,1.5vw,20px); line-height:1.6; color:var(--ink-soft);
  max-width:46ch; margin:0 0 36px; text-wrap:pretty;
}
.hero-actions{ display:flex; gap:16px; align-items:center; flex-wrap:wrap; }
.btn{
  font-family:var(--ff-ui); font-weight:600; font-size:14px; letter-spacing:.04em;
  border:none; cursor:pointer; text-decoration:none;
  display:inline-flex; align-items:center; gap:10px;
  padding:15px 26px; border-radius:999px; transition:transform .2s, background .2s, box-shadow .2s;
}
.btn-primary{ background:var(--blue-800); color:var(--cream); box-shadow:0 14px 30px -14px rgba(14,42,78,.7); }
.btn-primary:hover{ background:var(--blue-900); transform:translateY(-2px); }
.btn-ghost{ background:transparent; color:var(--ink); border:1px solid var(--line); }
.btn-ghost:hover{ border-color:var(--blue-700); color:var(--blue-700); }
.btn svg{ width:17px; height:17px; }

.hero-stats{ display:flex; gap:34px; margin-top:52px; }
.hero-stats .stat .n{ font-family:var(--ff-display); font-size:36px; font-weight:600; line-height:1; color:var(--blue-800); }
.hero-stats .stat .l{ font-family:var(--ff-ui); font-size:11px; letter-spacing:.16em; text-transform:uppercase; color:var(--ink-soft); margin-top:8px; }

/* Hero book mock */
.hero-art{ position:relative; z-index:1; display:grid; place-items:center; height:100%; }
.book-mock{
  position:relative; width:min(340px,80%); aspect-ratio:3/4;
  transform:rotateY(-22deg) rotateX(6deg) rotate(-2deg);
  transform-style:preserve-3d;
  filter:drop-shadow(0 50px 60px rgba(8,22,42,.45));
  transition:transform .6s cubic-bezier(.2,.8,.2,1);
}
.hero-art:hover .book-mock{ transform:rotateY(-14deg) rotateX(4deg) rotate(-1deg); }
.book-mock .cover{
  position:absolute; inset:0; border-radius:6px 12px 12px 6px;
  background:
    linear-gradient(140deg,var(--blue-700),var(--blue-900) 70%);
  padding:38px 34px; color:var(--cream);
  display:flex; flex-direction:column; justify-content:space-between;
  box-shadow:inset 0 0 0 1px rgba(255,255,255,.06), inset 18px 0 32px -28px rgba(0,0,0,.8);
}
.book-mock .cover::before{
  content:""; position:absolute; left:14px; top:14px; bottom:14px; width:1px;
  background:linear-gradient(var(--brass),transparent);
  opacity:.5;
}
.book-mock .spine{
  position:absolute; left:-14px; top:0; bottom:0; width:14px;
  background:linear-gradient(var(--blue-900),#0a1f3a);
  transform:rotateY(90deg) translateX(-7px);
  border-radius:3px 0 0 3px;
}
.bm-top .bm-kick{ font-family:var(--ff-ui); font-size:10px; letter-spacing:.3em; text-transform:uppercase; opacity:.8; }
.bm-mid h3{ font-family:var(--ff-display); font-weight:600; font-size:42px; line-height:1; margin:0; }
.bm-mid p{ font-family:var(--ff-body); font-style:italic; opacity:.85; margin:10px 0 0; font-size:15px; }
.bm-bot{ display:flex; align-items:flex-end; justify-content:space-between; }
.bm-bot .yr{ font-family:var(--ff-ui); font-size:11px; letter-spacing:.2em; opacity:.8; }
.bm-seal{ width:42px; height:42px; border:1px solid rgba(255,255,255,.4); border-radius:50%; display:grid; place-items:center; font-family:var(--ff-display); font-size:18px; }

@media (max-width:900px){
  .hero{ grid-template-columns:1fr; text-align:left; }
  .hero-art{ display:none; }
}

/* ============================================================
   READER SECTION
   ============================================================ */
.reader{
  position:relative;
  background:
    radial-gradient(1200px 700px at 50% -10%, var(--blue-800), var(--blue-900) 70%);
  padding:84px clamp(16px,4vw,48px) 64px;
  color:var(--cream);
}
.reader::before{
  content:""; position:absolute; inset:0;
  background:radial-gradient(900px 500px at 50% 120%, rgba(0,0,0,.5), transparent 60%);
  pointer-events:none;
}
.reader-head{ position:relative; text-align:center; max-width:680px; margin:0 auto 44px; }
.reader-head .eyebrow{ color:var(--blue-300); justify-content:center; display:flex; gap:12px; align-items:center; }
.reader-head .eyebrow::before,
.reader-head .eyebrow::after{ content:""; width:30px; height:1px; background:rgba(111,166,216,.5); }
.reader-head h2{ font-family:var(--ff-display); font-weight:600; font-size:clamp(34px,5vw,56px); margin:14px 0 10px; }
.reader-head p{ color:rgba(243,236,221,.72); font-size:16px; line-height:1.6; margin:0; }

.book-selector{
  display:flex; flex-wrap:wrap; justify-content:center; gap:10px;
  max-width:min(94vw,920px); margin:28px auto 0;
}
.book-chip{
  font-family:var(--ff-ui); font-size:13px; font-weight:600; letter-spacing:.02em;
  padding:9px 18px; border-radius:999px; cursor:pointer;
  border:1px solid rgba(243,236,221,.3); background:transparent; color:var(--cream);
  transition:background .2s, color .2s, border-color .2s;
}
.book-chip:hover{ border-color:var(--cream); }
.book-chip.active{ background:var(--cream); color:var(--blue-900); border-color:var(--cream); }

/* Zone capturée en plein écran : stage + barre de progression + contrôles */
.fs-zone:fullscreen{
  display:flex; flex-direction:column; justify-content:center;
  background:var(--blue-900); padding:24px clamp(16px,4vw,48px);
}
.fs-zone:fullscreen{ height:100%; }
.fs-zone:fullscreen .stage{
  flex:1 1 auto; min-height:0;
  align-items:center;
}
.fs-zone:fullscreen .book{
  width:auto; height:100%; max-width:100%; max-height:100%;
}
.fs-zone{ position:relative; }
.fs-close{ display:none; }
.fs-zone:fullscreen .fs-close{
  display:flex; align-items:center; justify-content:center;
  position:absolute; top:18px; right:18px; z-index:80;
  width:42px; height:42px; border-radius:50%; border:0; cursor:pointer;
  background:rgba(243,236,221,.92); color:var(--blue-900);
  box-shadow:0 12px 30px -12px rgba(0,0,0,.6);
}
.fs-close svg{ width:20px; height:20px; }
.fs-close:hover{ background:#fff; }

/* Stage + book */
.stage{
  position:relative; width:100%;
  display:flex; justify-content:center;
  perspective:2600px;
  padding:8px 0 4px;
}
.book{
  position:relative;
  width:100%;
  max-width:920px;
  aspect-ratio:3/2;
  transform-style:preserve-3d;
  transition:transform .35s ease;
  cursor:zoom-in;
}
.book.zoomed{
  z-index:60;
  cursor:grab;
}
.book.zoomed.panning{
  cursor:grabbing;
  transition:none;
}
.book::after{ /* spine shadow */
  content:""; position:absolute; top:0; bottom:0; left:50%; width:60px; transform:translateX(-50%);
  background:linear-gradient(90deg,transparent,rgba(0,0,0,.28),transparent);
  z-index:50; pointer-events:none;
}
.book-base{ /* the back stack edge giving thickness */
  position:absolute; inset:0;
  background:var(--paper);
  border-radius:4px;
  box-shadow:var(--shadow);
}

.leaf{
  position:absolute; top:0; right:0; width:50%; height:100%;
  transform-origin:left center;
  transform-style:preserve-3d;
  transition:transform .95s cubic-bezier(.42,0,.16,1);
  will-change:transform;
}
.leaf.flipped{ transform:rotateY(-180deg); }
.book.no-anim .leaf{ transition:none !important; }
.book.no-anim .gloss{ animation:none !important; }

.face{
  position:absolute; inset:0;
  backface-visibility:hidden;
  overflow:hidden;
  background:var(--paper);
  box-shadow:inset 0 0 60px -30px rgba(27,36,51,.25);
}
.face.front{ border-radius:0 4px 4px 0; transform:rotateY(0deg); }
.face.back{ border-radius:4px 0 0 4px; transform:rotateY(180deg); }
/* inner gutter shadow toward spine */
.face.front::after{
  content:""; position:absolute; top:0; bottom:0; left:0; width:42px;
  background:linear-gradient(90deg,rgba(27,36,51,.16),transparent);
  pointer-events:none; z-index:8;
}
.face.back::after{
  content:""; position:absolute; top:0; bottom:0; right:0; width:42px;
  background:linear-gradient(270deg,rgba(27,36,51,.16),transparent);
  pointer-events:none; z-index:8;
}

/* moving sheen for realistic curl */
.gloss{
  position:absolute; inset:0; z-index:9; pointer-events:none; opacity:0;
  background:linear-gradient(90deg, rgba(0,0,0,.32), rgba(255,255,255,.05) 45%, transparent 75%);
}
.leaf.turn-fwd .front .gloss{ animation:glossFwd var(--turn,.95s) ease both; }
.leaf.turn-bwd .back  .gloss{ animation:glossBwd var(--turn,.95s) ease both; }
@keyframes glossFwd{ 0%{opacity:0} 45%{opacity:.5} 100%{opacity:0} }
@keyframes glossBwd{ 0%{opacity:0} 55%{opacity:.5} 100%{opacity:0} }

/* clickable edge hint zones */
.edge{
  position:absolute; top:0; bottom:0; width:14%; z-index:40; cursor:pointer;
  display:flex; align-items:center; opacity:0; transition:opacity .25s;
}
.edge.left{ left:0; justify-content:flex-start; padding-left:10px; }
.edge.right{ right:0; justify-content:flex-end; padding-right:10px; }
.stage:hover .edge{ opacity:1; }
.edge .chev{
  width:46px; height:46px; border-radius:50%;
  background:rgba(243,236,221,.92); color:var(--blue-900);
  display:grid; place-items:center; box-shadow:0 12px 30px -12px rgba(0,0,0,.6);
  transition:transform .2s, background .2s;
}
.edge:hover .chev{ transform:scale(1.08); background:#fff; }
.edge.disabled{ opacity:0 !important; pointer-events:none; }

/* ============================================================
   PAGE CONTENT (placeholder/back-office templates)
   ============================================================ */
.pg{ position:absolute; inset:0; padding:clamp(20px,3.4vw,42px); display:flex; flex-direction:column; }
.pg.cream{ background:linear-gradient(135deg,var(--paper),var(--paper-2)); color:var(--ink); }
.pg.blue{ background:linear-gradient(150deg,var(--blue-700),var(--blue-900)); color:var(--cream); }
.pg-num{ position:absolute; bottom:18px; font-family:var(--ff-ui); font-size:11px; letter-spacing:.18em; color:var(--ink-soft); }
.face.front .pg-num{ right:24px; }
.face.back  .pg-num{ left:24px; }
.pg.blue .pg-num{ color:rgba(243,236,221,.6); }

.pg-kicker{ font-family:var(--ff-ui); font-size:11px; letter-spacing:.26em; text-transform:uppercase; color:var(--blue-700); margin-bottom:14px; }
.pg.blue .pg-kicker{ color:var(--blue-300); }
.pg h3{ font-family:var(--ff-display); font-weight:600; font-size:clamp(24px,3.4vw,40px); line-height:1.04; margin:0 0 16px; }
.pg .lead{ font-style:italic; color:var(--ink-soft); font-size:clamp(13px,1.5vw,16px); line-height:1.55; margin:0 0 18px; }

/* faux text bars */
.tlines{ display:flex; flex-direction:column; gap:clamp(7px,1.1vw,11px); margin-top:6px; }
.tline{ height:6px; border-radius:3px; background:rgba(27,36,51,.12); }
.tline.s90{ width:90%; } .tline.s80{ width:80%; } .tline.s70{ width:70%; }
.tline.s60{ width:60%; } .tline.s50{ width:50%; } .tline.full{ width:100%; }
.tgap{ height:10px; }

/* image placeholder */
.imgph{
  position:relative; border-radius:5px; overflow:hidden; border:1px solid var(--line);
  background:
    repeating-linear-gradient(45deg, rgba(27,36,51,.05) 0 10px, rgba(27,36,51,.02) 10px 20px),
    var(--paper-2);
  display:grid; place-items:center; color:var(--ink-soft);
}
.imgph .lbl{ font-family:"Archivo",monospace; font-size:11px; letter-spacing:.2em; text-transform:uppercase; }
.imgph::after{ content:""; position:absolute; inset:0; box-shadow:inset 0 0 0 1px rgba(27,36,51,.05); }

/* cover */
.cover-pg{ justify-content:space-between; }
.cover-pg .c-top .ck{ font-family:var(--ff-ui); font-size:11px; letter-spacing:.32em; text-transform:uppercase; opacity:.82; }
.cover-pg .c-rule{ width:46px; height:1px; background:var(--brass); margin:18px 0; }
.cover-pg h2{ font-family:var(--ff-display); font-weight:600; font-size:clamp(34px,5vw,58px); line-height:.98; margin:0; }
.cover-pg .c-sub{ font-style:italic; opacity:.86; margin-top:14px; font-size:clamp(14px,1.6vw,18px); }
.cover-pg .c-bot{ display:flex; align-items:flex-end; justify-content:space-between; }
.cover-pg .c-seal{ width:54px; height:54px; border:1px solid rgba(255,255,255,.4); border-radius:50%; display:grid; place-items:center; font-family:var(--ff-display); font-size:22px; }

/* section opener */
.sec-pg{ justify-content:center; }
.sec-pg .s-no{ font-family:var(--ff-display); font-weight:600; font-size:clamp(64px,11vw,128px); line-height:.8; color:var(--blue-500); opacity:.9; }
.sec-pg h3{ font-size:clamp(26px,3.8vw,44px); margin-top:8px; }
.sec-pg .s-rule{ width:60px; height:2px; background:var(--brass); margin:20px 0; }

/* TOC */
.toc-pg .toc-row{ display:flex; align-items:baseline; gap:10px; padding:11px 0; border-bottom:1px solid var(--line); }
.toc-pg .toc-row .t-no{ font-family:var(--ff-ui); font-size:12px; letter-spacing:.1em; color:var(--blue-700); width:30px; }
.toc-pg .toc-row .t-name{ font-family:var(--ff-display); font-size:clamp(17px,2vw,23px); }
.toc-pg .toc-row .t-dots{ flex:1; border-bottom:1px dotted rgba(27,36,51,.3); transform:translateY(-4px); }
.toc-pg .toc-row .t-pg{ font-family:var(--ff-ui); font-size:12px; color:var(--ink-soft); }

/* ============================================================
   CONTROLS
   ============================================================ */
.controls{
  position:relative; z-index:5;
  display:flex; align-items:center; justify-content:center; gap:10px;
  margin:30px auto 0; flex-wrap:wrap;
}
.ctrl{
  display:inline-flex; align-items:center; gap:9px;
  font-family:var(--ff-ui); font-size:13px; letter-spacing:.03em; font-weight:600;
  padding:11px 16px; border-radius:999px; cursor:pointer;
  background:rgba(243,236,221,.10); color:var(--cream);
  border:1px solid rgba(243,236,221,.18);
  transition:background .2s, border-color .2s, transform .2s;
}
.ctrl:hover{ background:rgba(243,236,221,.18); transform:translateY(-1px); }
.ctrl:disabled{ opacity:.35; cursor:default; transform:none; }
.ctrl svg{ width:16px; height:16px; }
.pageind{
  font-family:var(--ff-ui); font-size:13px; letter-spacing:.12em;
  min-width:120px; text-align:center; color:rgba(243,236,221,.92);
}
.pageind b{ color:#fff; }

/* progress */
.progress{
  width:100%; max-width:920px; height:3px; border-radius:3px; margin:22px auto 0;
  background:rgba(243,236,221,.16); overflow:hidden;
}
.progress .bar{ height:100%; width:0; background:linear-gradient(90deg,var(--blue-300),var(--brass)); transition:width .5s ease; }

/* thumbnails */
.thumbs{
  display:flex; gap:10px; overflow-x:auto; padding:22px 4px 6px;
  max-width:min(94vw,920px); margin:8px auto 0; scroll-behavior:smooth;
}
.thumbs[hidden]{ display:none; }
.thumbs::-webkit-scrollbar{ height:6px; }
.thumbs::-webkit-scrollbar-thumb{ background:rgba(243,236,221,.25); border-radius:6px; }
.thumb{
  flex:0 0 auto; width:66px; aspect-ratio:3/4; border-radius:3px; cursor:pointer;
  overflow:hidden; position:relative; border:2px solid transparent;
  background:var(--paper); transition:transform .2s, border-color .2s;
}
.thumb:hover{ transform:translateY(-3px); }
.thumb.active{ border-color:var(--blue-300); }
.thumb .tn{ position:absolute; inset:0; display:grid; place-items:center; font-family:var(--ff-ui); font-size:12px; color:var(--ink-soft); }
.thumb.blue{ background:linear-gradient(150deg,var(--blue-700),var(--blue-900)); }
.thumb.blue .tn{ color:rgba(243,236,221,.8); }

/* ============================================================
   FOOTER
   ============================================================ */
.footer{
  background:var(--cream); color:var(--ink);
  padding:64px clamp(20px,5vw,64px) 40px;
  display:grid; grid-template-columns:1.4fr 1fr 1fr; gap:40px;
  border-top:1px solid var(--line);
}
.footer .f-brand .brand-logo{ margin-bottom:16px; height:42px; max-width:199px; }
.footer h4{ font-family:var(--ff-ui); font-size:11px; letter-spacing:.2em; text-transform:uppercase; color:var(--ink-soft); margin:0 0 16px; }
.footer p{ color:var(--ink-soft); line-height:1.6; font-size:14px; margin:0; max-width:34ch; }
.footer ul{ list-style:none; margin:0; padding:0; display:flex; flex-direction:column; gap:10px; }
.footer ul a{ color:var(--ink); text-decoration:none; font-size:14px; }
.footer ul a:hover{ color:var(--blue-700); }
.footer-bottom{
  grid-column:1/-1; display:flex; justify-content:space-between; flex-wrap:wrap; gap:12px;
  margin-top:30px; padding-top:22px; border-top:1px solid var(--line);
  font-family:var(--ff-ui); font-size:12px; color:var(--ink-soft); letter-spacing:.04em;
}
@media (max-width:760px){ .footer{ grid-template-columns:1fr 1fr; } .footer .f-brand{ grid-column:1/-1; } }

/* fullscreen */
.reader:fullscreen{ display:flex; flex-direction:column; justify-content:center; padding:32px; }
.reader:fullscreen .reader-head{ margin-bottom:20px; }
.reader:fullscreen .thumbs{ display:none; }
.reader:fullscreen .adrail{ display:none; }
.reader:fullscreen .reader-layout{ grid-template-columns:1fr; }

/* ============================================================
   TABS (onglets de navigation)
   ============================================================ */
.tabs{ display:flex; gap:6px; align-items:center; }
.tab{
  font-family:var(--ff-ui); font-size:13.5px; letter-spacing:.04em; font-weight:600;
  color:var(--ink-soft); background:transparent; border:none; cursor:pointer;
  padding:9px 18px; border-radius:999px; position:relative;
  transition:color .2s, background .2s;
}
.tab:hover{ color:var(--blue-700); }
.tab.active{ color:var(--cream); background:var(--blue-800); }
.tab.active:hover{ color:var(--cream); }

/* bouton de langue */
.lang-btn{
  display:inline-flex; align-items:center; gap:7px;
  font-family:var(--ff-ui); font-size:13px; font-weight:700; letter-spacing:.04em;
  color:var(--blue-800); background:transparent; cursor:pointer;
  border:1px solid var(--line); border-radius:999px; padding:7px 13px;
  margin-left:6px; transition:background .2s, color .2s, border-color .2s;
}
.lang-btn:hover{ background:var(--blue-800); color:var(--cream); border-color:var(--blue-800); }
.lang-btn svg{ width:16px; height:16px; }
[dir="rtl"] .lang-btn{ margin-left:0; margin-right:6px; }

@media (max-width:560px){
  .brand-logo{ height:30px; }
  .tab{ padding:8px 12px; font-size:12.5px; }
  .lang-btn{ padding:7px 10px; }
}

/* panels */
.tab-panel{ display:none; }
.tab-panel.active{ display:block; animation:fadeUp .5s ease both; }
@keyframes fadeUp{ from{ opacity:0; transform:translateY(10px);} to{ opacity:1; transform:none;} }

/* ============================================================
   READER 3-COLUMN LAYOUT  (pub | lecteur | pub)
   ============================================================ */
.reader-layout{
  position:relative; z-index:2;
  display:grid;
  grid-template-columns:170px minmax(0,1fr) 170px;
  gap:clamp(16px,2.4vw,34px);
  align-items:start;
  max-width:1400px; margin:0 auto;
}
.reader-center{ min-width:0; }

/* ad rails */
.adrail{ display:flex; flex-direction:column; gap:18px; position:sticky; top:92px; }
.adrail .ad-cap{
  font-family:var(--ff-ui); font-size:9.5px; letter-spacing:.24em; text-transform:uppercase;
  color:rgba(243,236,221,.5); text-align:center; margin-bottom:-6px;
}
.ad-slot{
  position:relative; width:100%; border-radius:6px; overflow:hidden;
  background:rgba(243,236,221,.06);
  border:1px dashed rgba(243,236,221,.28);
  display:flex; flex-direction:column; align-items:center; justify-content:center; gap:8px;
  color:rgba(243,236,221,.62); text-align:center; padding:14px;
  transition:border-color .25s, background .25s;
}
.ad-slot:hover{ border-color:rgba(111,166,216,.6); background:rgba(44,121,192,.08); }
.ad-slot.sky{ aspect-ratio:160/600; }
.ad-slot.box{ aspect-ratio:1/1; }
.ad-slot .ad-tag{
  font-family:var(--ff-ui); font-size:11px; letter-spacing:.16em; text-transform:uppercase; font-weight:600;
  color:rgba(243,236,221,.78);
}
.ad-slot .ad-dim{ font-family:"Archivo",monospace; font-size:11px; letter-spacing:.1em; color:rgba(243,236,221,.45); }
.ad-slot .ad-ico{ width:26px; height:26px; opacity:.5; }
/* when filled from back office: <a class="ad-fill"><img></a> */
.ad-slot .ad-fill{ position:absolute; inset:0; display:block; }
.ad-slot .ad-fill img{ width:100%; height:100%; object-fit:cover; }

/* horizontal banner ad under the book */
.ad-banner{
  max-width:920px; margin:26px auto 0; width:100%;
  aspect-ratio:728/90; min-height:64px;
}

@media (max-width:1100px){
  .reader-layout{ grid-template-columns:130px minmax(0,1fr) 130px; }
}
@media (max-width:840px){
  .reader-layout{ grid-template-columns:1fr; }
  .adrail{ position:static; flex-direction:row; flex-wrap:wrap; justify-content:center; }
  .adrail .ad-slot.sky{ width:160px; aspect-ratio:160/300; }
  .adrail.right{ order:3; }
}

/* ============================================================
   SAIS-TU ?  (le saviez-vous)
   ============================================================ */
.saistu{
  position:relative; padding:120px clamp(20px,5vw,64px) 90px;
  max-width:1400px; margin:0 auto;
  display:grid; grid-template-columns:170px minmax(0,1fr) 170px;
  gap:clamp(16px,2.4vw,34px); align-items:start;
}
.saistu .adrail{ position:sticky; top:92px; }
.saistu .adrail .ad-cap{ color:rgba(27,36,51,.4); }
.saistu .ad-slot{
  background:rgba(27,36,51,.03); border-color:rgba(27,36,51,.2); color:var(--ink-soft);
}
.saistu .ad-slot .ad-tag{ color:var(--ink); }
.saistu .ad-slot .ad-dim{ color:rgba(27,36,51,.4); }
.saistu .ad-slot:hover{ border-color:var(--blue-500); background:rgba(44,121,192,.05); }

.st-head{ text-align:center; max-width:640px; margin:0 auto 50px; }
.st-head .eyebrow{ color:var(--blue-700); justify-content:center; display:flex; gap:12px; align-items:center; }
.st-head .eyebrow::before,.st-head .eyebrow::after{ content:""; width:30px; height:1px; background:var(--brass); }
.st-head h2{ font-family:var(--ff-display); font-weight:600; font-size:clamp(36px,5vw,60px); margin:14px 0 12px; }
.st-head p{ color:var(--ink-soft); font-size:16px; line-height:1.6; margin:0; }

.st-grid{ display:grid; grid-template-columns:repeat(2,1fr); gap:22px; }
@media (max-width:680px){ .st-grid{ grid-template-columns:1fr; } }
.st-card{
  position:relative; background:var(--paper); border:1px solid var(--line);
  border-radius:10px; padding:30px 28px 28px; overflow:hidden;
  transition:transform .25s, box-shadow .25s;
}
.st-card:hover{ transform:translateY(-4px); box-shadow:0 24px 50px -28px rgba(8,22,42,.4); }
.st-card .st-no{
  font-family:var(--ff-display); font-weight:600; font-size:18px; color:var(--cream);
  width:42px; height:42px; border-radius:50%; display:grid; place-items:center;
  background:linear-gradient(150deg,var(--blue-700),var(--blue-900)); margin-bottom:18px;
}
.st-card h3{ font-family:var(--ff-display); font-weight:600; font-size:25px; line-height:1.1; margin:0 0 10px; }
.st-card p{ color:var(--ink-soft); line-height:1.6; font-size:14.5px; margin:0; text-wrap:pretty; }
.st-card .st-mark{
  position:absolute; top:-10px; right:-6px; font-family:var(--ff-display); font-style:italic;
  font-size:120px; line-height:1; color:rgba(44,121,192,.07); pointer-events:none;
}

/* ============================================================
   CONTACT
   ============================================================ */
.contact{
  position:relative; padding:120px clamp(20px,5vw,64px) 90px;
  max-width:1400px; margin:0 auto;
  display:grid; grid-template-columns:170px minmax(0,1fr) 170px;
  gap:clamp(16px,2.4vw,34px); align-items:start;
}
.contact .adrail{ position:sticky; top:92px; }
.contact .adrail .ad-cap{ color:rgba(27,36,51,.4); }
.contact .ad-slot{
  background:rgba(27,36,51,.03); border-color:rgba(27,36,51,.2); color:var(--ink-soft);
}
.contact .ad-slot .ad-tag{ color:var(--ink); }
.contact .ad-slot .ad-dim{ color:rgba(27,36,51,.4); }
.contact .ad-slot:hover{ border-color:var(--blue-500); background:rgba(44,121,192,.05); }

.ct-inner{ display:grid; grid-template-columns:1fr 1fr; gap:48px; align-items:start; }
@media (max-width:820px){ .ct-inner{ grid-template-columns:1fr; gap:36px; } }
.ct-intro .eyebrow{ color:var(--blue-700); display:flex; gap:12px; align-items:center; }
.ct-intro .eyebrow::before{ content:""; width:34px; height:1px; background:var(--brass); }
.ct-intro h2{ font-family:var(--ff-display); font-weight:600; font-size:clamp(36px,5vw,58px); line-height:1; margin:16px 0 18px; }
.ct-intro p{ color:var(--ink-soft); font-size:16px; line-height:1.65; margin:0 0 30px; max-width:42ch; }
.ct-list{ list-style:none; padding:0; margin:0; display:flex; flex-direction:column; gap:18px; }
.ct-list li{ display:flex; gap:14px; align-items:flex-start; }
.ct-list .ic{
  width:42px; height:42px; flex:0 0 auto; border-radius:9px;
  background:rgba(44,121,192,.1); color:var(--blue-700);
  display:grid; place-items:center;
}
.ct-list .ic svg{ width:19px; height:19px; }
.ct-list .lab{ font-family:var(--ff-ui); font-size:11px; letter-spacing:.16em; text-transform:uppercase; color:var(--ink-soft); }
.ct-list .val{ font-family:var(--ff-body); font-size:17px; color:var(--ink); margin-top:3px; }

.ct-form{ background:var(--paper); border:1px solid var(--line); border-radius:12px; padding:34px; }
.ct-form .row{ display:grid; grid-template-columns:1fr 1fr; gap:16px; }
@media (max-width:480px){ .ct-form .row{ grid-template-columns:1fr; } }
.field{ display:flex; flex-direction:column; gap:7px; margin-bottom:18px; }
.field label{ font-family:var(--ff-ui); font-size:11px; letter-spacing:.14em; text-transform:uppercase; color:var(--ink-soft); }
.field input, .field textarea{
  font-family:var(--ff-body); font-size:15px; color:var(--ink);
  background:var(--cream); border:1px solid var(--line); border-radius:8px;
  padding:13px 14px; outline:none; transition:border-color .2s, box-shadow .2s;
}
.field input:focus, .field textarea:focus{ border-color:var(--blue-500); box-shadow:0 0 0 3px rgba(44,121,192,.12); }
.field textarea{ resize:vertical; min-height:120px; }
.ct-form .btn-primary{ width:100%; justify-content:center; margin-top:4px; }
.ct-note{ font-family:var(--ff-ui); font-size:12px; color:var(--ink-soft); text-align:center; margin:16px 0 0; }

/* ============================================================
   MAGAZINE — colonne unique + rails pub STICKY (hero + lecteur)
   Un seul espace pub par côté, qui défile et reste visible
   sur la 1re section (hero) ET la 2e (lecteur).
   ============================================================ */
.mag-layout{
  display:grid;
  grid-template-columns:190px minmax(0,1fr) 190px;
  gap:clamp(16px,2.2vw,34px);
  align-items:start;
  max-width:1600px; margin:0 auto;
}
.mag-main{ min-width:0; }
.mag-main .hero{ min-height:auto; padding:128px clamp(8px,2vw,28px) 60px; }
.mag-main .reader{
  border-radius:18px; overflow:hidden; margin-top:6px;
  box-shadow:0 36px 90px -52px rgba(8,22,42,.65);
}

/* le rail collant : margin-top initiale puis se fige sous la barre */
.mag-rail{
  position:sticky; top:88px; align-self:start;
  margin-top:128px;
}
.mag-rail .ad-cap{ color:rgba(27,36,51,.42); }
.mag-rail .ad-slot{
  background:rgba(27,36,51,.03); border-color:rgba(27,36,51,.22); color:var(--ink-soft);
}
.mag-rail .ad-slot .ad-tag{ color:var(--ink); }
.mag-rail .ad-slot .ad-dim{ color:rgba(27,36,51,.42); }
.mag-rail .ad-slot:hover{ border-color:var(--blue-500); background:rgba(44,121,192,.05); }

@media (max-width:1100px){
  .mag-layout{ grid-template-columns:140px minmax(0,1fr) 140px; }
}
@media (max-width:1000px){
  .mag-layout{ grid-template-columns:1fr; max-width:700px; }
  .mag-rail{ position:static; margin:22px auto; display:flex; flex-direction:column; align-items:center; }
  .mag-rail.right{ order:3; }
  .mag-rail .ad-cap{ display:none; }
  .mag-rail .ad-slot.sky{ width:min(320px,86vw); aspect-ratio:300/250; }
  .mag-main .hero{ padding-top:96px; }
}
