/* ══════════════════════════════════════════════════
   BLUE THEME — CSS commun pour toutes les pages _blue
   Pédagogie Retraite — Nouvelle identité visuelle
══════════════════════════════════════════════════ */

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

/* ══════════════════════════════════════════════════
   TOKENS — DARK  (navy #0a2850)
══════════════════════════════════════════════════ */
:root,
[data-theme="dark"] {
  --bg:        #0a2850;
  --bg-2:      #0d3260;
  --bg-3:      #103878;
  --surface:   #0d3260;

  --gold:      #c9a84c;
  --gold-lt:   #e0c06a;
  --gold-dk:   #a07830;

  --azure:     #5ba3d9;
  --azure-lt:  #90c4ec;
  --azure-dk:  #2f78b8;

  --ink:       #e8f0fa;
  --ink-soft:  rgba(232,240,250,.50);
  --ink-muted: rgba(232,240,250,.22);
  --ink-ghost: rgba(232,240,250,.06);

  --border:    rgba(91,163,217,.18);
  --border-soft:rgba(91,163,217,.08);

  --nav-bg:    rgba(10,40,80,.92);
  --shadow-md: 0 8px 40px rgba(0,0,0,.5);
  --shadow-sm: 0 2px 12px rgba(0,0,0,.3);
}

/* ══════════════════════════════════════════════════
   TOKENS — LIGHT  (ivoire bleuté)
══════════════════════════════════════════════════ */
[data-theme="light"] {
  --bg:        #f4f8ff;
  --bg-2:      #e8f0fb;
  --bg-3:      #d8e6f8;
  --surface:   #ffffff;

  --gold:      #8a6820;
  --gold-lt:   #b08830;
  --gold-dk:   #5e4610;

  --azure:     #1a62c0;
  --azure-lt:  #2f78d4;
  --azure-dk:  #0f3d7a;

  --ink:       #071a36;
  --ink-soft:  rgba(7,26,54,.55);
  --ink-muted: rgba(7,26,54,.28);
  --ink-ghost: rgba(7,26,54,.05);

  --border:    rgba(7,26,54,.12);
  --border-soft:rgba(7,26,54,.06);

  --nav-bg:    rgba(244,248,255,.95);
  --shadow-md: 0 8px 40px rgba(7,26,54,.10);
  --shadow-sm: 0 2px 12px rgba(7,26,54,.07);
}

/* ══════════════════════════════════════════════════
   BASE
══════════════════════════════════════════════════ */
html { scroll-behavior: smooth; font-size: 18px; }

body {
  font-family: 'DM Sans', sans-serif;
  background: var(--bg);
  color: var(--ink);
  font-size: 1rem; line-height: 1.7;
  overflow-x: hidden;
  transition: background .45s ease, color .45s ease;
}

a { color: inherit; }
img { max-width: 100%; height: auto; }

/* Skip to content — accessibilité clavier */
.skip-link {
  position: absolute; top: -100px; left: 16px;
  background: var(--gold); color: var(--bg);
  padding: 12px 24px; border-radius: 0 0 4px 4px;
  font-size: 14px; font-weight: 600; letter-spacing: 1px;
  text-decoration: none; z-index: 300;
  transition: top .2s;
}
.skip-link:focus { top: 0; }

/* Focus visible — accessibilité clavier */
:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 3px;
}
a:focus-visible, button:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 3px;
}

/* ══════════════════════════════════════════════════
   TOGGLE
══════════════════════════════════════════════════ */
.theme-toggle {
  position: fixed; top: 20px; right: 20px; z-index: 200;
  width: 52px; height: 28px;
  background: var(--bg-3); border: 1px solid var(--border);
  border-radius: 100px; cursor: pointer;
  display: flex; align-items: center; padding: 3px;
  transition: background .3s, border-color .3s;
  box-shadow: var(--shadow-sm);
}
.toggle-knob {
  width: 20px; height: 20px; border-radius: 50%;
  background: var(--gold);
  display: flex; align-items: center; justify-content: center;
  transition: transform .35s cubic-bezier(.4,0,.2,1), background .3s;
  flex-shrink: 0;
}
[data-theme="light"] .toggle-knob { transform: translateX(24px); }
.toggle-icon-dark  { position: absolute; left: 6px;  font-size: 10px; line-height: 1; }
.toggle-icon-light { position: absolute; right: 6px; font-size: 10px; line-height: 1; }

