/* Ombre & Sel — styles communs à toutes les pages.
   Direction : magazine de gastronomie. Fraunces (affichage) + Jost (texte).
   Thème sombre : charbon chaud, encre, cuivre, or patiné. Thème clair : papier crème, encre, cuivre. */

/* ---------- Polices auto-hébergées ---------- */
@font-face {
  font-family: "Fraunces";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("/fonts/fraunces-latin-full-normal.woff2") format("woff2-variations");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Fraunces";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("/fonts/fraunces-latin-ext-full-normal.woff2") format("woff2-variations");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Fraunces";
  font-style: italic;
  font-weight: 100 900;
  font-display: swap;
  src: url("/fonts/fraunces-latin-full-italic.woff2") format("woff2-variations");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Fraunces";
  font-style: italic;
  font-weight: 100 900;
  font-display: swap;
  src: url("/fonts/fraunces-latin-ext-full-italic.woff2") format("woff2-variations");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Jost";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("/fonts/jost-latin-wght-normal.woff2") format("woff2-variations");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Jost";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("/fonts/jost-latin-ext-wght-normal.woff2") format("woff2-variations");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

/* ---------- Couleurs ---------- */
:root {
  /* Thème clair : papier crème, encre, cuivre */
  --kit-bg: #f1e9db;
  --kit-fg: #1c1814;
  --kit-accent: #8e4421;
  --kit-surface: #faf5ec;
  --kit-line: rgba(28, 24, 20, 0.16);
  --kit-muted: #62544a;
  --bg-deep: #e8decd;
  --gold: #7a5c24;
  --on-accent: #fbf7ef;
  --stroke: #9c4f27;
  --stroke-ink: rgba(28, 24, 20, 0.55);
  --stroke-faint: rgba(28, 24, 20, 0.22);
  --glow: rgba(196, 122, 74, 0.34);
  --glow-2: rgba(205, 176, 122, 0.3);
  --header-bg: rgba(241, 233, 219, 0.82);
  --shadow: 0 30px 80px -40px rgba(60, 35, 15, 0.45);
  --grain-opacity: 0.07;
  --danger: #a3311b;
  --ok: #2f6a3f;

  --font-display: "Fraunces", "Iowan Old Style", Georgia, serif;
  --font-text: "Jost", "Avenir Next", "Segoe UI", system-ui, sans-serif;
  --wrap: 1240px;
  --gutter: clamp(16px, 5vw, 56px);
  --header-h: 76px;
  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
}
:root[data-theme="dark"] {
  /* Thème sombre : charbon chaud, encre, cuivre, or patiné */
  --kit-bg: #14100d;
  --kit-fg: #f0e7da;
  --kit-accent: #dd9a68;
  --kit-surface: #1e1915;
  --kit-line: rgba(240, 231, 218, 0.14);
  --kit-muted: #b5a693;
  --bg-deep: #0f0c0a;
  --gold: #cdb07a;
  --on-accent: #1a110b;
  --stroke: #d6915f;
  --stroke-ink: rgba(240, 231, 218, 0.55);
  --stroke-faint: rgba(240, 231, 218, 0.2);
  --glow: rgba(221, 140, 84, 0.3);
  --glow-2: rgba(205, 176, 122, 0.16);
  --header-bg: rgba(20, 16, 13, 0.78);
  --shadow: 0 40px 90px -40px rgba(0, 0, 0, 0.8);
  --grain-opacity: 0.09;
  --danger: #f0907a;
  --ok: #9fd3a8;
}

/* ---------- Base ---------- */
[hidden] {
  display: none !important;
}
*,
*::before,
*::after {
  box-sizing: border-box;
}
html {
  scroll-padding-top: calc(var(--header-h) + 16px);
}
body {
  margin: 0;
  min-height: 100vh;
  background: var(--kit-bg);
  color: var(--kit-fg);
  font-family: var(--font-text);
  font-weight: 380;
  font-size: clamp(16px, 0.25vw + 15px, 18px);
  line-height: 1.7;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
  transition:
    background-color 0.4s ease,
    color 0.4s ease;
}
/* Grain léger posé sur toute la page */
body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 70;
  pointer-events: none;
  background-image: url("/img/grain.svg");
  background-size: 220px 220px;
  opacity: var(--grain-opacity);
  mix-blend-mode: multiply;
}
:root[data-theme="dark"] body::after {
  mix-blend-mode: screen;
}
img,
svg {
  display: block;
  max-width: 100%;
}
a {
  color: inherit;
}
button,
input,
select,
textarea {
  font: inherit;
  color: inherit;
}
h1,
h2,
h3,
h4 {
  font-family: var(--font-display);
  font-weight: 340;
  line-height: 1.05;
  margin: 0;
  font-variation-settings: "SOFT" 60, "WONK" 0;
  letter-spacing: -0.015em;
  text-wrap: balance;
}
p {
  margin: 0 0 1em;
  text-wrap: pretty;
}
::selection {
  background: var(--kit-accent);
  color: var(--on-accent);
}

