@import url('../fonts/fonts.css');

/* ============================================================
   Pages internes du site (ralpha.fr/whisper, /aide)
   Réutilise les jetons et primitives visuelles de css/index.css
   (palette, boutons, rayons) SANS charger la police Fraunces
   hébergée par Google : aucune requête vers un tiers.
   ============================================================ */

:root {
  --ra-bleu-fonce:  #1c2249;
  --ra-bleu-clair:  #778bc0;

  --bg:            white;
  --bg-card:       #F0F8FF;
  --text:          #1c2249;
  --text-muted:    #404c7d;
  --text-subtle:   #778bc0;
  --border:        rgba(28, 34, 73, 0.08);
  --border-strong: rgba(28, 34, 73, 0.16);
  --accent:        #35A073;

  --shadow-md: 0 12px 28px -12px rgba(28,34,73,.14), 0 3px 8px -4px rgba(28,34,73,.06);
  --shadow-lg: 0 32px 64px -24px rgba(28,34,73,.20), 0 12px 24px -12px rgba(28,34,73,.10);

  --font-display: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-body:    'Manrope', system-ui, sans-serif;

  --gutter: clamp(1.25rem, 4vw, 3rem);
  --max-w:  880px;
  --r-lg:   22px;
  --ease:   cubic-bezier(0.22, 1, 0.36, 1);
}

[data-theme="dusk"] {
  --bg:            #2A2D55;
  --bg-card:       #3F4380;
  --text:          #D5DBEE;
  --text-muted:    #A0A8CE;
  --text-subtle:   #7479A8;
  --border:        rgba(213, 219, 238, 0.12);
  --border-strong: rgba(213, 219, 238, 0.22);
  --accent:        #5AAA85;
  --shadow-md: 0 12px 28px -12px rgba(0,0,0,.45), 0 3px 8px -4px rgba(0,0,0,.28);
  --shadow-lg: 0 32px 64px -24px rgba(0,0,0,.55), 0 12px 24px -12px rgba(0,0,0,.32);
}

[data-theme="dark"] {
  --bg:            #0c101c;
  --bg-card:       #182038;
  --text:          #E8ECF4;
  --text-muted:    #9BB5FA;
  --text-subtle:   #778bc0;
  --border:        rgba(155, 181, 250, 0.10);
  --border-strong: rgba(155, 181, 250, 0.20);
  --accent:        #4a8c73;
  --shadow-md: 0 12px 28px -12px rgba(0,0,0,.6), 0 3px 8px -4px rgba(0,0,0,.4);
  --shadow-lg: 0 32px 64px -24px rgba(0,0,0,.7), 0 12px 24px -12px rgba(0,0,0,.5);
}

/* Repli sans JS : suit le réglage système tant qu'aucun data-theme n'est posé. */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme]) {
    --bg:            #0c101c;
    --bg-card:       #182038;
    --text:          #E8ECF4;
    --text-muted:    #9BB5FA;
    --text-subtle:   #778bc0;
    --border:        rgba(155, 181, 250, 0.10);
    --border-strong: rgba(155, 181, 250, 0.20);
    --accent:        #4a8c73;
    --shadow-md: 0 12px 28px -12px rgba(0,0,0,.6), 0 3px 8px -4px rgba(0,0,0,.4);
    --shadow-lg: 0 32px 64px -24px rgba(0,0,0,.7), 0 12px 24px -12px rgba(0,0,0,.5);
  }
}

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

