/* ── Obole UI ── Nefald theme, system fonts, auto dark/light ── */
:root {
  --font-heading: 'Palatino Linotype', 'Book Antiqua', Palatino, Georgia, serif;
  --font-body:    system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;

  /* Configurable via web.design.* in config.yml */
  --gold:     #163A54;    /* accent bg (boutons, badges, bordures actives) */
  --gold-dim: #0e2a3e;    /* hover/pressed */

  /*
   * --gold-hi : version claire de l'accent pour TEXTE sur fond sombre.
   * Dark mode : #163A54 serait invisible — on utilise une teinte ~+60% luminosité.
   * Light mode : #163A54 est déjà lisible, donc gold-hi = gold.
   * Si l'admin change web.design.accent, gold-hi reste adapté automatiquement.
   */
  --gold-hi:  #4a90ba;    /* ≈ #163A54 + 40% blanc — lisible sur dark */

  --radius:       10px;
  --accent-glow:  color-mix(in srgb, var(--gold-hi) 14%, transparent);

  /* Dark — fond neutre profond, accent bleu marine */
  --bg:         #0c0e11;
  --bg2:        #141820;
  --bg3:        #1a2030;
  --bg4:        #212840;
  --border:     rgba(100, 160, 220, 0.1);
  --border-hi:  rgba(100, 160, 220, 0.2);
  --shadow-sm:  0 1px 3px rgba(0,0,0,.65);
  --shadow-md:  0 3px 10px rgba(0,0,0,.55), 0 0 0 1px rgba(100,160,220,.06);
  --shadow-lg:  0 10px 40px rgba(0,0,0,.7),  0 0 0 1px rgba(100,160,220,.07);
  --text:       #8ab0cc;
  --text-dim:   #405870;
  --fg:         #d8eaf6;
  --green:      #4ade80;
  --red:        #f87171;
  --radius-lg:  14px;
  --radius-sm:  6px;
}

@media (prefers-color-scheme: light) {
  :root {
    /* Light — blanc/bleu clair, accent #163A54 lisible directement */
    --gold-hi:    #163A54;
    --gold-dim:   #0e2a3e;
    --accent-glow: color-mix(in srgb, #163A54 11%, transparent);
    --bg:         #f4f7fa;
    --bg2:        #eaeff5;
    --bg3:        #dce5ef;
    --bg4:        #ccdae8;
    --border:     rgba(22, 58, 84, 0.1);
    --border-hi:  rgba(22, 58, 84, 0.22);
    --shadow-sm:  0 1px 3px rgba(10,40,65,.07);
    --shadow-md:  0 3px 10px rgba(10,40,65,.11), 0 0 0 1px rgba(22,58,84,.06);
    --shadow-lg:  0 10px 40px rgba(10,40,65,.14), 0 0 0 1px rgba(22,58,84,.06);
    --text:       #2e4a60;
    --text-dim:   #5e7e96;
    --fg:         #0a1e2e;
    --green:      #15803d;
    --red:        #b91c1c;
  }
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; scroll-behavior: smooth; }
body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

::-webkit-scrollbar { width: 4px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border-hi); border-radius: 2px; }

/* ── Layout ── */
.container { max-width: 1080px; margin: 0 auto; padding: 0 1.5rem; }

/* ── Header ── */
.site-header {
  background: color-mix(in srgb, var(--bg2) 88%, transparent);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
  padding: .75rem 0;
  position: sticky; top: 0; z-index: 100;
}
.site-header .container { display: flex; align-items: center; gap: 1rem; }

.logo {
  font-family: var(--font-heading);
  font-size: 1.2rem;
  font-weight: 600;
  color: var(--gold-hi);
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: .5rem;
  letter-spacing: .01em;
}
.logo-img { height: 26px; width: auto; display: block; }

