/* =========================
   CryptoAuQuotidien — Style global (CLEAN)
   ========================= */

* { box-sizing: border-box; }
html, body { min-height: 100%; }

:root{
  --text: #eaeef5;
  --muted: rgba(234, 238, 245, 0.72);
  --muted2: rgba(234, 238, 245, 0.58);

  --card-bg: rgba(8, 12, 18, 0.55);
  --card-border: rgba(255, 255, 255, 0.10);

  --chip-bg: rgba(10, 14, 22, 0.60);
  --chip-border: rgba(255, 255, 255, 0.12);

  --link: #78a6ff;
  --link-hover: #9bbdff;

  --primary: #2f6bff;
  --primary-hover: #3b78ff;

  --shadow: 0 10px 30px rgba(0,0,0,0.45);

  --radius: 18px;
  --radius2: 22px;

  --maxw: 1100px;
}

/* Fond global */
body{
  margin: 0;
  color: var(--text);
  font-family: system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, sans-serif;
  line-height: 1.5;

  background-image: url("/static/img/hero.jpg");
  background-size: cover;
  background-position: center center;
  background-repeat: no-repeat;
  background-attachment: fixed;
}

/* Voile global */
body::before{
  content:"";
  position: fixed;
  inset: 0;
  background: radial-gradient(1200px 700px at 70% 20%, rgba(40,120,255,0.18), transparent 55%),
              linear-gradient(180deg, rgba(6,10,16,0.45), rgba(6,10,16,0.88));
  pointer-events: none;
  z-index: -1;
}

/* Liens */
a{ color: var(--link); text-decoration: none; }
a:hover{ color: var(--link-hover); }

/* Focus visible (accessibilité + look pro) */
a:focus-visible,
button:focus-visible,
select:focus-visible{
  outline: 3px solid rgba(90, 140, 255, .55);
  outline-offset: 3px;
  border-radius: 12px;
}

/* Layout */
.container{
  /* ✅ mini-ajustement: wrapper cohérent partout */
  width: min(var(--maxw), calc(100% - 48px));
  margin: 0 auto;
}
main{ padding-bottom: 56px; }

/* =========================
   Header / Nav (base.html = topbar)
   ========================= */
.topbar{
  position: sticky;
  top: 0;
  z-index: 20;

  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);

  background: rgba(6,10,16,0.55);
  border-bottom: 1px solid rgba(255,255,255,0.08);
}

