/* geraldmetroz.ch — feuille de style unique, sans dépendance.
   Palette : encre quasi noire, papier chaud, un seul accent rouge (#EA1821)
   repris du site Joomla d'origine. */

:root {
  --accent:        #EA1821;
  --accent-dark:   #B90F17;

  --ink:           #16130F;
  --ink-soft:      #46403A;
  --muted:         #7A736B;

  --paper:         #FBF8F4;
  --surface:       #FFFFFF;
  --panel:         #F1ECE5;
  --rule:          #E0D8CE;
  --rule-firm:     #C6BCAF;

  --f-display: "Helvetica Neue", -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
  --f-body:    Charter, "Bitstream Charter", "Iowan Old Style", Georgia, "Times New Roman", serif;
  --f-data:    ui-monospace, "SF Mono", SFMono-Regular, Menlo, Consolas, monospace;

  --measure: 34rem;
  --gutter: clamp(1.25rem, 4vw, 3rem);
  --wide: 72rem;
}

@media (prefers-color-scheme: dark) {
  :root {
    --ink:       #F0EBE4;
    --ink-soft:  #C3BBB1;
    --muted:     #8F877D;
    --paper:     #131110;
    --surface:   #1B1917;
    --panel:     #232019;
    --rule:      #322D27;
    --rule-firm: #4A433A;
    --accent:      #FF4A44;
    --accent-dark: #FF6B62;
  }
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--f-body);
  font-size: clamp(1rem, 0.97rem + 0.18vw, 1.125rem);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; display: block; }

address, .addr { font-style: normal; }

a { color: inherit; }

a:focus-visible,
button:focus-visible,
summary:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 3px;
  border-radius: 2px;
}

.skip {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--accent);
  color: #fff;
  padding: 0.75rem 1.25rem;
  z-index: 100;
  font-family: var(--f-display);
}
.skip:focus { left: 0; }

/* ---------- shell ---------- */

.wrap {
  width: 100%;
  max-width: var(--wide);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.measure { max-width: var(--measure); }

/* ---------- header ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: color-mix(in srgb, var(--paper) 92%, transparent);
  backdrop-filter: saturate(1.4) blur(10px);
  border-bottom: 1px solid var(--rule);
}

.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 4.25rem;
}

.brand {
  font-family: var(--f-display);
  font-weight: 700;
  font-size: 1rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  text-decoration: none;
  white-space: nowrap;
}

.brand .dot { color: var(--accent); }

nav.primary { display: flex; align-items: center; gap: clamp(0.75rem, 2vw, 1.75rem); }

nav.primary a {
  font-family: var(--f-display);
  font-size: 0.8125rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--ink-soft);
  padding: 0.35rem 0;
  border-bottom: 2px solid transparent;
  white-space: nowrap;
}

nav.primary a:hover { color: var(--ink); }
nav.primary a[aria-current="page"] { color: var(--ink); border-bottom-color: var(--accent); }

.lang {
  font-family: var(--f-data);
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  text-decoration: none;
  color: var(--muted);
  border: 1px solid var(--rule-firm);
  padding: 0.25rem 0.5rem;
  border-radius: 2px;
}
.lang:hover { color: var(--ink); border-color: var(--ink); }

.nav-toggle {
  display: none;
  background: none;
  border: 1px solid var(--rule-firm);
  border-radius: 2px;
  padding: 0.4rem 0.6rem;
  font-family: var(--f-display);
  font-size: 0.75rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink);
  cursor: pointer;
}

@media (max-width: 47rem) {
  .nav-toggle { display: inline-block; }
  nav.primary {
    display: none;
    position: absolute;
    inset-inline: 0;
    top: 100%;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    background: var(--surface);
    border-bottom: 1px solid var(--rule);
    padding: 0.5rem var(--gutter) 1rem;
  }
  nav.primary.open { display: flex; }
  nav.primary a { padding: 0.7rem 0; border-bottom: 1px solid var(--rule); font-size: 0.9375rem; }
  nav.primary a[aria-current="page"] { border-bottom-color: var(--accent); }
  .site-header .wrap { position: relative; }
}

/* ---------- hero ---------- */

.hero {
  position: relative;
  min-height: min(78vh, 40rem);
  display: grid;
  align-items: end;
  /* Le visage se trouve à ~62 % en largeur et ~22 % en hauteur de la photo.
     Un cadrage centré lui coupe le sommet du crâne : on ancre donc le
     recadrage sur le visage plutôt qu'au centre de l'image. */
  /* L'image est déclarée ici et non en attribut `style` : la Content-Security-Policy
     du site interdit les styles en ligne. `url()` se résout depuis la feuille de
     style, donc ce chemin relatif vaut pour /index.html comme pour /en/index.html. */
  background: #100E0C url(../img/hero-gerald.jpg) 62% 18% / cover no-repeat;
  color: #fff;
  isolation: isolate;
}

.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  /* Voile quasi nul sur le haut, où se trouve le visage ; il ne s'assombrit
     que dans le bas, là où le titre a besoin de contraste. */
  background: linear-gradient(180deg,
    rgba(12,10,9,0.05) 0%,
    rgba(12,10,9,0.10) 42%,
    rgba(12,10,9,0.55) 74%,
    rgba(12,10,9,0.88) 100%);
  z-index: -1;
}