.site-header nav { margin-left: auto; display: flex; gap: .2rem; }
.site-header nav a {
  color: var(--text-dim);
  text-decoration: none;
  font-size: .825rem;
  font-weight: 500;
  padding: .35rem .8rem;
  border-radius: var(--radius-sm);
  transition: color .15s, background .15s;
}
.site-header nav a:hover { color: var(--fg); background: var(--bg3); }
.site-header nav a.active { color: var(--gold-hi); background: var(--accent-glow); }

/* ── Hero ── */
.hero {
  text-align: center;
  padding: 5rem 1rem 3rem;
  border-bottom: 1px solid var(--border);
}
.hero-eyebrow {
  display: inline-block;
  font-size: .67rem;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: var(--gold-hi);
  background: var(--accent-glow);
  border: 1px solid color-mix(in srgb, var(--gold) 28%, transparent);
  padding: .25rem .8rem;
  border-radius: 999px;
  margin-bottom: 1.25rem;
}
.hero h1 {
  font-family: var(--font-heading);
  font-size: clamp(1.9rem, 5vw, 3.1rem);
  font-weight: 600;
  color: var(--fg);
  line-height: 1.2;
  margin-bottom: 1rem;
  letter-spacing: -.01em;
}
.hero h1 span { color: var(--gold-hi); }
.hero p {
  font-size: .95rem;
  color: var(--text-dim);
  max-width: 480px;
  margin: 0 auto 2.5rem;
  line-height: 1.7;
}

/* ── Section ── */
.section-title {
  font-family: var(--font-heading);
  font-size: 1.3rem;
  color: var(--fg);
  margin-bottom: .4rem;
  letter-spacing: -.01em;
}
.section-sub { color: var(--text-dim); font-size: .825rem; margin-bottom: 2rem; }
.divider { height: 1px; background: var(--border); margin: 2.5rem 0; }

/* ── Tier cards ── */
.tiers-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(192px, 1fr));
  gap: 1rem;
  padding-bottom: 3rem;
}
.tier-card {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-top: 2px solid var(--tier-color, var(--border-hi));
  border-radius: var(--radius);
  padding: 1.5rem 1.25rem 1.25rem;
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow-sm);
  transition: box-shadow .2s, border-color .2s, transform .2s;
}
.tier-card:hover {
  border-color: var(--tier-color, var(--gold-hi));
  box-shadow: var(--shadow-md),
    0 0 0 1px color-mix(in srgb, var(--tier-color, var(--gold)) 20%, transparent);
  transform: translateY(-2px);
}
.tier-card.featured { background: var(--bg3); box-shadow: var(--shadow-md); }

.tier-badge {
  display: inline-flex;
  align-items: center;
  font-size: .6rem;
  letter-spacing: .12em;
  text-transform: uppercase;
  font-weight: 700;
  background: var(--gold);
  color: #fff;
  padding: .2rem .6rem;
  border-radius: 999px;
  margin-bottom: .875rem;
  align-self: flex-start;
}

.tier-icon { font-size: 1.4rem; margin-bottom: .5rem; line-height: 1; }
.tier-name { font-weight: 600; font-size: .875rem; color: var(--fg); margin-bottom: .5rem; }
.tier-price {
  font-size: 2.1rem;
  font-weight: 700;
  color: var(--tier-color, var(--gold-hi));
  line-height: 1;
  margin-bottom: .15rem;
  font-variant-numeric: tabular-nums;
}
.tier-price sup { font-size: .75rem; vertical-align: super; font-weight: 500; }
.tier-price small { font-size: .65rem; font-weight: 400; color: var(--text-dim); }
.tier-duration { font-size: .7rem; color: var(--text-dim); margin-bottom: 1.1rem; }
.tier-perks { list-style: none; flex: 1; margin-bottom: 1.25rem; }
.tier-perks li {
  font-size: .8rem;
  padding: .3rem 0;
  border-bottom: 1px solid var(--border);
  display: flex; align-items: center; gap: .5rem;
  color: var(--text);
}
.tier-perks li:last-child { border-bottom: none; }
.tier-perks li::before {
  content: '';
  display: block;
  width: 5px; height: 5px;
  background: var(--tier-color, var(--gold));
  border-radius: 999px;
  flex-shrink: 0;
}

