/*
Theme Name: Fin4Cast
Theme URI: https://fin4cast.be
Author: Fin4Cast
Description: Thème sur mesure pour fin4cast.be — MVP de lancement (6 pages), basé sur la proposition de site et le brandbook Fin4Cast. Pas de page builder : code propre, léger, orienté performance/SEO.
Version: 0.1.0
Requires at least: 6.0
Requires PHP: 8.0
Text Domain: fin4cast
*/

/* ==========================================================================
   1. DESIGN TOKENS (brandbook Fin4Cast)
   ========================================================================== */

:root {
  /* Brand colors */
  --f4c-forest-green: #173e2b;
  --f4c-deep-black: #101819;
  --f4c-light-fern: #a0cf6c;
  --f4c-white: #ffffff;

  /* Tints (backgrounds) */
  --f4c-forest-green-50: color-mix(in srgb, var(--f4c-forest-green) 50%, white);
  --f4c-forest-green-25: color-mix(in srgb, var(--f4c-forest-green) 25%, white);

  /* Semantic roles */
  --f4c-bg: var(--f4c-white);
  --f4c-bg-dark: var(--f4c-forest-green);
  --f4c-bg-darker: var(--f4c-deep-black);
  --f4c-text: var(--f4c-deep-black);
  --f4c-text-on-dark: var(--f4c-white);
  --f4c-accent: var(--f4c-light-fern);
  --f4c-border: color-mix(in srgb, var(--f4c-deep-black) 12%, white);

  /* Typography — brandbook: Mozaic HUM (Adobe Fonts, kit à configurer, cf. functions.php).
     Fallback stack tant que le kit Adobe Fonts n'est pas branché. */
  --f4c-font: "Mozaic HUM", "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;

  --f4c-fw-light: 300;
  --f4c-fw-regular: 400;
  --f4c-fw-medium: 500;
  --f4c-fw-semibold: 600;
  --f4c-fw-bold: 700;

  /* Spacing / layout */
  --f4c-container: 1160px;
  --f4c-radius: 10px;
  --f4c-space-1: 8px;
  --f4c-space-2: 16px;
  --f4c-space-3: 24px;
  --f4c-space-4: 40px;
  --f4c-space-5: 64px;
  --f4c-space-6: 96px;
}

/* ==========================================================================
   2. RESET / BASE
   ========================================================================== */

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

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--f4c-font);
  font-weight: var(--f4c-fw-light);
  color: var(--f4c-text);
  background: var(--f4c-bg);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; display: block; }

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

h1, h2, h3, h4 {
  font-weight: var(--f4c-fw-semibold);
  line-height: 1.15;
  margin: 0 0 var(--f4c-space-2);
  letter-spacing: -0.01em;
}

h1 { font-size: clamp(2.25rem, 4vw + 1rem, 3.75rem); font-weight: var(--f4c-fw-bold); }
h2 { font-size: clamp(1.75rem, 2.5vw + 1rem, 2.5rem); }
h3 { font-size: 1.25rem; }

p { margin: 0 0 var(--f4c-space-2); }

.container {
  width: 100%;
  max-width: var(--f4c-container);
  margin-inline: auto;
  padding-inline: var(--f4c-space-3);
}

section { padding-block: var(--f4c-space-6); }

@media (max-width: 640px) {
  section { padding-block: var(--f4c-space-4); }
}

.section-dark, .section-darker {
  color: var(--f4c-text-on-dark);
}
.section-dark { background: var(--f4c-bg-dark); }
.section-darker { background: var(--f4c-bg-darker); }

.eyebrow {
  display: inline-block;
  font-weight: var(--f4c-fw-semibold);
  font-size: 0.8rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--f4c-forest-green);
  margin-bottom: var(--f4c-space-2);
}
.section-dark .eyebrow, .section-darker .eyebrow { color: var(--f4c-accent); }

.lede {
  font-size: 1.15rem;
  max-width: 640px;
}

.text-center { text-align: center; }
.mx-auto { margin-inline: auto; }

/* ==========================================================================
   3. BUTTONS / CTA
   ========================================================================== */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5em;
  font-family: var(--f4c-font);
  font-weight: var(--f4c-fw-bold);
  font-size: 0.95rem;
  padding: 0.9em 1.6em;
  border-radius: var(--f4c-radius);
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 0.15s ease, background-color 0.15s ease, border-color 0.15s ease;
  white-space: nowrap;
}
.btn:hover { transform: translateY(-1px); }

.btn-primary {
  background: var(--f4c-accent);
  color: var(--f4c-deep-black);
}
.btn-primary:hover { background: color-mix(in srgb, var(--f4c-accent) 85%, black); }

