/* =========================================================
   ChouettIA — Couche éditoriale
   À importer APRÈS styles.css. Ne contient que des overrides
   et les utilitaires .ed-*. styles.css n'est jamais modifié.
   ========================================================= */

/* =========================================================
   1. TOKENS
   ========================================================= */
:root {
  /* Titres en serif, labels en mono. Inter reste le corps de texte. */
  --font-display: "Source Serif 4", Georgia, "Times New Roman", serif;
  --font-mono: "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, monospace;

  /* Papier tiède plutôt que blanc pur */
  --c-bg: #FAF8F4;
  --c-bg-soft: #F3F0EA;
  --c-bg-tint: #EFEBE2;
  --c-line: #E6E1D8;

  /* Respiration : +33 % de vertical rhythm */
  --space-9: 8rem;

  /* Décor calmé */
  --r-lg: 12px;
  --shadow-glow: 0 2px 10px rgba(249, 115, 22, 0.18);

  /* Éditorial */
  --ed-feutre: rgba(249, 115, 22, 0.55);
  --ed-stamp-ink: var(--c-ink);
  --ed-stamp-bg: rgba(15, 27, 61, 0.05);
  --ed-stamp-border: 1.5px solid rgba(15, 27, 61, 0.2);
  --ed-rot-neg: -1.2deg;
  --ed-rot-light: -0.6deg;
}

/* =========================================================
   2. TYPOGRAPHIE
   ========================================================= */
h1, h2 {
  font-weight: 600;
  letter-spacing: -0.025em;
  line-height: 1.14;
}
h3, h4 { font-weight: 600; letter-spacing: -0.015em; }

/* Le serif porte déjà l'emphase : le gras sur h1 strong reste, sans plus. */
.hero h1 strong { font-weight: 700; }

.hero__lead,
.section-head p { line-height: 1.7; }

/* --- Labels en mono --- */
.eyebrow,
.step__num,
.trust__label,
.page-hero__stat-label,
.mock__stat-label,
.app-card__url,
.portfolio__url,
.footer-bottom {
  font-family: var(--font-mono);
}

.eyebrow {
  font-size: 0.66rem;
  font-weight: 500;
  letter-spacing: 0.2em;
}

.page-hero__stat-value,
.mock__stat-value {
  font-family: var(--font-mono);
  letter-spacing: -0.02em;
}

.page-hero__stat-label {
  font-size: 0.62rem;
  letter-spacing: 0.12em;
}

.footer-bottom {
  font-size: 0.72rem;
  letter-spacing: 0.02em;
}

