/*
 * Accueil AURORE V3 (1er octobre 2026, docs/refonte-aurore-v3/decisions.md), réaccordé à LEDGER le 5 octobre 2026. Le
 * seul écran au haut bleu profond quadrillé : l'introduction, puis une grande scène de diagramme CLAIRE qui chevauche le
 * bas du bleu (~37 px), puis des sections blanches. Repères : dégradé #0b1740 → #14286b, halo #2a56d9 à 51 % / 105 %,
 * grille de 44 px à 0,07, titre 52 px (36 px sur mobile) en Inter 700, accent #93c5fd. Les mouvements sont finis,
 * publics, et disparaissent sous « mouvement réduit » (contrôleur Stimulus `home-stage`).
 */

/* ---- Introduction marine --------------------------------------------------------------------------------- */

/* Direction LEDGER (5 octobre 2026, puis décision d'Alexandre le même jour : « j'aimais bien avoir un peu de couleurs
   dans la page principale ») : le haut BLEU PROFOND quadrillé revient, dans la famille de bleus de Ledger — dégradé
   #0b1740 → #14286b (le bleu d'action #1d4ed8 poussé vers la nuit), halo #2a56d9, grille blanche à 0,07, accent #93c5fd.
   C'est le seul écran coloré : la scène du diagramme le chevauche, et tout le reste est clair. */
