/* ==========================================================================
   JOBDREAM — page d'accueil
   Chargee APRES style.css, dont elle reutilise les variables : aucune couleur
   n'est definie ici (frontend.md §3). Les tokens propres a cette page
   (--bande-*, --demo-*) sont declares dans style.css, dans les deux themes.

   LES ANIMATIONS
   Un seul moment fort : la demonstration en tete de page, qui raconte le
   parcours en quatre scenes. Le reste se contente d'apparaitre au moment ou
   on le lit (classe .est-visible, posee par accueil.js). Tout est en CSS ;
   le JavaScript ne fait que poser des classes et compter.
   - Sans JavaScript : tout est visible d'emblee, la demo montre sa derniere
     scene. Les etats "avant apparition" n'existent que sous .js-anime.
   - prefers-reduced-motion : accueil.js ne pose pas .js-anime, et le bloc
     en fin de fichier coupe les animations restantes.
   ========================================================================== */

/* Liens habilles en bouton : pas de soulignement. */
.accueil-actions .btn,
.topbar-actions a.btn,
a.formule-bouton {
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.icone {
  width: 1.1em;
  height: 1.1em;
  flex: none;
}

::selection {
  background: var(--accent-soft);
  color: var(--text);
}

/* ------------------------------------------------------------ Ouverture */

.ouverture {
  max-width: 1120px;
  margin: 0 auto;
  padding: 72px 24px 24px;
  text-align: center;
}

.pastille {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 26px;
  padding: 7px 16px 7px 12px;
  border-radius: var(--rayon-plein);
  background: var(--surface);
  box-shadow: var(--ombre-3);
  font-size: 13.5px;
  font-weight: 600;
}

.pastille-icone {
  width: 18px;
  height: 18px;
  color: var(--accent);
}

.accueil-titre {
  margin: 0 auto;
  font-size: clamp(42px, 7vw, 84px);
  line-height: 1;
  font-weight: 800;
  letter-spacing: -0.04em;
  text-wrap: balance;
}

.mot-accent {
  color: var(--accent);
}

.mot-trace {
  position: relative;
  display: inline-block;
}

.trace {
  position: absolute;
  left: -2%;
  bottom: -0.12em;
  width: 104%;
  height: 0.2em;
  overflow: visible;
}

.trace path {
  fill: none;
  stroke: var(--accent);
  stroke-width: 5;
  stroke-linecap: round;
  stroke-dasharray: 220;
  stroke-dashoffset: 0;
}

.js-anime .trace path {
  animation: trace-dessin 1s 0.45s var(--sortie) both;
}

@keyframes trace-dessin {
  from { stroke-dashoffset: 220; }
  to { stroke-dashoffset: 0; }
}

.accueil-intro {
  max-width: 620px;
  margin: 28px auto 0;
  font-size: 19px;
  line-height: 1.6;
  color: var(--text-muted);
  text-wrap: pretty;
}

.accueil-actions {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 34px;
}

.accueil-cta,
.accueil-cta-secondaire {
  padding: 15px 28px;
  font-size: 17px;
  border-radius: var(--rayon-l);
  text-decoration: none;
}

.accueil-cta .icone {
  transition: transform 0.25s var(--sortie);
}

.accueil-cta:hover .icone {
  transform: translateX(3px);
}

/* Entree de l'ouverture : une seule fois, au chargement. */
.js-anime .ouverture > .pastille,
.js-anime .ouverture > .accueil-titre,
.js-anime .ouverture > .accueil-intro,
.js-anime .ouverture > .accueil-actions {
  animation: monte 0.9s var(--sortie) both;
}

.js-anime .ouverture > .accueil-titre { animation-delay: 0.08s; }
.js-anime .ouverture > .accueil-intro { animation-delay: 0.16s; }
.js-anime .ouverture > .accueil-actions { animation-delay: 0.24s; }

@keyframes monte {
  from { opacity: 0; transform: translateY(18px); filter: blur(6px); }
  to { opacity: 1; transform: none; filter: none; }
}

/* ----------------------------------------------------- Demonstration */

.demo {
  --duree-scene: 4.8s;
  max-width: 1000px;
  margin: 56px auto 0;
  padding: 18px;
  border-radius: var(--rayon-xl);
  background: var(--bande-fond);
  color: var(--demo-texte);
  box-shadow: var(--ombre-3);
  text-align: left;
}

.js-anime .demo {
  animation: monte 1s 0.35s var(--sortie) both;
}

.demo-barre {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
}

.demo-etapes {
  flex: 1;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.demo-etape {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 7px;
  padding: 6px 4px;
  border: 0;
  background: transparent;
  color: var(--demo-muted);
  font: inherit;
  font-size: 12.5px;
  font-weight: 600;
  text-align: left;
  cursor: pointer;
  border-radius: var(--rayon-m);
}

.demo-etape:hover,
.demo-etape[aria-current='step'] {
  color: var(--demo-texte);
}

.demo-etape:focus-visible,
.demo-lecture:focus-visible {
  outline: 2px solid var(--demo-accent);
  outline-offset: 2px;
}

.demo-jauge {
  display: block;
  height: 3px;
  border-radius: 3px;
  background: var(--demo-ligne);
  overflow: hidden;
}

.demo-jauge-plein {
  display: block;
  height: 100%;
  width: 0;
  background: var(--demo-accent);
  border-radius: inherit;
}

.demo-etape.est-faite .demo-jauge-plein {
  width: 100%;
}

.demo-etape[aria-current='step'] .demo-jauge-plein {
  animation: jauge var(--duree-scene) linear forwards;
}

.demo.en-pause .demo-etape[aria-current='step'] .demo-jauge-plein {
  animation-play-state: paused;
}

/* Sans lecture automatique (mouvement reduit) : l'etape montree est pleine. */
.demo.sans-lecture .demo-etape[aria-current='step'] .demo-jauge-plein {
  animation: none;
  width: 100%;
}

@keyframes jauge {
  from { width: 0; }
  to { width: 100%; }
}

.demo-lecture {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 12px;
  border: 1px solid var(--demo-ligne);
  border-radius: var(--rayon-plein);
  background: transparent;
  color: var(--demo-texte);
  font: inherit;
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
}

.demo-lecture:hover {
  background: var(--demo-surface);
}

.demo-lecture .icone {
  width: 14px;
  height: 14px;
}

/* Les quatre scenes occupent la meme case : la hauteur ne saute pas. */
.demo-scenes {
  display: grid;
  min-height: 360px;
  padding: 26px 26px 30px;
  border-radius: var(--rayon-xl);
  background: radial-gradient(120% 90% at 50% 0%, var(--demo-surface), transparent 70%);
}

.demo-scene {
  grid-area: 1 / 1;
  display: flex;
  flex-direction: column;
  gap: 20px;
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  transition: opacity 0.5s var(--sortie), transform 0.6s var(--sortie), visibility 0s 0.5s;
}

.demo-scene.est-active {
  opacity: 1;
  visibility: visible;
  transform: none;
  transition: opacity 0.5s var(--sortie), transform 0.6s var(--sortie), visibility 0s;
}

/* Sans JavaScript, la derniere scene est montree, fixe. */
.demo:not(.demo-prete) .demo-scene[data-scene='3'] {
  opacity: 1;
  visibility: visible;
  transform: none;
}

.demo:not(.demo-prete) .demo-barre {
  display: none;
}

.demo-titre {
  margin: 0;
  font-size: 19px;
  font-weight: 700;
  letter-spacing: -0.01em;
}

/* Les elements d'une scene arrivent l'un apres l'autre. --i est pose par
   accueil.js (l'ordre dans la scene) ; la CSP interdit les style="" en HTML. */
.demo-seq {
  --i: 0;
}

.demo-scene.est-active .demo-seq {
  animation: pop 0.55s var(--sortie) both;
  animation-delay: calc(var(--i) * 170ms + 150ms);
}

.demo.en-pause .demo-seq,
.demo.en-pause .demo-niveau-plein {
  animation-play-state: paused;
}

@keyframes pop {
  from { opacity: 0; transform: translateY(10px) scale(0.97); }
  to { opacity: 1; transform: none; }
}

.demo-sous {
  display: block;
  margin: 2px 0 0;
  color: var(--demo-muted);
  font-size: 13px;
}

.demo-libelle {
  margin: 0 0 8px;
  color: var(--demo-muted);
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

/* Scene 1 : profil */
.demo-profil {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}

.demo-identite {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  gap: 12px;
}

.demo-avatar {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--demo-accent);
  color: var(--bande-fond);
  font-weight: 800;
}

.demo-nom {
  margin: 0;
  font-weight: 700;
  font-size: 16px;
}

.demo-puces {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 0;
}

.demo-puce {
  padding: 6px 12px;
  border: 1px solid var(--demo-ligne);
  border-radius: var(--rayon-plein);
  background: var(--demo-surface);
  font-size: 13px;
  font-weight: 600;
}

/* Scene 2 : offres */
.demo-offres {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.demo-offre {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 16px;
  border: 1px solid var(--demo-ligne);
  border-radius: var(--rayon-l);
  background: var(--demo-surface);
}

.demo-offre:first-child {
  border-color: color-mix(in srgb, var(--demo-accent) 55%, transparent);
}

.demo-offre-titre {
  display: block;
  font-weight: 700;
}

.demo-niveau {
  --couleur: var(--demo-vert);
  --cible: 86%;
  flex: none;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 6px;
  width: 150px;
  color: var(--couleur);
  font-size: 12.5px;
  font-weight: 700;
}

.demo-niveau[data-niveau='bonne'] { --couleur: var(--demo-accent); --cible: 64%; }
.demo-niveau[data-niveau='moyenne'] { --couleur: var(--demo-ambre); --cible: 38%; }

.demo-niveau-barre {
  width: 100%;
  height: 5px;
  border-radius: 5px;
  background: var(--demo-ligne);
  overflow: hidden;
}

.demo-niveau-plein {
  display: block;
  height: 100%;
  width: var(--cible);
  border-radius: inherit;
  background: var(--couleur);
}

.demo-scene.est-active .demo-niveau-plein {
  animation: barre 1.1s 0.6s var(--sortie) both;
}

@keyframes barre {
  from { width: 0; }
  to { width: var(--cible); }
}

/* Scene 3 : l'annonce face au CV */
.demo-face {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px 18px;
}

.demo-face .demo-libelle {
  margin-bottom: 0;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--demo-ligne);
}

.demo-libelle-cv {
  color: var(--demo-accent);
}

.demo-case {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 11px 14px;
  border: 1px solid var(--demo-ligne);
  border-radius: var(--rayon-l);
  background: var(--demo-surface);
  font-size: 14px;
  font-weight: 600;
}

.demo-trouve {
  border-color: color-mix(in srgb, var(--demo-vert) 45%, transparent);
  background: color-mix(in srgb, var(--demo-vert) 12%, var(--demo-surface));
}

.demo-trouve .icone {
  color: var(--demo-vert);
}

.demo-absent {
  border-style: dashed;
  color: var(--demo-ambre);
  background: transparent;
}

/* Scene 4 : le dossier */
.demo-feuilles {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
  padding: 8px 12px 0;
}

.demo-feuille {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-height: 210px;
  padding: 18px 16px;
  border-radius: var(--rayon-s);
  background: var(--demo-feuille);
  color: var(--demo-encre);
  box-shadow: var(--ombre-3);
}

.demo-feuille:nth-child(1) { transform: rotate(-2.5deg); }
.demo-feuille:nth-child(3) { transform: rotate(2.5deg); }

.demo-scene.est-active .demo-feuille.demo-seq {
  animation-name: feuille;
  animation-duration: 0.8s;
}

@keyframes feuille {
  from { opacity: 0; transform: translateY(40px) rotate(0deg) scale(0.96); }
}

.demo-feuille-titre {
  margin: 0 0 4px;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  /* --accent-encre et non --accent : l'accent clair du theme sombre serait
     illisible sur le papier clair de la feuille. */
  color: var(--accent-encre);
}

.demo-feuille-ligne {
  margin: 0;
  font-size: 12.5px;
}

.demo-feuille-fort {
  font-weight: 700;
  font-size: 14px;
}

.demo-trait {
  display: block;
  height: 6px;
  border-radius: 3px;
  background: var(--demo-trait);
}

.demo-trait-court {
  width: 60%;
}

.demo-coche {
  position: absolute;
  top: -12px;
  right: -12px;
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--demo-vert);
  color: var(--bande-fond);
}

.demo-scene.est-active .demo-coche {
  animation: coche 0.5s var(--sortie) both;
  animation-delay: calc(var(--i) * 170ms + 750ms);
}

.demo.en-pause .demo-coche {
  animation-play-state: paused;
}

@keyframes coche {
  from { opacity: 0; transform: scale(0.3); }
  to { opacity: 1; transform: none; }
}

/* ---------------------------------------------------- Bandeau des metiers */

.metiers {
  max-width: 1120px;
  margin: 0 auto;
  padding: 56px 0 24px;
  overflow: hidden;
  text-align: center;
}

.metiers-titre {
  margin: 0 0 18px;
  padding: 0 24px;
  color: var(--text-muted);
  font-size: 15px;
  font-weight: 600;
}

.metiers-piste {
  display: flex;
  width: max-content;
  /* Masque de fondu sur les bords : seule l'opacite compte, pas la couleur. */
  -webkit-mask-image: linear-gradient(90deg, transparent, black 12%, black 88%, transparent);
  mask-image: linear-gradient(90deg, transparent, black 12%, black 88%, transparent);
}

.metiers-liste {
  display: flex;
  gap: 12px;
  margin: 0;
  padding: 0 6px;
  list-style: none;
}

.metiers-liste li {
  padding: 9px 18px;
  border: 1px solid var(--border);
  border-radius: var(--rayon-plein);
  background: var(--surface);
  font-size: 15px;
  font-weight: 600;
  white-space: nowrap;
}

.js-anime .metiers-piste {
  animation: defile 48s linear infinite;
}

.metiers:hover .metiers-piste {
  animation-play-state: paused;
}

@keyframes defile {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

/* Sans animation, la piste deborde : on la laisse defiler a la main. */
html:not(.js-anime) .metiers {
  overflow-x: auto;
}

/* --------------------------------------------------------------- Sections */

.bloc {
  max-width: 1120px;
  margin: 0 auto;
  padding: 96px 24px;
}

.bloc-duo {
  display: grid;
  gap: 48px;
  align-items: center;
}

@media (min-width: 920px) {
  .bloc-duo {
    grid-template-columns: 1fr 1fr;
    gap: 72px;
  }

  .bloc-inverse > :first-child {
    order: 2;
  }
}

.bloc-titre {
  margin: 0;
  max-width: 17ch;
  font-size: clamp(30px, 3.8vw, 46px);
  line-height: 1.08;
  font-weight: 800;
  letter-spacing: -0.035em;
  text-wrap: balance;
}

.bloc-lead {
  max-width: 58ch;
  margin: 20px 0 0;
  font-size: 18px;
  line-height: 1.6;
  color: var(--text-muted);
  text-wrap: pretty;
}

.bloc-centre {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 44px;
}

.bloc-texte-centre {
  text-align: center;
}

.bloc-texte-centre .bloc-titre,
.bloc-texte-centre .bloc-lead {
  margin-left: auto;
  margin-right: auto;
}

.bloc-texte-centre .bloc-titre {
  max-width: 22ch;
}

.accueil-lien {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 28px;
  color: var(--accent);
  font-weight: 700;
  text-decoration: none;
}

.accueil-lien:hover {
  text-decoration: underline;
  text-underline-offset: 4px;
}

/* Apparition a la lecture : seulement quand accueil.js l'a permis. */
.js-anime [data-revele] {
  opacity: 0;
  transform: translateY(28px);
  filter: blur(8px);
  transition: opacity 0.9s var(--sortie), transform 1s var(--sortie), filter 0.9s var(--sortie);
}

.js-anime [data-revele].est-visible {
  opacity: 1;
  transform: none;
  filter: none;
}

/* Le second element d'un duo arrive un peu apres le premier. */
.js-anime .bloc-duo > [data-revele]:nth-child(2),
.js-anime .bloc-centre > [data-revele]:nth-child(2),
.js-anime .garantie > [data-revele]:nth-child(2),
.js-anime .formules > [data-revele]:nth-child(2) {
  transition-delay: 0.12s;
}

/* Listes a coches */
.points {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin: 30px 0 0;
  padding: 0;
  list-style: none;
}

.points li {
  display: flex;
  gap: 12px;
  font-size: 16px;
  line-height: 1.55;
  color: var(--text-muted);
}

.points strong {
  color: var(--text);
}

.points .icone {
  width: 22px;
  height: 22px;
  margin-top: 1px;
  padding: 4px;
  border-radius: 50%;
  background: var(--accent-soft);
  color: var(--accent);
}

/* --------------------------------------------------------- Le probleme */

.problemes {
  margin: 32px 0 0;
  padding: 0;
  list-style: none;
}

.problemes li {
  padding: 18px 0;
  border-top: 1px solid var(--border);
}

.problemes li:last-child {
  border-bottom: 1px solid var(--border);
}

.problemes h3 {
  margin: 0 0 6px;
  font-size: 17px;
  font-weight: 700;
}

.problemes p {
  margin: 0;
  color: var(--text-muted);
  line-height: 1.55;
}

.boite,
.panneau,
.fiche {
  padding: 20px;
  border: 1px solid var(--border);
  border-radius: var(--rayon-xl);
  background: var(--surface);
  box-shadow: var(--ombre-3);
}

.boite-tete,
.panneau-tete,
.fiche-tete {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--border);
}

.boite-titre,
.panneau-titre {
  font-weight: 700;
}

.boite-liste {
  margin: 0;
  padding: 0;
  list-style: none;
}

.boite-liste li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
}

