/* Ta Trace — socle de recette (B0). Jetable : sert à juger 3 partis de hero. */

:root {
  --calcaire: #F2EEE6;
  --encre:    #14100C;
  --mer:      #1B4D63;
  --ocre:     #B5702F;
  --braise:   #C4632A;
  --nuit:     #0B0D0C;

  --serif: "Instrument Serif", Georgia, serif;
  --sans:  "Inter", -apple-system, BlinkMacSystemFont, system-ui, sans-serif;
  --mono:  "Space Mono", ui-monospace, Menlo, monospace;

  --gutter: clamp(1rem, 5vw, 5rem);
}

* { margin: 0; padding: 0; box-sizing: border-box; }

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

body {
  font-family: var(--sans);
  background: var(--nuit);
  color: var(--calcaire);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

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

/* ---- Hero, ossature commune ---------------------------------------- */

.hero {
  position: relative;
  min-height: 100svh;
  display: flex;
  overflow: hidden;
  isolation: isolate;
}

/* Sans ça, un enfant large (titre nowrap, table) impose sa largeur au conteneur
   flex/grid et fait déborder toute la colonne hors du viewport. */
.hero > * { min-width: 0; max-width: 100%; }

.hero__media {
  position: absolute;
  inset: 0;
  z-index: -2;
}

.hero__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero__veil {
  position: absolute;
  inset: 0;
  z-index: -1;
}

/* Grain — texture fine, évite l'aplat numérique sur les dégradés */
.grain {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  opacity: .22;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='3'/%3E%3C/filter%3E%3Crect width='180' height='180' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* ---- Typographie partagée ------------------------------------------ */

.wordmark {
  font-family: var(--serif);
  font-weight: 400;
  line-height: .84;
  letter-spacing: -.02em;
  text-wrap: balance;
}

.kicker {
  font-family: var(--mono);
  font-size: clamp(.62rem, 1.5vw, .78rem);
  letter-spacing: .24em;
  text-transform: uppercase;
}

.baseline {
  font-size: clamp(1rem, 2.2vw, 1.3rem);
  line-height: 1.5;
  font-weight: 400;
  max-width: 34ch;
  text-wrap: pretty;
}

/* ---- Repères chiffrés ----------------------------------------------- */

.facts {
  display: flex;
  flex-wrap: wrap;
  gap: 0;
  list-style: none;
  font-family: var(--mono);
  font-size: clamp(.68rem, 1.6vw, .8rem);
  letter-spacing: .08em;
}

.facts li {
  padding: 0 clamp(.8rem, 2.4vw, 1.6rem);
  border-left: 1px solid currentColor;
  opacity: .82;
  white-space: nowrap;
}

.facts li:first-child { padding-left: 0; border-left: 0; }

/* ---- Boutons --------------------------------------------------------- */

.btn {
  display: inline-flex;
  align-items: center;
  gap: .7em;
  padding: 1.05em 2em;
  font-family: var(--mono);
  font-size: clamp(.7rem, 1.6vw, .8rem);
  letter-spacing: .16em;
  text-transform: uppercase;
  text-decoration: none;
  border: 1px solid currentColor;
  color: inherit;
  background: transparent;
  cursor: pointer;
  transition: background .35s ease, color .35s ease;
}

.btn:hover, .btn:focus-visible {
  background: var(--calcaire);
  color: var(--encre);
}

.btn--solid {
  background: var(--encre);
  color: var(--calcaire);
  border-color: var(--encre);
}

.btn--solid:hover, .btn--solid:focus-visible {
  background: transparent;
  color: var(--encre);
}

.btn__arrow { transition: transform .35s ease; }
.btn:hover .btn__arrow { transform: translateX(.35em); }

/* ---- Entrée en scène -------------------------------------------------- */

.rise {
  opacity: 0;
  transform: translateY(1.4rem);
  animation: rise .95s cubic-bezier(.16, 1, .3, 1) forwards;
}

.rise:nth-child(1) { animation-delay: .10s; }
.rise:nth-child(2) { animation-delay: .20s; }
.rise:nth-child(3) { animation-delay: .30s; }
.rise:nth-child(4) { animation-delay: .40s; }
.rise:nth-child(5) { animation-delay: .50s; }

@keyframes rise {
  to { opacity: 1; transform: none; }
}

/* ---- Crédit photo ----------------------------------------------------- */

.credit {
  position: absolute;
  right: var(--gutter);
  bottom: 1rem;
  z-index: 3;
  font-family: var(--mono);
  font-size: .55rem;
  letter-spacing: .1em;
  opacity: .4;
  text-decoration: none;
  color: inherit;
}

.credit:hover { opacity: .8; }

/* ---- Barre de recette (hors maquette) --------------------------------- */

.recette-bar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: .5rem clamp(.8rem, 3vw, 1.6rem);
  background: rgba(11, 13, 12, .82);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid rgba(242, 238, 230, .14);
  font-family: var(--mono);
  font-size: .64rem;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--calcaire);
}

.recette-bar a { color: inherit; text-decoration: none; opacity: .6; }
.recette-bar a:hover { opacity: 1; }
.recette-bar strong { font-weight: 700; letter-spacing: .1em; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
  .rise { opacity: 1; transform: none; }
}