.topbar-inner{
  width: min(var(--maxw), calc(100% - 48px));
  margin: 0 auto;
  padding: 16px 0;

  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.brand{
  color: var(--text);
  text-decoration: none;
  font-weight: 700;
  letter-spacing: .3px;
  font-size: 18px;
}

.nav{
  display: flex;
  gap: 18px;
  align-items: center;
  flex-wrap: wrap;
}

.nav a{
  color: rgba(234,238,245,0.78);
  font-size: 14px;
  padding: 6px 8px;
  border-radius: 10px;
  transition: background .14s ease, color .14s ease, border-color .14s ease;
}
.nav a:hover{
  color: var(--text);
  background: rgba(255,255,255,0.06);
}
.nav a.active{
  color: var(--text);
  background: rgba(90,140,255,0.12);
  border: 1px solid rgba(90,140,255,0.22);
}

/* =========================
   Hero
   ========================= */
.hero{
  position: relative;
  padding: 72px 0 40px;

  /* Supporte:
     - inline background-image sur la section (page.html) => priorité navigateur
     - sinon --hero-bg (hub.html) */
  background-image: var(--hero-bg, none);
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;

  border-bottom: 1px solid rgba(255,255,255,0.06);
}

.hero-page{
  /* petit plus premium (sans effet agressif) */
  background-position: center center;
}

.hero-overlay{
  position: absolute;
  inset: 0;
  background: radial-gradient(1200px 700px at 70% 20%, rgba(40,120,255,0.16), transparent 55%),
              linear-gradient(180deg, rgba(6,10,16,0.50), rgba(6,10,16,0.80));
  pointer-events: none;
  z-index: 0;
}

.hero-inner{
  position: relative;
  z-index: 1;
  width: min(var(--maxw), calc(100% - 48px));
  margin: 0 auto;
}

.hero h1{
  margin: 0 0 14px;
  font-size: clamp(40px, 6vw, 78px);
  line-height: 1.02;
  letter-spacing: -0.8px;
}

.hero-lead{
  margin: 0;
  max-width: 820px;
  padding: 14px 18px;
  border-radius: var(--radius);
  background: rgba(8,12,18,0.40);
  border: 1px solid rgba(255,255,255,0.09);
  color: var(--muted);
}

.hero-title{
  margin: 0 0 10px;
  font-size: clamp(34px, 4.6vw, 54px);
}

.hero-box{
  display: inline-block;
  margin-top: 10px;
  max-width: 900px;
  padding: 12px 16px;
  border-radius: var(--radius);
  background: rgba(8,12,18,0.42);
  border: 1px solid rgba(255,255,255,0.09);
  color: rgba(234,238,245,0.86);
}

/* CTA row */
.cta-row{
  display: flex;
  gap: 12px;
  margin-top: 18px;
  flex-wrap: wrap;
}

/* Boutons */
.btn-primary,
.btn-secondary{
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  height: 44px;
  padding: 0 16px;
  border-radius: 14px;
  font-weight: 700;
  font-size: 14px;
  border: 1px solid rgba(255,255,255,0.12);
  transition: transform .12s ease, background .12s ease, border-color .12s ease;
}
.btn-primary{
  background: var(--primary);
  color: white;
  border-color: rgba(255,255,255,0.10);
}
.btn-primary:hover{
  background: var(--primary-hover);
  transform: translateY(-1px);
}
.btn-secondary{
  background: rgba(8,12,18,0.40);
  color: var(--text);
}
.btn-secondary:hover{
  background: rgba(8,12,18,0.55);
  transform: translateY(-1px);
}

/* Chips */
.trust-row{
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 14px;
}
.trust-row span{
  display: inline-flex;
  align-items: center;
  height: 30px;
  padding: 0 12px;
  border-radius: 999px;
  background: var(--chip-bg);
  border: 1px solid var(--chip-border);
  color: rgba(234,238,245,0.78);
  font-size: 12px;
}

/* =========================
   Cards / Grids
   ========================= */
.grid{
  width: min(var(--maxw), calc(100% - 48px));
  margin: 26px auto 0;
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(3, 1fr);
}

.card{
  padding: 22px;
  border-radius: var(--radius2);
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  box-shadow: var(--shadow);
}

.card h2{ margin: 0 0 10px; font-size: 20px; }
.card p{ margin: 0 0 10px; color: var(--muted); font-size: 14px; }

.link{ font-weight: 700; color: var(--link); }
.link.subtle{ font-weight: 650; opacity: .9; }

/* Sections */
.section{
  width: min(var(--maxw), calc(100% - 48px));
  margin: 26px auto 0;
}
.section h2{ margin: 0; font-size: 20px; }
.section-head{
  display:flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 12px;
}

/* Home mini cards */
.mini-grid{
  display:grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}
.mini-card{
  display:block;
  padding: 16px 16px 14px;
  border-radius: var(--radius);
  background: rgba(8,12,18,0.45);
  border: 1px solid rgba(255,255,255,0.10);
  box-shadow: 0 12px 30px rgba(0,0,0,.25);
}
.mini-card:hover{ background: rgba(8,12,18,0.55); }
.mini-title{ font-weight: 700; margin-bottom: 6px; }
.mini-desc{ color: rgba(234,238,245,0.80); font-size: 14px; line-height: 1.45; }
.mini-meta{ margin-top: 10px; color: rgba(234,238,245,0.55); font-size: 12px; }

.muted{ color: var(--muted2); }
.small{ font-size: 12px; }

/* =========================
   Pages + Markdown
   ========================= */
.content-wrap{ padding: 40px 0 70px; }

.prose{
  width: min(980px, calc(100% - 48px));
  margin: 0 auto;
  padding: 26px;
  border-radius: var(--radius2);
  background: rgba(8,12,18,0.55);
  border: 1px solid rgba(255,255,255,0.10);
  box-shadow: var(--shadow);
  backdrop-filter: blur(12px);
}

.prose h1, .prose h2, .prose h3{
  margin-top: 22px;
  margin-bottom: 10px;
  letter-spacing: -0.2px;
}
.prose h1{ font-size: 30px; }
.prose h2{ font-size: 22px; }
.prose h3{ font-size: 18px; }

.prose p, .prose li{
  color: rgba(234,238,245,0.88);
  font-size: 15px;
  line-height: 1.75;
}

.prose hr{
  border: 0;
  height: 1px;
  background: rgba(255,255,255,0.10);
  margin: 18px 0;
}

.prose code{
  background: rgba(255,255,255,0.08);
  padding: 2px 6px;
  border-radius: 8px;
}
.prose pre{
  background: rgba(0,0,0,0.35);
  padding: 14px;
  border-radius: 16px;
  overflow: auto;
  border: 1px solid rgba(255,255,255,0.10);
}

/* Callouts */
.callout, .warning, .checklist{
  border-radius: 14px;
  padding: 14px;
  margin: 16px 0;
  border: 1px solid rgba(255,255,255,.10);
  background: rgba(10,16,28,.55);
}
.callout{ border-left: 4px solid rgba(90,140,255,.9); }
.warning{ border-left: 4px solid rgba(255,140,80,.9); background: rgba(25,12,10,.45); }
.checklist{ border-left: 4px solid rgba(120,220,160,.85); }

/* =========================
   HUB CARDS (Guides / Analyses)
   ========================= */
.hub-grid{
  width: min(var(--maxw), calc(100% - 48px));
  margin: 0 auto;
  display:grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.hub-card{
  display:flex;
  flex-direction:column;
  justify-content:space-between;
  padding: 18px 18px 16px;
  border-radius: 18px;
  text-decoration:none;
  color: inherit;

  background: rgba(10, 14, 22, 0.55);
  border: 1px solid rgba(255,255,255,0.10);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);

  transition: transform .18s ease, border-color .18s ease, background .18s ease;
}

.hub-card:hover{
  transform: translateY(-2px);
  border-color: rgba(255,255,255,0.18);
  background: rgba(10, 14, 22, 0.62);
}

.hub-card-title{
  font-size: 18px;
  font-weight: 650;
  letter-spacing: .2px;
  margin-bottom: 8px;
}

.hub-card-desc{
  font-size: 14px;
  line-height: 1.45;
  color: rgba(234,238,245,0.80);
  max-width: 62ch;
}

.hub-card-bottom{
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap: 12px;
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid rgba(255,255,255,0.08);
}

.hub-chip{
  font-size: 12px;
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,0.14);
  background: rgba(255,255,255,0.06);
  color: rgba(234,238,245,0.92);
}