.btn-outline {
  background: transparent;
  border-color: currentColor;
  color: inherit;
}
.section-dark .btn-outline, .section-darker .btn-outline { color: var(--f4c-white); }
.btn-outline:not(.section-dark *):not(.section-darker *) { color: var(--f4c-forest-green); }

.btn-secondary {
  background: transparent;
  color: var(--f4c-forest-green);
  text-decoration: underline;
  text-underline-offset: 3px;
  padding-inline: 0;
}
.section-dark .btn-secondary, .section-darker .btn-secondary { color: var(--f4c-white); }

/* ==========================================================================
   4. HEADER / NAV
   ========================================================================== */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: saturate(180%) blur(8px);
  border-bottom: 1px solid var(--f4c-border);
}

.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-block: var(--f4c-space-2);
}

.site-logo {
  display: flex;
  align-items: center;
  gap: 0.5em;
  font-weight: var(--f4c-fw-bold);
  font-size: 1.15rem;
  color: var(--f4c-forest-green);
}
.site-logo img { height: 32px; width: auto; }

.primary-nav ul {
  list-style: none;
  display: flex;
  gap: var(--f4c-space-4);
  margin: 0;
  padding: 0;
}
.primary-nav a {
  font-weight: var(--f4c-fw-medium);
  font-size: 0.95rem;
}
.primary-nav a:hover { color: var(--f4c-forest-green); }

.header-actions { display: flex; align-items: center; gap: var(--f4c-space-3); }

.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.4em;
}
.nav-toggle svg { width: 24px; height: 24px; }

@media (max-width: 860px) {
  .primary-nav {
    position: fixed;
    inset: 64px 0 0 0;
    background: var(--f4c-white);
    padding: var(--f4c-space-3);
    transform: translateY(-110%);
    transition: transform 0.2s ease;
  }
  .primary-nav.is-open { transform: translateY(0); }
  .primary-nav ul { flex-direction: column; gap: var(--f4c-space-2); }
  .nav-toggle { display: inline-flex; }
  .header-actions .btn-primary { font-size: 0.85rem; padding: 0.7em 1.1em; }
}

/* ==========================================================================
   5. HERO
   ========================================================================== */

.hero {
  padding-block: var(--f4c-space-6) var(--f4c-space-5);
  position: relative;
  overflow: hidden;
}
.hero .container {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: var(--f4c-space-5);
  align-items: center;
}
@media (max-width: 900px) {
  .hero .container { grid-template-columns: 1fr; }
}
.hero-actions {
  display: flex;
  gap: var(--f4c-space-3);
  align-items: center;
  flex-wrap: wrap;
  margin-top: var(--f4c-space-3);
}
.hero-visual {
  aspect-ratio: 4 / 3;
  border-radius: var(--f4c-radius);
  background:
    radial-gradient(circle at 30% 20%, color-mix(in srgb, var(--f4c-accent) 35%, transparent), transparent 60%),
    linear-gradient(160deg, var(--f4c-forest-green), var(--f4c-deep-black));
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--f4c-white);
  text-align: center;
  padding: var(--f4c-space-3);
}

/* ==========================================================================
   6. TRUST BAR
   ========================================================================== */

.trust-bar {
  padding-block: var(--f4c-space-3);
  border-block: 1px solid var(--f4c-border);
}
.trust-bar .container {
  display: flex;
  flex-wrap: wrap;
  gap: var(--f4c-space-3);
  align-items: center;
  justify-content: center;
  text-align: center;
}
.trust-bar p {
  margin: 0;
  font-weight: var(--f4c-fw-medium);
  font-size: 0.9rem;
  color: color-mix(in srgb, var(--f4c-text) 65%, transparent);
}

/* ==========================================================================
   7. CARD GRIDS (pain points, pillars, steps)
   ========================================================================== */

