/* ==========================================================================
   LE PROFIL HOLOGÉNÉTIQUE — l'allure du schéma.

   ⚡ Les couleurs du schéma sont RELEVÉES, point par point, sur la vidéo de
   référence que donne Anna (19 oct. 2026) : elles ne suivent pas la marque
   rouge et noir du calculateur, exprès. Chaque teinte est écrite UNE fois,
   ici, en haut. La page de saisie (le formulaire) garde, elle, « marque.css ».
   ========================================================================== */
:root {
  /* Les sphères (teinte du milieu ; le relief vient de l'ombrage) */
  --h-rouge:  #c9443f;
  --h-bleu:   #5f92ee;
  --h-vert:   #6f9a6a;
  --h-marine: #4749b4;
  --h-gris:   #bcbcc1;
  /* Les liens */
  --h-lien-rouge: #a02a24;
  --h-lien-bleu:  #5386e2;
  --h-lien-vert:  #416d3e;
  /* Le fond, l'anneau, les textes */
  --h-fond:       #f3f3f6;
  --h-fleur:      #e2e2e6;
  --h-anneau:     #b9b9be;
  --h-glyphe:     #a8a8ad;
  --h-texte:      #1f1f22;
  --h-texte-doux: #4a4a50;
  --h-icone:      #8e8e93;
  /* Le bouton du menu */
  --h-bouton-a:   #5aa3c0;
  --h-bouton-b:   #8b72b8;
  --h-halo:       #a692d3;
}

