/* baptisteguilbert.com — feuille de style commune
   Noir #000, blanc #fff, papier #F5F5F2. Seules les couvertures sont en couleur.
   Quatre polices TeX Gyre (licence GUST, libres) : Heros Cn Bold, Heros, Termes, Cursor. */


:root {
  --noir: #000;
  --blanc: #fff;
  --papier: #F5F5F2;
  --ombre: 6px 6px 0 #000;
  --cn: "Heros Cn", "Helvetica Neue", Arial Narrow, sans-serif;
  --heros: "Heros", "Helvetica Neue", Helvetica, Arial, sans-serif;
  --termes: "Termes", "Times New Roman", Times, serif;
  --cursor: "Cursor", "Courier New", Courier, monospace;
}

* { box-sizing: border-box; }
html { background: var(--papier); -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  color: var(--noir);
  font-family: var(--termes);
  font-size: 19px;
  line-height: 1.45;
  overflow-x: hidden;
}
@supports (overflow: clip) { html, body { overflow-x: clip; } }
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }

/* ---------- Le fond : un calque fixe derrière tout, jamais en mouvement ---------- */
.fond {
  position: fixed;
  top: 0; left: 0;
  width: 100%;
  height: 100vh;
  height: 100lvh;              /* hauteur stable sur iPhone : pas de saut quand la barre d'adresse se replie */
  z-index: 0;
  pointer-events: none;
  background-color: var(--papier);
  background-image: url("img/fonds/fond-ordi-A.png");
  background-position: center;
  background-size: cover;
  background-repeat: no-repeat;
  opacity: .82;                /* encre du fond à mi-chemin entre noir pur (1) et .64 sur le papier #F5F5F2 */
}
@media (orientation: portrait) {
  .fond { background-image: url("img/fonds/fond-mobile-A.png"); }
}
.page { position: relative; z-index: 1; }

/* ---------- En-tête (à la manière de Rasheed) : sur blanc uni ---------- */
.entete {
  position: relative;
  z-index: 2;
  background: var(--blanc);
  border-bottom: 1.5px solid var(--noir);
  padding: 30px 4vw 30px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  column-gap: 4vw;
  align-items: start;
}
.entete .phrase, .entete .notice { grid-column: 1; }
.entete .menu-haut { grid-column: 2; grid-row: 1 / span 2; align-self: end; }
.menu-haut { display: flex; flex-direction: column; align-items: flex-end; gap: .35em; padding-top: 0; font-family: var(--termes); font-size: clamp(16px, 1.3vw, 19.5px); line-height: 1.38; text-align: right; }
.menu-haut a { text-decoration: none; display: inline-flex; align-items: center; gap: .4em; }
.menu-haut .signe { width: 1.5em; height: 1.5em; flex: none; overflow: visible; }
.menu-haut a:hover > span, .menu-haut a:focus-visible > span, .menu-haut a[aria-current="page"] > span { text-decoration: underline; text-underline-offset: .2em; }
.phrase {
  font-family: var(--termes);
  font-weight: 400;
  font-size: clamp(28px, 3.1vw, 48px);
  line-height: 1.08;
  letter-spacing: -.01em;
  margin: 0 0 16px;
  max-width: 24em;
}
.phrase a { text-decoration: none; }
.phrase a:hover, .phrase a:focus-visible { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: .12em; }
.notice {
  font-family: var(--termes);
  font-size: clamp(16px, 1.3vw, 19.5px);
  line-height: 1.38;
  margin: 0;
  max-width: 50em;
}
.entoure, .barre { position: relative; white-space: nowrap; }

/* Grandes parenthèses, comme chez Rasheed : au survol, le mot passe en gras italique (pas un lien) */
.parenthese { white-space: nowrap; }
.parenthese::before, .parenthese::after { font-size: 1.5em; line-height: 0; vertical-align: -.1em; }
.parenthese::before { content: "("; margin-right: .16em; }
.parenthese::after { content: ")"; margin-left: .16em; }
.parenthese:hover > span, .parenthese:active > span { font-weight: 700; font-style: italic; }
.notice a.lien-paren { color: inherit; text-decoration: none; }
.lien-paren:hover .parenthese > span, .lien-paren:focus-visible .parenthese > span { font-weight: 700; font-style: italic; }
.entoure { padding: 0 .28em; margin: 0 .04em; }
.entoure > .geste { left: -4%; top: -34%; width: 108%; height: 168%; }
.barre > .geste { left: -3%; top: 0; width: 106%; height: 100%; }