.hero__badge {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.subnav a {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

/* --- Header : bascule clair / sombre selon ce qu'il survole ---
   Le subnav est en texte clair, calibré pour le hero sombre. Passé le hero,
   il devenait illisible sur le fond papier. editorial.js pose .is-over-light
   sur #siteHeader dès que le bas du hero passe sous le header. */
.pill-header .site-header.is-over-light .subnav {
  background: var(--c-bg);
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
  border-top-color: transparent;
  border-bottom: 1px solid var(--c-line);
  box-shadow: var(--shadow-sm);
}
.pill-header .site-header.is-over-light .subnav a {
  color: var(--c-ink);
  font-weight: 600;
}
.pill-header .site-header.is-over-light .subnav a:hover,
.pill-header .site-header.is-over-light .subnav a[aria-current="page"] { color: var(--c-accent-dark); }

/* La pilule sombre reste lisible sur papier : on lui ajoute juste une ombre
   pour la détacher du fond clair. */
.pill-header .site-header.is-over-light .nav { box-shadow: var(--shadow-lg); }

/* =========================================================
   3. DÉCOR CALMÉ  (c'est ça, « épuré »)
   ========================================================= */
.home-dark .hero__orb { opacity: 0.55; }
.home-dark .hero__orb-ribbon { opacity: 0.5; }
.home-dark .hero__orb-ribbon--2 { opacity: 0.28; }

/* Le hero clair perd son lavis orange, il ne reste que le papier. */
.hero {
  background:
    radial-gradient(900px 420px at 82% -80px, rgba(249, 115, 22, 0.06), transparent 62%),
    var(--c-bg);
}

.page-hero {
  background:
    radial-gradient(760px 340px at 82% 0%, rgba(249, 115, 22, 0.05), transparent 62%),
    var(--c-bg);
}

/* =========================================================
   4. UTILITAIRES ÉDITORIAUX
   ========================================================= */

/* Numéro de section : présent pour les crawlers, invisible à l'écran. */
.ed-section-num {
  display: block;
  height: 0;
  overflow: hidden;
  font-size: 0;
  line-height: 0;
  margin: 0;
  padding: 0;
  pointer-events: none;
  -webkit-user-select: none;
  user-select: none;
}

/* Tampon */
.ed-stamp {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-family: var(--font-mono);
  font-size: 0.62rem;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ed-stamp-ink);
  background: var(--ed-stamp-bg);
  border: var(--ed-stamp-border);
  border-radius: 3px;
  padding: 0.3rem 0.7rem;
  white-space: nowrap;
}
.ed-stamp svg { flex-shrink: 0; }
.ed-stamp--rotate { transform: rotate(var(--ed-rot-light)); }
.ed-stamp--accent {
  color: var(--c-accent-dark);
  background: rgba(249, 115, 22, 0.07);
  border-color: rgba(249, 115, 22, 0.3);
}
.ed-stamps {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: var(--space-5);
}
.ed-stamps--center { justify-content: center; }
/* Bandeau de confiance : les tampons sont le dernier élément de la section */
.trust .ed-stamps { margin-bottom: 0; }
.trust__label {
  font-size: 0.62rem;
  font-weight: 500;
  letter-spacing: 0.2em;
}

/* Souligné feutre */
.ed-mark {
  text-decoration: underline;
  text-decoration-color: var(--ed-feutre);
  text-decoration-thickness: 3px;
  text-underline-offset: 6px;
  text-decoration-skip-ink: none;
}

/* Note de bas de section */
.ed-footnote {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  line-height: 1.8;
  color: var(--c-text-muted);
  border-top: 1px dashed var(--c-line);
  padding-top: var(--space-4);
  margin: var(--space-7) auto 0;
  max-width: 640px;
  letter-spacing: 0.02em;
}
.section--ink .ed-footnote {
  color: rgba(230, 236, 248, 0.45);
  border-top-color: rgba(255, 255, 255, 0.12);
}

/* Portrait polaroïd */
.ed-polaroid {
  background: #fff;
  padding: 0.7rem 0.7rem 2.4rem;
  border-radius: 3px;
  box-shadow: 4px 8px 28px rgba(15, 27, 61, 0.2), 0 0 0 1px rgba(15, 27, 61, 0.05);
  transform: rotate(var(--ed-rot-neg));
  transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
  max-width: 340px;
}
.ed-polaroid:hover { transform: rotate(0deg) scale(1.01); }
/* Carré : la photo fournie est un avatar rond sur fond clair, en 512×512.
   En 4/5 le cadre rognait les bords du cercle. */
.ed-polaroid img {
  border-radius: 2px;
  filter: contrast(1.03);
  aspect-ratio: 1 / 1;
  object-fit: cover;
  width: 100%;
}
/* Placeholder tant que la photo n'est pas fournie */
.ed-polaroid__placeholder {
  aspect-ratio: 4 / 5;
  border-radius: 2px;
  background: repeating-linear-gradient(
    45deg,
    var(--c-bg-soft),
    var(--c-bg-soft) 10px,
    var(--c-bg-tint) 10px,
    var(--c-bg-tint) 20px
  );
  display: grid;
  place-content: center;
  gap: 0.4rem;
  text-align: center;
  padding: var(--space-4);
  font-family: var(--font-mono);
  font-size: 0.62rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--c-text-muted);
}
/* `display: grid` écrase l'attribut hidden (qui passe par la feuille UA) */
.ed-polaroid__placeholder[hidden] { display: none; }

.ed-polaroid__placeholder span:first-child {
  font-size: 2rem;
  letter-spacing: 0;
}

.ed-polaroid__caption {
  font-family: var(--font-mono);
  font-size: 0.62rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--c-text-muted);
  text-align: center;
  margin: 0.8rem 0 0;
}

/* Les deux blocs neufs du hero rejoignent le stagger heroFadeUp de styles.css */
.ed-stats,
.ed-scroll-hint {
  opacity: 0;
  transform: translateY(24px);
  animation: heroFadeUp 0.8s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}
.ed-stats { animation-delay: 0.4s; }
.ed-scroll-hint { animation-delay: 0.5s; }
@media (prefers-reduced-motion: reduce) {
  .ed-stats,
  .ed-scroll-hint { opacity: 1; transform: none; }
}

/* Indice de défilement */
.ed-scroll-hint {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  margin-top: var(--space-7);
  font-family: var(--font-mono);
  font-size: 0.6rem;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: rgba(230, 236, 248, 0.45);
}
.ed-scroll-hint svg { animation: ed-bob 2.4s ease-in-out infinite; }
@keyframes ed-bob {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(4px); }
}
@media (prefers-reduced-motion: reduce) {
  .ed-scroll-hint svg { animation: none; }
}

/* =========================================================
   5. BLOCS ÉDITORIAUX  (accueil)
   ========================================================= */

/* §01 — Preuve chiffrée sous le hero */
.ed-stats {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: var(--space-7);
  margin-top: var(--space-7);
  padding-top: var(--space-6);
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  width: 100%;
  max-width: 720px;
}
.ed-stat { text-align: center; }
.ed-stat__value {
  display: block;
  font-family: var(--font-mono);
  font-size: 1.75rem;
  font-weight: 500;
  letter-spacing: -0.02em;
  color: var(--c-accent);
}
.ed-stat__label {
  display: block;
  font-family: var(--font-mono);
  font-size: 0.62rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(230, 236, 248, 0.5);
  margin-top: 0.3rem;
}

