/* ═══════════════════════════════════════════════════════════
   LE MAG DES SENIORS — Feuille de style
   Optimisé accessibilité seniors · Style institutionnel français
   ═══════════════════════════════════════════════════════════ */

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  /* Palette institutionnelle France */
  --navy:    #1A3A6B;
  --navy2:   #22477F;
  --navy3:   #0E2347;
  --gold:    #C8922A;
  --gold2:   #E0AA44;
  --tricolor:#E8001C;
  --cream:   #F7F5F0;
  --white:   #FFFFFF;
  --gray:    #5C6470;
  --gray2:   #E2E4E8;
  --gray3:   #F0F1F4;
  --dark:    #1A1E27;

  /* Couleurs catégories */
  --c-sante:      #C0392B;
  --c-retraite:   #1A5C96;
  --c-voyage:     #1E8449;
  --c-logement:   #6C3483;
  --c-argent:     #B7770D;
  --c-loisirs:    #117A65;
  --c-technologie:#1B2631;
  --c-assurance:  #922B21;

  /* Typographie — lisibilité seniors */
  --fd: 'Playfair Display', Georgia, 'Times New Roman', serif;
  --fb: 'Inter', 'Segoe UI', system-ui, sans-serif;

  /* Tailles de police augmentées pour seniors */
  --fs-base:  18px;
  --fs-sm:    15px;
  --fs-xs:    14px;
  --fs-lg:    20px;
  --fs-xl:    24px;
  --lh:       1.75;

  /* Espacement généreux */
  --r:   10px;
  --r-lg: 16px;
  --sh:  0 2px 12px rgba(26,58,107,.09);
  --shh: 0 6px 28px rgba(26,58,107,.16);
}

/* ── BASE ── */
html { scroll-behavior: smooth; font-size: var(--fs-base); }

body {
  font-family: var(--fb);
  background: var(--cream);
  color: var(--dark);
  font-size: var(--fs-base);
  line-height: var(--lh);
  -webkit-font-smoothing: antialiased;
}

.container { max-width: 1200px; margin: 0 auto; padding: 0 24px; }

