/* =========================================================
   laureasset.com · styles partagés
   Source : design-system.html (prioritaire).
   Utilisé par index.html et design-system.html.
   ========================================================= */
/* ---------- Tokens ---------- */
:root {
  /* 5 colors */
  --encre: #1C1B18;
  --gris: #5E5B53;
  --filet: #DEDBD3;
  --papier: #F4F3EF;
  --blanc: #FFFFFF;

  /* semantic tokens (light) */
  color-scheme: light;
  --bg: var(--papier);
  --text: var(--encre);
  --muted: var(--gris);
  --line: var(--filet);
  --surface: var(--blanc);
  --btn-bg: var(--encre);
  --btn-text: var(--papier);
  --head-bg: rgba(244, 243, 239, .86);

  /* type */
  --font-title: "Bricolage Grotesque", "Avenir Next", "Segoe UI", system-ui, sans-serif;
  --font-text: "Atkinson Hyperlegible Next", "Atkinson Hyperlegible", "Segoe UI", system-ui, sans-serif;

  /* 6 spacings */
  --s8: 8px; --s16: 16px; --s24: 24px; --s40: 40px; --s64: 64px; --s96: 96px;

  --content: 1000px;
  --radius: 16px;
  --gutter: 24px;

  box-sizing: border-box;
  padding-top: env(safe-area-inset-top, 0px);
  padding-bottom: env(safe-area-inset-bottom, 0px);
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --bg: var(--encre);
    --text: var(--papier);
    --muted: rgba(244, 243, 239, .72);
    --line: rgba(244, 243, 239, .16);
    --surface: rgba(244, 243, 239, .1);
    --btn-bg: var(--papier);
    --btn-text: var(--encre);
    --head-bg: rgba(28, 27, 24, .86);
  }
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: var(--encre);
  --text: var(--papier);
  --muted: rgba(244, 243, 239, .72);
  --line: rgba(244, 243, 239, .16);
  --surface: rgba(244, 243, 239, .1);
  --btn-bg: var(--papier);
  --btn-text: var(--encre);
  --head-bg: rgba(28, 27, 24, .86);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: calc(env(safe-area-inset-top, 0px) + 96px); }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font-family: var(--font-text); font-size: 18px; line-height: 28px;
  -webkit-font-smoothing: antialiased; overflow-x: clip;
}
body::before { content: ""; position: fixed; inset: 0 0 auto; height: env(safe-area-inset-top, 0px); z-index: 10; background: var(--head-bg); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); }
img { display: block; max-width: 100%; }
a { color: inherit; }
h1, h2, h3, p { margin: 0; }
:focus-visible { outline: 2px solid var(--text); outline-offset: 3px; border-radius: 6px; }
.wrap { width: min(var(--content), 100% - 2 * var(--gutter)); margin-inline: auto; }

/* Type styles */
.t-section { font-family: var(--font-title); font-weight: 700; font-size: 56px; line-height: 62px; letter-spacing: -.025em; }
.t-hero    { font-family: var(--font-title); font-weight: 700; font-size: 48px; line-height: 56px; letter-spacing: -.025em; }
.t-card    { font-family: var(--font-title); font-weight: 700; font-size: 40px; line-height: 46px; letter-spacing: -.025em; }
.t-lead    { font-family: var(--font-title); font-weight: 600; font-size: 28px; line-height: 36px; }
.t-block   { font-family: var(--font-title); font-weight: 600; font-size: 22px; line-height: 28px; }
.t-m       { font-size: 16px; line-height: 24px; }
.t-s       { font-size: 14px; line-height: 20px; }
.t-body    { font-size: 18px; line-height: 28px; }
.t-label   { font-size: 14px; line-height: 20px; font-weight: 700; }
.t-btn     { font-size: 16px; line-height: 16px; font-weight: 700; }

/* Buttons: one size, 3 styles */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  height: 44px; padding: 0 22px; border-radius: 999px;
  font: 700 16px/16px var(--font-text); text-decoration: none; white-space: nowrap;
  border: 1px solid transparent; transition: opacity .15s, background-color .15s;
}
.btn-short { display: none; }
.btn-primary { background: var(--btn-bg); color: var(--btn-text); }
.btn-primary:hover { opacity: .86; }
.btn-secondary { border-color: var(--text); color: var(--text); }
.btn-secondary:hover { background: var(--surface); }
.btn-disabled {
  background: rgba(255, 255, 255, .16); color: rgba(255, 255, 255, .72);
  -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); cursor: default;
}

/* Pills: one color, 2 sizes */
.pill { display: inline-flex; align-items: center; gap: 6px; height: 32px; padding: 0 12px 0 4px; border-radius: 999px; background: var(--blanc); color: var(--encre); font-weight: 700; font-size: 18px; line-height: 24px; white-space: nowrap; vertical-align: middle; }
.pill img { width: 24px; height: 24px; border-radius: 10px; }
.pill-s { height: 24px; gap: 4px; padding: 0 8px 0 3px; font-size: 14px; line-height: 20px; }
.pill-s img { width: 16px; height: 16px; border-radius: 7.5px; }

/* ---------- Header ---------- */
/* L'en-tête s'adapte à sa propre largeur (container query) :
   la même règle sert au site et à l'aperçu mobile du design system. */
