/* Les Ombres savantes : « L'écran de papier » (choisi le 14 nov. 2026), réorganisé le 16 nov. pour celui qui arrive
   d'un réel : l'accueil (le petit théâtre, le nom), les réseaux, « son livre est dans la collection », la collection en
   carrousel, l'actualité en carrousel. Un castelet noir, un écran de papier éclairé par-derrière, la troupe en ombres
   noires ; l'encre des marionnettes pour le texte, un seul rouge : s'abonner. */
:root {
  --papier: #f4e4c4;        /* l'écran de papier */
  --papier-clair: #fbf1dc;  /* les cartes posées dessus */
  --bord: #d7b582;          /* le papier loin de la lampe */
  --encre: #17110c;         /* l'encre et le bois noir du castelet */
  --encre-douce: #4a3b2c;
  --rouge: #b8322a;         /* le seul rouge : s'abonner */
  --serif: Fraunces, Georgia, "Times New Roman", serif;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  /* un grain de papier très léger (pas de texture peinte) */
  --grain: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='220' height='220'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .35 0 0 0 0 .25 0 0 0 0 .12 0 0 0 .09 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; background: var(--encre); }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0;
  color: var(--encre);
  font-family: var(--serif);
  -webkit-font-smoothing: antialiased;
  background: var(--grain), radial-gradient(120% 60% at 50% 0%, var(--papier-clair) 0%, var(--papier) 55%, var(--bord) 130%);
  background-attachment: fixed;
  min-height: 100vh;
}
a { color: inherit; }
button, input { font: inherit; color: inherit; }
img, video { max-width: 100%; }
:focus-visible { outline: 3px solid var(--encre); outline-offset: 3px; }
.cache { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.evitement { position: absolute; left: -999px; top: 8px; z-index: 200; background: var(--papier-clair); padding: 8px 14px;
  border-radius: 6px; }
.evitement:focus { left: 8px; }
.colonne { max-width: 760px; margin: 0 auto; padding: 0 16px; }

/* ---------------------------------------------------------------- l'accueil : le castelet et son écran de papier */
.castelet {
  position: relative; margin: 0 auto; max-width: 760px; height: min(50svh, 520px); min-height: 340px;
  border: 14px solid var(--encre); border-top-width: 0; border-radius: 0 0 6px 6px; overflow: hidden;
  background: var(--grain), radial-gradient(70% 62% at 50% 58%, #fffaf0 0%, #f9e6c2 38%, #e7c38e 72%, #c9965b 100%);
}
.castelet::before {           /* le lambrequin des films, passé au noir */
  content: ""; position: absolute; z-index: 5; left: 0; right: 0; top: 0; height: 64px;
  background: url("images/lambrequin.svg?v=f0b001b492") repeat-x top / auto 64px; filter: brightness(.35);
}
.castelet::after {            /* la lampe ne va pas jusqu'aux bords */
  content: ""; position: absolute; inset: 0; z-index: 4; pointer-events: none;
  box-shadow: inset 0 0 80px rgba(80, 40, 10, .45);
}
.nom { position: absolute; z-index: 6; top: 70px; left: 0; right: 0; text-align: center; padding: 0 22px; }
.nom a { text-decoration: none; }
.nom .les { display: block; font: 700 .72rem/1.6 var(--sans); letter-spacing: .55em; padding-left: .55em; }
.nom h1, .nom .h1 {
  display: block; margin: 2px 0 0; font-size: clamp(2.5rem, 12vw, 4.2rem); line-height: .9; font-weight: 800;
  font-variation-settings: "SOFT" 100, "WONK" 1, "opsz" 144; letter-spacing: -.01em;
  text-shadow: 6px 10px 12px rgba(23, 17, 12, .22);
}
.nom em { font-style: italic; font-weight: 380; }
.nom .devise { margin: 14px auto 0; max-width: 17em; font: italic 450 1.05rem/1.4 var(--serif); color: var(--encre-douce); }

/* la pancarte suspendue entre les marionnettes : « Quel réel as-tu vu ? » mène à la collection filtrée */
.pancarte { position: relative; width: min(290px, 100%); margin: 30px auto 0; padding: 10px 12px 12px;
  border: 2px solid var(--encre); border-radius: 10px; background: var(--papier-clair);
  box-shadow: 0 10px 22px rgba(80, 40, 10, .28); transform-origin: 50% -30px;
  animation: pancarte 6s ease-in-out infinite alternate; }
.pancarte::before, .pancarte::after {  /* ses deux fils */
  content: ""; position: absolute; bottom: 100%; width: 1.5px; height: 30px; background: var(--encre);
  -webkit-mask: linear-gradient(transparent, #000 70%); mask: linear-gradient(transparent, #000 70%); }
.pancarte::before { left: 22%; }
.pancarte::after { right: 22%; }
.pancarte label { display: block; margin-bottom: 7px; font: 700 .78rem var(--sans); letter-spacing: .04em; }
.champ-pancarte { display: flex; align-items: center; border: 1.5px solid var(--encre); border-radius: 999px;
  background: #fff; overflow: hidden; }
.champ-pancarte input { flex: 1; min-width: 0; min-height: 40px; padding: 0 4px 0 14px; border: 0; background: none;
  font: 500 .95rem var(--sans); color: var(--encre); outline: none; }
.champ-pancarte input::-webkit-search-cancel-button { display: none; }
.champ-pancarte button { flex: none; width: 40px; height: 40px; display: grid; place-items: center; border: 0;
  border-radius: 50%; margin: 0 1px 0 0; background: var(--encre); color: var(--papier-clair); cursor: pointer; }
.champ-pancarte button svg { width: 18px; height: 18px; }
.champ-pancarte:focus-within { box-shadow: 0 0 0 3px rgba(23, 17, 12, .25); }
@keyframes pancarte { from { transform: rotate(-.8deg); } to { transform: rotate(.8deg); } }
@media (prefers-reduced-motion: reduce) { .pancarte { animation: none; } }
@media (max-width: 560px) {  /* au téléphone : un écran un peu plus haut, la troupe plus petite, sous la pancarte */
  .js .castelet { height: 450px; }
  .pancarte { width: 236px; margin-top: 24px; padding: 8px 10px 10px; }
  .js .ombre { height: 64%; }
  .js .ombre.loin { height: 78%; }
  .js .ombre.petit { height: 12%; }
  .js .ombre.chat { height: 32%; }
}

/* la troupe des films, en ombres noires devant l'écran ; les fils s'effacent vers le haut */
.ombres { position: absolute; inset: 0; z-index: 3; pointer-events: none; }
.ombre {
  position: absolute; bottom: 3%; left: var(--x); height: 84%; width: auto; transform: translateX(-50%);
  transform-origin: 50% 0; filter: brightness(0) blur(.5px); opacity: .92;
  -webkit-mask: linear-gradient(transparent 30%, #000 62%); mask: linear-gradient(transparent 30%, #000 62%);
  animation: balance 6s ease-in-out infinite alternate; animation-delay: calc(var(--k) * -1.7s);
}
.ombre.loin { height: 100%; bottom: 0; filter: brightness(0) blur(2.2px); opacity: .4; }
.ombre.petit { height: 15%; animation: none; }
.ombre.chat { height: 42%; }
@keyframes balance {
  from { transform: translateX(-50%) rotate(-1.4deg); }
  to { transform: translateX(-50%) rotate(1.4deg); }
}

/* juste sous le théâtre : les réseaux, et où trouver les livres */
.accueil { margin-top: 18px; }
.reseaux { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; }
@media (min-width: 560px) { .reseaux { grid-template-columns: repeat(4, 1fr); } }
.reseau { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 46px; padding: 8px 12px;
  border: 2px solid var(--encre); border-radius: 999px; text-decoration: none; font: 700 .9rem var(--sans);
  background: var(--papier-clair); }
.reseau.fort { background: var(--encre); color: var(--papier-clair); }
.reseau svg { width: 22px; height: 22px; flex: none; }
.panneau { display: grid; grid-template-columns: 28px 1fr auto; gap: 12px; align-items: center; margin-top: 14px;
  padding: 14px 16px; border-radius: 14px; border: 2px dashed var(--encre); text-decoration: none;
  font: 500 .98rem/1.35 var(--sans); }
.panneau > svg { width: 28px; height: 28px; }
.panneau b { display: block; font: 750 1.08rem/1.25 var(--serif); }
.panneau .fleche { width: 34px; height: 34px; border-radius: 50%; background: var(--encre); color: var(--papier-clair);
  display: grid; place-items: center; font-size: 1.05rem; }

/* ---------------------------------------------------------------- les blocs */
.bloc { margin-top: 40px; }
h2 { font-size: 1.85rem; line-height: 1.05; margin: 0 0 4px; font-weight: 750;
  font-variation-settings: "SOFT" 80, "WONK" 1, "opsz" 96; scroll-margin-top: 12px; }
.sur-titre { margin: 0; font: 700 .68rem/1.6 var(--sans); letter-spacing: .16em; text-transform: uppercase;
  color: var(--encre-douce); }
.mention { font: 500 .72rem/1.45 var(--sans); color: var(--encre-douce); margin: 8px 0 0; }
.boutons { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 4px; }
.trait {
  display: inline-flex; align-items: center; gap: 7px; min-height: 44px; padding: 10px 15px;
  border: 2px solid var(--encre); border-radius: 999px; background: transparent;
  font: 700 .84rem/1.2 var(--sans); text-decoration: none; cursor: pointer;
}
.trait.plein { background: var(--encre); color: var(--papier-clair); }
.trait svg { width: 16px; height: 16px; flex: none; }
.trait:hover { background: rgba(23, 17, 12, .08); }
.trait.plein:hover { background: #000; }
.rouge { display: inline-flex; align-items: center; min-height: 46px; border: 0; border-radius: 999px;
  background: var(--rouge); color: #fff; padding: 12px 20px; font: 750 .92rem var(--sans); cursor: pointer;
  text-decoration: none; }
.accroche p { margin: 0 0 12px; font-size: 1.04rem; line-height: 1.5; }

/* ---------------------------------------------------------------- les carrousels */
.carrousel { list-style: none; display: flex; gap: 14px; margin: 14px -16px 0; padding: 4px 16px 18px; overflow-x: auto;
  scroll-snap-type: x mandatory; scroll-padding: 0 16px; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
.carrousel::-webkit-scrollbar { display: none; }
.carrousel > li { flex: none; scroll-snap-align: start; }
@media (hover: hover) {  /* à la souris : une barre fine pour faire défiler */
  .carrousel { scrollbar-width: thin; scrollbar-color: var(--encre-douce) transparent; }
  .carrousel::-webkit-scrollbar { display: block; height: 8px; }
  .carrousel::-webkit-scrollbar-thumb { background: var(--encre-douce); border-radius: 8px; }
}
html:not(.js) .outils { display: none; }  /* sans JavaScript, la recherche ne filtrerait rien */

/* la collection : une carte par réel */
.outils { display: flex; flex-direction: column; gap: 10px; margin: 14px 0 0; }
.recherche { width: 100%; min-height: 48px; padding: 12px 15px; border-radius: 12px; border: 2px solid var(--encre);
  background: var(--papier-clair); font: 500 1rem var(--sans); }
.themes { display: flex; gap: 6px; flex-wrap: wrap; }
.themes button { min-height: 36px; border: 1.5px solid var(--encre); border-radius: 999px; background: none;
  padding: 6px 13px; font: 650 .8rem var(--sans); cursor: pointer; }
.themes button.on { background: var(--encre); color: var(--papier-clair); }
.carte { width: 156px; }
.carte a { display: block; text-decoration: none; }
.carte img { display: block; width: 156px; height: 277px; object-fit: cover; border: 3px solid var(--encre);
  border-radius: 40% 40% 6px 6px / 14% 14% 6px 6px; background: var(--encre); box-shadow: 6px 8px 0 rgba(23, 17, 12, .15); }
.carte-date { display: block; margin-top: 10px; font: 700 .64rem/1.4 var(--sans); letter-spacing: .14em;
  text-transform: uppercase; color: var(--encre-douce); }
.carte b { display: block; margin: 2px 0 4px; font-size: 1.02rem; line-height: 1.18; font-weight: 700; }
.carte-livre { display: block; font: 600 .76rem/1.3 var(--sans); }
.carte-livre svg { width: 14px; height: 14px; vertical-align: -2px; margin-right: 4px; }
.carte-livre i { font-family: var(--serif); }
.carte-livre.sans { color: var(--encre-douce); font-weight: 500; }
.rien { padding: 6px 0 0; }
.indice { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin: 14px 0 0;
  font: 650 .86rem var(--sans); color: var(--encre-douce); }
.tout-voir { flex: none; min-height: 40px; padding: 8px 16px; border: 2px solid var(--encre); border-radius: 999px;
  background: var(--papier-clair); color: var(--encre); font: 700 .86rem var(--sans); cursor: pointer; }
.note-audible { margin: 12px 0 0; padding: 12px 14px; border-radius: 12px; background: var(--papier-clair);
  border: 1.5px dashed var(--encre); font: 500 .92rem/1.45 var(--sans); }
.note-audible a { font-weight: 700; color: var(--encre); }
.note-audible span { color: var(--encre-douce); font-size: .8rem; }
.collection.grille { flex-wrap: wrap; overflow: visible; scroll-snap-type: none; margin: 14px 0 0; padding: 4px 0 18px;
  row-gap: 22px; }

/* les flèches des carrousels : grandes, sur le bord, pour qui ne devine pas que ça défile */
.defile { position: relative; }
.fleche-defile { position: absolute; top: 110px; z-index: 2; width: 52px; height: 52px; display: grid;
  place-items: center; padding: 0 0 4px; border: 2px solid var(--papier-clair); border-radius: 50%;
  background: var(--encre); color: var(--papier-clair); font: 400 2.1rem/1 var(--sans); cursor: pointer;
  box-shadow: 0 4px 14px rgba(23, 17, 12, .35); }
.fleche-defile.gauche { left: -6px; }
.fleche-defile.droite { right: -6px; }
.fleche-defile:hover { background: var(--encre-douce); }
.defile:has(.actualites) .fleche-defile { top: 130px; }

/* l'actualité */
.actu { width: min(78vw, 300px); }
.actu > a, .actu > div { display: flex; flex-direction: column; gap: 10px; height: 100%;
  padding: 14px; border-radius: 16px; border: 2px solid var(--encre); background: var(--papier-clair); text-decoration: none;
  box-shadow: 6px 8px 0 rgba(23, 17, 12, .14); }
.actu > a > span, .actu > div > span:last-child { display: flex; flex-direction: column; flex: 1; }
.actu img { width: 100%; height: 170px; object-fit: cover; border-radius: 10px; }
.actu-prochain img { filter: blur(6px) sepia(.4) brightness(.8); }
.actu b { display: block; margin: 2px 0 4px; font-size: 1.12rem; line-height: 1.2; }
.actu .lien { font: 700 .82rem var(--sans); margin-top: auto; }
.actu .texte { display: block; margin-bottom: 10px; font: 400 .95rem/1.45 var(--serif); color: var(--encre-douce); }
.ecran-youtube { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; height: 170px;
  border-radius: 10px; background: var(--encre); color: var(--papier-clair); font: 650 .9rem var(--sans); }
.ecran-youtube svg { width: 64px; height: 64px; }
.actu-youtube .rouge { margin-top: auto; align-self: flex-start; }

/* ---------------------------------------------------------------- la fiche d'un réel, par-dessus la page */
.fiche { display: none; position: fixed; inset: 0; z-index: 100; }
html:not(.js) .fiche:target, .js .fiche.ouverte { display: block; }
.js.fiche-ouverte body { overflow: hidden; }
.fiche .fond { position: absolute; inset: 0; background: rgba(23, 17, 12, .6); }
.feuille { position: absolute; left: 50%; bottom: 0; transform: translateX(-50%); width: min(100%, 680px);
  max-height: 92svh; overflow-y: auto; overscroll-behavior: contain; padding: 22px 18px 34px; border-radius: 20px 20px 0 0;
  background: var(--grain), var(--papier-clair); box-shadow: 0 -10px 40px rgba(0, 0, 0, .35); }
.feuille h3 { margin: 4px 0 10px 0; font-size: 1.6rem; line-height: 1.1; }
.feuille h4 { margin: 20px 0 6px; font: 700 .66rem var(--sans); letter-spacing: .18em; text-transform: uppercase; }
.feuille p { line-height: 1.55; }
.feuille > .boutons { margin-top: 16px; }
.fermer { position: sticky; top: 0; float: right; margin: -6px -4px 0 8px; z-index: 2; width: 40px; height: 40px; border-radius: 50%; border: 2px solid var(--encre);
  display: grid; place-items: center; text-decoration: none; font: 600 1.4rem/1 var(--sans); background: var(--papier-clair); }
.sources { margin: 0; padding-left: 1.2em; line-height: 1.5; font-size: .94rem; color: var(--encre-douce); }

/* les livres (liens affiliés Amazon) : une couverture dessinée par le site, à la couleur du thème */
.couv {
  --couv: #4a2e1c; position: relative; display: block; width: 96px; aspect-ratio: 2 / 3; flex: none;
  padding: 7px 7px 7px 11px; border-radius: 3px 7px 7px 3px; background: var(--couv); color: var(--papier-clair);
  text-decoration: none; box-shadow: inset 5px 0 0 rgba(0, 0, 0, .28), 6px 8px 0 rgba(23, 17, 12, .18);
}
.couv[data-couv="psychologie"] { --couv: #26364d; }
.couv[data-couv="histoire"] { --couv: #33452b; }
.couv[data-couv="sciences"] { --couv: #2b2b52; }
.couv-filet { height: 100%; display: flex; flex-direction: column; justify-content: space-between; align-items: center;
  gap: 4px; padding: 7px 4px; border: 1px solid rgba(251, 241, 220, .45); text-align: center; overflow: hidden; }
.couv-auteur { font: 650 .48rem/1.25 var(--sans); letter-spacing: .08em; text-transform: uppercase; opacity: .85;
  max-width: 100%; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.couv-titre { max-width: 100%; font: italic 700 .74rem/1.12 var(--serif); hyphens: auto; -webkit-hyphens: auto;
  overflow-wrap: anywhere; display: -webkit-box; -webkit-line-clamp: 6; -webkit-box-orient: vertical; overflow: hidden; }
.couv-orne { font-size: .7rem; opacity: .7; }
.livre-du-film { display: grid; grid-template-columns: 96px 1fr; gap: 14px 16px; align-items: center; margin-top: 18px;
  padding: 16px; border: 2px solid var(--encre); border-radius: 14px; background: #fffaf0;
  box-shadow: 8px 10px 0 rgba(23, 17, 12, .14); }
.livre-du-film .sur-titre { margin-bottom: 2px; letter-spacing: .12em; }
.titre-livre { display: block; font-size: 1.2rem; line-height: 1.15; font-style: italic; font-weight: 700; }
.livre-du-film .auteur { display: block; margin: 3px 0 0; font: 500 .84rem var(--sans); color: var(--encre-douce); }
.livre-du-film .mention, .livre-du-film .boutons, .pourquoi { grid-column: 1 / -1; margin: 0; }
.pourquoi { font: italic 400 1.02rem/1.5 var(--serif); color: var(--encre); }

/* ---------------------------------------------------------------- la lettre, les coulisses, le pied */
.lettre { padding: 22px 18px; border: 2.5px solid var(--encre); border-radius: 16px; background: var(--papier-clair);
  box-shadow: 10px 12px 0 rgba(23, 17, 12, .16); }
.lettre p { margin: 6px 0 14px; line-height: 1.5; }
.champ { display: flex; gap: 8px; flex-wrap: wrap; }
.champ input { flex: 1 1 200px; min-height: 46px; padding: 12px 15px; border-radius: 999px; border: 2px solid var(--encre);
  background: #fff; font: 500 1rem var(--sans); }
.lettre .petit-texte { margin: 10px 0 0; font: 500 .76rem var(--sans); color: var(--encre-douce); }
.lettre .message { margin: 8px 0 0; font-weight: 600; }
.lettre .message:empty { display: none; }
.coulisses { display: grid; grid-template-columns: 90px 1fr; gap: 16px; align-items: center; }
.coulisses img { width: 90px; height: 90px; border-radius: 50%; border: 3px solid var(--encre);
  box-shadow: 5px 6px 0 rgba(23, 17, 12, .15); }
.coulisses p { margin: 6px 0 0; line-height: 1.5; color: var(--encre-douce); }
.pied { margin: 56px auto 0; padding: 22px 16px 34px; background: var(--encre); color: var(--papier);
  text-align: center; font: 500 .76rem/1.6 var(--sans); }
.pied p { margin: 0; }
.pied a { opacity: .85; }

/* ---------------------------------------------------------------- les mentions légales */
.castelet-bas { height: 190px; min-height: 0; }
.castelet-bas .nom { top: 82px; }
.texte { padding-top: 26px; }
.texte h1 { margin: 0 0 .4em; font-size: 2.1rem; font-weight: 800; font-variation-settings: "SOFT" 100, "opsz" 72; }
.texte h2 { margin: 1.4em 0 .3em; font-size: 1.3rem; font-style: italic; }
.texte p { line-height: 1.55; color: var(--encre-douce); }

@media (prefers-reduced-motion: reduce) {
  .ombre { animation: none; }
}
