/* Livre de naissance de Manon — site familial
   Palette reprise des albums imprimés : papier, encre, et une couleur par année. */
@font-face { font-family: Alegreya; src: url(fonts/alegreya-latin-400-normal.woff2) format('woff2'); font-weight: 400; font-display: swap; }
@font-face { font-family: Alegreya; src: url(fonts/alegreya-latin-400-italic.woff2) format('woff2'); font-weight: 400; font-style: italic; font-display: swap; }
@font-face { font-family: Alegreya; src: url(fonts/alegreya-latin-700-normal.woff2) format('woff2'); font-weight: 700; font-display: swap; }
@font-face { font-family: Playfair; src: url(fonts/playfair-display-latin-600-normal.woff2) format('woff2'); font-weight: 600; font-display: swap; }
@font-face { font-family: Playfair; src: url(fonts/playfair-display-latin-400-italic.woff2) format('woff2'); font-weight: 400; font-style: italic; font-display: swap; }
@font-face { font-family: Marck; src: url(fonts/marck-script-latin-400-normal.woff2) format('woff2'); font-display: swap; }

:root {
  --papier: #FBF8F2; --papier2: #F3ECE4; --table: #E9E1D6; --encre: #2E2A27; --gris: #7A726A;
  --rose: #D39A8F; --sauge: #86A37E; --or: #C59E66; --bleu: #8BA6C1; --lavande: #A897C3;
  --y2011: var(--rose); --y2012: var(--sauge); --y2013: var(--or); --y2014: var(--bleu); --y2015: var(--lavande); --y2016: var(--lavande);
  --ombre: 0 1px 2px rgba(60,40,30,.12), 0 8px 24px rgba(60,40,30,.14);
}
* { box-sizing: border-box; font-variant-numeric: lining-nums; }
html { -webkit-text-size-adjust: 100%; font-variant-numeric: lining-nums; }
body { margin: 0; background: var(--papier); color: var(--encre); font: 18px/1.6 Alegreya, Georgia, serif; }
a { color: inherit; }
:focus-visible { outline: 2px solid var(--or); outline-offset: 3px; border-radius: 2px; }
img { max-width: 100%; display: block; }
.script { font-family: Marck, cursive; font-weight: 400; }
.wrap { max-width: 1120px; margin: 0 auto; padding: 0 24px; }

