/* Kotob4U · boutique (accueil, catalogue, livre, séries, série). Couleurs de marque imposées : bleu #3971b8 et vert #c7d69b.
   Direction (méthode unslop de Damir Sokolovsky, @heydamir, CC BY 4.0) : la table d'un libraire. Fond crème,
   encre bleu nuit, couvertures en couleur ; le bleu porte l'action, le vert ce qui est offert, gratuit ou ajouté.
   Mouvements repris de la boutique NERO : entrée du haut de page, bandeau défilant, apparition au défilement.
   Site en arabe seulement (police Cairo, sens droite à gauche). Les blocs photo + texte (.split) gardent leur photo
   à gauche, le texte à droite. */
:root {
  --blue: #3971b8;
  --blue-700: #26528c;
  --blue-50: #edf2f9;
  --navy: #13284a;
  --navy-2: #1d3760;
  --green: #c7d69b;
  --green-300: #d9e4b9;
  --green-100: #eef3de;
  --green-700: #4f6125;
  --paper: #f8f6f1;
  --paper-2: #f1ede4;
  --paper-3: #e6dfd0;
  --white: #fff;
  --ink: #13284a;
  --ink-2: #46526b;
  --muted: #687187;
  --line: rgba(19, 40, 74, 0.12);
  --line-strong: rgba(19, 40, 74, 0.22);
  --danger: #b42318;
  --danger-bg: #fdf0ee;
  --font: "Cairo", system-ui, -apple-system, "Segoe UI", sans-serif;
  --display: "Cairo", system-ui, sans-serif;
  --body-weight: 500;
  --ease: cubic-bezier(.22, 1, .36, 1);
  --header-h: 116px;
  --gutter: 16px;
  --max: 1280px;
  --edge: max(var(--gutter), calc((100% - var(--max)) / 2 + var(--gutter)));
}

/* Base */
*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 16px); -webkit-text-size-adjust: 100%; }
html:has(dialog[open]) { overflow: hidden; }
body { margin: 0; background: var(--paper); color: var(--ink); font: var(--body-weight) 1rem/1.7 var(--font); overflow-x: clip; -webkit-font-smoothing: antialiased; }
body.has-tray { padding-bottom: 104px; }
img { display: block; max-width: 100%; height: auto; }
h1, h2, h3, p, ol, ul, figure, blockquote, dl, dd { margin: 0; padding: 0; }
h1, h2, h3 { font-weight: 700; }
ol, ul { list-style: none; }
a { color: inherit; }
button, input, textarea { font: inherit; color: inherit; }
button { cursor: pointer; -webkit-tap-highlight-color: transparent; }
button:disabled { cursor: not-allowed; }
svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; flex: none; }
:focus-visible { outline: 2px solid var(--blue); outline-offset: 3px; border-radius: 6px; }
.on-dark :focus-visible { outline-color: var(--green); }
::selection { background: var(--navy); color: var(--green); }

.wrap { width: min(100%, var(--max)); margin-inline: auto; padding-inline: var(--gutter); }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.skip { position: absolute; inset-inline-start: 12px; top: -80px; z-index: 100; padding: 12px 20px; border-radius: 999px; background: var(--navy); color: var(--white); font-weight: 600; }
.skip:focus { top: 12px; }

/* Blocs photo + texte : la photo reste à gauche, le texte se lit de droite à gauche */
.split { direction: ltr; }
:root[dir="rtl"] .split > .tx { direction: rtl; }
/* Titres en dir="auto" (certains livres ont un titre latin) : alignés à droite comme leur bloc */
:root[dir="rtl"] :is(.week h2, .week__by, .bp h1, .bp__author, .cline__t, .cgroup__info b) { text-align: right; }

/* Petits libellés au-dessus des titres : un trait vert puis le mot */
.label { display: inline-flex; align-items: center; gap: 12px; color: var(--blue-700); font-size: .875rem; font-weight: 700; }
.label::before { content: ""; width: 28px; height: 3px; border-radius: 2px; background: var(--green); }
.on-dark .label { color: var(--green); }

/* Boutons : une forme (pilule), un reflet au survol */
.btn { position: relative; isolation: isolate; overflow: hidden; display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 48px; padding: 0 28px; border: 1px solid transparent; border-radius: 999px; background: none; font-size: .9375rem; font-weight: 700; line-height: 1.2; text-decoration: none; text-align: center; transition: background-color .3s var(--ease), color .3s var(--ease), border-color .3s var(--ease), transform .15s var(--ease); }
.btn:active:not(:disabled) { transform: scale(.97); }
.btn svg { width: 18px; height: 18px; stroke-width: 2; }
.btn--lg { min-height: 56px; padding-inline: 32px; font-size: 1rem; }
.btn--full { width: 100%; }
.btn--blue { background: var(--blue); color: var(--white); }
.btn--blue:hover { background: var(--blue-700); }
.btn--navy { background: var(--navy); color: var(--white); }
.btn--navy:hover { background: var(--navy-2); }
.btn--green { background: var(--green); color: var(--navy); }
.btn--green:hover { background: var(--green-300); }
.btn--soft { background: var(--green-100); color: var(--green-700); border-color: var(--green); }
.btn--line { border-color: var(--line-strong); color: var(--ink); background: transparent; }
.btn--line:hover { border-color: var(--ink); background: var(--white); }
.btn--line:disabled { color: var(--muted); border-color: var(--line); background: transparent; }
.btn--ghost { border-color: rgba(255, 255, 255, 0.35); color: var(--white); }
.btn--ghost:hover { border-color: var(--white); background: rgba(255, 255, 255, 0.08); }
.btn--wa { background: var(--green); color: var(--navy); }
.btn--wa:hover { background: var(--green-300); }
.btn::after { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(100deg, transparent 30%, rgba(199, 214, 155, 0.45) 50%, transparent 70%); transform: translateX(-120%) skewX(-18deg); transition: transform .9s var(--ease); pointer-events: none; }
.btn--line::after, .btn--soft::after, .btn--green::after, .btn--wa::after, .btn--ghost::after { display: none; }
@media (hover: hover) { .btn:hover::after { transform: translateX(220%) skewX(-18deg); } }

/* Lien souligné : un trait vert, qui se remplit au survol */
.link-u { position: relative; display: inline-flex; align-items: center; min-height: 44px; color: var(--ink); font-weight: 700; text-decoration: none; white-space: nowrap; }
.link-u::before, .link-u::after { content: ""; position: absolute; inset-inline: 0; bottom: 8px; height: 2px; border-radius: 1px; background: var(--green); }
.link-u::after { background: var(--navy); transform: scaleX(0); transform-origin: left; transition: transform .5s var(--ease); }
[dir="rtl"] .link-u::after { transform-origin: right; }
@media (hover: hover) { .link-u:hover::after { transform: scaleX(1); } }
.textbtn, .linkbtn { padding: 0; border: 0; background: none; color: var(--blue-700); font-weight: 600; text-decoration: underline; text-underline-offset: 4px; text-decoration-thickness: 1px; }
.textbtn { min-height: 44px; font-size: .9375rem; }
.linkbtn { display: inline; font-size: inherit; }

/* Sélecteur de quantité */
.stepper { display: inline-flex; align-items: center; justify-content: space-between; border-radius: 999px; background: var(--white); border: 1px solid var(--line-strong); color: var(--ink); direction: ltr; }
.stepper button { display: grid; place-items: center; width: 44px; height: 44px; padding: 0; border: 0; border-radius: 50%; background: none; color: var(--navy); transition: background-color .2s var(--ease); }
.stepper button:hover:not(:disabled) { background: var(--paper-2); }
.stepper button:disabled { color: var(--line-strong); }
.stepper button svg { width: 18px; height: 18px; stroke-width: 2; }
.stepper__n { min-width: 28px; text-align: center; font-weight: 700; font-variant-numeric: tabular-nums; }
.stepper--lg button { width: 48px; height: 48px; }
.stepper--lg .stepper__n { min-width: 40px; }
.stepper--card { display: flex; width: 100%; background: var(--navy); border-color: var(--navy); color: var(--white); box-shadow: 0 12px 24px -12px rgba(13, 29, 54, 0.7); }
.stepper--card button { color: var(--white); }
.stepper--card button:hover:not(:disabled) { background: rgba(255, 255, 255, 0.12); }
.stepper--card button:disabled { color: rgba(255, 255, 255, 0.35); }

/* En-tête dans le bleu du logo : le logo y est posé sans pastille, seul son vert ressort. Logo à gauche, recherche, pack à droite ;
   menu des pages dessous. WhatsApp est le bouton flottant (.wa-float). */
