/* ============================================================
   Journal annuel — librairie et liseuse
   Style classique : toile émeraude, dorure, papier vergé,
   typographie Garamond.
   ============================================================ */
[hidden] { display: none !important; }


:root {
  --serif-livre: "EB Garamond", "Cormorant Garamond", Georgia, serif;
  --serif-titre: "Cormorant Garamond", "EB Garamond", Georgia, serif;
  --papier: #F7F1E3;
  --papier-ombre: #E9DFC8;
  --toile: #0B4A38;
  --toile-sombre: #06291F;
  --dorure: linear-gradient(135deg, #8C6A25 0%, #E6CC8A 38%, #B8923F 55%, #F2DFA8 72%, #9A7630 100%);
}

.jn { font-family: var(--serif-livre); }
.jn h1, .jn h2, .jn h3 { font-family: var(--serif-titre); font-weight: 600; letter-spacing: .005em; }
.jn .petites-cap { font-variant: small-caps; letter-spacing: .08em; }

/* ---------- Bandeau de la librairie ---------- */
.jn-hero {
  position: relative; isolation: isolate; overflow: hidden;
  color: var(--sand-light);
  background:
    radial-gradient(ellipse at 72% 45%, rgba(217,190,124,.22), transparent 58%),
    linear-gradient(120deg, var(--nuit) 0%, var(--emerald-deep) 55%, #0E5D46 100%);
  padding: 84px 0 92px;
}
.jn-hero::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: var(--e-girih) 0 0 / 64px 64px; opacity: .09;
}
.jn-hero::after {
  content: ""; position: absolute; inset: 14px; z-index: -1; pointer-events: none;
  border: 1px solid rgba(217,190,124,.3); outline: 1px solid rgba(217,190,124,.12); outline-offset: 5px;
}
.jn-hero .container { display: grid; grid-template-columns: 1.15fr .85fr; gap: 56px; align-items: center; }
.jn-hero .eyebrow { display: inline-flex; align-items: center; gap: 10px; font-family: var(--font-caption); font-size: .78rem; letter-spacing: .18em; text-transform: uppercase; color: var(--gold-soft); font-weight: 600; margin-bottom: 18px; }
.jn-hero .eyebrow::before { content: ""; width: 14px; height: 14px; background: var(--e-etoile) center / contain no-repeat; }
.jn-hero h1 { color: var(--sand-light); font-size: clamp(2.4rem, 5vw, 3.8rem); line-height: 1.02; margin: 0 0 18px; }
.jn-hero h1 em { font-style: italic; color: var(--gold-soft); font-weight: 500; }
.jn-hero .lede { font-size: 1.22rem; line-height: 1.6; color: rgba(251,248,241,.86); max-width: 52ch; margin: 0 0 30px; }
.jn-hero .orn { width: 220px; height: 22px; background: var(--e-ornement) left center / contain no-repeat; margin: 0 0 22px; }
.jn-hero .hero-actions { display: flex; gap: 14px; flex-wrap: wrap; }
.jn-hero .scene { display: flex; justify-content: center; }
@media (max-width: 860px) {
  .jn-hero .container { grid-template-columns: 1fr; gap: 40px; }
  .jn-hero { padding: 60px 0 70px; }
}

/* ---------- Le livre (couverture en relief) ---------- */
.livre {
  --l: 240px;
  position: relative; display: inline-block;
  width: var(--l); aspect-ratio: 2 / 3;
  perspective: 1400px;
  text-decoration: none !important;
}
.livre .volume {
  position: absolute; inset: 0;
  transform-style: preserve-3d;
  transform: rotateY(-24deg) rotateX(4deg);
  transition: transform .6s cubic-bezier(.2,.7,.2,1);
}
.livre:hover .volume, .livre:focus-visible .volume { transform: rotateY(-8deg) rotateX(2deg) translateY(-4px); }
.livre .plat {
  position: absolute; inset: 0; border-radius: 2px 6px 6px 2px; overflow: hidden;
  transform: translateZ(14px);
  box-shadow: inset 4px 0 8px -4px rgba(0,0,0,.6), 0 30px 50px -22px rgba(0,0,0,.75);
  background: var(--toile);
}
.livre .plat img { width: 100%; height: 100%; object-fit: cover; }
.livre .tranche { /* tranche des pages */
  position: absolute; left: 0; top: 3px; bottom: 3px; width: 26px;
  transform: translateX(calc(var(--l) - 16px)) rotateY(90deg);
  background: repeating-linear-gradient(90deg, #F6EEDC 0 1px, #E2D4B2 1px 2px);
}
.livre .dos { /* plat arrière */
  position: absolute; inset: 0; border-radius: 2px 6px 6px 2px;
  transform: translateZ(-13px);
  background: var(--toile-sombre);
  box-shadow: -8px 0 40px 4px rgba(0,0,0,.35);
}
.livre .ombre {
  position: absolute; left: 8%; right: -6%; bottom: -26px; height: 26px;
  background: radial-gradient(ellipse at center, rgba(0,0,0,.45), transparent 70%);
  filter: blur(4px); transform: translateZ(-10px);
}

/* Couverture typographique (quand aucune image n'est fournie) */
.couv {
  position: absolute; inset: 0;
  display: flex; flex-direction: column; align-items: center; justify-content: space-between;
  text-align: center; padding: 12% 11% 10%;
  color: #EBD49A;
  background:
    radial-gradient(ellipse at 50% 38%, rgba(255,255,255,.07), transparent 60%),
    var(--e-girih) 0 0 / 38px 38px,
    linear-gradient(160deg, #0E5A45, var(--toile) 45%, var(--toile-sombre));
  font-family: var(--serif-titre);
}
.couv::before, .couv::after { content: ""; position: absolute; pointer-events: none; }
.couv::before { inset: 6%; border: 1.5px solid rgba(230,204,138,.75); }
.couv::after { inset: calc(6% + 5px); border: .5px solid rgba(230,204,138,.45); }
.couv .c-haut { font-family: var(--font-caption); font-size: calc(var(--l) * .036); letter-spacing: .22em; text-transform: uppercase; opacity: .92; }
.couv .c-rosace { width: 44%; aspect-ratio: 1; background: var(--e-rosace) center / contain no-repeat; opacity: .95; filter: drop-shadow(0 0 1px rgba(0,0,0,.3)); }
.couv .c-titre { font-size: calc(var(--l) * .092); line-height: 1.02; font-weight: 600;
  background: var(--dorure); -webkit-background-clip: text; background-clip: text; color: transparent; }
.couv .c-sous { font-style: italic; font-size: calc(var(--l) * .05); opacity: .9; margin-top: 4px; }
.couv .c-annee { font-size: calc(var(--l) * .07); letter-spacing: .12em;
  background: var(--dorure); -webkit-background-clip: text; background-clip: text; color: transparent; }

/* ---------- Sections ---------- */
.jn-section { padding: 80px 0; }
.jn-section.papier { background: linear-gradient(180deg, var(--papier), #FBF7EE); border-top: 1px solid var(--line-gold); border-bottom: 1px solid var(--line-gold); }
.jn-titre { text-align: center; margin: 0 auto 48px; max-width: 640px; }
.jn-titre .eyebrow { font-family: var(--font-caption); font-size: .76rem; letter-spacing: .16em; text-transform: uppercase; color: var(--gold); font-weight: 700; }
.jn-titre h2 { font-size: clamp(2rem, 3.6vw, 2.7rem); margin: 8px 0 12px; }
.jn-titre .orn { width: 240px; height: 22px; margin: 0 auto 14px; background: var(--e-ornement) center / contain no-repeat; }
.jn-titre p { color: rgba(19,36,30,.7); font-size: 1.12rem; }

/* Édition à la une */
.une { display: grid; grid-template-columns: 340px 1fr; gap: 64px; align-items: center; }
.une .livre { --l: 300px; }
.une .meta-annee { font-family: var(--font-caption); font-size: .78rem; letter-spacing: .16em; text-transform: uppercase; color: var(--gold); font-weight: 700; }
.une h3 { font-size: clamp(2rem, 3.4vw, 2.8rem); margin: 6px 0 6px; line-height: 1.05; }
.une .sous { font-style: italic; font-size: 1.25rem; color: rgba(19,36,30,.72); margin: 0 0 18px; }
.une .resume { font-size: 1.14rem; line-height: 1.7; color: rgba(19,36,30,.84); margin: 0 0 22px; max-width: 60ch; }
.une .resume::first-letter { float: left; font-family: var(--serif-titre); font-size: 3.6em; line-height: .82; padding: 6px 10px 0 0; color: var(--emerald); font-weight: 600; }
.fiche-tech { display: flex; flex-wrap: wrap; gap: 10px 28px; margin: 0 0 26px; padding: 14px 0; border-top: 1px solid var(--line-gold); border-bottom: 1px solid var(--line-gold); font-family: var(--font-caption); font-size: .86rem; color: rgba(19,36,30,.7); }
.fiche-tech b { color: var(--emerald-deep); font-weight: 600; }
.prix-bloc { display: flex; align-items: center; gap: 22px; flex-wrap: wrap; }
.prix { font-family: var(--serif-titre); font-size: 2.1rem; font-weight: 600; color: var(--emerald-deep); line-height: 1; }
.prix small { font-family: var(--font-caption); font-size: .8rem; font-weight: 600; color: rgba(19,36,30,.55); letter-spacing: .06em; margin-left: 4px; }
.prix.libre { color: var(--gold); font-size: 1.6rem; }
@media (max-width: 860px) {
  .une { grid-template-columns: 1fr; gap: 44px; text-align: left; }
  .une .livre { --l: 230px; justify-self: center; }
}

/* Rayonnage */
.rayon { position: relative; display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 56px 34px; padding: 0 10px; }
.rayon-item { display: flex; flex-direction: column; align-items: center; text-align: center; }
.rayon-item .livre { --l: 160px; margin-bottom: 34px; }
.rayon-item .t { font-family: var(--serif-titre); font-size: 1.22rem; font-weight: 600; color: var(--emerald-deep); line-height: 1.15; }
.rayon-item .a { font-family: var(--font-caption); font-size: .78rem; letter-spacing: .1em; text-transform: uppercase; color: var(--gold); margin: 4px 0 6px; }
.rayon-item .p { font-size: 1.02rem; color: rgba(19,36,30,.7); }
.etagere { height: 14px; margin: -10px 0 0; border-radius: 2px;
  background: linear-gradient(180deg, #CFB57A, #9A7A3A 60%, #6E5424);
  box-shadow: 0 10px 18px -10px rgba(0,0,0,.5); }

/* Étapes */
.etapes { display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; counter-reset: e; }
.etape { position: relative; text-align: center; padding: 34px 26px 28px; background: #FFFDF8; border: 1px solid var(--line-gold); border-radius: 10px; }
.etape .med { width: 64px; height: 64px; margin: 0 auto 16px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 1.7rem; color: var(--gold-soft);
  background: radial-gradient(circle at 35% 30%, var(--emerald), var(--emerald-deep));
  box-shadow: 0 0 0 1px rgba(184,146,63,.55), 0 0 0 6px rgba(184,146,63,.12); }
.etape::before { counter-increment: e; content: counter(e, upper-roman); position: absolute; top: 12px; left: 16px; font-family: var(--serif-titre); color: var(--gold); font-size: 1.1rem; }
.etape h3 { font-size: 1.45rem; margin: 0 0 8px; }
.etape p { margin: 0; color: rgba(19,36,30,.72); font-size: 1.06rem; }
.moyens { display: flex; justify-content: center; gap: 12px; flex-wrap: wrap; margin-top: 30px; }
.moyen-badge { display: inline-flex; align-items: center; gap: 8px; padding: 8px 16px; border-radius: 999px; background: #fff; border: 1px solid var(--line-gold); font-family: var(--font-caption); font-size: .85rem; font-weight: 600; color: var(--emerald-deep); }
.moyen-badge .ic { color: var(--gold); }
@media (max-width: 860px) { .etapes { grid-template-columns: 1fr; } }

.garantie { display: flex; gap: 16px; align-items: flex-start; max-width: 760px; margin: 36px auto 0; padding: 18px 22px; border-left: 3px solid var(--gold); background: rgba(217,190,124,.12); border-radius: 0 8px 8px 0; font-size: 1.04rem; color: rgba(19,36,30,.8); }
.garantie .ic { font-size: 1.5rem; color: var(--emerald); margin-top: 2px; }

/* ---------- Fiche d'une édition ---------- */
.fiche-ed { display: grid; grid-template-columns: 360px 1fr; gap: 64px; align-items: start; }
.fiche-ed .colonne-livre { position: sticky; top: 110px; display: flex; flex-direction: column; align-items: center; gap: 40px; }
.fiche-ed .livre { --l: 290px; }
.achat-carte { width: 100%; background: #FFFDF8; border: 1px solid var(--line-gold); border-radius: 12px; padding: 24px; box-shadow: 0 20px 40px -30px rgba(11,26,21,.5); }
.achat-carte .prix { margin-bottom: 14px; }
.achat-carte .btn { width: 100%; text-align: center; margin-top: 10px; display: flex; justify-content: center; align-items: center; gap: 8px; }
.achat-carte .note { font-size: .92rem; color: rgba(19,36,30,.62); margin: 14px 0 0; line-height: 1.5; }
.btn-emeraude { background: var(--emerald); color: var(--sand-light); border: 1px solid var(--emerald); box-shadow: 0 0 0 3px rgba(184,146,63,.2); }
.btn-emeraude:hover { background: var(--emerald-deep); color: var(--sand-light); text-decoration: none; }
.btn-ligne { background: transparent; color: var(--emerald-deep); border: 1px solid var(--line-gold); }
.btn-ligne:hover { background: rgba(217,190,124,.14); text-decoration: none; }
.possede { display: flex; gap: 10px; align-items: center; padding: 10px 12px; background: rgba(11,86,65,.08); border-radius: 8px; color: var(--emerald-deep); font-family: var(--font-caption); font-size: .88rem; font-weight: 600; }

.sommaire { list-style: none; padding: 0; margin: 0; counter-reset: s; }
.sommaire li { display: grid; grid-template-columns: 1fr auto; gap: 4px 16px; align-items: baseline; padding: 14px 0; border-bottom: 1px dotted rgba(184,146,63,.55); }
.sommaire .s-titre { font-family: var(--serif-titre); font-size: 1.3rem; font-weight: 600; color: var(--emerald-deep); line-height: 1.2; }
.sommaire .s-auteur { grid-column: 1; font-style: italic; color: rgba(19,36,30,.66); }
.sommaire .s-page { grid-row: 1 / span 2; grid-column: 2; font-family: var(--serif-titre); font-size: 1.2rem; color: var(--gold); }
.sommaire .s-rubrique { grid-column: 1 / -1; font-family: var(--font-caption); font-size: .72rem; letter-spacing: .16em; text-transform: uppercase; color: var(--gold); padding-top: 10px; border: 0; }
.bloc-texte { font-size: 1.16rem; line-height: 1.75; color: rgba(19,36,30,.86); }
.bloc-texte p { margin: 0 0 1em; }
.h-orne { font-size: 1.9rem; margin: 44px 0 16px; display: flex; align-items: center; gap: 14px; }
.h-orne::after { content: ""; flex: 1; height: 14px; background: var(--e-ornement) left center / auto 14px no-repeat; opacity: .8; }
@media (max-width: 900px) {
  .fiche-ed { grid-template-columns: 1fr; gap: 40px; }
  .fiche-ed .colonne-livre { position: static; }
  .fiche-ed .livre { --l: 230px; }
}

/* ---------- Choix du moyen de paiement ---------- */
.jn-modal { position: fixed; inset: 0; z-index: 1000; display: none; align-items: center; justify-content: center; padding: 16px; background: rgba(6,20,15,.7); backdrop-filter: blur(3px); }
.jn-modal.open { display: flex; }
.jn-modal .boite { width: 100%; max-width: 480px; max-height: 92vh; overflow-y: auto; background: var(--sand-light); border-radius: 14px; box-shadow: 0 30px 80px rgba(0,0,0,.45); position: relative; }
.jn-modal .boite-haut { padding: 22px 26px 18px; background: linear-gradient(120deg, var(--nuit), var(--emerald-deep)); color: var(--sand-light); position: relative; overflow: hidden; }
.jn-modal .boite-haut::before { content: ""; position: absolute; inset: 0; background: var(--e-girih) 0 0 / 48px 48px; opacity: .1; }
.jn-modal .boite-haut h3 { color: var(--sand-light); margin: 0; font-size: 1.6rem; position: relative; }
.jn-modal .boite-haut p { margin: 4px 0 0; color: var(--gold-soft); position: relative; font-size: 1.02rem; }
.jn-modal .fermer { position: absolute; top: 12px; right: 12px; z-index: 2; width: 34px; height: 34px; border-radius: 50%; border: 0; background: rgba(255,255,255,.12); color: #fff; cursor: pointer; font-size: 1.1rem; }
.jn-modal .corps { padding: 22px 26px 26px; }
.moyens-choix { display: grid; gap: 10px; margin: 0 0 16px; }
.moyen { display: flex; align-items: center; gap: 14px; padding: 14px 16px; border: 1.5px solid var(--line-gold); border-radius: 10px; background: #fff; cursor: pointer; text-align: left; font: inherit; transition: border-color .15s, box-shadow .15s; }
.moyen:hover { border-color: var(--gold); }
.moyen[aria-pressed="true"] { border-color: var(--emerald); box-shadow: 0 0 0 3px rgba(11,86,65,.14); }
.moyen .pastille { width: 44px; height: 44px; border-radius: 10px; flex-shrink: 0; display: flex; align-items: center; justify-content: center; font-family: var(--font-caption); font-weight: 800; font-size: .8rem; color: #fff; }
.moyen .pastille.wave { background: #1DC4FF; }
.moyen .pastille.orange { background: #FF7900; }
.moyen .pastille.free { background: #CD1E25; }
.moyen .pastille.carte { background: var(--emerald); font-size: 1.3rem; }
.moyen b { display: block; font-family: var(--font-caption); font-size: .95rem; color: var(--ink); }
.moyen span.d { font-size: .92rem; color: rgba(19,36,30,.6); }
.jn-msg { min-height: 1.2em; font-family: var(--font-caption); font-size: .88rem; margin: 10px 0 0; }
.jn-msg.err { color: #9C3B2E; }
.jn-msg.ok { color: var(--emerald); }
.bandeau-demo { display: flex; gap: 10px; align-items: center; padding: 10px 14px; margin: 0 0 16px; border-radius: 8px; background: rgba(184,146,63,.14); border: 1px dashed var(--gold); font-family: var(--font-caption); font-size: .84rem; color: #6E5424; }

/* ---------- Formulaires (compte lecteur) ---------- */
.jn-form { display: grid; gap: 14px; }
.jn-form label { display: block; font-family: var(--font-caption); font-size: .8rem; font-weight: 600; color: var(--emerald-deep); margin-bottom: 5px; }
.jn-form input, .jn-form select { width: 100%; padding: 12px 14px; border: 1px solid var(--line-gold); border-radius: 8px; background: #fff; font: 1.02rem var(--font-body); }
.jn-form .deux { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.onglets { display: flex; gap: 6px; padding: 4px; margin: 0 0 20px; border-radius: 999px; background: rgba(217,190,124,.18); }
.onglets button { flex: 1; padding: 10px; border: 0; border-radius: 999px; background: transparent; cursor: pointer; font-family: var(--font-caption); font-weight: 600; color: rgba(19,36,30,.65); }
.onglets button[aria-selected="true"] { background: var(--emerald); color: var(--sand-light); }
.compte-grille { display: grid; grid-template-columns: 420px 1fr; gap: 48px; align-items: start; }
.carte-papier { background: #FFFDF8; border: 1px solid var(--line-gold); border-radius: 14px; padding: 30px; box-shadow: 0 24px 50px -36px rgba(11,26,21,.5); }
.biblio-perso { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 40px 24px; }
.biblio-perso .rayon-item .livre { --l: 130px; }
@media (max-width: 900px) { .compte-grille { grid-template-columns: 1fr; } .jn-form .deux { grid-template-columns: 1fr; } }

.etat-page { max-width: 560px; margin: 0 auto; text-align: center; }
.etat-page .medaillon { width: 100px; height: 100px; margin: 0 auto 22px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 2.6rem; color: var(--gold-soft);
  background: radial-gradient(circle at 35% 30%, var(--emerald), var(--emerald-deep));
  box-shadow: 0 0 0 1px rgba(184,146,63,.55), 0 0 0 9px rgba(184,146,63,.12); }
.etat-page h1 { font-size: 2.4rem; margin: 0 0 10px; }
.etat-page p { font-size: 1.14rem; color: rgba(19,36,30,.72); }
.spinner { width: 34px; height: 34px; margin: 18px auto; border-radius: 50%; border: 3px solid rgba(184,146,63,.25); border-top-color: var(--gold); animation: tourne 1s linear infinite; }
@keyframes tourne { to { transform: rotate(360deg); } }
