/* ============================================================
   epargnezbien.fr — layout.css  (v6 · Light Corporate Futuriste)
   Nav, hero, quiz, catégories, liens, footer
   ============================================================ */

/* ════════════════════════════════════════════
   NAV — blanc pur, bordure fine, centré grid
   ════════════════════════════════════════════ */
.nav {
  position: sticky; top: 0; z-index: 300;
  height: 62px;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  padding: 0 36px;
  background: rgba(253,252,250,.96);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--mist);
  box-shadow: var(--sh-xs);
}
.nav-logo {
  font-family: var(--fdi);
  font-weight: 900;
  font-size: 1.15rem;
  letter-spacing: -.03em;
  color: var(--ink);
  justify-self: start;
  display: flex; align-items: center; gap: 2px;
}
.nav-logo span { color: var(--green-d); }
.nav-logo::before {
  content: '';
  width: 7px; height: 7px;
  background: var(--green);
  border-radius: 50%;
  margin-right: 8px;
  animation: pulse 2.4s ease infinite;
}
.nav-links {
  display: flex; align-items: center; gap: 2px;
  justify-self: center;
}
.nav-links a {
  padding: 5px 13px;
  border-radius: 20px;
  font-size: .8rem;
  font-weight: 500;
  color: var(--graphite);
  transition: var(--ease);
  white-space: nowrap;
}
.nav-links a:hover { background: var(--cloud); color: var(--ink); }
.nav-pill {
  background: var(--ink) !important;
  color: var(--cream) !important;
  font-weight: 600 !important;
}
.nav-pill:hover { background: var(--green-d) !important; color: var(--white) !important; }
.nav-end { justify-self: end; }

/* ════════════════════════════════════════════
   HERO
   ════════════════════════════════════════════ */
.hero {
  position: relative;
  padding: 108px 44px 96px;
  text-align: center;
  overflow: hidden;
  background: var(--white);
}
/* Grille géométrique fine en fond */
.hero::before {
  content: '';
  position: absolute; inset: 0; pointer-events: none;
  background-image:
    linear-gradient(var(--mist) 1px, transparent 1px),
    linear-gradient(90deg, var(--mist) 1px, transparent 1px);
  background-size: 52px 52px;
  mask-image: radial-gradient(ellipse 85% 75% at 50% 50%, black 15%, transparent 72%);
  opacity: .5;
}
/* Tache verte douce en haut */
.hero::after {
  content: '';
  position: absolute;
  top: -60px; left: 50%; transform: translateX(-50%);
  width: 600px; height: 300px;
  background: radial-gradient(ellipse, rgba(0,200,83,.08) 0%, transparent 70%);
  pointer-events: none;
}
.hero-border {
  position: absolute; top: 0; left: 0; right: 0; height: 2px;
  background: linear-gradient(90deg, transparent 0%, var(--green) 40%, var(--green-d) 60%, transparent 100%);
}
.badge {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 6px 16px;
  background: var(--green-l);
  border: 1px solid rgba(0,200,83,.25);
  border-radius: 20px;
  font-family: var(--fmo);
  font-size: .67rem; font-weight: 500;
  color: var(--green-vd);
  letter-spacing: .06em;
  text-transform: uppercase;
  margin-bottom: 28px;
}
.badge-dot {
  width: 6px; height: 6px;
  background: var(--green);
  border-radius: 50%;
  animation: pulse 2.2s ease infinite;
  flex-shrink: 0;
}
.hero h1 { margin-bottom: 16px; }
/* Ligne verte sous le titre */
.hero h1 em {
  position: relative;
  font-style: normal;
  color: var(--ink);
}
.hero h1 em::after {
  content: '';
  position: absolute; bottom: 2px; left: 0; right: 0; height: 3px;
  background: var(--green);
  border-radius: 2px;
}
.hero > p { margin: 0 auto 40px; font-size: .95rem; max-width: 46ch; }
.hero-btns {
  display: flex; align-items: center; justify-content: center;
  gap: 8px; flex-wrap: wrap;
}
.qbtn {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 10px 18px;
  border-radius: var(--rs);
  font-family: var(--fdi); font-weight: 600; font-size: .8rem;
  border: 1.5px solid var(--mist);
  background: var(--white);
  color: var(--charcoal);
  cursor: pointer; transition: var(--ease);
  white-space: nowrap;
  box-shadow: var(--sh-xs);
}
.qbtn:hover { border-color: var(--green); color: var(--green-d); background: var(--green-l); box-shadow: var(--sh-sm); }
.qbtn.prime {
  background: var(--ink); border-color: var(--ink); color: var(--white);
  box-shadow: 0 4px 14px var(--noir-md);
}
.qbtn.prime:hover {
  background: var(--green-d); border-color: var(--green-d);
  box-shadow: var(--sh-g);
}
.hero-stats {
  display: flex; justify-content: center;
  margin-top: 72px; padding-top: 36px;
  border-top: 1px solid var(--mist);
}
.stat {
  flex: 1; max-width: 180px;
  padding: 0 24px; text-align: center;
  border-right: 1px solid var(--mist);
}
.stat:last-child { border-right: none; }
.sn {
  display: block;
  font-family: var(--fdi); font-weight: 800;
  font-size: 2rem; color: var(--ink);
  letter-spacing: -.04em; line-height: 1;
}
.sl {
  display: block;
  font-family: var(--fmo);
  font-size: .62rem; font-weight: 400;
  text-transform: uppercase; letter-spacing: .18em;
  color: var(--pebble); margin-top: 6px;
}

