/* Version 2 — typo machine à écrire, accueil noir, pages en bloc centré */
:root {
  --bg: #fff;
  --fg: #000;
  --muted: #8a8a8a;
  --size: 11px;
  --col: clamp(200px, 22vw, 340px);   /* largeur de l'image et du texte */
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { min-height: 100%; }
body {
  background: var(--bg);
  color: var(--fg);
  font-family: "Courier New", Courier, monospace;
  font-size: var(--size);
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
}
body.home { --bg: #000; --fg: #fff; --muted: #9a9a9a; }
a { color: inherit; text-decoration: none; }
a:hover { text-decoration: underline; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
b, strong { font-weight: 700; }
.dim { color: var(--muted); }

/* Nom en capitales, sans cadre */
.logo {
  display: inline-block;
  color: var(--fg);
  font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
  font-weight: 700; font-size: 22px; letter-spacing: -0.01em; line-height: 1;
  text-transform: uppercase; white-space: nowrap;
}
.logo:hover { text-decoration: none; }
.clock { letter-spacing: 0.02em; }

/* ============ Accueil ============ */
.home-wrap {
  min-height: 100vh;
  display: flex; flex-direction: column; align-items: center;
  padding: 92px 20px 60px;
}
.home-wrap .clock { margin-top: 18px; }
.menu { margin-top: 64px; list-style: none; min-width: 180px; }
.menu li + li { margin-top: 10px; }
.menu .toggle { text-align: left; }
.menu .toggle:hover { text-decoration: underline; }
.menu .sub { list-style: none; margin: 10px 0 4px 2ch; display: none; }
.menu .sub li + li { margin-top: 8px; }
.menu .open .sub { display: block; }
.lang-switch { margin-top: 44px; color: var(--muted); }
.lang-switch button { color: var(--muted); }
.lang-switch .on { color: var(--fg); }

/* ============ Pages blanches : haut / bloc centré / barre en bas ============ */
.page {
  min-height: 100vh;
  display: flex; flex-direction: column; align-items: center;
  padding: 38px 20px 24px;
}
.top { display: flex; flex-direction: column; align-items: center; gap: 16px; }

/* Projet : image + texte côte à côte, centrés */
#cards { flex: 1; width: 100%; margin-top: 44px; }
.single { display: flex; justify-content: center; align-items: flex-start; }
.entry { display: flex; align-items: flex-start; gap: 20px; flex: none; }

/* Archive : toutes les entrées côte à côte, la 1re centrée, défilement horizontal */
.strip {
  display: flex; align-items: flex-start; gap: 90px;
  overflow-x: auto; scroll-snap-type: x proximity;
  padding: 0 20px 28px calc(50% - var(--col) - 10px);
  scrollbar-width: thin; scrollbar-color: #c4c4c4 #eee;
}
.strip .entry { scroll-snap-align: center; }

.pic { --h: min(calc(var(--col) * 1.25), 70vh); width: calc(var(--h) * var(--ratio, 0.8)); flex: none; }
.frame { display: flex; justify-content: center; width: 100%; cursor: pointer; }
.ph { width: 100%; aspect-ratio: 4 / 5; background: #e6e6e6; }
.count button { padding: 0 2px; }
/* Même hauteur pour toutes les images (portrait 4:5 = référence) : les paysages sont simplement plus larges */
.frame img, .frame video { display: block; height: var(--h); width: auto; max-width: 100%; }
.frame video { aspect-ratio: 4 / 5; object-fit: cover; object-position: center; }
.count { margin-top: 16px; text-align: center; }

.txt { width: var(--col); display: flex; flex-direction: column; }
.meta { color: var(--muted); }
.txt h1 { font-size: 14px; font-weight: 400; line-height: 1.25; margin-bottom: 14px; }
.body { max-height: 60vh; overflow-y: auto; }
.body p + p { margin-top: 1.1em; }
.liens a { text-decoration: underline; white-space: nowrap; }
.archive { margin-top: 24px; align-self: flex-start; text-decoration: underline; padding: 0 2px; }
.archive.on { background: var(--fg); color: var(--bg); text-decoration: none; }

/* Info */
.info-wrap { flex: 1; display: flex; flex-direction: column; justify-content: center; align-items: center; text-align: center; gap: 24px; }

/* Barre du bas */
.bar {
  display: flex; justify-content: space-between; align-items: baseline; gap: 20px; flex-wrap: wrap;
  width: 100%; max-width: 640px; margin-top: 60px;
}
.bar nav { display: flex; gap: 12px; flex-wrap: wrap; justify-content: flex-end; }
.bar .on { font-weight: 700; }

/* ============ Mobile ============ */
@media (max-width: 640px) {
  .page { padding: 28px 16px 22px; }
  #cards { margin-top: 32px; }
  .entry { flex-direction: column; align-items: stretch; gap: 22px; width: 100%; }
  .pic, .txt { width: 100%; min-width: 0; }
  .pic { --ratio: auto; }
  .frame img, .frame video { width: 100%; height: auto; max-height: 70vh; object-fit: contain; }
  /* Projet : les entrées défilent de haut en bas, une par écran (comme TikTok) */
  .page:has(> .strip) { height: 100vh; height: 100dvh; min-height: 0; padding-bottom: 14px; }
  .page:has(> .strip) .bar { margin-top: 12px; }
  .strip {
    flex: 1; min-height: 0; margin-top: 20px; padding: 0; gap: 0;
    flex-direction: column; align-items: stretch;
    overflow-x: hidden; overflow-y: auto; overscroll-behavior: contain;
    scroll-snap-type: y mandatory; scrollbar-width: none;
  }
  .strip::-webkit-scrollbar { display: none; }
  .strip .entry {
    width: 100%; height: 100%; flex: none; justify-content: center; gap: 14px;
    scroll-snap-align: start; scroll-snap-stop: always; overflow: hidden;
  }
  .strip .frame img, .strip .frame video { max-height: 46dvh; }
  /* Vidéos verticales (9:16) recadrées en 4:5 comme les photos ; le zoom les montre en entier */
  .frame video:not(.paysage) {
    width: auto; max-width: 100%; max-height: none; aspect-ratio: 4 / 5; object-fit: cover;
    height: min(70vh, calc((100vw - 32px) * 1.25));
  }
  .strip .frame video:not(.paysage) { height: min(46dvh, calc((100vw - 32px) * 1.25)); }
  .strip .count { margin-top: 10px; }
  /* Petite flèche : il y a une autre entrée en dessous */
  .strip .entry { position: relative; }
  .strip .entry:not(:last-child)::after {
    content: "↓"; position: absolute; left: 50%; bottom: 2px; transform: translateX(-50%);
    color: var(--muted); font-size: 14px; animation: indice 1.8s ease-in-out infinite;
  }
  .frame, .lb { touch-action: pan-y; }
  .body { max-height: none; }
  .bar nav { justify-content: flex-start; }
  .menu { margin-top: 48px; }
}

@keyframes indice { 0%, 100% { translate: 0 0; } 50% { translate: 0 5px; } }

/* ============ Zoom au clic ============ */
.lb {
  position: fixed; inset: 0; z-index: 100;
  background: rgba(255, 255, 255, .97);
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: 24px 20px 16px; cursor: pointer;
}
.lb-media { flex: 1; min-height: 0; width: 100%; display: flex; align-items: center; justify-content: center; }
.lb-media img, .lb-media video { max-width: 100%; max-height: 100%; object-fit: contain; display: block; }
.lb-bar { display: flex; justify-content: space-between; width: 100%; max-width: 640px; padding-top: 14px; cursor: default; }
.lb-bar button { padding: 0 2px; }

/* Crédits (lignes avec « : ») : plus petits, groupés */
.body .credits, .body .liens { font-size: 9px; line-height: 1.5; }
.count .son, .lb-bar .son { margin-left: 10px; text-decoration: underline; }
.frame video.paysage { aspect-ratio: auto; }

/* ============ Projet : diaporama plein écran (comme axelpelletanche.com) ============ */
body.diapo { overflow: hidden; overscroll-behavior: none; }
.diapo .track {
  position: fixed; inset: 0; display: flex;
  transition: transform .7s cubic-bezier(.65, 0, .35, 1); will-change: transform;
}
.diapo .slide {
  flex: none; width: 100vw; height: 100vh; height: 100dvh;
  display: flex; align-items: center; justify-content: center; cursor: e-resize;
}
.diapo .track.retour .slide { cursor: w-resize; }
.diapo .slide img, .diapo .slide video {
  display: block; height: 100%; width: auto; max-width: 100%; object-fit: contain;
}
/* Textes posés sur l'image : s'inversent pour rester lisibles sur le clair comme sur le sombre */
.diapo .ui { position: fixed; z-index: 10; color: #fff; mix-blend-mode: difference; text-transform: uppercase; }
.diapo { --cap: 230px; }   /* largeur de la colonne de texte */
.diapo .legende { top: 18px; left: 18px; width: var(--cap); }
/* Marge à gauche et à droite = place du texte : la photo ne passe jamais dessous */
.diapo .slide { padding: 0 calc(var(--cap) + 36px); }
.diapo .legende .nom { text-decoration: none; }
.diapo .legende .bloc { margin-top: 1.45em; }
.diapo .legende a { text-decoration: underline; }
.diapo .legende a.nom { text-decoration: none; }
.diapo .coin { top: 18px; right: 18px; display: flex; gap: 14px; align-items: flex-start; }
.diapo .nav-projets { position: relative; }
.diapo .nav-projets ul { list-style: none; padding-top: 0.4em; display: none; position: absolute; top: 100%; left: 0; white-space: nowrap; }
.diapo .nav-projets:hover ul, .diapo .nav-projets.open ul { display: block; }
.diapo .nav-projets li a.on { font-weight: 700; }
.diapo .pct { bottom: 18px; left: 18px; }
.diapo .son { bottom: 18px; right: 18px; text-decoration: underline; }

@media (max-width: 640px) {
  .diapo .slide img, .diapo .slide video { width: 100%; height: auto; max-height: 100%; }
  .diapo .legende { top: 14px; left: 14px; width: auto; right: 14px; font-size: 10px; }
  .diapo .coin { top: 14px; right: 14px; gap: 10px; font-size: 10px; }
  .diapo .nav-projets ul { display: none; }
  .diapo .nav-projets.open ul { display: block; }
  .diapo .nav-projets.open .titre-nav { text-decoration: underline; }
  .diapo:has(.nav-projets.open) .legende { visibility: hidden; }
  .diapo .pct { bottom: 14px; left: 14px; }
  /* Sur mobile : la photo se place sous le texte */
  .diapo .slide { padding: calc(var(--legende-h, 120px) + 32px) 0 40px; }
  .diapo .son { bottom: 14px; right: 14px; }
}

/* ============ Holy Skate : police Old London pour le nom, en minuscules ============ */
@font-face {
  font-family: "Old London";
  src: url("fonts/OldLondon.ttf") format("truetype");
  font-display: swap;
}
.logo, .diapo .legende a.nom {
  font-family: "Old London", serif;
  font-weight: 400; text-transform: none; letter-spacing: 0;
}
.logo { font-size: 46px; line-height: 1; }
.diapo .legende a.nom { font-size: 22px; line-height: 1; }

/* ============ Accueil façon supreme.com/about ============ */
body.about { --bg: #fff; --fg: #000; }
.about-wrap {
  min-height: 100vh; min-height: 100dvh;
  display: flex; flex-direction: column; align-items: center;
  padding: 38px 20px 24px;
}
.about-wrap .clock { margin-top: 14px; }
/* Texte au milieu exact de l'écran */
.about-wrap { position: relative; }
.about-txt { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); width: max-content; max-width: calc(100% - 40px); text-align: center; }
/* Une phrase = une ligne (sauf écran trop étroit) */
.about-txt p { white-space: nowrap; }
@media (max-width: 640px) { .about-txt p { white-space: normal; } }
.about-bar { margin-top: auto; }
.about-txt h2 { font-size: inherit; font-weight: 700; margin-bottom: 1em; }
.about-txt p + p { margin-top: 1em; }
.about-bar {
  display: flex; justify-content: space-between; align-items: baseline; gap: 20px; flex-wrap: wrap;
  width: 100%; max-width: 500px;
}
.about-bar nav { display: flex; gap: 12px; flex-wrap: wrap; justify-content: flex-end; }
@media (max-width: 640px) {
  .logo { font-size: 38px; }
  .about-wrap { padding: 28px 16px 22px; }
}
/* « projects » en bas : liste des événements qui s'ouvre vers le haut */
.bar-projets { position: relative; }
.bar-projets ul {
  display: none; position: absolute; bottom: 100%; left: 0; padding-bottom: 8px;
  list-style: none; white-space: nowrap; background: var(--bg);
}
.bar-projets ul li + li { margin-top: 4px; }
.bar-projets:hover ul, .bar-projets.open ul { display: block; }
.bar-projets.open .titre-nav, .bar-projets:hover .titre-nav { text-decoration: underline; }

/* ============ Annonce Kampot 2027 : page façon e-mail ============ */
.about-txt.mail { text-align: left; }
.mail-tete { display: grid; grid-template-columns: auto 1fr; column-gap: 12px; row-gap: 4px; padding-bottom: 14px; border-bottom: 1px solid currentColor; }
.mail-tete dt { opacity: .5; }
.mail-corps { padding-top: 18px; }
.mail-corps p + p { margin-top: .6em; }

/* Fond de l'accueil : le jeu de points à relier tracé en direct (canvas, voir dessinFond).
   « holy » au-dessus du texte, « skate » en dessous ; taille et position calculées en JS. */
.about-wrap > .fond {
  position: fixed; opacity: .4; pointer-events: none; z-index: 0;
}
.about-wrap > :not(.fond) { position: relative; z-index: 1; }
.about-wrap > .about-txt { position: absolute; }
.about-wrap .about-txt, .about-wrap .clock { text-shadow: 0 0 4px #fff, 0 0 8px #fff, 0 0 12px #fff; }