/* ── BANDEAU TRICOLORE ── */
.tricolor-bar {
  height: 5px;
  background: linear-gradient(90deg, #002395 33.33%, #FFFFFF 33.33% 66.66%, #ED2939 66.66%);
}

/* ── HEADER TOP ── */
.hd-top {
  background: var(--navy3);
  color: rgba(255,255,255,.75);
  font-size: var(--fs-xs);
  padding: 8px 0;
  letter-spacing: .01em;
}
.hd-top .container { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.hd-top .tl { color: var(--gold2); font-weight: 600; font-size: var(--fs-xs); letter-spacing: .04em; text-transform: uppercase; }

/* ── HEADER PRINCIPAL ── */
.hd-main {
  background: var(--white);
  border-bottom: 3px solid var(--gold);
  padding: 14px 0;
  box-shadow: 0 2px 16px rgba(26,58,107,.10);
  position: sticky;
  top: 0;
  z-index: 100;
}
.hd-inner { display: flex; align-items: center; gap: 24px; flex-wrap: wrap; }

/* Logo */
.logo { display: flex; align-items: center; gap: 14px; flex-shrink: 0; text-decoration: none; }
.logo-emblem {
  width: 52px; height: 52px;
  /*background: var(--navy);*/
  border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.logo-icon {
    font-size: 50px;
}
.logo-emblem svg { width: 32px; height: 32px; }
.logo-txt { display: flex; flex-direction: column; line-height: 1.15; }
.logo-le  { font-family: var(--fd); font-size: 13px; color: var(--gray); font-weight: 400; letter-spacing: .06em; text-transform: uppercase; }
.logo-mg  { font-family: var(--fd); font-size: 23px; color: var(--navy); font-weight: 700; letter-spacing: -.01em; }
.logo-tagline { font-size: 11px; color: var(--gray); letter-spacing: .03em; }

/* Navigation */
.mnav { display: flex; gap: 6px; flex-wrap: wrap; flex: 1; justify-content: center; }
.nb {
  background: none;
  border: 1.5px solid var(--gray2);
  border-radius: 6px;
  padding: 8px 15px;
  font-size: var(--fs-sm);
  font-family: var(--fb);
  font-weight: 500;
  color: var(--navy);
  cursor: pointer;
  transition: .2s;
  white-space: nowrap;
  letter-spacing: .01em;
}
.nb:hover, .nb.on {
  background: var(--navy);
  color: var(--white);
  border-color: var(--navy);
}
.nb:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; }

/* ── HERO ── */
.hero {
  background: var(--navy);
  color: var(--white);
  padding: 72px 0 60px;
  position: relative;
  overflow: hidden;
}
.hero::after {
  content: '';
  position: absolute;
  right: 0; top: 0; bottom: 0;
  width: 40%;
  background: linear-gradient(135deg, transparent 0%, rgba(200,146,42,.07) 100%);
  pointer-events: none;
}
.hero-in {
  display: grid;
  grid-template-columns: 1fr 280px;
  gap: 52px;
  align-items: center;
  position: relative;
  z-index: 1;
}
.hero-ey {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(200,146,42,.15);
  border: 1px solid rgba(200,146,42,.35);
  border-radius: 4px;
  padding: 5px 12px;
  font-size: var(--fs-xs);
  color: var(--gold2);
  font-weight: 600;
  letter-spacing: .08em;
  text-transform: uppercase;
  margin-bottom: 18px;
}
.hero-h1 {
  font-family: var(--fd);
  font-size: clamp(32px, 4vw, 52px);
  font-weight: 900;
  line-height: 1.12;
  margin-bottom: 20px;
  letter-spacing: -.02em;
}
.hero-h1 .g { color: var(--gold2); }
.hero-sub {
  font-size: var(--fs-lg);
  color: rgba(255,255,255,.82);
  margin-bottom: 32px;
  line-height: 1.7;
  max-width: 520px;
}
.hero-cta { display: flex; gap: 14px; flex-wrap: wrap; }

/* Boutons hero */
.btn-p {
  background: var(--gold);
  color: var(--white);
  border: none;
  border-radius: 6px;
  padding: 14px 30px;
  font-size: var(--fs-base);
  font-weight: 700;
  cursor: pointer;
  transition: .2s;
  font-family: var(--fb);
  letter-spacing: .01em;
}
.btn-p:hover { background: var(--gold2); transform: translateY(-2px); box-shadow: 0 6px 20px rgba(200,146,42,.35); }
.btn-p:focus-visible { outline: 3px solid var(--gold2); outline-offset: 3px; }

.btn-s {
  background: rgba(255,255,255,.1);
  color: var(--white);
  border: 2px solid rgba(255,255,255,.4);
  border-radius: 6px;
  padding: 12px 24px;
  font-size: var(--fs-sm);
  font-weight: 500;
  cursor: pointer;
  transition: .2s;
  font-family: var(--fb);
}
.btn-s:hover { background: rgba(255,255,255,.2); border-color: var(--white); }

/* Stats hero */
.stats { display: flex; flex-direction: column; gap: 12px; }
.stat {
  background: rgba(255,255,255,.08);
  border: 1px solid rgba(255,255,255,.18);
  border-left: 3px solid var(--gold);
  border-radius: var(--r);
  padding: 18px 24px;
}
.stat-n { display: block; font-family: var(--fd); font-size: 32px; font-weight: 900; color: var(--gold2); line-height: 1; }
.stat-l { font-size: var(--fs-xs); color: rgba(255,255,255,.72); margin-top: 4px; display: block; }

/* ── TICKER ── */
.ticker { background: var(--navy3); color: var(--white); padding: 10px 0; overflow: hidden; border-top: 1px solid rgba(255,255,255,.08); }
.tk-w { display: flex; align-items: center; gap: 16px; overflow: hidden; }
.tk-lbl {
  background: var(--tricolor);
  color: var(--white);
  font-size: 11px;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 4px;
  white-space: nowrap;
  flex-shrink: 0;
  letter-spacing: .06em;
  text-transform: uppercase;
}
.tk-c { overflow: hidden; font-size: var(--fs-sm); }
#tkTxt { white-space: nowrap; display: inline-block; animation: tk 120s linear infinite; }
@keyframes tk { 0% { transform: translateX(60vw); } 100% { transform: translateX(-100%); } }

/* ── LAYOUT PRINCIPAL ── */
.main-lay {
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: 36px;
  padding: 44px 0 64px;
  align-items: start;
}

/* En-tête de section */
.sec-hd { display: flex; justify-content: space-between; align-items: center; margin-bottom: 26px; }
.sec-title {
  font-family: var(--fd);
  font-size: var(--fs-xl);
  color: var(--navy);
  padding-left: 16px;
  border-left: 4px solid var(--gold);
  line-height: 1.2;
}
.rfbtn {
  background: var(--white);
  border: 1.5px solid var(--gray2);
  border-radius: 6px;
  padding: 9px 16px;
  font-size: var(--fs-sm);
  cursor: pointer;
  color: var(--gray);
  transition: .2s;
  font-family: var(--fb);
  font-weight: 500;
}
.rfbtn:hover { border-color: var(--navy); color: var(--navy); background: var(--gray3); }

/* ── SPINNER ── */
.spin-wrap { text-align: center; padding: 80px 20px; color: var(--gray); }
.spin {
  width: 48px; height: 48px;
  border: 3px solid var(--gray2);
  border-top-color: var(--navy);
  border-radius: 50%;
  animation: sp .8s linear infinite;
  margin: 0 auto 18px;
}
@keyframes sp { to { transform: rotate(360deg); } }

/* ── GRILLE D'ARTICLES ── */
.grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; }

/* Carte article */
.card {
  background: var(--white);
  border-radius: var(--r-lg);
  box-shadow: var(--sh);
  border: 1px solid var(--gray2);
  overflow: hidden;
  cursor: pointer;
  transition: .25s;
  display: flex;
  flex-direction: column;
}
.card:hover { transform: translateY(-4px); box-shadow: var(--shh); border-color: rgba(26,58,107,.2); }
.card:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; }
.card.feat { grid-column: 1 / -1; flex-direction: row; }

