@import url('https://fonts.googleapis.com/css2?family=Syne:wght@700;800&family=DM+Sans:opsz,wght@9..40,400;9..40,500;9..40,600&display=swap');

/* ─── TOKENS ─── */
:root {
  --beige:       #fddeab;
  --beige-mid:   #f0c878;
  --beige-dark:  #deb060;
  --beige-card:  #fffbf4;
  --blue:        #3281af;
  --blue-dark:   #1d5e8c;
  --blue-light:  #e6f2fb;
  --blue-mid:    #b8d8ef;
  --navy:        #132640;
  --teal:        #2d7080;
  --white:       #ffffff;
  --text:        #1a2f3a;
  --muted:       #5a7282;
  --success:     #2d8c5a;
  --shadow:      0 2px 14px rgba(19,38,64,.07);
  --shadow-lg:   0 8px 30px rgba(19,38,64,.13);
  --r:           18px;
  --r-sm:        10px;
  --r-pill:      100px;
  --max:         1120px;
}

*, *::before, *::after { margin:0; padding:0; box-sizing:border-box; }
html { scroll-behavior: smooth; }

body {
  background: var(--beige);
  color: var(--text);
  font-family: 'DM Sans', sans-serif;
  font-size: 16px;
  line-height: 1.65;
  min-height: 100vh;
}

img { max-width: 100%; display: block; }
a  { color: inherit; text-decoration: none; }

/* ─── NAVBAR ─── */
.navbar {
  position: sticky; top: 0; z-index: 100;
  height: 68px;
  background: rgba(253,222,171,.93);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1.5px solid var(--beige-mid);
}
.nav-inner {
  max-width: var(--max); margin: 0 auto; padding: 0 28px;
  height: 100%; display: flex; align-items: center; justify-content: space-between; gap: 16px;
}
.nav-logo img { height: 40px; }
.nav-links { display: flex; align-items: center; gap: 6px; }
.nav-link {
  font-size: 15px; font-weight: 500; color: var(--muted);
  padding: 8px 14px; border-radius: var(--r-pill);
  transition: all .2s;
}
.nav-link:hover { color: var(--navy); background: var(--beige-mid); }

