/* TCHITEYA'S EDITIONS — landing « une section, un écran »
   Polices système uniquement (aucun téléchargement de police), pas d'image de fond, pas de flou. */
*{box-sizing:border-box}
:root{
  --navy:#071f43;--red:#c91f32;--red-ink:#a92d3d;--ink:#172b49;--muted:#5d6876;--cream:#f7f4ee;--line:#e4e7eb;
  --head:72px;--tab:0px;--safe-b:env(safe-area-inset-bottom,0px);
  --screen:calc(100vh - var(--head) - var(--tab) - var(--safe-b));
}
@supports(height:100svh){:root{--screen:calc(100svh - var(--head) - var(--tab) - var(--safe-b))}}
html{-webkit-text-size-adjust:100%}
body{margin:0;color:var(--ink);font-family:system-ui,-apple-system,"Segoe UI",Roboto,sans-serif;background:#fff;line-height:1.5}
a{color:inherit}
img{max-width:100%;height:auto}
.skip{position:absolute;left:-999px;top:8px;background:var(--navy);color:#fff;padding:10px 14px;border-radius:10px;z-index:99}
.skip:focus{left:8px}
:focus-visible{outline:3px solid #f0b429;outline-offset:2px}

/* En-tête */
.site-header{height:var(--head);padding:0 clamp(16px,4vw,64px);display:flex;align-items:center;justify-content:space-between;gap:12px;border-bottom:1px solid var(--line);background:#fff;position:sticky;top:0;z-index:20}
.identity{display:flex;align-items:center;gap:12px;text-decoration:none;min-width:0}
.identity img{display:block;width:auto;height:44px}
.identity span{display:flex;flex-direction:column;gap:3px;min-width:0}
.identity strong{font-family:Georgia,serif;font-size:clamp(16px,1.8vw,24px);line-height:1.05;color:var(--navy);white-space:nowrap}
.identity small{font-size:10px;letter-spacing:.1em;color:#6f7781}
.top-nav{display:flex;gap:clamp(6px,1.5vw,18px)}
.top-nav a{text-decoration:none;font-weight:700;font-size:14px;padding:10px 12px;border-radius:10px;color:var(--ink)}
.top-nav a:hover{color:var(--red)}
.top-nav a[aria-current="page"]{background:#fbecef;color:var(--red-ink)}

/* Écrans */
.screen{min-height:var(--screen);padding:clamp(24px,5vh,64px) clamp(18px,6vw,96px);display:flex;flex-direction:column;justify-content:center}
.js .screen:not(.is-active){display:none}
.js .screen.is-active{animation:enter .22s ease-out}
@keyframes enter{from{opacity:0;transform:translateY(8px)}to{opacity:1;transform:none}}

.eyebrow{margin:0 0 14px;display:flex;align-items:center;gap:10px;color:var(--red-ink);font-weight:800;font-size:12px;letter-spacing:.04em}
.eyebrow span{display:inline-block;width:24px;height:3px;background:var(--red);flex:0 0 auto}
h1,h2,h3{font-family:Georgia,"Times New Roman",serif;color:var(--navy);margin:0}
h2{font-size:clamp(30px,4.4vw,52px);line-height:1.05;letter-spacing:-.02em}
.kicker{margin:0 0 6px;font-size:12px;letter-spacing:.12em;text-transform:uppercase;color:var(--red-ink);font-weight:800}
.screen-head{margin-bottom:clamp(16px,3vh,32px)}
.screen-head.center{text-align:center}.screen-head.center .eyebrow{justify-content:center}

.btn{display:inline-flex;align-items:center;justify-content:center;gap:10px;min-height:48px;text-decoration:none;text-align:center;border-radius:14px;padding:12px 20px;font-size:15px;font-weight:750;line-height:1.25;transition:transform .15s}
.btn:active{transform:scale(.98)}
.btn.primary{background:var(--red);color:#fff;border:1px solid var(--red)}
.btn.secondary{background:#fff;color:var(--navy);border:1.5px solid #cfd6de}

/* 1 — Accueil */
.hero{display:grid;grid-template-columns:minmax(0,1.2fr) minmax(220px,.8fr);align-items:center;gap:clamp(24px,6vw,90px);max-width:1440px;margin:0 auto}
.hero h1{font-size:clamp(40px,6vw,82px);line-height:.98;letter-spacing:-.04em;margin:0 0 20px}
.hero h1 em{font-style:normal;color:var(--red)}
.intro{font-size:clamp(16px,1.6vw,20px);color:var(--muted);max-width:620px;margin:0 0 24px}
.hero-actions{display:flex;flex-wrap:wrap;gap:12px}
.book-visual{display:flex;flex-direction:column;align-items:center;gap:12px;text-decoration:none}
.book-visual img{display:block;width:clamp(220px,26vw,340px);max-height:calc(var(--screen) - 120px);object-fit:contain;border-radius:6px;box-shadow:0 18px 30px #172b4930;background:#eef0f3}
.book-cta{display:inline-flex;gap:10px;align-items:center;border:1px solid var(--line);border-radius:999px;padding:8px 16px;font-size:13px;font-weight:750;color:var(--navy)}

/* 2 — Bibliothèque */
.library{background:var(--cream)}
.library .screen-head,.book-card{width:100%;max-width:980px;margin-left:auto;margin-right:auto}
.book-card{display:grid;grid-template-columns:minmax(150px,260px) 1fr;gap:clamp(18px,4vw,44px);align-items:center;background:#fff;border:1px solid var(--line);border-radius:24px;padding:clamp(16px,3vw,32px)}
.book-card img{display:block;width:100%;border-radius:6px;box-shadow:0 10px 24px #172b4926;background:#eef0f3}
.book-info h3{font-size:clamp(22px,2.6vw,32px);line-height:1.15;margin-bottom:10px}
.book-info>p{color:var(--muted);margin:0 0 12px}
.book-facts{margin:0 0 18px;padding:0;list-style:none;display:grid;gap:6px;font-size:14px}
.book-facts li:before{content:"✓ ";color:var(--red);font-weight:800}

/* 3 — Services */
.services{background:#fff}
.service-grid{width:100%;max-width:1200px;margin:0 auto;display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:18px}
.service-card{background:#fff;border:1px solid var(--line);border-radius:22px;padding:clamp(20px,2.6vw,32px);display:flex;flex-direction:column;align-items:flex-start;min-width:0}
.service-icon{width:52px;height:52px;display:grid;place-items:center;background:#fbecef;border-radius:16px;color:var(--red-ink);font-size:24px;margin-bottom:14px}
.service-card h3{font-size:clamp(21px,2.1vw,28px);line-height:1.15;margin-bottom:8px}
.service-card p{color:var(--muted);margin:0 0 18px;flex:1}
.service-card .btn{width:100%}

/* 4 — Contact */
.contact{background:var(--navy);color:#fff;justify-content:space-between}
.contact-box{margin:auto;max-width:640px;text-align:center}
.contact .eyebrow{justify-content:center;color:#f3b6bd}
.contact h2{color:#fff;margin-bottom:12px}
.contact-box>p{color:#d4dceb;font-size:17px;margin:0 0 24px}
.contact .mail{margin:14px 0 0;font-size:14px;color:#aebbd0}
footer{text-align:center;color:#aebbd0;font-size:12px;padding:20px 0 0}

/* Tablette */
@media(max-width:1023px){
  .hero{grid-template-columns:minmax(0,1fr) minmax(180px,.75fr)}
  .service-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
  .service-card:last-child{grid-column:1/-1}
}

/* Mobile : barre d'onglets en bas, à portée du pouce */
.tabbar{display:none}
@media(max-width:699px){
  :root{--head:60px;--tab:62px}
  .site-header{padding:0 14px}
  .identity img{height:36px}
  .identity strong{font-size:16px}
  .identity small{font-size:9px}
  .top-nav{display:none}
  .tabbar{display:grid;grid-template-columns:repeat(4,1fr);position:fixed;left:0;right:0;bottom:0;z-index:30;height:calc(var(--tab) + var(--safe-b));padding:4px 6px var(--safe-b);background:#fff;border-top:1px solid var(--line)}
  .tabbar a{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:2px;text-decoration:none;font-size:11px;font-weight:700;color:#5d6876;border-radius:12px}
  .tabbar a span{font-size:19px;line-height:1}
  .tabbar a[aria-current="page"]{color:var(--red-ink);background:#fbecef}
  body{padding-bottom:calc(var(--tab) + var(--safe-b))}

  .screen{padding:20px 18px;justify-content:flex-start}
  .hero{display:flex;flex-direction:column;align-items:stretch;justify-content:center;gap:18px}
  .hero h1{font-size:clamp(36px,10.5vw,52px);margin-bottom:12px}
  .eyebrow{font-size:11px;margin-bottom:10px}
  .intro{font-size:15px;margin-bottom:16px}
  .hero-actions{display:grid;gap:8px}
  .book-visual{order:-1}
  .hero .eyebrow{display:none}
  .book-visual img{width:auto;max-width:80vw;height:min(46vh,420px);height:min(46svh,420px);max-height:none}
  .book-cta{display:none}

  .book-card{grid-template-columns:1fr;text-align:center;justify-items:center}
  .book-card img{max-width:180px}
  .book-facts{justify-items:center}
  .book-info .btn{width:100%}

  .service-grid{grid-template-columns:1fr;gap:12px}
  .service-card:last-child{grid-column:auto}
  .service-card{padding:18px;display:grid;grid-template-columns:48px 1fr;column-gap:14px;align-items:start}
  .service-icon{width:48px;height:48px;margin:0;grid-row:span 2}
  .service-card h3{font-size:21px;margin-bottom:4px}
  .service-card p{margin:0 0 12px;font-size:15px}
  .service-card .btn{grid-column:1/-1}

  .contact{justify-content:center}
  .contact .btn{width:100%}
}
/* Petits écrans bas (ex. 320×568) : la couverture rétrécit, rien ne disparaît */
@media(max-width:699px) and (max-height:640px){
  .hero .eyebrow{display:none}
  .hero{gap:12px}
  .book-visual img{height:32vh;height:32svh}
  .intro{font-size:14px;margin-bottom:12px}
  .hero h1{font-size:32px;margin-bottom:8px}
  .btn{min-height:44px;padding:10px 16px}
}
@media(prefers-reduced-motion:reduce){.js .screen.is-active{animation:none}.btn{transition:none}}

.back-link{display:inline-flex;align-items:center;min-height:44px;margin-bottom:6px;font-weight:750;color:var(--navy);text-decoration:none}
.services .screen-head.center{position:relative}

/* Bibliothèque : AppLivres publiées depuis l'Atelier */
.shelf-wrap{width:100%;max-width:980px;margin:18px auto 0}
.shelf-title{font-size:20px;margin:0 0 10px}
.shelf{display:grid;grid-template-columns:repeat(auto-fill,minmax(150px,1fr));gap:14px}
.shelf a{display:block;text-decoration:none;color:var(--ink);background:#fff;border:1px solid var(--line);border-radius:14px;padding:10px}
.shelf img{display:block;width:100%;aspect-ratio:2/3;object-fit:cover;border-radius:6px;background:#eef0f3;box-shadow:0 6px 14px #172b4920}
.shelf strong{display:block;font-family:Georgia,serif;font-size:15px;line-height:1.2;margin:8px 0 2px;color:var(--navy)}
.shelf span{font-size:12px;color:var(--muted)}
.library{justify-content:flex-start}
@media(max-width:699px){.shelf{grid-template-columns:repeat(2,1fr);gap:10px}}

/* Bibliothèque : couvertures seules */
.shelf-hint{margin:0 0 12px;color:var(--muted);font-size:14px}
.shelf.covers{grid-template-columns:repeat(4,minmax(0,1fr));gap:16px}
.shelf.covers a{padding:0;border:0;background:none;border-radius:8px;transition:transform .15s}
.shelf.covers a:hover,.shelf.covers a:focus-visible{transform:translateY(-4px)}
.shelf.covers img{border-radius:8px;box-shadow:0 10px 22px #172b4930}
@media(max-width:699px){.shelf.covers{grid-template-columns:repeat(2,minmax(0,1fr));gap:14px}}

/* Accueil : diaporama des couvertures */
.carousel .slides{display:grid}
.carousel .slide{grid-area:1/1;opacity:0;transition:opacity .6s ease;pointer-events:none;display:flex;justify-content:center}
.carousel .slide.active{opacity:1;pointer-events:auto}
.carousel .dots{display:flex;gap:10px;justify-content:center;margin-top:4px}
.carousel .dot{width:10px;height:10px;min-height:0;padding:0;border-radius:50%;border:0;background:#c9cfd9;cursor:pointer}
.carousel .dot.on{background:var(--red,#c8102e);width:24px;border-radius:6px}
@media (prefers-reduced-motion: reduce){.carousel .slide{transition:none}}
