/* Baron Creation — carte de visite. Aucune dependance externe. */

/* ---------- Polices auto-hebergees (OFL), sous-ensemble latin ---------- */
@font-face {
  font-family: 'Instrument Serif';
  src: url('../fonts/instrument-serif-400.woff2') format('woff2');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Inter var';
  src: url('../fonts/inter-var.woff2') format('woff2');
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

/* ---------- Jetons ---------- */
:root {
  --paper:        #e6dfd1;   /* le bureau */
  --paper-deep:   #d6cdba;   /* son ombre aux bords */
  --card:         #fbf9f4;   /* la carte */
  --card-edge:    #eae4d7;   /* sa tranche */
  --ink:          #1c1915;
  --ink-soft:     #6a6153;
  --ink-faint:    #9a9081;
  --rule:         rgba(28, 25, 21, 0.14);

  --serif: 'Instrument Serif', 'Iowan Old Style', Georgia, 'Times New Roman', serif;
  --sans:  'Inter var', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;

  --measure: 38rem;
  --pad: clamp(1.25rem, 5vw, 2.5rem);
}

/* Le grain du papier : bruit SVG, aucun fichier a charger. */
:root {
  --grain: 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='0.82' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='180' height='180' filter='url(%23n)' opacity='0.5'/%3E%3C/svg%3E");
}

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

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

body {
  margin: 0;
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.65;
  color: var(--ink);
  background-color: var(--paper);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* Le papier tient en deux couches fixes : la lumiere, puis le grain.
   Deux elements plutot que background-attachment: fixed, que iOS ignore. */
body::before,
body::after {
  content: '';
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
}

/* La lumiere du bureau : elle vient du haut, l'ombre s'accumule en bas. */
body::before {
  background-image:
    radial-gradient(120% 90% at 50% -10%, rgba(255, 253, 247, 0.85), rgba(255, 253, 247, 0) 62%),
    radial-gradient(100% 100% at 50% 120%, rgba(120, 104, 78, 0.16), rgba(120, 104, 78, 0) 60%);
}

/* Le grain du papier. */
body::after {
  background-image: var(--grain);
  opacity: 0.42;
  mix-blend-mode: multiply;
}

body > * { position: relative; z-index: 1; }

a { color: inherit; }

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

/* Le focus doit rester visible : liens de contact et App Store s'atteignent au clavier. */
:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 3px;
  border-radius: 2px;
}

.nowrap { white-space: nowrap; }

.visually-hidden {
  position: absolute;
  width: 1px; height: 1px;
  margin: -1px; padding: 0;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

/* ---------- Micro-capitales : la voix secondaire de la carte ---------- */
.caps {
  font-size: 0.6875rem;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-faint);
}

/* ---------- Pied de page ---------- */
.foot {
  max-width: 46rem;
  margin: 0 auto;
  padding: 0 var(--pad) clamp(2.5rem, 8vw, 4rem);
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.5rem 1.5rem;
  border-top: 1px solid var(--rule);
  padding-top: 1.75rem;
}
.foot nav { display: flex; flex-wrap: wrap; gap: 1.25rem; }
.foot a { text-decoration: none; }
.foot a:hover { color: var(--ink-soft); }

/* ---------- Pages legales : le verso du meme document ---------- */
.doc {
  max-width: var(--measure);
  margin: 0 auto;
  padding: clamp(3rem, 9vw, 5.5rem) var(--pad) clamp(2rem, 6vw, 3rem);
}

.doc__back {
  display: inline-block;
  margin-bottom: clamp(2rem, 6vw, 3rem);
  text-decoration: none;
}
.doc__back:hover .caps { color: var(--ink-soft); }

.doc h1 {
  margin: 0 0 2.5rem;
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(2.25rem, 7vw, 3rem);
  line-height: 1.05;
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.8);
}

.doc h2 {
  margin: 2.75rem 0 0.75rem;
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: -0.005em;
}

.doc p, .doc li { color: var(--ink-soft); }
.doc p { margin: 0 0 1rem; }
.doc ul { margin: 0 0 1rem; padding-left: 1.15rem; }
.doc li { margin-bottom: 0.4rem; }
.doc strong { color: var(--ink); font-weight: 600; }
.doc code {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.875em;
  padding: 0.1em 0.35em;
  border-radius: 3px;
  background: rgba(28, 25, 21, 0.06);
}

/* Le bloc d'identite de l'editeur, cale comme un tampon sur la page. */
.doc__block {
  margin: 0 0 1rem;
  padding: 1rem 1.5rem;
  border-left: 2px solid var(--rule);
  color: var(--ink-soft);
  line-height: 1.7;
  text-wrap: pretty;
}
.doc__block strong { display: block; }

.doc__updated {
  margin-top: -1.75rem;
  margin-bottom: 2.5rem;
}