/* Image de catégorie */
.c-img {
  width: 100%;
  min-height: 160px;
  background: var(--gray2) center / cover no-repeat;
  flex-shrink: 0;
  font-size: 0;
  position: relative;
}
.card.feat .c-img { width: 260px; min-height: 200px; }

/* Classes d'images par catégorie */
.img-sante       { background-image: url('assets/sante.png'); }
.img-retraite    { background-image: url('assets/retraite.png'); }
.img-voyage      { background-image: url('assets/voyages.png'); }
.img-logement    { background-image: url('assets/logement.png'); }
.img-argent      { background-image: url('assets/argent.png'); }
.img-loisirs     { background-image: url('assets/loisirs.png'); }
.img-technologie { background-image: url('assets/techno.png'); }
.img-assurance   { background-image: url('assets/assurance.png'); }

/* Corps de la carte */
.c-body { padding: 20px; flex: 1; display: flex; flex-direction: column; }
.c-cat {
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .08em;
  padding: 4px 10px;
  border-radius: 4px;
  margin-bottom: 11px;
  color: var(--white);
}
.cc-sante      { background: var(--c-sante); }
.cc-retraite   { background: var(--c-retraite); }
.cc-voyage     { background: var(--c-voyage); }
.cc-logement   { background: var(--c-logement); }
.cc-argent     { background: var(--c-argent); }
.cc-loisirs    { background: var(--c-loisirs); }
.cc-technologie{ background: var(--c-technologie); }
.cc-assurance  { background: var(--c-assurance); }