.header { position: sticky; top: 0; z-index: 40; background: var(--blue); color: var(--white); }
.header :focus-visible { outline-color: var(--green); }
.header .suggest :focus-visible { outline-color: var(--blue); }
.header__top { direction: ltr; display: grid; grid-template-columns: auto minmax(0, 1fr) auto; grid-template-areas: "menu brand actions" "search search search"; align-items: center; gap: 8px; padding-block: 8px 12px; }
.menu-btn { grid-area: menu; }
.brand { grid-area: brand; display: inline-flex; align-items: center; min-height: 44px; min-width: 0; text-decoration: none; }
.brand__logo { width: 56px; height: auto; }
.brand__mark { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; background: var(--blue); flex: none; }
.brand__mark img { width: 26px; height: auto; }
.actions { grid-area: actions; display: flex; align-items: center; justify-content: flex-end; gap: 8px; }
.hbtn { position: relative; display: inline-grid; place-items: center; min-width: 44px; height: 44px; padding: 0; border: 0; border-radius: 999px; background: none; color: var(--white); text-decoration: none; transition: background-color .2s var(--ease); }
.hbtn:hover { background: rgba(255, 255, 255, 0.14); }
.hbtn svg { width: 24px; height: 24px; stroke-width: 1.8; }
.bagbtn { position: relative; display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 12px; border: 0; border-radius: 999px; background: var(--navy); color: var(--white); font-weight: 700; transition: background-color .2s var(--ease); }
.bagbtn:hover { background: var(--navy-2); }
.bagbtn svg { width: 22px; height: 22px; stroke-width: 1.8; }
.bagbtn__label { display: none; }
.bag__count { display: grid; place-items: center; min-width: 22px; height: 22px; padding-inline: 6px; border-radius: 11px; background: var(--green); color: var(--navy); font-size: .75rem; font-weight: 700; line-height: 1; font-variant-numeric: tabular-nums; }

.search { grid-area: search; position: relative; display: flex; align-items: center; min-width: 0; }
.search > svg { position: absolute; left: 16px; width: 20px; height: 20px; color: var(--ink-2); pointer-events: none; }
.search input { width: 100%; min-height: 48px; padding: 0 96px 0 46px; border: 1.5px solid var(--white); border-radius: 999px; background: var(--white); color: var(--ink); font-size: 1rem; transition: border-color .2s var(--ease), box-shadow .2s var(--ease); }
.search input::placeholder { color: var(--muted); }
.search input::-webkit-search-cancel-button { display: none; }
.search input:focus { outline: none; border-color: var(--navy); box-shadow: 0 0 0 4px rgba(199, 214, 155, 0.55); }
.search__go { position: absolute; right: 4px; min-height: 40px; padding: 0 18px; border: 0; border-radius: 999px; background: var(--blue); color: var(--white); font-size: .9375rem; font-weight: 700; transition: background-color .2s var(--ease); }
.search__go:hover { background: var(--blue-700); }
.suggest { position: absolute; inset-inline: 0; top: calc(100% + 8px); z-index: 60; display: grid; color: var(--ink); max-height: min(70vh, 520px); overflow-y: auto; padding: 8px; border: 1px solid var(--line); border-radius: 20px; background: var(--white); box-shadow: 0 24px 48px -20px rgba(13, 29, 54, 0.4); }
.suggest__item { display: grid; grid-template-columns: 40px minmax(0, 1fr); align-items: center; gap: 12px; padding: 8px; border-radius: 12px; text-decoration: none; }
.suggest__item:hover, .suggest__item:focus-visible { background: var(--green-100); }
.suggest__cover { width: 40px; aspect-ratio: 2 / 3; object-fit: cover; border-radius: 2px 4px 4px 2px; background: var(--paper-3); box-shadow: 0 4px 8px -4px rgba(13, 29, 54, 0.4); }
.suggest__cover.cover--plain { display: grid; place-items: center; padding: 2px; font-size: .45rem; }
.suggest__text { display: grid; min-width: 0; line-height: 1.35; }
.suggest__text b { font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.suggest__text small { color: var(--muted); font-size: .8125rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.suggest__all { display: block; margin-top: 4px; padding: 12px; border-top: 1px solid var(--line); color: var(--blue-700); font-weight: 700; text-decoration: none; }
.suggest__all:hover { text-decoration: underline; }
.suggest__none { padding: 12px; color: var(--ink-2); }

.nav { display: none; border-top: 1px solid rgba(255, 255, 255, 0.16); }
.nav__inner { display: flex; justify-content: center; gap: 36px; }
.nav a { position: relative; display: flex; align-items: center; min-height: 48px; color: rgba(255, 255, 255, 0.8); font-size: 1rem; font-weight: 700; text-decoration: none; transition: color .3s var(--ease); }
.nav a::after { content: ""; position: absolute; inset-inline: 0; bottom: 8px; height: 3px; border-radius: 2px; background: var(--green); transform: scaleX(0); transition: transform .5s var(--ease); }
.nav a:hover, .nav a[aria-current="page"] { color: var(--white); }
.nav a:hover::after, .nav a[aria-current="page"]::after { transform: scaleX(1); }

/* Haut de page (accueil) : une seule image, réglée dans l'admin ; photo à gauche, texte à droite */
.hero { padding-top: 16px; }
.hero__main.is-waiting > .slide { visibility: hidden; }
.slide { display: grid; align-content: start; gap: 20px; padding-inline: var(--edge); }
.slide__body { display: flex; flex-direction: column; align-items: flex-start; }
.slide__title { margin-top: 12px; font: 700 clamp(1.75rem, 7.5vw, 2.125rem)/1.35 var(--display); color: var(--navy); text-wrap: balance; }
.slide__title .accent { color: var(--blue); }
.slide__text { margin-top: 12px; max-width: 32em; color: var(--ink-2); font-size: 1.0625rem; line-height: 1.6; }
.slide__actions { margin-top: 20px; }
.slide__visual { position: relative; }
.slide__media { position: relative; aspect-ratio: 4 / 3; overflow: hidden; border-radius: 24px; background: var(--paper-3); box-shadow: 0 40px 70px -44px rgba(13, 29, 54, 0.6); }
.slide__media img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 50% 65%; }
.slide__media::after { content: ""; position: absolute; inset: 0; background: linear-gradient(to top, rgba(13, 29, 54, 0.3), rgba(13, 29, 54, 0) 40%); pointer-events: none; }
.slide__tag { position: absolute; left: 12px; bottom: 12px; display: grid; gap: 2px; padding: 10px 16px; border-radius: 16px; background: var(--green); color: var(--navy); box-shadow: 0 20px 40px -24px rgba(13, 29, 54, 0.6); }
.slide__tag span { font-size: .875rem; font-weight: 700; }
.slide__tag b { font: 700 1.375rem/1.1 var(--display); }

/* Bandeau d'informations sous le haut de page : Instagram, livraison gratuite, paiement, catalogue */
.infos { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1px; margin-top: 20px; overflow: hidden; border: 1px solid var(--line); border-radius: 20px; background: var(--line); }
.info { display: flex; align-items: center; gap: 12px; min-width: 0; padding: 14px; background: var(--white); }
.info--ig { grid-column: 1 / -1; flex-wrap: wrap; }
.infos .stats__books { grid-column: 1 / -1; }
.info__icon { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; background: var(--green); color: var(--navy); flex: none; }
.info__icon svg { width: 20px; height: 20px; stroke-width: 1.9; }
.info__text { display: grid; flex: 1; min-width: 0; line-height: 1.35; }
.info__text b { font-weight: 700; font-size: .9375rem; }
.info__text small { color: var(--muted); font-size: .8125rem; }
.info__cta { display: inline-flex; align-items: center; min-height: 40px; padding: 0 16px; border-radius: 999px; background: var(--navy); color: var(--white); font-size: .875rem; font-weight: 700; text-decoration: none; white-space: nowrap; transition: background-color .2s var(--ease); }
.info__cta:hover { background: var(--navy-2); }

/* Bandeau défilant, au vert de la marque */
.marquee { margin-top: 28px; overflow: hidden; background: var(--green); color: var(--navy); }
.marquee__track { display: flex; width: max-content; animation: marquee 60s linear infinite; }
[dir="rtl"] .marquee__track { animation-name: marquee-rtl; }
.marquee ul { display: flex; flex: none; }
.marquee li { display: flex; align-items: center; padding-block: 12px; font-size: .9375rem; font-weight: 700; white-space: nowrap; }
.marquee li::after { content: "✦"; padding-inline: 28px; color: var(--navy); font-size: .625rem; }

/* Sections et titres */
.section { padding-top: 44px; }
.head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 12px 32px; margin-bottom: 20px; }
.head__text { max-width: 680px; }
.head__side { display: flex; align-items: center; gap: 16px; }
.head h2, .faq h2 { margin-top: 6px; font: 700 clamp(1.5rem, 6.2vw, 1.75rem)/1.4 var(--display); color: var(--navy); text-wrap: balance; }
.head__text > h2:first-child { margin-top: 0; }
.head__text > p:last-child:not(.label) { margin-top: 8px; max-width: 40em; color: var(--ink-2); font-size: 1rem; }
.rowctl { display: none; gap: 8px; }
.rowctl__btn { display: grid; place-items: center; width: 44px; height: 44px; padding: 0; border: 1px solid var(--line-strong); border-radius: 50%; background: transparent; color: var(--ink); transition: border-color .2s var(--ease), background-color .2s var(--ease); }
.rowctl__btn:hover { border-color: var(--navy); background: var(--green); }
[dir="rtl"] :is(.rowctl__btn, .chips__arrow) svg { transform: scaleX(-1); }

