/*
 * AvenueCompta — CSS commun aux pages secondaires
 * Chargé sur toutes les pages via functions.php
 * Utilise les variables CSS de header.php
 */

/* ── HERO SOMBRE (fond navy) ─────────────────────────── */
.pg-hero {
  background: var(--navy);
  padding: 72px 40px 88px;
  text-align: center;
  color: #fff;
  position: relative;
  overflow: hidden;
}
.pg-hero::before {
  content: '';
  position: absolute; inset: 0;
  background: radial-gradient(ellipse at 50% -20%, rgba(37,99,235,.28) 0%, transparent 60%);
  pointer-events: none;
}
.pg-hero > .wrap { position: relative; }

.pg-hero-eyebrow {
  font-family: var(--mono);
  font-size: 11px; font-weight: 500; letter-spacing: .14em;
  text-transform: uppercase; color: rgba(255,255,255,.4);
  margin-bottom: 16px;
}
.pg-hero h1 {
  font-family: var(--serif);
  font-size: clamp(2rem, 5vw, 3.2rem);
  font-weight: 400; line-height: 1.1;
  letter-spacing: -.03em; margin: 0 auto 18px;
  max-width: 720px;
  font-variation-settings: "opsz" 144, "SOFT" 40;
}
.pg-hero h1 em { font-style: italic; color: var(--blue-soft); }
.pg-hero p.pg-hero-lead {
  font-size: 1.0625rem; color: rgba(255,255,255,.68);
  max-width: 540px; margin: 0 auto 36px; line-height: 1.65;
}
.pg-hero-cta {
  display: flex; gap: 12px; justify-content: center; flex-wrap: wrap;
}

/* ── HERO CLAIR (fond cream) ──────────────────────────── */
.pg-hero-light {
  background: var(--cream);
  border-bottom: 1px solid var(--line);
  padding: 64px 40px 72px;
  text-align: center;
}
.pg-hero-light .pg-hero-eyebrow { color: var(--blue); }
.pg-hero-light h1 {
  font-family: var(--serif);
  font-size: clamp(1.8rem, 4.5vw, 3rem);
  font-weight: 400; letter-spacing: -.03em;
  color: var(--navy); margin: 0 auto 16px; max-width: 680px;
  line-height: 1.1;
  font-variation-settings: "opsz" 144, "SOFT" 40;
}
.pg-hero-light p.pg-hero-lead {
  font-size: 1.0625rem; color: var(--ink-2);
  max-width: 500px; margin: 0 auto; line-height: 1.65;
}

/* ── EYEBROW ──────────────────────────────────────────── */
.pg-eyebrow {
  font-family: var(--mono);
  font-size: 11px; font-weight: 500; letter-spacing: .14em;
  text-transform: uppercase; color: var(--blue);
  margin-bottom: 14px; display: block;
}

/* ── TITRES DE SECTION ────────────────────────────────── */
.pg-title {
  font-family: var(--serif);
  font-size: clamp(1.8rem, 4vw, 3rem);
  font-weight: 400; color: var(--navy);
  letter-spacing: -.03em; line-height: 1.08;
  margin: 0 0 14px;
  font-variation-settings: "opsz" 144, "SOFT" 40;
}
.pg-title em { font-style: italic; color: var(--blue); }
.pg-title-center { text-align: center; }

.pg-subtitle {
  font-size: 1.0625rem; color: var(--ink-2);
  line-height: 1.6; max-width: 560px; margin: 0 auto;
}

.pg-section-head {
  max-width: 700px; margin: 0 auto 52px; text-align: center;
}

/* ── SECTIONS ─────────────────────────────────────────── */
.pg-section { padding: 88px 40px; }
.pg-section-cream { background: var(--cream); }
.pg-section-cream-2 { background: var(--cream-2); }
.pg-section-ivory { background: var(--ivory); }
.pg-section-navy {
  background: var(--navy); color: #fff;
  position: relative; overflow: hidden;
}
.pg-section-navy::before {
  content: '';
  position: absolute; inset: 0;
  background: radial-gradient(ellipse at 90% 20%, rgba(37,99,235,.3), transparent 45%),
              radial-gradient(ellipse at 10% 120%, rgba(37,99,235,.15), transparent 40%);
  pointer-events: none;
}
.pg-section-navy > .wrap { position: relative; }
.pg-section-navy .pg-title { color: #fff; }
.pg-section-navy .pg-subtitle { color: rgba(255,255,255,.65); }
.pg-section-navy .pg-section-head { text-align: center; }

/* ── CARDS ────────────────────────────────────────────── */
.pg-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 32px 28px;
  transition: transform .18s, box-shadow .18s;
}
.pg-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 20px 40px -24px rgba(15,27,61,.15);
}
.pg-card-sm { border-radius: 16px; padding: 24px 20px; }