/* ════════════════════════════════════════════
   PAGE HERO (pages internes)
   ════════════════════════════════════════════ */
.page-hero {
  padding: 52px 0 44px;
  border-bottom: 1px solid var(--mist);
  margin-bottom: 52px;
  background: var(--white);
  position: relative;
}
.page-hero::before {
  content: '';
  position: absolute; top: 0; left: 0; right: 0; height: 2px;
  background: linear-gradient(90deg, var(--green) 0%, var(--green-d) 40%, transparent 100%);
}
.breadcrumb {
  display: flex; align-items: center; gap: 8px;
  font-family: var(--fmo); font-size: .7rem; color: var(--ash);
  margin-bottom: 18px;
}
.breadcrumb a:hover { color: var(--green-d); }
.breadcrumb-sep { color: var(--fog); }
.page-hero h1 { margin-bottom: 10px; }
.page-meta { display: flex; gap: 22px; margin-top: 18px; flex-wrap: wrap; }
.meta-item { display: flex; align-items: center; gap: 6px; font-size: .75rem; color: var(--ash); }
.meta-dot { width: 4px; height: 4px; background: var(--green); border-radius: 50%; }

/* ════════════════════════════════════════════
   MODAL QUIZ
   ════════════════════════════════════════════ */
.qmodal {
  display: none; position: fixed; inset: 0; z-index: 500;
  background: rgba(12,13,10,.55);
  backdrop-filter: blur(16px);
  align-items: center; justify-content: center; padding: 20px;
}
.qmodal.open { display: flex; }
.qbox {
  background: var(--white);
  border: 1px solid var(--mist);
  border-radius: var(--r);
  padding: 40px 44px;
  max-width: 540px; width: 100%;
  position: relative;
  box-shadow: var(--sh-xl);
}
.qbox::before {
  content: '';
  position: absolute; top: 0; left: 0; right: 0; height: 2px;
  background: linear-gradient(90deg, var(--green), var(--green-d), transparent);
  border-radius: var(--r) var(--r) 0 0;
}
.qclose {
  position: absolute; top: 16px; right: 16px;
  background: var(--cloud); border: none; border-radius: 50%;
  width: 28px; height: 28px;
  display: flex; align-items: center; justify-content: center;
  color: var(--graphite); font-size: .9rem;
  cursor: pointer; transition: var(--ease);
}
.qclose:hover { background: var(--mist); color: var(--ink); }
.qstep { display: none; }
.qstep.active { display: block; }
.qq  { font-family: var(--fdi); font-weight: 700; font-size: 1.12rem; color: var(--ink); margin-bottom: 6px; }
.qsb { font-size: .82rem; color: var(--ash); margin-bottom: 24px; }
.qchoices { display: grid; grid-template-columns: 1fr 1fr; gap: 9px; }
.qch {
  padding: 14px 16px;
  border: 1.5px solid var(--mist);
  border-radius: var(--rs);
  background: var(--cream);
  cursor: pointer; transition: var(--ease); text-align: left;
}
.qch:hover { border-color: var(--green); background: var(--green-l); }
.qch-i { font-size: 1.3rem; margin-bottom: 6px; display: block; }
.qch-l { font-family: var(--fdi); font-weight: 700; font-size: .84rem; color: var(--ink); display: block; }
.qch-d { font-size: .72rem; color: var(--ash); display: block; margin-top: 2px; }
.qprog { display: flex; gap: 5px; margin-bottom: 28px; }
.qpd   { height: 3px; flex: 1; background: var(--mist); border-radius: 2px; transition: .3s; }