/* §02 — Le constat : 3 douleurs, une phrase chacune */
.ed-pains {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-8);
  max-width: 1000px;
  margin: 0 auto;
}
.ed-pain {
  border-top: 2px solid var(--c-ink);
  padding-top: var(--space-5);
}
.ed-pain__num {
  display: block;
  font-family: var(--font-mono);
  font-size: 0.66rem;
  letter-spacing: 0.2em;
  color: var(--c-accent-dark);
  margin-bottom: var(--space-3);
}
.ed-pain h3 {
  font-size: 1.25rem;
  margin-bottom: var(--space-3);
}
.ed-pain p {
  color: var(--c-text-muted);
  margin: 0;
}
@media (max-width: 860px) {
  .ed-pains { grid-template-columns: 1fr; gap: var(--space-6); }
}

/* §04 — Ce qu'on fait : 4 offres */
.ed-offers {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-5);
}
.ed-offer {
  background: var(--c-bg);
  border: 1px solid var(--c-line);
  border-radius: var(--r-md);
  padding: var(--space-6) var(--space-5);
  transition: border-color 0.2s ease, transform 0.2s ease;
}
.ed-offer:hover {
  border-color: var(--c-ink-3);
  transform: translateY(-2px);
}
.ed-offer__icon { font-size: 1.5rem; display: block; margin-bottom: var(--space-4); }
.ed-offer h3 { font-size: 1.125rem; margin-bottom: var(--space-3); }
.ed-offer p { color: var(--c-text-muted); font-size: 0.9375rem; margin: 0; }
@media (max-width: 1000px) { .ed-offers { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .ed-offers { grid-template-columns: 1fr; } }

/* Paliers d'abonnement — grille à 2 colonnes, réutilise .ed-offer */
.ed-plans {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-5);
}
@media (max-width: 700px) { .ed-plans { grid-template-columns: 1fr; } }

.ed-price {
  display: block;
  font-family: var(--font-mono);
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--c-ink);
  margin-bottom: var(--space-3);
}
.ed-price small {
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--c-text-muted);
}

/* §05 — Qui suis-je */
.ed-about {
  display: grid;
  grid-template-columns: 340px 1fr;
  gap: var(--space-8);
  align-items: start;
  max-width: 980px;
  margin: 0 auto;
}
.ed-about__body p { color: var(--c-text-muted); }
.ed-about__body p:first-of-type {
  font-size: 1.125rem;
  color: var(--c-text);
}
.ed-about__links {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-5);
  margin-top: var(--space-5);
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.06em;
}
.ed-about__links a {
  color: var(--c-accent-dark);
  border-bottom: 1px solid rgba(249, 115, 22, 0.35);
  padding-bottom: 2px;
}
.ed-about__links a:hover { border-bottom-color: var(--c-accent); }
@media (max-width: 860px) {
  .ed-about { grid-template-columns: 1fr; gap: var(--space-6); }
  .ed-polaroid { transform: none; margin: 0 auto; }
  .ed-polaroid:hover { transform: scale(1.01); }
}

/* §06 — Ressources */
.ed-resources {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-5);
}
.ed-resource {
  display: block;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--r-md);
  padding: var(--space-6) var(--space-5);
  transition: background 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}
.ed-resource:hover {
  background: rgba(255, 255, 255, 0.09);
  border-color: rgba(255, 255, 255, 0.28);
  transform: translateY(-2px);
}
.ed-resource h3 { font-size: 1.125rem; margin-bottom: var(--space-3); }
.ed-resource p {
  color: rgba(230, 236, 248, 0.62);
  font-size: 0.9375rem;
  margin: 0 0 var(--space-4);
}
.ed-resource__cta {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--c-accent);
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}
@media (max-width: 900px) { .ed-resources { grid-template-columns: 1fr; } }

/* =========================================================
   6. AJUSTEMENTS DES COMPOSANTS EXISTANTS
   ========================================================= */

/* Cartes portail : à l'origine posées sur le hero sombre. Sur l'accueil éditorial
   elles descendent en § 03, sur fond papier — il leur faut une variante claire. */
.portal-card { border-radius: var(--r-lg); }

.section .portal-card {
  background: var(--c-bg);
  border: 1px solid var(--c-line);
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
  color: var(--c-text);
}
.section .portal-card:hover {
  background: var(--c-bg);
  border-color: var(--c-ink-3);
  box-shadow: var(--shadow-md);
}
.section .portal-card h2 { color: var(--c-ink); }
.section .portal-card p { color: var(--c-text-muted); }
.section .portal-card ul { color: var(--c-ink-3); }
.section .portal-card ul li::before { color: var(--c-accent-dark); }
.section .portal-card__cta { color: var(--c-accent-dark); }
.section .portal-card:hover .portal-card__cta { color: var(--c-accent); }

/* Un titre de section respire mieux au-dessus d'une grille dense */
.section-head { margin-bottom: var(--space-8); }

/* FAQ : la question passe en serif, la réponse reste en Inter */
.faq__question { font-family: var(--font-display); font-weight: 600; }
.faq__icon { font-family: var(--font-mono); font-weight: 400; }