.grid {
  display: grid;
  gap: var(--f4c-space-3);
}
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 900px) {
  .grid-3, .grid-4 { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 640px) {
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
}

.card {
  background: var(--f4c-white);
  border: 1px solid var(--f4c-border);
  border-radius: var(--f4c-radius);
  padding: var(--f4c-space-3);
}
.section-dark .card, .section-darker .card {
  background: color-mix(in srgb, var(--f4c-white) 6%, transparent);
  border-color: color-mix(in srgb, var(--f4c-white) 16%, transparent);
}

.card-number {
  font-weight: var(--f4c-fw-bold);
  font-size: 0.85rem;
  color: var(--f4c-forest-green);
  margin-bottom: var(--f4c-space-1);
}
.section-dark .card-number, .section-darker .card-number { color: var(--f4c-accent); }

/* ==========================================================================
   8. MANIFESTO / QUOTE BLOCK
   ========================================================================== */

.manifesto {
  text-align: center;
  padding-block: var(--f4c-space-6);
}
.manifesto blockquote {
  margin: 0 auto;
  max-width: 820px;
  font-size: clamp(1.5rem, 2vw + 1rem, 2.25rem);
  font-weight: var(--f4c-fw-medium);
  line-height: 1.3;
}

/* ==========================================================================
   9. FORMS
   ========================================================================== */

.f4c-form { max-width: 640px; }
.f4c-form.f4c-form--wide { max-width: 100%; }

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--f4c-space-2);
}
@media (max-width: 640px) {
  .form-row { grid-template-columns: 1fr; }
}

.form-field { margin-bottom: var(--f4c-space-2); }
.form-field label {
  display: block;
  font-weight: var(--f4c-fw-medium);
  font-size: 0.9rem;
  margin-bottom: 0.4em;
}
.form-field input,
.form-field select,
.form-field textarea {
  width: 100%;
  font-family: var(--f4c-font);
  font-size: 1rem;
  padding: 0.75em 0.9em;
  border-radius: 8px;
  border: 1px solid var(--f4c-border);
  background: var(--f4c-white);
  color: var(--f4c-text);
}
.form-field input:focus,
.form-field select:focus,
.form-field textarea:focus {
  outline: 2px solid var(--f4c-forest-green);
  outline-offset: 1px;
}

.form-intent {
  display: flex;
  gap: var(--f4c-space-2);
  margin-bottom: var(--f4c-space-3);
}
.form-intent label {
  flex: 1;
  border: 1px solid var(--f4c-border);
  border-radius: var(--f4c-radius);
  padding: var(--f4c-space-2);
  cursor: pointer;
  font-weight: var(--f4c-fw-medium);
  text-align: center;
}
.form-intent input { display: none; }
.form-intent input:checked + span,
.form-intent label:has(input:checked) {
  border-color: var(--f4c-forest-green);
  background: color-mix(in srgb, var(--f4c-light-fern) 18%, white);
}

.form-status { margin-top: var(--f4c-space-2); font-size: 0.9rem; }
.form-status[data-state="success"] { color: var(--f4c-forest-green); font-weight: var(--f4c-fw-medium); }
.form-status[data-state="error"] { color: #a13c2c; font-weight: var(--f4c-fw-medium); }

/* ==========================================================================
   10. TABLE (before/after, pricing factors)
   ========================================================================== */

.compare-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: var(--f4c-space-3);
}
.compare-table th, .compare-table td {
  padding: var(--f4c-space-2);
  border-bottom: 1px solid var(--f4c-border);
  text-align: left;
  vertical-align: top;
}
.compare-table th { font-weight: var(--f4c-fw-semibold); }

/* ==========================================================================
   11. FAQ
   ========================================================================== */

.faq-item {
  border-bottom: 1px solid var(--f4c-border);
  padding-block: var(--f4c-space-2);
}
.faq-item summary {
  cursor: pointer;
  font-weight: var(--f4c-fw-medium);
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item[open] summary { color: var(--f4c-forest-green); }
.faq-item p { margin-top: var(--f4c-space-2); }

/* ==========================================================================
   12. FOOTER
   ========================================================================== */

.site-footer {
  background: var(--f4c-bg-darker);
  color: color-mix(in srgb, var(--f4c-white) 75%, transparent);
  padding-block: var(--f4c-space-5) var(--f4c-space-3);
  font-size: 0.9rem;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: var(--f4c-space-4);
  margin-bottom: var(--f4c-space-4);
}
@media (max-width: 700px) {
  .footer-grid { grid-template-columns: 1fr; }
}
.site-footer h4 {
  color: var(--f4c-white);
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: var(--f4c-space-2);
}
.site-footer ul { list-style: none; margin: 0; padding: 0; }
.site-footer li { margin-bottom: 0.6em; }
.site-footer a:hover { color: var(--f4c-white); }
.footer-bottom {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: var(--f4c-space-2);
  border-top: 1px solid color-mix(in srgb, var(--f4c-white) 15%, transparent);
  padding-top: var(--f4c-space-3);
}

/* ==========================================================================
   13. UTILITIES
   ========================================================================== */

.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--f4c-forest-green);
  color: var(--f4c-white);
  padding: 0.75em 1.25em;
  z-index: 100;
}
.skip-link:focus { left: var(--f4c-space-2); top: var(--f4c-space-2); }