.boite-liste strong {
  display: block;
  font-size: 14.5px;
}

.boite-etat {
  flex: none;
  padding: 4px 10px;
  border-radius: var(--rayon-plein);
  background: var(--bg);
  color: var(--text-muted);
  font-size: 12px;
  font-weight: 700;
}

.boite-refus {
  background: var(--danger-soft);
  color: var(--danger);
}

.boite-pied {
  margin: 14px 0 0;
  color: var(--text-muted);
  font-size: 14px;
}

/* Les verdicts tombent un par un, comme des reponses qui n'arrivent pas. */
.js-anime .boite .boite-etat {
  opacity: 0;
}

.js-anime .boite.est-visible .boite-etat {
  animation: verdict 0.5s var(--sortie) both;
}

.boite-liste li:nth-child(1) .boite-etat { animation-delay: 0.5s; }
.boite-liste li:nth-child(2) .boite-etat { animation-delay: 0.85s; }
.boite-liste li:nth-child(3) .boite-etat { animation-delay: 1.2s; }
.boite-liste li:nth-child(4) .boite-etat { animation-delay: 1.55s; }
.boite-liste li:nth-child(5) .boite-etat { animation-delay: 1.9s; }
.boite-liste li:nth-child(6) .boite-etat { animation-delay: 2.25s; }