/* barre de navigation commune */
.nav { position: sticky; top: 0; z-index: 30; background: rgba(251,248,242,.94); backdrop-filter: blur(6px);
       border-bottom: 1px solid #E6DED3; }
.nav .wrap { display: flex; align-items: center; gap: 22px; height: 56px; }
.nav .home { font: 26px/1 Marck, cursive; text-decoration: none; margin-right: auto; }
.nav a.lien { text-decoration: none; color: var(--gris); font-size: 17px; padding: 6px 0; border-bottom: 2px solid transparent; }
.nav a.lien:hover, .nav a.lien[aria-current] { color: var(--encre); border-bottom-color: var(--or); }
@media (max-width: 560px) { .nav .wrap { gap: 14px; } .nav a.lien { font-size: 15px; } .nav .home { font-size: 22px; } }

/* ------------------------------------------------ accueil */
.hero { text-align: center; padding: 64px 0 24px; }
.hero h1 { font: 400 clamp(56px, 11vw, 112px)/1 Marck, cursive; margin: 0; }
.hero p.sous { font: italic 400 clamp(17px, 2.2vw, 21px)/1.5 Playfair, Georgia, serif; color: var(--gris); margin: 14px auto 0; max-width: 34em; }
.etagere { display: flex; justify-content: center; align-items: flex-end; gap: clamp(14px, 3vw, 40px); flex-wrap: wrap;
           padding: 48px 12px 0; perspective: 1400px; }
.livre { position: relative; width: clamp(140px, 19vw, 210px); aspect-ratio: 216/303; text-decoration: none;
         transform-style: preserve-3d; transform: rotateY(-18deg); transition: transform .5s cubic-bezier(.2,.7,.2,1); }
.livre:hover, .livre:focus-visible { transform: rotateY(-4deg) translateY(-10px); }
.livre .face { position: absolute; inset: 0; border-radius: 2px 6px 6px 2px; overflow: hidden; box-shadow: var(--ombre);
               background: var(--papier) center/cover no-repeat; }
.livre .dos { position: absolute; top: 0; bottom: 0; left: 0; width: 22px; transform: rotateY(90deg) translateZ(11px) translateX(-11px);
              transform-origin: left; border-radius: 3px 0 0 3px; }
.livre .face::after { content: ""; position: absolute; inset: 0 auto 0 0; width: 9px;
                      background: linear-gradient(90deg, rgba(0,0,0,.18), rgba(0,0,0,0)); }
.livre .bande { position: absolute; left: 0; right: 0; bottom: 0; height: 6px; }
.livre-legende { text-align: center; margin-top: 16px; }
.livre-legende b { display: block; font: 600 19px/1.2 Playfair, Georgia, serif; }
.livre-legende span { font-size: 15px; color: var(--gris); }
.colonne-livre { display: flex; flex-direction: column; align-items: center; }
.sol { height: 18px; margin: 0 auto; max-width: 980px; border-radius: 50%;
       background: radial-gradient(ellipse at center, rgba(60,40,30,.16), rgba(60,40,30,0) 70%); }
.entrees { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 28px; margin: 72px auto 40px; }
.entree { display: grid; grid-template-columns: 112px 1fr; gap: 20px; align-items: center; text-decoration: none;
          padding: 18px; border-radius: 10px; transition: background .2s; }
.entree:hover { background: var(--papier2); }
.entree .vignettes { position: relative; height: 104px; }
.entree .vignettes img { position: absolute; width: 74px; height: 92px; object-fit: cover; border: 4px solid #fff; box-shadow: var(--ombre); }
.entree .vignettes img:nth-child(1) { left: 0; top: 6px; transform: rotate(-7deg); }
.entree .vignettes img:nth-child(2) { left: 34px; top: 0; transform: rotate(5deg); }
.entree h2 { font: 600 24px/1.2 Playfair, Georgia, serif; margin: 0 0 4px; }
.entree p { margin: 0; color: var(--gris); font-size: 17px; }
.mot { max-width: 38em; margin: 24px auto 72px; text-align: center; color: var(--gris); font-style: italic; }
.pied { text-align: center; color: #A59E95; font-size: 14px; padding: 24px 0 40px; }

/* ------------------------------------------------ livre feuilletable */
body.lecture { background: var(--table); overflow-x: hidden; }
.lecteur { display: flex; flex-direction: column; align-items: center; padding: 18px 10px 12px; min-height: calc(100vh - 56px); }
.lecteur h1 { font: 600 clamp(20px, 2.6vw, 26px)/1.2 Playfair, Georgia, serif; margin: 0 0 4px; text-align: center; }
.lecteur .periode { color: var(--gris); font-size: 16px; margin-bottom: 14px; text-align: center; }
.scene { width: min(96vw, calc((100vh - 210px) * 1.426)); max-width: 1500px; }
.flip-book { box-shadow: 0 18px 50px rgba(60,40,30,.25); }
.page { background: var(--papier); }
.page img { width: 100%; height: 100%; object-fit: cover; }
.commandes { display: flex; align-items: center; justify-content: center; gap: 10px; flex-wrap: wrap; margin-top: 16px; }
.bouton { font: 17px Alegreya, Georgia, serif; color: var(--encre); background: var(--papier); border: 1px solid #D7CDBF;
          border-radius: 999px; padding: 8px 18px; cursor: pointer; text-decoration: none; display: inline-flex; gap: 8px; align-items: center; }
.bouton:hover { background: #fff; }
.bouton[disabled] { opacity: .4; cursor: default; }
.numero { min-width: 120px; text-align: center; color: var(--gris); font-size: 16px; }
select.bouton { appearance: none; padding-right: 32px; background-image: linear-gradient(45deg, transparent 50%, var(--gris) 50%), linear-gradient(135deg, var(--gris) 50%, transparent 50%);
                background-position: calc(100% - 18px) 55%, calc(100% - 13px) 55%; background-size: 5px 5px; background-repeat: no-repeat; max-width: 64vw; }
.astuce { font-size: 14px; color: var(--gris); margin-top: 10px; text-align: center; }

/* ------------------------------------------------ fil des jours */
.fil-tete { padding: 48px 0 8px; text-align: center; }
.fil-tete h1 { font: 400 clamp(48px, 9vw, 84px)/1 Marck, cursive; margin: 0; }
.fil-tete p { color: var(--gris); max-width: 32em; margin: 10px auto 0; }
.annees { position: sticky; top: 56px; z-index: 20; background: rgba(251,248,242,.94); backdrop-filter: blur(6px);
          display: flex; gap: 6px; justify-content: center; flex-wrap: wrap; padding: 10px 8px; border-bottom: 1px solid #ECE4D9; }
.annees a { text-decoration: none; font: 600 16px Playfair, Georgia, serif; padding: 4px 14px; border-radius: 999px; color: var(--gris); }
.annees a[aria-current] { color: #fff; background: var(--c, var(--or)); }
.fil { position: relative; max-width: 980px; margin: 0 auto; padding: 24px 20px 80px; }
.fil::before { content: ""; position: absolute; top: 0; bottom: 0; left: 50%; width: 1px; background: repeating-linear-gradient(to bottom, #CFC4B6 0 6px, transparent 6px 12px); }
.an-titre { position: relative; text-align: center; margin: 56px 0 18px; }
.an-titre h2 { display: inline-block; font: 600 clamp(54px, 9vw, 88px)/1 Playfair, Georgia, serif; color: var(--c); background: var(--papier); padding: 0 18px; margin: 0; }
.an-titre p { font-style: italic; color: var(--gris); margin: 6px 0 0; background: var(--papier); display: inline-block; padding: 0 12px; }
.mois-titre { position: relative; text-align: center; margin: 44px 0 20px; }
.mois-titre span { display: inline-block; font: 26px/1.2 Marck, cursive; background: var(--papier); padding: 2px 16px; color: var(--c); }
.mois-titre small { display: block; font: italic 15px Alegreya, serif; color: var(--gris); }
.billet { position: relative; display: grid; grid-template-columns: 1fr 1fr; gap: 0 56px; margin: 34px 0; }
.billet::before { content: ""; position: absolute; left: 50%; top: 18px; width: 11px; height: 11px; margin-left: -5px; border-radius: 50%;
                  background: var(--papier); border: 2px solid var(--c); }
.billet .lettre { grid-column: 1; text-align: left; }
.billet .photos { grid-column: 2; }
.billet:nth-of-type(even) .lettre { grid-column: 2; grid-row: 1; }
.billet:nth-of-type(even) .photos { grid-column: 1; grid-row: 1; }
.lettre .date { font: 23px/1.1 Marck, cursive; color: var(--c); }
.lettre .age { font-size: 15px; color: var(--gris); font-style: italic; margin-left: 8px; }
.lettre h3 { font: 600 22px/1.25 Playfair, Georgia, serif; margin: 4px 0 8px; }
.lettre .texte { font-size: 17.5px; line-height: 1.62; }
.lettre .texte p { margin: 0 0 .6em; }
.lettre .texte.replie { max-height: 11.5em; overflow: hidden; -webkit-mask-image: linear-gradient(#000 70%, transparent); mask-image: linear-gradient(#000 70%, transparent); }
.lettre .lire { background: none; border: 0; padding: 0; font: italic 16px Alegreya, serif; color: var(--encre); text-decoration: underline; text-decoration-color: var(--c); cursor: pointer; }
.lettre .album { display: inline-block; margin-top: 6px; font-size: 15px; color: var(--gris); }
.photos { display: flex; flex-wrap: wrap; gap: 10px 8px; justify-content: center; align-items: flex-start; padding-top: 6px; }
.pola { background: #fff; padding: 6px 6px 18px; box-shadow: var(--ombre); cursor: zoom-in; border: 0; transform: rotate(var(--r, 0deg));
        transition: transform .35s cubic-bezier(.2,.7,.2,1); }
.pola:hover { transform: rotate(0deg) scale(1.04); z-index: 2; }
.pola img { height: var(--h, 150px); width: auto; background: var(--papier2); }
.pola.plus { display: grid; place-items: center; font: 24px Marck, cursive; color: var(--gris); width: 110px; height: calc(var(--h, 150px) + 24px); }
.billet.arrive .pola { animation: pose .7s cubic-bezier(.2,.8,.25,1) both; animation-delay: calc(var(--i, 0) * 70ms); }
@keyframes pose { from { opacity: 0; transform: translateY(-18px) rotate(calc(var(--r, 0deg) * 3)) scale(1.05); } to { opacity: 1; } }
@media (max-width: 760px) {
  .fil::before { left: 14px; }
  .billet, .billet:nth-of-type(even) { grid-template-columns: 1fr; padding-left: 26px; }
  .billet::before { left: 14px; }
  .billet .lettre, .billet .photos, .billet:nth-of-type(even) .lettre, .billet:nth-of-type(even) .photos { grid-column: 1; grid-row: auto; }
  .billet .photos { justify-content: flex-start; margin-top: 12px; }
  .pola img { height: var(--hm, 120px); }
  .an-titre, .mois-titre { text-align: left; }
}
@media (prefers-reduced-motion: reduce) { .billet.arrive .pola { animation: none; } .livre, .pola { transition: none; } }

/* visionneuse */
.visio { position: fixed; inset: 0; z-index: 100; background: rgba(30,26,23,.94); display: none; align-items: center; justify-content: center; }
.visio.ouverte { display: flex; }
.visio img { max-width: 94vw; max-height: 82vh; object-fit: contain; border: 8px solid #fff; border-bottom-width: 34px; box-shadow: 0 20px 60px rgba(0,0,0,.5); }
.visio .leg { position: absolute; bottom: 18px; left: 0; right: 0; text-align: center; color: #EDE6DC; font-size: 16px; }
.visio button { position: absolute; background: rgba(255,255,255,.12); color: #fff; border: 0; width: 52px; height: 52px; border-radius: 50%; font-size: 26px; cursor: pointer; }
.visio .fermer { top: 16px; right: 16px; } .visio .prec { left: 16px; top: 50%; } .visio .suiv { right: 16px; top: 50%; }

/* téléchargements */
.dl { max-width: 860px; margin: 0 auto; padding: 48px 20px 80px; }
.dl h1 { font: 400 clamp(46px, 8vw, 76px)/1 Marck, cursive; text-align: center; margin: 0 0 8px; }
.dl > p { text-align: center; color: var(--gris); margin: 0 auto 36px; max-width: 34em; }
.dl-ligne { display: grid; grid-template-columns: 96px 1fr; gap: 22px; align-items: center; padding: 20px 0; border-top: 1px solid #E6DED3; }
.dl-ligne img { width: 96px; box-shadow: var(--ombre); }
.dl-ligne h2 { font: 600 22px/1.2 Playfair, Georgia, serif; margin: 0 0 2px; }
.dl-ligne .periode { color: var(--gris); font-size: 16px; margin-bottom: 10px; }
.dl-ligne .boutons { display: flex; flex-wrap: wrap; gap: 10px; }
.dl-ligne small { color: var(--gris); }
