/* =============================================================
   GAÉ Finance - Styles communs des pages intérieures (Phase 2)
   Source : système de styles de la page Valorisation (référence
   graphique des gabarits). Complète site.css (header, nav,
   dropdown, footer) sans le dupliquer.
   Ordre de chargement : site.css -> pages.css -> feuille de page.
   ============================================================= */

:root {
  --bg: #f7f5f1;
  --surface: #ffffff;
  --surface-alt: #f3efe7;
  --surface-soft: #faf8f4;
  --text: #16181d;
  --muted: #5d6470;
  --line: rgba(22, 24, 29, 0.08);
  --line-strong: rgba(22, 24, 29, 0.16);
  --accent: #163867;
  --accent-dark: #10161f;
  --accent-soft: rgba(29, 53, 87, 0.08);
  --shadow: 0 18px 50px rgba(16, 22, 34, 0.06);
  --radius-xl: 32px;
  --radius-lg: 24px;
  --radius-md: 18px;
  --container: 1180px;
}

* { box-sizing: border-box; }

html { font-size: 16px; scroll-behavior: smooth; }

body {
  margin: 0;
  background: linear-gradient(180deg, #faf8f4 0%, #f7f5f1 100%);
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }

/* ---------- Boutons (spécifiques page) ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 50px;
  padding: 0 22px;
  border-radius: 4px;
  font-size: 0.96rem;
  font-weight: 600;
  border: 1px solid transparent;
  transition: transform 0.25s ease, box-shadow 0.25s ease, background 0.25s ease;
  cursor: pointer;
  white-space: nowrap;
}

.btn:hover { transform: translateY(-1px); }

.btn-primary { background: var(--accent); color: #fff; }

.btn-secondary {
  background: rgba(255,255,255,0.72);
  border-color: var(--line-strong);
  color: var(--text);
}

/* ---------- Kickers / typographie ---------- */
.eyebrow,
.section-kicker,
.mini-kicker {
  display: inline-block;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-weight: 700;
}

.eyebrow {
  display: block;
  padding: 0;
  background: none;
  border: 0;
  backdrop-filter: none;
  color: inherit;
  opacity: 0.72;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.section-kicker {
  font-size: 0.82rem;
  color: #5d6470;
  margin-bottom: 14px;
}

.mini-kicker {
  font-size: 0.74rem;
  color: #5b6880;
  margin-bottom: 12px;
}

h1, h2, h3 { margin: 0; color: var(--text); }

h1 {
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(3rem, 6vw, 5rem);
  line-height: 0.96;
  letter-spacing: -0.045em;
}

h2 {
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(2.15rem, 4vw, 3.25rem);
  line-height: 1.02;
  letter-spacing: -0.03em;
}

h3 {
  font-size: 1.28rem;
  line-height: 1.18;
  letter-spacing: -0.02em;
  margin-bottom: 14px;
}

p { margin: 0; }

/* ---------- Synopsis éditorial 7 temps (16B-3B, motif partagé
   avec la Home 16B-3A) : typographie fine, flèches or, ni stepper
   ni timeline. ---------- */
.method-synopsis {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 8px 0;
  margin: 0 0 32px;
  font-size: 0.8rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}

.method-synopsis span { white-space: nowrap; }

.method-synopsis span + span::before {
  content: "→";
  margin: 0 12px;
  color: var(--gold);
  letter-spacing: 0;
}

/* ---------- Hero de page service ---------- */
.service-hero {
  position: relative;
  overflow: hidden;
  padding: 110px 0 90px;
  background: linear-gradient(135deg, #182536 0%, #10161f 100%);
  color: #f4f7fb;
}

.service-hero::before,
.service-hero::after {
  content: "";
  position: absolute;
  border-radius: 50%;
  filter: blur(10px);
  opacity: 0.12;
  pointer-events: none;
}

.service-hero::before {
  width: 340px;
  height: 340px;
  right: 10%;
  top: -80px;
  background: #ffffff;
}

.service-hero::after {
  width: 260px;
  height: 260px;
  left: -50px;
  bottom: -70px;
  background: #d9e2f0;
}

.service-hero__grid {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(320px, 0.8fr);
  gap: 44px;
  align-items: stretch;
  position: relative;
  z-index: 1;
}

.service-hero__copy h1 {
  margin: 18px 0 22px;
  max-width: 18ch;
  color: #ffffff;
  text-shadow: 0 8px 28px rgba(0,0,0,0.18);
}

.service-hero__lead {
  max-width: 60ch;
  font-size: 1.12rem;
  line-height: 1.82;
  color: rgba(244,247,251,0.9);
  margin-bottom: 18px;
}

.service-hero__copy > p {
  max-width: 62ch;
}

.service-hero__actions .btn-secondary {
  background: none;
  border: 0;
  padding: 0 0 0 4px;
  box-shadow: none;
  color: rgba(244,247,251,0.78);
  text-decoration: underline;
  text-underline-offset: 5px;
  text-decoration-color: rgba(196,169,125,0.55);
}

.service-hero__actions .btn-secondary:hover {
  background: none;
  color: #ffffff;
  text-decoration-color: #C4A97D;
}

.service-hero__text {
  max-width: 56ch;
  font-size: 1.02rem;
  line-height: 1.8;
  color: rgba(244,247,251,0.74);
}

.service-hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 30px;
}

.service-hero .btn-primary {
  background: #ffffff;
  color: #16181d;
  box-shadow: none;
}

.service-hero .btn-secondary {
  background: rgba(255,255,255,0.08);
  color: #ffffff;
  border-color: rgba(255,255,255,0.18);
}

.hero-panel {
  position: relative;
  min-height: 100%;
  border-radius: var(--radius-s, 4px);
  border: 1px solid rgba(255,255,255,0.14);
  background: rgba(255,255,255,0.04);
  box-shadow: none;
  padding: 28px;
  backdrop-filter: none;
  display: grid;
  gap: 18px;
  align-content: start;
}

.hero-panel__intro {
  color: rgba(244,247,251,0.8);
  line-height: 1.75;
  font-size: 0.98rem;
  max-width: 28ch;
}

.hero-mini-cards {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin-top: 4px;
}

.hero-mini-card {
  padding: 14px 0 0;
  border-radius: 0;
  background: transparent;
  border: none;
  border-top: 1px solid rgba(255,255,255,0.14);
}

.hero-mini-card strong {
  display: block;
  color: #ffffff;
  font-size: 1.05rem;
  margin-bottom: 8px;
}

.hero-mini-card span {
  color: rgba(244,247,251,0.74);
  font-size: 0.92rem;
  line-height: 1.6;
}

.hero-bar {
  margin-top: auto;
  padding-top: 18px;
  border-top: 1px solid rgba(255,255,255,0.12);
  display: flex;
  gap: 18px;
  flex-wrap: wrap;
  color: rgba(244,247,251,0.76);
  font-size: 0.9rem;
}

/* ---------- Sections ---------- */
.section {
  padding: 96px 0;
  position: relative;
}

.section--alt { background: rgba(255,255,255,0.46); }

.section--soft { background: linear-gradient(180deg, #f7f5f1 0%, #f4f0e8 100%); }

.section--dark {
  background: linear-gradient(180deg, #182536 0%, #10161f 100%);
  color: #f2f6fb;
}

.section-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 390px);
  gap: 28px;
  align-items: end;
  margin-bottom: 34px;
}

.section-head h2 { max-width: 13ch; }

.section-head--single { grid-template-columns: 1fr; }

.section-side,
.section-intro {
  font-size: 1.02rem;
  line-height: 1.78;
  color: var(--muted);
  max-width: 64ch;
}

.section--dark .section-kicker,
.section--dark h2 {
  color: #f2f6fb;
}

.section--dark .section-side,
.section--dark .section-intro {
  color: rgba(242,246,251,0.78);
}

.narrow { max-width: 860px; }

.richtext p {
  max-width: 68ch;
  font-size: 1.05rem;
  line-height: 1.88;
  color: #4b5563;
}

.richtext p + p { margin-top: 18px; }

.editorial-block .richtext { margin-top: 22px; }

/* ---------- Pages legales (Phase 11C) ---------- */
.richtext h2 {
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.5rem;
  line-height: 1.18;
  letter-spacing: -0.02em;
  margin: 36px 0 14px;
  color: var(--text);
}

.richtext h2:first-child { margin-top: 0; }

.richtext h3 {
  font-size: 1.12rem;
  line-height: 1.3;
  letter-spacing: -0.01em;
  margin: 24px 0 8px;
  color: var(--text);
}

.richtext ul {
  margin: 14px 0 0;
  padding-left: 22px;
}

.richtext li {
  max-width: 68ch;
  font-size: 1.02rem;
  line-height: 1.8;
  color: #4b5563;
  margin-top: 8px;
}

.richtext a {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.richtext strong { color: var(--text); }

.editorial-block {
  position: relative;
  padding: 36px 40px;
  border-radius: 32px;
  background: linear-gradient(180deg, #f3eee5 0%, #efe7dc 100%);
  border: 1px solid rgba(22,24,29,0.06);
  box-shadow: var(--shadow);
}

.editorial-block::before {
  content: "";
  position: absolute;
  inset: auto auto -30px -20px;
  width: 160px;
  height: 160px;
  border-radius: 50%;
  background: rgba(29, 53, 87, 0.05);
  filter: blur(2px);
}

.grid-2,
.grid-3 {
  display: grid;
  gap: 24px;
}

.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }

.card {
  position: relative;
  background: rgba(255,255,255,0.84);
  border: 1px solid rgba(22,24,29,0.08);
  border-radius: var(--radius-lg);
  padding: 34px;
  box-shadow: var(--shadow);
  min-height: 100%;
  overflow: hidden;
}

.card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 4px;
  background: linear-gradient(90deg, rgba(29,53,87,0.18), rgba(29,53,87,0.04));
}

.card p {
  font-size: 1rem;
  line-height: 1.82;
  color: var(--muted);
}

.card-title-large {
  max-width: 14ch;
  margin-bottom: 18px;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(1.65rem, 2.2vw, 2rem);
  line-height: 1.08;
  letter-spacing: -0.03em;
}

/* ---------- Citation ---------- */
.quote-band {
  padding: 36px 40px;
  border-radius: 30px;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.1);
  box-shadow: 0 18px 50px rgba(0,0,0,0.08);
}

.quote-band .section-kicker {
  color: rgba(242,246,251,0.72);
}

.quote-band blockquote {
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(1.55rem, 2.6vw, 2.2rem);
  line-height: 1.24;
  letter-spacing: -0.02em;
  color: #ffffff;
  max-width: 26ch;
}

.quote-band p {
  margin-top: 18px;
  color: rgba(242,246,251,0.72);
  line-height: 1.78;
  max-width: 52ch;
}

.method-note {
  max-width: 660px;
  margin-top: 12px;
  padding: 18px 20px;
  border-radius: 18px;
  background: rgba(29,53,87,0.06);
  border: 1px solid rgba(29,53,87,0.08);
  color: #334155;
  line-height: 1.75;
  font-size: 0.96rem;
}

/* ---------- Schémas financiers éditoriaux (16C) : progression
   linéaire sur un filet, ticks or, sans pastilles ni animation.
   Nombre de colonnes réglé par --fin-cols sur l'élément. ---------- */
.fin-schema {
  display: grid;
  grid-template-columns: repeat(var(--fin-cols, 4), minmax(0, 1fr));
  gap: 0 24px;
  margin: 30px 0 0;
  border-top: 1px solid var(--line-strong);
}

.fin-schema__stop {
  position: relative;
  padding: 14px 0 0;
  min-width: 0;
}

.fin-schema__stop::before {
  content: "";
  position: absolute;
  top: -1px;
  left: 0;
  width: 26px;
  height: 2px;
  background: var(--gold);
}

.fin-schema__num {
  display: block;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--gold-ink, var(--gold));
  margin-bottom: 5px;
}

.fin-schema__word {
  display: block;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.05rem;
  color: var(--text);
}

.fin-schema__hint {
  display: block;
  margin-top: 3px;
  font-size: 0.85rem;
  color: var(--muted);
}

@media (max-width: 980px) {
  .fin-schema {
    grid-template-columns: 1fr;
    border-top: none;
    border-left: 1px solid var(--line-strong);
  }

  .fin-schema__stop { padding: 0 0 16px 20px; }

  .fin-schema__stop::before {
    top: 4px;
    left: -1px;
    width: 2px;
    height: 18px;
  }
}

.split-panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 24px;
  align-items: stretch;
}