.pg-card-icon {
  width: 48px; height: 48px; border-radius: 14px;
  background: var(--blue-soft); color: var(--blue);
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 20px; flex-shrink: 0;
}
.pg-card-icon svg {
  width: 24px; height: 24px;
  stroke: currentColor; fill: none;
  stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round;
}
.pg-card-icon-ok { background: var(--ok-soft); color: var(--ok); }
.pg-card-icon-warn { background: var(--warn-soft); color: var(--warn); }

.pg-card h3 {
  font-family: var(--sans);
  font-size: 1rem; font-weight: 600; color: var(--navy);
  margin: 0 0 10px;
}
.pg-card p {
  font-size: .875rem; color: var(--ink-2); line-height: 1.6; margin: 0;
}

/* ── GRILLES ──────────────────────────────────────────── */
.pg-grid-3 { display: grid; grid-template-columns: repeat(3,1fr); gap: 20px; }
.pg-grid-2 { display: grid; grid-template-columns: repeat(2,1fr); gap: 20px; }
.pg-grid-4 { display: grid; grid-template-columns: repeat(4,1fr); gap: 16px; }

/* ── CHECK LIST ───────────────────────────────────────── */
.pg-check-item {
  display: flex; gap: 14px; align-items: flex-start;
  background: var(--cream); border-radius: 14px; padding: 20px 18px;
}
.pg-check-dot {
  width: 28px; height: 28px; border-radius: 50%;
  background: var(--ok-soft);
  display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.pg-check-dot svg {
  width: 14px; height: 14px;
  stroke: var(--ok); fill: none; stroke-width: 2.5;
  stroke-linecap: round; stroke-linejoin: round;
}
.pg-check-item strong {
  font-size: .9375rem; color: var(--navy); display: block; margin-bottom: 3px;
}
.pg-check-item p { font-size: .875rem; color: var(--ink-2); margin: 0; line-height: 1.5; }

/* ── STEP NUMBER ──────────────────────────────────────── */
.pg-step-num {
  width: 44px; height: 44px; border-radius: 12px;
  background: var(--blue-soft); color: var(--blue);
  font-size: 1.125rem; font-weight: 800;
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 20px; font-family: var(--sans);
}

/* ── STAT BLOCK ───────────────────────────────────────── */
.pg-stat {
  text-align: center; background: #fff;
  border: 1px solid var(--line); border-radius: 18px; padding: 28px 20px;
}
.pg-stat-num {
  font-family: var(--serif);
  font-size: 2.6rem; font-weight: 500; color: var(--blue);
  line-height: 1; margin-bottom: 8px;
  font-variation-settings: "opsz" 72;
}
.pg-stat-label { font-size: .875rem; color: var(--ink-2); line-height: 1.4; }

/* ── FAQ ──────────────────────────────────────────────── */
.pg-faq-item {
  background: #fff; border: 1px solid var(--line);
  border-radius: 14px; margin-bottom: 10px; overflow: hidden;
}
.pg-faq-q {
  width: 100%; display: flex; align-items: flex-start;
  justify-content: space-between; gap: 12px;
  padding: 20px 24px; background: none; border: none;
  font-family: var(--serif); font-size: 1.1rem; font-weight: 400;
  color: var(--navy); cursor: pointer; text-align: left;
  letter-spacing: -.01em; white-space: normal; word-break: break-word;
  font-variation-settings: "opsz" 72, "SOFT" 40;
  box-sizing: border-box;
}
.pg-faq-q span { flex: 1; min-width: 0; }
.pg-faq-q svg {
  width: 18px; height: 18px; stroke: var(--blue); fill: none;
  stroke-width: 2; flex-shrink: 0; transition: transform .2s;
  margin-top: 3px;
}
.pg-faq-item.open .pg-faq-q svg { transform: rotate(45deg); }
.pg-faq-a {
  display: none; padding: 0 24px 20px;
  font-size: .9375rem; color: var(--ink-2); line-height: 1.7;
  border-top: 1px solid var(--line); padding-top: 16px;
}
.pg-faq-item.open .pg-faq-a { display: block; }
@media (max-width: 768px) {
  .pg-faq-q { font-size: .9375rem; padding: 16px 18px; }
  .pg-faq-a { padding: 0 18px 16px; padding-top: 14px; }
}

/* ── PROSE (pages légales, articles) ─────────────────── */
.pg-prose { max-width: 740px; margin: 0 auto; padding: 64px 40px; }
.pg-prose h2 {
  font-family: var(--serif);
  font-size: 1.4rem; font-weight: 400; color: var(--navy);
  margin: 48px 0 14px; padding-bottom: 12px;
  border-bottom: 1px solid var(--line);
  letter-spacing: -.015em;
  font-variation-settings: "opsz" 72, "SOFT" 40;
}
.pg-prose h2:first-child { margin-top: 0; }
.pg-prose p {
  font-size: .9375rem; color: var(--ink-2); line-height: 1.75; margin-bottom: 14px;
}
.pg-prose ul {
  padding-left: 20px; margin-bottom: 14px;
}
.pg-prose li {
  font-size: .9375rem; color: var(--ink-2); line-height: 1.7; margin-bottom: 6px;
}
.pg-prose a { color: var(--blue); text-decoration: underline; }
.pg-prose strong { color: var(--navy); font-weight: 600; }
.pg-prose-meta {
  background: var(--cream-2); border: 1px solid var(--line);
  border-radius: 10px; padding: 12px 16px;
  font-size: .8125rem; color: var(--ink-3); margin-bottom: 40px;
}

/* ── FORM CARD ────────────────────────────────────────── */
.pg-form-card {
  background: #fff; border: 1.5px solid var(--line);
  border-radius: 24px; padding: 36px 32px;
  box-shadow: 0 8px 32px rgba(15,27,61,.09);
}
.pg-form-card h2 {
  font-family: var(--serif); font-size: 1.4rem; font-weight: 400;
  color: var(--navy); margin: 0 0 6px;
  letter-spacing: -.02em;
  font-variation-settings: "opsz" 72, "SOFT" 40;
}
.pg-form-card > p { font-size: .875rem; color: var(--ink-2); margin: 0 0 24px; }

.pg-field { margin-bottom: 14px; }
.pg-field label {
  display: block; font-family: var(--mono);
  font-size: .7rem; font-weight: 500; letter-spacing: .1em;
  text-transform: uppercase; color: var(--ink-3); margin-bottom: 7px;
}
.pg-field input, .pg-field select, .pg-field textarea {
  width: 100%; padding: 12px 14px;
  border: 1.5px solid var(--line); border-radius: 10px;
  font-family: var(--sans); font-size: .9rem;
  color: var(--navy); background: var(--cream);
  outline: none; box-sizing: border-box;
  transition: border-color .15s, background .15s;
}
.pg-field input:focus, .pg-field select:focus, .pg-field textarea:focus {
  border-color: var(--blue); background: #fff;
}
.pg-field textarea { resize: vertical; min-height: 90px; }
.pg-fields-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }

