/* ===========================================================
   EduSpeed — Charte « Forêt & Or » (feuille de style commune)
   Tokens + composants partagés à toutes les pages.
   Polices chargées via <link> dans chaque <head>
   (Fraunces pour les titres + Hanken Grotesk pour le corps).
   =========================================================== */
:root {
  --paper:   #f6efe0;  --paper-2: #efe4cf;  --card: #fffdf7;
  --ink:     #18221b;  --ink-soft:#4c5a4f;
  --forest:  #0c4a37;  --forest-d:#083125;
  --gold:    #e2a313;  --gold-d:  #b9820a;
  --clay:    #bf552f;  --lagoon:  #1c6f88;
  --line:    #e3d6ba;  --line-2:  #d8c8a6;
  --danger:  #b3261e;  --ok:      #0c7a52;
  --serif:"Fraunces", Georgia, "Times New Roman", serif;
  --sans:"Hanken Grotesk", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--sans); color: var(--ink); line-height: 1.6; font-size: 16px;
  min-height: 100vh;
  background:
    radial-gradient(820px 480px at 88% -8%, rgba(226,163,19,.16), transparent 62%),
    radial-gradient(680px 520px at -12% 6%, rgba(28,111,136,.10), transparent 58%),
    var(--paper);
  background-attachment: fixed;
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; }
.wrap { width: 100%; max-width: 1120px; margin: 0 auto; padding: 0 20px; }
.hidden { display: none !important; }
.muted { color: var(--ink-soft); }
h1, h2, h3, h4, .serif { font-family: var(--serif); }

/* — Liseré tissé (kenté) — */
.kente { height: 6px; background:
  repeating-linear-gradient(90deg,
    var(--forest) 0 20px, var(--gold) 20px 32px,
    var(--clay) 32px 44px, var(--lagoon) 44px 56px); }