.split-panel .card {
  padding: 36px;
}

.clean-list {
  margin: 0;
  padding-left: 1.1rem;
}

.editorial-block > p,
.clean-list li {
  max-width: 68ch;
}

.clean-list li {
  color: #4b5563;
  line-height: 1.82;
}

.clean-list li + li { margin-top: 12px; }

.term-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.term-chip {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 18px 0 0;
  border-radius: 0;
  background: transparent;
  border: none;
  border-top: 1px solid var(--line-strong);
  box-shadow: none;
}

.term-chip h3 {
  margin-bottom: 0;
  font-size: 1.05rem;
}

.term-chip p {
  font-size: 0.95rem;
  line-height: 1.72;
  color: #556070;
}

/* ---------- CTA de contact ---------- */
.cta-band__inner {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 28px;
  align-items: center;
  padding: 40px;
  border-radius: 30px;
  background: linear-gradient(180deg, #182536 0%, #10161f 100%);
  border: 1px solid rgba(22,24,29,0.08);
  box-shadow: 0 18px 50px rgba(16, 22, 34, 0.08);
}

.cta-band__content .section-kicker,
.cta-band__content h2,
.cta-band__content p {
  color: #f2f6fb;
}

/* 16C-4 : le titre de bande CTA a une échelle propre (ni hero,
   ni corps éditorial) - harmonisé sur toutes les pages à cta-band */
.cta-band__content h2 {
  font-size: clamp(1.75rem, 2.6vw, 2.25rem);
  line-height: 1.15;
}

.cta-band__content p {
  margin-top: 16px;
  max-width: 56ch;
  line-height: 1.8;
  color: rgba(242,246,251,0.8);
}

.cta-band__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  justify-content: flex-start;
}