.hero .wrap { padding-block: clamp(3rem, 10vh, 6rem); }

.hero h1 {
  font-family: var(--f-display);
  font-weight: 800;
  font-size: clamp(2.5rem, 9vw, 5.5rem);
  line-height: 0.95;
  letter-spacing: -0.03em;
  text-transform: uppercase;
  margin: 0 0 0.75rem;
  text-wrap: balance;
}

.hero p.tagline {
  font-family: var(--f-display);
  font-size: clamp(0.875rem, 2.2vw, 1.125rem);
  letter-spacing: 0.22em;
  text-transform: uppercase;
  margin: 0;
  color: rgba(255,255,255,0.88);
}

.hero .rule {
  width: 4rem;
  height: 4px;
  background: var(--accent);
  margin: 1.5rem 0 0;
}

/* ---------- page head ---------- */

.page-head {
  padding-block: clamp(2.5rem, 7vw, 4.5rem) clamp(1.5rem, 4vw, 2.5rem);
  border-bottom: 1px solid var(--rule);
}

.page-head h1 {
  font-family: var(--f-display);
  font-weight: 800;
  font-size: clamp(2rem, 5.5vw, 3.25rem);
  line-height: 1.05;
  letter-spacing: -0.025em;
  margin: 0 0 0.75rem;
  text-wrap: balance;
}

.page-head p { color: var(--ink-soft); margin: 0; max-width: var(--measure); }

/* ---------- sections ---------- */

section.band { padding-block: clamp(2.75rem, 8vw, 5rem); }
section.band + section.band { border-top: 1px solid var(--rule); }
section.band.tint { background: var(--panel); }

h2 {
  font-family: var(--f-display);
  font-weight: 750;
  font-size: clamp(1.375rem, 3.2vw, 2rem);
  line-height: 1.15;
  letter-spacing: -0.02em;
  margin: 0 0 1.25rem;
  text-wrap: balance;
}

h3 {
  font-family: var(--f-display);
  font-weight: 700;
  font-size: 1.125rem;
  letter-spacing: -0.01em;
  margin: 0 0 0.5rem;
}

.eyebrow {
  font-family: var(--f-data);
  font-size: 0.6875rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--accent);
  margin: 0 0 0.75rem;
}

p { margin: 0 0 1rem; max-width: var(--measure); }
p:last-child { margin-bottom: 0; }

.lede { font-size: 1.15em; color: var(--ink-soft); }

/* ---------- buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--f-display);
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  text-decoration: none;
  padding: 0.75rem 1.35rem;
  border: 2px solid var(--accent);
  background: var(--accent);
  color: #fff;
  border-radius: 2px;
  transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}
.btn:hover { background: var(--accent-dark); border-color: var(--accent-dark); }

.btn.ghost { background: transparent; color: var(--ink); border-color: var(--rule-firm); }
.btn.ghost:hover { border-color: var(--ink); background: transparent; }

.btn[aria-disabled="true"] {
  background: transparent;
  color: var(--muted);
  border-color: var(--rule-firm);
  border-style: dashed;
  cursor: default;
  pointer-events: none;
}

/* ---------- featured book ---------- */

.feature {
  display: grid;
  grid-template-columns: minmax(0, 20rem) minmax(0, 1fr);
  gap: clamp(1.5rem, 5vw, 3.5rem);
  align-items: center;
}

.feature img { box-shadow: 0 1.25rem 3rem rgba(20, 15, 10, 0.22); border-radius: 2px; }

@media (max-width: 47rem) {
  .feature { grid-template-columns: 1fr; }
  .feature .art { max-width: 15rem; }
}

/* ---------- works grid ---------- */

.works { display: grid; gap: clamp(1.5rem, 4vw, 2.5rem); }

.work {
  display: grid;
  grid-template-columns: minmax(0, 15rem) minmax(0, 1fr);
  gap: clamp(1.25rem, 4vw, 2.5rem);
  padding-block: clamp(1.5rem, 4vw, 2.5rem);
  border-top: 1px solid var(--rule);
  align-items: start;
}
.works .work:first-child { border-top: none; padding-top: 0; }

.work .art img { border-radius: 2px; box-shadow: 0 0.75rem 2rem rgba(20, 15, 10, 0.16); }

.work .kind {
  font-family: var(--f-data);
  font-size: 0.6875rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0 0 0.35rem;
}

.work h2 { font-size: clamp(1.25rem, 2.6vw, 1.625rem); margin-bottom: 0.75rem; }

.work .price {
  font-family: var(--f-data);
  font-variant-numeric: tabular-nums;
  font-size: 0.9375rem;
  color: var(--ink-soft);
  margin: 1rem 0 0.85rem;
}

.buy-row { display: flex; flex-wrap: wrap; gap: 0.75rem; align-items: center; margin-top: 0.5rem; }

