/* Copilote — univers (fil principal + un univers par module) et vitrines spécialisées. */

/* ---------- Hors ligne ---------- */

.pastille-hors-ligne {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 9px;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 650;
  white-space: nowrap;
  color: var(--alerte);
  background: color-mix(in srgb, var(--alerte) 12%, transparent);
  border: 1px solid color-mix(in srgb, var(--alerte) 35%, transparent);
}
.pastille-hors-ligne::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: currentColor;
  animation: fondu 1.6s ease-in-out infinite alternate;
}
.pastille-hors-ligne[hidden] {
  display: none;
}

/* ---------- Univers : onglets et glissement horizontal ---------- */

body.mode-univers .contenu {
  padding: 0;
}
body.mode-univers {
  overflow: hidden;
}
.accueil-univers {
  display: grid;
  grid-template-rows: auto 1fr;
  height: calc(100dvh - var(--h-entete, 64px));
  animation: apparition 0.45s var(--doux) backwards;
}

.onglets-univers {
  display: flex;
  gap: 6px;
  padding: 8px 18px 10px;
  overflow-x: auto;
  scrollbar-width: none;
  overscroll-behavior-x: contain;
  scroll-padding-inline: 18px;
}
.onglets-univers::-webkit-scrollbar {
  display: none;
}
.onglet-univers {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  flex: none;
  height: 40px;
  padding: 0 14px 0 6px;
  border-radius: 13px;
  font-size: 14px;
  font-weight: 650;
  color: var(--texte-2);
  background: var(--surface);
  border: 1px solid var(--bord);
  transition:
    background 0.3s,
    color 0.3s,
    border-color 0.3s,
    box-shadow 0.3s,
    transform 0.3s var(--ressort);
}
.onglet-univers:active {
  transform: scale(0.95);
}
.onglet-univers__icone {
  display: grid;
  place-items: center;
  width: 27px;
  height: 27px;
  border-radius: 9px;
  color: var(--couleur);
  background: color-mix(in srgb, var(--couleur) 16%, transparent);
}
.onglet-univers__icone svg {
  width: 16px;
  height: 16px;
}
.onglet-univers[aria-selected="true"] {
  color: var(--texte);
  background: color-mix(in srgb, var(--couleur) 18%, var(--surface-2));
  border-color: color-mix(in srgb, var(--couleur) 55%, transparent);
  box-shadow: 0 6px 22px color-mix(in srgb, var(--couleur) 22%, transparent);
}

.pager-univers {
  display: flex;
  overflow-x: auto;
  overflow-y: hidden;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
  overscroll-behavior-x: contain;
}
.pager-univers::-webkit-scrollbar {
  display: none;
}
.panneau-univers {
  position: relative;
  flex: 0 0 100%;
  min-width: 0;
  height: 100%;
  overflow-y: auto;
  overflow-x: hidden;
  overscroll-behavior-y: contain;
  scroll-snap-align: start;
  scroll-snap-stop: always;
  padding: 4px 18px calc(210px + var(--bas-sur));
  isolation: isolate;
  transition: background 0.6s var(--doux);
}
/* Univers hors de l'écran : le navigateur ne calcule pas leur rendu (gain qui grandit avec leur nombre). */
.panneau-univers {
  content-visibility: auto;
  contain-intrinsic-size: auto 390px auto 800px;
}
.panneau-univers--conversation .scene {
  display: none;
}
.pied-fil {
  margin-top: 18px;
}
.indice-fil {
  margin: 18px 4px;
  font-size: 14px;
  color: var(--texte-3);
  text-align: center;
}
.vitrine {
  position: relative;
  display: grid;
  gap: 12px;
  margin-bottom: 18px;
}

.voir-plus {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  width: 100%;
  margin: 4px 0 14px;
  padding: 9px;
  border-radius: 12px;
  font-size: 13.5px;
  font-weight: 650;
  color: var(--texte-3);
  border: 1px dashed var(--bord);
  transition:
    color 0.2s,
    border-color 0.2s;
}
.voir-plus:hover {
  color: var(--texte);
  border-color: color-mix(in srgb, var(--couleur) 50%, transparent);
}
.voir-plus svg {
  width: 15px;
  height: 15px;
  transform: rotate(180deg);
}

.bulle-routine {
  justify-self: start;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  border-radius: 11px;
  font-size: 13.5px;
  color: var(--texte-2);
  background: color-mix(in srgb, var(--couleur, var(--accent)) 12%, transparent);
  border: 1px solid color-mix(in srgb, var(--couleur, var(--accent)) 30%, transparent);
}
.bulle-routine svg {
  width: 15px;
  height: 15px;
  color: var(--couleur, var(--accent));
}
.bulle-routine b {
  color: var(--texte);
}

/* ---------- Feuille (panneau modal du bas) ---------- */

.feuille {
  position: fixed;
  inset: 0;
  z-index: 70;
  display: grid;
  align-items: end;
  justify-items: center;
  background: rgba(0, 0, 0, 0.45);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  animation: fondu 0.25s var(--doux) both;
}
.feuille--sortie {
  animation: fondu-sortie 0.25s var(--doux) both;
}
.feuille__contenu {
  width: min(100%, var(--largeur));
  max-height: 82dvh;
  display: grid;
  grid-template-rows: auto auto 1fr;
  gap: 12px;
  padding: 16px 16px calc(16px + var(--bas-sur));
  border-radius: 26px 26px 0 0;
  background: var(--surface-opaque);
  animation: monte 0.4s var(--ressort) both;
}
@keyframes monte {
  from {
    transform: translateY(40px);
    opacity: 0;
  }
}
.feuille__haut {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 17px;
}

/* ---------- Univers Coran ---------- */

