/* BeanGo · cartes de visite virtuelles
   Couleurs de la charte (fiche 02). Pour passer à une autre palette,
   ne modifier que ce bloc. */
:root {
  --espresso: #2B1D17;     /* fonds sombres, textes */
  --beige: #F1E7D6;        /* textes sur fond sombre, pastilles */
  --cream: #F6EEE0;        /* fond de page */
  --paper: #FFFDF9;        /* lignes de contact */
  --line: #E6D8C2;         /* bordures */
  --muted: #6B5447;        /* textes secondaires (7:1 sur --paper) */
  --terracotta: #B4532F;   /* bouton principal, icônes (5:1 avec blanc) */
  --terracotta-light: #C8643C; /* « Go » sur fond espresso */
  --radius: 16px;
}

@font-face { font-family: "Fraunces BG"; src: url("/assets/fonts/fraunces-500.woff2") format("woff2"); font-weight: 500; font-display: swap; }
@font-face { font-family: "Outfit BG"; src: url("/assets/fonts/outfit-var.woff2") format("woff2"); font-weight: 400 600; font-display: swap; }
@font-face { font-family: "Khmer BG"; src: url("/assets/fonts/kantumruy-khmer.woff2") format("woff2"); font-weight: 400 600; font-display: swap; unicode-range: U+1780-17FF, U+19E0-19FF, U+200B-200D, U+25CC; }
@font-face { font-family: "Khmer Serif BG"; src: url("/assets/fonts/notoserifkhmer-brand.woff2") format("woff2"); font-weight: 500; font-display: swap; unicode-range: U+1780-17FF, U+200B-200D; }

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  min-height: 100vh;
  background: var(--cream);
  color: var(--espresso);
  font-family: "Outfit BG", "Khmer BG", system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: 17px;
  line-height: 1.5;
}
:lang(km) { line-height: 1.75; }
a { color: inherit; }

/* Langue : on n'affiche que les textes de la langue choisie */
html[data-lang="en"] .t[lang="km"],
html[data-lang="km"] .t[lang="en"] { display: none; }

.card {
  max-width: 460px;
  margin: 0 auto;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--cream);
}
@media (min-width: 520px) {
  body { padding: 32px 0; }
  .card { min-height: auto; border-radius: 24px; overflow: hidden; box-shadow: 0 1px 2px rgba(43,29,23,.06), 0 12px 40px rgba(43,29,23,.10); }
}

/* En-tête espresso */
.hero {
  position: relative;
  background: var(--espresso);
  color: var(--beige);
  text-align: center;
  padding: calc(56px + env(safe-area-inset-top)) 24px 32px;
}
.lang {
  position: absolute;
  top: calc(14px + env(safe-area-inset-top));
  right: 14px;
  display: flex;
  gap: 2px;
  padding: 3px;
  border: 1px solid rgba(241,231,214,.28);
  border-radius: 999px;
}
.lang button {
  font: 500 14px/1 "Outfit BG", "Khmer BG", sans-serif;
  color: var(--beige);
  background: transparent;
  border: 0;
  border-radius: 999px;
  min-width: 44px;
  min-height: 32px;
  padding: 0 12px;
  cursor: pointer;
}
.lang button[aria-pressed="true"] { background: var(--beige); color: var(--espresso); }
.lang button:focus-visible { outline: 2px solid var(--terracotta-light); outline-offset: 2px; }

.avatar {
  width: 112px;
  height: 112px;
  margin: 0 auto 18px;
  position: relative;
}
.avatar > svg { width: 100%; height: 100%; display: block; }
.avatar img.photo {
  width: 112px; height: 112px; border-radius: 50%;
  object-fit: cover; display: block;
  box-shadow: 0 0 0 3px var(--espresso), 0 0 0 4.5px var(--beige);
}
.avatar .badge {
  position: absolute; right: -2px; bottom: -2px;
  width: 36px; height: 36px; border-radius: 50%;
  background: var(--espresso); box-shadow: 0 0 0 2px var(--beige);
  display: flex; align-items: center; justify-content: center;
}
.avatar .badge svg { width: 30px; height: 30px; }