.hub-updated{
  font-size: 12px;
  color: rgba(234,238,245,0.55);
}

.empty-state{
  width: 100%;
  padding: 24px;
  border-radius: 18px;
  border: 1px solid rgba(255,255,255,0.10);
  background: rgba(10,14,22,0.45);
}
.empty-title{ font-weight: 750; margin-bottom: 6px; }
.empty-sub{ color: rgba(234,238,245,0.68); }

/* =========================
   QUIZ (ton style conservé)
   ========================= */
.quiz-wrap{ max-width: 780px; margin: 0 auto; padding: 28px 18px; }
.quiz-card{
  background: rgba(10, 14, 22, .55);
  border: 1px solid rgba(255,255,255,.10);
  border-radius: 18px;
  box-shadow: 0 18px 50px rgba(0,0,0,.35);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  padding: 22px 22px 18px;
}
.quiz-title{ margin: 0 0 6px; font-size: clamp(28px, 4.2vw, 44px); line-height: 1.05; letter-spacing: -.02em; }
.quiz-subtitle{ margin: 0 0 18px; color: rgba(234, 238, 245, .78); }
.quiz-form{ display: grid; gap: 12px; }
.quiz-row{
  display: grid;
  grid-template-columns: 1fr 140px;
  align-items: center;
  gap: 14px;
  padding: 12px;
  border-radius: 14px;
  border: 1px solid rgba(255,255,255,.08);
  background: rgba(0,0,0,.18);
  position: relative;
}
.quiz-row label{ font-weight: 600; color: rgba(234, 238, 245, .92); }
.quiz-row .hint{ display: block; margin-top: 4px; font-size: 13px; color: rgba(234, 238, 245, .65); }
.quiz-row select{
  width: 100%;
  height: 40px;
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,.14);
  background: rgba(10, 14, 22, .75);
  color: rgba(234, 238, 245, .95);
  padding: 0 12px;
  outline: none;
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  box-shadow: inset 0 0 0 1px rgba(0,0,0,.25);
}
.quiz-row select:hover{ border-color: rgba(255,255,255,.24); }
.quiz-row select:focus{
  border-color: rgba(90, 140, 255, .65);
  box-shadow: 0 0 0 4px rgba(90, 140, 255, .18);
}
.quiz-row::after{
  content: "▾";
  position: absolute;
  right: 24px;
  font-size: 14px;
  color: rgba(234, 238, 245, .55);
  pointer-events: none;
}
.quiz-actions{ display: flex; gap: 12px; margin-top: 10px; }
.quiz-actions .btn-primary{ padding: 10px 14px; border-radius: 12px; }