/* ── Buttons ── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .4rem;
  padding: .55rem 1.1rem;
  border-radius: var(--radius-sm);
  font-size: .825rem;
  font-weight: 600;
  cursor: pointer;
  border: 1px solid transparent;
  text-decoration: none;
  transition: background .15s, border-color .15s, color .15s, box-shadow .15s;
  white-space: nowrap;
  font-family: inherit;
  line-height: 1.4;
  letter-spacing: .01em;
}
.btn-primary {
  background: var(--gold);
  color: #fff;
  border-color: var(--gold);
  box-shadow: 0 1px 4px color-mix(in srgb, var(--gold) 35%, transparent);
}
.btn-primary:hover {
  background: var(--gold-dim);
  border-color: var(--gold-dim);
  box-shadow: 0 2px 8px color-mix(in srgb, var(--gold) 40%, transparent);
}
.btn-outline {
  background: transparent;
  color: var(--text);
  border-color: var(--border-hi);
}
.btn-outline:hover { border-color: var(--gold-hi); color: var(--gold-hi); }
.btn-full { width: 100%; justify-content: center; }
.btn-lg { padding: .7rem 1.5rem; font-size: .9rem; }

/* ── Payment providers ── */
.provider-btn {
  display: flex;
  align-items: center;
  gap: .875rem;
  padding: .875rem 1rem;
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  cursor: pointer;
  transition: border-color .15s, box-shadow .15s, background .15s;
  text-decoration: none;
  color: var(--text);
  font-family: inherit;
  font-size: .875rem;
  width: 100%;
  text-align: left;
  box-shadow: var(--shadow-sm);
}
.provider-btn:hover {
  border-color: var(--gold-hi);
  background: var(--bg3);
  box-shadow: var(--shadow-md);
}
.provider-icon { font-size: 1.2rem; flex-shrink: 0; width: 24px; text-align: center; }
.provider-info { flex: 1; }
.provider-info strong { display: block; font-size: .875rem; color: var(--fg); font-weight: 600; }
.provider-info span { font-size: .72rem; color: var(--text-dim); }
.provider-badge {
  font-size: .6rem;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  background: var(--accent-glow);
  color: var(--gold-hi);
  border: 1px solid color-mix(in srgb, var(--gold) 28%, transparent);
  padding: .2rem .5rem;
  border-radius: 999px;
  white-space: nowrap;
}

/* ── HelloAsso official button ── */
.HaPay { display: flex; flex-direction: column; width: 100%; }
.HaPayButton {
  display: flex;
  align-items: stretch;
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
  border-radius: var(--radius-sm);
  overflow: hidden;
  width: 100%;
  box-shadow: var(--shadow-sm);
  transition: box-shadow .15s, filter .15s;
}
.HaPayButton:hover { box-shadow: var(--shadow-md); filter: brightness(1.07); }
.HaPayButtonLogo {
  background: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: .6rem .875rem;
  flex-shrink: 0;
}
.HaPayButtonLogo img { height: 22px; width: auto; display: block; }
.HaPayButtonLabel {
  background: #4c40cf;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: .5rem;
  padding: .6rem 1rem;
  flex: 1;
  font-size: .825rem;
  font-weight: 600;
  font-family: inherit;
  letter-spacing: .01em;
}
.HaPayButtonLabel img { height: 18px; width: auto; filter: brightness(0) invert(1); }
.HaPaySecured {
  font-size: .65rem;
  color: var(--text-dim);
  text-align: center;
  padding: .3rem 0 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: .4rem;
}