.au-hero {
  --au-grid: rgba(255, 255, 255, 0.07);
  position: relative; isolation: isolate; color: #fff; text-align: center;
  margin: 0 calc(-1 * var(--au-bleed, 0px));
  padding: 60px var(--ln-gutter) 110px;
  background:
    radial-gradient(ellipse 62% 70% at 51% 105%, #2a56d9 0, rgba(42, 86, 217, 0) 70%),
    linear-gradient(180deg, #0b1740 0%, #14286b 100%);
}
.au-hero::before {
  content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background-image: linear-gradient(var(--au-grid) 1px, transparent 1px), linear-gradient(90deg, var(--au-grid) 1px, transparent 1px);
  background-size: 44px 44px;
}
.au-hero__copy { max-width: 760px; margin: 0 auto; }
.au-kicker {
  display: inline-flex; align-items: center; gap: 8px; margin: 0 0 18px;
  font-size: 12px; font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase; color: var(--ln-accent);
}
.au-hero .au-kicker::before { content: ""; width: 5px; height: 5px; border-radius: 50%; background: currentColor; }
.au-kicker--dark { color: var(--ln-accent); }
.au-hero .au-kicker { color: #93c5fd; }
.au-hero h1 { margin: 0; color: #fff; font-size: 52px; line-height: 1.08; letter-spacing: -0.035em; font-weight: 700; }
.au-hero h1 span { color: #93c5fd; }
.au-hero__lead { margin: 20px auto 0; max-width: 36rem; color: #c7d2fe; font-size: 18px; line-height: 1.6; }
.au-hero__actions { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 12px 20px; margin-top: 28px; }
.au-hero__fine { margin: 16px auto 0; max-width: 42rem; color: #b4c0ee; font-size: 13px; }

/* ---- Boutons publics --------------------------------------------------------------------------------- */

.au-button {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 42px; padding: 8px 18px;
  border: 1px solid transparent; border-radius: var(--ln-radius-sm); font-size: 14px; font-weight: 600; line-height: 1.3;
  text-decoration: none; cursor: pointer;
}
.au-button .ln-icon { width: 16px; height: 16px; }
/* Boutons COLORÉS (décision d'Alexandre, 5 octobre 2026) : sur le bleu profond, un bouton blanc au texte bleu d'action
   avec un halo ; ailleurs, le bleu d'action plein et un contour bleu — jamais un gris neutre sur l'accueil. */
.au-button--light { background: #fff; color: var(--ln-accent-strong); border-color: #fff; box-shadow: 0 0 22px rgba(147, 197, 253, 0.3); }
.au-button--light:hover { color: var(--ln-accent-strong); background: var(--ln-sky); border-color: var(--ln-sky); }
.au-button--quiet { color: #dbe4ff; padding-left: 4px; padding-right: 4px; }
.au-button--quiet:hover { color: #fff; text-decoration: underline; text-underline-offset: 5px; }
.au-button--primary { background: var(--ln-accent); border-color: var(--ln-accent); color: #fff; box-shadow: 0 6px 18px rgba(29, 78, 216, 0.22); }
.au-button--primary:hover { background: var(--ln-accent-strong); border-color: var(--ln-accent-strong); color: #fff; }
.au-button--outline { background: #fff; border-color: var(--ln-sky-line); color: var(--ln-accent); }
.au-button--outline:hover { border-color: var(--ln-accent); background: var(--ln-sky); color: var(--ln-accent-strong); }
.au-hero .au-button:focus-visible { outline-color: #93c5fd; }
@media (prefers-reduced-motion: no-preference) {
  .au-button { transition: background-color 150ms ease, border-color 150ms ease, color 150ms ease; }
}

/* ---- Scène du diagramme -------------------------------------------------------------------------------- */

.au-stage-wrap {
  position: relative; margin: -74px 0 0; padding: 0 var(--ln-gutter);
  background:
    radial-gradient(ellipse 40% 60% at 15% 40%, rgba(191, 219, 254, 0.35), transparent 70%),
    radial-gradient(ellipse 40% 60% at 85% 50%, rgba(199, 210, 254, 0.35), transparent 70%);
}
.au-stage { max-width: 1160px; margin: 0 auto; }
.au-stage__card {
  background: #fff; border: 1px solid var(--ln-line); border-radius: 16px; overflow: hidden;
  box-shadow: 0 24px 60px rgba(11, 23, 64, 0.16);
}
.au-stage__title {
  display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 26px 34px 0;
  font-size: 12px; letter-spacing: 1.4px; text-transform: uppercase; color: var(--ln-node-muted); font-weight: 500;
}
.au-stage__title b { display: inline-flex; align-items: center; gap: 4px; font-weight: 600; color: var(--ln-node-text); }
.au-stage__title .ln-icon { width: 12px; height: 12px; }
.au-diagram {
  position: relative; padding: 22px 34px 26px;
  background-image: linear-gradient(rgba(152, 172, 202, 0.07) 1px, transparent 1px), linear-gradient(90deg, rgba(152, 172, 202, 0.07) 1px, transparent 1px);
  background-size: 22px 22px;
}
.au-diagram__row { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
.au-node {
  display: flex; align-items: center; gap: 12px; padding: 14px 16px; min-width: 0;
  background: #fff; border: 1px solid var(--ln-node-line); border-radius: var(--ln-radius); color: var(--ln-node-text);
}
.au-node strong { display: block; font-size: 15px; font-weight: 600; line-height: 1.3; }
.au-node small { display: block; font-size: 13px; color: var(--ln-node-muted); line-height: 1.4; }
.au-node__icon { flex: none; display: inline-flex; align-items: center; justify-content: center; width: 32px; height: 32px; border-radius: 8px; background: #eef3ff; color: #4a6fd1; }
.au-node__icon .ln-icon { width: 16px; height: 16px; }
.au-node--data .au-node__icon { background: #e8f5ee; color: #3d8a63; }
.au-node--external { border-style: dashed; }
.au-node--external .au-node__icon { background: #fff2e4; color: #c47a32; }
.au-wire {
  position: relative; height: 40px; display: flex; align-items: center; justify-content: center;
  font-size: 12px; color: var(--ln-node-muted);
}
/* Le fil : une ligne verticale au centre et un trait horizontal qui relie les trois colonnes. */
.au-wire::before { content: ""; position: absolute; left: calc(100% / 6); right: calc(100% / 6); top: 50%; border-top: 1px solid var(--ln-wire); }
.au-wire::after { content: ""; position: absolute; left: 50%; top: 0; bottom: 0; border-left: 1px solid var(--ln-wire); }
.au-wire span { position: relative; z-index: 1; padding: 0 10px; background: #fff; }
.au-hub {
  border: 1px solid var(--ln-hub-line); background: var(--ln-hub-bg); border-radius: var(--ln-radius-lg); padding: 16px 18px 18px;
}
.au-hub__title { margin: 0 0 12px; text-align: center; font-size: 12px; letter-spacing: 2px; text-transform: uppercase; font-weight: 600; color: var(--ln-hub-text); }
.au-hub__title span { color: var(--ln-accent); }
.au-hub__row { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.au-hub__item {
  display: flex; align-items: center; justify-content: center; gap: 8px; padding: 11px 12px;
  background: #fff; border: 1px solid var(--ln-node-line); border-radius: 8px; font-size: 14px; font-weight: 500; color: var(--ln-node-text);
}
.au-hub__item .ln-icon { width: 15px; height: 15px; color: #4a6fd1; }
.au-legend { display: flex; flex-wrap: wrap; gap: 8px 18px; list-style: none; margin: 18px 0 0; padding: 0; font-size: 13px; color: var(--ln-node-muted); }
.au-legend li { display: inline-flex; align-items: center; gap: 6px; margin: 0; }
.au-legend li::before { content: ""; width: 8px; height: 8px; border-radius: 2px; border: 1.5px solid #4a6fd1; }
.au-legend__data::before { border-color: #3d8a63 !important; }
.au-legend__external::before { border: 1.5px dashed #c47a32 !important; }
.au-stage__foot {
  display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap;
  padding: 14px 34px; border-top: 1px solid var(--ln-line); font-size: 14px; color: var(--ln-node-muted); background: #fff;
}
.au-replay {
  display: inline-flex; align-items: center; gap: 7px; min-height: 36px; padding: 6px 14px; border: 0; border-radius: var(--ln-radius-sm);
  background: var(--ln-sky); color: var(--ln-accent); font: inherit; font-size: 14px; font-weight: 600; cursor: pointer;
}
.au-replay:hover { background: #e2ebff; }
.au-replay .ln-icon { width: 13px; height: 13px; }
.au-stage__caption { margin: 12px 0 0; text-align: center; font-size: 14px; color: var(--ln-muted); }

/* Mouvements : entrée des cartes, passage lumineux sur les fils. Une fois ; rejouable par « Voir les flux ». */
@media (prefers-reduced-motion: no-preference) {
  .au-stage.is-waiting .au-node, .au-stage.is-waiting .au-hub { opacity: 0; transform: translateY(7px); }
  .au-stage.is-playing .au-node { animation: au-rise 650ms ease-out both; animation-delay: var(--au-delay, 0ms); }
  .au-stage.is-playing .au-hub { animation: au-rise 700ms ease-out 200ms both; }
  .au-stage.is-lit .au-wire::before, .au-stage.is-lit .au-wire::after { animation: au-trace 800ms ease-out both; }
  .au-stage.is-lit .au-wire--out::before, .au-stage.is-lit .au-wire--out::after { animation-delay: 600ms; }
  /* Le halo bleu de l'introduction s'allume une fois, à l'arrivée. */
  .au-hero::after {
    content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
    background: radial-gradient(ellipse 50% 60% at 51% 100%, rgba(96, 140, 255, 0.2), transparent 70%);
    animation: au-glow 1700ms ease-out both;
  }
}
@keyframes au-rise { from { opacity: 0; transform: translateY(7px); } to { opacity: 1; transform: none; } }
@keyframes au-trace { 0% { border-color: var(--ln-wire); } 40% { border-color: #5b8bff; } 100% { border-color: var(--ln-wire); } }
@keyframes au-glow { from { opacity: 0; } to { opacity: 1; } }

/* ---- Sections blanches ------------------------------------------------------------------------------------ */

.au-section { max-width: 1160px; margin: 0 auto; padding: 72px var(--ln-gutter) 0; }
.au-section h2 { font-size: 32px; line-height: 1.16; letter-spacing: -0.03em; font-weight: 700; margin: 0 0 14px; }
.au-section--center { text-align: center; }
.au-section__lead { max-width: 34rem; margin: 0 auto; color: var(--ln-muted); }
.au-steps { list-style: none; margin: 40px 0 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 24px; text-align: left; }
.au-steps--three { grid-template-columns: repeat(3, minmax(0, 1fr)); margin-top: 28px; }
.au-steps li { margin: 0; padding-top: 18px; border-top: 1px solid var(--ln-line); }
.au-steps__label { margin: 0 0 8px; font-size: 12px; font-weight: 600; letter-spacing: 1.2px; text-transform: uppercase; color: var(--ln-accent); }
.au-steps h3 { margin: 0 0 8px; font-size: 17px; font-weight: 600; color: var(--ln-title); }
.au-steps p:last-child { margin: 0; color: var(--ln-muted); font-size: 15px; }

.au-context { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 48px; align-items: center; }
.au-context__copy > p { color: var(--ln-muted); }
.au-checks { list-style: none; margin: 18px 0 24px; padding: 0; display: grid; gap: 10px; }
.au-checks li { display: flex; gap: 10px; align-items: flex-start; margin: 0; font-size: 15px; }
.au-checks .ln-icon { flex: none; margin-top: 3px; color: var(--ln-good); }
.au-dossier { border: 1px solid var(--ln-line); border-radius: var(--ln-radius-lg); background: #fff; box-shadow: 0 16px 40px rgba(21, 36, 72, 0.07); padding: 20px 22px; }
.au-dossier__head { display: flex; gap: 12px; align-items: flex-start; padding-bottom: 14px; }
.au-dossier__head .ln-icon, .au-dossier__rows .ln-icon, .au-dossier__foot .ln-icon { color: var(--ln-accent); flex: none; margin-top: 3px; }
.au-dossier__head strong { display: block; color: var(--ln-title); }
.au-dossier__head small { color: var(--ln-muted); }
.au-dossier__rows { list-style: none; margin: 0; padding: 0; }
.au-dossier__rows li { display: flex; align-items: center; gap: 12px; margin: 0; padding: 14px 0; border-top: 1px solid var(--ln-line); font-size: 15px; }
.au-dossier__rows span { flex: 1; color: var(--ln-title); font-weight: 500; }
.au-dossier__rows em { font-style: normal; color: var(--ln-muted); font-size: 14px; }
.au-dossier__foot { display: flex; gap: 10px; align-items: center; margin: 0; padding-top: 14px; border-top: 1px solid var(--ln-line); font-size: 14px; color: var(--ln-good); }

.au-advice { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px 24px; margin-top: 28px; padding-top: 24px; border-top: 1px solid var(--ln-line); }
.au-advice h3 { margin: 0 0 6px; }
.au-advice p { margin: 0; color: var(--ln-muted); max-width: 46rem; }

.au-final {
  max-width: 1160px; margin: 72px auto 56px; padding: 36px 40px; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 20px 32px;
  background: #f4f7ff; border: 1px solid #e2e9f8; border-radius: var(--ln-radius-lg);
}
@media (min-width: 1240px) { .au-final { margin-left: auto; margin-right: auto; } }
.au-final h2 { margin: 0 0 6px; font-size: 28px; line-height: 1.2; }
.au-final p { margin: 0; color: var(--ln-muted); }

/* ---- Petits écrans ---------------------------------------------------------------------------------------- */

@media (max-width: 900px) {
  .au-steps { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .au-context { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 720px) {
  .au-hero { padding-top: 40px; padding-bottom: 96px; }
  .au-hero h1 { font-size: 36px; }
  .au-hero__lead { font-size: 16px; }
  .au-stage__title, .au-diagram, .au-stage__foot { padding-left: 18px; padding-right: 18px; }
  .au-diagram__row, .au-hub__row { grid-template-columns: minmax(0, 1fr); gap: 10px; }
  .au-wire::before { display: none; }
  .au-steps, .au-steps--three { grid-template-columns: minmax(0, 1fr); }
  .au-section { padding-top: 56px; }
  .au-section h2 { font-size: 28px; }
  .au-final { margin: 56px var(--ln-gutter) 40px; padding: 28px 22px; }
}