@keyframes verdict {
  from { opacity: 0; transform: translateY(-10px) scale(0.9); }
  to { opacity: 1; transform: none; }
}

/* ------------------------------------------------------------ Les offres */

.panneau-direct {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--text-muted);
  font-size: 12.5px;
}

.point-vivant {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--niveau-excellente);
  box-shadow: 0 0 0 0 color-mix(in srgb, var(--niveau-excellente) 50%, transparent);
}

.js-anime .point-vivant {
  animation: pouls 2.4s ease-out infinite;
}

@keyframes pouls {
  70% { box-shadow: 0 0 0 8px transparent; }
  100% { box-shadow: 0 0 0 0 transparent; }
}

.offres-liste {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin: 14px 0 0;
  padding: 0;
  list-style: none;
}

.offres-liste li {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 12px;
  border: 1px solid var(--border);
  border-radius: var(--rayon-l);
}

.offres-liste li:first-child {
  border-color: color-mix(in srgb, var(--accent) 45%, var(--border));
  background: var(--accent-soft);
}

.offre-initiales {
  flex: none;
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 11px;
  background: var(--bg);
  font-size: 12px;
  font-weight: 800;
}

.offre-texte {
  flex: 1;
  min-width: 0;
}

.offre-texte strong {
  display: block;
  font-size: 14.5px;
}