/* ── Form ── */
.form-group { margin-bottom: 1.25rem; }
.form-label {
  display: block;
  font-size: .72rem;
  color: var(--text-dim);
  margin-bottom: .4rem;
  font-weight: 600;
  letter-spacing: .06em;
  text-transform: uppercase;
}
.form-control {
  width: 100%;
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--fg);
  padding: .65rem .875rem;
  font-size: .9rem;
  font-family: inherit;
  outline: none;
  transition: border-color .15s, box-shadow .15s;
}
.form-control:focus {
  border-color: var(--gold-hi);
  box-shadow: 0 0 0 3px var(--accent-glow);
}
.form-control::placeholder { color: var(--text-dim); }

/* ── Card ── */
.card {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  box-shadow: var(--shadow-sm);
}

/* ── Alert ── */
.alert { border-radius: var(--radius-sm); padding: .75rem .875rem; font-size: .85rem; margin-bottom: 1rem; }
.alert-warn    { background: color-mix(in srgb, #c0392b 10%, transparent); border: 1px solid #c0392b; color: #f08080; }
.alert-info    { background: var(--accent-glow); border: 1px solid color-mix(in srgb, var(--gold) 30%, transparent); color: var(--gold-hi); }
.alert-success { background: color-mix(in srgb, #4ade80 10%, transparent); border: 1px solid #4ade80; color: #4ade80; }

/* ── Donors ── */
.donors-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: .875rem; padding-bottom: 3rem; }
.donor-card {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: .875rem 1rem;
  display: flex; align-items: center; gap: .875rem;
  box-shadow: var(--shadow-sm);
  transition: border-color .15s, box-shadow .15s;
}
.donor-card:hover { border-color: var(--border-hi); box-shadow: var(--shadow-md); }
.donor-avatar {
  width: 40px; height: 40px;
  border-radius: var(--radius-sm);
  background: var(--bg3);
  flex-shrink: 0;
  image-rendering: pixelated;
}
.donor-name { font-weight: 600; color: var(--fg); font-size: .875rem; }
.donor-tier { font-size: .7rem; color: var(--text-dim); margin-top: .1rem; }
.donor-amount { margin-left: auto; font-size: .875rem; font-weight: 700; color: var(--gold-hi); white-space: nowrap; }

/* ── Status pages ── */
.status-page { display: flex; align-items: center; justify-content: center; min-height: calc(100vh - 60px); padding: 2rem; }
.status-card {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 2.5rem 2rem;
  max-width: 440px; width: 100%;
  text-align: center;
  box-shadow: var(--shadow-lg);
}
.status-icon { font-size: 3rem; margin-bottom: 1.25rem; line-height: 1; }
.status-card h1 { font-family: var(--font-heading); font-size: 1.6rem; color: var(--fg); margin-bottom: .75rem; }
.status-card p { color: var(--text-dim); margin-bottom: 1.5rem; font-size: .9rem; line-height: 1.7; }
.status-card .info-box {
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: .875rem;
  font-size: .875rem;
  margin-bottom: 1.5rem;
}
.status-card .info-box strong { color: var(--gold-hi); }

/* ── Footer ── */
.site-footer {
  border-top: 1px solid var(--border);
  padding: 2rem 0;
  margin-top: 4rem;
  text-align: center;
  color: var(--text-dim);
  font-size: .775rem;
}
.site-footer a { color: var(--text-dim); text-decoration: none; transition: color .15s; }
.site-footer a:hover { color: var(--gold-hi); }

/* ── Stack / helpers ── */
.stack { display: flex; flex-direction: column; gap: .625rem; }
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 2rem; align-items: start; }

/* ── Responsive ── */
@media (max-width: 720px) {
  .tiers-grid { grid-template-columns: 1fr 1fr; }
  .two-col { grid-template-columns: 1fr; }
  .hero { padding: 3.5rem 1rem 2.5rem; }
}
@media (max-width: 420px) {
  .tiers-grid { grid-template-columns: 1fr; }
  .status-card { padding: 2rem 1.25rem; }
}