.c-title {
  font-family: var(--fd);
  font-size: var(--fs-lg);
  font-weight: 700;
  color: var(--navy);
  line-height: 1.35;
  margin-bottom: 10px;
  flex: 1;
}
.card.feat .c-title { font-size: 22px; }
.c-ex {
  font-size: var(--fs-sm);
  color: var(--gray);
  line-height: 1.65;
  margin-bottom: 12px;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.c-meta {
  font-size: var(--fs-xs);
  color: var(--gray);
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
  border-top: 1px solid var(--gray2);
  padding-top: 11px;
  margin-top: auto;
}
.c-meta a { color: var(--navy); font-weight: 600; text-decoration: none; }
.c-meta a:hover { text-decoration: underline; color: var(--gold); }

/* Bouton voir plus */
.lm-w { text-align: center; margin-top: 30px; }
.btn-lm {
  background: var(--navy);
  color: var(--white);
  border: none;
  border-radius: 6px;
  padding: 15px 44px;
  font-size: var(--fs-base);
  font-weight: 600;
  cursor: pointer;
  transition: .2s;
  font-family: var(--fb);
  letter-spacing: .01em;
}
.btn-lm:hover { background: var(--navy2); transform: translateY(-2px); }
.btn-lm:focus-visible { outline: 3px solid var(--gold); outline-offset: 3px; }

/* ── SIDEBAR ── */
.sidebar { display: flex; flex-direction: column; gap: 20px; position: sticky; top: 96px; }
.sc {
  background: var(--white);
  border-radius: var(--r-lg);
  box-shadow: var(--sh);
  border: 1px solid var(--gray2);
  padding: 22px;
}
.sc h3 {
  font-family: var(--fd);
  font-size: var(--fs-lg);
  color: var(--navy);
  margin-bottom: 14px;
  padding-bottom: 11px;
  border-bottom: 2px solid var(--gray2);
  line-height: 1.3;
}

/* Assistant IA sidebar */
.ai-card { border-top: 3px solid var(--gold); }
.ai-card > p { font-size: var(--fs-sm); color: var(--gray); margin-bottom: 12px; line-height: 1.6; }
.chat-box {
  background: var(--cream);
  border-radius: 8px;
  padding: 12px;
  max-height: 190px;
  overflow-y: auto;
  margin-bottom: 10px;
  font-size: var(--fs-sm);
  display: flex;
  flex-direction: column;
  gap: 10px;
  border: 1px solid var(--gray2);
}
.cm { line-height: 1.55; }
.cm.bot { color: var(--navy); }
.cm.bot::before { content: '🤖 '; }
.cm.user { color: var(--dark); text-align: right; }
.cm.user::after { content: ' 👤'; }
.cm.ld { color: var(--gray); font-style: italic; }
.ai-row { display: flex; gap: 8px; }
.ai-row input {
  flex: 1;
  border: 1.5px solid var(--gray2);
  border-radius: 6px;
  padding: 10px 13px;
  font-size: var(--fs-sm);
  font-family: var(--fb);
  outline: none;
  transition: .2s;
  background: var(--white);
}
.ai-row input:focus { border-color: var(--navy); box-shadow: 0 0 0 3px rgba(26,58,107,.1); }
.ai-row button {
  background: var(--navy);
  color: var(--white);
  border: none;
  border-radius: 6px;
  padding: 10px 16px;
  font-size: 18px;
  cursor: pointer;
  transition: .2s;
  font-weight: 600;
}
.ai-row button:hover { background: var(--gold); color: var(--white); }

/* Liens officiels */
.qlinks { list-style: none; }
.qlinks li { margin-bottom: 2px; }
.qlinks a {
  color: var(--navy);
  text-decoration: none;
  font-size: var(--fs-sm);
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 7px 0;
  border-bottom: 1px solid var(--gray2);
  transition: .2s;
  font-weight: 500;
}
.qlinks a:hover { color: var(--gold); padding-left: 4px; }

/* Rubriques pills */
.cpills { display: flex; flex-wrap: wrap; gap: 8px; }
.cp {
  border: none;
  border-radius: 6px;
  padding: 8px 14px;
  font-size: var(--fs-xs);
  font-weight: 600;
  cursor: pointer;
  color: var(--white);
  transition: .2s;
  font-family: var(--fb);
  letter-spacing: .01em;
}
.cp:hover { opacity: .88; transform: translateY(-1px); }
.cp:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; }
.cp.sante      { background: var(--c-sante); }
.cp.retraite   { background: var(--c-retraite); }
.cp.voyage     { background: var(--c-voyage); }
.cp.logement   { background: var(--c-logement); }
.cp.argent     { background: var(--c-argent); }
.cp.loisirs    { background: var(--c-loisirs); }
.cp.technologie{ background: var(--c-technologie); }
.cp.assurance  { background: var(--c-assurance); }

/* Bon à savoir */
.tip-card { border-left: 4px solid var(--gold); border-radius: 0 var(--r-lg) var(--r-lg) 0; }
.tip-txt { font-size: var(--fs-base); color: var(--dark); line-height: 1.7; }