/* ══════════════════════════════════════════════════
   NAVBAR
══════════════════════════════════════════════════ */
nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 60px; height: 72px;
  background: var(--nav-bg);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
  transition: background .45s, border-color .45s;
}

.nav-mark { display: flex; align-items: center; gap: 14px; cursor: pointer; text-decoration: none; }

.nav-monogram {
  width: 40px; height: 40px;
  border: 1px solid var(--gold);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-family: 'Cormorant Garamond', serif;
  font-size: 17px; font-weight: 500; color: var(--gold);
  letter-spacing: .5px; flex-shrink: 0;
  transition: border-color .3s, color .3s, background .3s;
}
.nav-mark:hover .nav-monogram { background: var(--gold); color: var(--bg); }

.nav-name-wrap { display: flex; flex-direction: column; line-height: 1.2; }
.nav-name-top {
  font-family: 'Tenor Sans', sans-serif;
  font-size: 15px; letter-spacing: 3px; text-transform: uppercase;
  color: var(--ink); transition: color .45s;
}
.nav-name-bot {
  font-family: 'Tenor Sans', sans-serif;
  font-size: 10px; letter-spacing: 3.5px; text-transform: uppercase;
  color: var(--azure); transition: color .3s;
}

.nav-links { display: flex; align-items: center; gap: 32px; list-style: none; }
.nav-links a {
  font-size: 12px; font-weight: 400; letter-spacing: 1.5px;
  text-transform: uppercase; color: var(--ink-soft);
  text-decoration: none; transition: color .2s;
}
.nav-links a:hover,
.nav-links a.active { color: var(--gold); }

.nav-right { display: flex; align-items: center; gap: 10px; margin-right: 60px; }

.btn-connect {
  font-size: 12px; font-weight: 400; letter-spacing: 1.5px;
  text-transform: uppercase; color: var(--ink-soft);
  text-decoration: none; padding: 9px 16px;
  transition: color .2s; cursor: pointer;
}
.btn-connect:hover { color: var(--gold); }

.btn-account {
  display: none; align-items: center; gap: 7px;
  padding: 9px 18px; border-radius: 2px;
  background: var(--ink-ghost); border: 1px solid var(--border);
  color: var(--ink-soft);
  font-size: 12px; font-weight: 500; letter-spacing: 1.5px;
  text-transform: uppercase; text-decoration: none;
  transition: border-color .2s, color .2s; cursor: pointer;
}
.btn-account:hover { border-color: var(--gold); color: var(--gold); }
.btn-account.visible { display: inline-flex; }

.btn-connect.hidden { display: none; }

.btn-contact {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 10px 24px; border-radius: 2px;
  border: 1px solid var(--gold); color: var(--gold);
  font-size: 12px; font-weight: 500; letter-spacing: 2px;
  text-transform: uppercase; text-decoration: none;
  transition: background .25s, color .25s;
}
.btn-contact:hover { background: var(--gold); color: var(--bg); }

/* Font size selector — accessibilité */
.font-size-ctrl {
  display: flex; align-items: center; gap: 4px;
  margin-left: 6px;
  border-left: 1px solid var(--border); padding-left: 14px;
}
.font-size-ctrl button {
  width: 30px; height: 30px; border: 1px solid var(--border);
  border-radius: 2px; background: transparent; color: var(--ink-soft);
  font-family: 'DM Sans', sans-serif; font-weight: 600;
  cursor: pointer; display: flex; align-items: center; justify-content: center;
  transition: border-color .2s, color .2s, background .2s;
  line-height: 1;
}
.font-size-ctrl button:hover { border-color: var(--gold); color: var(--gold); }
.font-size-ctrl button.active {
  background: var(--gold); color: var(--bg); border-color: var(--gold);
}
.font-size-ctrl button span { pointer-events: none; }
.fs-sm span { font-size: 11px; }
.fs-md span { font-size: 14px; }
.fs-lg span { font-size: 17px; }

