/* ═══════════════════════════════════════════════════════════════
   OVELIYA SCELLÉ — Static Pages CSS (Luxe Sombre 2026)
   Aligné sur index + app-luxe-sombre-2026 — plus de thème beige isolé
   ═══════════════════════════════════════════════════════════════ */

:root {
  --bg: #0a0805;
  --surface: #12100c;
  --surface2: #1a1712;
  --noir: #0a0805;
  /* Cartes / zones type « papier » = surfaces sombres (même sémantique que l’app) */
  --paper: var(--surface);
  --cream: var(--surface2);

  --ink: #f0e9d8;
  --ink-soft: #d9ceb0;
  --blanc: #f0e9d8;

  --accent: #d4af37;
  --accent2: #c19a2f;
  --accent-dim: rgba(212, 175, 55, 0.1);
  --accent-border: rgba(212, 175, 55, 0.2);

  --text-dim: rgba(240, 233, 216, 0.65);
  --text-mid: rgba(240, 233, 216, 0.88);
  --border: rgba(212, 175, 55, 0.16);
  --border-soft: rgba(212, 175, 55, 0.08);

  --glow: rgba(212, 175, 55, 0.25);

  --on-dark-dim: rgba(240, 233, 216, 0.55);
  --on-dark-mid: rgba(240, 233, 216, 0.88);
}

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

html {
  scroll-behavior: smooth;
  background: var(--bg);
}

body {
  background: var(--bg);
  color: var(--ink);
  font-family: 'EB Garamond', Garamond, Georgia, serif;
  min-height: 100vh;
  line-height: 1.82;
  font-size: 17.5px;
  font-weight: 440;
  overflow-x: hidden;
}

/* Grain sombre (même esprit que l’app) */
body::after {
  content: '';
  position: fixed;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 512 512' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.8' numOctaves='4'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.035'/%3E%3C/svg%3E");
  pointer-events: none;
  z-index: -1;
  opacity: 0.55;
}

/* READING PROGRESS */
#reading-progress {
  position: fixed;
  top: 0;
  left: 0;
  height: 2px;
  width: 0%;
  background: linear-gradient(90deg, var(--accent), var(--accent2));
  box-shadow: 0 0 12px var(--glow);
  z-index: 9999;
  transition: width 0.08s linear;
}

/* HEADER */
.sp-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(18, 16, 12, 0.94);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border-soft);
  padding: 0 52px;
}

.sp-header-inner {
  max-width: 1140px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 68px;
}

.sp-logo {
  font-size: 11.5px;
  letter-spacing: 0.45em;
  color: var(--accent);
  text-transform: uppercase;
  font-weight: 500;
  text-decoration: none;
  transition: opacity 0.2s;
}

.sp-logo:hover {
  opacity: 0.72;
}

.sp-nav {
  display: flex;
  align-items: center;
  gap: 28px;
}

.sp-nav a {
  font-size: 9.5px;
  letter-spacing: 0.22em;
  color: var(--text-dim);
  text-transform: uppercase;
  text-decoration: none;
  transition: color 0.2s;
}

.sp-nav a:hover {
  color: var(--accent);
}

.sp-cta {
  font-size: 9.5px;
  letter-spacing: 0.22em;
  color: var(--accent);
  text-decoration: none;
  text-transform: uppercase;
  padding: 9px 18px;
  border: 1px solid var(--accent-border);
  transition: all 0.2s;
}

.sp-cta:hover {
  background: var(--accent-dim);
}

/* BREADCRUMB */
.sp-breadcrumb {
  max-width: 1140px;
  margin: 0 auto;
  padding: 22px 52px 8px;
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  animation: fadeIn 0.4s ease both;
}

.sp-breadcrumb a,
.sp-breadcrumb span {
  font-size: 9px;
  letter-spacing: 0.2em;
  color: var(--text-dim);
  text-transform: uppercase;
  text-decoration: none;
  transition: color 0.2s;
}