/* ── MODALS ── */
.ov {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.65);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.mbox {
  background: var(--white);
  border-radius: var(--r-lg);
  padding: 30px;
  width: 100%;
  max-width: 680px;
  max-height: 85vh;
  display: flex;
  flex-direction: column;
  gap: 16px;
  box-shadow: 0 20px 60px rgba(0,0,0,.3);
  border-top: 4px solid var(--gold);
}
.mhd { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.mhd h2 { font-family: var(--fd); font-size: 20px; color: var(--navy); line-height: 1.25; }
.mcl {
  background: none;
  border: 2px solid var(--gray2);
  border-radius: 50%;
  width: 36px; height: 36px;
  cursor: pointer;
  font-size: 16px;
  color: var(--gray);
  transition: .2s;
  flex-shrink: 0;
  line-height: 1;
}
.mcl:hover { border-color: var(--tricolor); color: var(--tricolor); }
.msub { font-size: var(--fs-sm); color: var(--gray); }
.mchat {
  flex: 1;
  overflow-y: auto;
  background: var(--cream);
  border-radius: 10px;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  max-height: 380px;
  font-size: var(--fs-base);
  border: 1px solid var(--gray2);
}
.mrow { display: flex; gap: 10px; }
.mrow input {
  flex: 1;
  border: 1.5px solid var(--gray2);
  border-radius: 8px;
  padding: 13px 16px;
  font-size: var(--fs-base);
  font-family: var(--fb);
  outline: none;
  transition: .2s;
}
.mrow input:focus { border-color: var(--navy); box-shadow: 0 0 0 3px rgba(26,58,107,.1); }
.btn-send {
  background: var(--navy);
  color: var(--white);
  border: none;
  border-radius: 8px;
  padding: 13px 24px;
  font-size: var(--fs-base);
  font-weight: 600;
  cursor: pointer;
  font-family: var(--fb);
  transition: .2s;
  white-space: nowrap;
}
.btn-send:hover { background: var(--gold); }

/* Modal article */
.art-mbox { max-width: 760px; }
.art-mc {
  overflow-y: auto;
  max-height: calc(85vh - 120px);
  font-size: var(--fs-base);
  line-height: 1.8;
  color: var(--dark);
}
.art-mc h3 { font-family: var(--fd); color: var(--navy); margin: 20px 0 10px; font-size: var(--fs-lg); }
.art-mc p { margin-bottom: 14px; }
.art-mc a { color: var(--navy); }

/* ── FOOTER ── */
.ft {
  background: var(--navy3);
  color: rgba(255,255,255,.8);
  padding: 56px 0 0;
  margin-top: 56px;
}
.ft-in {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 40px;
  padding-bottom: 40px;
  border-bottom: 1px solid rgba(255,255,255,.1);
}
.ft-logo {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
}
.ft-logo-txt { font-family: var(--fd); font-size: 20px; color: var(--gold2); font-weight: 700; }
.ft-in > div > p { font-size: var(--fs-sm); line-height: 1.75; color: rgba(255,255,255,.65); }
.ft-in h4 {
  color: var(--gold2);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: .1em;
  margin-bottom: 14px;
  font-weight: 700;
}
.ft-in ul { list-style: none; }
.ft-in li { margin-bottom: 8px; }
.ft-in a { color: rgba(255,255,255,.7); text-decoration: none; font-size: var(--fs-sm); transition: .2s; }
.ft-in a:hover { color: var(--gold2); }
.ft-mention {
  padding: 18px 0;
  text-align: center;
  font-size: 12px;
  color: rgba(255,255,255,.4);
}

/* ── RESPONSIVE ── */
@media (max-width: 960px) {
  .main-lay { grid-template-columns: 1fr; }
  .sidebar { position: static; }
  .hero-in { grid-template-columns: 1fr; }
  .stats { flex-direction: row; flex-wrap: wrap; }
  .stat { flex: 1; min-width: 140px; }
  .ft-in { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 640px) {
  :root { --fs-base: 16px; }
  .grid { grid-template-columns: 1fr; }
  .card.feat { flex-direction: column; }
  .card.feat .c-img { width: 100%; }
  .mnav { display: none; }
  .stats { flex-direction: column; }
  .ft-in { grid-template-columns: 1fr; }
  .hd-top .container { flex-direction: column; gap: 4px; text-align: center; }
}

/* ── ACCESSIBILITÉ ── */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}
:focus-visible { outline: 3px solid var(--gold); outline-offset: 3px; }
