/* Le carnet de Potamos — même univers que le site (src/carnet.css) */
:root {
  --paper: #f3ecdc; --paper-2: #ece2cd; --paper-card: #faf6ec;
  --ink: #1f5d86; --ink-deep: #163f5c; --text: #38474e; --muted: #6b7a80;
  --wash: #8bbcd8; --wash-soft: #cfe1ee; --wash-deep: #5a9bc0;
  --rose: #cf6f8a; --sun: #e7b24c; --olive: #7d8a52; --line: #cdbf9f;
  /* Caveat has no Greek letters: Mynerve, also hand-written, takes over for them */
  --hand: 'Caveat', 'Mynerve', 'Segoe Print', cursive;
  --body: 'Nunito', system-ui, -apple-system, sans-serif;
  --accent: var(--ink);
}
.accent-olive { --accent: var(--olive); }
.accent-wash  { --accent: var(--wash-deep); }
.accent-rose  { --accent: var(--rose); }
.accent-ink   { --accent: var(--ink); }
.accent-sun   { --accent: #c98f1f; }

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0; color: var(--text); font-family: var(--body); font-size: 18px; line-height: 1.72;
  background:
    radial-gradient(60vw 40vw at 84% -6%, rgba(139,188,216,0.22), transparent 60%),
    radial-gradient(46vw 38vw at -8% 38%, rgba(207,111,138,0.10), transparent 60%),
    radial-gradient(50vw 40vw at 110% 86%, rgba(231,178,76,0.12), transparent 60%),
    var(--paper);
  background-attachment: fixed;
  -webkit-font-smoothing: antialiased; overflow-x: hidden;
}
body::before { /* paper grain */
  content: ""; position: fixed; inset: 0; z-index: 0; pointer-events: none; opacity: .06; mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='200' height='200'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}
main, .topbar, .foot { position: relative; z-index: 1; }
a { color: var(--ink); text-decoration-color: rgba(31,93,134,.35); text-underline-offset: 3px; }
a:hover { text-decoration-color: var(--rose); }
img { max-width: 100%; display: block; }
h1, h2, h3, h4 { font-family: var(--hand); font-weight: 700; color: var(--ink); line-height: 1.15; letter-spacing: .4px; margin: 0; }
h3 { font-size: 2rem; margin: 2.2rem 0 .6rem; color: var(--ink-deep); }
h4 { font-size: 1.6rem; margin: 1.6rem 0 .4rem; }
p { margin: 0 0 1rem; }
ul, ol { padding-left: 1.3rem; margin: 0 0 1.2rem; }
li { margin-bottom: .35rem; }
li::marker { color: var(--accent); font-weight: 800; }
strong { color: var(--ink-deep); }
code { background: var(--paper-2); padding: .05em .35em; border-radius: 4px; font-size: .9em; }

/* ---------- top bar & progress ---------- */
.progress { position: fixed; top: 0; left: 0; right: 0; height: 4px; z-index: 30; }
.progress span { display: block; height: 100%; background: var(--rose); transform-origin: left; transform: scaleX(0); border-radius: 0 4px 4px 0; }
.topbar {
  position: sticky; top: 0; z-index: 20; display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 10px clamp(16px, 4vw, 40px); background: rgba(243,236,220,.86); backdrop-filter: blur(8px);
  border-bottom: 1.5px dashed var(--line);
}
.brand { font-family: var(--hand); font-size: 1.7rem; font-weight: 700; color: var(--ink); text-decoration: none; line-height: 1.1; }
.brand em { color: var(--rose); font-style: normal; }
/* the site menu (same tabs as the website) + language switch */
.site-nav { display: flex; gap: clamp(12px, 2vw, 26px); margin-left: auto; }
.site-nav a { font-family: var(--hand); font-size: 1.35rem; color: var(--ink-deep); text-decoration: none; white-space: nowrap; position: relative; }
.site-nav a:hover { color: var(--rose); }
.site-nav a.on { color: var(--rose); }
.site-nav a.on::after { content: ""; position: absolute; left: 0; right: 0; bottom: -2px; height: 2.5px; background: var(--rose); border-radius: 2px; }
.lang-btn { font-family: var(--hand); font-size: 1.25rem; font-weight: 700; color: var(--ink); text-decoration: none; border: 2px solid var(--ink); padding: .05em .55em; border-radius: 235px 18px 220px 22px / 22px 210px 20px 235px; margin-left: 18px; }
.lang-btn:hover { background: var(--wash-soft); }
.nav-toggle { display: none; flex-direction: column; gap: 5px; margin-left: 14px; padding: 8px 4px; background: none; border: 0; cursor: pointer; }
.nav-toggle span { width: 24px; height: 2.5px; background: var(--ink); border-radius: 3px; transition: transform .3s, opacity .3s; }
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7.5px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7.5px) rotate(-45deg); }
/* small screens: the menu folds into a burger, like on the website */
@media (max-width: 860px) {
  .nav-toggle { display: flex; }
  .lang-btn { margin-left: auto; }
  .site-nav { display: none; position: absolute; top: 100%; left: 0; right: 0; z-index: 5; flex-direction: column; gap: 2px;
    background: var(--paper-card); border-bottom: 2.5px solid var(--ink); padding: 10px clamp(16px, 4vw, 40px) 18px; }
  .site-nav.open { display: flex; }
  .site-nav a { font-size: 1.5rem; padding: 8px 0; align-self: flex-start; }
}
@media (max-width: 520px) { .brand-long { display: none; } }