.site-head { container-type: inline-size; position: sticky; top: env(safe-area-inset-top, 0px); z-index: 20; background: var(--head-bg); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); }
.site-head .wrap { display: flex; align-items: center; gap: var(--s16); height: 84px; }
.logo { margin-right: auto; font-family: var(--font-title); font-weight: 600; font-size: 18px; line-height: 24px; text-decoration: none; }
.logo span { color: var(--muted); font-weight: 400; }
.theme { display: inline-flex; gap: 2px; height: 44px; padding: 5px 6px; border: 1px solid var(--line); border-radius: 999px; }
.theme button { display: grid; place-items: center; width: 32px; height: 32px; padding: 0; border: 0; border-radius: 999px; background: transparent; color: var(--muted); cursor: pointer; }
.theme button:hover { color: var(--text); }
.theme button[aria-pressed="true"] { background: var(--surface); color: var(--text); box-shadow: 0 1px 3px rgba(0, 0, 0, .1), 0 0 0 .5px rgba(0, 0, 0, .06); }
:root[data-theme="dark"] .theme button[aria-pressed="true"] { box-shadow: none; }
.theme svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

/* ---------- Éléments partagés ---------- */
.label { display: flex; align-items: center; gap: var(--s8); }
.label svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.identity { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s8); }
.identity .avatar { width: 40px; height: 40px; border-radius: 50%; }
.identity b { font-weight: 700; }

/* ---------- Carte de projet ----------
   L'image couvre toute la carte et reste ancrée à droite.
   Couleur du dégradé tirée de l'image : style="--tint: R, G, B" sur la carte.
   Le texte est fixe : même taille, même largeur, même position à tous les écrans. */
.card {
  --tint: 28, 27, 24;
  position: relative; isolation: isolate; display: flex; min-height: 556px;
  border-radius: var(--radius); overflow: hidden; color: var(--blanc);
  background: rgb(var(--tint));
}
.card-media {
  position: absolute; inset: 0; z-index: 0;
  background-image: var(--img);
  background-size: cover;
  background-position: right center;
  background-repeat: no-repeat;
}
.card-media::after {
  /* Dégradé de gauche : plein, puis 80 % au point A, transparent au point B.
     A et B ne descendent jamais sous 300 px et 520 px : plus la carte est
     étroite, plus le dégradé couvre de place. Entre A et B, la courbe ralentit
     en douceur (paliers intermédiaires) pour qu'aucune limite ne se voie. */
  --a: max(30%, 300px);
  --b: max(65%, 520px);
  content: ""; position: absolute; inset: 0;
  background:
    linear-gradient(90deg,
      rgb(var(--tint)) 0%,
      rgba(var(--tint), .8) var(--a),
      rgba(var(--tint), .56) calc(var(--a) + (var(--b) - var(--a)) * .25),
      rgba(var(--tint), .32) calc(var(--a) + (var(--b) - var(--a)) * .5),
      rgba(var(--tint), .13) calc(var(--a) + (var(--b) - var(--a)) * .75),
      rgba(var(--tint), 0) var(--b));
}
.card-body {
  /* Zone de texte de 380 px (marges comprises) : 40 + 332 + 8.
     Fixe dès que la carte fait 380 px de large (écran d'environ 420 px). */
  position: relative; z-index: 2; min-width: 0;
  width: min(380px, 100%);
  padding: var(--s24) var(--s8) var(--s40) var(--s40);
  display: flex; flex-direction: column; justify-content: flex-end;
}
.card-logo { height: 36px; width: auto; align-self: flex-start; }
.card-sub { margin-top: var(--s8); display: flex; align-items: center; gap: var(--s8); }
.card .t-card { margin-top: var(--s40); font-size: 40px; line-height: 46px; }
.card .stake { margin-top: var(--s8); color: var(--blanc); }
.card .btn {
  margin-top: var(--s40); align-self: flex-start; max-width: 100%;
  height: auto; min-height: 44px; padding-block: 12px;
  white-space: normal; text-align: center; line-height: 20px;
}
.card .context { margin-top: var(--s64); color: rgba(255, 255, 255, .72); }

footer { border-top: 1px solid var(--line); padding: var(--s24) 0 var(--s40); color: var(--muted); }
footer .wrap { display: flex; flex-wrap: wrap; justify-content: space-between; gap: var(--s8) var(--s24); }

/* ---------- Mobile (partagé) ---------- */
@media (max-width: 760px) {
  :root { --gutter: 20px; }
  .t-section { font-size: 40px; line-height: 46px; }
  .t-card { font-size: 28px; line-height: 34px; }
  .t-lead { font-size: 22px; line-height: 28px; }
  .identity { font-size: 16px; line-height: 24px; }
}

/* ---------- En-tête compact (largeur de l'en-tête ≤ 760 px) ---------- */
@container (max-width: 760px) {
  .site-head .wrap { --gutter: 20px; height: 68px; gap: var(--s8); }
  .site-head .logo { font-size: 16px; line-height: 20px; }
  .site-head .btn { height: 36px; padding: 0 14px; font-size: 14px; }
  .site-head .btn-long { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  .site-head .btn-short { display: inline; }
  .site-head .theme { height: 36px; padding: 3px 4px; }
  .site-head .theme button { width: 28px; height: 28px; }
  .site-head .theme svg { width: 16px; height: 16px; }
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