.sp-breadcrumb a:hover {
  color: var(--accent);
}

.sp-breadcrumb .sep {
  opacity: 0.45;
}

.sp-breadcrumb .current {
  color: var(--accent);
}

/* LAYOUT */
.sp-layout {
  max-width: 1140px;
  margin: 0 auto;
  padding: 40px 52px 120px;
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: 72px;
  align-items: start;
}

.sp-layout.no-toc {
  grid-template-columns: 1fr;
  max-width: 820px;
}

/* TOC */
.sp-toc {
  position: sticky;
  top: 88px;
  border: 1px solid var(--border);
  background: rgba(26, 23, 18, 0.72);
  padding: 22px 20px;
  animation: slideIn 0.5s ease 0.1s both;
}

.sp-toc-title {
  font-size: 8px;
  letter-spacing: 0.32em;
  color: var(--accent);
  text-transform: uppercase;
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border);
}

.sp-toc ul {
  list-style: none;
}

.sp-toc li {
  margin-bottom: 2px;
}

.sp-toc a {
  font-size: 9px;
  letter-spacing: 0.07em;
  color: var(--text-dim);
  text-decoration: none;
  display: block;
  padding: 6px 8px;
  border-left: 1px solid transparent;
  transition: all 0.2s;
  line-height: 1.5;
}

.sp-toc a:hover,
.sp-toc a.active {
  color: var(--ink);
  border-left-color: var(--accent);
  background: var(--accent-dim);
  padding-left: 12px;
}

.sp-toc li.toc-h3 a {
  padding-left: 20px;
  font-size: 8.5px;
}

.sp-toc li.toc-h3 a:hover,
.sp-toc li.toc-h3 a.active {
  padding-left: 24px;
}

/* ARTICLE */
.sp-article {
  animation: fadeUp 0.6s ease both;
  min-width: 0;
}

/* PAGE TITLE */
.sp-page-eyebrow {
  color: var(--accent);
  letter-spacing: 0.4em;
  font-size: 9.5px;
  text-transform: uppercase;
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 14px;
}

.sp-page-eyebrow::before {
  content: '';
  width: 28px;
  height: 1px;
  background: var(--accent);
}

.sp-page-title {
  font-family: 'EB Garamond', Garamond, Georgia, serif;
  font-size: clamp(38px, 5.2vw, 62px);
  line-height: 1.08;
  letter-spacing: -0.025em;
  font-weight: 300;
  margin-bottom: 20px;
}

.sp-page-title em {
  font-style: italic;
  color: var(--accent);
}

.sp-page-meta {
  font-size: 9px;
  letter-spacing: 0.18em;
  color: var(--text-dim);
  text-transform: uppercase;
  padding-bottom: 32px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 40px;
  display: flex;
  align-items: center;
  gap: 18px;
  flex-wrap: wrap;
}

/* TYPOGRAPHY CONTENT */
.sp-content h2 {
  font-family: 'EB Garamond', Garamond, Georgia, serif;
  font-size: clamp(24px, 3.8vw, 34px);
  border-left: 3px solid var(--accent);
  padding-left: 22px;
  margin: 64px 0 22px;
  font-weight: 400;
  line-height: 1.2;
  scroll-margin-top: 88px;
}

.sp-content h3 {
  font-size: 11px;
  letter-spacing: 0.35em;
  color: var(--accent);
  text-transform: uppercase;
  margin: 48px 0 14px;
  scroll-margin-top: 88px;
}

.sp-content h4 {
  font-size: 11px;
  letter-spacing: 0.1em;
  color: var(--ink-soft);
  margin: 24px 0 10px;
  font-weight: 600;
}

.sp-content p {
  font-size: clamp(16px, 1.1vw, 18.5px);
  line-height: 1.88;
  color: var(--text-mid);
  margin-bottom: 22px;
}