.offres-liste .badge {
  flex: none;
}

.js-anime .panneau .offres-liste li {
  opacity: 0;
}

.js-anime .panneau.est-visible .offres-liste li {
  animation: glisse 0.6s var(--sortie) both;
}

.offres-liste li:nth-child(1) { animation-delay: 0.3s; }
.offres-liste li:nth-child(2) { animation-delay: 0.42s; }
.offres-liste li:nth-child(3) { animation-delay: 0.54s; }
.offres-liste li:nth-child(4) { animation-delay: 0.66s; }
.offres-liste li:nth-child(5) { animation-delay: 0.78s; }

@keyframes glisse {
  from { opacity: 0; transform: translateX(24px); }
  to { opacity: 1; transform: none; }
}

.panneau-pied {
  margin: 14px 0 0;
  color: var(--text-muted);
  font-size: 13px;
}

/* ---------------------------------------------------------- L'adaptation */

.adaptation {
  width: 100%;
  max-width: 880px;
  border: 1px solid var(--border);
  border-radius: var(--rayon-xl);
  background: var(--surface);
  box-shadow: var(--ombre-3);
  overflow: hidden;
}

.adaptation-tete {
  padding: 18px 24px;
  border-bottom: 1px solid var(--border);
}

.adaptation-poste {
  margin: 0 0 2px;
  font-weight: 700;
  font-size: 16px;
}