.wrap {
  width: 100%;
  max-width: calc(var(--wrap) + 2 * var(--gutter));
  margin-inline: auto;
  padding-inline: var(--gutter);
}

/* Petite étiquette éditoriale : italique serif, pas de capitales espacées */
.label {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 400;
  font-size: 1.02rem;
  color: var(--kit-accent);
  margin: 0 0 18px;
}
.label::before {
  content: "";
  width: 34px;
  height: 1px;
  background: currentColor;
  opacity: 0.7;
}

.lead {
  font-size: clamp(1.05rem, 0.4vw + 0.98rem, 1.22rem);
  color: var(--kit-muted);
  max-width: 58ch;
}
.muted {
  color: var(--kit-muted);
}
.filet {
  height: 1px;
  background: var(--kit-line);
  border: 0;
  margin: 0;
}

/* ---------- Boutons ---------- */
.btn {
  --pad-x: 26px;
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 48px;
  padding: 12px var(--pad-x);
  border-radius: 999px;
  border: 1px solid transparent;
  font-family: var(--font-text);
  font-weight: 500;
  font-size: 0.98rem;
  letter-spacing: 0.01em;
  text-decoration: none;
  cursor: pointer;
  isolation: isolate;
  overflow: hidden;
  transition:
    transform 0.35s var(--ease),
    background-color 0.3s ease,
    border-color 0.3s ease,
    color 0.3s ease,
    box-shadow 0.3s ease;
}
.btn--primary {
  background: var(--kit-accent);
  color: var(--on-accent);
  box-shadow: 0 16px 40px -18px var(--glow);
}
/* Reflet doré qui balaie le bouton au survol */
.btn--primary::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(110deg, transparent 30%, rgba(255, 236, 200, 0.35) 50%, transparent 70%);
  transform: translateX(-110%);
  transition: transform 0.7s var(--ease);
}
.btn--primary:hover::after {
  transform: translateX(110%);
}
.btn--ghost {
  border-color: var(--kit-line);
  background: transparent;
  color: var(--kit-fg);
}
.btn--ghost:hover {
  border-color: var(--kit-accent);
  color: var(--kit-accent);
}
.btn--quiet {
  background: transparent;
  color: var(--kit-fg);
  --pad-x: 14px;
}
.btn--quiet:hover {
  color: var(--kit-accent);
}
.btn--danger {
  background: var(--danger);
  color: var(--kit-bg);
}
.btn[disabled],
.btn[aria-disabled="true"] {
  opacity: 0.45;
  cursor: not-allowed;
  box-shadow: none;
}
.btn svg {
  width: 18px;
  height: 18px;
  flex: none;
}