body {
  margin: 0;
  font-family: var(--font-body);
  font-weight: 350;
  font-size: 17px;
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a { color: inherit; text-decoration: none; }

h1, h2, h3 {
  font-family: var(--font-display);
  font-weight: 500;
  letter-spacing: 0.005em;
  line-height: 1.12;
  margin: 0;
  color: var(--text);
}

.container {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

/* ---------- en-tête : logo seul, aucun menu ---------- */

.w-header {
  padding: 2rem 0 0;
}

.w-header .container {
  display: flex;
  align-items: center;
}

.w-logo {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.w-logo img {
  height: 34px;
  width: auto;
  display: block;
}

/* Le logo officiel n'existe qu'en version claire : sur fond nuit il disparaît.
   La charte impose de le poser tel quel sur fond blanc, jamais de le recolorer. */
[data-theme="dark"] .w-logo img,
[data-theme="dusk"] .w-logo img {
  background: #fff;
  border-radius: 8px;
  padding: 3px;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme]) .w-logo img {
    background: #fff;
    border-radius: 8px;
    padding: 3px;
  }
}

.w-logo span {
  font-family: var(--font-display);
  font-size: 1.15rem;
  letter-spacing: 0.02em;
  color: var(--text-muted);
}

/* ---------- sections ---------- */

.w-section {
  padding: clamp(2.6rem, 6vh, 4.2rem) 0;
  border-top: 1px solid var(--border);
}

.w-section:first-of-type { border-top: 0; }

.w-section h2 {
  font-size: clamp(1.45rem, 3vw, 2rem);
  margin-bottom: 1.1rem;
}

.w-lead {
  color: var(--text-muted);
  font-size: 1.05rem;
  margin: 0 0 1.4rem;
  max-width: 62ch;
}

/* ---------- 1. accroche ---------- */

.w-hero {
  padding: clamp(2.2rem, 5vh, 3.4rem) 0 clamp(1.6rem, 3vh, 2.2rem);
}

.w-hero h1 {
  font-size: clamp(2.1rem, 5.4vw, 3.4rem);
  font-weight: 400;
  margin-bottom: 1.1rem;
  max-width: 26ch;
}

.w-hero p {
  color: var(--text-muted);
  font-size: 1.1rem;
  margin: 0;
  max-width: 60ch;
}

/* ---------- 2. tableau de faits ---------- */

.w-facts {
  width: 100%;
  border-collapse: collapse;
  margin: 0;
  font-size: 0.98rem;
}

.w-facts th,
.w-facts td {
  text-align: left;
  vertical-align: top;
  padding: 0.95rem 1rem 0.95rem 0;
  border-top: 1px solid var(--border);
}

.w-facts tr:first-child th,
.w-facts tr:first-child td { border-top: 0; }

.w-facts th {
  width: 34%;
  font-weight: 600;
  color: var(--text);
}

.w-facts td { color: var(--text-muted); }

/* ---------- 3. ce que fait l'agent ---------- */

.w-steps {
  list-style: none;
  counter-reset: w-step;
  margin: 0;
  padding: 0;
}

.w-steps li {
  counter-increment: w-step;
  position: relative;
  padding: 0 0 1.1rem 2.6rem;
  color: var(--text-muted);
}

.w-steps li::before {
  content: counter(w-step);
  position: absolute;
  left: 0;
  top: 0.1rem;
  width: 1.7rem;
  height: 1.7rem;
  border-radius: 999px;
  background: var(--bg-card);
  border: 1px solid var(--border-strong);
  color: var(--text-subtle);
  font-size: 0.85rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
}

.w-steps strong { color: var(--text); font-weight: 600; }

/* ---------- 4. limites ---------- */

.w-limits {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.7rem;
}

.w-limits li {
  position: relative;
  padding-left: 1.3rem;
  color: var(--text-muted);
  font-size: 0.95rem;
}

.w-limits li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0.62em;
  width: 6px;
  height: 1px;
  background: var(--text-subtle);
}

/* ---------- 5. prix ---------- */

.w-price {
  display: flex;
  align-items: baseline;
  gap: 0.6rem;
  margin-bottom: 0.6rem;
}

.w-price-amount {
  font-family: var(--font-display);
  font-size: clamp(2.1rem, 5vw, 2.8rem);
  font-weight: 400;
  color: var(--text);
}

.w-price-period {
  color: var(--text-muted);
  font-size: 1rem;
}

.w-price-note {
  color: var(--text-muted);
  font-size: 0.95rem;
  margin: 0 0 0.4rem;
}

/* ---------- 6. action unique ---------- */

.w-action {
  padding: clamp(2.6rem, 6vh, 4rem) 0 clamp(3rem, 7vh, 4.5rem);
  border-top: 1px solid var(--border);
}

.w-cta {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  padding: 1.05rem 1.9rem;
  border-radius: 999px;
  background: var(--accent);
  color: #fff;
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 1.02rem;
  border: 1.5px solid transparent;
  cursor: pointer;
  box-shadow: var(--shadow-md);
  transition: transform .3s var(--ease), box-shadow .3s var(--ease);
}

.w-cta:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

.w-cta-arrow { transition: transform .25s var(--ease); }
.w-cta:hover .w-cta-arrow { transform: translateX(3px); }

.w-action-note {
  margin: 0.9rem 0 0;
  color: var(--text-subtle);
  font-size: 0.88rem;
}

/* ---------- pied ---------- */

.w-footer {
  padding: 1.6rem 0 2.6rem;
  border-top: 1px solid var(--border);
  color: var(--text-subtle);
  font-size: 0.82rem;
}

.w-footer p { margin: 0.2rem 0; }
.w-footer a { color: var(--text-muted); text-decoration: underline; text-underline-offset: 2px; }

/* ---------- mobile ---------- */

@media (max-width: 560px) {
  body { font-size: 16px; }

  /* Deux colonnes sur 390 px écrasent le texte mot à mot : chaque ligne devient un bloc. */
  .w-facts, .w-facts tbody, .w-facts tr { display: block; }
  .w-facts tr {
    padding: 0.85rem 0;
    border-top: 1px solid var(--border);
  }
  .w-facts tr:first-child { border-top: 0; padding-top: 0; }
  .w-facts th,
  .w-facts td {
    display: block;
    width: auto;
    padding: 0;
    border-top: 0;
  }
  .w-facts th { margin-bottom: 0.25rem; }

  .w-cta { width: 100%; justify-content: center; }
}