.sp-content a {
  color: var(--accent2);
  text-decoration: underline;
  text-underline-offset: 3px;
  transition: opacity 0.2s;
}

.sp-content a:hover {
  opacity: 0.75;
}

.sp-content strong {
  color: var(--ink);
  font-weight: 600;
}

.sp-content em {
  font-style: italic;
  color: var(--text-mid);
}

.sp-content ul,
.sp-content ol {
  margin: 14px 0 22px;
  padding-left: 0;
  list-style: none;
}

.sp-content ul li,
.sp-content ol li {
  font-size: clamp(14px, 1vw, 16px);
  line-height: 2;
  color: var(--text-mid);
  letter-spacing: 0.02em;
  padding: 8px 0;
  border-bottom: 1px solid var(--border-soft);
  display: flex;
  gap: 14px;
  align-items: flex-start;
}

.sp-content ul li::before {
  content: '—';
  color: var(--accent);
  opacity: 0.55;
  flex-shrink: 0;
  font-size: 10px;
  margin-top: 2px;
}

.sp-content ol {
  counter-reset: list;
}

.sp-content ol li::before {
  counter-increment: list;
  content: counter(list, decimal-leading-zero);
  color: var(--accent);
  font-size: 9px;
  letter-spacing: 0.1em;
  flex-shrink: 0;
  min-width: 24px;
  margin-top: 3px;
}

.sp-content hr {
  border: none;
  height: 1px;
  background: var(--border);
  margin: 36px 0;
}

/* Callouts */
.sp-highlight {
  background: rgba(212, 175, 55, 0.07);
  border: 1px solid var(--accent-border);
  border-left: 4px solid var(--accent);
  padding: 24px 28px;
  margin: 32px 0;
  font-size: clamp(15px, 1.05vw, 17px);
  line-height: 1.88;
  font-style: italic;
  color: var(--ink-soft);
}

.sp-info {
  background: var(--surface2);
  border: 1px solid var(--border);
  padding: 18px 22px;
  margin: 24px 0;
  font-size: clamp(14px, 1vw, 16px);
  line-height: 1.88;
  color: var(--text-mid);
}

.sp-contact {
  font-size: 10px;
  color: var(--accent);
  padding: 10px 0;
  letter-spacing: 0.06em;
}

