﻿/* ── Shared pages CSS — light mode ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; overflow-x: hidden; }
body {
  font-family: 'Plus Jakarta Sans', sans-serif;
  background: #EBF4FF; color: #051B84;
  min-height: 100vh; overflow-x: hidden;
}
img { display: block; max-width: 100%; }
a { text-decoration: none; color: inherit; }

/* ── Nav — blanc propre ── */
.pg-nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 5%; height: 68px;
  background: rgba(255,255,255,.92);
  backdrop-filter: blur(24px) saturate(180%);
  border-bottom: 1px solid rgba(5,27,132,.07);
  box-shadow: 0 1px 16px rgba(5,27,132,.06);
}
.pg-logo { height: 40px; width: 130px; object-fit: cover; }
.pg-back {
  font-size: .72rem; font-weight: 700; letter-spacing: 2px;
  text-transform: uppercase; color: rgba(5,27,132,.4);
  transition: color 0.2s; display: flex; align-items: center; gap: .5rem;
}
.pg-back::before { content: '←'; font-size: 1rem; }
.pg-back:hover { color: #1A80DA; }

/* ── THEME TOGGLE (pages) ── */
#theme-toggle {
  width: 34px; height: 34px; border-radius: 50%;
  background: rgba(5,27,132,.08); border: 1px solid rgba(5,27,132,.14);
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; color: rgba(5,27,132,.62);
  transition: all .2s;
}
#theme-toggle:hover { background: rgba(5,27,132,.14); color: #1A80DA; }
#theme-toggle svg { width: 16px; height: 16px; pointer-events: none; }
#icon-sun { display: none; }
#icon-moon { display: block; }
[data-theme="dark"] #theme-toggle {
  background: rgba(255,255,255,.08); border-color: rgba(235,244,255,.15);
  color: rgba(235,244,255,.62);
}
[data-theme="dark"] #theme-toggle:hover { background: rgba(255,255,255,.14); color: #17C7FF; }
[data-theme="dark"] #icon-sun { display: block; }
[data-theme="dark"] #icon-moon { display: none; }