.adaptation-tete .count {
  margin: 0;
}

.adaptation-corps {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 28px 40px;
  padding: 28px 24px;
}

.anneaux {
  display: flex;
  align-items: center;
  gap: 18px;
}

.anneaux-fleche {
  width: 24px;
  height: 24px;
  color: var(--text-muted);
}

.anneau {
  position: relative;
  display: grid;
  justify-items: center;
  gap: 8px;
  width: 112px;
}

.anneau svg {
  width: 112px;
  height: 112px;
  transform: rotate(-90deg);
}

.anneau circle {
  fill: none;
  stroke-width: 9;
}

.anneau-fond {
  stroke: var(--border);
}

.anneau-valeur {
  stroke: var(--text-muted);
  stroke-linecap: round;
  /* Circonference d'un cercle de rayon 42 : 2 x pi x 42 = 263,9. */
  stroke-dasharray: 263.9;
}

.anneau-avant { stroke-dashoffset: 110.8; } /* 58 % */
.anneau-apres { stroke-dashoffset: 31.7; stroke: var(--niveau-excellente); } /* 88 % */

.js-anime .adaptation .anneau-valeur {
  stroke-dashoffset: 263.9;
  transition: stroke-dashoffset 1.6s var(--sortie);
}

.js-anime .adaptation.est-visible .anneau-avant { stroke-dashoffset: 110.8; transition-delay: 0.3s; }
.js-anime .adaptation.est-visible .anneau-apres { stroke-dashoffset: 31.7; transition-delay: 0.9s; }