/* Liens « aller au contenu » (pages doc avec .skip) */
.skip {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.skip:focus {
  position: fixed;
  top: 12px;
  left: 12px;
  z-index: 10000;
  width: auto;
  height: auto;
  padding: 12px 16px;
  margin: 0;
  overflow: visible;
  clip: auto;
  white-space: normal;
  background: var(--surface2);
  color: var(--ink);
  border: 1px solid var(--accent-border);
  font-size: 12px;
  letter-spacing: 0.08em;
  text-decoration: none;
  text-transform: uppercase;
}

/* Tableau comparatif (ex. docs/comparatif-alternatives) */
.comp-table {
  width: 100%;
  border-collapse: collapse;
  margin: 28px 0;
  font-size: 10px;
}

.comp-table th {
  text-align: left;
  font-size: 8px;
  letter-spacing: 0.22em;
  color: var(--accent);
  text-transform: uppercase;
  padding: 10px 14px;
  border-bottom: 1px solid var(--accent-border);
  font-weight: 400;
}

.comp-table td {
  padding: 12px 14px;
  border-bottom: 1px solid var(--border-soft);
  color: var(--text-dim);
  vertical-align: top;
  line-height: 1.8;
}

.comp-table tr:hover td {
  color: var(--text-mid);
}

.comp-table .col-oveliya {
  color: var(--ink-soft);
}

.comp-table .yes {
  color: rgba(110, 200, 130, 0.75);
}

.comp-table .no {
  color: rgba(184, 80, 80, 0.65);
}

.comp-table .partial {
  color: rgba(212, 175, 55, 0.75);
}

/* Bloc CTA en fin d'article (doc / comparatif) */
.sp-cta-block {
  border: 1px solid var(--accent-border);
  padding: 32px;
  margin: 48px 0;
  text-align: center;
}

.sp-cta-block p {
  font-size: 11px;
  color: var(--text-mid);
  margin-bottom: 20px;
}

.sp-cta-block a {
  display: inline-block;
  font-size: 9px;
  letter-spacing: 0.22em;
  color: var(--accent);
  text-decoration: none;
  text-transform: uppercase;
  padding: 12px 28px;
  border: 1px solid var(--accent-border);
  transition: all 0.2s;
}

.sp-cta-block a:hover {
  background: var(--accent-dim);
}

/* FAQ */
.faq-item {
  border-bottom: 1px solid var(--border);
  overflow: hidden;
}

.faq-question {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 20px 0;
  cursor: pointer;
  transition: color 0.2s;
  font-family: 'EB Garamond', Garamond, Georgia, serif;
  font-size: clamp(17px, 2vw, 20px);
  font-weight: 400;
  color: var(--text-mid);
}

.faq-question:hover,
.faq-question.open {
  color: var(--ink);
}

.faq-icon {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  border: 1px solid var(--accent-border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  color: var(--accent);
  transition: transform 0.3s;
}

.faq-question.open .faq-icon {
  transform: rotate(45deg);
}

.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.35s cubic-bezier(0.4, 0, 0.2, 1), padding 0.3s;
}

.faq-answer.open {
  max-height: 800px;
}

.faq-answer-inner {
  padding: 0 0 24px;
  font-size: clamp(14px, 1vw, 16px);
  line-height: 2.05;
  color: var(--text-dim);
  letter-spacing: 0.02em;
}

/* FOOTER */
.sp-footer {
  border-top: 1px solid var(--border-soft);
  background: var(--surface);
  color: var(--blanc);
  padding: 28px 52px;
}

.sp-footer-inner {
  max-width: 1140px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.sp-footer-brand {
  font-size: 9px;
  letter-spacing: 0.38em;
  color: var(--accent);
  text-transform: uppercase;
}

.sp-footer-links {
  display: flex;
  flex-wrap: wrap;
}

.sp-footer-links a {
  font-size: 8px;
  letter-spacing: 0.13em;
  color: var(--on-dark-dim);
  text-decoration: none;
  text-transform: uppercase;
  padding: 4px 12px;
  border-right: 1px solid rgba(212, 175, 55, 0.12);
  transition: color 0.2s;
}

.sp-footer-links a:last-child {
  border-right: none;
}

.sp-footer-links a:hover {
  color: var(--on-dark-mid);
}

.sp-footer-copy {
  font-size: 8px;
  color: var(--on-dark-dim);
}

/* Mobile footer burger */
.sp-footer-burger {
  display: none;
  background: none;
  border: 1px solid rgba(212, 175, 55, 0.2);
  padding: 6px 10px;
  cursor: pointer;
  color: var(--on-dark-dim);
  font-family: 'Cinzel', 'EB Garamond', Garamond, serif;
  font-size: 9px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  transition: all 0.2s;
  align-items: center;
  gap: 8px;
}

.sp-footer-burger:hover {
  border-color: var(--accent-border);
  color: var(--accent);
}

.sp-footer-burger-icon {
  display: flex;
  flex-direction: column;
  gap: 3px;
  width: 14px;
}

.sp-footer-burger-icon span {
  display: block;
  height: 1px;
  background: currentColor;
  transition: all 0.25s;
}

.sp-footer-burger.open .sp-footer-burger-icon span:nth-child(1) {
  transform: translateY(4px) rotate(45deg);
}

.sp-footer-burger.open .sp-footer-burger-icon span:nth-child(2) {
  opacity: 0;
}

.sp-footer-burger.open .sp-footer-burger-icon span:nth-child(3) {
  transform: translateY(-4px) rotate(-45deg);
}

.sp-footer-drawer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.32s cubic-bezier(0.4, 0, 0.2, 1);
  width: 100%;
  order: -1;
}

.sp-footer-drawer.open {
  max-height: 320px;
}

.sp-footer-drawer-inner {
  padding: 4px 0 12px;
  display: flex;
  flex-direction: column;
  gap: 2px;
  border-bottom: 1px solid rgba(212, 175, 55, 0.12);
  margin-bottom: 10px;
}

.sp-footer-drawer-inner a {
  display: block;
  font-size: 10px;
  letter-spacing: 0.13em;
  color: var(--on-dark-dim);
  text-decoration: none;
  text-transform: uppercase;
  padding: 9px 4px;
  border-bottom: 1px solid rgba(212, 175, 55, 0.06);
  transition: color 0.18s;
}

.sp-footer-drawer-inner a:hover {
  color: var(--on-dark-mid);
}

.sp-footer-drawer-inner a:last-child {
  border-bottom: none;
}

/* Page erreur HTTP (404, etc.) */
.sp-error-wrap {
  text-align: center;
  padding-top: 28px;
}

.sp-error-wrap .sp-page-title {
  margin-bottom: 22px;
}

.sp-error-code {
  font-family: 'EB Garamond', Garamond, Georgia, serif;
  font-size: clamp(72px, 14vw, 128px);
  font-weight: 300;
  color: var(--accent);
  opacity: 0.38;
  line-height: 1;
  margin: 0 0 20px;
}

.sp-error-lead {
  font-size: clamp(15px, 1.05vw, 17px);
  line-height: 1.88;
  color: var(--text-mid);
  max-width: 520px;
  margin: 0 auto 40px;
}

.sp-error-actions {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  margin: 0 auto 28px;
  max-width: 360px;
}

.sp-btn {
  font-family: 'Cinzel', 'EB Garamond', Garamond, serif;
  font-size: 10px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  padding: 16px 32px;
  cursor: pointer;
  border: 1px solid var(--accent);
  background: var(--accent);
  color: var(--bg);
  font-weight: 500;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: all 0.2s;
  white-space: nowrap;
}

.sp-btn:hover {
  background: var(--accent-dim);
  color: var(--accent);
  border-color: var(--accent-border);
}

.sp-btn--ghost {
  background: transparent;
  color: var(--accent);
  border-color: var(--accent-border);
}

.sp-btn--ghost:hover {
  background: var(--accent-dim);
  color: var(--ink);
}

.sp-error-links {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 16px;
  justify-content: center;
  padding-top: 22px;
  border-top: 1px solid var(--border-soft);
  max-width: 540px;
  margin: 0 auto;
}

.sp-error-links a {
  font-size: 9px;
  letter-spacing: 0.15em;
  color: var(--text-dim);
  text-decoration: none;
  text-transform: uppercase;
  transition: color 0.2s;
}

.sp-error-links a:hover {
  color: var(--accent);
}

/* ANIMATIONS */
@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(24px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes slideIn {
  from {
    opacity: 0;
    transform: translateX(-12px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

/* RESPONSIVE */
@media (max-width: 960px) {
  .sp-layout {
    grid-template-columns: 1fr;
    padding: 32px 28px 80px;
    gap: 40px;
  }

  .sp-toc {
    display: none;
  }

  .sp-header,
  .sp-footer {
    padding-left: 28px;
    padding-right: 28px;
  }

  .sp-breadcrumb {
    padding: 18px 28px 6px;
  }

  .sp-nav,
  .sp-cta {
    display: none;
  }

  .sp-footer-links {
    display: none;
  }

  .sp-footer-copy {
    display: none;
  }

  .sp-footer-burger {
    display: flex;
  }

  .sp-footer-inner {
    flex-direction: column;
    align-items: stretch;
    gap: 0;
  }

  .sp-footer-inner > *:not(.sp-footer-drawer):not(.sp-footer-burger) {
    display: none;
  }

  .comp-table {
    display: block;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
}