/* ── Content ── */
.pg-wrap {
  max-width: 800px; margin: 0 auto;
  padding: 9rem 5% 6rem;
}
.label {
  display: inline-block;
  font-size: .63rem; font-weight: 700; letter-spacing: 4px;
  text-transform: uppercase; color: #1A80DA; margin-bottom: 1rem;
}
.pg-title {
  font-family: 'Instrument Serif', Georgia, serif;
  font-size: clamp(2.5rem, 5vw, 4.5rem);
  font-weight: 400; line-height: 1.08; color: #051B84;
  margin-bottom: .6rem;
}
.pg-title em { font-style: italic; color: #1A80DA; }
.pg-date {
  font-size: .68rem; color: rgba(5,27,132,.3);
  letter-spacing: 2px; text-transform: uppercase;
  margin-bottom: 3.5rem; padding-bottom: 3.5rem;
  border-bottom: 1px solid rgba(5,27,132,.1);
}

/* Sections de contenu */
.pg-sec { margin-bottom: 2.5rem; }
.pg-sec h2 {
  font-family: 'Instrument Serif', Georgia, serif;
  font-size: 1.55rem; font-weight: 400; color: #051B84;
  margin-bottom: .9rem;
}
.pg-sec h3 {
  font-size: .7rem; font-weight: 700; letter-spacing: 3px;
  text-transform: uppercase; color: #1A80DA; margin-bottom: .65rem;
}
.pg-sec p {
  font-size: .92rem; line-height: 1.85; color: rgba(5,27,132,.55);
  margin-bottom: .85rem;
}
.pg-sec ul { list-style: none; margin: .4rem 0 1rem; }
.pg-sec ul li {
  font-size: .92rem; line-height: 1.8; color: rgba(5,27,132,.55);
  padding-left: 1.3rem; position: relative; margin-bottom: .35rem;
}
.pg-sec ul li::before { content: '›'; position: absolute; left: 0; color: rgba(26,128,218,.5); }
.pg-sec a { color: #1A80DA; border-bottom: 1px solid rgba(26,128,218,.2); transition: border-color 0.2s; }
.pg-sec a:hover { border-color: #1A80DA; }

/* ── FAQ accordion ── */
.faq-list { margin-top: 2rem; }
.faq-item { border-bottom: 1px solid rgba(5,27,132,.08); }
.faq-q {
  width: 100%; background: none; border: none; cursor: pointer;
  display: flex; align-items: center; justify-content: space-between;
  padding: 1.4rem 0; gap: 1.5rem; text-align: left;
}
.faq-q-text {
  font-family: 'Instrument Serif', Georgia, serif;
  font-size: 1.1rem; color: #051B84; line-height: 1.3;
}
.faq-icon {
  flex-shrink: 0; width: 26px; height: 26px;
  border: 1px solid rgba(26,128,218,.25); border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  color: #1A80DA; font-size: 1.2rem; line-height: 1;
  transition: transform 0.35s ease, background 0.2s;
}
.faq-item.open .faq-icon { transform: rotate(45deg); background: rgba(26,128,218,.08); }
.faq-a {
  max-height: 0; overflow: hidden;
  transition: max-height 0.4s ease;
}
.faq-a p { padding-bottom: 1.5rem; font-size: .9rem; line-height: 1.82; color: rgba(5,27,132,.5); }
.faq-item.open .faq-a { max-height: 600px; }

/* ── Footer ── */
.pg-footer {
  background: #040E2A; padding: 2.5rem 5%;
  border-top: 1px solid rgba(255,255,255,.06);
  display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 1.5rem;
}
.pg-footer img { height: 32px; width: 102px; object-fit: cover; }
.pg-footer-links { display: flex; gap: 1.75rem; flex-wrap: wrap; }
.pg-footer-links a {
  font-size: .68rem; color: rgba(235,244,255,.5);
  font-weight: 700; letter-spacing: 1.5px; text-transform: uppercase;
  transition: color 0.2s;
}
.pg-footer-links a:hover { color: #17C7FF; }
.pg-footer p { font-size: .68rem; color: rgba(235,244,255,.35); }
.pg-footer-social { display: flex; gap: .75rem; }
.pg-social-link {
  width: 34px; height: 34px; border-radius: 50%;
  background: rgba(255,255,255,.07); border: 1px solid rgba(255,255,255,.12);
  display: flex; align-items: center; justify-content: center;
  color: rgba(235,244,255,.5); transition: all .2s;
}
.pg-social-link:hover { background: rgba(26,128,218,.35); border-color: #1A80DA; color: #EBF4FF; }
.pg-social-link svg { width: 15px; height: 15px; }

/* ═══════════════════════════════════════
   DARK MODE (pages légales/FAQ)
   ═══════════════════════════════════════ */
[data-theme="dark"] body { background: #07101F; color: #EBF4FF; }
[data-theme="dark"] .pg-nav {
  background: rgba(7,16,31,.9);
  border-bottom-color: rgba(235,244,255,.06);
  box-shadow: 0 1px 20px rgba(0,0,0,.35);
}
[data-theme="dark"] .pg-back { color: rgba(235,244,255,.38); }
[data-theme="dark"] .pg-back:hover { color: #17C7FF; }
[data-theme="dark"] .pg-title { color: #EBF4FF; }
[data-theme="dark"] .pg-title em { color: #17C7FF; }
[data-theme="dark"] .pg-date { color: rgba(235,244,255,.28); border-bottom-color: rgba(235,244,255,.08); }
[data-theme="dark"] .pg-sec h2 { color: #EBF4FF; }
[data-theme="dark"] .pg-sec p { color: rgba(235,244,255,.55); }
[data-theme="dark"] .pg-sec ul li { color: rgba(235,244,255,.55); }
[data-theme="dark"] .pg-sec a { color: #17C7FF; border-bottom-color: rgba(23,199,255,.2); }
[data-theme="dark"] .faq-item { border-bottom-color: rgba(235,244,255,.08); }
[data-theme="dark"] .faq-q-text { color: #EBF4FF; }
[data-theme="dark"] .faq-a p { color: rgba(235,244,255,.52); }

/* ── Pages d'erreur — gardent le fond dark avec image ── */
.err-wrap {
  position: relative; min-height: 100vh;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  text-align: center; padding: 5rem 5%;
  overflow: hidden; background: #040E2A;
}
.err-bg {
  position: fixed; inset: 0; z-index: 0;
  background-size: cover; background-position: center;
  filter: brightness(0.22) saturate(0.6) blur(2px);
}
.err-overlay {
  position: fixed; inset: 0; z-index: 1;
  background: linear-gradient(to bottom, rgba(4,14,42,.5) 0%, rgba(4,14,42,.88) 100%);
}
.err-content { position: relative; z-index: 10; }
.err-code {
  font-family: 'Instrument Serif', Georgia, serif;
  font-size: clamp(9rem, 22vw, 20rem);
  font-weight: 400; line-height: .88;
  color: transparent;
  -webkit-text-stroke: 1px rgba(23,199,255,.3);
  letter-spacing: -6px; margin-bottom: .5rem;
}
.err-title {
  font-family: 'Instrument Serif', Georgia, serif;
  font-size: clamp(1.8rem, 4vw, 3rem);
  font-weight: 400; color: #EBF4FF; margin-bottom: 1rem;
}
.err-title em { font-style: italic; color: #17C7FF; }
.err-msg {
  font-size: .9rem; line-height: 1.8;
  color: rgba(235,244,255,.4); max-width: 480px; margin: 0 auto 2.5rem;
}
.err-btn {
  display: inline-flex; align-items: center; gap: .75rem;
  background: linear-gradient(135deg, #1A80DA, #051B84);
  color: #EBF4FF; border-radius: 12px; padding: .9rem 2.25rem;
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: .82rem; font-weight: 700; letter-spacing: 1.5px; text-transform: uppercase;
  transition: opacity .2s, transform .2s, box-shadow .2s;
}
.err-btn:hover { opacity: .85; transform: translateY(-2px); box-shadow: 0 10px 30px rgba(26,128,218,.3); }

@media (max-width: 768px) {
  .pg-wrap { padding: 8rem 5% 5rem; }
  .pg-footer { flex-direction: column; gap: 1rem; }
}