.name {
  margin: 0;
  font-family: "Fraunces BG", Georgia, serif;
  font-weight: 500;
  font-size: 38px;
  line-height: 1.05;
  letter-spacing: -0.02em;
}
.role {
  margin: 10px 0 0;
  font-size: 16px;
  font-weight: 500;
  color: rgba(241,231,214,.88);
}

/* Bande krama : quadrillage ton sur ton (principe de la fiche 02) */
.krama {
  height: 14px;
  background-color: var(--terracotta);
  background-image:
    repeating-linear-gradient(90deg, rgba(43,29,23,.22) 0 7px, transparent 7px 14px),
    repeating-linear-gradient(0deg, rgba(43,29,23,.22) 0 7px, transparent 7px 14px);
}

.body { padding: 26px 20px 8px; flex: 1; }
.bio { margin: 0 4px 22px; }

.save {
  display: flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 56px;
  padding: 0 20px;
  border-radius: var(--radius);
  background: var(--terracotta);
  color: #FFFFFF;
  font-weight: 600;
  font-size: 18px;
  text-decoration: none;
  box-shadow: 0 1px 0 rgba(43,29,23,.15);
}
.save svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.save:active { transform: translateY(1px); }
.save:focus-visible, .links a:focus-visible, .share:focus-visible, .meta a:focus-visible, .wordmark:focus-visible {
  outline: 2px solid var(--espresso); outline-offset: 3px;
}

.links { list-style: none; margin: 18px 0 0; padding: 0; display: grid; gap: 10px; }
.links a {
  display: flex; align-items: center; gap: 14px;
  min-height: 64px;
  padding: 10px 14px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  text-decoration: none;
}
.links a:hover { border-color: #D3BFA2; }
.ico {
  flex: 0 0 40px; width: 40px; height: 40px; border-radius: 12px;
  background: var(--beige);
  display: flex; align-items: center; justify-content: center;
}
.ico svg { width: 21px; height: 21px; fill: none; stroke: var(--terracotta); stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
.lbl { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.lbl b { font-weight: 600; font-size: 16px; line-height: 1.3; }
.lbl small { font-size: 14px; color: var(--muted); line-height: 1.35; overflow-wrap: anywhere; }
.chev { width: 18px; height: 18px; fill: none; stroke: var(--muted); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; flex: 0 0 18px; }

.share {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  width: 100%; min-height: 48px; margin-top: 14px;
  background: transparent; border: 0; color: var(--espresso);
  font: 500 15px/1 "Outfit BG", "Khmer BG", sans-serif; cursor: pointer;
  text-decoration: underline; text-underline-offset: 4px; text-decoration-color: rgba(43,29,23,.35);
}
.share[hidden] { display: none; }
.share svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }

/* Pied de page */
.foot { text-align: center; padding: 22px 20px calc(30px + env(safe-area-inset-bottom)); }
.wordmark { display: inline-flex; align-items: center; gap: 4px; text-decoration: none; }
.wordmark svg { width: 34px; height: 34px; }
.wm { font-family: "Fraunces BG", Georgia, serif; font-weight: 500; font-size: 26px; letter-spacing: -0.03em; line-height: 1; }
.wm .go { color: var(--terracotta); }
.km-brand { margin: 4px 0 0; font-family: "Khmer Serif BG", "Khmer BG", serif; font-size: 16px; line-height: 1.6; }
.slogan { margin: 6px 0 0; font-size: 15px; }
.meta { margin: 4px 0 0; font-size: 14px; color: var(--muted); }
.meta a { color: var(--espresso); text-underline-offset: 3px; }

/* Page d'équipe (racine du site) */
.team .hero { padding-bottom: 36px; }
.team .tagline { margin: 12px 0 0; font-size: 16px; color: rgba(241,231,214,.88); }
.team .km-hero { margin: 6px 0 0; font-family: "Khmer Serif BG", "Khmer BG", serif; font-size: 20px; }