.pg-submit {
  width: 100%; padding: 14px;
  background: var(--blue); color: #fff;
  border: none; border-radius: 12px;
  font-family: var(--sans); font-size: .9375rem; font-weight: 600;
  cursor: pointer; margin-top: 8px;
  display: flex; align-items: center; justify-content: center; gap: 8px;
  transition: background .2s, transform .15s;
}
.pg-submit:hover { background: var(--blue-ink); transform: translateY(-1px); }
.pg-submit:disabled { opacity: .6; cursor: not-allowed; transform: none; }
.pg-form-note {
  font-size: .775rem; color: var(--ink-3); text-align: center; margin-top: 10px;
}

/* ── SUCCESS STATE ────────────────────────────────────── */
.pg-success {
  display: none; text-align: center; padding: 16px 0;
}
.pg-success svg {
  width: 44px; height: 44px; stroke: var(--ok); fill: none;
  stroke-width: 1.7; margin: 0 auto 14px; display: block;
}
.pg-success h3 {
  font-family: var(--serif); font-size: 1.3rem; font-weight: 400;
  color: var(--navy); margin: 0 0 8px;
}
.pg-success p { font-size: .875rem; color: var(--ink-2); margin: 0; }

/* ── CTA BANNER ───────────────────────────────────────── */
.pg-cta-banner {
  background: var(--cream-2); border: 1px solid var(--line);
  border-radius: 20px; padding: 40px 36px; text-align: center;
  margin-top: 56px;
}
.pg-cta-banner h2 {
  font-family: var(--serif); font-size: clamp(1.4rem, 3vw, 2rem);
  font-weight: 400; color: var(--navy); margin: 0 0 10px;
  letter-spacing: -.02em;
  font-variation-settings: "opsz" 72, "SOFT" 40;
}
.pg-cta-banner p { font-size: .9375rem; color: var(--ink-2); margin: 0 0 24px; line-height: 1.6; }
.pg-cta-banner-btns { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }

/* ── TABLES ───────────────────────────────────────────── */
.pg-table-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  margin: 16px 0 24px;
  border-radius: 8px;
}
.pg-table-wrap .pg-table { margin: 0; }

/* ── RESPONSIVE ───────────────────────────────────────── */
@media (max-width: 900px) {
  .pg-grid-4 { grid-template-columns: repeat(2,1fr); }
  .pg-grid-3 { grid-template-columns: repeat(2,1fr); }
}
@media (max-width: 768px) {
  .pg-hero { padding: 48px 20px 64px; }
  .pg-hero-light { padding: 48px 20px 56px; }
  .pg-section { padding: 56px 20px; }
  .pg-prose { padding: 40px 16px; }
  .pg-form-card { padding: 28px 20px; }
  .pg-grid-3, .pg-grid-2, .pg-grid-4 { grid-template-columns: 1fr; }
  .pg-fields-row { grid-template-columns: 1fr; }
  .pg-cta-banner { padding: 32px 24px; }

  /* Tables légales : scroll horizontal sur mobile */
  .pg-table { display: block; overflow-x: auto; -webkit-overflow-scrolling: touch; border-radius: 8px; min-width: 520px; }
  .pg-prose h2 { font-size: 1.2rem; margin: 32px 0 12px; }
}
