/* fluid.css — Couche de fluidité commune LATRACTION
 * Apparitions échelonnées, compteurs à rouleaux, cartes empilées, bandeau défilant,
 * en-tête compact avec bouton persistant, barre de progression, accordéons animés.
 * Aucune bibliothèque : tout est facultatif. Sans JavaScript, ou avec « réduire les animations »,
 * la page reste complète et lisible immédiatement.
 * ============================================================ */

/* ── A. Variables et palette par pôle ─────────────────────── */
:root {
  --fl-accent: #2563eb;
  --fl-on-accent: #fff;
  --fl-page-bg: #fff;
  --fl-ease: cubic-bezier(.22, 1, .36, 1);
  --fl-nav: 76px;
  --fl-line: color-mix(in srgb, currentColor 14%, transparent);
  --fl-soft: color-mix(in srgb, currentColor 5%, transparent);
}
body[data-hub="finance"] { --fl-accent: #8f481f; --fl-page-bg: #f7f3eb; }
body[data-hub="digital"] { --fl-accent: #7c3aed; }
body[data-hub="energy"] { --fl-accent: #ffd60a; --fl-on-accent: #101010; --fl-page-bg: #050505; }
body.clean-editorial { --fl-page-bg: #fbfcff; }
@media (max-width: 860px) { :root { --fl-nav: 68px; } }

/* ── B. Navigation instantanée entre les pages ────────────── */
/* La règle d'ouverture (@view-transition) est posée EN LIGNE, juste après <meta charset>, dans chaque page :
 * dans une feuille externe elle arrive trop tard et le navigateur abandonne la transition avec une erreur. */
::view-transition-old(root), ::view-transition-new(root) { animation-duration: .28s; animation-timing-function: var(--fl-ease); }
/* L'en-tête n'est volontairement pas nommé : un nom de transition en ferait le bloc conteneur du menu mobile (position: fixed). */

/* ── C. Barre de progression de lecture ───────────────────── */
.fl-progress { position: fixed; inset: 0 0 auto 0; height: 3px; z-index: 9999; pointer-events: none; }
.fl-progress i {
  display: block; width: 100%; height: 100%; transform-origin: 0 50%; transform: scaleX(var(--fl-p, 0));
  background: linear-gradient(90deg, var(--fl-accent), color-mix(in srgb, var(--fl-accent) 50%, #fff));
}

/* ── D. En-tête : compact au défilement, bouton persistant ── */
body.site-unified .navbar { transition: padding .35s var(--fl-ease), box-shadow .35s ease; }
body.site-unified .navbar.is-scrolled { padding: 8px 0 !important; box-shadow: 0 10px 30px -14px rgba(0, 0, 0, .28) !important; }
body.site-unified .navbar .logo-img { transition: width .35s var(--fl-ease), height .35s var(--fl-ease); }
body.site-unified .navbar.is-scrolled .logo-img { height: 36px !important; width: 36px; }
body.site-unified .nav-menu a.fl-nav-cta {
  display: inline-flex; align-items: center; min-height: 40px; padding: 0 20px; border-radius: 999px;
  background: var(--fl-accent); color: var(--fl-on-accent) !important; font-weight: 700; letter-spacing: 0;
  box-shadow: 0 1px 0 rgba(255, 255, 255, .35) inset, 0 10px 24px -10px color-mix(in srgb, var(--fl-accent) 70%, transparent);
  transition: transform .25s var(--fl-ease), box-shadow .25s ease, filter .25s ease;
}
body.site-unified .nav-menu a.fl-nav-cta::after { display: none !important; }
body.site-unified .nav-menu a.fl-nav-cta:hover { transform: translateY(-2px); filter: brightness(1.06); box-shadow: 0 1px 0 rgba(255, 255, 255, .35) inset, 0 16px 30px -10px color-mix(in srgb, var(--fl-accent) 80%, transparent); }

/* ── E. Boutons : relief et lumière au survol ─────────────── */
body.site-unified :is(.btn, .svc-btn, .btn-primary, .btn-secondary):not(.fl-nav-cta) {
  transition: transform .25s var(--fl-ease), box-shadow .25s ease, background-color .2s ease, border-color .2s ease, filter .2s ease !important;
}
body.site-unified :is(.btn-primary, .svc-btn-primary):is(:hover, :focus-visible) {
  transform: translateY(-2px) !important;
  box-shadow: 0 1px 0 rgba(255, 255, 255, .3) inset, 0 16px 32px -14px color-mix(in srgb, var(--fl-accent) 75%, transparent) !important;
  filter: brightness(1.05);
}
body.site-unified :is(.btn-secondary):is(:hover, :focus-visible) { transform: translateY(-2px) !important; }
body.site-unified :is(.btn, .svc-btn):active { transform: translateY(0) scale(.985) !important; transition-duration: .08s !important; }

/* ── F. Apparition au défilement (échelonnée) ─────────────── */
.fl-rv { opacity: 0; transform: translate3d(0, 26px, 0) scale(.985); }
.fl-rv.fl-in {
  opacity: 1; transform: none;
  transition: opacity .8s var(--fl-ease) var(--fl-d, 0ms), transform .9s var(--fl-ease) var(--fl-d, 0ms) !important;
}

/* ── G. Halo qui suit le curseur sur les cartes ───────────── */
/* Sans élément ajouté : le halo est un fond posé sur la carte, uniquement si elle n'a pas déjà d'image de fond. */
.fl-spot:hover {
  background-image: radial-gradient(280px circle at var(--mx, 50%) var(--my, 50%), color-mix(in srgb, var(--fl-accent) 15%, transparent), transparent 70%) !important;
}

/* ── H. Compteurs à rouleaux ──────────────────────────────── */
.fl-sr { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.fl-odo { display: inline-flex; align-items: flex-end; font-variant-numeric: tabular-nums; }
.fl-dg { display: inline-block; height: 1em; line-height: 1; overflow: hidden; }
.fl-rl { display: block; transform: translateY(0); }
.fl-rl b { display: block; height: 1em; line-height: 1; font: inherit; font-weight: inherit; }
.fl-fix { display: inline-block; height: 1em; line-height: 1; white-space: pre; }
[data-fl-count].fl-in .fl-rl { transform: translateY(calc(var(--n, 0) * -1em)); transition: transform 1.7s cubic-bezier(.16, 1, .3, 1) calc(var(--k, 0) * 90ms); }

/* ── I. Bandeau défilant ──────────────────────────────────── */
.fl-marquee {
  overflow: hidden; padding: 16px 0; border-block: 1px solid var(--fl-line);
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 7%, #000 93%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 7%, #000 93%, transparent);
}
.fl-track { display: flex; gap: 12px; width: max-content; animation: fl-marquee var(--fl-speed, 55s) linear infinite; }
.fl-marquee:hover .fl-track, .fl-marquee:focus-within .fl-track { animation-play-state: paused; }
.fl-pill {
  display: inline-flex; align-items: center; gap: 8px; padding: 10px 18px; border-radius: 999px; white-space: nowrap;
  border: 1px solid var(--fl-line); background: var(--fl-soft); font-size: 14px; font-weight: 600; line-height: 1;
}
.fl-pill::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--fl-accent); flex: none; }
@keyframes fl-marquee { to { transform: translateX(-50%); } }

/* ── J. Structure des sections ────────────────────────────── */
.fl-section { position: relative; padding: clamp(56px, 8vw, 104px) 0; }
.fl-section--soft { background: color-mix(in srgb, var(--fl-accent) 5%, transparent); }
.fl-head { max-width: 780px; margin: 0 auto clamp(28px, 4vw, 52px); text-align: center; }
.fl-eyebrow {
  display: inline-flex; align-items: center; gap: .55em; padding: 8px 15px; border-radius: 999px;
  border: 1px solid color-mix(in srgb, var(--fl-accent) 35%, transparent); background: color-mix(in srgb, var(--fl-accent) 9%, transparent);
  color: var(--fl-accent); font: 700 12px/1 Inter, system-ui, sans-serif; letter-spacing: .14em; text-transform: uppercase;
}
.fl-h2 { margin: 16px 0 14px; font-size: clamp(30px, 4vw, 52px); line-height: 1.08; letter-spacing: -.03em; font-weight: 700; color: inherit; }
.fl-h2 em { font-family: 'Fraunces', Georgia, serif; font-style: italic; font-weight: 400; letter-spacing: -.02em; color: var(--fl-accent); }
.fl-lead { margin: 0; font-size: clamp(16px, 1.5vw, 19px); line-height: 1.7; opacity: .78; }
body[data-hub="finance"] .fl-h2 { font-family: 'Fraunces', Georgia, serif; font-weight: 400; letter-spacing: -.025em; }

/* ── K. Méthode : cartes qui s'empilent au défilement ─────── */
.fl-stack { list-style: none; margin: 0 auto; padding: 0; max-width: 980px; }
.fl-stack-card {
  position: sticky; top: calc(var(--fl-nav) + var(--i, 0) * 20px); margin: 0 0 26px;
  display: grid; grid-template-columns: auto 1fr; gap: clamp(18px, 3vw, 40px); align-items: start;
  padding: clamp(24px, 3.2vw, 44px); border-radius: 28px; border: 1px solid var(--fl-line);
  background: color-mix(in srgb, var(--fl-page-bg) 93%, currentColor);
  box-shadow: 0 30px 60px -36px rgba(0, 0, 0, .4); transform-origin: 50% 0; will-change: transform;
}
.fl-stack-num {
  font: italic 400 clamp(54px, 7vw, 92px)/.9 'Fraunces', Georgia, serif; letter-spacing: -.03em;
  color: var(--fl-accent); min-width: .9em;
}
.fl-stack-card h3 { margin: 4px 0 10px; font-size: clamp(22px, 2.4vw, 30px); line-height: 1.15; letter-spacing: -.02em; color: inherit; }
.fl-stack-card p { margin: 0 0 14px; line-height: 1.7; opacity: .8; font-size: 16px; }
.fl-stack-card ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 9px; }
.fl-stack-card li { position: relative; padding-left: 26px; font-size: 15px; line-height: 1.5; }
.fl-stack-card li::before {
  content: ""; position: absolute; left: 0; top: .28em; width: 16px; height: 16px; border-radius: 50%;
  background: var(--fl-accent);
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='black' d='M12 2a10 10 0 1 0 0 20 10 10 0 0 0 0-20Zm-1.2 14.4-4-4 1.4-1.4 2.6 2.6 5-5 1.4 1.4-6.4 6.4Z'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='black' d='M12 2a10 10 0 1 0 0 20 10 10 0 0 0 0-20Zm-1.2 14.4-4-4 1.4-1.4 2.6 2.6 5-5 1.4 1.4-6.4 6.4Z'/%3E%3C/svg%3E") center / contain no-repeat;
}
@media (max-width: 640px) {
  .fl-stack-card { grid-template-columns: 1fr; top: calc(var(--fl-nav) + var(--i, 0) * 12px); padding: 22px 20px; border-radius: 22px; }
  .fl-stack-num { font-size: 48px; }
}

/* ── L. Signaux (« vous vous reconnaissez ? ») ───────────── */
.fl-signals { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr)); gap: 18px; }
.fl-signal { position: relative; padding: 28px 26px; border-radius: 24px; border: 1px solid var(--fl-line); background: var(--fl-soft); }
.fl-signal q { display: block; margin-bottom: 14px; quotes: "\00ab\00a0" "\00a0\00bb"; font: italic 400 clamp(20px, 2vw, 24px)/1.32 'Fraunces', Georgia, serif; letter-spacing: -.01em; }
.fl-hero-link { margin: 22px 0 0; font-size: 14.5px; }
.fl-hero-link a { color: inherit; font-weight: 600; text-decoration: underline; text-underline-offset: 4px; text-decoration-thickness: 1px; opacity: .92; }
.fl-hero-link a:hover { opacity: 1; text-decoration-thickness: 2px; }
body[data-hub="finance"] .fl-hero-link a { color: var(--fl-accent); opacity: 1; }
.fl-signal p { margin: 0; font-size: 14.5px; line-height: 1.65; opacity: .8; }
.fl-signal b { color: var(--fl-accent); }

/* ── M. Cartes outils et ressources ───────────────────────── */
.fl-tools, .fl-res { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 18px; }
.fl-tool, .fl-res-card {
  display: flex; flex-direction: column; gap: 10px; padding: 26px 24px; border-radius: 24px; text-decoration: none; color: inherit;
  border: 1px solid var(--fl-line); background: var(--fl-soft);
  transition: transform .35s var(--fl-ease), border-color .25s ease, background-color .25s ease;
}
.fl-tool:hover, .fl-res-card:hover { transform: translateY(-4px); border-color: color-mix(in srgb, var(--fl-accent) 55%, transparent); }
.fl-tool h3, .fl-res-card h3 { margin: 0; font-size: 20px; line-height: 1.25; letter-spacing: -.015em; color: inherit; }
.fl-tool p, .fl-res-card p { margin: 0; font-size: 14.5px; line-height: 1.6; opacity: .78; flex: 1; }
.fl-tag { align-self: flex-start; padding: 5px 11px; border-radius: 999px; font: 700 11.5px/1 Inter, system-ui, sans-serif; letter-spacing: .06em; text-transform: uppercase; color: var(--fl-accent); background: color-mix(in srgb, var(--fl-accent) 11%, transparent); }
.fl-go { display: inline-flex; align-items: center; gap: 8px; font-weight: 700; font-size: 14.5px; color: var(--fl-accent); }
.fl-go::after { content: "→"; transition: transform .3s var(--fl-ease); }
.fl-tool:hover .fl-go::after, .fl-res-card:hover .fl-go::after { transform: translateX(5px); }

/* ── N. Bandeau d'appel final ─────────────────────────────── */
.fl-band {
  position: relative; overflow: hidden; text-align: center; padding: clamp(64px, 9vw, 124px) 0;
  background: radial-gradient(900px 420px at 50% 0, color-mix(in srgb, var(--fl-accent) 24%, transparent), transparent 70%), var(--fl-page-bg);
  border-top: 1px solid var(--fl-line);
}
.fl-band h2 { margin: 0 auto 14px; max-width: 820px; font-size: clamp(32px, 4.6vw, 60px); line-height: 1.05; letter-spacing: -.035em; color: inherit; }
.fl-band h2 em { font-family: 'Fraunces', Georgia, serif; font-style: italic; font-weight: 400; color: var(--fl-accent); }
.fl-band p { margin: 0 auto; max-width: 620px; font-size: 18px; line-height: 1.65; opacity: .78; }
.fl-band-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; margin-top: 30px; }
.fl-band .fl-band-note { margin-top: 20px; font-size: 14px; opacity: .72; }
body.site-unified .fl-band .btn-secondary {
  background: transparent !important; color: inherit !important; box-shadow: none !important;
  border: 1.5px solid color-mix(in srgb, currentColor 38%, transparent) !important;
}
body.site-unified .fl-band .btn-secondary:hover { background: var(--fl-soft) !important; border-color: var(--fl-accent) !important; }
body[data-hub="finance"] .fl-band h2 { font-family: 'Fraunces', Georgia, serif; font-weight: 400; letter-spacing: -.025em; }

/* ── O0. Questions fréquentes (bouton + panneau) ──────────── */
.fl-faq { max-width: 800px; margin: 0 auto; }
.fl-faq-item { border-bottom: 1px solid var(--fl-line); }
.fl-faq-btn {
  width: 100%; min-height: 44px; display: flex; align-items: center; justify-content: space-between; gap: 18px;
  padding: 20px 0; background: none; border: 0; color: inherit; cursor: pointer; text-align: left;
  font-family: inherit; font-size: 17px; font-weight: 600; line-height: 1.4; letter-spacing: -.005em; transition: color .2s ease;
}
.fl-faq-btn:hover, .fl-faq-btn[aria-expanded="true"] { color: var(--fl-accent); }
.fl-faq-btn:focus-visible { outline: 2px solid var(--fl-accent); outline-offset: 4px; border-radius: 6px; }
.fl-faq-chev { flex: none; position: relative; width: 30px; height: 30px; border-radius: 50%; background: var(--fl-soft); transition: transform .35s var(--fl-ease), background-color .25s ease; }
.fl-faq-chev::before, .fl-faq-chev::after { content: ""; position: absolute; left: 50%; top: 50%; width: 12px; height: 2px; margin: -1px 0 0 -6px; border-radius: 2px; background: currentColor; }
.fl-faq-chev::after { transform: rotate(90deg); }
.fl-faq-btn[aria-expanded="true"] .fl-faq-chev { transform: rotate(45deg); background: color-mix(in srgb, var(--fl-accent) 14%, transparent); }
.fl-faq-body { padding: 0 0 22px; max-width: 68ch; font-size: 16px; line-height: 1.75; opacity: .82; }

/* ── O. Accordéons animés (FAQ) ───────────────────────────── */
.fl-acc { display: grid !important; grid-template-rows: 1fr; transition: grid-template-rows .4s var(--fl-ease), opacity .3s ease, visibility 0s; padding: 0 !important; }
.fl-acc[hidden] { grid-template-rows: 0fr; opacity: 0; visibility: hidden; transition: grid-template-rows .4s var(--fl-ease), opacity .22s ease, visibility 0s .4s; }
.fl-acc > .fl-acc-in { overflow: hidden; min-height: 0; }

/* ── O2. Entrée du hero (CSS seul : aucun saut au chargement) ── */
@media (prefers-reduced-motion: no-preference) {
  body.site-unified:not([data-hub="energy"]) .hero-content > * { animation: fl-rise .9s var(--fl-ease) both; }
  body.site-unified:not([data-hub="energy"]) .hero-content > :nth-child(2) { animation-delay: .09s; }
  body.site-unified:not([data-hub="energy"]) .hero-content > :nth-child(3) { animation-delay: .18s; }
  body.site-unified:not([data-hub="energy"]) .hero-content > :nth-child(n+4) { animation-delay: .27s; }
  @keyframes fl-rise { from { opacity: 0; transform: translate3d(0, 22px, 0); } to { opacity: 1; transform: none; } }
}

/* ── P. Bulle d'aide flottante ────────────────────────────── */
.fl-chip {
  position: fixed; left: 16px; bottom: 16px; z-index: 900; display: flex; align-items: center; gap: 8px;
  max-width: min(460px, calc(100vw - 96px)); padding: 8px 8px 8px 18px; border-radius: 999px;
  background: var(--fl-page-bg); color: inherit; border: 1px solid var(--fl-line);
  box-shadow: 0 22px 44px -20px rgba(0, 0, 0, .5);
  opacity: 0; visibility: hidden; transform: translateY(26px); transition: opacity .4s ease, transform .5s var(--fl-ease), visibility 0s .5s;
}
.fl-chip.is-on { opacity: 1; visibility: visible; transform: none; transition-delay: 0s; }
.fl-chip span { font-size: 13.5px; font-weight: 600; line-height: 1.3; }
.fl-chip a {
  flex: none; display: inline-flex; align-items: center; min-height: 40px; padding: 0 16px; border-radius: 999px;
  background: var(--fl-accent); color: var(--fl-on-accent); font-weight: 700; font-size: 13.5px; text-decoration: none; white-space: nowrap;
}
.fl-chip button {
  flex: none; width: 36px; height: 36px; border: 0; border-radius: 50%; background: transparent; color: inherit; opacity: .55;
  font-size: 20px; line-height: 1; cursor: pointer;
}
.fl-chip button:hover { opacity: 1; background: var(--fl-soft); }
@media (max-width: 640px) { .fl-chip { bottom: 84px; left: 12px; } }

/* ── Q. Mouvement réduit, impression ──────────────────────── */
@media (prefers-reduced-motion: reduce) {
  .fl-track { animation: none; flex-wrap: wrap; width: auto; justify-content: center; }
  .fl-track [aria-hidden="true"] { display: none; }
  .fl-marquee { -webkit-mask-image: none; mask-image: none; }
  .fl-stack-card { will-change: auto; }
  .fl-acc, .fl-acc[hidden] { transition: none; }
  .fl-chip { transition: none; }
}
@media print { .fl-progress, .fl-chip { display: none !important; } }