/* =========================
   LIST (Quiz result)
   ========================= */
.list{
  display: grid;
  gap: 12px;
  margin: 14px 0 0;
}

.list-item{
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;

  padding: 14px 16px;
  border-radius: 16px;

  background: rgba(10, 14, 22, 0.52);
  border: 1px solid rgba(255,255,255,0.10);
  box-shadow: 0 12px 30px rgba(0,0,0,.22);

  color: rgba(234,238,245,0.92);
  font-weight: 650;
  letter-spacing: .1px;

  transition: transform .16s ease, border-color .16s ease, background .16s ease;
}

.list-item::after{
  content: "→";
  color: rgba(234,238,245,0.60);
  font-weight: 800;
}

.list-item:hover{
  transform: translateY(-2px);
  border-color: rgba(90,140,255,0.22);
  background: rgba(10, 14, 22, 0.62);
}

.list-item:focus-visible{
  outline: 3px solid rgba(90, 140, 255, .55);
  outline-offset: 3px;
  border-radius: 16px;
}

/* =========================
   Footer
   ========================= */
.footer{
  margin-top: 46px;
  padding: 22px 0;
  background: rgba(6,10,16,0.50);
  border-top: 1px solid rgba(255,255,255,0.08);
}

.footer-inner{
  width: min(var(--maxw), calc(100% - 48px));
  margin: 0 auto;
  color: rgba(234,238,245,0.78);
  font-size: 13px;
}

/* Responsive */
@media (max-width: 900px){
  .grid{ grid-template-columns: 1fr; }
  .mini-grid{ grid-template-columns: 1fr; }
  .hub-grid{ grid-template-columns: 1fr; }
  .hero{ padding: 56px 0 30px; }
  .hero h1{ font-size: clamp(34px, 8vw, 56px); }
  .topbar-inner{ padding: 14px 0; }
}
@media (max-width: 560px){
  .quiz-row{ grid-template-columns: 1fr; }
  .quiz-row::after{ right: 18px; top: 54px; }
}