/* Burger mobile */
.nav-burger {
  display: none; background: none; border: none; cursor: pointer;
  width: 28px; height: 20px; position: relative; z-index: 110;
}
.nav-burger span {
  display: block; width: 100%; height: 2px; background: var(--ink);
  position: absolute; left: 0; transition: all .3s;
}
.nav-burger span:nth-child(1) { top: 0; }
.nav-burger span:nth-child(2) { top: 9px; }
.nav-burger span:nth-child(3) { top: 18px; }

/* ══════════════════════════════════════════════════
   SECTION BASE
══════════════════════════════════════════════════ */
.section-eyebrow { display: flex; align-items: center; gap: 14px; margin-bottom: 32px; }
.section-eyebrow-line { width: 32px; height: 1px; background: var(--gold); transition: background .3s; }
.section-eyebrow-text {
  font-size: 11px; font-weight: 500; letter-spacing: 3px;
  text-transform: uppercase; color: var(--gold); transition: color .3s;
}

.section-h2 {
  font-family: 'Cormorant Garamond', serif;
  font-size: clamp(30px, 3.2vw, 50px); font-weight: 300; line-height: 1.15;
  color: var(--ink); letter-spacing: -.5px; margin-bottom: 28px; transition: color .45s;
}
.section-h2 em { font-style: italic; color: var(--gold-lt); transition: color .3s; }

.section-body {
  font-size: 16px; font-weight: 300; color: var(--ink-soft);
  line-height: 1.85; max-width: 600px; transition: color .45s;
}
.section-body strong { font-weight: 500; color: var(--ink); transition: color .45s; }

.sidebar-col {
  border-right: 1px solid var(--border); padding: 80px 60px;
  transition: border-color .45s;
}
.sidebar-label {
  font-size: 9px; letter-spacing: 3px; text-transform: uppercase;
  color: var(--ink-muted); writing-mode: vertical-rl;
  transform: rotate(180deg); transition: color .45s;
}

/* ══════════════════════════════════════════════════
   PAGE CONTENT — layout standard pour pages intérieures
══════════════════════════════════════════════════ */
.page-section {
  border-top: 1px solid var(--border);
  display: grid; grid-template-columns: 200px 1fr;
  transition: border-color .45s;
}
.page-inner {
  padding: 80px 60px;
}

/* ══════════════════════════════════════════════════
   FOOTER
══════════════════════════════════════════════════ */
.blue-footer {
  border-top: 1px solid var(--border);
  background: var(--bg-2); transition: border-color .45s, background .45s;
}

/* Footer top : brand + social + newsletter */
.footer-top {
  display: grid; grid-template-columns: 200px 1fr;
  border-bottom: 1px solid var(--border);
}
.footer-sidebar {
  border-right: 1px solid var(--border); padding: 40px 60px;
  display: flex; align-items: center; justify-content: center; transition: border-color .45s;
}
.footer-monogram {
  width: 44px; height: 44px; border: 1px solid var(--border); border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-family: 'Cormorant Garamond', serif; font-size: 20px; color: var(--ink-muted);
  transition: border-color .45s, color .45s;
}
.footer-top-content {
  padding: 48px 60px;
  display: flex; flex-direction: column; align-items: center; text-align: center; gap: 20px;
}
.footer-brand-name {
  font-family: 'Tenor Sans', sans-serif; font-size: 16px; letter-spacing: 3px;
  text-transform: uppercase; color: var(--ink); transition: color .45s;
}
.footer-tagline {
  font-size: 14px; color: var(--ink-soft); max-width: 480px; line-height: 1.7;
}
.footer-social {
  display: flex; gap: 12px; margin-top: 8px;
}
.footer-social a {
  width: 36px; height: 36px; border-radius: 50%;
  border: 1px solid var(--border); background: transparent;
  display: flex; align-items: center; justify-content: center;
  color: var(--ink-muted); text-decoration: none; font-size: 14px;
  transition: border-color .2s, color .2s, background .2s;
}
.footer-social a:hover { border-color: var(--gold); color: var(--gold); }