/* Lien dont le souligné se trace au survol */
.trace-link {
  position: relative;
  text-decoration: none;
  background-image: linear-gradient(currentColor, currentColor);
  background-size: 0% 1px;
  background-position: 0 100%;
  background-repeat: no-repeat;
  transition:
    background-size 0.45s var(--ease),
    color 0.25s ease;
  padding-bottom: 2px;
}
.trace-link:hover,
.trace-link:focus-visible,
.trace-link[aria-current="page"] {
  background-size: 100% 1px;
}

/* ---------- En-tête ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--header-bg);
  backdrop-filter: blur(14px) saturate(1.2);
  -webkit-backdrop-filter: blur(14px) saturate(1.2);
  border-bottom: 1px solid transparent;
  transition:
    border-color 0.4s ease,
    background-color 0.4s ease;
}
.site-header.is-compact {
  border-bottom-color: var(--kit-line);
}
.site-header__in {
  display: flex;
  align-items: center;
  gap: 20px;
  height: var(--header-h);
  transition: height 0.4s var(--ease);
}
.site-header.is-compact .site-header__in {
  height: 62px;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  margin-right: auto;
  min-height: 44px;
}
.brand__mark {
  width: 34px;
  height: 34px;
  flex: none;
  transition: transform 0.6s var(--ease);
}
.brand:hover .brand__mark {
  transform: rotate(-35deg);
}
.brand__name {
  font-family: var(--font-display);
  font-size: 1.42rem;
  font-weight: 380;
  letter-spacing: -0.01em;
  font-variation-settings: "SOFT" 100, "WONK" 1;
  white-space: nowrap;
}
.brand__name em {
  font-style: italic;
  color: var(--kit-accent);
  font-weight: 300;
}

.nav {
  display: flex;
  align-items: center;
  gap: clamp(14px, 2vw, 30px);
}
.nav a {
  font-size: 0.95rem;
  font-weight: 420;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.nav a[aria-current="page"] {
  color: var(--kit-accent);
}
.badge {
  display: inline-grid;
  place-items: center;
  min-width: 22px;
  height: 22px;
  padding: 0 6px;
  border-radius: 999px;
  background: var(--kit-accent);
  color: var(--on-accent);
  font-size: 0.74rem;
  font-weight: 600;
  line-height: 1;
  transform-origin: center;
  transition:
    transform 0.4s var(--ease),
    opacity 0.3s ease;
}
.badge[hidden] {
  display: none;
}
.badge.is-bump {
  animation: badge-bump 0.6s var(--ease);
}
@keyframes badge-bump {
  40% {
    transform: scale(1.35);
  }
}
.site-header__actions {
  display: flex;
  align-items: center;
  gap: 10px;
}
.site-header .btn {
  min-height: 44px;
  --pad-x: 20px;
  font-size: 0.92rem;
}
.burger {
  display: none;
  width: 44px;
  height: 44px;
  border-radius: 999px;
  border: 1px solid var(--kit-line);
  background: var(--kit-surface);
  cursor: pointer;
  place-items: center;
}
.burger span {
  position: relative;
  display: block;
  width: 18px;
  height: 1.5px;
  background: currentColor;
  transition: background-color 0.2s ease;
}
.burger span::before,
.burger span::after {
  content: "";
  position: absolute;
  left: 0;
  width: 18px;
  height: 1.5px;
  background: currentColor;
  transition: transform 0.35s var(--ease);
}
.burger span::before {
  transform: translateY(-6px);
}
.burger span::after {
  transform: translateY(6px);
}
.burger[aria-expanded="true"] span {
  background: transparent;
}
.burger[aria-expanded="true"] span::before {
  transform: rotate(45deg);
}
.burger[aria-expanded="true"] span::after {
  transform: rotate(-45deg);
}

/* Menu mobile : glisse depuis le haut */
.mobile-nav {
  position: fixed;
  inset: 0;
  top: 0;
  z-index: 45;
  padding: calc(var(--header-h) + 40px) var(--gutter) 40px;
  background: var(--kit-bg);
  display: flex;
  flex-direction: column;
  gap: 6px;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-14px);
  transition:
    opacity 0.4s ease,
    transform 0.5s var(--ease),
    visibility 0s linear 0.5s;
}
.mobile-nav.is-open {
  opacity: 1;
  visibility: visible;
  transform: none;
  transition:
    opacity 0.4s ease,
    transform 0.5s var(--ease),
    visibility 0s;
}
.mobile-nav a:not(.btn) {
  font-family: var(--font-display);
  font-size: 2.2rem;
  font-weight: 320;
  text-decoration: none;
  padding: 6px 0;
  border-bottom: 1px solid var(--kit-line);
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.mobile-nav a[aria-current="page"] {
  color: var(--kit-accent);
}
.mobile-nav .btn {
  margin-top: 26px;
}
.mobile-nav__note {
  margin-top: auto;
  font-size: 0.9rem;
  color: var(--kit-muted);
}

@media (max-width: 960px) {
  .nav,
  .site-header__actions .btn {
    display: none;
  }
  .burger {
    display: inline-grid;
  }
  :root {
    --header-h: 66px;
  }
}
@media (min-width: 961px) {
  .mobile-nav {
    display: none;
  }
}

/* ---------- Illustrations au trait qui se dessinent ---------- */
.trace {
  fill: none;
  stroke: var(--stroke);
  stroke-width: 1.2;
  stroke-linecap: round;
  stroke-linejoin: round;
  overflow: visible;
}
.trace .ink {
  stroke: var(--stroke-ink);
}
.trace .faint {
  stroke: var(--stroke-faint);
}
.trace .fill {
  fill: var(--stroke);
  stroke: none;
}
.trace .fill-ink {
  fill: var(--stroke-ink);
  stroke: none;
}
.motion .trace [pathLength] {
  stroke-dasharray: 1;
}
/* Avant le dessin, les traits sont masqués ; le script les trace avec l'API Web Animations. */
.motion .trace:not(.is-drawn) [pathLength] {
  stroke-dashoffset: 1;
}
.motion .trace:not(.is-drawn) .fill,
.motion .trace:not(.is-drawn) .fill-ink {
  opacity: 0;
}

/* ---------- Lettres qui se révèlent une à une ---------- */
.split .w {
  display: inline-block;
  white-space: nowrap;
}
.split .l {
  display: inline-block;
}
.motion .split .l {
  opacity: 0;
  transform: translateY(0.45em) rotate(4deg);
  filter: blur(8px);
  transition:
    opacity 0.9s var(--ease-out),
    transform 1.1s var(--ease-out),
    filter 0.9s ease;
  transition-delay: calc(var(--i, 0) * 70ms + var(--base, 0ms));
}
.motion .split.is-in .l {
  opacity: 1;
  transform: none;
  filter: none;
}

/* ---------- En-tête de page intérieure ---------- */
.page-head {
  position: relative;
  padding: clamp(56px, 9vw, 120px) 0 clamp(36px, 5vw, 64px);
  overflow-x: clip;
}
.page-head__grid {
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(0, 0.7fr);
  gap: 40px;
  align-items: end;
}
.page-head h1 {
  font-size: clamp(3rem, 8vw, 7.4rem);
  font-weight: 300;
  font-variation-settings: "SOFT" 100, "WONK" 1, "opsz" 144;
  line-height: 0.95;
  margin-bottom: 22px;
}
.page-head__art {
  width: 100%;
  max-width: 320px;
  justify-self: end;
}
.page-head__glow {
  position: absolute;
  right: -10%;
  top: -30%;
  width: 60vw;
  height: 60vw;
  max-width: 760px;
  max-height: 760px;
  border-radius: 50%;
  background: radial-gradient(circle, var(--glow) 0%, transparent 62%);
  pointer-events: none;
  z-index: -1;
}
.motion .page-head__glow {
  animation: breathe 9s ease-in-out infinite alternate;
}
@media (max-width: 760px) {
  .page-head__grid {
    grid-template-columns: 1fr;
  }
  .page-head__art {
    display: none;
  }
}

@keyframes breathe {
  from {
    opacity: 0.65;
    transform: scale(0.94);
  }
  to {
    opacity: 1;
    transform: scale(1.06);
  }
}

/* ---------- Pied de page ---------- */
.site-footer {
  position: relative;
  margin-top: clamp(60px, 10vw, 120px);
  padding: clamp(56px, 8vw, 96px) 0 110px;
  background: var(--bg-deep);
  border-top: 1px solid var(--kit-line);
  font-size: 0.95rem;
}
.site-footer__grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: 40px;
}
.site-footer h2 {
  font-size: 1.15rem;
  font-style: italic;
  font-weight: 400;
  color: var(--kit-accent);
  margin-bottom: 14px;
}
.site-footer ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 4px;
}
.site-footer ul a {
  display: inline-flex;
  min-height: 32px;
  align-items: center;
}
.site-footer__brand .brand__name {
  font-size: 2rem;
}
.site-footer__brand p {
  margin-top: 16px;
  color: var(--kit-muted);
  max-width: 34ch;
}
.site-footer address {
  font-style: normal;
}
.site-footer__bottom {
  margin-top: 56px;
  padding-top: 26px;
  border-top: 1px solid var(--kit-line);
  display: flex;
  flex-wrap: wrap;
  gap: 14px 32px;
  justify-content: space-between;
  align-items: baseline;
  color: var(--kit-muted);
  font-size: 0.88rem;
}
.site-footer__bottom p {
  margin: 0;
}
.site-footer__bottom a {
  color: var(--kit-fg);
  text-underline-offset: 3px;
}
.site-footer .signe-binuxlabs {
  opacity: 1;
  color: var(--kit-muted);
}
@media (max-width: 900px) {
  .site-footer__grid {
    grid-template-columns: 1fr 1fr;
  }
  .site-footer__brand {
    grid-column: 1 / -1;
  }
}
@media (max-width: 480px) {
  .site-footer__grid {
    grid-template-columns: 1fr;
  }
}