/* "where to stay" block at the end of each carnet */
.stay { margin: 40px 0 10px; padding: 22px 24px; background: var(--paper-card); border: 2.5px dashed var(--accent); border-radius: 18px 6px 16px 8px / 8px 16px 6px 18px; }
.stay-t { font-family: var(--hand); font-size: 1.9rem; font-weight: 700; color: var(--ink); margin: 0 0 .3rem; }
.stay p { margin-bottom: .8rem; }
.stay-btn { display: inline-block; font-family: var(--hand); font-weight: 700; font-size: 1.45rem; color: var(--paper-card); background: var(--ink); text-decoration: none; padding: .35em 1em .3em; border-radius: 235px 18px 220px 22px / 22px 210px 20px 235px; transition: transform .18s; }
.stay-btn:hover { transform: translateY(-2px) rotate(-1deg); }

/* ---------- hero ---------- */
.hero {
  position: relative; max-width: 1180px; margin: 0 auto; padding: clamp(36px, 7vw, 80px) clamp(16px, 5vw, 44px) 40px;
  display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); gap: clamp(24px, 5vw, 64px); align-items: center;
}
.hero--solo { grid-template-columns: minmax(0, 1fr) 160px; }
.kicker { font-family: var(--hand); font-weight: 600; font-size: 1.8rem; color: var(--accent); display: inline-block; transform: rotate(-2deg); }
.hero h1 { font-size: clamp(2.6rem, 6vw, 4.4rem); margin-top: .2rem; }
.underline { display: block; width: min(320px, 70%); height: 18px; margin: 6px 0 22px; overflow: visible; }
.underline path { fill: none; stroke: var(--rose); stroke-width: 4; stroke-linecap: round; stroke-dasharray: 1; stroke-dashoffset: 0; }
.js .underline path { stroke-dashoffset: 1; }
.js .play .underline path { animation: draw 1.3s cubic-bezier(.55,.06,.32,1) .3s forwards; }
@keyframes draw { to { stroke-dashoffset: 0; } }
.intro p { font-size: 1.08rem; }
.stamp {
  display: inline-block; margin-top: 6px; font-family: var(--hand); font-size: 1.35rem; font-weight: 700; color: var(--rose);
  border: 2px solid var(--rose); padding: .1em .7em; border-radius: 8px; transform: rotate(-3deg); opacity: .85;
}
.doodle-sun { width: 150px; height: 150px; justify-self: center; overflow: visible; animation: spin 60s linear infinite; }
.doodle-sun circle { fill: rgba(231,178,76,.35); stroke: var(--sun); stroke-width: 3; }
.doodle-sun line { stroke: var(--sun); stroke-width: 3; stroke-linecap: round; }
.hero--home { grid-template-columns: minmax(0, 1fr) 140px; padding-top: 28px; padding-bottom: 80px; }
.hero--home h1 { font-size: clamp(2.2rem, 4.6vw, 3.4rem); }
.hero--home .underline { margin-bottom: 10px; }
.hero--home .doodle-sun { width: 130px; height: 130px; }
.home-text > .intro { margin-top: 20px; }
@keyframes spin { to { transform: rotate(360deg); } }

