/* TENDÈ ACADEMY — Styles de base, mobile-first. */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font-sans);
  color: var(--ink-900);
  background: var(--bg-app);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  padding-bottom: var(--nav-h-mobile);
}
h1, h2, h3, h4 { font-family: var(--font-display); font-weight: 700; line-height: 1.2; margin: 0 0 .5em; color: var(--navy-800); }
h1 { font-size: clamp(1.6rem, 4vw, 2.6rem); }
h2 { font-size: clamp(1.3rem, 3vw, 1.9rem); }
h3 { font-size: 1.15rem; }
p { margin: 0 0 1em; color: var(--ink-700); }
a { color: var(--royal-600); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; display: block; }
ul { padding-left: 1.2em; }
button { font-family: inherit; }

.container { width: 100%; max-width: var(--container-max); margin: 0 auto; padding: 0 16px; }
.section { padding: 40px 0; }
.section-tight { padding: 24px 0; }
.grid { display: grid; gap: 20px; }
@media (min-width: 640px) { .grid-2 { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 900px) { .grid-3 { grid-template-columns: repeat(3, 1fr); } .grid-4 { grid-template-columns: repeat(4, 1fr); } }

.text-center { text-align: center; }
.muted { color: var(--ink-500); }
.eyebrow { color: var(--royal-600); font-weight: 700; text-transform: uppercase; font-size: .78rem; letter-spacing: .06em; }

/* ---------- Boutons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 12px 22px; border-radius: var(--radius-pill); border: 1.5px solid transparent;
  font-weight: 600; font-size: .95rem; cursor: pointer; transition: transform .15s ease, box-shadow .15s ease, background .15s ease;
  white-space: nowrap; text-decoration: none;
}
.btn:hover { text-decoration: none; }
.btn:active { transform: scale(.98); }
.btn-gold { background: linear-gradient(135deg, var(--gold-400), var(--gold-600)); color: var(--navy-900); box-shadow: var(--shadow-sm); }
.btn-gold:hover { box-shadow: var(--shadow-md); }
.btn-navy { background: var(--navy-800); color: var(--white); }
.btn-navy:hover { background: var(--royal-700); }
.btn-outline { background: transparent; border-color: var(--ink-100); color: var(--navy-800); }
.btn-outline:hover { border-color: var(--royal-500); color: var(--royal-600); }
.btn-outline-light { background: rgba(255,255,255,.08); border-color: rgba(255,255,255,.5); color: var(--white); }
.btn-ghost { background: transparent; color: var(--royal-600); padding: 10px 14px; }
.btn-sm { padding: 8px 16px; font-size: .85rem; }
.btn-lg { padding: 15px 30px; font-size: 1.02rem; }
.btn-block { width: 100%; }
.btn-danger { background: var(--color-danger); color: #fff; }
.btn[disabled] { opacity: .55; cursor: not-allowed; }

/* ---------- Champs de formulaire ---------- */
.field { margin-bottom: 16px; text-align: left; }
.field label { display: block; font-weight: 600; font-size: .88rem; margin-bottom: 6px; color: var(--navy-800); }
.input, select.input, textarea.input {
  width: 100%; padding: 12px 14px; border: 1.5px solid var(--ink-100); border-radius: var(--radius-sm);
  font-size: .96rem; background: var(--bg-card); color: var(--ink-900); font-family: inherit;
}
.input:focus, select.input:focus, textarea.input:focus { outline: none; border-color: var(--royal-500); box-shadow: 0 0 0 3px var(--royal-100); }
.field-hint { font-size: .78rem; color: var(--ink-500); margin-top: 4px; }
.field-error { font-size: .8rem; color: var(--color-danger); margin-top: 4px; }
.checkbox-row { display: flex; align-items: flex-start; gap: 8px; font-size: .85rem; color: var(--ink-500); }

/* ---------- Cartes / badges ---------- */
.card { background: var(--bg-card); border-radius: var(--radius-md); box-shadow: var(--shadow-sm); padding: 20px; }
.card-hover { transition: box-shadow .2s ease, transform .2s ease; }
.card-hover:hover { box-shadow: var(--shadow-lg); transform: translateY(-2px); }
.badge { display: inline-flex; align-items: center; gap: 4px; padding: 3px 10px; border-radius: var(--radius-pill); font-size: .72rem; font-weight: 700; }
.badge-gold { background: var(--gold-100); color: var(--gold-600); }
.badge-emerald { background: var(--emerald-100); color: var(--emerald-700); }
.badge-royal { background: var(--royal-100); color: var(--royal-600); }
.stars { color: var(--gold-500); font-weight: 700; }

.skeleton { background: linear-gradient(90deg, var(--ink-100) 25%, #f0f2f7 37%, var(--ink-100) 63%); background-size: 400% 100%; animation: shimmer 1.4s ease infinite; border-radius: var(--radius-sm); }
@keyframes shimmer { 0% { background-position: 100% 50%; } 100% { background-position: 0 50%; } }

.progress-track { width: 100%; height: 8px; border-radius: var(--radius-pill); background: var(--ink-100); overflow: hidden; }
.progress-fill { height: 100%; background: linear-gradient(90deg, var(--royal-500), var(--emerald-500)); border-radius: var(--radius-pill); transition: width .4s ease; }

.toast-region { position: fixed; bottom: calc(var(--nav-h-mobile) + 14px); left: 0; right: 0; display: flex; flex-direction: column; align-items: center; gap: 8px; z-index: 500; pointer-events: none; padding: 0 16px; }
.toast { background: var(--navy-900); color: #fff; padding: 12px 18px; border-radius: var(--radius-pill); font-size: .88rem; box-shadow: var(--shadow-lg); max-width: 420px; }
.toast.error { background: var(--color-danger); }
.toast.success { background: var(--emerald-700); }

.spinner { width: 20px; height: 20px; border: 3px solid rgba(255,255,255,.4); border-top-color: #fff; border-radius: 50%; animation: spin .7s linear infinite; }
.spinner-dark { border-color: var(--ink-100); border-top-color: var(--royal-600); }
@keyframes spin { to { transform: rotate(360deg); } }

.empty-state { text-align: center; padding: 48px 20px; color: var(--ink-500); }
.empty-state .icon { font-size: 2.4rem; margin-bottom: 8px; }

@media (min-width: 900px) { body { padding-bottom: 0; } }

/* L’attribut hidden doit toujours l’emporter (les boutons et cartes ont leur propre display). */
[hidden] { display: none !important; }