.anneau-chiffre {
  position: absolute;
  top: 0;
  left: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 112px;
  height: 112px;
  font-size: 30px;
  font-weight: 800;
  letter-spacing: -0.03em;
  font-variant-numeric: tabular-nums;
}

.anneau-pourcent {
  position: relative;
  top: -0.55em;
  margin-left: 1px;
  font-size: 13px;
  font-weight: 700;
  color: var(--text-muted);
}

.anneau-fort .anneau-chiffre {
  color: var(--niveau-excellente);
}

.anneau-legende {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-muted);
}

.adaptation-detail {
  flex: 1;
  min-width: 260px;
}

.adaptation-detail p {
  margin: 0 0 8px;
  color: var(--text-muted);
  line-height: 1.5;
}

.adaptation-detail strong {
  color: var(--text);
}

.adaptation-verdict {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
}

.adaptation-plus {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  margin: 0;
  padding: 0;
  list-style: none;
  border-top: 1px solid var(--border);
}

.adaptation-plus li {
  padding: 18px 24px;
  color: var(--text-muted);
  font-size: 14.5px;
  line-height: 1.5;
}

.adaptation-plus li + li {
  border-left: 1px solid var(--border);
}

.adaptation-plus strong {
  display: block;
  margin-bottom: 4px;
  color: var(--text);
}

/* ----------------------------------------------------------- La garantie */

.garantie {
  display: grid;
  gap: 40px;
}

@media (min-width: 920px) {
  .garantie {
    grid-template-columns: 5fr 6fr;
    gap: 72px;
    align-items: start;
  }
}

.couches {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.couches li {
  display: flex;
  gap: 16px;
  padding: 18px 20px;
  border: 1px solid var(--border);
  border-radius: var(--rayon-l);
  background: var(--surface);
  color: var(--text-muted);
  line-height: 1.55;
}

.couches strong {
  display: block;
  margin-bottom: 2px;
  color: var(--text);
  font-size: 16px;
}

.couche-coche {
  flex: none;
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--niveau-excellente);
  color: var(--surface);
}

.couche-coche .icone {
  width: 18px;
  height: 18px;
}

.js-anime .couches .couche-coche {
  transform: scale(0);
}

.js-anime .couches.est-visible .couche-coche {
  animation: coche 0.5s var(--sortie) both;
}

.couches li:nth-child(1) .couche-coche { animation-delay: 0.45s; }
.couches li:nth-child(2) .couche-coche { animation-delay: 0.75s; }
.couches li:nth-child(3) .couche-coche { animation-delay: 1.05s; }
.couches li:nth-child(4) .couche-coche { animation-delay: 1.35s; }

/* ---------------------------------------------------------- L'entretien */

.fiche-jour {
  flex: none;
  padding: 4px 10px;
  border-radius: var(--rayon-plein);
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 12px;
  font-weight: 700;
}

.question {
  margin-top: 12px;
  padding: 14px 16px;
  border-radius: var(--rayon-l);
  background: var(--bg);
}

.question-faible {
  background: color-mix(in srgb, var(--niveau-moyenne) 10%, var(--bg));
}

.question-type {
  margin: 0 0 6px;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
}

.question-faible .question-type {
  color: var(--niveau-moyenne);
}