.cta-band .btn-primary {
  background: #ffffff;
  color: #16181d;
  box-shadow: none;
}

.cta-band .btn-secondary {
  background: rgba(255,255,255,0.08);
  color: #ffffff;
  border-color: rgba(255,255,255,0.18);
}

/* ---------- Responsive page ---------- */
@media (max-width: 1180px) {
  .section-head { grid-template-columns: 1fr; }
  .grid-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 980px) {
  .service-hero,
  .section { padding: 74px 0; }

  .service-hero__grid,
  .grid-2,
  .grid-3,
  .split-panel,
  .cta-band__inner,
  .term-grid { grid-template-columns: 1fr; }
}

@media (max-width: 720px) {
  .container { width: min(var(--container), calc(100% - 24px)); }

  .btn { min-height: 42px; padding: 0 18px; font-size: 0.92rem; }

  .service-hero,
  .section,
  .footer-premium { padding: 58px 0 24px; }

  .hero-panel,
  .card,
  .editorial-block,
  .quote-band,
  .cta-band__inner { padding: 24px; }
}

/* ---------- Gabarits Phase 2 : ajouts communs ---------- */

/* Hero de page sans panneau latéral (pages institutionnelles
   et légales, gabarits sans contenu définitif). */
.service-hero__grid--solo {
  grid-template-columns: 1fr;
}