/* Bande sous l'en-tête : une fenêtre sur une image fixe, qui change quand on fait défiler la page.
   Retirée de l'accueil en v9 ; remise en v22 sur les pages sans fond manuscrit (à propos/contact, rencontres, journal). */
.fenetre-fixe { position: relative; z-index: 2; height: clamp(62px, 7.5vw, 116px); background: var(--noir); }
.fenetre-fixe .decoupe { position: absolute; inset: 0; overflow: hidden; clip: rect(0, auto, auto, 0); clip-path: inset(0); }
.fenetre-fixe .vue {
  position: fixed; top: 0; left: 0;
  width: 100%; height: 100vh; height: 100lvh;
  background: var(--blanc) url("img/bande-facade.png") center / cover no-repeat;
  image-rendering: pixelated;
  pointer-events: none;
}

.pied { background: var(--noir); color: var(--blanc); font-family: var(--cursor); font-size: 11.5px; line-height: 1.4; padding: .7em 4vw .75em; margin-top: 10vh; position: relative; z-index: 2; display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: .4em 2em; }
.pied p { margin: 0; }
.menu-bas { display: flex; flex-wrap: wrap; gap: .2em 1.6em; }
.pied a { color: var(--blanc); text-decoration: none; display: inline-flex; align-items: center; gap: .4em; }
.pied .signe { width: 1.3em; height: 1.3em; flex: none; overflow: visible; margin: -.2em 0; }
.pied a:hover > span, .pied a:focus-visible > span, .pied a[aria-current="page"] > span { text-decoration: underline; text-underline-offset: .2em; }

@media (max-width: 760px) {
  .entete { padding: 14px 5vw 24px; }
  .entete { grid-template-columns: 1fr; padding-top: 18px; }
  .entete .phrase { grid-row: 1; }
  .entete .notice { grid-row: 2; }
  .entete .menu-haut { grid-column: 1; grid-row: 3; padding-top: 0; margin-top: 18px; align-self: start; flex-direction: row; flex-wrap: wrap; align-items: baseline; justify-content: flex-start; text-align: left; gap: .15em 1.4em; }
  .menu-haut { font-size: 16px; }
  .phrase { line-height: 1.2; }
  .entoure > .geste { top: -18%; height: 136%; }
}

/* ---------- Cadres unis (à la manière de Rasheed) ---------- */
.cadre {
  background: var(--blanc);
  border: 1.5px solid var(--noir);
  box-shadow: var(--ombre);
  padding: 18px 22px 20px;
}
.cadre.papier { background: var(--papier); }
.cadre.noir { background: var(--noir); color: var(--blanc); }
.cadre > :first-child { margin-top: 0; }
.cadre > :last-child { margin-bottom: 0; }

/* Étiquette noire en Courier blanc */
.etiq {
  display: inline-block;
  background: var(--noir);
  color: var(--blanc);
  font-family: var(--cursor);
  font-size: 12px;
  line-height: 1.25;
  padding: 3px 7px 2px;
  text-decoration: none;
}
a.etiq:hover, a.etiq:focus-visible { background: var(--blanc); color: var(--noir); outline: 1.5px solid var(--noir); }

/* Couverture : seul élément en couleur */
.couv { border: 1.5px solid var(--noir); box-shadow: var(--ombre); background: var(--blanc); }

/* Grandes capitales condensées */
.cn { font-family: var(--cn); font-weight: 700; text-transform: uppercase; line-height: .88; letter-spacing: -.005em; }
.contour { color: transparent; -webkit-text-stroke: 2px var(--noir); }

/* Bande noire à fond perdu */
.bande {
  background: var(--noir);
  color: var(--blanc);
  position: relative;
  overflow: hidden;
}
.bande.fine { padding: 8px 4vw 7px; }
.bande.fine .cn { font-size: clamp(22px, 2.6vw, 38px); line-height: 1; }

/* Gestes à la main : jamais sur le texte, jamais cliquables */
.geste { position: absolute; pointer-events: none; overflow: visible; z-index: 0; }

.visuellement-cache { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- Mouvements : seulement à l'intérieur de cadres fixes ---------- */
@media (prefers-reduced-motion: reduce) {
  .anime, .anime * { animation: none !important; }
}
