/* ======================================================================
   THÈMES — une couleur par univers
   ----------------------------------------------------------------------
   L'attribut data-theme redéfinit les couleurs de marque (--primary…)
   pour tout ce qu'il contient :
   - sur <body> : la page thématique entière (hero, boutons, section
     contact, bouton mobile, ET le questionnaire injecté dans la page) ;
   - sur une carte de l'accueil : la carte seule.
   Toutes les couleurs garantissent un contraste ≥ 4,5:1 avec du texte
   blanc (boutons, section contact).
   ====================================================================== */

[data-theme="luxembourg"] { --primary: #1f5f7a; --primary-dark: #174a5f; --primary-rgb: 31, 95, 122; --theme-soft: #eaf2f5; }
[data-theme="crypto"]     { --primary: #6b3fa0; --primary-dark: #55307f; --primary-rgb: 107, 63, 160; --theme-soft: #f1ecf7; }
[data-theme="booste"]     { --primary: #b4461f; --primary-dark: #8f3717; --primary-rgb: 180, 70, 31; --theme-soft: #fbefe9; }
[data-theme="pea-av"]     { --primary: #2e7d5b; --primary-dark: #23634a; --primary-rgb: 46, 125, 91; --theme-soft: #eaf4ef; }
[data-theme="or"]         { --primary: #8a6418; --primary-dark: #6e4f12; --primary-rgb: 138, 100, 24; --theme-soft: #f7f1e3; }
[data-theme="projet"]     { --primary: #4a58b4; --primary-dark: #3b4690; --primary-rgb: 74, 88, 180; --theme-soft: #eef0f9; }

/* ---------- Page thématique ---------- */
body[data-theme] { --cream: var(--theme-soft); --card: var(--theme-soft); }
body[data-theme] .hero-overlay {
  background:
    linear-gradient(90deg, rgba(var(--primary-rgb), .78) 0%, rgba(8,12,21,.55) 46%, rgba(8,12,21,.12) 72%),
    linear-gradient(0deg, rgba(8,12,21,.74) 0%, transparent 46%);
}
body[data-theme] .hero .eyebrow {
  display: inline-block;
  padding: 7px 12px;
  border-radius: 999px;
  background: rgba(var(--primary-rgb), .92);
}
body[data-theme] .hero-action:first-child { background: rgba(var(--primary-rgb), .5); }
body[data-theme] .hero-action:hover { background: rgba(var(--primary-rgb), .72); }
body[data-theme] .use-cases {
  background: radial-gradient(circle at 88% 24%, rgba(var(--primary-rgb), .14), transparent 30%), var(--theme-soft);
}
body[data-theme] .section-index span:first-child { color: var(--primary); border-color: rgba(var(--primary-rgb), .4); }
body[data-theme] .faq-list dt { color: var(--primary-dark); }
body[data-theme] .inline-lead__card { border-top: 4px solid var(--primary); }
body[data-theme] .diagnostic-kicker { color: var(--primary-dark); }
body[data-theme] .progress-track span { background: var(--primary); }

@media (max-width: 767px) {
  body[data-theme] .hero-overlay {
    background: linear-gradient(0deg, rgba(8,12,21,.9) 0%, rgba(var(--primary-rgb), .6) 62%, rgba(var(--primary-rgb), .4) 100%);
  }
}

/* ---------- Bandeau « Les autres thèmes » ---------- */
.theme-nav { padding-block: 72px; border-top: 1px solid var(--border); }
.theme-nav h2 { margin: 0 0 28px; color: var(--ink); font: 300 clamp(1.9rem, 3vw, 2.6rem)/1.1 var(--display); letter-spacing: -.08rem; }
.theme-nav-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 10px; }
.theme-nav-link {
  display: grid;
  gap: 10px;
  min-height: 132px;
  padding: 20px;
  color: var(--ink);
  border: 1px solid rgba(20,24,49,.12);
  border-top: 4px solid var(--primary);
  border-radius: 12px;
  background: var(--theme-soft);
  transition: transform .24s var(--ease), box-shadow .24s ease;
}
.theme-nav-link strong { align-self: end; font: 300 1.35rem/1.1 var(--display); letter-spacing: -.04rem; }
.theme-nav-link span { color: var(--primary-dark); font-size: .8rem; font-weight: 700; }
.theme-nav-link:hover, .theme-nav-link:focus-visible { transform: translateY(-3px); box-shadow: 0 18px 40px rgba(20,24,49,.1); }
@media (max-width: 1100px) { .theme-nav-grid { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 767px) {
  .theme-nav { padding-block: 48px; }
  .theme-nav-grid { grid-template-columns: 1fr 1fr; }
  .theme-nav-link { min-height: 108px; padding: 16px; }
}
@media (max-width: 380px) { .theme-nav-grid { grid-template-columns: 1fr; } }

/* ---------- Cartes de l'accueil : couleur du thème ---------- */
.universe-card[data-theme] { border-top: 4px solid var(--primary); }
.universe-card[data-theme]:hover,
.universe-card[data-theme]:focus-visible { border-color: rgba(var(--primary-rgb), .55); border-top-color: var(--primary); }
.universe-card[data-theme]::after { content: "Découvrir ce thème  →"; color: var(--primary-dark); }
.universe-card--accent[data-theme]::after { color: #fff; }
@media (prefers-reduced-motion: reduce) { .theme-nav-link { transition: none; } }

/* ---------- Bouton d'action principal du hero (pages thématiques) ----------
   Fond blanc + texte couleur du thème : il se détache nettement du hero,
   lui-même teinté de la couleur du thème. */
.theme-hero-cta { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 20px; margin-top: 32px; }
.theme-hero-cta__button.button {
  min-height: 60px;
  padding-inline: 30px;
  border: 0;
  border-radius: 999px;
  color: var(--primary-dark);
  background: #fff;
  font-size: 1.0625rem;
  font-weight: 700;
  box-shadow: 0 6px 0 rgba(0,0,0,.18), 0 16px 34px rgba(0,0,0,.28);
}
.theme-hero-cta__button.button:hover,
.theme-hero-cta__button.button:focus-visible { background: var(--theme-soft); transform: translateY(-2px); }
.theme-hero-cta__button.button:active { transform: translateY(1px); box-shadow: 0 2px 0 rgba(0,0,0,.18), 0 8px 18px rgba(0,0,0,.24); }
.theme-hero-cta__button.button:focus-visible { outline: 3px solid #fff; outline-offset: 3px; }
.theme-hero-cta__meta { color: rgba(255,255,255,.86); font-size: .875rem; font-weight: 600; }
@media (max-width: 767px) {
  .theme-hero-cta { margin-top: 22px; }
  .theme-hero-cta__button.button { width: 100%; min-height: 56px; justify-content: center; font-size: 1rem; }
  .theme-hero-cta__meta { width: 100%; text-align: center; }
}
@media (prefers-reduced-motion: reduce) { .theme-hero-cta__button.button { transition: none; transform: none !important; } }

/* ======================================================================
   MOBILE FIRST — pages thématiques (≤ 767 px)
   Objectif : un seul appel à l'action visible dès l'arrivée, une lecture
   compacte, des zones tactiles ≥ 44 px, aucune information perdue.
   ====================================================================== */
.theme-hero-cta__phone { display: none; }
@media (max-width: 767px) {
  /* Hero en flux : contenu calé en bas d'un écran plein, sans la barre
     d'actions qui doublait le bouton principal. */
  body[data-theme] .hero { min-height: 0; height: auto; max-height: none; }
  body[data-theme] .hero-content { display: flex; flex-direction: column; justify-content: flex-end; min-height: 100svh; padding: 104px 0 28px; }
  body[data-theme] .hero-copy { position: static; width: 100%; padding: 0; }
  body[data-theme] .hero h1 { font-size: clamp(2.6rem, 11.5vw, 3.6rem); line-height: .98; letter-spacing: -.12rem; }
  body[data-theme] .hero-mobile-note { margin-top: 14px; font-size: 1rem; line-height: 1.5; }
  body[data-theme] .hero-actions { display: none; }
  .theme-hero-cta { gap: 10px; margin-top: 24px; }
  .theme-hero-cta__phone { display: flex; justify-content: center; align-items: center; width: 100%; min-height: 44px; color: #fff; font-size: .9375rem; text-decoration: underline; text-underline-offset: 4px; }

  /* Rythme vertical resserré. */
  body[data-theme] .section,
  body[data-theme] .use-cases { padding-block: 56px; }
  body[data-theme] .faq { padding-block: 48px 56px; }
  body[data-theme] .intro-grid { gap: 16px; padding: 24px 0 28px; }
  body[data-theme] .intro-copy p { margin: 0; font-size: 1rem; }
  body[data-theme] .intro h2,
  body[data-theme] .use-cases h2,
  body[data-theme] .contact-copy h2 { font-size: clamp(2.2rem, 10vw, 3rem); letter-spacing: -.1rem; }
  body[data-theme] .section-index span:last-child { font-size: .75rem; }

  /* Points clés : cartes compactes (numéro et titre sur une ligne). */
  body[data-theme] .principles { gap: 10px; }
  body[data-theme] .principle { display: grid; grid-template-columns: 36px 1fr; column-gap: 14px; align-items: center; min-height: 0; padding: 20px; }
  body[data-theme] .principle h3 { margin: 0; font-size: 1.6rem; letter-spacing: -.06rem; }
  body[data-theme] .principle p { grid-column: 1 / -1; max-width: none; margin-top: 12px; font-size: .9375rem; line-height: 1.55; }

  body[data-theme] .use-cases-grid { gap: 24px; padding-top: 24px; }
  body[data-theme] .use-cases-list p { font-size: .9375rem; line-height: 1.5; }
  body[data-theme] .compliance-note { margin-top: 24px; }
  body[data-theme] .faq-list dt { font-size: 1rem; }
  body[data-theme] .faq-list dd { font-size: .9375rem; }

  /* Contact : bloc plus court, coordonnées faciles à toucher. */
  body[data-theme] .contact-section { padding-block: 56px; }
  body[data-theme] .contact-shell { gap: 28px; padding-top: 0; }
  body[data-theme] .contact-copy > p:not(.eyebrow) { margin: 20px 0; font-size: 1rem; }
  body[data-theme] .contact-detail { display: flex; align-items: center; min-height: 44px; margin-top: 4px; }
  body[data-theme] .contact-card .button { margin-top: 20px; min-height: 52px; }

  /* Autres thèmes : carrousel horizontal plutôt qu'une grille haute. */
  .theme-nav { padding-block: 48px; }
  .theme-nav h2 { margin-bottom: 18px; font-size: 1.9rem; }
  .theme-nav-grid { grid-template-columns: none; grid-auto-flow: column; grid-auto-columns: 64%; overflow-x: auto; overscroll-behavior-x: contain; scroll-snap-type: x mandatory; padding-bottom: 8px; }
  .theme-nav-link { min-height: 112px; scroll-snap-align: start; }

  /* Pied de page : marges et zones tactiles. */
  body[data-theme] .site-footer > .footer-call { width: min(100% - 32px, 1480px); margin-inline: auto; }
  body[data-theme] .footer-bottom a,
  body[data-theme] .footer-legal a,
  body[data-theme] .footer-call a { display: inline-flex; align-items: center; min-height: 44px; }
}
@media (max-width: 380px) {
  body[data-theme] .hero h1 { font-size: 2.45rem; }
  .theme-nav-grid { grid-auto-columns: 78%; }
}