html, body { margin: 0; background: #e9e9ed; }
body.holo { min-height: 100vh; }

/* ---- La scène : tout est mesuré sur sa largeur (1 cqw = 1/100 de largeur) --- */
#scene-boite { display: flex; justify-content: center; align-items: center; min-height: 100vh; }

.scene {
  container-type: inline-size;
  position: relative; overflow: hidden;
  width: min(100vw, calc(100vh * 1000 / 915));
  aspect-ratio: 1000 / 915;
  background: var(--h-fond);
  font-family: var(--police-texte);   /* ses polices : « polices.css » */
  color: var(--h-texte);
  user-select: none; -webkit-user-select: none;
}
@media (min-width: 900px) { .scene { border-radius: 22px; box-shadow: 0 2px 30px rgba(60,60,90,.14); } }
.scene svg.dessin { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }

/* L'en-tête */
.entete { position: absolute; top: 0; left: 0; right: 0; text-align: center; pointer-events: none;
  padding-bottom: 2.4cqw;   /* un voile du fond : rien ne passe sous le nom */
  background: linear-gradient(to bottom, var(--h-fond) 72%, rgba(243,243,246,0)); }
.entete h1 {
  margin: 3.2cqw 0 0; font-family: var(--police-grand-titre);
  font-weight: 400; font-size: 2.55cqw; line-height: 1.15; letter-spacing: -.01em; color: var(--h-texte);
  transition: opacity .25s;
}
.entete p { font-family: var(--police-sous-titre); margin: .35cqw 0 0; font-size: 1.2cqw; color: var(--h-texte-doux); }
.entete .change { opacity: 0; }

.rond {
  position: absolute; top: 2.3cqw; width: 4cqw; height: 4cqw; border-radius: 50%;
  border: 0; padding: 0; cursor: pointer; display: grid; place-items: center;
  background: linear-gradient(35deg, var(--h-bouton-a), var(--h-bouton-b));
  box-shadow: 0 .3cqw 1cqw rgba(110,110,170,.25);
}
.rond.gauche { left: 2.2cqw; }
.rond svg { width: 52%; height: 52%; }
.rond:focus-visible { outline: .25cqw solid var(--h-halo); outline-offset: .3cqw; }

/* Le dessin */
.noeud { cursor: default; }
.noeud text { font-family: var(--police-titre); pointer-events: none; }
.noeud text.num { font-weight: 600; }
.fond-fleur { fill: url(#h-fleur); }
.lien-visible { stroke-linecap: round; fill: none; }
.lien-touche { stroke: transparent; fill: none; stroke-width: 14; pointer-events: stroke; }
.etiquette { pointer-events: none; }
.etiquette text { fill: var(--h-texte); font-size: 12.5px;
  /* un liseré de la couleur du fond : les mots restent lisibles par-dessus les liens et l'anneau */
  paint-order: stroke; stroke: var(--h-fond); stroke-width: 4.5px; stroke-linejoin: round; }
.etiquette .fond-icone { fill: var(--h-fond); }
.etiquette .i { fill: none; stroke: var(--h-icone); stroke-width: 1.2; }
.etiquette .i-plein { fill: var(--h-icone); stroke: none; }
.etiquette .hexa { stroke: var(--h-icone); stroke-width: 1.5; fill: none; }

/* Les boutons du bas */
.bas {
  position: absolute; left: 0; right: 0; bottom: 0; height: 11cqw;
  display: grid; grid-template-columns: repeat(5, 1fr);
  background: linear-gradient(to bottom, rgba(243,243,246,0), rgba(243,243,246,.92) 38%);
}
.bas button {
  position: relative; border: 0; background: none; cursor: pointer; padding: 0;
  display: flex; flex-direction: column; align-items: center; justify-content: flex-start; gap: .5cqw;
  padding-top: 1.1cqw; color: var(--h-icone); font: inherit; font-family: var(--police-titre); font-size: 1.45cqw; font-weight: 600;
  -webkit-tap-highlight-color: transparent;
}
.bas button svg.mini { width: 4.6cqw; height: 4.6cqw; overflow: visible; }
.bas button .halo {
  position: absolute; top: 0; left: 50%; width: 7.2cqw; height: 7.2cqw; margin-left: -3.6cqw;
  border-radius: 50%; opacity: 0; transform: scale(.7);
  background: radial-gradient(closest-side, rgba(255,255,255,0) 68%, rgba(176,150,216,.55) 80%, rgba(130,160,230,.28) 92%, rgba(130,160,230,0) 100%);
  transition: opacity .35s ease, transform .45s cubic-bezier(.3,1.4,.5,1);
}
.bas button[aria-pressed="true"] .halo { opacity: 1; transform: scale(1); }
.bas button[aria-pressed="true"] { color: var(--h-texte-doux); }
.bas button:focus-visible .halo { opacity: 1; transform: scale(1); }
.bas .mini circle { fill: var(--h-icone); }
.bas .mini line { stroke: var(--h-icone); stroke-width: 1; }

/* Les petits mots à l'écran */
.scene .attente { position: absolute; inset: 0; display: grid; place-items: center; font-size: 2cqw; color: var(--h-texte-doux); }

/* ---- Le formulaire de saisie (la page avant le schéma) ---- */
#saisie { max-width: 560px; margin: 0 auto; padding: 28px 18px 60px; }
#saisie h1 { margin-bottom: 6px; }
@media (prefers-reduced-motion: reduce) {
  .bas button .halo { transition: none; }
}

/* ---- Les fiches sous le schéma : seulement sur un petit écran ----
   Sur un téléphone, les mots à côté des sphères seraient minuscules : le
   schéma garde ses sphères et ses liens, et les mots passent en dessous. */
.fiches { display: none; }
@media (max-width: 719px) {
  #scene-boite { flex-direction: column; justify-content: flex-start; align-items: stretch; min-height: 0; background: var(--h-fond); }
  .scene { width: 100vw; }
  .scene #etiquettes { display: none; }
  .entete h1 { font-size: 4.6cqw; margin-top: 4.5cqw; }
  .entete p { font-size: 2.9cqw; }
  .rond { width: 8cqw; height: 8cqw; top: 3cqw; left: 3cqw; }
  .bas { height: 16cqw; }
  .bas button { font-size: 3cqw; gap: .6cqw; padding-top: 1.5cqw; }
  .bas button svg.mini { width: 7cqw; height: 7cqw; }
  .bas button .halo { width: 10cqw; height: 10cqw; margin-left: -5cqw; }
  .fiches { display: grid; gap: 10px; padding: 14px 16px 40px; font-family: var(--police-texte); color: var(--h-texte); }
  .fiche { background: #fff; border-radius: 14px; padding: 12px 14px; display: grid; grid-template-columns: 42px 1fr; gap: 0 12px; align-items: center; box-shadow: 0 1px 6px rgba(60,60,90,.08); }
  .fiche .pastille { grid-row: 1 / 3; width: 42px; height: 42px; border-radius: 50%; display: grid; place-items: center; color: #fff; font-weight: 700; font-size: 13px; }
  .fiche b { font-size: 15px; font-family: var(--police-titre); }
  .fiche p { margin: 2px 0 0; font-size: 13.5px; color: var(--h-texte-doux); line-height: 1.45; }
}