/* Packs : une pile de vraies couvertures par pack, autant que de livres ; le pack en cours passe en bleu nuit */
.packs { display: grid; gap: 10px; }
.pack { position: relative; display: grid; grid-template-columns: 124px minmax(0, 1fr) auto; align-items: center; gap: 16px; padding: 12px 20px 12px 12px; border: 1px solid var(--line); border-radius: 20px; background: var(--white); transition: background-color .4s var(--ease), border-color .4s var(--ease), color .4s var(--ease), transform .5s var(--ease), box-shadow .5s var(--ease); }
[dir="rtl"] .pack { padding: 12px 12px 12px 20px; }
.pile { --cw: 40px; position: relative; display: block; width: 100%; height: 64px; direction: ltr; }
.pile img { position: absolute; bottom: 0; left: calc((100% - var(--cw)) / (var(--n) - 1) * var(--i)); width: var(--cw); aspect-ratio: 2 / 3; height: auto; object-fit: cover; border-radius: 2px 3px 3px 2px; box-shadow: 0 6px 12px -6px rgba(13, 29, 54, 0.6), 0 0 0 1px rgba(255, 255, 255, 0.6); transform: rotate(calc((var(--i) - (var(--n) - 1) / 2) * 2deg)); transform-origin: 50% 100%; transition: transform .5s var(--ease); }
.pack__n { color: var(--ink-2); font-weight: 600; }
.pack__cost { display: grid; justify-items: end; gap: 2px; }
.pack__per { color: var(--green-700); font-size: .8125rem; font-weight: 700; white-space: nowrap; }
.pack.is-current .pack__per { color: rgba(255, 255, 255, 0.75); }
.pack__price { font: 700 1.5rem/1.1 var(--display); color: var(--navy); white-space: nowrap; font-variant-numeric: tabular-nums; }
.pack__price small { margin-inline-start: 4px; font: 600 .875rem/1 var(--font); color: var(--muted); }
.pack__flag { position: absolute; top: -11px; right: 16px; padding: 2px 10px; border-radius: 999px; background: var(--green); color: var(--navy); font-size: .75rem; font-weight: 700; line-height: 1.6; }
.pack.is-current { border-color: var(--navy); background: var(--navy); color: var(--white); }
.pack.is-current .pack__n { color: rgba(255, 255, 255, 0.75); }
.pack.is-current .pack__price { color: var(--green); }
.pack.is-current .pack__price small { color: rgba(255, 255, 255, 0.7); }

.steps { margin-top: 24px; }
.steps ol { counter-reset: step; display: grid; gap: 16px; }
.steps li { counter-increment: step; position: relative; display: grid; gap: 2px; min-height: 40px; padding-inline-start: 52px; }
.steps li::before { content: counter(step); position: absolute; inset-inline-start: 0; top: -2px; display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; background: var(--green); color: var(--navy); font: 700 1.125rem/1 var(--display); }
.steps b { font-size: 1.0625rem; font-weight: 700; }
.steps span { color: var(--ink-2); font-size: .9375rem; }

/* Défilement horizontal (séries, livres liés) */
.hscroll { display: grid; grid-auto-flow: column; grid-auto-columns: min(78%, 280px); gap: 16px; overflow-x: auto; overscroll-behavior-x: contain; padding-inline: var(--edge); padding-block: 4px 8px; scroll-snap-type: x mandatory; scroll-padding-inline: var(--edge); scrollbar-width: none; }
.hscroll::-webkit-scrollbar { display: none; }
.hscroll > * { scroll-snap-align: start; }
.hscroll:focus-visible { outline-offset: -2px; border-radius: 0; }
.hscroll--books { grid-auto-columns: 148px; gap: 16px; }

/* Séries : l'éventail et le nom mènent à la page de la série */
.scard { display: flex; flex-direction: column; min-width: 0; }
.scard__fan { position: relative; display: block; aspect-ratio: 5 / 4; overflow: hidden; border-radius: 20px; background: var(--green-100); transition: box-shadow .4s var(--ease), background-color .4s var(--ease); }
.scard.is-in .scard__fan { box-shadow: inset 0 0 0 2px var(--navy); }
@media (hover: hover) { .scard:hover .scard__fan { background: var(--green-300); } }
.fan { position: absolute; inset: 0; --dir: 1; }
[dir="rtl"] .fan { --dir: -1; }
.fan img, .fan__plain { position: absolute; bottom: 16px; left: 50%; width: 96px; height: 144px; margin-left: -48px; border-radius: 2px 4px 4px 2px; object-fit: cover; box-shadow: 0 14px 24px -10px rgba(13, 29, 54, 0.55); transform: translateX(calc(var(--x) * var(--dir) * var(--spread, 1) * 1px)) rotate(calc(var(--r) * var(--dir) * 1deg)); transform-origin: 50% 120%; transition: transform .6s var(--ease); }
.fan__plain { display: grid; place-items: center; padding: 8px; background: var(--navy); color: var(--green); font: 700 .9375rem/1.15 var(--display); text-align: center; }
@media (hover: hover) { .scard:hover .fan img { transform: translateX(calc(var(--x) * var(--dir) * var(--spread, 1) * 1.15px)) rotate(calc(var(--r) * var(--dir) * 1.2deg)) translateY(-4px); } }
.scard__flag { position: absolute; top: 12px; left: 12px; z-index: 12; display: inline-flex; align-items: center; gap: 6px; padding: 4px 12px; border-radius: 999px; background: var(--navy); color: var(--green); font-size: .75rem; font-weight: 700; }
.scard__flag svg { width: 14px; height: 14px; stroke-width: 2.4; }
.scard__body { display: flex; flex-direction: column; flex: 1; gap: 2px; padding-top: 12px; text-align: center; }
.scard h3 { font: 700 1.125rem/1.4 var(--display); }
.scard h3 a { text-decoration: none; }
.scard h3 a:hover { color: var(--blue-700); }
.scard__meta { display: flex; align-items: baseline; justify-content: center; gap: 12px; color: var(--muted); font-size: .9375rem; }
.scard__price { font: 700 1.25rem/1.1 var(--display); color: var(--blue-700); white-space: nowrap; font-variant-numeric: tabular-nums; }
.scard__price small { font: 600 .8125rem/1 var(--font); }
.scard__deal { align-self: center; margin-top: 6px; padding: 2px 10px; border-radius: 999px; background: var(--green-100); color: var(--green-700); font-size: .8125rem; font-weight: 700; }
.scard__ctl { margin-top: auto; padding-top: 12px; }
.series-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 260px), 1fr)); gap: 32px 20px; padding-top: 4px; }

/* Pages intérieures : fil d'Ariane et titre */
.page-head { padding-top: 20px; }
.crumbs { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; color: var(--muted); font-size: .875rem; }
.crumbs a { color: var(--ink-2); text-decoration: none; }
.crumbs a:hover { color: var(--blue-700); text-decoration: underline; }
.crumbs [aria-current] { color: var(--ink); font-weight: 700; }
.page-head__row { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 8px 32px; margin-top: 12px; padding-bottom: 16px; }
.page-head h1 { font: 700 clamp(1.625rem, 6.8vw, 2rem)/1.4 var(--display); color: var(--navy); }
.page-head__row .head__text > p { margin-top: 6px; max-width: 40em; color: var(--ink-2); font-size: 1rem; }
.page-head__count { padding: 4px 14px; border-radius: 999px; background: var(--green); color: var(--navy); font-weight: 700; }