/* ---------- Fenêtres (kit-dialog) ---------- */
dialog.kit-dialog {
  background: var(--kit-surface);
  border: 1px solid var(--kit-line);
}
.dialog__in {
  padding: clamp(24px, 4vw, 40px);
}
.dialog__in h2 {
  font-size: clamp(1.6rem, 3vw, 2.1rem);
  margin-bottom: 12px;
}
.dialog__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: flex-end;
  margin-top: 26px;
}

/* ---------- Champs de formulaire ---------- */
.field {
  display: grid;
  gap: 6px;
}
.field label,
.field .field__label {
  font-size: 0.92rem;
  font-weight: 500;
}
.field__hint {
  font-size: 0.85rem;
  color: var(--kit-muted);
}
.input {
  width: 100%;
  min-height: 50px;
  padding: 12px 16px;
  border-radius: 12px;
  border: 1px solid var(--kit-line);
  background: var(--kit-surface);
  transition:
    border-color 0.25s ease,
    box-shadow 0.25s ease;
}
textarea.input {
  min-height: 96px;
  resize: vertical;
  line-height: 1.5;
}
.input:hover {
  border-color: color-mix(in srgb, var(--kit-accent) 45%, var(--kit-line));
}
.input:focus {
  outline: none;
  border-color: var(--kit-accent);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--kit-accent) 20%, transparent);
}
.input[aria-invalid="true"] {
  border-color: var(--danger);
}
.field__error {
  font-size: 0.86rem;
  color: var(--danger);
  margin: 0;
}
.privacy {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  font-size: 0.86rem;
  color: var(--kit-muted);
  margin: 0;
}
.privacy svg {
  width: 18px;
  height: 18px;
  flex: none;
  margin-top: 2px;
  color: var(--kit-accent);
}

/* ---------- Divers ---------- */
.ornament {
  display: block;
  width: 120px;
  height: 18px;
  margin: 0 auto;
  color: var(--kit-accent);
}
@media (max-width: 560px) {
  body {
    font-size: 16px;
  }
}