/* ─── BUTTONS ─── */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 10px 22px; border-radius: var(--r-pill);
  font-family: 'DM Sans', sans-serif; font-size: 15px; font-weight: 600;
  cursor: pointer; border: none; transition: all .2s;
}
.btn-primary { background: var(--blue); color: #fff; }
.btn-primary:hover { background: var(--blue-dark); transform: translateY(-1px); box-shadow: 0 4px 16px rgba(50,129,175,.35); }
.btn-outline { background: transparent; border: 1.5px solid var(--blue); color: var(--blue); }
.btn-outline:hover { background: var(--blue-light); }
.btn-full { width: 100%; justify-content: center; padding: 14px; font-size: 16px; }

/* ─── LAYOUT ─── */
.container { max-width: var(--max); margin: 0 auto; padding: 0 28px; }

/* ─── LIVE BANNER ─── */
.live-banner {
  background: var(--navy); color: rgba(255,255,255,.85);
  padding: 10px 28px;
  display: flex; align-items: center; justify-content: center; gap: 12px;
  font-size: 14px; font-weight: 500;
}
.live-dot {
  width: 8px; height: 8px; border-radius: 50%; background: #ff4b4b; flex-shrink: 0;
  animation: blink 1.6s ease-in-out infinite;
}
@keyframes blink { 0%,100%{opacity:1;transform:scale(1)} 50%{opacity:.4;transform:scale(.8)} }
#live-count { font-weight: 700; color: var(--beige); }

/* ─── HERO ─── */
.hero { padding: 56px 0 32px; text-align: center; }
.eyebrow {
  display: inline-flex; align-items: center; gap: 6px;
  background: var(--blue-light); color: var(--blue);
  font-size: 12px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase;
  padding: 6px 16px; border-radius: var(--r-pill); margin-bottom: 22px;
}
.hero h1 {
  font-family: 'Syne', sans-serif;
  font-size: clamp(34px, 5.5vw, 60px);
  font-weight: 800; color: var(--navy);
  line-height: 1.08; margin-bottom: 18px; letter-spacing: -.025em;
}
.hero h1 span { color: var(--blue); }
.hero-sub { font-size: 18px; color: var(--muted); max-width: 520px; margin: 0 auto; }

/* ─── FEATURED CARD ─── */
.featured-card {
  background: var(--white); border-radius: var(--r);
  box-shadow: var(--shadow-lg);
  padding: 38px 40px;
  margin: 32px auto; max-width: 740px;
  position: relative; overflow: hidden;
}
.featured-card::before {
  content: ''; position: absolute; top: 0; left: 0; right: 0; height: 4px;
  background: linear-gradient(90deg, var(--teal), var(--blue), #7dbfe0);
}

/* ─── CARD META ─── */
.card-meta { display: flex; align-items: center; gap: 10px; margin-bottom: 18px; flex-wrap: wrap; }
.card-date { font-size: 13px; color: var(--muted); margin-left: auto; }

/* ─── CATEGORY PILLS ─── */
.cat-pill {
  display: inline-flex; align-items: center;
  padding: 4px 12px; border-radius: var(--r-pill);
  font-size: 11px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase;
}
.politique    { background:#eaedff; color:#3a52c7; }
.economie     { background:#edfff5; color:#1a7a48; }
.societe      { background:#fff4ea; color:#c46a1e; }
.environnement{ background:#ebfff2; color:#1a7a3a; }
.tech         { background:#f2eeff; color:#6a38c7; }
.culture      { background:#fff0f9; color:#c7386a; }

.trending-badge { display: inline-flex; align-items: center; gap: 4px; font-size: 13px; color: var(--muted); font-weight: 500; }

/* ─── QUESTION TEXT ─── */
.featured-question {
  font-family: 'Syne', sans-serif;
  font-size: clamp(20px, 3vw, 28px);
  font-weight: 800; color: var(--navy);
  line-height: 1.22; margin-bottom: 12px;
}
.question-desc { font-size: 15px; color: var(--muted); margin-bottom: 30px; line-height: 1.6; }

/* ─── VOTE BUTTONS ─── */
.vote-prompt {
  font-size: 12px; font-weight: 700; color: var(--muted);
  letter-spacing: .08em; text-transform: uppercase; margin-bottom: 12px;
}
.vote-options { display: flex; flex-direction: column; gap: 10px; }
.vote-btn {
  width: 100%; padding: 15px 20px;
  border-radius: var(--r-sm);
  border: 2px solid var(--beige-mid);
  background: var(--beige-card);
  color: var(--navy);
  font-family: 'DM Sans', sans-serif; font-size: 16px; font-weight: 600;
  cursor: pointer; text-align: left;
  display: flex; align-items: center; gap: 14px;
  transition: all .2s;
}
.vote-btn-letter {
  width: 28px; height: 28px; border-radius: 8px; flex-shrink: 0;
  background: var(--beige-mid); color: var(--navy);
  display: flex; align-items: center; justify-content: center;
  font-size: 13px; font-weight: 800;
  transition: all .2s;
}
.vote-btn:hover { border-color: var(--blue); background: var(--blue-light); color: var(--blue-dark); transform: translateX(5px); }
.vote-btn:hover .vote-btn-letter { background: var(--blue); color: #fff; }
.vote-btn.voted { border-color: var(--blue); background: var(--blue); color: #fff; transform: none; }
.vote-btn.voted .vote-btn-letter { background: rgba(255,255,255,.25); color: #fff; }
.vote-btn.not-voted { opacity: .45; transform: none; }

/* ─── RESULTS ─── */
.results-section { display: none; margin-top: 28px; animation: fadeUp .4s ease; }
.results-section.visible { display: block; }
@keyframes fadeUp { from{opacity:0;transform:translateY(12px)} to{opacity:1;transform:translateY(0)} }

.result-item { margin-bottom: 18px; }
.result-label {
  display: flex; justify-content: space-between; align-items: center;
  margin-bottom: 7px; font-size: 15px; font-weight: 500;
}
.option-name { display: flex; align-items: center; gap: 8px; }
.my-vote-tag {
  font-size: 11px; background: var(--blue); color: #fff;
  padding: 2px 9px; border-radius: var(--r-pill); font-weight: 700; letter-spacing: .02em;
}
.pct { font-weight: 800; color: var(--navy); font-size: 16px; }

.result-bar-bg { height: 10px; background: var(--beige); border-radius: var(--r-pill); overflow: hidden; }
.result-bar-fill {
  height: 100%; border-radius: var(--r-pill);
  background: var(--blue-mid); width: 0%;
  transition: width .85s cubic-bezier(.22,1,.36,1);
}
.result-bar-fill.my-bar { background: linear-gradient(90deg, var(--blue), var(--teal)); }

.results-total { margin-top: 14px; font-size: 13px; color: var(--muted); }
.results-total strong { color: var(--navy); font-weight: 800; }

/* ─── SHARE ─── */
.share-section {
  display: none; margin-top: 24px;
  padding-top: 22px; border-top: 1.5px solid var(--beige-mid);
  animation: fadeUp .4s ease .15s both;
}
.share-section.visible { display: block; }
.share-label {
  font-size: 12px; font-weight: 700; color: var(--muted);
  text-transform: uppercase; letter-spacing: .08em; margin-bottom: 12px;
}
.share-buttons { display: flex; gap: 10px; flex-wrap: wrap; }
.share-btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 9px 18px; border-radius: var(--r-pill);
  font-family: 'DM Sans', sans-serif; font-size: 14px; font-weight: 600;
  cursor: pointer; border: 1.5px solid var(--beige-mid); background: #fff; color: var(--navy);
  transition: all .2s;
}
.share-btn:hover { border-color: var(--blue); color: var(--blue); transform: translateY(-2px); box-shadow: 0 4px 14px rgba(50,129,175,.18); }
.share-btn.copied { background: var(--success); color: #fff; border-color: var(--success); }

/* ─── FILTERS ─── */
.filters-section { padding: 16px 0 20px; }
.filters-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.filter-pill {
  padding: 8px 18px; border-radius: var(--r-pill);
  border: 1.5px solid transparent; background: #fff; color: var(--muted);
  font-family: 'DM Sans', sans-serif; font-size: 14px; font-weight: 600;
  cursor: pointer; white-space: nowrap; transition: all .18s;
}
.filter-pill:hover { color: var(--blue); border-color: var(--blue-mid); }
.filter-pill.active { background: var(--blue); color: #fff; border-color: var(--blue); }

/* ─── SEARCH ─── */
.search-wrap { position: relative; margin-bottom: 28px; max-width: 480px; }
.search-icon { position: absolute; left: 16px; top: 50%; transform: translateY(-50%); color: var(--muted); }
.search-input {
  width: 100%; padding: 12px 18px 12px 46px;
  border-radius: var(--r-pill); border: 1.5px solid var(--beige-mid);
  background: #fff; font-family: 'DM Sans', sans-serif; font-size: 15px; color: var(--text);
  outline: none; transition: all .2s;
}
.search-input:focus { border-color: var(--blue); box-shadow: 0 0 0 3px rgba(50,129,175,.12); }
.search-input::placeholder { color: var(--muted); }

/* ─── GRID ─── */
.section-title {
  font-family: 'Syne', sans-serif; font-size: 22px; font-weight: 800; color: var(--navy);
  margin-bottom: 20px; display: flex; align-items: center; gap: 10px;
}
.questions-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(300px,1fr));
  gap: 20px; margin-bottom: 56px;
}
.question-card {
  background: #fff; border-radius: var(--r);
  box-shadow: var(--shadow); padding: 24px;
  display: flex; flex-direction: column; gap: 12px;
  border: 1.5px solid transparent;
  transition: all .25s;
}
.question-card:hover { box-shadow: var(--shadow-lg); transform: translateY(-4px); border-color: var(--blue-mid); }
.question-card-title { font-family:'Syne',sans-serif; font-size:17px; font-weight:800; color:var(--navy); line-height:1.28; }
.question-card-stats { display:flex; align-items:center; justify-content:space-between; font-size:13px; color:var(--muted); }
.votes-count { font-weight:700; color:var(--navy); }

.mini-bar { height:5px; background:var(--beige); border-radius:var(--r-pill); overflow:hidden; display:flex; }
.mini-bar-seg { height:100%; }

.no-results { grid-column:1/-1; text-align:center; padding:56px 24px; color:var(--muted); }
.no-results h3 { font-family:'Syne',sans-serif; font-size:20px; color:var(--navy); margin-bottom:8px; }

/* ─── TRANSPARENCY STRIP ─── */
.transparency-strip {
  background: var(--navy); color: rgba(255,255,255,.8);
  padding: 40px 28px; text-align: center;
}
.transparency-strip h3 { font-family:'Syne',sans-serif; font-size:20px; font-weight:800; color:#fff; margin-bottom:10px; }
.transparency-strip p { font-size:15px; max-width:580px; margin:0 auto 20px; line-height:1.6; }
.transparency-link { font-size:14px; font-weight:700; color:var(--beige); text-decoration:underline; text-underline-offset:3px; }
.transparency-link:hover { color:#fff; }

/* ─── FOOTER ─── */
footer {
  background: var(--navy); color: rgba(255,255,255,.5);
  padding: 24px 28px; text-align: center; font-size: 13px;
  border-top: 1px solid rgba(255,255,255,.08);
}
footer a { color: rgba(253,222,171,.8); font-weight:500; }
footer a:hover { color: var(--beige); }

/* ─── AUTH ─── */
.auth-page { min-height:100vh; display:flex; align-items:center; justify-content:center; padding:40px 24px; }
.auth-card {
  background:#fff; border-radius:var(--r); box-shadow:var(--shadow-lg);
  padding:40px; width:100%; max-width:440px;
}
.auth-logo { text-align:center; margin-bottom:28px; }
.auth-logo img { height:44px; margin:0 auto 14px; }
.auth-logo p { font-size:15px; color:var(--muted); }
.auth-tabs {
  display:flex; background:var(--beige); border-radius:var(--r-pill);
  padding:4px; margin-bottom:28px; gap:4px;
}
.auth-tab {
  flex:1; padding:9px; border-radius:var(--r-pill); border:none;
  background:transparent; font-family:'DM Sans',sans-serif; font-size:14px; font-weight:600;
  color:var(--muted); cursor:pointer; transition:all .2s;
}
.auth-tab.active { background:#fff; color:var(--navy); box-shadow:0 2px 8px rgba(0,0,0,.08); }
.form-group { margin-bottom:18px; }
.form-label { display:block; font-size:14px; font-weight:600; color:var(--navy); margin-bottom:8px; }
.form-input {
  width:100%; padding:12px 16px; border-radius:var(--r-sm);
  border:1.5px solid var(--beige-mid); background:var(--beige);
  font-family:'DM Sans',sans-serif; font-size:15px; color:var(--text); outline:none; transition:all .2s;
}
.form-input:focus { border-color:var(--blue); background:#fff; box-shadow:0 0 0 3px rgba(50,129,175,.12); }
.form-hint { font-size:12px; color:var(--muted); margin-top:6px; }
.auth-legal { font-size:12px; color:var(--muted); text-align:center; margin-top:20px; line-height:1.65; }
.auth-legal a { color:var(--blue); text-decoration:underline; }

/* ─── TRANSPARENCY PAGE ─── */
.transp-hero { padding:64px 0 40px; text-align:center; }
.transp-hero h1 {
  font-family:'Syne',sans-serif; font-size:clamp(28px,4.5vw,50px);
  font-weight:800; color:var(--navy); margin-bottom:18px; letter-spacing:-.02em;
}
.transp-hero p { font-size:18px; color:var(--muted); max-width:580px; margin:0 auto; line-height:1.6; }
.transp-grid {
  display:grid; grid-template-columns:repeat(auto-fill,minmax(280px,1fr));
  gap:22px; padding:32px 0 48px;
}
.transp-card { background:#fff; border-radius:var(--r); padding:28px; box-shadow:var(--shadow); }
.transp-icon { font-size:34px; margin-bottom:16px; }
.transp-card h3 { font-family:'Syne',sans-serif; font-size:18px; font-weight:800; color:var(--navy); margin-bottom:10px; }
.transp-card p { font-size:15px; color:var(--muted); line-height:1.6; }

/* ─── QUESTION DETAIL PAGE ─── */
.question-detail { max-width:740px; margin:0 auto; padding:40px 28px 64px; }
.question-detail h1 {
  font-family:'Syne',sans-serif; font-size:clamp(24px,4vw,38px);
  font-weight:800; color:var(--navy); line-height:1.2; margin-bottom:18px;
}
.back-link {
  display:inline-flex; align-items:center; gap:6px;
  color:var(--muted); font-size:14px; font-weight:600;
  margin-bottom:28px; transition:color .2s;
}
.back-link:hover { color:var(--blue); }

/* ─── RESPONSIVE ─── */
@media (max-width:640px) {
  .featured-card { padding:26px 22px; }
  .questions-grid { grid-template-columns:1fr; }
  .share-buttons { flex-direction:column; }
  .nav-link { display:none; }
  .filters-row { overflow-x:auto; flex-wrap:nowrap; padding-bottom:6px; -ms-overflow-style:none; scrollbar-width:none; }
  .filters-row::-webkit-scrollbar { display:none; }
  .hero h1 { font-size:clamp(28px,8vw,40px); }
}