/* Footer columns */
.footer-columns {
  display: grid; grid-template-columns: 200px repeat(4, 1fr);
  border-bottom: 1px solid var(--border);
}
.footer-col-sidebar {
  border-right: 1px solid var(--border); padding: 40px 60px;
  display: flex; align-items: flex-end;
}
.footer-col {
  padding: 40px 32px; border-right: 1px solid var(--border);
  transition: border-color .45s;
}
.footer-col:last-child { border-right: none; }
.footer-col h4 {
  font-family: 'Tenor Sans', sans-serif; font-size: 12px; letter-spacing: 2px;
  text-transform: uppercase; color: var(--ink); margin-bottom: 20px;
  transition: color .45s;
}
.footer-col ul { list-style: none; }
.footer-col li { margin-bottom: 10px; }
.footer-col a {
  font-size: 13px; color: var(--ink-soft); text-decoration: none;
  transition: color .2s;
}
.footer-col a:hover { color: var(--gold); }

/* Footer bottom */
.footer-bottom {
  display: grid; grid-template-columns: 200px 1fr auto;
  align-items: center;
}
.footer-bottom-sidebar {
  border-right: 1px solid var(--border); padding: 30px 60px;
  transition: border-color .45s;
}
.footer-bottom-center {
  padding: 30px 40px;
  display: flex; flex-direction: column; gap: 8px;
}
.footer-copyright {
  font-size: 12px; color: var(--ink-muted); transition: color .45s;
}
.footer-legal-links {
  display: flex; gap: 16px; flex-wrap: wrap;
}
.footer-legal-links a {
  font-size: 12px; color: var(--ink-soft); text-decoration: none;
  letter-spacing: .5px; transition: color .2s;
}
.footer-legal-links a:hover { color: var(--gold); }
.footer-rgpd {
  padding: 20px 40px; border-left: 1px solid var(--border);
  display: flex; align-items: center; justify-content: center;
  transition: border-color .45s;
}

/* Newsletter in footer */
.footer-newsletter {
  display: grid; grid-template-columns: 200px 1fr;
  border-bottom: 1px solid var(--border);
  background: var(--bg-3); transition: background .45s;
}
.footer-nl-sidebar {
  border-right: 1px solid var(--border); padding: 32px 60px;
  display: flex; align-items: center; justify-content: center;
}
.footer-nl-icon {
  width: 40px; height: 40px; border: 1px solid var(--border); border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  color: var(--gold); font-size: 16px;
}
.footer-nl-content {
  padding: 32px 60px; display: flex; align-items: center; gap: 32px; flex-wrap: wrap;
}
.footer-nl-text { flex: 1; min-width: 200px; }
.footer-nl-text h4 {
  font-family: 'Tenor Sans', sans-serif; font-size: 15px; color: var(--ink);
  letter-spacing: .5px; margin-bottom: 4px;
}
.footer-nl-text p { font-size: 13px; color: var(--ink-soft); }
.footer-nl-form {
  display: flex; gap: 8px;
}
.footer-nl-input {
  padding: 10px 16px; background: var(--surface); border: 1px solid var(--border);
  border-radius: 2px; color: var(--ink); font-family: 'DM Sans', sans-serif;
  font-size: 14px; min-width: 220px; outline: none; transition: border-color .2s;
}
.footer-nl-input:focus { border-color: var(--gold); }
.footer-nl-input::placeholder { color: var(--ink-muted); }
.footer-nl-btn {
  padding: 10px 20px; background: var(--gold); color: var(--bg);
  border: none; border-radius: 2px; font-family: 'DM Sans', sans-serif;
  font-size: 12px; font-weight: 600; letter-spacing: 1.5px;
  text-transform: uppercase; cursor: pointer; transition: background .2s;
}
.footer-nl-btn:hover { background: var(--gold-lt); }