.coran {
  display: grid;
  gap: 12px;
}
.coran-vide {
  display: grid;
  justify-items: center;
  gap: 8px;
  padding: 24px;
  text-align: center;
  color: var(--texte-2);
}
.coran-vide svg {
  width: 28px;
  height: 28px;
  color: var(--couleur);
}
.coran-arabe {
  margin: 0;
  font-family: "Amiri Quran", "Amiri", "Scheherazade New", "Noto Naskh Arabic", "Geeza Pro", "Traditional Arabic", "Segoe UI", serif;
  font-size: 30px;
  line-height: 2;
  text-align: right;
  color: var(--texte);
}
.coran-arabe--titre {
  font-size: 26px;
  line-height: 1.5;
}
.coran-arabe--liste {
  font-size: 20px;
  line-height: 1.4;
  color: var(--couleur);
}
.coran-section {
  margin: 10px 4px 0;
  font-size: 13px;
  font-weight: 700;
  color: var(--texte-3);
}
.coran-entete {
  position: relative;
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 16px;
  align-items: center;
  padding: 18px 16px;
  overflow: hidden;
  background:
    radial-gradient(120% 140% at 100% 0%, color-mix(in srgb, var(--couleur) 22%, transparent), transparent 60%),
    radial-gradient(80% 90% at 0% 100%, color-mix(in srgb, #d9b45a 10%, transparent), transparent 70%),
    var(--surface);
}
.coran-entete::after {
  /* Motif discret d'étoiles à huit branches, en filigrane. */
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  opacity: 0.07;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='44' height='44' viewBox='0 0 44 44'%3E%3Cg fill='none' stroke='%23fff' stroke-width='1'%3E%3Crect x='12' y='12' width='20' height='20'/%3E%3Crect x='12' y='12' width='20' height='20' transform='rotate(45 22 22)'/%3E%3C/g%3E%3C/svg%3E");
  mask-image: linear-gradient(100deg, transparent 30%, #000);
}
:root[data-theme="light"] .coran-entete::after {
  filter: invert(1);
  opacity: 0.05;
}
@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) .coran-entete::after {
    filter: invert(1);
    opacity: 0.05;
  }
}
.coran-entete > * {
  position: relative;
  z-index: 1;
}
.coran-entete__modifier {
  position: absolute;
  top: 10px;
  right: 10px;
}
.coran-entete__texte {
  display: grid;
  gap: 2px;
  min-width: 0;
  padding-right: 34px;
}
.coran-entete__texte .coran-arabe {
  text-align: left;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.coran-entete__texte strong {
  font-size: 16px;
}
.coran-basmala {
  margin: 0 0 -4px;
  text-align: center;
  font-family: "Amiri Quran", "Amiri", "Scheherazade New", "Noto Naskh Arabic", "Geeza Pro", "Traditional Arabic", "Segoe UI", serif;
  font-size: 22px;
  line-height: 1.8;
  color: color-mix(in srgb, #d9b45a 75%, var(--texte));
}
.coran-entete__texte span {
  font-size: 13px;
  color: var(--texte-3);
}
.coran-entete__anneau {
  position: relative;
  width: 64px;
  height: 64px;
  display: grid;
  place-items: center;
}
.coran-entete__anneau span {
  position: absolute;
  font-size: 13px;
  font-weight: 750;
}
.coran-anneau {
  width: 64px;
  height: 64px;
  transform: rotate(-90deg);
}
.coran-anneau circle {
  fill: none;
  stroke-width: 6;
}
.coran-anneau .piste {
  stroke: color-mix(in srgb, var(--couleur) 18%, transparent);
}
.coran-anneau .plein {
  stroke: var(--couleur);
  stroke-linecap: round;
  transition: stroke-dashoffset 1s var(--doux);
}

.verset {
  padding: 16px;
  display: grid;
  gap: 10px;
  transition:
    border-color 0.3s,
    box-shadow 0.3s;
  animation: apparition 0.45s var(--doux) backwards;
}
.verset--lecture {
  border-color: color-mix(in srgb, var(--couleur) 60%, transparent);
  box-shadow:
    0 0 0 3px color-mix(in srgb, var(--couleur) 18%, transparent),
    inset 0 1px 0 var(--reflet-haut);
}
.verset--lecture .coran-arabe {
  color: color-mix(in srgb, var(--couleur) 55%, var(--texte));
}
.verset__haut {
  display: flex;
  align-items: center;
  gap: 10px;
}
.verset__haut .espace {
  flex: 1;
}
.verset__numero {
  display: grid;
  place-items: center;
  flex: none;
  min-width: 32px;
  height: 32px;
  padding: 0 6px;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 750;
  color: color-mix(in srgb, var(--couleur), #000 var(--assombrir));
  background: color-mix(in srgb, var(--couleur) 15%, transparent);
}
.verset__phonetique {
  margin: 0;
  font-size: 15px;
  color: var(--texte-2);
  font-style: italic;
}
.verset__sens {
  margin: 0;
  font-size: 14.5px;
  color: var(--texte-2);
}
.verset__lecture,
.verset__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}
.segments--petits .segment {
  height: 36px;
  min-width: 40px;
  padding: 0 10px;
}
.coran-maitrise {
  color: #04261c;
  background: linear-gradient(135deg, color-mix(in srgb, var(--couleur) 85%, #fff), var(--couleur));
  border-color: transparent;
  box-shadow: 0 6px 18px color-mix(in srgb, var(--couleur) 28%, transparent);
}
.bouton-ecouter--rond {
  position: relative;
  display: grid;
  place-items: center;
  flex: none;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  color: #04261c;
  background: linear-gradient(135deg, color-mix(in srgb, var(--couleur) 80%, #fff), var(--couleur));
  box-shadow: 0 8px 22px color-mix(in srgb, var(--couleur) 35%, transparent);
  transition: transform 0.3s var(--ressort);
}
.bouton-ecouter--rond svg {
  width: 20px;
  height: 20px;
}
.bouton-ecouter--rond:active {
  transform: scale(0.92);
}
.bouton-ecouter--rond[aria-pressed="true"]::after {
  /* Onde qui pulse pendant la récitation. */
  content: "";
  position: absolute;
  inset: -4px;
  border-radius: 50%;
  border: 2px solid var(--couleur);
  animation: onde 1.6s var(--doux) infinite;
}
@keyframes onde {
  from {
    transform: scale(0.9);
    opacity: 0.9;
  }
  to {
    transform: scale(1.35);
    opacity: 0;
  }
}
.coran-maitrise:disabled {
  opacity: 0.6;
}
.coran-enchainer {
  justify-content: center;
}
.coran-bravo {
  display: grid;
  justify-items: center;
  gap: 8px;
  padding: 22px;
  text-align: center;
}
.coran-bravo svg {
  width: 28px;
  height: 28px;
  color: var(--alerte);
}
.coran-bravo p {
  margin: 0;
  color: var(--texte-2);
}

.coran-grille {
  padding: 16px;
  display: grid;
  gap: 12px;
}
.coran-grille__haut {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 10px;
}
.coran-grille__versets {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(40px, 1fr));
  gap: 6px;
}
.pastille-verset {
  height: 40px;
  border-radius: 11px;
  font-size: 13.5px;
  font-weight: 700;
  color: var(--texte-3);
  background: var(--surface-2);
  border: 1px solid var(--bord);
  transition: transform 0.25s var(--ressort);
}
.pastille-verset:active {
  transform: scale(0.92);
}
.pastille-verset--maitrise {
  color: #fff;
  background: color-mix(in srgb, var(--bon) 75%, transparent);
  border-color: transparent;
}
.pastille-verset--difficile {
  color: #1b1300;
  background: var(--alerte);
  border-color: transparent;
}
.pastille-verset--courant {
  color: var(--texte);
  border-color: var(--couleur);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--couleur) 20%, transparent);
}

.coran-choix {
  padding: 16px;
  display: grid;
  gap: 12px;
}
.coran-liste {
  display: grid;
  gap: 4px;
  max-height: 52dvh;
  overflow-y: auto;
  overscroll-behavior: contain;
  margin: 0 -6px;
  padding: 0 6px;
}
.coran-ligne {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 10px;
  border-radius: 14px;
  text-align: left;
  transition: background 0.2s;
}
.coran-ligne:hover {
  background: var(--surface-2);
}
.coran-ligne:disabled {
  opacity: 0.5;
}
.coran-ligne__noms {
  display: grid;
  gap: 1px;
  flex: 1;
  min-width: 0;
}
.coran-ligne__noms span {
  font-size: 12.5px;
  color: var(--texte-3);
}
.coran-choisie {
  display: grid;
  gap: 2px;
  padding: 12px;
  border-radius: 16px;
  background: color-mix(in srgb, var(--couleur) 12%, transparent);
}
.coran-choisie .coran-arabe {
  text-align: left;
}
.coran-modes {
  display: grid;
  gap: 8px;
}
.coran-mode {
  display: grid;
  gap: 2px;
  padding: 12px 14px;
  border-radius: 14px;
  text-align: left;
  background: var(--surface-2);
  border: 1px solid var(--bord);
  transition:
    border-color 0.25s,
    background 0.25s;
}
.coran-mode span {
  font-size: 13px;
  color: var(--texte-3);
}
.coran-mode[aria-checked="true"] {
  border-color: var(--couleur);
  background: color-mix(in srgb, var(--couleur) 14%, var(--surface-2));
}
.pas {
  display: flex;
  align-items: center;
  gap: 10px;
}
.pas strong {
  min-width: 24px;
  text-align: center;
  font-size: 18px;
}
.pas .bouton-icone {
  font-size: 22px;
  background: var(--surface-2);
}

/* ---------- Univers Foot ---------- */

.panneau-foot {
  background:
    radial-gradient(120% 70% at 50% 0%, color-mix(in srgb, var(--club-1) 42%, transparent), transparent 70%),
    linear-gradient(170deg, color-mix(in srgb, var(--club-1) 20%, transparent), transparent 45%),
    linear-gradient(10deg, color-mix(in srgb, var(--club-3) 14%, transparent), transparent 40%);
}
.foot-filigrane {
  position: absolute;
  top: -10px;
  right: -70px;
  z-index: -1;
  width: 300px;
  opacity: 0.09;
  transform: rotate(-12deg);
  pointer-events: none;
  filter: saturate(1.2);
}
.foot {
  display: grid;
  gap: 12px;
}
.foot-section {
  margin: 8px 4px 0;
  font-size: 13px;
  font-weight: 700;
  color: var(--texte-2);
}
.foot-vide {
  display: grid;
  justify-items: center;
  gap: 10px;
  padding: 24px 18px;
  text-align: center;
}
.foot-vide p {
  margin: 0;
  color: var(--texte-2);
}

.foot-hero {
  position: relative;
  min-height: 170px;
  border-radius: var(--r-l);
  overflow: hidden;
  display: flex;
  align-items: flex-end;
  border: 1px solid color-mix(in srgb, var(--club-1) 45%, var(--bord));
  background: linear-gradient(135deg, var(--club-1), color-mix(in srgb, var(--club-1) 40%, #000));
  box-shadow: 0 16px 40px color-mix(in srgb, var(--club-1) 30%, transparent);
  animation: apparition 0.5s var(--doux) backwards;
}
.foot-hero__photo {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.04);
  animation: zoom-lent 14s ease-in-out infinite alternate;
}
@keyframes zoom-lent {
  to {
    transform: scale(1.12);
  }
}
.foot-hero__voile {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(to top, rgba(0, 0, 0, 0.78), rgba(0, 0, 0, 0.1) 65%),
    linear-gradient(90deg, color-mix(in srgb, var(--club-1) 55%, transparent), transparent 70%);
}
.foot-hero__contenu {
  position: relative;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px;
  color: #fff;
}
.foot-hero__contenu div {
  display: grid;
  gap: 2px;
}
.foot-hero__contenu strong {
  font-size: 22px;
  letter-spacing: -0.02em;
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.5);
}
.foot-hero__contenu span {
  font-size: 13px;
  opacity: 0.85;
}
.foot-hero__bandes {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  display: flex;
  height: 5px;
}
.foot-hero__bandes i {
  flex: 1;
  background: var(--c);
}

.ecusson {
  flex: none;
  width: 40px;
  height: 40px;
  object-fit: contain;
  filter: drop-shadow(0 3px 8px rgba(0, 0, 0, 0.35));
}
.ecusson--grand {
  width: 64px;
  height: 64px;
}
.ecusson--match {
  width: 52px;
  height: 52px;
}
.ecusson--initiales {
  display: grid;
  place-items: center;
  border-radius: 50%;
  font-size: 12px;
  font-weight: 800;
  color: var(--texte);
  background: var(--surface-3);
  filter: none;
}
.ecusson--initiales svg {
  width: 18px;
  height: 18px;
}

.foot-clubs {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  scrollbar-width: none;
  overscroll-behavior-x: contain;
  padding: 2px 2px 4px;
}
.foot-clubs::-webkit-scrollbar {
  display: none;
}
.foot-club {
  position: relative;
  display: grid;
  justify-items: center;
  gap: 4px;
  flex: none;
  width: 76px;
  padding: 10px 4px 8px;
  border-radius: 16px;
  font-size: 11.5px;
  font-weight: 650;
  color: var(--texte-2);
  background: var(--surface);
  border: 1px solid var(--bord);
  transition:
    transform 0.3s var(--ressort),
    border-color 0.3s;
}
.foot-club span:not(.ecusson) {
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.foot-club:active {
  transform: scale(0.94);
}
.foot-club--actif {
  color: var(--texte);
  border-color: color-mix(in srgb, var(--club-1) 70%, transparent);
  background: color-mix(in srgb, var(--club-1) 16%, var(--surface));
}
.foot-club__retirer {
  position: absolute;
  top: 4px;
  right: 4px;
  display: grid;
  place-items: center;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  color: #fff;
  background: var(--critique);
}
.foot-club__retirer svg {
  width: 12px;
  height: 12px;
}

.foot-matchs {
  display: grid;
  gap: 10px;
}
.foot-match {
  position: relative;
  overflow: hidden;
  padding: 14px 16px;
  display: grid;
  gap: 10px;
  isolation: isolate;
}
.foot-match__image {
  position: absolute;
  inset: 0;
  z-index: -1;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.16;
  filter: blur(3px) saturate(1.3);
  transform: scale(1.08);
  mask-image: linear-gradient(to bottom, #000, transparent 85%);
}
.foot-match--avenir {
  border-color: color-mix(in srgb, var(--club-1) 45%, var(--bord));
}
.foot-match__haut {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.foot-match__affiche {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 8px;
}
.foot-equipe {
  display: grid;
  justify-items: center;
  gap: 6px;
  text-align: center;
  font-size: 13.5px;
  font-weight: 650;
  color: var(--texte-2);
}
.foot-equipe--club {
  color: var(--texte);
}
.foot-match__score {
  display: grid;
  justify-items: center;
  gap: 2px;
}
.foot-match__score strong {
  font-size: 30px;
  font-weight: 800;
  letter-spacing: -0.03em;
  font-variant-numeric: tabular-nums;
}
.foot-match__score span {
  font-size: 12px;
  color: var(--texte-3);
  white-space: nowrap;
}
.foot-match__bas {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  font-size: 12.5px;
  color: var(--texte-3);
}

.foot-actus {
  display: grid;
  gap: 8px;
}
.foot-carrousel {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
  overscroll-behavior-x: contain;
  margin: 0 -18px;
  padding: 2px 18px 6px;
}
.foot-carrousel::-webkit-scrollbar {
  display: none;
}
.foot-actu {
  flex: 0 0 78%;
  max-width: 300px;
  scroll-snap-align: start;
  overflow: hidden;
  display: grid;
  grid-template-rows: 150px auto;
  color: inherit;
  text-decoration: none;
  transition: transform 0.3s var(--ressort);
}
.foot-actu:active {
  transform: scale(0.97);
}
.foot-actu img,
.foot-actu__sans-image {
  width: 100%;
  height: 150px;
  object-fit: cover;
}
.foot-actu__sans-image {
  display: grid;
  place-items: center;
  color: var(--texte-3);
  background: var(--surface-2);
}
.foot-actu__texte {
  display: grid;
  gap: 6px;
  padding: 12px 14px 14px;
}
.foot-actu__texte strong {
  font-size: 14.5px;
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.foot-actu__texte span {
  font-size: 12px;
  color: var(--texte-3);
}
.foot-resume {
  margin-top: 4px;
}
.foot-resultats {
  display: grid;
  gap: 4px;
  overflow-y: auto;
  min-height: 120px;
}

/* ---------- Feuille : corps défilant (formulaires) ---------- */

.feuille__contenu:has(> .feuille__corps) {
  grid-template-rows: auto 1fr;
}
.feuille__corps {
  display: grid;
  align-content: start;
  gap: 12px;
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  margin: 0 -4px;
  padding: 2px 4px 4px;
}

/* ---------- Univers Finance ---------- */

.panneau-finance {
  background:
    radial-gradient(110% 60% at 50% 0%, color-mix(in srgb, var(--couleur) 26%, transparent), transparent 70%),
    radial-gradient(70% 50% at 0% 100%, color-mix(in srgb, #1baf7a 10%, transparent), transparent 70%);
}
.finance {
  display: grid;
  gap: 12px;
}
.finance-section {
  display: grid;
  gap: 10px;
}
.finance .montant {
  font-variant-numeric: tabular-nums;
  transition: filter 0.35s var(--doux);
}
.finance--discret .montant {
  filter: blur(7px);
}
.finance .hausse,
.finance .hausse .montant,
.feuille .hausse,
.feuille .hausse .montant {
  color: var(--hausse);
}
.finance .baisse,
.finance .baisse .montant,
.feuille .baisse,
.feuille .baisse .montant {
  color: var(--baisse);
}

/* Patrimoine net */
.finance-hero {
  position: relative;
  overflow: hidden;
  display: grid;
  gap: 6px;
  padding: 18px 18px 14px;
  border-color: color-mix(in srgb, var(--couleur) 35%, var(--bord));
  background:
    radial-gradient(120% 100% at 100% 0%, color-mix(in srgb, var(--couleur) 26%, transparent), transparent 60%),
    radial-gradient(90% 80% at 0% 100%, color-mix(in srgb, #1baf7a 12%, transparent), transparent 70%),
    var(--surface);
  box-shadow: 0 18px 50px color-mix(in srgb, var(--couleur) 18%, transparent);
  animation: apparition 0.5s var(--doux) backwards;
}
.finance-hero__haut {
  display: flex;
  align-items: center;
  gap: 4px;
}
.finance-hero__haut .espace {
  flex: 1;
}
.finance-hero__libelle {
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: color-mix(in srgb, var(--couleur) 70%, var(--texte));
}
.finance-hero__valeur {
  font-size: 40px;
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -0.035em;
}
.finance-hero__valeur small {
  font-size: 22px;
  font-weight: 700;
  opacity: 0.55;
}
.finance-hero__bas {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.finance-hero__maj {
  font-size: 12px;
  color: var(--texte-3);
}
.finance-hero__totaux {
  display: flex;
  gap: 16px;
  font-size: 12.5px;
  color: var(--texte-3);
}
.finance-hero__totaux .montant {
  color: var(--texte-2);
  font-weight: 650;
}
.puce-variation {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 10px;
  border-radius: 99px;
  font-size: 12.5px;
  font-weight: 650;
  color: var(--texte-2);
  background: var(--surface-2);
}
.puce-variation svg {
  width: 14px;
  height: 14px;
}
.puce-variation--hausse {
  color: var(--hausse);
  background: color-mix(in srgb, var(--hausse) 14%, transparent);
}
.puce-variation--hausse .montant {
  color: inherit;
}
.puce-variation--baisse {
  color: var(--baisse);
  background: color-mix(in srgb, var(--baisse) 14%, transparent);
}
.puce-variation--baisse svg {
  transform: scaleY(-1);
}
.puce-variation--baisse .montant {
  color: inherit;
}
.finance-courbe {
  display: block;
  width: calc(100% + 36px);
  height: auto;
  aspect-ratio: 390 / 84;
  margin: 6px -18px 2px;
  overflow: visible;
}
.finance-courbe--vide {
  width: auto;
  height: auto;
  margin: 8px 0;
  padding: 14px;
  border-radius: 14px;
  font-size: 12.5px;
  text-align: center;
  color: var(--texte-3);
  border: 1px dashed var(--bord);
}
.finance-courbe__ligne {
  stroke-dasharray: 1;
  stroke-dashoffset: 1;
  animation: trace 1.4s var(--doux) 0.15s forwards;
}
.finance-courbe__aire {
  animation: fondu 0.9s var(--doux) 0.7s backwards;
}
.finance-courbe stop {
  stop-color: var(--couleur);
}
.finance-courbe__ligne {
  stroke: var(--couleur);
}
.finance-courbe__point {
  fill: var(--couleur);
  stroke: var(--surface-opaque);
  stroke-width: 2.5;
  transform-box: fill-box;
  transform-origin: center;
  animation: pulse-point 2.4s var(--doux) 1.5s infinite;
}
@keyframes pulse-point {
  0%,
  100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.35);
  }
}
@keyframes trace {
  to {
    stroke-dashoffset: 0;
  }
}
.bouton-icone.tourne svg {
  animation: tourne 0.9s linear infinite;
}
@keyframes tourne {
  to {
    transform: rotate(360deg);
  }
}

/* Répartition */
.finance-repartition {
  display: grid;
  gap: 12px;
  padding: 14px 16px;
}
.finance-barre {
  display: flex;
  gap: 3px;
  height: 12px;
}
.finance-barre i {
  flex: var(--part) 1 0;
  min-width: 6px;
  border-radius: 99px;
  background: var(--c);
  transform-origin: left;
  animation: etire 0.8s var(--ressort) calc(var(--i) * 70ms) backwards;
}
@keyframes etire {
  from {
    transform: scaleX(0);
  }
}
.finance-legende {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px 14px;
}
.finance-legende__item {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 2px 7px;
  font-size: 13px;
  color: var(--texte-2);
}
.finance-legende__item i {
  width: 9px;
  height: 9px;
  border-radius: 3px;
  background: var(--c);
}
.finance-legende__item b {
  color: var(--texte);
}
.finance-legende__montant {
  grid-column: 2 / -1;
  font-size: 12px;
  color: var(--texte-3);
}

/* Objectifs */
.finance-carrousel {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
  overscroll-behavior-x: contain;
  margin: 0 -18px;
  padding: 2px 18px 6px;
}
.finance-carrousel::-webkit-scrollbar {
  display: none;
}
.objectif {
  flex: 0 0 72%;
  max-width: 270px;
  scroll-snap-align: start;
  display: grid;
  align-content: start;
  gap: 8px;
  padding: 14px;
  text-align: left;
  color: inherit;
  transition: transform 0.3s var(--ressort);
}
.objectif:active {
  transform: scale(0.97);
}
.objectif__haut {
  display: flex;
  align-items: center;
  gap: 12px;
}
.objectif__haut strong {
  font-size: 15px;
  line-height: 1.25;
}
.objectif__anneau-boite {
  position: relative;
  flex: none;
  width: 52px;
  height: 52px;
  display: grid;
  place-items: center;
}
.objectif__anneau-boite span {
  position: absolute;
  font-size: 12px;
  font-weight: 750;
}
.objectif__anneau {
  width: 52px;
  height: 52px;
  transform: rotate(-90deg);
}
.objectif__anneau circle {
  fill: none;
  stroke-width: 5;
}
.objectif__anneau .piste {
  stroke: color-mix(in srgb, var(--couleur-objectif) 18%, transparent);
}
.objectif__anneau .plein {
  stroke: var(--couleur-objectif);
  stroke-linecap: round;
  animation: remplit 1.2s var(--doux) backwards;
}
@keyframes remplit {
  from {
    stroke-dashoffset: 138;
  }
}
.objectif__montants {
  font-size: 13.5px;
  color: var(--texte-3);
}
.objectif__montants .montant:first-child {
  font-size: 17px;
  font-weight: 750;
  color: var(--texte);
}
.objectif__statut {
  justify-self: start;
  padding: 3px 9px;
  border-radius: 99px;
  font-size: 12px;
  font-weight: 650;
}
.objectif__statut--bon {
  color: var(--hausse);
  background: color-mix(in srgb, var(--hausse) 14%, transparent);
}
.objectif__statut--alerte {
  color: color-mix(in srgb, var(--alerte), #000 var(--assombrir));
  background: color-mix(in srgb, var(--alerte) 15%, transparent);
}
.objectif__statut--neutre {
  color: var(--texte-2);
  background: var(--surface-2);
}
.objectif__echeance {
  font-size: 12px;
  color: var(--texte-3);
}
.objectif--nouveau {
  flex-basis: 52%;
  place-content: center;
  justify-items: center;
  text-align: center;
  border-style: dashed;
  background: transparent;
}
.objectif--nouveau span:last-child {
  font-size: 12.5px;
  color: var(--texte-3);
}
.objectif__plus {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  color: #261a00;
  background: linear-gradient(135deg, color-mix(in srgb, var(--couleur) 70%, #fff), var(--couleur));
}

/* Comptes */
.finance-comptes {
  display: grid;
  gap: 10px;
}
.finance-groupe {
  display: grid;
  padding: 12px 14px 4px;
  animation: apparition 0.45s var(--doux) backwards;
}
.finance-groupe__haut {
  display: flex;
  align-items: center;
  gap: 10px;
  padding-bottom: 6px;
}
.finance-groupe__haut .espace {
  flex: 1;
}
.finance-groupe__total {
  font-weight: 750;
}
.marque {
  display: grid;
  place-items: center;
  flex: none;
  width: 32px;
  height: 32px;
  border-radius: 10px;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--marque-texte, #fff);
  background: var(--fond);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.08);
}
.marque--mini {
  width: 22px;
  height: 22px;
  border-radius: 7px;
  font-size: 8.5px;
}
.marque--grande {
  width: 46px;
  height: 46px;
  border-radius: 14px;
  font-size: 14px;
}
.marque--logo {
  object-fit: contain;
  padding: 3px;
  background: #fff;
}
.finance-compte {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 10px 0;
  text-align: left;
  color: inherit;
  border-top: 1px solid var(--bord);
}
.finance-compte__icone {
  display: grid;
  place-items: center;
  flex: none;
  width: 34px;
  height: 34px;
  border-radius: 11px;
  color: var(--c);
  background: color-mix(in srgb, var(--c) 15%, transparent);
}
.finance-compte__icone svg {
  width: 18px;
  height: 18px;
}
.finance-compte__texte {
  display: grid;
  gap: 1px;
  flex: 1;
  min-width: 0;
  font-size: 14.5px;
}
.finance-compte__texte small {
  font-size: 12px;
  color: var(--texte-3);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.finance-compte__droite {
  display: grid;
  justify-items: end;
  gap: 1px;
  font-weight: 650;
  white-space: nowrap;
}
.finance-plusvalue {
  font-size: 11.5px;
  font-weight: 650;
}
.finance-plusvalue--hausse,
.finance-plusvalue--hausse .montant {
  color: var(--hausse);
}
.finance-plusvalue--baisse,
.finance-plusvalue--baisse .montant {
  color: var(--baisse);
}
.finance-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.finance-action svg {
  color: var(--couleur);
}

/* Flux du mois */
.finance-flux {
  display: grid;
  gap: 16px;
  padding: 16px;
}
.finance-flux__chiffres {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}
.finance-flux__chiffres div {
  display: grid;
  gap: 2px;
}
.finance-flux__chiffres small {
  font-size: 12px;
  color: var(--texte-3);
}
.finance-flux__chiffres .montant {
  font-size: 17px;
  font-weight: 750;
}
.finance-mois {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  align-items: end;
  gap: 6px;
}
.finance-mois__colonne {
  display: grid;
  justify-items: center;
  gap: 6px;
  font-size: 11.5px;
  color: var(--texte-3);
}
.finance-mois__colonne--courant {
  color: var(--texte);
  font-weight: 700;
}
.finance-mois__barres {
  display: flex;
  align-items: flex-end;
  justify-content: center;
  gap: 3px;
  height: 72px;
  width: 100%;
}
.finance-mois__barres i {
  width: 9px;
  min-height: 2px;
  height: calc(var(--h) * 100%);
  border-radius: 4px;
  transform-origin: bottom;
  animation: monte-barre 0.8s var(--ressort) calc(var(--i) * 60ms) backwards;
}
.finance-mois__barres .revenus {
  background: color-mix(in srgb, var(--hausse) 85%, transparent);
}
.finance-mois__barres .depenses {
  background: color-mix(in srgb, var(--baisse) 85%, transparent);
}
@keyframes monte-barre {
  from {
    transform: scaleY(0);
  }
}
.finance-categories {
  display: grid;
  gap: 9px;
}
.finance-categorie {
  display: grid;
  grid-template-columns: 104px 1fr auto;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  color: var(--texte-2);
}
.finance-categorie > span:first-child {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.finance-categorie .montant {
  font-weight: 650;
  color: var(--texte);
}
.finance-categorie__barre {
  height: 8px;
  border-radius: 99px;
  background: var(--surface-2);
  overflow: hidden;
}
.finance-categorie__barre i {
  display: block;
  height: 100%;
  width: calc(var(--part) * 100%);
  border-radius: inherit;
  background: var(--c);
  transform-origin: left;
  animation: etire 0.9s var(--ressort) backwards;
}
.finance-capacite {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  margin: 0;
  font-size: 13px;
  color: var(--texte-2);
}
.finance-capacite svg {
  width: 16px;
  height: 16px;
  color: var(--couleur);
}
.finance-vide-petit {
  padding: 16px;
}
.finance-vide-petit p {
  margin: 0;
  font-size: 14px;
  color: var(--texte-2);
}

/* Opérations */
.finance-operations {
  display: grid;
  padding: 4px 14px;
}
.finance-operation {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 11px 0;
  text-align: left;
  color: inherit;
}
.finance-operation + .finance-operation {
  border-top: 1px solid var(--bord);
}
.finance-operation__point {
  flex: none;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--c);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--c) 18%, transparent);
}
.finance-operation__texte {
  display: grid;
  gap: 1px;
  flex: 1;
  min-width: 0;
  font-size: 14px;
}
.finance-operation__texte span,
.finance-operation__texte small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.finance-operation__texte small {
  font-size: 12px;
  color: var(--texte-3);
}
.finance-operation > .montant {
  font-weight: 650;
  white-space: nowrap;
}

/* Questions à l'agent et puces */
.finance-questions {
  display: grid;
  gap: 10px;
}
.finance-puces {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.finance-puce {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 8px 13px;
  border-radius: 99px;
  font-size: 13.5px;
  color: var(--texte-2);
  background: var(--surface);
  border: 1px solid var(--bord);
  transition:
    border-color 0.25s,
    color 0.25s,
    background 0.25s,
    transform 0.25s var(--ressort);
}
.finance-puce:active {
  transform: scale(0.95);
}
.finance-puce:hover,
.finance-puce[aria-pressed="true"] {
  color: var(--texte);
  border-color: color-mix(in srgb, var(--couleur) 55%, transparent);
  background: color-mix(in srgb, var(--couleur) 12%, var(--surface));
}
.finance-puce--categorie i {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--c);
}
.finance-puce--categorie[aria-pressed="true"] {
  border-color: var(--c);
  background: color-mix(in srgb, var(--c) 16%, var(--surface));
}
.finance-grille-categories {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

/* Accueil vide */
.finance-accueil {
  display: grid;
  gap: 10px;
}
.finance-bienvenue {
  display: grid;
  justify-items: center;
  gap: 8px;
  padding: 24px 20px;
  text-align: center;
  background:
    radial-gradient(100% 90% at 50% 0%, color-mix(in srgb, var(--couleur) 24%, transparent), transparent 70%),
    var(--surface);
  animation: apparition 0.5s var(--doux) backwards;
}
.finance-bienvenue__icone {
  display: grid;
  place-items: center;
  width: 58px;
  height: 58px;
  border-radius: 50%;
  color: #261a00;
  background: linear-gradient(135deg, color-mix(in srgb, var(--couleur) 70%, #fff), var(--couleur));
  box-shadow: 0 12px 34px color-mix(in srgb, var(--couleur) 40%, transparent);
}
.finance-bienvenue__icone svg {
  width: 28px;
  height: 28px;
}
.finance-bienvenue h2 {
  margin: 4px 0 0;
  font-size: 21px;
  letter-spacing: -0.02em;
}
.finance-bienvenue p {
  margin: 0;
  font-size: 14.5px;
  color: var(--texte-2);
}
.finance-bienvenue__note {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin: 2px 0 0;
  font-size: 12.5px !important;
  color: var(--texte-3) !important;
}
.finance-bienvenue__note svg {
  flex: none;
  width: 15px;
  height: 15px;
}
.finance-depart {
  display: flex;
  align-items: center;
  gap: 14px;
  width: 100%;
  padding: 16px;
  text-align: left;
  color: inherit;
  transition:
    transform 0.3s var(--ressort),
    border-color 0.3s;
  animation: apparition 0.5s var(--doux) backwards;
}
.finance-depart:nth-child(3) {
  animation-delay: 60ms;
}
.finance-depart:nth-child(4) {
  animation-delay: 120ms;
}
.finance-depart:nth-child(5) {
  animation-delay: 180ms;
}
.finance-depart:active {
  transform: scale(0.98);
}
.finance-depart:hover {
  border-color: color-mix(in srgb, var(--couleur) 45%, var(--bord));
}
.finance-depart > svg {
  flex: none;
  width: 18px;
  height: 18px;
  color: var(--texte-3);
  transform: rotate(-90deg);
}
.finance-depart__icone {
  display: grid;
  place-items: center;
  flex: none;
  width: 44px;
  height: 44px;
  border-radius: 14px;
  color: var(--couleur);
  background: color-mix(in srgb, var(--couleur) 15%, transparent);
}
.finance-depart__texte {
  display: grid;
  gap: 2px;
  flex: 1;
  min-width: 0;
}
.finance-depart__texte > span {
  font-size: 13px;
  color: var(--texte-2);
}
.finance-depart__marques {
  display: flex;
  gap: 4px;
  margin-top: 4px;
}

/* Formulaires des feuilles */
.finance-champ {
  display: grid;
  gap: 6px;
}
.finance-champ > span {
  font-size: 13px;
  font-weight: 650;
  color: var(--texte-2);
}
.finance-champ > small {
  font-size: 12px;
  color: var(--texte-3);
}
.finance-nouveau-compte {
  display: grid;
  gap: 12px;
}
.finance-texte {
  margin: 0;
  font-size: 14.5px;
  color: var(--texte-2);
}
.finance-etapes {
  display: grid;
  gap: 10px;
  margin: 0;
  padding-left: 22px;
  font-size: 14px;
  color: var(--texte-2);
}
.finance-etapes b {
  color: var(--texte);
}
.finance-etapes code,
.finance-texte code {
  padding: 1px 6px;
  border-radius: 6px;
  font-size: 12.5px;
  word-break: break-all;
  color: var(--texte);
  background: var(--surface-2);
}
.finance-depot {
  position: relative;
  display: grid;
  justify-items: center;
  gap: 6px;
  padding: 20px 16px;
  border-radius: 18px;
  text-align: center;
  border: 1.5px dashed color-mix(in srgb, var(--couleur) 45%, var(--bord));
  background: color-mix(in srgb, var(--couleur) 6%, transparent);
  cursor: pointer;
  transition:
    border-color 0.25s,
    background 0.25s;
}
.finance-depot svg {
  width: 26px;
  height: 26px;
  color: var(--couleur);
}
.finance-depot span {
  font-size: 12px;
  color: var(--texte-3);
}
.finance-depot--plein {
  border-style: solid;
  background: color-mix(in srgb, var(--couleur) 12%, transparent);
}
.finance-fichier {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
}
.finance-detail {
  display: flex;
  align-items: center;
  gap: 12px;
}
.finance-detail > div {
  display: grid;
  gap: 2px;
  min-width: 0;
}
.finance-detail > div span {
  font-size: 13px;
  color: var(--texte-3);
}
.finance-detail__solde {
  margin-left: auto;
  font-size: 19px;
  font-weight: 750;
  white-space: nowrap;
}
.finance-detail__ligne {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 6px 12px;
  padding: 12px;
  border-radius: 14px;
  font-size: 14px;
  color: var(--texte-2);
  background: var(--surface-2);
}
.finance-detail__ligne .montant {
  font-weight: 650;
  text-align: right;
}
.finance-positions {
  display: grid;
  gap: 2px;
}
.finance-position {
  display: grid;
  grid-template-columns: 1fr auto auto;
  align-items: center;
  gap: 10px;
  padding: 8px 0;
  font-size: 13.5px;
  border-bottom: 1px solid var(--bord);
}
.finance-position > span:first-child {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.finance-position small {
  font-size: 12px;
  min-width: 60px;
  text-align: right;
}
.finance-retirer {
  color: var(--critique);
}
.finance-choix-comptes {
  display: grid;
  gap: 2px;
  max-height: 220px;
  overflow-y: auto;
}
.finance-coche {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 2px;
  font-size: 14px;
  color: var(--texte-2);
}
.finance-coche input {
  width: 18px;
  height: 18px;
  accent-color: var(--couleur);
}
.finance-coche span {
  flex: 1;
}
.finance-apercu {
  padding: 12px 14px;
  border-radius: 14px;
  font-size: 14px;
  color: var(--texte-2);
  background: color-mix(in srgb, var(--couleur) 12%, transparent);
}
.finance-apercu b {
  color: var(--texte);
}
.finance-connexions {
  display: grid;
  gap: 2px;
}

/* ---------- Atelier : créer un nouvel univers ---------- */

.panneau-atelier {
  background:
    radial-gradient(110% 60% at 50% 0%, color-mix(in srgb, var(--couleur) 26%, transparent), transparent 70%),
    radial-gradient(70% 50% at 100% 100%, color-mix(in srgb, #e87ba4 10%, transparent), transparent 70%);
}
.atelier {
  display: grid;
  gap: 12px;
}
.atelier-hero {
  display: grid;
  justify-items: center;
  gap: 10px;
  padding: 24px 18px 18px;
  text-align: center;
  border-color: color-mix(in srgb, var(--couleur) 35%, var(--bord));
  background:
    radial-gradient(100% 90% at 50% 0%, color-mix(in srgb, var(--couleur) 26%, transparent), transparent 70%),
    var(--surface);
  box-shadow: 0 18px 50px color-mix(in srgb, var(--couleur) 18%, transparent);
  animation: apparition 0.5s var(--doux) backwards;
}
.atelier-hero h2 {
  margin: 4px 0 0;
  font-size: 22px;
  letter-spacing: -0.02em;
}
.atelier-hero p {
  margin: 0 0 4px;
  font-size: 14.5px;
  color: var(--texte-2);
}
.atelier-hero__icone {
  position: relative;
  display: grid;
  place-items: center;
  width: 60px;
  height: 60px;
  border-radius: 20px;
  color: #fff;
  background: linear-gradient(135deg, color-mix(in srgb, var(--couleur) 70%, #fff), var(--couleur) 55%, #e87ba4);
  box-shadow: 0 12px 34px color-mix(in srgb, var(--couleur) 45%, transparent);
  animation: flotte 5s ease-in-out infinite;
}
.atelier-hero__icone svg {
  width: 30px;
  height: 30px;
}
/* Trois étincelles qui scintillent autour de l'icône. */
.atelier-hero__icone i {
  position: absolute;
  width: 7px;
  height: 7px;
  border-radius: 2px;
  background: color-mix(in srgb, var(--couleur) 55%, #fff);
  transform: rotate(45deg);
  animation: scintille 2.6s ease-in-out infinite;
}
.atelier-hero__icone i:nth-of-type(1) {
  top: -8px;
  right: -6px;
}
.atelier-hero__icone i:nth-of-type(2) {
  bottom: 2px;
  left: -12px;
  width: 5px;
  height: 5px;
  animation-delay: 0.9s;
}
.atelier-hero__icone i:nth-of-type(3) {
  top: 12px;
  right: -16px;
  width: 4px;
  height: 4px;
  animation-delay: 1.7s;
}
@keyframes flotte {
  50% {
    transform: translateY(-4px);
  }
}
@keyframes scintille {
  0%,
  100% {
    opacity: 0.2;
    transform: rotate(45deg) scale(0.6);
  }
  50% {
    opacity: 1;
    transform: rotate(45deg) scale(1.15);
  }
}
.atelier-champ {
  width: 100%;
  min-height: 92px;
  padding: 14px 16px;
  border-radius: 18px;
  font: inherit;
  font-size: 15.5px;
  line-height: 1.45;
  resize: none;
  color: var(--texte);
  background: var(--surface-2);
  border: 1px solid var(--bord);
  transition:
    border-color 0.25s,
    box-shadow 0.25s;
}
.atelier-champ:focus {
  outline: none;
  border-color: color-mix(in srgb, var(--couleur) 60%, transparent);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--couleur) 18%, transparent);
}
.atelier-champ::placeholder {
  color: var(--texte-3);
}
.atelier-creer {
  background: linear-gradient(135deg, color-mix(in srgb, var(--couleur) 85%, #fff), var(--couleur) 60%, color-mix(in srgb, #e87ba4 70%, var(--couleur)));
  border-color: transparent;
  color: #fff;
}
.atelier-creer:disabled {
  opacity: 0.45;
}

.atelier-idees {
  display: grid;
  grid-auto-flow: column;
  grid-template-rows: repeat(2, auto);
  grid-auto-columns: 74%;
  gap: 8px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
  overscroll-behavior-x: contain;
  margin: 0 -18px;
  padding: 2px 18px 6px;
}
.atelier-idees::-webkit-scrollbar {
  display: none;
}
.atelier-idee {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px;
  border-radius: 16px;
  scroll-snap-align: start;
  text-align: left;
  font-size: 13.5px;
  line-height: 1.35;
  color: var(--texte-2);
  background: var(--surface);
  border: 1px solid var(--bord);
  transition:
    border-color 0.25s,
    transform 0.25s var(--ressort);
}
.atelier-idee:hover {
  color: var(--texte);
  border-color: color-mix(in srgb, var(--c) 50%, transparent);
}
.atelier-idee:active {
  transform: scale(0.97);
}
.atelier-idee__icone {
  display: grid;
  place-items: center;
  flex: none;
  width: 34px;
  height: 34px;
  border-radius: 11px;
  color: var(--c);
  background: color-mix(in srgb, var(--c) 15%, transparent);
}
.atelier-idee__icone svg {
  width: 18px;
  height: 18px;
}

.atelier-attente {
  display: grid;
  gap: 8px;
}
.atelier-attente:empty {
  display: none;
}
.atelier-proposition {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px;
  color: inherit;
  text-decoration: none;
  border-color: color-mix(in srgb, var(--alerte) 45%, var(--bord));
  background: color-mix(in srgb, var(--alerte) 7%, var(--surface));
  animation: apparition 0.45s var(--doux) backwards;
}
.atelier-proposition__icone {
  display: grid;
  place-items: center;
  flex: none;
  width: 40px;
  height: 40px;
  border-radius: 13px;
  color: var(--c);
  background: color-mix(in srgb, var(--c) 16%, transparent);
}
.atelier-proposition__texte {
  display: grid;
  gap: 2px;
  flex: 1;
  min-width: 0;
}
.atelier-proposition__texte span {
  font-size: 12.5px;
  color: var(--texte-3);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.atelier-proposition__action {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  flex: none;
  font-size: 13px;
  font-weight: 700;
  color: color-mix(in srgb, var(--alerte), #000 var(--assombrir));
}
.atelier-proposition__action svg {
  width: 16px;
  height: 16px;
  transform: rotate(-90deg);
}

.atelier-etapes {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: etape;
}
.atelier-etape {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 2px 12px;
  align-items: center;
  padding: 12px 14px;
  animation: apparition 0.45s var(--doux) calc(var(--n) * 80ms) backwards;
}
.atelier-etape__icone {
  grid-row: span 2;
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 12px;
  color: var(--couleur);
  background: color-mix(in srgb, var(--couleur) 15%, transparent);
}
.atelier-etape__icone svg {
  width: 19px;
  height: 19px;
}
.atelier-etape strong {
  font-size: 14.5px;
}
.atelier-etape > span:last-child {
  font-size: 13px;
  color: var(--texte-3);
}

.atelier-univers {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}
.atelier-tuile {
  position: relative;
  display: grid;
  justify-items: center;
  gap: 8px;
  padding: 14px 6px 12px;
  text-align: center;
  color: inherit;
  font-size: 13px;
  transition: transform 0.3s var(--ressort);
  animation: apparition 0.45s var(--doux) calc(var(--i) * 50ms) backwards;
}
.atelier-tuile:active {
  transform: scale(0.95);
}
.atelier-tuile strong {
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.atelier-tuile__badge {
  position: absolute;
  top: 6px;
  right: 6px;
  padding: 2px 6px;
  border-radius: 99px;
  font-size: 11px;
  font-weight: 700;
  color: #fff;
  background: color-mix(in srgb, var(--couleur) 70%, #000);
}

@media (prefers-reduced-motion: reduce) {
  .finance-courbe__ligne {
    stroke-dashoffset: 0;
    animation: none;
  }
  .finance-courbe__aire {
    animation: none;
  }
  .atelier-hero__icone,
  .atelier-hero__icone i {
    animation: none;
  }
}

/* Mode économie (batterie faible) : les animations décoratives s'arrêtent. */
:root[data-economie] .aurore i,
:root[data-economie] .foot-hero__photo,
:root[data-economie] .finance-courbe__point,
:root[data-economie] .atelier-hero__icone,
:root[data-economie] .atelier-hero__icone i,
:root[data-economie] .pastille-hors-ligne::before {
  animation: none;
}

/* ---------- Appairage du téléphone ---------- */

.appairage {
  display: grid;
  justify-items: center;
  gap: 10px;
  padding-top: 6px;
}
.appairage[hidden] {
  display: none;
}
.appairage__qr {
  width: min(240px, 70vw);
  aspect-ratio: 1;
  padding: 10px;
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.25);
}
.appairage p {
  margin: 0;
  text-align: center;
}

/* ---------- Teinte de l'univers affiché ---------- */

body.mode-univers .compositeur {
  border-color: color-mix(in srgb, var(--teinte-univers, var(--accent)) 30%, var(--bord));
  transition:
    border-color 0.5s var(--doux),
    box-shadow 0.5s var(--doux);
}
body.mode-univers .compositeur:focus-within {
  border-color: color-mix(in srgb, var(--teinte-univers, var(--accent)) 60%, var(--bord));
  box-shadow:
    var(--ombre),
    0 0 0 4px color-mix(in srgb, var(--teinte-univers, var(--accent)) 16%, transparent),
    inset 0 1px 0 var(--reflet-haut);
}
body.mode-univers .nav__indicateur {
  background: color-mix(in srgb, var(--teinte-univers, var(--accent)) 22%, var(--surface-3));
  transition:
    transform 0.5s var(--ressort),
    width 0.5s var(--ressort),
    background 0.5s var(--doux);
}
/* La sphère d'accueil, plus compacte : le tableau de bord du jour suit juste en dessous. */
.panneau-univers .scene {
  height: 210px;
  margin-top: 0;
}
.panneau-univers .scene canvas {
  width: 220px;
  height: 220px;
}
.suggestions-hote:empty,
.accroche-hote:empty {
  display: none;
}
.suggestions-hote .accroche {
  display: grid;
  gap: 10px;
  margin-top: 4px;
}

/* ---------- Ta journée (vitrine du fil principal) ---------- */

.jour {
  display: grid;
  gap: 10px;
  margin-bottom: 8px;
}
.jour[hidden] {
  display: none;
}
.jour__entete {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 10px;
  margin: 2px 2px 0;
}
.jour__entete h2 {
  margin: 0;
  font-size: 20px;
  letter-spacing: -0.02em;
}
.jour__entete span {
  font-size: 13px;
  color: var(--texte-3);
}
.jour__entete div span {
  display: block;
}
.jour__entete div span::first-letter {
  text-transform: uppercase;
}
.jour-budget {
  display: inline-flex;
  align-items: center;
  min-height: 38px;
  gap: 7px;
  padding: 5px 10px;
  border-radius: 99px;
  font-size: 12px;
  font-weight: 650;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  color: var(--texte-2);
  text-decoration: none;
  background: var(--surface);
  border: 1px solid var(--bord);
}
.jour-budget i {
  position: relative;
  width: 26px;
  height: 5px;
  border-radius: 99px;
  overflow: hidden;
  background: var(--surface-3);
}
.jour-budget i::after {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: calc(var(--part) * 100%);
  border-radius: inherit;
  background: var(--bon);
}
.jour-budget--alerte i::after {
  background: var(--alerte);
}

.jour-grille {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}
.jour-carte {
  position: relative;
  display: grid;
  align-content: start;
  gap: 4px;
  min-height: 118px;
  padding: 14px;
  overflow: hidden;
  text-align: left;
  color: inherit;
  text-decoration: none;
  isolation: isolate;
  border-color: color-mix(in srgb, var(--c) 28%, var(--bord));
  background:
    radial-gradient(120% 100% at 100% 0%, color-mix(in srgb, var(--c) 20%, transparent), transparent 65%),
    var(--surface);
  transition:
    transform 0.3s var(--ressort),
    border-color 0.3s;
  animation: apparition 0.45s var(--doux) backwards;
}
.jour-grille .jour-carte:nth-child(2) {
  animation-delay: 60ms;
}
.jour-grille .jour-carte:nth-child(3) {
  animation-delay: 120ms;
}
.jour-carte:active {
  transform: scale(0.97);
}
.jour-carte--large {
  grid-column: 1 / -1;
  min-height: 0;
}
.jour-carte__haut {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 4px;
}
.jour-carte__etiquette {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: color-mix(in srgb, var(--c) 75%, var(--texte));
}
.jour-carte__etiquette svg {
  width: 15px;
  height: 15px;
}
.jour-carte__titre {
  font-size: 16px;
  line-height: 1.25;
}
.jour-carte__detail {
  font-size: 13px;
  color: var(--texte-2);
}
.jour-carte__bas {
  margin-top: 4px;
  font-size: 12px;
  color: var(--texte-3);
}
.jour-carte__montant {
  font-size: 28px;
  font-weight: 800;
  letter-spacing: -0.03em;
  font-variant-numeric: tabular-nums;
}
.jour-carte--vide {
  border-style: dashed;
  background: transparent;
}
.jour-carte--vide .jour-carte__titre {
  color: color-mix(in srgb, var(--c) 70%, var(--texte));
}
.jour-carte--alerte {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 0;
  padding: 12px 14px;
  background: color-mix(in srgb, var(--alerte) 9%, var(--surface));
  border-color: color-mix(in srgb, var(--alerte) 45%, var(--bord));
}
.jour-carte--alerte > svg {
  flex: none;
  width: 18px;
  height: 18px;
  color: var(--texte-3);
  transform: rotate(-90deg);
}
.jour-carte__icone {
  display: grid;
  place-items: center;
  flex: none;
  width: 38px;
  height: 38px;
  border-radius: 12px;
  color: var(--alerte);
  background: color-mix(in srgb, var(--alerte) 16%, transparent);
}
.jour-carte__texte {
  display: grid;
  gap: 1px;
  flex: 1;
  min-width: 0;
}
.jour-carte__texte span {
  font-size: 12.5px;
  color: var(--texte-3);
}
.jour-carte--discret .montant {
  filter: blur(7px);
}
.jour-anneau-boite {
  position: relative;
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
}
.jour-anneau-boite b {
  position: absolute;
  font-size: 10.5px;
}
.jour-anneau {
  width: 40px;
  height: 40px;
  transform: rotate(-90deg);
}
.jour-anneau circle {
  fill: none;
  stroke-width: 5;
}
.jour-anneau .piste {
  stroke: color-mix(in srgb, var(--c) 20%, transparent);
}
.jour-anneau .plein {
  stroke: var(--c);
  stroke-linecap: round;
  animation: remplit 1.1s var(--doux) backwards;
}
.jour-ecusson {
  width: 34px;
  height: 34px;
  object-fit: contain;
  filter: drop-shadow(0 2px 6px rgba(0, 0, 0, 0.35));
}
.jour-variation {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 12px;
  font-weight: 650;
}
.jour-variation svg {
  width: 13px;
  height: 13px;
}
.jour-variation--hausse {
  color: var(--hausse);
}
.jour-variation--baisse {
  color: var(--baisse);
}
.jour-variation--baisse svg {
  transform: scaleY(-1);
}
.jour-objectif {
  display: grid;
  gap: 6px;
  margin-top: 6px;
  font-size: 13px;
  color: var(--texte-2);
}
.jour-objectif b {
  color: var(--texte);
}
.jour-objectif__barre {
  height: 6px;
  border-radius: 99px;
  overflow: hidden;
  background: color-mix(in srgb, var(--c) 18%, transparent);
}
.jour-objectif__barre i {
  display: block;
  height: 100%;
  width: calc(var(--part) * 100%);
  border-radius: inherit;
  background: var(--c);
  transform-origin: left;
  animation: etire 0.9s var(--ressort) backwards;
}

.jour-programme {
  padding: 14px 14px 6px;
  animation: apparition 0.45s var(--doux) 160ms backwards;
}
.jour-programme h3 {
  margin: 0 0 6px;
  font-size: 13px;
  font-weight: 700;
  color: var(--texte-2);
}
.jour-programme ol {
  margin: 0;
  padding: 0;
  list-style: none;
}
.jour-routine {
  position: relative;
  display: grid;
  grid-template-columns: 42px 28px 1fr auto;
  align-items: center;
  gap: 10px;
  min-height: 48px;
  padding: 6px 0;
  cursor: pointer;
}
.jour-routine + .jour-routine::before {
  /* Trait vertical qui relie les routines de la journée. */
  content: "";
  position: absolute;
  left: 65px;
  top: -10px;
  height: 20px;
  width: 2px;
  border-radius: 2px;
  background: var(--bord);
}
.jour-routine__heure {
  font-size: 13px;
  font-weight: 650;
  font-variant-numeric: tabular-nums;
  color: var(--texte-3);
}
.jour-routine__point {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  color: var(--c);
  background: color-mix(in srgb, var(--c) 16%, transparent);
}
.jour-routine__point svg {
  width: 15px;
  height: 15px;
}
.jour-routine--faite .jour-routine__point {
  color: #fff;
  background: var(--c);
}
.jour-routine__texte {
  display: grid;
  min-width: 0;
}
.jour-routine__texte strong {
  font-size: 14px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.jour-routine__texte span {
  font-size: 12px;
  color: var(--texte-3);
}
.jour-routine__statut {
  padding: 3px 8px;
  border-radius: 99px;
  font-size: 11.5px;
  font-weight: 650;
  color: var(--texte-3);
  background: var(--surface-2);
}
.jour-routine--faite .jour-routine__statut {
  color: color-mix(in srgb, var(--c), #000 var(--assombrir));
  background: color-mix(in srgb, var(--c) 14%, transparent);
}
.jour-routine--imminente .jour-routine__statut {
  color: color-mix(in srgb, var(--alerte), #000 var(--assombrir));
  background: color-mix(in srgb, var(--alerte) 14%, transparent);
}

/* ---------- Premier lancement ---------- */

.bienvenue {
  position: fixed;
  inset: 0;
  z-index: 90;
  display: grid;
  grid-template-rows: 1fr auto;
  background:
    radial-gradient(90% 55% at 50% 0%, rgba(124, 104, 255, 0.28), transparent 70%),
    radial-gradient(70% 50% at 100% 100%, rgba(46, 210, 170, 0.14), transparent 70%),
    var(--fond, #07080c);
  animation: fondu 0.4s var(--doux) both;
}
.bienvenue--sortie {
  animation: fondu-sortie 0.35s var(--doux) both;
}
.bienvenue__piste {
  display: flex;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
  overscroll-behavior: contain;
}
.bienvenue__piste::-webkit-scrollbar {
  display: none;
}
.bienvenue__ecran {
  flex: 0 0 100%;
  display: grid;
  align-content: center;
  justify-items: center;
  gap: 14px;
  padding: calc(24px + env(safe-area-inset-top)) 28px 12px;
  text-align: center;
  scroll-snap-align: start;
  scroll-snap-stop: always;
}
.bienvenue__ecran h1 {
  margin: 8px 0 0;
  font-size: 28px;
  line-height: 1.15;
  letter-spacing: -0.03em;
}
.bienvenue__ecran > p {
  max-width: 340px;
  margin: 0;
  font-size: 16px;
  line-height: 1.5;
  color: var(--texte-2);
}
.bienvenue__orbe {
  width: 230px;
  height: 230px;
}
.bienvenue__grand-icone {
  display: grid;
  place-items: center;
  width: 84px;
  height: 84px;
  border-radius: 28px;
  color: var(--c);
  background: color-mix(in srgb, var(--c) 14%, transparent);
  box-shadow: 0 18px 50px color-mix(in srgb, var(--c) 25%, transparent);
  animation: flotte 5s ease-in-out infinite;
}
.bienvenue__grand-icone svg {
  width: 40px;
  height: 40px;
}
.bienvenue__univers {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  max-width: 320px;
}
.bienvenue__puce {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 8px 13px 8px 9px;
  border-radius: 14px;
  font-size: 14px;
  font-weight: 650;
  color: var(--texte);
  background: color-mix(in srgb, var(--c) 14%, var(--surface));
  border: 1px solid color-mix(in srgb, var(--c) 40%, transparent);
  animation: monte-puce 0.6s var(--ressort) calc(0.15s + var(--i) * 90ms) backwards;
}
.bienvenue__puce svg {
  width: 17px;
  height: 17px;
  color: var(--c);
}
@keyframes monte-puce {
  from {
    opacity: 0;
    transform: translateY(14px) scale(0.92);
  }
}
.bienvenue__geste {
  position: relative;
  width: 120px;
  height: 34px;
  color: var(--texte-3);
}
.bienvenue__geste i {
  /* Un doigt qui glisse vers la gauche, en boucle. */
  position: absolute;
  top: 6px;
  right: 10px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: color-mix(in srgb, var(--texte) 70%, transparent);
  animation: glisse 1.8s var(--doux) infinite;
}
.bienvenue__geste svg {
  position: absolute;
  top: 6px;
  left: 6px;
  width: 22px;
  height: 22px;
}
@keyframes glisse {
  0% {
    transform: translateX(0);
    opacity: 0;
  }
  15% {
    opacity: 1;
  }
  70% {
    transform: translateX(-70px);
    opacity: 1;
  }
  100% {
    transform: translateX(-70px);
    opacity: 0;
  }
}
.bienvenue__etat {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  max-width: 340px;
  margin: 4px 0 0;
  font-size: 14px;
  color: var(--texte-3);
}
.bienvenue__etat svg {
  width: 18px;
  height: 18px;
}
.bienvenue__etat--bon {
  font-weight: 650;
  color: var(--bon);
}
.bienvenue__actions {
  display: grid;
  justify-items: center;
  gap: 8px;
}
.bienvenue__ou {
  font-size: 13px;
  color: var(--texte-3);
}
.bienvenue__ecran .bouton--plein {
  max-width: 320px;
}
.bienvenue__bas {
  display: grid;
  gap: 16px;
  padding: 12px 24px calc(22px + env(safe-area-inset-bottom));
}
.bienvenue__points {
  display: flex;
  justify-content: center;
  gap: 7px;
}
.bienvenue__points i {
  width: 7px;
  height: 7px;
  border-radius: 99px;
  background: var(--surface-3);
  transition:
    width 0.35s var(--ressort),
    background 0.35s;
}
.bienvenue__points i.actif {
  width: 24px;
  background: var(--texte);
}
.bienvenue__boutons {
  display: flex;
  justify-content: space-between;
  gap: 10px;
}
.bienvenue__boutons .bouton--principal {
  margin-left: auto;
}
.bienvenue__suivant--fleche svg {
  transform: rotate(-90deg);
}
:root[data-economie] .bienvenue__grand-icone,
:root[data-economie] .bienvenue__geste i {
  animation: none;
}

/* ---------- Mode démo : ce qui demande le serveur ---------- */

.serveur-requis {
  display: grid;
  justify-items: center;
  gap: 8px;
  padding: 22px 18px;
  text-align: center;
}
.serveur-requis p {
  margin: 0;
  max-width: 300px;
  font-size: 14px;
  color: var(--texte-2);
}
.serveur-requis__icone {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  border-radius: 15px;
  color: var(--couleur, var(--accent));
  background: color-mix(in srgb, var(--couleur, var(--accent)) 15%, transparent);
}
.serveur-requis__icone svg {
  width: 22px;
  height: 22px;
}
.serveur-requis .bouton {
  margin-top: 6px;
}
a.pastille-demo {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  text-decoration: none;
}

/* ---------- Univers créés : vitrine par défaut (generique.js) ---------- */

.vg {
  display: grid;
  gap: 12px;
}
/* Texte coloré lisible dans les deux thèmes. */
.vg-hero,
.vg-indicateur,
.vg-saisie,
.vg-graphique,
.vg-programme {
  --c-texte: color-mix(in srgb, var(--c), #000 var(--assombrir));
}
.vg-hero {
  display: grid;
  gap: 14px;
  padding: 18px;
  overflow: hidden;
  border-color: color-mix(in srgb, var(--c) 35%, var(--bord));
  background:
    radial-gradient(120% 100% at 100% 0%, color-mix(in srgb, var(--c) 28%, transparent), transparent 62%),
    radial-gradient(90% 80% at 0% 100%, color-mix(in srgb, var(--c) 10%, transparent), transparent 70%),
    var(--surface);
  box-shadow: 0 18px 50px color-mix(in srgb, var(--c) 16%, transparent);
  animation: apparition 0.5s var(--doux) backwards;
}
.vg-hero__haut {
  display: flex;
  align-items: center;
  gap: 14px;
}
.vg-hero__icone {
  flex: none;
  display: grid;
  place-items: center;
  width: 54px;
  height: 54px;
  border-radius: 18px;
  color: #fff;
  background: linear-gradient(135deg, color-mix(in srgb, var(--c) 65%, #fff), var(--c) 60%, color-mix(in srgb, var(--c), #000 25%));
  box-shadow: 0 10px 28px color-mix(in srgb, var(--c) 40%, transparent);
}
.vg-hero__icone svg {
  width: 28px;
  height: 28px;
}
.vg-hero h2 {
  margin: 0;
  font-size: 21px;
  letter-spacing: -0.02em;
}
.vg-hero p {
  margin: 2px 0 0;
  font-size: 14px;
  line-height: 1.4;
  color: var(--texte-2);
}
.vg-objectif {
  display: grid;
  gap: 8px;
  padding: 12px 14px;
  border-radius: 16px;
  background: color-mix(in srgb, var(--c) 9%, var(--surface-2));
}
.vg-objectif__titre {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  font-weight: 650;
}
.vg-objectif__titre svg {
  flex: none;
  width: 18px;
  height: 18px;
  color: var(--c-texte);
}
.vg-objectif__barre,
.vg-cible {
  display: block;
  height: 6px;
  border-radius: 99px;
  overflow: hidden;
  background: color-mix(in srgb, var(--c) 14%, var(--surface-2));
}
.vg-objectif__barre i,
.vg-cible i {
  display: block;
  height: 100%;
  width: calc(var(--part) * 100%);
  min-width: 6px;
  border-radius: inherit;
  background: linear-gradient(90deg, color-mix(in srgb, var(--c) 60%, #fff), var(--c));
  transform-origin: left;
  animation: remplit 0.9s var(--doux) 0.2s backwards;
}
@keyframes remplit {
  from {
    transform: scaleX(0);
  }
}
.vg-objectif__reste {
  font-size: 12px;
  color: var(--texte-3);
}

/* Indicateurs : deux colonnes */
.vg-indicateurs {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}
.vg-indicateur {
  display: grid;
  align-content: start;
  gap: 4px;
  min-height: 112px;
  padding: 14px;
  border-color: color-mix(in srgb, var(--c) 22%, var(--bord));
  background:
    radial-gradient(120% 100% at 100% 0%, color-mix(in srgb, var(--c) 14%, transparent), transparent 65%),
    var(--surface);
  animation: apparition 0.45s var(--doux) backwards;
}
.vg-indicateur:nth-child(2) {
  animation-delay: 50ms;
}
.vg-indicateur:nth-child(3) {
  animation-delay: 100ms;
}
.vg-indicateur:nth-child(4) {
  animation-delay: 150ms;
}
.vg-indicateur__titre {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: var(--c-texte);
}
.vg-indicateur__valeur {
  font-size: 27px;
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -0.03em;
  font-variant-numeric: tabular-nums;
}
.vg-indicateur__valeur small {
  font-size: 14px;
  font-weight: 650;
  letter-spacing: 0;
  color: var(--texte-2);
}
.vg-indicateur__valeur--vide {
  color: var(--texte-3);
}
.vg-indicateur__detail {
  font-size: 12px;
  color: var(--texte-3);
}
.vg-indicateur .vg-cible {
  margin-top: 4px;
}
.vg-ecart {
  justify-self: start;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 8px;
  border-radius: 99px;
  font-size: 12.5px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}
.vg-ecart svg {
  width: 14px;
  height: 14px;
}
.vg-ecart--bon {
  color: var(--hausse);
  background: color-mix(in srgb, var(--hausse) 13%, transparent);
}
.vg-ecart--mauvais {
  color: var(--baisse);
  background: color-mix(in srgb, var(--baisse) 13%, transparent);
}
.vg-ecart--descend svg {
  transform: scaleY(-1);
}

/* Saisies rapides */
.vg-saisies {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(96px, 1fr));
  gap: 8px;
}
.vg-saisie {
  display: grid;
  justify-items: center;
  align-content: center;
  gap: 8px;
  min-height: 88px;
  padding: 12px 8px;
  border: 1px solid color-mix(in srgb, var(--c) 30%, var(--bord));
  border-radius: 20px;
  font: inherit;
  font-size: 13.5px;
  font-weight: 650;
  line-height: 1.2;
  text-align: center;
  color: var(--texte);
  background: color-mix(in srgb, var(--c) 8%, var(--surface));
  cursor: pointer;
  transition:
    transform 0.3s var(--ressort),
    background 0.2s;
}
.vg-saisie:hover {
  background: color-mix(in srgb, var(--c) 14%, var(--surface));
}
.vg-saisie:active {
  transform: scale(0.95);
}
.vg-saisie__icone {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 14px;
  color: #fff;
  background: linear-gradient(135deg, color-mix(in srgb, var(--c) 70%, #fff), var(--c));
  box-shadow: 0 6px 18px color-mix(in srgb, var(--c) 35%, transparent);
}
.vg-saisie__icone svg {
  width: 21px;
  height: 21px;
}
.vg-texte {
  min-height: 110px;
  resize: vertical;
}

/* Graphique */
.vg-graphique {
  display: grid;
  gap: 8px;
  padding: 16px;
}
.vg-graphique__haut,
.vg-graphique__bas {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
}
.vg-graphique__haut span,
.vg-graphique__bas span {
  font-size: 12px;
  color: var(--texte-3);
}
.vg-graphique__bas b {
  font-size: 15px;
  color: var(--c-texte);
  font-variant-numeric: tabular-nums;
}
.vg-graphique__vide {
  margin: 0;
  padding: 18px 12px;
  border: 1px dashed var(--bord);
  border-radius: 14px;
  font-size: 13px;
  text-align: center;
  color: var(--texte-3);
}
.vg-courbe {
  display: block;
  width: 100%;
  height: auto;
  overflow: visible;
}
.vg-courbe stop {
  stop-color: var(--c);
}
.vg-courbe__aire {
  animation: fondu 0.9s var(--doux) 0.6s backwards;
}
.vg-courbe__ligne {
  stroke: var(--c);
  stroke-dasharray: 1;
  stroke-dashoffset: 1;
  animation: trace 1.3s var(--doux) 0.1s forwards;
}
.vg-courbe__point {
  fill: var(--c);
  opacity: 0.55;
}
.vg-courbe__dernier {
  fill: var(--c);
  stroke: var(--surface-opaque);
  stroke-width: 2.5;
  transform-box: fill-box;
  transform-origin: center;
  animation: pulse-point 2.4s var(--doux) 1.4s infinite;
}

/* Routines et dernières entrées */
.vg-programme,
.vg-liste {
  display: grid;
  gap: 10px;
  padding: 16px;
}
.vg-programme h3,
.vg-liste h3 {
  margin: 0;
  font-size: 15px;
}
.vg-programme ol {
  display: grid;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.vg-routine {
  display: flex;
  align-items: center;
  gap: 12px;
}
.vg-routine__heure {
  flex: none;
  min-width: 52px;
  padding: 5px 0;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 700;
  text-align: center;
  font-variant-numeric: tabular-nums;
  color: var(--c-texte);
  background: color-mix(in srgb, var(--c) 12%, transparent);
}
.vg-routine__texte {
  flex: 1;
  min-width: 0;
  display: grid;
  gap: 1px;
}
.vg-routine__texte strong {
  font-size: 14px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.vg-routine__texte span {
  font-size: 12px;
  color: var(--texte-3);
}
.vg-routine--faite .vg-routine__heure,
.vg-routine--faite .vg-routine__texte span {
  color: var(--hausse);
}
.vg-routine--faite .vg-routine__heure {
  background: color-mix(in srgb, var(--hausse) 12%, transparent);
}
.vg-entree {
  display: flex;
  align-items: baseline;
  gap: 12px;
  padding-top: 10px;
  border-top: 1px solid var(--bord);
}
.vg-liste h3 + .vg-entree {
  padding-top: 0;
  border-top: 0;
}
.vg-entree__date {
  flex: none;
  min-width: 52px;
  font-size: 12px;
  font-weight: 650;
  color: var(--texte-3);
}
.vg-entree__texte {
  min-width: 0;
  font-size: 14px;
  line-height: 1.4;
  overflow-wrap: anywhere;
}
.vg-questions {
  display: grid;
  gap: 8px;
}
.vg-fiche {
  justify-self: center;
}
.vg-fiche svg {
  transform: rotate(-90deg);
}
.vg-cible--depasse i {
  background: var(--baisse);
}
.vg-choix .finance-puce[aria-checked="true"] {
  color: var(--texte);
  font-weight: 650;
  border-color: color-mix(in srgb, var(--couleur) 70%, transparent);
  background: color-mix(in srgb, var(--couleur) 18%, var(--surface));
}
.vg-hero__haut {
  align-items: flex-start;
}
.vg-hero p {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
  line-clamp: 3;
  overflow: hidden;
}
.vg-routine__texte strong {
  white-space: normal;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  line-clamp: 2;
}

/* Flèche en fin de ligne d'une liste de choix (banques…) */
.coran-ligne > svg {
  flex: none;
  width: 18px;
  height: 18px;
  color: var(--texte-3);
  transform: rotate(-90deg);
}
.coran-ligne .marque--logo {
  width: 40px;
  height: 40px;
  border-radius: 12px;
}