/* waves + boat on the home page */
.waves { position: absolute; left: calc(50% - 50vw); right: calc(50% - 50vw); bottom: 0; height: 100px; overflow: hidden; pointer-events: none; }
/* islands on the horizon, drifting left behind the ferry (far layer slower = depth) */
.isles { position: absolute; left: 0; bottom: 24px; width: 3000px; height: 60px; }
.isles-far { bottom: 30px; opacity: .75; animation: isles 220s linear infinite; }
.isles-near { animation: isles 120s linear -40s infinite; }
@keyframes isles { to { transform: translateX(-1000px); } }
.wave { position: absolute; bottom: 0; width: 200%; height: 40px; }
.wave path { fill: var(--wash); }
.wave.w1 { opacity: .35; animation: slide 14s linear infinite; }
.wave.w2 { opacity: .55; bottom: -6px; animation: slide 9s linear infinite reverse; }
.boat { position: absolute; bottom: 20px; left: 0; width: 200px; overflow: visible; animation: sail 60s linear -24s infinite, bob 4s ease-in-out infinite; }
.puff { fill: #fffdf6; stroke: var(--line); stroke-width: 1; opacity: 0; animation: puff 3s ease-out infinite; }
.puff.p2 { animation-delay: 1.5s; }
@keyframes puff { 0% { opacity: .9; transform: translate(0, 0) scale(.6); } 100% { opacity: 0; transform: translate(-14px, -12px) scale(1.8); } }
.puff { transform-box: fill-box; transform-origin: center; }
@keyframes slide { to { transform: translateX(-50%); } }
@keyframes sail { from { left: -220px; } to { left: 100%; } }
@keyframes bob { 0%, 100% { translate: 0 0; rotate: -1deg; } 50% { translate: 0 -3px; rotate: 1deg; } }

/* ---------- polaroids ---------- */
.polaroid {
  position: relative; margin: 2.2rem auto; max-width: 560px; background: #fffdf6; padding: 12px 12px 10px;
  border: 1.5px solid rgba(84,74,64,.3); box-shadow: 0 18px 38px -22px rgba(31,93,134,.5);
  rotate: -1.6deg; transition: rotate .35s ease, scale .35s ease;
}
.polaroid:nth-of-type(even) { rotate: 1.4deg; }
.polaroid:hover { rotate: 0deg; scale: 1.015; }
.polaroid::before { /* tape */
  content: ""; position: absolute; top: -13px; left: 50%; width: 96px; height: 26px; translate: -50% 0; rotate: -4deg;
  background: rgba(231,178,76,.42); border-left: 2px dotted rgba(255,255,255,.5); border-right: 2px dotted rgba(255,255,255,.5);
}
.polaroid .ph { display: block; width: 100%; padding: 0; border: 0; background: var(--wash-soft); cursor: zoom-in; overflow: hidden; }
.polaroid img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; transition: transform .6s ease; }
.polaroid:hover img { transform: scale(1.04); }
.polaroid figcaption { font-family: var(--hand); font-size: 1.4rem; color: var(--ink-deep); text-align: center; line-height: 1.15; padding-top: 8px; }
.polaroid figcaption small { display: block; font-family: var(--body); font-size: .68rem; color: var(--muted); margin-top: 4px; line-height: 1.4; }
.polaroid figcaption small a { color: var(--muted); }
.hero-photo { margin: 0; max-width: none; rotate: 2.5deg; }