details.twint { margin-top: 1rem; }
details.twint summary {
  cursor: pointer;
  font-family: var(--f-display);
  font-size: 0.8125rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-soft);
}
details.twint summary:hover { color: var(--ink); }
details.twint .qr { margin-top: 0.85rem; max-width: 11rem; }
details.twint .qr img { border: 1px solid var(--rule); border-radius: 2px; }
details.twint p { font-size: 0.875rem; color: var(--muted); margin-top: 0.5rem; }

@media (max-width: 40rem) {
  .work { grid-template-columns: 1fr; }
  .work .art { max-width: 12rem; }
}

/* ---------- timeline ---------- */

.timeline { list-style: none; margin: 0; padding: 0; }

.timeline li {
  display: grid;
  grid-template-columns: 7.5rem minmax(0, 1fr);
  gap: 1.5rem;
  padding-block: 0.9rem;
  border-top: 1px solid var(--rule);
  align-items: baseline;
}
.timeline li:first-child { border-top: none; }

.timeline .year {
  font-family: var(--f-data);
  font-variant-numeric: tabular-nums;
  font-size: 0.875rem;
  letter-spacing: 0.04em;
  color: var(--accent);
  font-weight: 600;
}

.timeline .event { max-width: var(--measure); }

@media (max-width: 34rem) {
  .timeline li { grid-template-columns: 1fr; gap: 0.15rem; }
}

/* ---------- press ---------- */

.press { list-style: none; margin: 0; padding: 0; }

.press li { border-top: 1px solid var(--rule); }
.press li:first-child { border-top: none; }

.press a,
.press .gone > div {
  display: grid;
  grid-template-columns: 6.5rem 9rem minmax(0, 1fr);
  gap: 1.25rem;
  padding-block: 1rem;
  text-decoration: none;
  align-items: baseline;
}
.press a:hover .headline { color: var(--accent); text-decoration: underline; text-underline-offset: 3px; }

.press .gone .headline { color: var(--ink-soft); }
.press .gone .note {
  grid-column: 3;
  font-family: var(--f-data);
  font-size: 0.6875rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
}

.press .date {
  font-family: var(--f-data);
  font-variant-numeric: tabular-nums;
  font-size: 0.8125rem;
  color: var(--muted);
}

.press .outlet {
  font-family: var(--f-display);
  font-size: 0.75rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-soft);
}

.press .headline { color: var(--ink); }

@media (max-width: 47rem) {
  .press a,
  .press .gone > div { grid-template-columns: 1fr; gap: 0.2rem; padding-block: 1.1rem; }
  .press .gone .note { grid-column: 1; }
}

/* ---------- videos ---------- */

.videos {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 20rem), 1fr));
  gap: clamp(1rem, 3vw, 1.75rem);
  /* borne la largeur pour qu'une vidéo seule ne s'étale pas sur tout l'écran */
  max-width: 48rem;
}

.ratio {
  position: relative;
  padding-top: 56.25%;
  background: var(--panel);
  border-radius: 2px;
  overflow: hidden;
}
.ratio iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }

/* ---------- contact ---------- */

.contact-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 15rem), 1fr));
  gap: clamp(1.5rem, 4vw, 2.5rem);
}

.contact-card .eyebrow { color: var(--muted); }
.contact-card .value { font-size: 1.0625rem; }
.contact-card a { text-decoration-color: var(--rule-firm); text-underline-offset: 3px; }
.contact-card a:hover { color: var(--accent); }

/* ---------- social ---------- */

.social { display: flex; flex-wrap: wrap; gap: 0.6rem; padding: 0; margin: 0; list-style: none; }

.social a {
  display: inline-block;
  font-family: var(--f-display);
  font-size: 0.75rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  text-decoration: none;
  padding: 0.5rem 0.9rem;
  border: 1px solid var(--rule-firm);
  border-radius: 2px;
  color: var(--ink-soft);
}
.social a:hover { border-color: var(--accent); color: var(--accent); }

/* ---------- footer ---------- */

.site-footer {
  border-top: 1px solid var(--rule);
  padding-block: clamp(2rem, 5vw, 3rem);
  margin-top: clamp(2rem, 6vw, 4rem);
  background: var(--panel);
}

.site-footer .cols {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 14rem), 1fr));
  gap: 1.75rem;
  align-items: start;
}

.site-footer .note {
  font-size: 0.8125rem;
  color: var(--muted);
  margin-top: 1.75rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--rule);
  max-width: none;
}

.site-footer a { text-decoration-color: var(--rule-firm); text-underline-offset: 3px; }
.site-footer a:hover { color: var(--accent); }

.site-footer .addr { color: var(--ink-soft); }

/* ---------- utilitaires ----------
   Le strict nécessaire pour se passer d'attributs `style` en ligne, que la
   Content-Security-Policy du site bloque. */

.stack-sm { margin-top: 0.75rem; }
.stack-md { margin-top: 1.25rem; }
.stack-lg { margin-top: 1.5rem; }
.stack-xl { margin-top: 2rem; }

.subtle { color: var(--muted); }

.portrait { border-radius: 2px; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}
