/*
 * Les fiches produit de la boutique (grand-sapin-des-mots.html, enquete-de-noel.html, grimoire-de-noel.html).
 * Une fiche répond, dans l'ordre, à ce qu'un parent se demande : qu'est-ce que c'est, combien, ce
 * qu'il y a dedans (de vraies pages), pourquoi mon enfant va aimer, pourquoi ça marche, pour quelle
 * classe, comment ça se passe, et ses questions. L'achat revient en haut et en bas.
 * Couleurs : celles du site (site.css), plus une couleur de fête par fiche (--fete, --fete-pale).
 */
.fiche { --fete: #b8322a; --fete-fonce: #8a1f19; --fete-pale: #fbe3dc; --vert-noel: #1e6f4a; }
.fiche.fiche-enquete { --fete: #9c2a22; --fete-fonce: #5c1712; --fete-pale: #efe6d6; }
/* Les fiches des offres du jeu (histoires, pass) : le bleu nuit et l'or de l'application, pas le rouge de Noël. */
.fiche.fiche-jeu { --fete: #2d5b8c; --fete-fonce: #1d3d61; --fete-pale: #e3edf7; --vert-noel: #b8862b; }

.fiche-fil { max-width: var(--max-width); margin: calc(var(--nav-height) + 1.25rem) auto 0; padding: 0 1.25rem; font-size: 0.9rem; color: var(--ink-sepia); }
.fiche-fil a { color: var(--ink-sepia); }

/* En-tête : la couverture, le titre, le prix, l'achat */
.fiche-tete { max-width: var(--max-width); margin: 1rem auto 0; padding: 0 1.25rem; }
.fiche-tete-carte { display: grid; grid-template-columns: minmax(220px, 360px) 1fr; gap: 2.5rem; align-items: start;
  background: #fbf3e0; border: 2px solid var(--ink-brown); border-radius: 18px; padding: 2rem; box-shadow: 6px 6px 0 var(--ink-brown); }
.fiche-couv { margin: 0; position: relative; }
.fiche-couv img { display: block; width: 100%; height: auto; border-radius: 4px 12px 12px 4px; border: 2px solid var(--ink-brown); box-shadow: 6px 6px 0 var(--ink-brown); transform: rotate(-1.5deg); }
.fiche-couv .pastille { position: absolute; top: -12px; right: -10px; transform: rotate(6deg); background: var(--fete); color: #fff; font-weight: 700; font-size: 0.85rem; padding: 0.4rem 0.8rem; border-radius: 999px; border: 2px solid var(--ink-brown); }
.fiche-texte { display: grid; gap: 1rem; min-width: 0; }
.fiche-surtitre { font-size: 0.8rem; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase; color: var(--fete); }
.fiche-texte h1 { font-size: clamp(1.8rem, 4vw, 2.6rem); line-height: 1.15; margin: 0; text-wrap: balance; }
.fiche-accroche { font-size: 1.15rem; line-height: 1.6; color: var(--ink-brown); margin: 0; }
.fiche-badges { display: flex; flex-wrap: wrap; gap: 0.5rem; list-style: none; padding: 0; margin: 0; }
.fiche-badges li { font-size: 0.88rem; font-weight: 700; padding: 0.3rem 0.7rem; border-radius: 8px; background: var(--fete-pale); color: var(--fete-fonce); }
.fiche-prix { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 0.75rem; }
.fiche-prix > div { border: 2px solid var(--ink-brown); border-radius: 12px; padding: 0.8rem 1rem; background: var(--parchment-light); display: grid; gap: 0.1rem; }
.fiche-prix span { font-weight: 700; color: var(--ink-brown); }
.fiche-prix strong { font-size: 1.6rem; color: var(--ink-black); font-variant-numeric: tabular-nums; }
.fiche-prix small { color: var(--ink-sepia); font-size: 0.88rem; line-height: 1.4; }
.fiche-achat { display: flex; flex-wrap: wrap; align-items: center; gap: 0.75rem 1.25rem; }
.fiche-achat .btn { font-size: 0.95rem; padding: 0.9rem 2rem; }
.fiche-rassure { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 0.25rem 1.25rem; font-size: 0.9rem; color: var(--ink-sepia); }
.fiche-rassure li::before { content: "✓ "; color: var(--emerald); font-weight: 700; }
.fiche-ferme { font-weight: 700; color: var(--fete-fonce); }

/* Les blocs */
.fiche-corps { max-width: var(--max-width); margin: 0 auto; padding: 0 1.25rem 4rem; }
.fiche-bloc { margin-top: 3.5rem; }
.fiche-bloc > h2 { font-size: clamp(1.35rem, 2.8vw, 1.8rem); margin: 0 0 1rem; text-wrap: balance; }
.fiche-bloc > h2 small { font-family: 'Andika', sans-serif; font-size: 0.9rem; font-weight: 400; color: var(--ink-sepia); margin-left: 0.5rem; text-transform: none; letter-spacing: 0; }
.fiche-bloc > p { max-width: 70ch; line-height: 1.7; font-size: 1.05rem; }
.fiche-chiffres { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 1rem; list-style: none; padding: 0; margin: 0; }
.fiche-chiffres li { border-top: 4px solid var(--fete); padding-top: 0.6rem; display: grid; }
.fiche-chiffres strong { font-family: 'Cinzel', serif; font-size: 2rem; line-height: 1.1; color: var(--ink-black); }
.fiche-chiffres span { color: var(--ink-sepia); }
.fiche-recit { max-width: 70ch; display: grid; gap: 0.8rem; font-size: 1.08rem; line-height: 1.7; }
.fiche-recit p { margin: 0; }
.fiche-recit em { color: var(--ink-sepia); }

/* Feuilleter : de vraies pages, agrandies au clic */
.fiche-pages { display: flex; gap: 1.1rem; overflow-x: auto; padding: 0.4rem 0.3rem 1.2rem; scroll-snap-type: x mandatory; list-style: none; margin: 0; }
.fiche-pages li { flex: 0 0 200px; scroll-snap-align: start; }
.fiche-pages button { display: block; width: 100%; padding: 0; border: 0; background: none; cursor: zoom-in; text-align: left; font: inherit; color: inherit; }
.fiche-pages img { display: block; width: 100%; height: auto; border: 1.5px solid var(--ink-brown); border-radius: 3px; box-shadow: 4px 4px 0 var(--ink-brown); background: #fff; }
.fiche-pages button:hover img, .fiche-pages button:focus-visible img { transform: translate(-2px, -2px); box-shadow: 6px 6px 0 var(--ink-brown); }
.fiche-pages span { display: block; margin-top: 0.6rem; font-size: 0.88rem; line-height: 1.4; color: var(--ink-sepia); }
.fiche-pages-note { font-size: 0.88rem; color: var(--ink-sepia); margin-top: -0.4rem; }
.fiche-loupe { border: 0; padding: 0; background: transparent; max-width: min(92vw, 720px); max-height: 94vh; }
.fiche-loupe::backdrop { background: rgba(26, 18, 11, 0.8); }
.fiche-loupe img { display: block; max-width: 100%; max-height: 86vh; border-radius: 4px; }
.fiche-loupe p { color: #fff; text-align: center; margin: 0.6rem 0 0; }
.fiche-loupe button { position: absolute; top: 8px; right: 8px; width: 44px; height: 44px; border-radius: 50%; border: 2px solid var(--ink-brown); background: #fff; font-size: 1.4rem; cursor: pointer; }

.fiche-sommaire { list-style: none; padding: 0; margin: 0; border-top: 2px solid var(--ink-brown); }
.fiche-sommaire li { display: grid; grid-template-columns: 1fr auto; gap: 0.2rem 1.5rem; padding: 0.9rem 0; border-bottom: 1px solid var(--parchment-dark); }
.fiche-sommaire strong { font-family: 'Cinzel', serif; }
.fiche-sommaire .pp { grid-column: 2; grid-row: 1; white-space: nowrap; color: var(--ink-sepia); font-size: 0.9rem; }
.fiche-sommaire p { margin: 0; color: var(--ink-sepia); line-height: 1.55; }

.fiche-deux { display: grid; grid-template-columns: 1fr 1fr; gap: 1.25rem; }
.fiche-colonne { background: #fbf3e0; border: 2px solid var(--ink-brown); border-radius: 16px; padding: 1.25rem 1.5rem; }
.fiche-colonne h2 { font-size: 1.2rem; margin: 0 0 0.75rem; }
.fiche-colonne ul { margin: 0; padding-left: 1.2rem; display: grid; gap: 0.55rem; line-height: 1.55; }
.fiche-colonne.enfant { box-shadow: 5px 5px 0 var(--fete); }
.fiche-colonne.parent { box-shadow: 5px 5px 0 var(--vert-noel); }

.fiche-editions { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 1rem; list-style: none; padding: 0; margin: 0; }
.fiche-editions li { border: 2px solid var(--ink-brown); border-radius: 14px; overflow: hidden; background: #fbf3e0; display: flex; flex-direction: column; }
.fiche-editions .tete { padding: 0.7rem 1rem; color: #fff; display: grid; }
.fiche-editions .tete strong { font-family: 'Cinzel', serif; font-size: 1.05rem; }
.fiche-editions .tete span { font-size: 0.85rem; }
.fiche-editions .rouge { background: #b8322a; }
.fiche-editions .vert { background: #1e6f4a; }
.fiche-editions .nuit { background: #2a2a2a; }
.fiche-editions p { margin: 0; padding: 0.8rem 1rem 0.4rem; line-height: 1.55; color: var(--ink-sepia); flex: 1; }
.fiche-editions .notions { padding: 0 1rem 0.9rem; font-size: 0.85rem; color: var(--ink-brown); line-height: 1.5; }
.fiche-editions a { margin: 0 1rem 1rem; align-self: flex-start; }
.fiche-editions .ici { outline: 3px solid var(--gold-base); outline-offset: 2px; }

.fiche-etapes { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 1.25rem; list-style: none; padding: 0; margin: 0; counter-reset: etape; }
.fiche-etapes li { counter-increment: etape; display: grid; gap: 0.35rem; }
.fiche-etapes li::before { content: counter(etape); font-family: 'Cinzel', serif; font-weight: 700; font-size: 1.4rem; width: 48px; height: 48px; display: grid; place-items: center;
  border: 2px solid var(--ink-brown); border-radius: 50%; background: var(--fete); color: #fff; box-shadow: 3px 3px 0 var(--ink-brown); }
.fiche-etapes p { margin: 0; color: var(--ink-sepia); line-height: 1.55; }

.fiche-suspects { display: flex; flex-wrap: wrap; gap: 1rem; list-style: none; padding: 0; margin: 0; }
.fiche-suspects li { width: 120px; text-align: center; display: grid; gap: 0.2rem; font-size: 0.88rem; color: var(--ink-sepia); }
.fiche-suspects img { width: 120px; height: 120px; object-fit: cover; border: 2px solid var(--ink-brown); border-radius: 8px; filter: sepia(0.2); }
.fiche-suspects strong { color: var(--ink-black); }

.fiche-faq { display: grid; gap: 0.6rem; }
.fiche-faq details { background: #fbf3e0; border: 2px solid var(--ink-brown); border-radius: 12px; padding: 0 1.1rem; }
.fiche-faq summary { cursor: pointer; font-weight: 700; padding: 0.9rem 0; }
.fiche-faq details p { margin: 0 0 1rem; color: var(--ink-sepia); line-height: 1.6; }

.fiche-rappel { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 1rem 2rem; background: var(--ink-brown); color: var(--parchment-light); border-radius: 18px; padding: 1.5rem 2rem; }
.fiche-rappel h2 { color: var(--parchment-light); font-size: 1.4rem; margin: 0 0 0.25rem; }
.fiche-rappel p { margin: 0; opacity: 0.9; }

.fiche-avec { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 1.25rem; list-style: none; padding: 0; margin: 0; }
.fiche-avec a { display: grid; grid-template-columns: 90px 1fr; gap: 1rem; align-items: center; text-decoration: none; color: var(--ink-brown); background: #fbf3e0; border: 2px solid var(--ink-brown); border-radius: 14px; padding: 0.8rem; box-shadow: 4px 4px 0 var(--ink-brown); }
.fiche-avec a:hover, .fiche-avec a:focus-visible { transform: translate(-2px, -2px); box-shadow: 6px 6px 0 var(--ink-brown); }
.fiche-avec img { width: 90px; height: auto; border-radius: 4px; border: 1.5px solid var(--ink-brown); }
.fiche-avec strong { font-family: 'Cinzel', serif; display: block; color: var(--ink-black); }
.fiche-avec span { font-size: 0.9rem; color: var(--ink-sepia); }

/* Couverture en paysage (image du jeu plutôt qu'un livre). */
.fiche-couv-large img { border-radius: 12px; aspect-ratio: 4 / 3; object-fit: cover; }
.fiche-prix-trois { grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); }
.fiche-editions .bleu { background: #2d5b8c; }

/* La liste des histoires du jeu : une carte par histoire, l'image du décor en tête. */
.fiche-histoires { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 1.25rem; list-style: none; padding: 0; margin: 0 0 1rem; }
.fiche-histoires li { display: flex; flex-direction: column; background: #fbf3e0; border: 2px solid var(--ink-brown); border-radius: 14px; overflow: hidden; box-shadow: 4px 4px 0 var(--ink-brown); }
.fiche-histoires img { display: block; width: 100%; height: auto; aspect-ratio: 16 / 9; object-fit: cover; border-bottom: 2px solid var(--ink-brown); }
.fiche-histoires li > div { padding: 0.8rem 1rem 1rem; display: grid; gap: 0.45rem; }
.fiche-histoires h3 { margin: 0; font-size: 1.05rem; line-height: 1.3; }
.fiche-histoires p { margin: 0; line-height: 1.5; color: var(--ink-brown); font-size: 0.95rem; }
.fiche-histoires .h-tags { display: flex; justify-content: space-between; gap: 0.5rem; font-size: 0.8rem; font-weight: 700; letter-spacing: 0.04em; }
.fiche-histoires .h-tags span:first-child { color: var(--fete-fonce); text-transform: uppercase; }
.fiche-histoires .h-prix { padding: 0.1rem 0.55rem; border-radius: 999px; background: var(--fete-pale); color: var(--fete-fonce); white-space: nowrap; }
.fiche-histoires .offerte .h-prix { background: #dff0e3; color: #1e6f4a; }
.fiche-histoires .h-info { font-size: 0.85rem; color: var(--ink-sepia); }

/* Sous 900 px, le menu du site n'est plus fixe : il occupe déjà sa place, la marge ne le compte pas deux fois. */
@media (max-width: 900px) { .fiche-fil { margin-top: 1rem; } }
@media (max-width: 760px) {
  .fiche-tete-carte { grid-template-columns: 1fr; padding: 1.25rem; gap: 1.5rem; box-shadow: 4px 4px 0 var(--ink-brown); }
  .fiche-couv { max-width: 260px; margin: 0 auto; }
  .fiche-deux { grid-template-columns: 1fr; }
  .fiche-pages li { flex-basis: 160px; }
}
@media (prefers-reduced-motion: reduce) { .fiche-pages img, .fiche-avec a { transition: none; transform: none !important; } }