/* ---------- layout + table of contents ---------- */
.layout { max-width: 1180px; margin: 0 auto; padding: 0 clamp(16px, 5vw, 44px); display: grid; grid-template-columns: 230px minmax(0, 1fr); gap: 48px; }
.toc { position: sticky; top: 84px; align-self: start; max-height: calc(100vh - 100px); overflow: auto; padding-top: 30px; }
.toc-t { font-family: var(--hand); font-size: 1.5rem; color: var(--accent); margin-bottom: .4rem; }
.toc ol { list-style: none; padding: 0; margin: 0; border-left: 2px dashed var(--line); }
.toc li { margin: 0; }
.toc a { display: block; padding: .3rem 0 .3rem .9rem; font-size: .88rem; line-height: 1.35; color: var(--muted); text-decoration: none; margin-left: -2px; border-left: 3px solid transparent; transition: color .2s, border-color .2s, padding .2s; }
.toc a:hover { color: var(--ink); }
.toc a.on { color: var(--ink-deep); font-weight: 700; border-left-color: var(--accent); padding-left: 1.1rem; }
.content { min-width: 0; max-width: 760px; }

/* ---------- sections ---------- */
.sec { padding: 30px 0 18px; scroll-margin-top: 80px; }
.sec h2 { font-size: clamp(2.1rem, 4vw, 2.8rem); }
.sec h2::after {
  content: ""; display: block; height: 10px; width: 0; margin: 4px 0 18px; transition: width 1s cubic-bezier(.55,.06,.32,1) .25s;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 40 10'%3E%3Cpath d='M0 5 Q 10 0 20 5 T 40 5' fill='none' stroke='%23cf6f8a' stroke-width='2.5' stroke-linecap='round'/%3E%3C/svg%3E") repeat-x left center / 40px 10px;
}
.sec.in h2::after, html:not(.js) .sec h2::after { width: 130px; }
.squiggle { text-align: center; margin: 2rem 0; }
.squiggle svg { width: 120px; height: 12px; }
.squiggle path { fill: none; stroke: var(--line); stroke-width: 2.5; stroke-linecap: round; }

/* "En bref" cards */
.enbref, .note, .ideas {
  position: relative; background: var(--paper-card); margin: 1.4rem 0 1.8rem; padding: 18px 22px 8px;
  border: 2.5px solid var(--accent); border-radius: 255px 14px 235px 16px / 16px 225px 18px 255px;
  box-shadow: 0 16px 34px -22px rgba(31,93,134,.4);
}
.enbref-t { font-family: var(--hand); font-size: 1.7rem; font-weight: 700; color: var(--accent); margin: 0 0 .3rem; }
.enbref-t::before { content: "✎ "; }
.enbref ul { list-style: none; padding: 0; }
.enbref li { padding-left: 1.4rem; position: relative; font-size: .97rem; }
.enbref li::before { content: "→"; position: absolute; left: 0; color: var(--accent); font-weight: 800; }
.note { border-style: dashed; border-color: var(--wash-deep); background: rgba(207,225,238,.35); font-size: .97rem; }
.note::before { content: "💡"; position: absolute; top: -16px; left: 18px; font-size: 1.5rem; }

/* tables */
.table-wrap { overflow-x: auto; margin: 1.2rem 0 1.8rem; background: var(--paper-card); border: 2px solid var(--line); border-radius: 18px 6px 16px 8px / 8px 16px 6px 18px; }
table { border-collapse: collapse; width: 100%; font-size: .92rem; line-height: 1.5; }
th { font-family: var(--hand); font-size: 1.3rem; color: var(--ink); text-align: left; padding: 10px 14px 6px; border-bottom: 2px solid var(--accent); white-space: nowrap; }
td { padding: 9px 14px; border-bottom: 1px dashed var(--line); vertical-align: top; }
tr:last-child td { border-bottom: 0; }
tbody tr { transition: background .2s; }
tbody tr:hover { background: rgba(207,225,238,.35); }

/* Windy */
.windy { margin: 1.6rem 0; }
.windy-t { font-family: var(--hand); font-size: 1.6rem; color: var(--accent); margin-bottom: .4rem; }
.windy iframe { width: 100%; height: 380px; border: 2.5px solid var(--ink); border-radius: 14px 6px 16px 8px / 8px 16px 6px 14px; background: var(--wash-soft); }
.windy-hint { font-size: .85rem; color: var(--muted); margin-top: .4rem; }

/* sources */
.sources details { border-top: 1.5px dashed var(--line); padding-top: 12px; margin-top: 20px; font-size: .85rem; color: var(--muted); }
.sources summary { cursor: pointer; font-family: var(--hand); font-size: 1.6rem; color: var(--ink); list-style: none; }
.sources summary::before { content: "＋ "; color: var(--accent); }
.sources details[open] summary::before { content: "－ "; }
.sources a { word-break: break-word; }