.question-texte {
  margin: 0 0 8px;
  font-weight: 700;
  line-height: 1.4;
}

.question-appui {
  margin: 0;
  color: var(--text-muted);
  font-size: 14px;
  line-height: 1.5;
}

.js-anime .fiche .question {
  opacity: 0;
}

.js-anime .fiche.est-visible .question {
  animation: monte 0.7s var(--sortie) both;
}

.fiche .question:nth-of-type(1) { animation-delay: 0.35s; }
.fiche .question:nth-of-type(2) { animation-delay: 0.65s; }
.fiche .question:nth-of-type(3) { animation-delay: 0.95s; }

/* -------------------------------------------------------------- Le suivi */

.mini-tableau {
  --ecart: 12px;
  --marge: 10px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--ecart);
  padding: 16px;
  border: 1px solid var(--border);
  border-radius: var(--rayon-xl);
  background: var(--surface);
  box-shadow: var(--ombre-3);
}

.mini-colonne {
  --teinte: var(--text-muted);
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-height: 230px;
  padding: var(--marge);
  border-radius: var(--rayon-l);
  background: color-mix(in srgb, var(--teinte) 7%, var(--bg));
}

.mini-envoyee { --teinte: var(--accent); }
.mini-entretien { --teinte: var(--niveau-excellente); }

.mini-titre {
  margin: 0 0 4px;
  padding-bottom: 8px;
  border-bottom: 2px solid var(--teinte);
  font-size: 13px;
  font-weight: 700;
}

.mini-carte {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 10px;
  border: 1px solid var(--border);
  border-radius: var(--rayon-m);
  background: var(--surface);
  box-shadow: var(--ombre-1);
  font-size: 13px;
}

.mini-carte .count {
  font-size: 12px;
}

.mini-badge {
  align-self: flex-start;
  margin-top: 6px;
  padding: 2px 8px;
  border-radius: var(--rayon-plein);
  background: color-mix(in srgb, var(--niveau-excellente) 14%, transparent);
  color: var(--niveau-excellente);
  font-size: 11px;
  font-weight: 700;
}

.mini-place {
  min-height: 74px;
  flex: none;
  border: 1px dashed color-mix(in srgb, var(--teinte) 45%, var(--border));
  border-radius: var(--rayon-m);
}

/* La carte "Comptable" passe d'Envoyee a Entretien, une fois. Sans
   animation, elle est deja arrivee. */
.mini-mobile {
  transform: translateX(calc(100% + 2 * var(--marge) + var(--ecart)));
}

.js-anime .mini-tableau .mini-mobile {
  transform: none;
}

.js-anime .mini-tableau .mini-badge {
  opacity: 0;
}

.js-anime .mini-tableau.est-visible .mini-mobile {
  animation: passe 1.2s 0.9s var(--sortie) forwards;
}

.js-anime .mini-tableau.est-visible .mini-badge {
  animation: pop 0.5s 2s var(--sortie) forwards;
}

@keyframes passe {
  0% { transform: none; }
  25% { transform: translateY(-6px) rotate(-2deg); box-shadow: var(--ombre-3); }
  100% { transform: translateX(calc(100% + 2 * var(--marge) + var(--ecart))); }
}

/* ------------------------------------------------------------- Formules */

.formules {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 40px;
}

.formules-grille {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(300px, 100%), 1fr));
  gap: 20px;
  width: 100%;
  max-width: 760px;
}

.formule {
  display: flex;
  flex-direction: column;
  padding: 28px;
  border: 1px solid var(--border);
  border-radius: var(--rayon-xl);
  background: var(--surface);
}

.formule-phare {
  border: 2px solid var(--accent);
  box-shadow: var(--ombre-3);
}

.formule-nom {
  margin: 0;
  font-size: 18px;
  font-weight: 700;
}

.formule-prix {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin: 14px 0 0;
}

.formule-montant {
  font-size: 40px;
  font-weight: 800;
  letter-spacing: -0.03em;
  font-variant-numeric: tabular-nums;
}

.formule-periode {
  color: var(--text-muted);
  font-weight: 600;
}

.formule-variante {
  margin: 4px 0 0;
  color: var(--text-muted);
  font-size: 14px;
}

.formule-liste {
  display: flex;
  flex-direction: column;
  gap: 10px;
  flex: 1;
  margin: 22px 0 26px;
  padding: 0;
  list-style: none;
}

.formule-liste li {
  display: flex;
  gap: 10px;
  line-height: 1.45;
}

.formule-liste .icone {
  margin-top: 2px;
  color: var(--niveau-excellente);
}