/* Formulaire de contact (structure seule, branchement en phase 3). */
.form-card {
  background: transparent;
  border: none;
  border-top: 1px solid var(--line-strong);
  border-radius: 0;
  padding: 26px 0 0;
  box-shadow: none;
}

.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
}

.form-field {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.form-field--full {
  grid-column: 1 / -1;
}

.form-field label {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text);
}

.form-field input,
.form-field select,
.form-field textarea {
  font: inherit;
  color: var(--text);
  background: var(--surface-soft);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-s, 4px);
  padding: 12px 16px;
  min-height: 46px;
  width: 100%;
}

.form-field textarea {
  min-height: 132px;
  resize: vertical;
}

.form-field input:focus,
.form-field select:focus,
.form-field textarea:focus {
  outline: 2px solid var(--accent);
  outline-offset: 1px;
}

.form-note {
  max-width: 62ch;
  font-size: 0.85rem;
  color: var(--muted);
}

@media (max-width: 720px) {
  .form-card { padding: 20px 0 0; }
  .form-grid { grid-template-columns: 1fr; }
}

.form-status {
  max-width: 62ch;
  margin: 16px 0 0;
  padding: 14px 18px;
  border-radius: 12px;
  background: #f7f5f1;
  border: 1px solid rgba(22, 56, 103, 0.15);
  color: #16181d;
  font-size: 0.95rem;
  line-height: 1.55;
}

.form-status a {
  color: #163867;
  font-weight: 600;
}

.form-rgpd {
  max-width: 62ch;
  margin: 14px 0 0;
  font-size: 0.85rem;
  line-height: 1.6;
  color: var(--muted);
}

.form-rgpd a {
  color: #163867;
  font-weight: 600;
}