/* pager */
.pager { max-width: 1180px; margin: 40px auto 0; padding: 0 clamp(16px, 5vw, 44px); display: flex; justify-content: space-between; gap: 16px; }
.pager a {
  flex: 1 1 0; max-width: 340px; text-decoration: none; font-family: var(--hand); font-size: 1.9rem; color: var(--ink); line-height: 1.1;
  background: var(--paper-card); border: 2.5px solid var(--ink); padding: 14px 20px; transition: transform .2s, box-shadow .2s;
  border-radius: 255px 14px 235px 16px / 16px 225px 18px 255px;
}
.pager a span { display: block; font-family: var(--body); font-size: .8rem; color: var(--muted); }
.pager .next { text-align: right; margin-left: auto; }
.pager a:hover { transform: translateY(-3px) rotate(-1deg); box-shadow: 0 14px 26px -14px rgba(31,93,134,.5); }

/* ---------- the book (home page) ---------- */
.home-text { max-width: 820px; margin: 30px auto 0; padding: 0 clamp(16px, 5vw, 44px); }
.book-zone { display: flex; flex-direction: column; align-items: center; padding: 56px 16px 0; overflow: hidden; }
.book-stage { display: flex; align-items: center; gap: clamp(10px, 2.5vw, 34px); }
.book {
  --pw: min(370px, 33vw, 44vh); --ph: calc(var(--pw) * 1.38); --turn: .8s;
  position: relative; width: calc(var(--pw) * 2); height: var(--ph);
  perspective: 2400px; transition: transform .8s cubic-bezier(.6,.05,.3,1);
}
.book.closed { transform: translateX(calc(var(--pw) * -.5)); }
.board { position: absolute; top: 0; width: 50%; height: 100%; background: var(--paper-card); }
.board-l { left: 0; border-radius: 8px 0 0 8px; box-shadow: -2px 2px 0 #e6dcc6, -4px 4px 0 #ddd1b6, -6px 6px 0 #d3c5a6, 0 28px 50px -24px rgba(22,63,92,.55); transition: opacity .3s ease .45s; }
.book.closed .board-l { opacity: 0; transition-delay: 0s; }
.board-r { left: 50%; border-radius: 0 8px 8px 0; box-shadow: 2px 2px 0 #e6dcc6, 4px 4px 0 #ddd1b6, 6px 6px 0 #d3c5a6, 0 28px 50px -24px rgba(22,63,92,.55); }
.leaf {
  position: absolute; top: 0; left: 50%; width: 50%; height: 100%;
  transform-origin: left center; transform-style: preserve-3d;
  transition: transform var(--turn) cubic-bezier(.55,.05,.35,1) var(--d, 0ms); z-index: calc(var(--n) - var(--i));
}
.leaf.turned { transform: rotateY(-180deg); }
.face { position: absolute; inset: 0; overflow: hidden; backface-visibility: hidden; -webkit-backface-visibility: hidden; background: var(--paper-card); }
.face.front { border-radius: 0 8px 8px 0; box-shadow: inset 18px 0 26px -18px rgba(60,45,20,.35); }
.face.back { transform: rotateY(180deg); border-radius: 8px 0 0 8px; box-shadow: inset -18px 0 26px -18px rgba(60,45,20,.35); }
.face::after { /* faint ruled lines + light sheen */
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(90deg, rgba(255,255,255,0) 60%, rgba(255,255,255,.18)), repeating-linear-gradient(0deg, transparent 0 27px, rgba(139,188,216,.12) 27px 28px);
}
.face.back::after { transform: scaleX(-1); }

/* cover */
.cover {
  cursor: pointer; color: var(--paper-card); text-align: center; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: calc(var(--pw) * .03);
  background: repeating-linear-gradient(45deg, rgba(255,255,255,.035) 0 2px, transparent 2px 5px), linear-gradient(160deg, #22608a, var(--ink-deep));
  border-radius: 4px 12px 12px 4px; box-shadow: inset 10px 0 18px -6px rgba(0,0,0,.4), 0 30px 50px -26px rgba(0,0,0,.6);
}
.cover::after { display: none; }
.cover-band { position: absolute; top: 0; bottom: 0; right: 13%; width: calc(var(--pw) * .035); background: var(--rose); box-shadow: 0 0 8px rgba(0,0,0,.3); }
.cover-k { font-family: var(--hand); font-size: calc(var(--pw) * .06); color: var(--wash); margin: 0; }
.cover-t { font-family: var(--hand); font-weight: 700; font-size: calc(var(--pw) * .14); line-height: 1; margin: 0; }
.cover .doodle-sun { width: calc(var(--pw) * .32); height: calc(var(--pw) * .32); }
.cover-s { font-size: calc(var(--pw) * .033); letter-spacing: .5px; opacity: .8; margin: 0; padding: 0 12%; }

/* left-hand page: the carnet's photo */
.ph-page { display: grid; place-items: center; padding: calc(var(--pw) * .1); }
.ph-page .doodle-sun { width: calc(var(--pw) * .3); height: calc(var(--pw) * .3); }
.pg-photo { position: relative; display: block; background: #fffdf6; padding: 8px 8px 10px; border: 1px solid rgba(84,74,64,.25); box-shadow: 0 14px 26px -16px rgba(31,93,134,.55); }
.pg-photo::before { content: ""; position: absolute; top: -11px; left: 50%; width: 32%; height: 22px; translate: -50% 0; rotate: 3deg; background: rgba(231,178,76,.45); z-index: 1; }
.pg-photo img { width: 100%; object-fit: cover; }
.pg-photo--big { width: 100%; margin: 0; rotate: -2.2deg; padding-bottom: 6px; }
.pg-photo--big img { aspect-ratio: 3 / 4; }
.pg-photo--big figcaption { font-family: var(--hand); font-size: calc(var(--pw) * .075); color: var(--ink-deep); text-align: center; line-height: 1.2; padding-top: 4px; }
.pg-photo--m { display: none; }

/* right-hand page: the carnet's text */
.pg { display: flex; flex-direction: column; padding: calc(var(--pw) * .1) calc(var(--pw) * .09) calc(var(--pw) * .08) calc(var(--pw) * .11); }
.pg-n {
  position: absolute; top: calc(var(--pw) * .06); right: calc(var(--pw) * .06); z-index: 2;
  width: calc(var(--pw) * .12); height: calc(var(--pw) * .12); display: grid; place-items: center;
  font-family: var(--hand); font-weight: 700; font-size: calc(var(--pw) * .08); color: #fff; background: var(--accent);
  border-radius: 50% 46% 52% 48% / 48% 52% 46% 50%; box-shadow: 0 6px 14px -6px rgba(0,0,0,.4);
}
.pg-k { font-family: var(--hand); font-size: calc(var(--pw) * .058); color: var(--accent); }
.pg-t { font-family: var(--hand); font-weight: 700; font-size: calc(var(--pw) * .082); line-height: 1.06; color: var(--ink); margin: calc(var(--pw) * .015) 0 calc(var(--pw) * .03); padding-right: calc(var(--pw) * .08); }
.pg-x { font-size: calc(var(--pw) * .037); line-height: 1.5; color: var(--muted); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.pg-in { font-family: var(--hand); font-size: calc(var(--pw) * .055); color: var(--ink); margin: calc(var(--pw) * .05) 0 calc(var(--pw) * .01); }
.pg-list { list-style: none; padding: 0; margin: 0; }
.pg-list li { font-size: calc(var(--pw) * .035); line-height: 1.35; color: var(--text); padding: calc(var(--pw) * .012) 0 calc(var(--pw) * .012) 1.2em; position: relative; border-bottom: 1px dashed var(--line); margin: 0; }
.pg-list li::before { content: "→"; position: absolute; left: 0; color: var(--accent); font-weight: 800; }
.pg-go {
  margin-top: auto; align-self: flex-start; text-decoration: none;
  font-family: var(--hand); font-weight: 700; font-size: calc(var(--pw) * .068); line-height: 1;
  color: var(--paper-card); background: var(--accent); padding: .45em 1.1em .38em;
  border-radius: 235px 18px 220px 22px / 22px 210px 20px 235px; box-shadow: 0 8px 16px -8px rgba(22,63,92,.5);
  transition: transform .18s ease, box-shadow .18s ease;
}
.pg-go:hover { transform: translateY(-2px) rotate(-1.5deg); box-shadow: 0 12px 22px -10px rgba(22,63,92,.5); }

/* side arrows + position */
.bn {
  flex: none; width: 58px; height: 58px; font-size: 1.6rem; font-weight: 800; color: var(--ink); background: var(--paper-card); cursor: pointer;
  border: 2.5px solid var(--ink); border-radius: 50% 46% 52% 48% / 48% 52% 46% 50%; transition: transform .2s, opacity .2s;
  box-shadow: 0 10px 20px -12px rgba(22,63,92,.5);
}
.bn:hover { transform: rotate(-6deg) scale(1.08); }
.bn:disabled { opacity: .25; cursor: default; transform: none; }
.book-pos { font-family: var(--hand); font-size: 1.6rem; color: var(--ink); text-align: center; margin: 22px 0 0; }

/* entering a carnet: the home page slides away, the carnet slides in like a turned page */
.leaving main, .leaving .topbar, .leaving .foot { opacity: 0; transform: translateX(-60px); transition: opacity .4s ease, transform .45s cubic-bezier(.6,.05,.3,1); }
html.entering body { perspective: 1600px; }
html.entering main { transform-origin: left center; animation: pageIn .7s cubic-bezier(.2,.7,.2,1) both; }
@keyframes pageIn { from { opacity: 0; transform: translateX(80px) rotateY(-10deg); } }

@media (max-width: 760px) {
  .book-zone { padding-top: 6px; }
  .book-stage { flex-wrap: wrap; justify-content: center; gap: 14px 40px; }
  .book { --pw: min(86vw, 380px); --ph: calc(var(--pw) * 1.5); width: var(--pw); order: -1; flex: 0 0 100%; max-width: var(--pw); }
  .book.closed { transform: none; }
  .leaf, .board-r { left: 0; width: 100%; }
  .board-l { display: none; }
  /* one page at a time: the turning page fades out halfway through its turn */
  .leaf.turned { opacity: 0; transition: transform var(--turn) cubic-bezier(.55,.05,.35,1) var(--d, 0ms), opacity .2s ease calc(var(--d, 0ms) + var(--turn) * .5); }
  .pg-photo--m { display: block; margin: calc(var(--pw) * .04) 0 calc(var(--pw) * .05); rotate: -1.5deg; }
  .pg-photo--m img { aspect-ratio: 16 / 9; }
  .pg-in, .pg-list { display: none; }
  .pg { padding-top: calc(var(--pw) * .07); }
}

/* ---------- lightbox ---------- */
.lightbox { position: fixed; inset: 0; z-index: 50; background: rgba(22,63,92,.88); display: grid; place-items: center; padding: 24px; cursor: zoom-out; animation: fade .25s ease; }
.lightbox[hidden] { display: none; }
.lightbox img { max-width: 94vw; max-height: 82vh; border: 10px solid #fffdf6; box-shadow: 0 30px 60px -20px #000; animation: pop .35s cubic-bezier(.2,.8,.2,1.2); }
.lightbox p { font-family: var(--hand); font-size: 1.6rem; color: #fffdf6; text-align: center; margin: 10px 0 0; }
.lb-close { position: absolute; top: 14px; right: 20px; font-size: 2.4rem; color: #fff; background: none; border: 0; cursor: pointer; }
@keyframes fade { from { opacity: 0; } }
@keyframes pop { from { transform: scale(.9) rotate(-2deg); opacity: 0; } }

/* ---------- footer ---------- */
.foot { text-align: center; font-family: var(--hand); font-size: 1.5rem; color: var(--ink); padding: 60px 16px 40px; line-height: 1.3; }
.foot span { font-family: var(--body); font-size: .8rem; color: var(--muted); }

/* ---------- reveal on scroll ---------- */
.js .reveal { opacity: 0; transform: translateY(22px); transition: opacity .7s ease, transform .8s cubic-bezier(.2,.7,.2,1); }
.js .reveal.in { opacity: 1; transform: none; }

/* ---------- mobile ---------- */
@media (max-width: 960px) {
  .layout { grid-template-columns: minmax(0, 1fr); gap: 0; }
  .toc { position: static; max-height: none; padding-top: 10px; }
  .toc ol { border-left: 0; display: flex; flex-wrap: wrap; gap: 8px; }
  .toc a { border: 1.5px solid var(--line); border-radius: 99px; padding: .25rem .8rem; background: var(--paper-card); }
  .toc a.on { padding-left: .8rem; border-color: var(--accent); }
}
@media (max-width: 760px) {
  body { font-size: 17px; }
  .hero, .hero--solo, .hero--home { grid-template-columns: minmax(0, 1fr); }
  .hero .kicker { padding-right: 76px; }
  .hero .doodle-sun { position: absolute; top: 10px; right: 10px; width: 80px !important; height: 80px !important; opacity: .6; }
  .brand em { display: none; }
  .pager { flex-direction: column; }
  .pager a { max-width: none; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .js .reveal { opacity: 1; transform: none; }
  .js .underline path { stroke-dashoffset: 0; }
  .sec h2::after { width: 130px; }
}

@media print {
  .topbar, .progress, .toc, .pager, .lightbox, .waves, .doodle-sun, .windy, .book-zone { display: none !important; }
  body { background: #fff; font-size: 11pt; }
  .layout { display: block; }
  .js .reveal { opacity: 1; transform: none; }
  .polaroid { rotate: 0deg; box-shadow: none; break-inside: avoid; }
  .enbref, .table-wrap { break-inside: avoid; }
  .sources details > * { display: block; }
}
.book.no-anim, .book.no-anim .leaf, .book.no-anim .board-l { transition: none !important; }
@media (max-width: 760px) {
  .bn { width: 50px; height: 50px; }
  .book-pos { margin-top: 6px; }
}
.pg-credit { display: block; font-family: var(--body); font-size: 10px; line-height: 1.3; color: var(--muted); text-align: center; padding-top: 3px; }

/* Greek: the hand-written font (Mynerve) is drawn larger than Caveat, so titles are scaled down */
html[lang="el"] .hero h1 { font-size: clamp(2rem, 4.4vw, 3.3rem); }
html[lang="el"] .hero--home h1 { font-size: clamp(1.9rem, 3.8vw, 2.8rem); }
html[lang="el"] .kicker { font-size: 1.4rem; }
html[lang="el"] .sec h2 { font-size: clamp(1.7rem, 3.2vw, 2.3rem); }
html[lang="el"] h3 { font-size: 1.6rem; }
html[lang="el"] .pg-t { font-size: calc(var(--pw) * .064); }
html[lang="el"] .pg-k, html[lang="el"] .pg-in { font-size: calc(var(--pw) * .045); }
html[lang="el"] .cover-t { font-size: calc(var(--pw) * .1); }
html[lang="el"] .site-nav a { font-size: 1.15rem; }
html[lang="el"] .pg-photo--big figcaption { font-size: calc(var(--pw) * .06); }

/* "Rent our houses": a filled blue button (like "Demander un séjour" on the site),
   so visitors see straight away that the houses are for rent */
.site-nav a.nav-rent { color: var(--paper-card); background: var(--ink); font-weight: 700; padding: .12em .8em .06em;
  border-radius: 235px 18px 220px 22px / 22px 210px 20px 235px; box-shadow: 0 8px 16px -8px rgba(22,63,92,.45);
  transition: transform .18s ease, box-shadow .18s ease; }
.site-nav a.nav-rent:hover { color: var(--paper-card); transform: translateY(-2px) rotate(-1deg); box-shadow: 0 12px 22px -10px rgba(22,63,92,.45); }
@media (max-width: 860px) { .site-nav a.nav-rent { padding: .2em .9em .1em; margin: 4px 0; } }

/* small screens: a smaller ferry, so the islands show on either side, and room around the scene */
@media (max-width: 760px) {
  .boat { width: 140px; bottom: 18px; }
  .isles { transform-origin: left bottom; }
  .hero--home { padding-bottom: 104px; }
  .book-zone { padding-top: 36px; }
}
@media (max-width: 760px) { .t-lead { display: none; } .t-rest { display: inline-block; } .t-rest::first-letter { text-transform: uppercase; } }