/* ════════════════════════════════════════════
   BOUTONS
   ════════════════════════════════════════════ */
.btn {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 11px 22px; border-radius: var(--rs);
  font-family: var(--fdi); font-weight: 600; font-size: .82rem;
  border: none; cursor: pointer; transition: var(--ease);
  white-space: nowrap; letter-spacing: .01em;
}
.btn-p { background: var(--ink); color: var(--white); box-shadow: 0 2px 8px var(--noir-md); }
.btn-p:hover { background: var(--green-d); transform: translateY(-1px); box-shadow: var(--sh-g); }
.btn-g { background: transparent; color: var(--graphite); border: 1.5px solid var(--mist); }
.btn-g:hover { border-color: var(--green-d); color: var(--green-d); background: var(--green-l); }
.btn-sm { padding: 7px 14px; font-size: .74rem; }
.sbadge {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 3px 9px; border-radius: 10px;
  font-family: var(--fmo);
  font-size: .58rem; font-weight: 500; letter-spacing: .08em;
  background: var(--green-l); color: var(--green-d);
  border: 1px solid rgba(0,200,83,.22);
  text-transform: uppercase; vertical-align: middle; margin-left: 7px;
}

/* ════════════════════════════════════════════
   CATÉGORIES
   ════════════════════════════════════════════ */
.catgrid { display: grid; grid-template-columns: repeat(3,1fr); gap: 14px; }
.catcard {
  background: var(--white);
  border: 1.5px solid var(--mist);
  border-radius: var(--r);
  padding: 22px;
  transition: var(--ease);
  cursor: pointer;
  position: relative;
  box-shadow: var(--sh-xs);
}
.catcard::before {
  content: '';
  position: absolute; top: 0; left: 0; right: 0; height: 3px;
  background: var(--green);
  border-radius: var(--r) var(--r) 0 0;
  transform: scaleX(0);
  transform-origin: left;
  transition: transform .22s ease;
}
.catcard:hover::before, .catcard.af::before { transform: scaleX(1); }
.catcard:hover {
  border-color: var(--green);
  transform: translateY(-3px);
  box-shadow: var(--sh-md);
}
.catcard.af { border-color: var(--green); background: var(--green-l); }
.catic  { font-size: 1.5rem; margin-bottom: 12px; }
.catnm  { font-family: var(--fdi); font-weight: 700; font-size: .94rem; color: var(--ink); margin-bottom: 5px; }
.catdc  { font-size: .76rem; color: var(--ash); line-height: 1.5; }
.catbdg {
  display: inline-block; margin-top: 11px;
  font-family: var(--fmo); font-size: .62rem; color: var(--pebble);
  background: var(--cloud); padding: 3px 9px; border-radius: 10px;
}
.catarr { position: absolute; top: 20px; right: 20px; color: var(--pebble); font-size: .82rem; transition: var(--ease); }
.catcard:hover .catarr { color: var(--green-d); transform: translateX(3px); }

/* ════════════════════════════════════════════
   LIENS CALCULATEURS
   ════════════════════════════════════════════ */
