/* ── VARIABLES & RESET ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg: #F5F2EC;
  --surface: #FFFFFF;
  --text: #1A1A18;
  --muted: #6B6B66;
  --border: rgba(26,26,24,0.10);
  --sport: #0F6E56; --sport-bg: #E1F5EE; --sport-accent: #1D9E75;
  --reflexion: #3C3489; --reflexion-bg: #EEEDFE; --reflexion-accent: #7F77DD;
  --creatif: #633806; --creatif-bg: #FAEEDA; --creatif-accent: #EF9F27;
  --social: #0C447C; --social-bg: #E6F1FB; --social-accent: #378ADD;
  --nature: #27500A; --nature-bg: #EAF3DE; --nature-accent: #639922;
  --diff: #993C1D; --diff-bg: #FAECE7;
  --tip: #0F6E56; --tip-bg: #E1F5EE;
  --radius: 14px; --radius-sm: 8px;
  --accent: #2D1B6E; /* Sophie Banner Color */
}

html { scroll-behavior: smooth; }

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

/* ── SOPHIE BANNER ── */
.sophie-banner {
  background: var(--accent);
  color: #fff;
  padding: 2.8rem 2rem 2.4rem;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.sophie-banner::before {
  content: '';
  position: absolute; top: -70px; left: -70px;
  width: 260px; height: 260px; border-radius: 50%;
  background: rgba(127,119,221,0.18);
}
.sophie-banner::after {
  content: '';
  position: absolute; bottom: -50px; right: -50px;
  width: 200px; height: 200px; border-radius: 50%;
  background: rgba(127,119,221,0.12);
}
.sophie-stars {
  position: absolute; inset: 0; overflow: hidden; pointer-events: none;
}
.star {
  position: absolute;
  width: 3px; height: 3px; border-radius: 50%;
  background: rgba(255,255,255,0.5);
  animation: twinkle 3s ease-in-out infinite;
}
@keyframes twinkle {
  0%,100% { opacity: 0.2; transform: scale(1); }
  50% { opacity: 1; transform: scale(1.6); }
}
.sophie-inner { position: relative; z-index: 1; max-width: 700px; margin: 0 auto; }
.sophie-cap { font-size: 3rem; margin-bottom: 0.5rem; display: block; animation: float 3s ease-in-out infinite; }
@keyframes float { 0%,100% { transform: translateY(0) rotate(-5deg); } 50% { transform: translateY(-8px) rotate(5deg); } }
.sophie-pretitle {
  font-family: 'Syne', sans-serif;
  font-size: 11px; font-weight: 600; letter-spacing: 0.16em;
  text-transform: uppercase; color: rgba(200,195,255,0.7);
  margin-bottom: 0.6rem; display: block;
}
.sophie-name {
  font-family: 'Syne', sans-serif;
  font-size: clamp(2rem, 5.5vw, 3rem);
  font-weight: 800; letter-spacing: -0.02em; line-height: 1.1;
  margin-bottom: 0.9rem;
  color: #fff;
}
.sophie-name .highlight {
  background: linear-gradient(90deg, #A89CF7, #E0BBFF);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  background-clip: text;
}
.sophie-msg {
  font-size: 15px; line-height: 1.75;
  color: rgba(220,215,255,0.85);
  max-width: 560px; margin: 0 auto 1.4rem;
  font-weight: 300;
}
.sophie-msg strong { color: #fff; font-weight: 500; }
.sophie-pills {
  display: flex; gap: 8px; justify-content: center; flex-wrap: wrap;
  margin-bottom: 0.5rem;
}
.sophie-pill {
  font-family: 'Syne', sans-serif; font-size: 11px; font-weight: 700;
  letter-spacing: 0.06em; text-transform: uppercase;
  background: rgba(127,119,221,0.22);
  border: 1px solid rgba(168,156,247,0.35);
  color: #C8C3FF; padding: 5px 14px; border-radius: 40px;
}

/* ── HERO ── */
.hero {
  background: var(--text); color: #F5F2EC;
  padding: 3.5rem 2rem 2.8rem;
  position: relative; overflow: hidden;
}
.hero::before {
  content: ''; position: absolute; top: -80px; right: -80px;
  width: 320px; height: 320px; border-radius: 50%;
  background: rgba(255,255,255,0.04);
}
.hero::after {
  content: ''; position: absolute; bottom: -40px; left: 60px;
  width: 180px; height: 180px; border-radius: 50%;
  background: rgba(255,255,255,0.03);
}
.hero-inner { max-width: 960px; margin: 0 auto; position: relative; z-index: 1; }
.hero-tag {
  display: inline-block; font-family: 'Syne', sans-serif;
  font-size: 11px; font-weight: 600; letter-spacing: 0.12em;
  text-transform: uppercase; color: rgba(245,242,236,0.5); margin-bottom: 1.25rem;
}
.hero h1 {
  font-family: 'Syne', sans-serif; font-size: clamp(2rem, 5vw, 3.2rem);
  font-weight: 800; line-height: 1.05; margin-bottom: 1rem; letter-spacing: -0.02em;
}
.hero h1 em { font-style: normal; color: rgba(245,242,236,0.45); }
.hero-desc {
  font-size: 15px; color: rgba(245,242,236,0.6);
  max-width: 520px; line-height: 1.7; margin-bottom: 2rem;
}
.hero-stats { display: flex; gap: 2rem; flex-wrap: wrap; }
.stat { display: flex; flex-direction: column; gap: 2px; }
.stat-num { font-family: 'Syne', sans-serif; font-size: 1.8rem; font-weight: 700; color: #F5F2EC; }
.stat-label { font-size: 12px; color: rgba(245,242,236,0.5); letter-spacing: 0.04em; }

/* ── FILTER BAR ── */
.filter-section {
  background: var(--surface); border-bottom: 1px solid var(--border);
  position: sticky; top: 0; z-index: 100;
  box-shadow: 0 2px 20px rgba(0,0,0,0.06);
}
.filter-inner {
  max-width: 960px; margin: 0 auto; padding: 0.9rem 2rem;
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
}
.filter-label { font-size: 12px; color: var(--muted); font-weight: 500; margin-right: 4px; white-space: nowrap; }
.filter-btn {
  display: flex; align-items: center; gap: 6px;
  font-family: 'DM Sans', sans-serif; font-size: 13px; font-weight: 500;
  padding: 6px 14px; border-radius: 40px;
  border: 1.5px solid var(--border);
  background: transparent; color: var(--muted);
  cursor: pointer; transition: all 0.18s ease; white-space: nowrap;
}
.filter-btn:hover { border-color: var(--text); color: var(--text); }
.filter-btn.active { background: var(--text); color: #F5F2EC; border-color: var(--text); }
.dot { width: 7px; height: 7px; border-radius: 50%; flex-shrink: 0; }

/* ── MAIN ── */
main { max-width: 960px; margin: 0 auto; padding: 2rem; }
.section-header {
  display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 1.25rem;
}
.section-title {
  font-family: 'Syne', sans-serif; font-size: 13px; font-weight: 600;
  letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted);
}
.visible-count { font-size: 13px; color: var(--muted); }

/* ── GRID & CARDS ── */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 14px; }

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.1rem 1.2rem;
  display: flex; flex-direction: column;
  position: relative; overflow: hidden;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
  animation: fadeIn 0.3s ease both;
  cursor: default;
}
@keyframes fadeIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }

.card:hover { transform: translateY(-3px); box-shadow: 0 12px 40px rgba(0,0,0,0.1); border-color: rgba(26,26,24,0.22); }

.card-overlay {
  position: absolute; inset: 0;
  border-radius: var(--radius);
  padding: 1.1rem 1.2rem;
  display: flex; flex-direction: column; gap: 0.6rem;
  opacity: 0;
  transition: opacity 0.22s ease;
  pointer-events: none;
  overflow-y: auto;
}
.card:hover .card-overlay { opacity: 1; pointer-events: auto; }
.card:hover .card-front { opacity: 0; transition: opacity 0.18s ease; }
.card-front { transition: opacity 0.22s ease; }

.overlay-title {
  font-family: 'Syne', sans-serif; font-size: 13px; font-weight: 700;
  margin-bottom: 2px; letter-spacing: -0.01em;
}
.overlay-section { margin-bottom: 0.5rem; }
.overlay-label {
  font-size: 10px; font-weight: 700; letter-spacing: 0.09em;
  text-transform: uppercase; margin-bottom: 3px; display: block;
}
.overlay-text { font-size: 12.5px; line-height: 1.55; }

/* overlays colors */
.overlay-sport { background: var(--sport); }
.overlay-sport .overlay-title, .overlay-sport .overlay-text { color: #fff; }
.overlay-sport .overlay-label { color: rgba(255,255,255,0.6); }
.overlay-sport .ol-sep { border-color: rgba(255,255,255,0.2); }

.overlay-reflexion { background: var(--reflexion); }
.overlay-reflexion .overlay-title, .overlay-reflexion .overlay-text { color: #fff; }
.overlay-reflexion .overlay-label { color: rgba(255,255,255,0.6); }
.overlay-reflexion .ol-sep { border-color: rgba(255,255,255,0.2); }

.overlay-creatif { background: var(--creatif); }
.overlay-creatif .overlay-title, .overlay-creatif .overlay-text { color: #fff; }
.overlay-creatif .overlay-label { color: rgba(255,255,255,0.6); }
.overlay-creatif .ol-sep { border-color: rgba(255,255,255,0.2); }

.overlay-social { background: var(--social); }
.overlay-social .overlay-title, .overlay-social .overlay-text { color: #fff; }
.overlay-social .overlay-label { color: rgba(255,255,255,0.6); }
.overlay-social .ol-sep { border-color: rgba(255,255,255,0.2); }

.overlay-nature { background: var(--nature); }
.overlay-nature .overlay-title, .overlay-nature .overlay-text { color: #fff; }
.overlay-nature .overlay-label { color: rgba(255,255,255,0.6); }
.overlay-nature .ol-sep { border-color: rgba(255,255,255,0.2); }

.ol-sep { border: none; border-top: 1px solid; margin: 0.4rem 0; }

/* card front */
.card-header { display: flex; align-items: flex-start; justify-content: space-between; margin-bottom: 0.6rem; gap: 8px; }
.badge {
  font-family: 'Syne', sans-serif; font-size: 10px; font-weight: 700;
  letter-spacing: 0.08em; text-transform: uppercase;
  padding: 3px 10px; border-radius: 40px; flex-shrink: 0;
}
.badge-sport { background: var(--sport-bg); color: var(--sport); }
.badge-reflexion { background: var(--reflexion-bg); color: var(--reflexion); }
.badge-creatif { background: var(--creatif-bg); color: var(--creatif); }
.badge-social { background: var(--social-bg); color: var(--social); }
.badge-nature { background: var(--nature-bg); color: var(--nature); }

.card-num {
  font-family: 'Syne', sans-serif; font-size: 11px; font-weight: 600;
  color: rgba(26,26,24,0.2); flex-shrink: 0;
}
.card-title {
  font-family: 'Syne', sans-serif; font-size: 15px; font-weight: 700;
  color: var(--text); margin-bottom: 0.4rem; line-height: 1.3;
}
.card-intro {
  font-size: 13.5px; color: var(--muted); line-height: 1.6;
  margin-bottom: 0.9rem; font-style: italic; font-weight: 300;
}
.divider { border: none; border-top: 1px solid var(--border); margin-bottom: 0.75rem; }
.info-row { display: flex; gap: 8px; align-items: flex-start; margin-bottom: 0.5rem; }
.info-row:last-child { margin-bottom: 0; }
.info-icon {
  width: 20px; height: 20px; border-radius: 6px;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0; margin-top: 1px;
}
.icon-diff { background: var(--diff-bg); }
.icon-tip { background: var(--tip-bg); }
.info-icon svg { width: 11px; height: 11px; }
.info-text { font-size: 12.5px; line-height: 1.5; }
.info-text strong { font-weight: 500; display: block; font-size: 11px; letter-spacing: 0.04em; text-transform: uppercase; margin-bottom: 1px; }
.diff-label { color: var(--diff); }
.tip-label { color: var(--tip); }
.diff-content { color: #5a2a1a; }
.tip-content { color: #1a3d12; }

.hover-hint {
  font-size: 11px; color: var(--muted); text-align: center;
  margin-top: auto; padding-top: 0.6rem;
  letter-spacing: 0.02em; opacity: 0.7;
  font-style: italic;
}

/* Legend */
.legend {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 1.25rem 1.5rem;
  margin-bottom: 1.5rem; display: flex; flex-wrap: wrap;
  gap: 1rem 2rem; align-items: center;
}
.legend-title {
  font-family: 'Syne', sans-serif; font-size: 11px; font-weight: 600;
  text-transform: uppercase; letter-spacing: 0.08em; color: var(--muted); width: 100%; margin-bottom: 0.25rem;
}
.legend-item { display: flex; align-items: center; gap: 7px; font-size: 13px; color: var(--muted); }
.legend-dot { width: 8px; height: 8px; border-radius: 50%; }
.empty { text-align: center; padding: 4rem 2rem; color: var(--muted); font-size: 14px; display: none; }

/* Footer */
footer {
  max-width: 960px; margin: 2rem auto 0; padding: 1.5rem 2rem 2.5rem;
  border-top: 1px solid var(--border);
  display: flex; align-items: center; justify-content: space-between;
  flex-wrap: wrap; gap: 1rem;
}
.footer-note { font-size: 12px; color: var(--muted); }
.footer-cats { display: flex; gap: 6px; flex-wrap: wrap; }
.footer-tag { font-size: 11px; padding: 3px 10px; border-radius: 40px; font-weight: 500; }

@media (max-width: 600px) {
  .sophie-banner { padding: 2rem 1.25rem 1.8rem; }
  .hero { padding: 2.5rem 1.25rem 2rem; }
  main { padding: 1.5rem 1.25rem; }
  .filter-inner { padding: 0.8rem 1.25rem; }
  .grid { grid-template-columns: 1fr; }
}

/* ── PAGE POLITIQUE (nLPD SUISSE) ── */
.policy-body {
  padding: 2rem;
}

.policy-container {
  max-width: 800px;
  margin: 2rem auto;
  padding: 3rem;
  background: var(--surface);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  box-shadow: 0 4px 30px rgba(0,0,0,0.03);
}

.policy-container h1 {
  font-family: 'Syne', sans-serif;
  font-size: 2.2rem;
  color: var(--accent);
  margin-bottom: 1.5rem;
  line-height: 1.1;
}

.policy-container h2 {
  font-family: 'Syne', sans-serif;
  font-size: 1.3rem;
  color: var(--text);
  margin: 2.5rem 0 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid var(--bg);
}

.policy-container p, .policy-container li {
  color: var(--muted);
  font-size: 15px;
  margin-bottom: 1rem;
}

.policy-container ul {
  padding-left: 1.5rem;
  margin-bottom: 1.5rem;
}

.policy-container strong {
  color: var(--text);
}

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  color: var(--accent);
  font-family: 'Syne', sans-serif;
  font-weight: 700;
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 2rem;
  transition: opacity 0.2s;
}

.back-link:hover { opacity: 0.7; }

.policy-footer {
  text-align: center;
  margin-top: 3rem;
  padding-top: 2rem;
  border-top: 1px solid var(--border);
  font-size: 12px;
  color: var(--muted);
}

@media (max-width: 600px) {
  .policy-container { padding: 1.5rem; margin: 1rem auto; }
  .policy-container h1 { font-size: 1.8rem; }
}

/* ── POPUP COOKIES MODAL ── */
.cookie-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(5px);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 3000;
    padding: 20px;
}

.cookie-modal {
    background: var(--surface);
    width: 100%;
    max-width: 380px;
    padding: 2.5rem 2rem;
    border-radius: 20px;
    box-shadow: 0 25px 80px rgba(0,0,0,0.4);
    text-align: center;
    animation: popIn 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@keyframes popIn {
    from { transform: scale(0.9); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}

.cookie-icon { font-size: 3.5rem; margin-bottom: 1rem; }

.cookie-text h3 {
    font-family: 'Syne', sans-serif;
    font-size: 1.3rem;
    margin-bottom: 12px;
    color: var(--text);
}

.cookie-text p {
    font-size: 14px;
    color: var(--muted);
    line-height: 1.6;
    margin-bottom: 25px;
}

.cookie-actions {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
}

/* LE GROS BOUTON */
.cookie-btn.primary {
    width: 100%;
    padding: 16px;
    background: var(--text);
    color: white;
    border: none;
    border-radius: 50px;
    font-family: 'DM Sans', sans-serif;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
}

.cookie-btn.primary:hover {
    transform: translateY(-2px);
    background: #000;
}

/* LE PETIT LIEN REFUSER */
.cookie-link {
    background: none;
    border: none;
    color: var(--muted);
    font-size: 12px;
    text-decoration: underline;
    cursor: pointer;
    opacity: 0.7;
    transition: opacity 0.2s;
}

.cookie-link:hover {
    opacity: 1;
    color: var(--diff); /* Une petite touche de rouge/brun pour le "refus" */
}

.policy-mini-link {
    font-size: 11px;
    color: var(--muted);
    text-decoration: none;
    margin-top: 5px;
}

.policy-mini-link:hover { text-decoration: underline; }

/* ── FOOTER GLOBAL ── */
.site-footer {
    max-width: 960px;
    margin: 4rem auto 0;
    padding: 3rem 2rem;
    border-top: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
    text-align: center;
}

.footer-credits {
    font-size: 13px;
    color: var(--muted);
    font-weight: 500;
}

.footer-credits strong {
    color: var(--text);
    font-family: 'Syne', sans-serif;
}

.footer-links {
    display: flex;
    gap: 20px;
    align-items: center;
}

.footer-link {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    text-decoration: none;
    color: var(--muted);
    font-weight: 700;
    transition: color 0.2s;
}

.footer-link:hover {
    color: var(--accent);
}

.footer-tag-swiss {
    font-size: 10px;
    background: var(--diff-bg);
    color: var(--diff);
    padding: 4px 10px;
    border-radius: 40px;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 5px;
}

.footer-tag-swiss::before {
    content: '🇨🇭';
}

/* Version mobile */
@media (max-width: 600px) {
    .site-footer {
        padding: 2rem 1.25rem;
        margin-top: 2rem;
    }
    .footer-links {
        flex-direction: column;
        gap: 10px;
    }
}