/* Catalogue : catégories sur une ligne qui défile, puis la grille */
.filters { position: sticky; top: var(--header-h); z-index: 20; background: rgba(248, 246, 241, 0.96); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); border-block: 1px solid var(--line); }
.filters__inner { display: flex; align-items: center; gap: 8px; }
.filters__row { display: flex; flex: 1; gap: 8px; min-width: 0; overflow-x: auto; padding: 10px 12px; scroll-snap-type: x proximity; scroll-padding-inline: 12px; scrollbar-width: none; -webkit-mask-image: linear-gradient(90deg, transparent, #000 16px, #000 calc(100% - 16px), transparent); mask-image: linear-gradient(90deg, transparent, #000 16px, #000 calc(100% - 16px), transparent); }
.filters__row::-webkit-scrollbar { display: none; }
.chips__arrow { display: none; place-items: center; flex: none; width: 40px; height: 40px; padding: 0; border: 1px solid var(--line-strong); border-radius: 50%; background: var(--white); color: var(--ink); }
.chips__arrow:hover { border-color: var(--navy); background: var(--green); }
.chip { flex: none; display: inline-flex; align-items: center; min-height: 44px; padding: 0 18px; border: 1px solid var(--line-strong); border-radius: 999px; background: var(--white); color: var(--ink-2); font-size: .9375rem; font-weight: 600; white-space: nowrap; scroll-snap-align: start; transition: background-color .25s var(--ease), border-color .25s var(--ease), color .25s var(--ease); }
.chip:hover { border-color: var(--navy); color: var(--ink); }
.chip[aria-pressed="true"] { background: var(--navy); border-color: var(--navy); color: var(--green); }

.catalog { padding-top: 20px; }
.grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 32px 16px; }
/* Sélection de l'accueil : 6 livres sur téléphone, 8 sur tablette, 10 puis 12 sur ordinateur */
.grid--picks > :nth-child(n + 7) { display: none; }

/* Carte livre */
.book { display: flex; flex-direction: column; min-width: 0; }
.book__frame { position: relative; }
.book__open { display: block; border-radius: 6px; }
.cover { display: block; width: 100%; height: auto; aspect-ratio: 2 / 3; object-fit: cover; border-radius: 3px 6px 6px 3px; background: var(--paper-3); box-shadow: 0 1px 2px rgba(13, 29, 54, 0.14), 0 20px 30px -20px rgba(13, 29, 54, 0.65); transition: transform .6s var(--ease), box-shadow .6s var(--ease); }
.cover--plain { display: grid; place-items: center; padding: 12%; background: var(--navy); color: var(--green); font: 700 1.25rem/1.15 var(--display); text-align: center; overflow: hidden; }
@media (hover: hover) { .book__open:hover .cover { transform: translateY(-6px); box-shadow: 0 1px 2px rgba(13, 29, 54, 0.14), 0 32px 40px -24px rgba(13, 29, 54, 0.6); } }
.book.is-in .cover { outline: 3px solid var(--green); outline-offset: 3px; }
.book__badges { position: absolute; top: 8px; left: 8px; display: flex; flex-wrap: wrap; gap: 4px; pointer-events: none; }
.badge { padding: 2px 8px; border-radius: 999px; background: rgba(255, 255, 255, 0.95); color: var(--ink); font-size: .6875rem; font-weight: 700; line-height: 1.6; box-shadow: 0 2px 6px rgba(13, 29, 54, 0.18); }
.badge--sup { background: var(--green); color: var(--navy); }
.book__ctl { position: absolute; right: 8px; bottom: 8px; }
.book.is-in .book__ctl { left: 8px; }
.addbtn { display: grid; place-items: center; width: 44px; height: 44px; padding: 0; border: 0; border-radius: 50%; background: var(--green); color: var(--navy); box-shadow: 0 8px 18px -8px rgba(13, 29, 54, 0.55); transition: background-color .2s var(--ease), color .2s var(--ease), transform .15s var(--ease); }
.addbtn svg { width: 20px; height: 20px; stroke-width: 2.4; }
.addbtn:hover { background: var(--navy); color: var(--green); }
.addbtn:active { transform: scale(.92); }
.book.is-out .cover { filter: grayscale(1); opacity: .55; }
.book__out { position: absolute; inset-inline: 8px; bottom: 8px; padding: 6px; border-radius: 999px; background: rgba(13, 29, 54, 0.9); color: var(--white); font-size: .8125rem; font-weight: 600; line-height: 1.3; text-align: center; }
.book__title { margin-top: 12px; font-size: .9375rem; font-weight: 700; line-height: 1.45; text-align: center; }
.book__title a { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; text-decoration: none; }
.book__title a:hover { color: var(--blue-700); }
.book__author { margin-top: 2px; color: var(--muted); font-size: .8125rem; text-align: center; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.book.is-out .book__title { color: var(--muted); }
.book--ghost { gap: 16px; }
.ghost { display: block; border-radius: 4px; background: var(--paper-2); }
.ghost--cover { aspect-ratio: 2 / 3; }
.ghost--line { width: 70%; height: 12px; margin-inline: auto; }
.ghost--title { width: 80%; height: 40px; }
.catalog__more { display: flex; justify-content: center; margin-top: 32px; }

/* Sous la sélection de l'accueil : tout le bandeau mène au catalogue complet */
.allbooks { display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: center; gap: 16px; margin-top: 32px; padding: 16px 20px; border-radius: 22px; background: var(--blue); color: var(--white); text-decoration: none; transition: background-color .3s var(--ease); }
.allbooks:hover { background: var(--blue-700); }
.allbooks__pile { --cw: 40px; width: 92px; height: 64px; }
.allbooks__text { display: grid; gap: 2px; line-height: 1.4; }
.allbooks__text b { font-size: 1.25rem; font-weight: 700; }
.allbooks__text small { font-size: .9375rem; }
.allbooks__go { grid-column: 1 / -1; display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; padding: 0 24px; border-radius: 999px; background: var(--green); color: var(--navy); font-weight: 700; }
.allbooks__go svg { transition: transform .3s var(--ease); }
@media (hover: hover) { .allbooks:hover .allbooks__go svg { transform: translateX(-4px); } }
.catalog__empty { display: grid; justify-items: center; gap: 16px; padding-block: 32px; color: var(--muted); text-align: center; }

/* Page d'un livre et page d'une série : la couverture (ou l'éventail) à gauche, les informations à côté */
.bookpage { padding-top: 16px; }
.bp { display: grid; gap: 24px; margin-top: 12px; }
.bp__cover { justify-self: center; width: min(68%, 300px); }
.bp__cover .cover { box-shadow: 0 1px 2px rgba(13, 29, 54, 0.14), 0 40px 60px -36px rgba(13, 29, 54, 0.7); }
.bp__cover.is-out .cover { filter: grayscale(1); opacity: .6; }
.bp__info { display: flex; flex-direction: column; align-items: stretch; min-width: 0; }
.bp__info > .label { align-self: flex-start; margin-bottom: 8px; }
.bp h1 { font: 700 clamp(1.5rem, 6.2vw, 1.875rem)/1.45 var(--display); color: var(--navy); overflow-wrap: anywhere; }
.bp__author { margin-top: 4px; color: var(--blue-700); font-size: 1.0625rem; font-weight: 600; }
.bp__tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 12px; }
.tag { padding: 3px 12px; border-radius: 999px; border: 1px solid var(--line-strong); font-size: .8125rem; font-weight: 600; }
.tag--sup { background: var(--green); border-color: var(--green); color: var(--navy); font-weight: 700; }
.tag--out { background: var(--danger-bg); border-color: #f3c9c3; color: var(--danger); font-weight: 700; }
/* Prix : celui du plus petit pack, en grand, et ce qu'il comprend à côté */
.bp__price { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 12px; margin-top: 16px; }
.bp__price b { font: 700 1.75rem/1.3 var(--display); color: var(--navy); white-space: nowrap; font-variant-numeric: tabular-nums; }
.bp__price b small { font: 600 1rem/1 var(--font); color: var(--muted); }
.bp__price span { color: var(--green-700); font-weight: 600; }
.notice { margin-top: 12px; padding: 12px 16px; border-radius: 14px; background: var(--paper-2); font-size: .9375rem; }
.bp__cta { display: grid; gap: 12px; margin-top: 16px; }
.buyrow { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 10px; }
.buyrow .stepper { min-height: 56px; }
.stepper--in { background: var(--green-100); border-color: var(--green); }
.bp__wa { margin-top: 10px; }
/* Livraison, paiement, appel : trois cases sur une ligne, l'icône au-dessus du texte (à côté sur grand écran) */
.perks { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); margin-top: 16px; overflow: hidden; border: 1px solid var(--line); border-radius: 16px; background: var(--white); }
.perks li { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; padding: 10px 8px; color: var(--ink-2); font-size: .8125rem; font-weight: 600; line-height: 1.4; text-align: center; }
.perks li + li { border-inline-start: 1px solid var(--line); }
.perks svg { width: 28px; height: 28px; padding: 5px; border-radius: 50%; background: var(--green-100); color: var(--green-700); }
.sp__sub { margin-top: 12px; color: var(--ink-2); }
/* Tomes de la série : dans la colonne des informations, sous les avantages ; sur grand écran l'éventail reste à côté */
.sp__tomes { margin-top: 32px; }
.sp__tomes h2 { margin-bottom: 16px; font: 700 1.375rem/1.4 var(--display); color: var(--navy); }
/* À propos du livre : un bloc blanc sous le bouton, dans la colonne des informations (la couverture reste à côté) */
.bp__about { margin-top: 20px; padding: 20px; border: 1px solid var(--line); border-inline-start: 4px solid var(--green); border-radius: 20px; background: var(--white); }
.bp__about h2 { margin-bottom: 8px; font: 700 1.25rem/1.4 var(--display); color: var(--navy); }
.bp__about p { color: var(--ink); font-size: 1.0625rem; line-height: 1.9; white-space: pre-line; }
.bp__packs { margin-top: 32px; padding: 20px; border-radius: 24px; background: var(--green-100); }
.bp__packs h2 { margin-bottom: 12px; font: 700 1.25rem/1.4 var(--display); color: var(--navy); }
.minipacks { display: grid; grid-template-columns: repeat(auto-fit, minmax(110px, 1fr)); gap: 8px; }
.minipacks li { display: grid; gap: 2px; padding: 12px 14px; border-radius: 14px; background: var(--white); }
.minipacks span { color: var(--ink-2); font-size: .875rem; font-weight: 600; }
.minipacks b { font: 700 1.25rem/1.1 var(--display); color: var(--navy); }
.minipacks small { font: 600 .75rem/1 var(--font); color: var(--muted); }
.bp-missing { display: grid; justify-items: start; gap: 20px; padding-block: 40px; }
.bp-missing h1 { font: 700 1.5rem/1.4 var(--display); color: var(--navy); }
.bp--ghost { grid-template-columns: 1fr; }
.bp--ghost .bp__info { gap: 12px; }
.sp__fan { position: relative; aspect-ratio: 5 / 4; overflow: hidden; border-radius: 24px; background: var(--green-100); }
.sp__fan .fan { --spread: 1.3; }
.sp__fan .fan img, .sp__fan .fan__plain { width: 120px; height: 180px; margin-left: -60px; bottom: 24px; }
.sp__meta { display: flex; align-items: baseline; gap: 16px; margin-top: 8px; color: var(--muted); font-size: 1rem; font-weight: 600; }
.sp__price { font: 700 1.75rem/1.1 var(--display); color: var(--blue-700); font-variant-numeric: tabular-nums; }
.sp__price small { font: 600 1rem/1 var(--font); color: var(--muted); }
.deals { display: grid; gap: 8px; margin-top: 4px; padding: 14px 16px; border-radius: 16px; background: var(--green-100); color: var(--green-700); font-weight: 600; }
.deals li { display: flex; align-items: flex-start; gap: 8px; }
.deals svg { flex: none; width: 18px; height: 18px; margin-top: 3px; stroke-width: 2.4; }
.deals span { text-wrap: pretty; }

.inpack { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 16px; padding: 4px; padding-inline-start: 18px; border: 1px solid var(--green); border-radius: 999px; background: var(--green-100); }
.inpack__label { display: inline-flex; align-items: center; gap: 8px; color: var(--green-700); font-weight: 700; }
.inpack__label svg { width: 18px; height: 18px; stroke-width: 2.2; }
.stock-out { display: flex; align-items: center; gap: 8px; color: var(--danger); font-weight: 700; }

/* Livre de la semaine : un panneau bleu nuit, la couverture à gauche */
.week__panel { display: grid; gap: 24px; padding: 32px 20px; overflow: hidden; border-radius: 28px; background: var(--navy); color: var(--white); }
.week__cover { display: grid; place-items: center; padding-block: 4px; }
.week__book { display: block; width: min(52%, 220px); border-radius: 6px; }
.cover--week { transform: rotate(-3deg); box-shadow: 0 40px 60px -28px rgba(0, 0, 0, 0.8), 0 0 0 1px rgba(255, 255, 255, 0.06); }
.week h2 { margin-top: 8px; font: 700 clamp(1.5rem, 6.2vw, 2rem)/1.4 var(--display); text-wrap: balance; }
.week__by { margin-top: 6px; color: var(--green); font-size: 1.0625rem; font-weight: 600; }
.week__desc { margin-top: 10px; max-width: 34em; color: rgba(255, 255, 255, 0.82); font-size: 1.0625rem; }
.week__cta { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin-top: 20px; }
.week .btn--blue { background: var(--green); color: var(--navy); }
.week .btn--blue:hover { background: var(--green-300); }
.week .btn--blue::after { display: none; }
.week .inpack { background: rgba(255, 255, 255, 0.08); border-color: rgba(199, 214, 155, 0.5); }
.week .inpack__label { color: var(--green); }
.week .stock-out { color: var(--white); }

/* Questions : le titre et une carte verte de contact à côté de la liste */
.faq__inner { display: grid; gap: 20px; }
.faq__side { display: flex; flex-direction: column; align-items: flex-start; }
.askcard { display: grid; gap: 8px; justify-items: start; margin-top: 16px; padding: 20px; border-radius: 22px; background: var(--green); color: var(--navy); }
.askcard h3 { font: 700 1.125rem/1.4 var(--display); }
.askcard p { font-size: .9375rem; font-weight: 600; }
.askcard .btn { margin-top: 6px; }
.faq__list { border-top: 1px solid var(--line-strong); }
.faq details { border-bottom: 1px solid var(--line-strong); }
.faq summary { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 56px; padding-block: 12px; font-size: 1rem; font-weight: 700; cursor: pointer; list-style: none; transition: color .2s var(--ease); }
.faq summary::-webkit-details-marker { display: none; }
.faq summary:hover { color: var(--blue-700); }
.faq summary::after { content: ""; flex: none; width: 28px; height: 28px; border-radius: 50%; background: linear-gradient(var(--navy), var(--navy)) center / 12px 2px no-repeat, linear-gradient(var(--navy), var(--navy)) center / 2px 12px no-repeat, var(--green-100); transition: transform .4s var(--ease), background-color .3s var(--ease); }
.faq details[open] summary::after { transform: rotate(45deg); background-color: var(--green); }
.faq details p { max-width: 46em; padding-bottom: 16px; color: var(--ink-2); }

/* Pied de page */
.footer { margin-top: 56px; padding-block: 44px 24px; background: var(--navy); color: rgba(255, 255, 255, 0.8); }
.footer__inner { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 28px 24px; }
.footer__brand { grid-column: 1 / -1; display: grid; justify-items: start; gap: 10px; }
.brand__mark--lg { width: 56px; height: 56px; }
.brand__mark--lg img { width: 36px; }
.footer__name { font: 700 1.875rem/1 "Markazi Text", var(--display); color: var(--white); }
.footer__brand p:last-child { max-width: 26em; }
.footer__col { display: grid; align-content: start; min-width: 0; font-size: .9375rem; }
.footer__col b { margin-bottom: 4px; color: var(--green); font-size: .875rem; font-weight: 700; }
.footer__col a { display: flex; flex-wrap: wrap; align-items: center; gap: 0 6px; min-height: 40px; color: rgba(255, 255, 255, 0.85); text-decoration: none; overflow-wrap: anywhere; transition: color .2s var(--ease); }
.footer__col a:hover { color: var(--green); }
.footer__legal { margin-top: 28px; padding-top: 18px; border-top: 1px solid rgba(255, 255, 255, 0.12); color: rgba(255, 255, 255, 0.6); font-size: .8125rem; }

/* Barre du pack */
.tray { position: fixed; z-index: 50; inset-inline: 12px; bottom: max(12px, env(safe-area-inset-bottom)); display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 12px; max-width: 600px; margin-inline: auto; padding: 8px; padding-inline-start: 16px; overflow: hidden; border-radius: 24px; background: var(--navy); color: var(--white); box-shadow: 0 24px 48px -20px rgba(8, 20, 40, 0.7); animation: rise .5s var(--ease); }
.tray__meter { position: absolute; inset-inline: 0; bottom: 0; height: 3px; background: rgba(255, 255, 255, 0.1); }
.tray__meter i { display: block; width: calc(var(--p, 0) * 1%); height: 100%; background: var(--green); transition: width .4s var(--ease); }
.tray__slots { display: flex; }
.slot { display: grid; place-items: center; width: 28px; height: 42px; overflow: hidden; border-radius: 2px 4px 4px 2px; background: var(--blue); color: var(--green); font-size: .6875rem; font-weight: 700; box-shadow: 0 0 0 2px var(--navy); }
.slot + .slot { margin-inline-start: -10px; }
.slot img { width: 100%; height: 100%; object-fit: cover; }
.slot--more { background: var(--navy-2); }
.slot.is-new { animation: pop .4s var(--ease); }
.tray__info { display: grid; min-width: 0; line-height: 1.35; }
.tray__info b { font-size: 1rem; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tray__info span { color: rgba(255, 255, 255, 0.72); font-size: .8125rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tray__btn { min-height: 48px; padding-inline: 24px; }

/* Bouton WhatsApp flottant, comme sur son ancien site (rond vert WhatsApp qui pulse, message déjà écrit) ;
   sur mobile, il remonte au-dessus de la barre du pack quand elle est là. */
.wa-float { position: fixed; z-index: 30; right: 20px; bottom: max(20px, env(safe-area-inset-bottom)); display: grid; place-items: center; width: 52px; height: 52px; border-radius: 50%; background: #25d366; color: var(--white); box-shadow: 0 4px 16px rgba(37, 211, 102, 0.4); animation: wa-pulse 2s infinite; transition: transform .2s var(--ease), bottom .4s var(--ease); }
.wa-float:hover { transform: scale(1.1); }
.wa-float svg { width: 28px; height: 28px; fill: currentColor; stroke: none; }
.has-tray .wa-float { bottom: calc(max(12px, env(safe-area-inset-bottom)) + 76px); }

/* Fenêtres : pack et menu */
.sheet { width: 100%; max-width: 100%; max-height: 92dvh; margin: auto 0 0; padding: 0; border: 0; border-radius: 28px 28px 0 0; background: var(--paper); color: var(--ink); overflow-y: auto; overscroll-behavior: contain; box-shadow: 0 -24px 60px -24px rgba(13, 29, 54, 0.45); }
.sheet[open] { animation: sheet-up .45s var(--ease); }
.sheet::backdrop { background: rgba(13, 29, 54, 0.5); -webkit-backdrop-filter: blur(3px); backdrop-filter: blur(3px); }
.sheet__close { position: sticky; top: 12px; z-index: 3; float: inline-end; display: grid; place-items: center; width: 44px; height: 44px; margin: 12px; padding: 0; border: 1px solid var(--line); border-radius: 50%; background: var(--white); color: var(--ink); transition: background-color .2s var(--ease); }
.sheet__close:hover { background: var(--green-100); }

.sheet--menu .sheet__close { position: absolute; top: 12px; inset-inline-end: 12px; float: none; margin: 0; }
.menu { display: grid; padding: 24px 20px 4px; }
.menu__title { margin-bottom: 8px; color: var(--muted); font-size: .875rem; font-weight: 700; }
.menu a { display: flex; align-items: center; min-height: 54px; border-bottom: 1px solid var(--line); font: 700 1.125rem/1.3 var(--display); text-decoration: none; transition: color .2s var(--ease); }
.menu a:hover { color: var(--blue-700); }
.menu__foot { display: grid; gap: 12px; padding: 20px 20px max(24px, env(safe-area-inset-bottom)); }

.cart { padding: 24px 20px 28px; }
.cart__head { padding-inline-end: 52px; margin-bottom: 4px; }
.cart__head h2 { font: 700 1.5rem/1.4 var(--display); }
.cart__head h2:focus { outline: none; }
.cart__head p { margin-top: 2px; color: var(--muted); }
.alert { display: flex; align-items: flex-start; gap: 12px; margin-top: 16px; padding: 12px 16px; border-radius: 14px; background: #fff8e6; border: 1px solid #f0d88f; color: #6b4b00; font-size: .9375rem; }
.alert svg { margin-top: 2px; }
.alert--error { background: var(--danger-bg); border-color: #f3c9c3; color: #7a1c13; }
.alert--error .link { color: #7a1c13; }
.progress { margin-top: 16px; }
.meter { height: 6px; border-radius: 3px; background: var(--line); overflow: hidden; }
.meter i { display: block; width: calc(var(--p) * 1%); height: 100%; border-radius: 3px; background: var(--blue); transition: width .4s var(--ease); }
.progress p { margin-top: 8px; font-size: .9375rem; font-weight: 600; }
.cgroup { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 12px; margin-top: 16px; padding: 12px; border: 1px solid var(--line); border-radius: 20px; background: var(--white); }
.cgroup__thumbs { display: flex; padding-inline-start: 4px; }
.cgroup__thumbs .cover { flex: none; width: 32px; padding: 0; font-size: .5rem; box-shadow: 0 0 0 2px var(--white), 0 4px 8px -2px rgba(13, 29, 54, 0.35); }
.cgroup__thumbs .cover + .cover { margin-inline-start: -16px; }
.cgroup__info { min-width: 0; }
.cgroup__info b { display: block; font-weight: 700; line-height: 1.35; overflow-wrap: anywhere; }
.cgroup__info span { color: var(--muted); font-size: .8125rem; }
.clines { margin-top: 8px; }
.cline { display: grid; grid-template-columns: 48px minmax(0, 1fr) auto; align-items: center; gap: 12px; padding-block: 12px; border-bottom: 1px solid var(--line); }
.cline__cover { display: block; border-radius: 4px; }
.cline .cover { width: 48px; padding: 2px; font-size: .5rem; box-shadow: 0 6px 12px -4px rgba(13, 29, 54, 0.45); }
.cline__info { min-width: 0; }
.cline__t { font-size: .9375rem; font-weight: 600; line-height: 1.35; overflow-wrap: anywhere; }
.cline__s { color: var(--blue-700); font-size: .8125rem; font-weight: 600; }
.cgroup__now { color: var(--navy); font-weight: 700; }
.cline__g { color: var(--muted); font-size: .8125rem; }
.nudge { display: flex; align-items: center; gap: 8px; margin-top: 16px; padding: 12px 16px; border-radius: 14px; background: var(--green-100); color: var(--green-700); font-size: .9375rem; font-weight: 600; }
.nudge svg { width: 18px; height: 18px; stroke-width: 2.2; }
.nudge span { text-wrap: pretty; }
.nudge + .nudge { margin-top: 8px; }
.saving { display: flex; align-items: center; justify-content: center; gap: 8px; margin-top: 12px; padding: 10px 16px; border-radius: 14px; background: var(--green); color: var(--navy); font-weight: 700; }
.saving svg { width: 18px; height: 18px; stroke-width: 2.4; }
.totals { display: grid; gap: 8px; margin-top: 20px; padding: 16px 20px; border: 1px solid var(--line); border-radius: 20px; background: var(--white); font-size: .9375rem; }
.totals div { display: flex; justify-content: space-between; gap: 12px; }
.totals dd { white-space: nowrap; font-weight: 600; }
.totals .is-free dd { padding: 0 10px; border-radius: 999px; background: var(--green); color: var(--navy); font-weight: 700; }
.totals .is-total { align-items: baseline; padding-top: 12px; border-top: 1px solid var(--line); font-weight: 700; }
.totals .is-total dd { font: 700 1.75rem/1.1 var(--display); color: var(--navy); font-variant-numeric: tabular-nums; }
.cart__cta { display: grid; gap: 12px; margin-top: 20px; }
.cart__empty { padding-block: 20px; color: var(--muted); }
.cart__summary { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 4px 12px; margin-top: 16px; padding: 4px 16px; border: 1px solid var(--line); border-radius: 14px; background: var(--white); font-weight: 700; }

.form { display: grid; gap: 14px; margin-top: 16px; }
.field { display: grid; gap: 6px; min-width: 0; }
.field label { font-size: .9375rem; font-weight: 600; }
.field input, .field textarea { width: 100%; min-height: 52px; padding: 12px 16px; border: 1px solid var(--line-strong); border-radius: 14px; background: var(--white); font-size: 1rem; transition: border-color .2s var(--ease), box-shadow .2s var(--ease); }
.field textarea { resize: vertical; }
.field input:focus, .field textarea:focus { outline: none; border-color: var(--navy); box-shadow: 0 0 0 4px rgba(199, 214, 155, 0.55); }
.field [aria-invalid="true"] { border-color: var(--danger); }
.field__err { color: var(--danger); font-size: .875rem; font-weight: 600; }
.hp { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.cod { display: flex; align-items: center; gap: 12px; padding: 12px 16px; border-radius: 14px; background: var(--green-100); color: var(--green-700); font-size: .9375rem; font-weight: 700; }

.done { text-align: center; }
.done__mark { display: grid; place-items: center; width: 64px; height: 64px; margin: 8px auto 16px; border-radius: 50%; background: var(--green); color: var(--navy); }
.done__mark svg { width: 28px; height: 28px; stroke-width: 2.4; }
.done .cart__head, .done h2 { padding-inline: 0; }
.done h2 { font: 700 1.5rem/1.4 var(--display); }
.done h2:focus { outline: none; }
.done__text { margin-top: 12px; color: var(--muted); }
.done__total { display: grid; gap: 4px; margin-top: 20px; padding: 16px; border: 1px solid var(--line); border-radius: 20px; background: var(--white); }
.done__total dt { color: var(--muted); font-size: .9375rem; }
.done__total dd { font: 700 2rem/1.1 var(--display); color: var(--navy); font-variant-numeric: tabular-nums; }
.done__items { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; margin-top: 16px; }
.done__items li { padding: 4px 12px; border: 1px solid var(--line); border-radius: 999px; background: var(--white); font-size: .8125rem; }

/* Mouvements */
@keyframes rise { from { opacity: 0; transform: translateY(24px); } to { opacity: 1; transform: none; } }
@keyframes sheet-up { from { opacity: 0; transform: translateY(32px); } to { opacity: 1; transform: none; } }
@keyframes pop { from { opacity: 0; transform: scale(.6); } to { opacity: 1; transform: none; } }
@keyframes wa-pulse { 0% { box-shadow: 0 0 0 0 rgba(37, 211, 102, 0.5); } 70% { box-shadow: 0 0 0 12px rgba(37, 211, 102, 0); } 100% { box-shadow: 0 0 0 0 rgba(37, 211, 102, 0); } }
@keyframes marquee { to { transform: translateX(-50%); } }
@keyframes marquee-rtl { to { transform: translateX(50%); } }
@keyframes kenburns { from { transform: scale(1); } to { transform: scale(1.08) translateY(-1.5%); } }
@keyframes float { 0%, 100% { translate: 0 0; } 50% { translate: 0 -10px; } }
@keyframes slide-in { from { opacity: 0; transform: translateX(40px); } to { opacity: 1; transform: none; } }
@keyframes slide-in-rtl { from { opacity: 0; transform: translateX(-40px); } to { opacity: 1; transform: none; } }

/* Entrée du haut de page, une seule fois au chargement */
.hero__main.is-entering .slide__body > * { animation: rise .9s var(--ease) both; }
.hero__main.is-entering .slide__body > :nth-child(2) { animation-delay: 80ms; }
.hero__main.is-entering .slide__body > :nth-child(3) { animation-delay: 160ms; }
.hero__main.is-entering .slide__body > :nth-child(4) { animation-delay: 240ms; }
.hero__main.is-entering .slide__visual { animation: rise 1s var(--ease) 120ms both; }

/* Apparition au défilement (voir reveal() dans app.js) */
[data-reveal="pending"] { opacity: 0; transform: translateY(20px); }
[data-reveal="shown"] { opacity: 1; transform: none; transition: opacity .7s var(--ease) var(--d, 0ms), transform .7s var(--ease) var(--d, 0ms); }

/* Effets continus seulement sur les écrans avec souris : sur téléphone, ils occupent le processeur pour rien */
@media (hover: hover) and (pointer: fine) {
  .slide__media img { animation: kenburns 18s ease-in-out infinite alternate; }
  .slide__tag, .week__book { animation: float 7s ease-in-out infinite; }
  .pack:hover .pile img { transform: rotate(calc((var(--i) - (var(--n) - 1) / 2) * 4deg)) translateY(-4px); }
}

/* Tablettes */
@media (min-width: 560px) {
  :root { --gutter: 24px; }
  .grid.grid--tomes { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 36px 20px; }
  .grid--picks > :nth-child(n + 7) { display: flex; }
  .grid--picks > :nth-child(n + 10) { display: none; }
  .hscroll { grid-auto-columns: 280px; }
  .hscroll--books { grid-auto-columns: 160px; }
  .bagbtn__label { display: inline; }
  .bagbtn { padding-inline: 16px 12px; }
  .infos { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .infos .stats__books { grid-column: auto; }
}

@media (min-width: 640px) {
  .allbooks { grid-template-columns: auto minmax(0, 1fr) auto; padding: 20px 28px; }
  .allbooks__go { grid-column: auto; }
  .sheet { width: min(640px, calc(100vw - 32px)); max-height: 88dvh; margin: auto; border-radius: 28px; }
  .sheet--cart { width: min(460px, 100vw); height: 100dvh; max-height: 100dvh; margin-block: 0; margin-inline: auto 0; border-radius: 0; }
  .sheet--cart[open] { animation: slide-in .45s var(--ease); }
  [dir="rtl"] .sheet--cart[open] { animation-name: slide-in-rtl; }
  .sheet--menu { width: min(440px, calc(100vw - 32px)); }
  .cart { padding: 28px 28px; }
  .tray { gap: 16px; }
  .slot { width: 32px; height: 48px; }
  .tray__info b { font-size: 1.0625rem; }
  .tray__btn { padding-inline: 28px; }
  .footer__inner { grid-template-columns: 2fr 1fr 1fr 1fr; }
  .footer__brand { grid-column: auto; }
}

@media (min-width: 768px) {
  .has-tray .wa-float { bottom: max(20px, env(safe-area-inset-bottom)); }
  .grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .grid--picks > :nth-child(n + 7) { display: flex; }
  .grid--picks > :nth-child(n + 9) { display: none; }
  .split { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); align-items: center; gap: 40px; }
  .slide__title { font-size: 2.375rem; }
  .slide__tag { left: 16px; bottom: 16px; padding: 12px 18px; }
  .slide__tag b { font-size: 1.5rem; }
  .steps ol { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 28px; padding-top: 20px; border-top: 1px solid var(--line); }
  .bp.split { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); align-items: start; gap: 48px; }
  .bp__cover { position: sticky; top: calc(var(--header-h) + 24px); width: 100%; max-width: 380px; justify-self: stretch; }
  .sp__fan { position: sticky; top: calc(var(--header-h) + 24px); }
  .grid.grid--tomes { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .week__panel.split { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); }
  .faq__inner { grid-template-columns: minmax(0, 4fr) minmax(0, 8fr); align-items: start; gap: 48px; }
  .faq__side { position: sticky; top: calc(var(--header-h) + 24px); }
}

/* Ordinateur */
@media (min-width: 900px) {
  /* Packs : cinq colonnes, la pile de couvertures au-dessus du prix */
  .packs { grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); gap: 14px; }
  .pack, [dir="rtl"] .pack { grid-template-columns: minmax(0, 1fr); justify-items: center; align-content: end; gap: 2px; padding: 20px 14px 18px; text-align: center; }
  .pile { --cw: 58px; height: 100px; max-width: 176px; margin-bottom: 14px; }
  .pack__price { font-size: 1.875rem; }
  .pack__flag { right: 50%; translate: 50% 0; }
  @media (hover: hover) { .pack:hover { transform: translateY(-4px); box-shadow: 0 28px 48px -32px rgba(13, 29, 54, 0.45); } }
}

@media (min-width: 1024px) {
  :root { --gutter: 32px; }
  .grid.grid--tomes { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .header__top { grid-template-columns: auto minmax(0, 1fr) auto; grid-template-areas: "brand search actions"; gap: 32px; padding-block: 12px; }
  .menu-btn { display: none; }
  .search { max-width: 620px; justify-self: center; width: 100%; }
  .search input { min-height: 52px; }
  .search__go { min-height: 44px; }
  .nav { display: block; }
  .brand__logo { width: 68px; }

  .hero { padding-top: 24px; }
  .split { gap: 56px; }
  .slide__title { font-size: 2.625rem; }
  .slide__text { font-size: 1.125rem; }
  .slide__media { aspect-ratio: 5 / 4; max-height: 480px; border-radius: 28px; }
  .infos { grid-template-columns: 1.6fr 1fr 1fr 1fr; margin-top: 24px; }
  .info--ig { grid-column: auto; flex-wrap: nowrap; }
  .marquee { margin-top: 32px; }

  .section { padding-top: 64px; }
  .head { margin-bottom: 24px; }
  .head h2, .faq h2 { font-size: 2.125rem; }
  .rowctl { display: flex; }

  .hscroll { gap: 24px; grid-auto-columns: calc((100% - 72px) / 4); }
  .hscroll--books { grid-auto-columns: calc((100% - 120px) / 6); gap: 24px; }
  .chips__arrow { display: grid; }
  .chip { min-height: 40px; }
  .grid { grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 44px 28px; }
  .grid--picks > :nth-child(n + 7) { display: flex; }
  .grid--picks > :nth-child(n + 11) { display: none; }
  .catalog { padding-top: 28px; }
  .allbooks { gap: 24px; margin-top: 40px; padding: 20px 32px; }
  .allbooks__pile { --cw: 52px; width: 136px; height: 84px; }
  .allbooks__text b { font-size: 1.375rem; }

  .page-head { padding-top: 28px; }
  .bookpage { padding-top: 24px; }
  .bp.split { gap: 64px; margin-top: 20px; }
  .bp__packs { padding: 24px 28px; }
  .bp__about { margin-top: 24px; padding: 24px 28px; }
  .perks li { flex-direction: row; gap: 8px; padding: 10px 12px; text-align: start; }
  .bp__about h2 { font-size: 1.375rem; }
  .bp__about p { font-size: 1.125rem; }

  .week__panel { gap: 56px; padding: 48px 56px; border-radius: 32px; }
  .week__book { width: min(64%, 260px); }
  .sp__fan .fan { --spread: 1.9; }
  .sp__fan .fan img, .sp__fan .fan__plain { width: 168px; height: 252px; margin-left: -84px; bottom: 32px; }

  .faq__inner { gap: 64px; }
  .footer { margin-top: 80px; padding-top: 56px; }
}

@media (min-width: 1200px) {
  .grid { grid-template-columns: repeat(6, minmax(0, 1fr)); }
  .grid--picks > :nth-child(n + 11) { display: flex; }
  .slide__title { font-size: 2.875rem; }
}

/* Téléphone (moins de 560 px), sans effet sur la tablette ni le PC */
@media (max-width: 559px) {
  /* En-tête : une seule ligne comme sur PC (menu, logo, recherche, pack). Recherche sans bouton (touche « بحث » du clavier),
     pack réduit à son icône avec le nombre en pastille. */
  .header__top { grid-template-columns: auto auto minmax(0, 1fr) auto; grid-template-areas: "menu brand search actions"; gap: 8px; padding-block: 8px; }
  .brand__logo { width: 48px; }
  .search__go { display: none; }
  .search > svg { left: 12px; width: 18px; height: 18px; }
  .search input { min-height: 44px; padding: 0 14px 0 38px; font-size: 1rem; }
  .suggest { position: fixed; top: calc(var(--header-h) + 8px); left: 12px; right: 12px; }
  .bagbtn { justify-content: center; width: 44px; padding: 0; }
  .bag__count { position: absolute; top: -4px; right: -4px; min-width: 20px; height: 20px; padding-inline: 5px; border-radius: 10px; font-size: .6875rem; box-shadow: 0 0 0 2px var(--blue); }

  /* Accueil : une ligne discrète (Instagram et nombre de livres) ; livraison et paiement sont déjà dans le bandeau juste dessous */
  .infos { display: flex; flex-wrap: wrap; justify-content: center; gap: 4px 20px; margin-top: 20px; overflow: visible; border: 0; border-radius: 0; background: none; }
  .info:not(.info--ig, .stats__books) { display: none; }
  .info { position: relative; gap: 6px; padding: 0; background: none; }
  .info__icon { width: auto; height: auto; background: none; color: var(--blue-700); }
  .info__icon svg { width: 16px; height: 16px; }
  .info__text { display: block; flex: none; }
  .info__text b { color: var(--ink-2); font-size: .8125rem; font-weight: 600; }
  .info__text small { display: none; }
  .info__cta { position: absolute; inset: -10px -6px; min-height: 0; padding: 0; background: none; color: transparent; font-size: 0; }
  .info__cta:hover { background: none; }

  /* Livres : trois par ligne, carte compacte (bouton + et compteur plus petits, zone de toucher gardée) */
  .grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px 10px; }
  .hscroll--books { grid-auto-columns: 108px; gap: 12px; }
  .book__title { margin-top: 8px; font-size: .8125rem; line-height: 1.4; }
  .book__author { font-size: .75rem; }
  .book__ctl { right: 6px; bottom: 6px; }
  .book.is-in .book__ctl { left: 6px; }
  .book__badges { top: 6px; left: 6px; }
  .badge { padding: 1px 6px; font-size: .625rem; }
  .book__out { inset-inline: 4px; bottom: 4px; padding: 4px; font-size: .6875rem; }
  .cover--plain { font-size: .875rem; }
  .addbtn { position: relative; width: 36px; height: 36px; }
  .addbtn::before { content: ""; position: absolute; inset: -4px; }
  .addbtn svg { width: 18px; height: 18px; }
  .stepper--card button { width: 30px; height: 34px; }
  .stepper--card button svg { width: 16px; height: 16px; }
  .stepper--card .stepper__n { min-width: 16px; font-size: .8125rem; }

  /* Pages livre et série : couverture et éventail moins hauts */
  .bp__cover { width: min(50%, 220px); }
  .sp__fan { aspect-ratio: 16 / 10; }
  .sp__fan .fan img, .sp__fan .fan__plain { width: 96px; height: 144px; margin-left: -48px; bottom: 16px; }
  .week__book { width: min(40%, 180px); }

  /* Page livre : les cinq prix du pack sur une seule ligne */
  .bp__packs { padding: 16px; }
  .minipacks { grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 6px; }
  .minipacks li { justify-items: center; gap: 4px; padding: 10px 2px; text-align: center; }
  .minipacks span { font-size: .75rem; }
  .minipacks b { display: grid; justify-items: center; gap: 2px; font-size: 1.125rem; }
  .minipacks small { font-size: .6875rem; }

  /* Page série : trois tomes visibles, les suivants défilent sur la même ligne */
  .grid.grid--tomes { grid-template-columns: none; grid-auto-flow: column; grid-auto-columns: calc((100% - 20px) / 3); gap: 10px; overflow-x: auto; overscroll-behavior-x: contain; margin-inline: calc(-1 * var(--gutter)); padding: 4px var(--gutter) 8px; scroll-snap-type: x mandatory; scroll-padding-inline: var(--gutter); scrollbar-width: none; }
  .grid--tomes::-webkit-scrollbar { display: none; }
  .grid--tomes > * { scroll-snap-align: start; }

  /* Séries : deux par ligne (page des séries) ou deux visibles dans les rangées qui défilent, éventail réduit */
  .series-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 28px 12px; }
  #seriesGrid.hscroll { grid-auto-columns: calc((100% - 12px) / 2.15); gap: 12px; }
  .scard__fan { border-radius: 16px; }
  .scard .fan { transform: scale(.62); transform-origin: 50% 100%; }
  .scard__flag { top: 8px; left: 8px; padding: 3px 8px; font-size: .6875rem; }
  .scard__body { padding-top: 10px; }
  .scard h3 { font-size: .9375rem; }
  .scard__meta { gap: 8px; font-size: .8125rem; }
  .scard__price { font-size: 1.0625rem; }
  .scard__ctl { padding-top: 10px; }
  .scard__deal { padding: 2px 8px; font-size: .75rem; }
  .scard__ctl .btn { gap: 6px; min-height: 44px; padding-inline: 10px; font-size: .875rem; }

  /* Fil d'Ariane et pied de page : zones de toucher de 44 px sans changer la mise en page */
  .crumbs a { padding-block: 10px; margin-block: -10px; }
  .footer__col a { min-height: 44px; }
}

/* Tablette : en-tête sur une seule ligne aussi (menu, logo, recherche, pack) */
@media (min-width: 560px) and (max-width: 1023px) {
  .header__top { grid-template-columns: auto auto minmax(0, 1fr) auto; grid-template-areas: "menu brand search actions"; gap: 12px; padding-block: 8px; }
}

/* Pack sur téléphone : le titre reste en haut avec le bouton fermer, la liste passe dessous */
@media (max-width: 639px) {
  .cart:not(.done) > .cart__head { position: sticky; top: 0; z-index: 2; margin: -24px -20px 4px; padding: 24px 20px 10px; padding-inline-end: 72px; background: var(--paper); }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
  [data-reveal] { opacity: 1 !important; transform: none !important; }
}