/* Footer responsive */
@media (max-width: 1024px) {
  .footer-columns { grid-template-columns: 1fr 1fr; }
  .footer-col-sidebar { display: none; }
  .footer-bottom { grid-template-columns: 1fr; }
  .footer-bottom-sidebar { display: none; }
  .footer-bottom-center { padding: 24px 32px; }
  .footer-rgpd { border-left: none; border-top: 1px solid var(--border); justify-content: flex-start; padding: 24px 32px; }
}

@media (max-width: 768px) {
  .footer-top { grid-template-columns: 1fr; }
  .footer-sidebar { display: none; }
  .footer-top-content { padding: 32px 24px; }
  .footer-columns { grid-template-columns: 1fr; }
  .footer-col { border-right: none; border-bottom: 1px solid var(--border); padding: 24px; }
  .footer-col:last-child { border-bottom: none; }
  .footer-newsletter { grid-template-columns: 1fr; }
  .footer-nl-sidebar { display: none; }
  .footer-nl-content { padding: 24px; flex-direction: column; gap: 16px; }
  .footer-nl-form { flex-direction: column; width: 100%; }
  .footer-nl-input { min-width: auto; width: 100%; }
  .footer-nl-btn { width: 100%; }
  .footer-rgpd { justify-content: center; }
  .footer-bottom-center { text-align: center; }
  .footer-legal-links { justify-content: center; }
}

/* ══════════════════════════════════════════════════
   ANIMATIONS
══════════════════════════════════════════════════ */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(18px); }
  to   { opacity: 1; transform: none; }
}

.reveal {
  opacity: 0; transform: translateY(16px);
  transition: opacity .7s ease, transform .7s ease;
}
.reveal.visible { opacity: 1; transform: none; }

/* ══════════════════════════════════════════════════
   RESPONSIVE
══════════════════════════════════════════════════ */
@media (max-width: 1024px) {
  nav { padding: 0 30px; }
  .nav-links { gap: 20px; }
  .nav-right { margin-right: 30px; }
  .page-inner { padding: 60px 40px; }
  .sidebar-col { padding: 60px 30px; }
}

@media (max-width: 768px) {
  nav { padding: 0 20px; height: 64px; }
  ul.nav-links {
    position: fixed;
    top: 64px; left: 0; right: 0;
    height: auto; max-height: 0; overflow: hidden;
    flex-direction: column;
    background: var(--bg);
    padding: 0 30px;
    margin: 0;
    z-index: 9999;
    border-top: 1px solid var(--border);
    list-style: none;
    transition: max-height .3s ease, padding .3s ease;
  }
  ul.nav-links.open {
    max-height: 80vh;
    padding: 20px 30px;
    overflow-y: auto;
    display: block;
  }
  ul.nav-links li {
    display: block;
    width: 100%;
    margin: 0; padding: 0;
    border-bottom: 1px solid var(--border);
  }
  ul.nav-links li:last-child { border-bottom: none; }
  ul.nav-links li a {
    font-size: 16px;
    color: var(--ink);
    display: block;
    padding: 16px 0;
    letter-spacing: 2px;
    text-transform: uppercase;
    text-decoration: none;
    font-weight: 400;
  }
  ul.nav-links li a:hover,
  ul.nav-links li a.active { color: var(--gold); }
  .nav-right { margin-right: 0; gap: 8px; }
  .nav-right .btn-connect,
  .nav-right .btn-account { display: none; }
  .nav-right .font-size-ctrl { border-left: none; padding-left: 0; margin-left: 0; }

  /* Bouton contact → icône enveloppe en mobile */
  .btn-contact {
    padding: 10px 12px; font-size: 0; letter-spacing: 0; gap: 0;
  }
  .btn-contact .btn-contact-icon { font-size: 16px; }
  .btn-contact-text { display: none; }

  .nav-burger { display: block; }

  .page-section { grid-template-columns: 1fr; }
  .sidebar-col { display: none; }
  .page-inner { padding: 40px 24px; }

  .blue-footer { grid-template-columns: 1fr; }
  .footer-sidebar { display: none; }
  .footer-main { padding: 30px 24px; flex-direction: column; text-align: center; }

  .section-h2 { font-size: clamp(26px, 6vw, 38px); }

  .theme-toggle { top: auto; bottom: 20px; right: 20px; }
}