.filtrow { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 24px; }
.fbtn {
  padding: 6px 13px;
  border: 1.5px solid var(--mist); border-radius: 20px;
  font-size: .76rem; font-weight: 500; color: var(--graphite);
  background: var(--white); cursor: pointer; transition: var(--ease);
  font-family: var(--fui); white-space: nowrap;
  box-shadow: var(--sh-xs);
}
.fbtn:hover { border-color: var(--green); color: var(--green-d); }
.fbtn.active {
  background: var(--ink); border-color: var(--ink);
  color: var(--white); font-weight: 600;
}
.lgrid { display: grid; grid-template-columns: repeat(2,1fr); gap: 9px; }
.lcard {
  display: flex; align-items: center; gap: 12px;
  background: var(--white); border: 1.5px solid var(--mist);
  border-radius: var(--rs); padding: 14px 16px;
  transition: var(--ease); cursor: pointer;
  box-shadow: var(--sh-xs);
}
.lcard:hover { border-color: var(--green); box-shadow: var(--sh-sm); }
.lcard:hover .larr { color: var(--green-d); transform: translateX(3px); }
.lcard.istar { border-left: 3px solid var(--green); }
.lcard.hidden { display: none; }
.lico {
  width: 36px; height: 36px; flex-shrink: 0;
  background: var(--cream); border: 1px solid var(--mist);
  border-radius: var(--rx);
  display: flex; align-items: center; justify-content: center; font-size: .92rem;
}
.ltxt { flex: 1; min-width: 0; }
.lnm  { font-family: var(--fdi); font-weight: 700; font-size: .84rem; color: var(--ink); margin-bottom: 1px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lsb  { font-size: .7rem; color: var(--ash); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.larr { color: var(--pebble); font-size: .8rem; flex-shrink: 0; transition: var(--ease); }

/* ── Related panel ── */
.related-panel { background: var(--white); border: 1.5px solid var(--mist); border-radius: var(--r); padding: 24px; margin-top: 40px; }
.related-title  { font-family: var(--fmo); font-size: .64rem; font-weight: 500; text-transform: uppercase; letter-spacing: .2em; color: var(--pebble); margin-bottom: 14px; }
.related-grid   { display: grid; grid-template-columns: 1fr 1fr; gap: 9px; }

/* ════════════════════════════════════════════
   FOOTER
   ════════════════════════════════════════════ */
footer {
  background: var(--ink);
  padding: 52px 44px 36px;
  margin-top: 60px;
}
.ftgrid {
  max-width: 1100px; margin: 0 auto;
  display: grid; grid-template-columns: 1.6fr 1fr 1fr 1fr; gap: 44px;
}
.ft-logo {
  font-family: var(--fdi); font-weight: 900;
  font-size: 1.12rem; letter-spacing: -.03em;
  color: var(--white); margin-bottom: 10px;
}
.ft-logo span { color: var(--green); }
.ftbrand p { font-size: .78rem; color: var(--pebble); max-width: 22ch; }
.ftcol h5 {
  font-family: var(--fmo); font-size: .62rem; font-weight: 500;
  text-transform: uppercase; letter-spacing: .2em; color: var(--pebble); margin-bottom: 14px;
}
.ftcol a { display: block; font-size: .8rem; color: rgba(253,252,250,.5); margin-bottom: 9px; transition: var(--ease); }
.ftcol a:hover { color: var(--green); }
.ftbot {
  max-width: 1100px; margin: 32px auto 0;
  padding-top: 20px; border-top: 1px solid rgba(255,255,255,.08);
  display: flex; justify-content: space-between; align-items: center;
  font-family: var(--fmo); font-size: .66rem; color: rgba(253,252,250,.3);
  flex-wrap: wrap; gap: 8px;
}

/* ── Responsive ── */
@media(max-width:860px) {
  .catgrid { grid-template-columns:repeat(2,1fr) }
  .ftgrid  { grid-template-columns:1fr 1fr }
}
@media(max-width:680px) {
  .nav { padding:0 16px; grid-template-columns:1fr; height:auto; gap:8px; padding:10px 16px }
  .nav-logo  { justify-self:center }
  .nav-links { justify-self:center; flex-wrap:wrap; justify-content:center; gap:4px }
  .nav-end   { display:none }
  .hero { padding:72px 18px 60px }
  .hero-stats { flex-wrap:wrap }
  .stat { min-width:50%; border-right:none; border-bottom:1px solid var(--mist); padding:14px 0 }
  .stat:nth-child(odd) { border-right:1px solid var(--mist) }
  .stat:last-child { border-bottom:none }
  .catgrid { grid-template-columns:1fr 1fr }
  .lgrid { grid-template-columns:1fr }
  .lsb { display:none }
  footer { padding:36px 18px 24px }
  .ftgrid { grid-template-columns:1fr; gap:24px }
  .ftbot { flex-direction:column; text-align:center }
  .related-grid { grid-template-columns:1fr }
  .qbox { padding:24px 20px }
  .qchoices { grid-template-columns:1fr }
}
@media(max-width:380px) { .catgrid { grid-template-columns:1fr } }