/* — En-tête commun — */
header.top {
  position: sticky; top: 0; z-index: 60;
  background: rgba(246,239,224,.86); backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
header.top .nav, .nav {
  display: flex; align-items: center; justify-content: space-between; height: 62px; gap: 12px;
}
.logo { font-family: var(--serif); font-size: 1.55rem; font-weight: 900;
        letter-spacing: -.5px; color: var(--forest); }
.logo b { color: var(--gold-d); font-style: italic; font-weight: 600; }
.nav-links { display: flex; align-items: center; gap: 2px; font-size: .94rem; font-weight: 600; }
.nav-links a, .nav-links button {
  color: var(--ink-soft); background: none; border: 0; font: inherit; cursor: pointer;
  padding: 9px 12px; border-radius: 10px; transition: color .15s, background .15s;
}
.nav-links a:hover, .nav-links button:hover { background: var(--paper-2); color: var(--forest); }
.nav-links a.actif, .nav-links a.on { background: var(--paper-2); color: var(--forest); }
.cart-badge { margin-left: 5px; background: var(--clay); color: #fff; font-size: .72rem;
  font-weight: 800; border-radius: 999px; padding: 1px 7px; display: inline-block; }
.cart-badge.hidden { display: none; }

/* — Boutons — */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 9px;
  font-family: var(--sans); font-weight: 700; font-size: 1rem; padding: 14px 22px;
  border-radius: 14px; border: 0; cursor: pointer; min-height: 50px; text-align: center;
  transition: transform .08s ease, box-shadow .2s ease, background .15s ease;
}
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: .65; cursor: default; }
.btn-primary { background: var(--forest); color: #fdf6e3; box-shadow: 0 10px 22px rgba(12,74,55,.28); }
.btn-primary:hover { background: var(--forest-d); }
.btn-gold { background: var(--gold); color: var(--forest-d); box-shadow: 0 10px 22px rgba(185,130,10,.28); }
.btn-gold:hover { background: #f2b431; }
.btn-ghost { background: transparent; color: var(--forest); border: 1.5px solid var(--line-2); }
.btn-ghost:hover { background: var(--card); border-color: var(--forest); }
.btn-block { width: 100%; }

/* — Eyebrow + titres — */
.eyebrow { display: inline-flex; align-items: center; gap: 11px; color: var(--clay);
  font-weight: 800; font-size: .76rem; letter-spacing: .14em; text-transform: uppercase; }
.eyebrow::before { content: ""; width: 28px; height: 2px; background: var(--gold); border-radius: 2px; }
h1.page { font-family: var(--serif); font-weight: 900; letter-spacing: -.6px; color: var(--ink);
  font-size: clamp(1.8rem, 5vw, 2.4rem); }
.title { font-family: var(--serif); font-weight: 900; letter-spacing: -.6px; color: var(--ink);
  font-size: clamp(1.7rem, 4.5vw, 2.35rem); margin-top: 12px; }
.sub { color: var(--ink-soft); margin-top: 10px; max-width: 640px; font-size: 1.05rem; }

/* — Carte / panneau — */
.card { background: var(--card); border: 1px solid var(--line); border-radius: 18px; padding: 22px; }
.panel { background: var(--card); border: 1px solid var(--line); border-radius: 18px; padding: 22px;
  box-shadow: 0 10px 26px rgba(24,34,27,.06); }

/* — Formulaires — */
.field { margin-bottom: 16px; }
.field label { display: block; font-size: .9rem; font-weight: 700; margin-bottom: 6px; color: var(--ink); }
.input { width: 100%; border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px;
  font: inherit; background: var(--paper); color: var(--ink); transition: border-color .15s, box-shadow .15s; }
.input:focus { outline: none; border-color: var(--gold); box-shadow: 0 0 0 4px rgba(226,163,19,.18); background: #fff; }
.form-msg { font-size: .9rem; margin-top: 4px; }
.form-msg.err { color: var(--danger); }
.alt { font-size: .95rem; color: var(--ink-soft); margin-top: 16px; text-align: center; }
.alt a { color: var(--forest); font-weight: 700; }

/* — Listes (panier, etc.) — */
.lined { background: var(--card); border: 1px solid var(--line); border-radius: 18px; overflow: hidden; }
.lined .li { display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 16px 18px; border-bottom: 1px solid var(--line); }
.lined .li:last-child { border-bottom: none; }
.li .t { font-weight: 600; }
.li .meta { font-size: .72rem; color: var(--ink-soft); text-transform: uppercase; letter-spacing: .04em; }
.li .price { font-weight: 800; color: var(--forest); }
.li-total { background: var(--paper-2); }
.li-total .t { font-family: var(--serif); font-weight: 700; }
.li-total .price { font-size: 1.25rem; }
.link-danger { color: var(--ink-soft); font-size: .85rem; background: none; border: 0; cursor: pointer; }
.link-danger:hover { color: var(--danger); }
.empty-box { background: var(--card); border: 1px solid var(--line); border-radius: 18px;
  padding: 38px; text-align: center; color: var(--ink-soft); }
.empty-box a { color: var(--forest); font-weight: 700; }

/* — Mes Fiches — */
.mat-group { margin-bottom: 26px; }
.mat-group h2 { font-size: 1.2rem; margin-bottom: 10px; color: var(--ink); }
.fiche-card { background: var(--card); border: 1px solid var(--line); border-radius: 16px;
  padding: 16px 18px; margin-bottom: 12px; }
.fiche-card .ft { font-weight: 700; margin-bottom: 10px; }
.fiche-links { display: flex; flex-wrap: wrap; gap: 8px; }
.fiche-link { display: inline-flex; align-items: center; gap: 6px; font-size: .88rem; font-weight: 700;
  background: var(--forest); color: #fdf6e3; padding: 8px 13px; border-radius: 11px; }
.fiche-link:hover { background: var(--forest-d); }
.offline-bar { background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 16px;
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 22px; }

/* — Pied de page mince — */
.foot-min { text-align: center; color: var(--ink-soft); font-size: .84rem; padding: 30px 0; }

/* — Mise en page colonne pleine hauteur — */
.page-col { min-height: 100vh; display: flex; flex-direction: column; }
.page-col > main { flex: 1; }

/* — Révélations au chargement — */
@keyframes rise { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }
.reveal { animation: rise .7s cubic-bezier(.2,.7,.2,1) both; }
.d1 { animation-delay: .05s; } .d2 { animation-delay: .13s; }
.d3 { animation-delay: .21s; } .d4 { animation-delay: .29s; }
@media (prefers-reduced-motion: reduce) { .reveal { animation: none; } html { scroll-behavior: auto; } }