.formule-bouton {
  text-align: center;
  padding: 12px 20px;
  border-radius: var(--rayon-l);
  font-size: 15px;
}

.formules-note {
  max-width: 60ch;
  margin: -12px 0 0;
  text-align: center;
}

/* --------------------------------------------- Apercu membre et chiffres */

.accueil-apercu {
  max-width: 560px;
  margin: 48px auto 0;
  padding: 18px 20px;
  border: 1px solid var(--border);
  border-radius: var(--rayon-xl);
  background: var(--surface);
  box-shadow: var(--ombre-3);
  text-align: left;
}

.accueil-apercu-tete {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border);
}

.accueil-apercu-titre {
  font-weight: 700;
}

.accueil-apercu-liste {
  list-style: none;
  margin: 0;
  padding: 0;
}

.accueil-apercu-liste li {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
}

.accueil-apercu-liste li:last-child {
  border-bottom: 0;
}

/* Le badge de niveau garde sa ligne : le titre de l'offre s'abrege a sa place. */
.accueil-apercu-liste .badge {
  flex: none;
  white-space: nowrap;
}

.accueil-offre-titre {
  display: block;
  font-weight: 600;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.accueil-offre-texte {
  min-width: 0;
  color: inherit;
  text-decoration: none;
}

.accueil-offre-texte:hover .accueil-offre-titre {
  color: var(--accent);
}

.accueil-apercu-pied {
  margin: 10px 0 0;
  padding-top: 10px;
  border-top: 1px solid var(--border);
}

#accueil-chiffres-bloc > .tuiles {
  margin-top: 24px;
}

/* ---------------------------------------------------------- Appel final */

.accueil-bande {
  max-width: 1072px;
  margin: 24px auto 72px;
  padding: 64px 32px;
  border-radius: var(--rayon-xl);
  background: var(--bande-fond);
  color: var(--bande-texte-muted);
  text-align: center;
}

.accueil-bande-titre {
  max-width: 20ch;
  margin: 0 auto 14px;
  font-size: clamp(28px, 3.6vw, 42px);
  line-height: 1.1;
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--bande-texte);
  text-wrap: balance;
}

.accueil-bande p {
  max-width: 560px;
  margin: 0 auto 30px;
  font-size: 17px;
  line-height: 1.55;
}

.accueil-bande .accueil-cta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

@media (max-width: 1120px) {
  .accueil-bande {
    margin-left: 16px;
    margin-right: 16px;
  }
}

.accueil-pied {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 24px 24px 40px;
  text-align: center;
  border-top: 1px solid var(--border);
}

.accueil-pied p {
  margin: 0;
}

/* ---------------------------------------------------------------- Mobile */

/* Sur un telephone, la barre du haut garde l'essentiel : "Creer un compte"
   est deja le premier bouton de la page. */
@media (max-width: 520px) {
  .topbar-actions .btn-primary[data-visiteur] {
    display: none;
  }
}

@media (max-width: 760px) {
  .ouverture {
    padding: 44px 16px 16px;
  }

  .accueil-intro {
    font-size: 17px;
  }

  .bloc {
    padding: 64px 16px;
  }

  .demo {
    margin-top: 40px;
    padding: 12px;
    border-radius: var(--rayon-xl);
  }

  .demo-barre {
    flex-wrap: wrap;
  }

  .demo-etape-texte {
    font-size: 11px;
  }

  .demo-scenes {
    min-height: 520px;
    padding: 18px 12px 22px;
  }

  .demo-profil,
  .demo-feuilles {
    grid-template-columns: 1fr;
  }

  .demo-feuilles {
    gap: 14px;
  }

  .demo-feuille {
    min-height: 0;
  }

  .demo-feuille .demo-trait:nth-of-type(n + 3) {
    display: none;
  }

  .demo-offre {
    flex-direction: column;
    align-items: flex-start;
  }

  .demo-niveau {
    align-items: flex-start;
    width: 100%;
  }

  .demo-face {
    grid-template-columns: 1fr 1fr;
    gap: 8px;
  }

  .demo-case {
    padding: 9px 10px;
    font-size: 12.5px;
  }

  .adaptation-plus li + li {
    border-left: 0;
    border-top: 1px solid var(--border);
  }

  .mini-tableau {
    --ecart: 8px;
    --marge: 6px;
    padding: 10px;
  }

  .mini-carte {
    padding: 8px;
    font-size: 12px;
  }
}

/* ----------------------------------------------------- Mouvement reduit */

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}
