/* Happr : le style des illustrations de l'app (voir illustrations.js). Besoin de couleurs.css.
   Police : Nunito (SIL OFL 1.1, polices/NUNITO-LICENCE.txt), chargée en local, à la place de SF Rounded. */
@font-face { font-family: "Nunito"; font-weight: 700; font-style: normal; font-display: swap; src: url("polices/nunito-700.woff2") format("woff2"); }
@font-face { font-family: "Nunito"; font-weight: 800; font-style: normal; font-display: swap; src: url("polices/nunito-800.woff2") format("woff2"); }
@font-face { font-family: "Nunito"; font-weight: 900; font-style: normal; font-display: swap; src: url("polices/nunito-900.woff2") format("woff2"); }

/* ---------- les palettes de dessin (PaletteIllu, PrototypesAccueil.swift:167-193) ---------- */
.hi { display: block; overflow: visible; flex: none; }
.hi-p-violet {                                  /* PrototypesAccueil.swift:181-185  sur une carte violette : tuiles blanches, encre violette */
  --hi-tuile: #fff;
  --hi-encre: var(--app-violet);
  --hi-sur-encre: #fff;
  --hi-vif: var(--app-ambre);
  --hi-sur-vif: var(--app-brun);
  --hi-trait: rgba(255, 255, 255, 0.75);
  --hi-ombre-c: #000; --hi-ombre-o: 0.2;
}
.hi-p-bloc {                                    /* PrototypesAccueil.swift:188-192  sur un bloc blanc : tuiles violettes (dégradé), encre blanche */
  --hi-encre: #fff;
  --hi-sur-encre: var(--app-violet);
  --hi-vif: var(--app-ambre);
  --hi-sur-vif: var(--app-brun);
  --hi-trait: color-mix(in srgb, var(--app-accent) 50%, transparent);
  --hi-ombre-c: #6B1DE8; --hi-ombre-o: 0.28;
}
.hi-tuile { fill: var(--hi-tuile); }
.hi-f-encre { fill: var(--hi-encre); }
.hi-f-vif { fill: var(--hi-vif); }
.hi-f-ambre { fill: var(--app-ambre); }
.hi-f-gris { fill: #8e8e93; }
.hi-f-ferme { fill: rgba(128, 128, 128, 0.55); }
.hi-s-encre { stroke: var(--hi-encre); }
.hi-s-vif { stroke: var(--hi-vif); }
.hi-s-survif { stroke: var(--hi-sur-vif); }
.hi-s-trait { stroke: var(--hi-trait); }
.hi-t { font-family: "Nunito", ui-rounded, "SF Pro Rounded", system-ui, sans-serif; font-weight: 900; white-space: pre; }
.hi-c-encre { fill: var(--hi-encre); }
.hi-c-suren { fill: var(--hi-sur-encre); }
.hi-c-vif { fill: var(--hi-vif); }
.hi-c-survif { fill: var(--hi-sur-vif); }
.hi-c-blanc { fill: #fff; }
.hi-c-brun { fill: var(--app-brun); }
.hi-chat { stroke: var(--app-argent); }
.hi-chat .hi-chat-p { fill: var(--app-argent); }
.hi-chat.hi-ferme { stroke: #8e8e93; }
.hi-chat.hi-ferme .hi-chat-p { fill: #8e8e93; }
.hi-ferme.hi-vignette { opacity: 1; }

/* ---------- la grande carte violette (PorteProto : ProtoAccueil.swift:261-292, carteViolette : ProtoCommun.swift:40-51) ---------- */
.hi-carte-violette {
  box-sizing: border-box; width: 100%; max-width: 402px;
  display: flex; flex-direction: column; align-items: center; gap: 9px;
  padding: 16px 16px 14px;
  border: 1px solid transparent; border-radius: var(--app-rayon-grand);
  background: var(--app-degrade) padding-box, var(--app-filet-violet) border-box;
  box-shadow: var(--app-ombre-violette);
  color: #fff; font-family: var(--app-police); text-align: center;
  corner-shape: squircle;
}
.hi-carte-titre { font-size: 36px; line-height: 41px; font-weight: 800; color: #fff; }  /* largeTitle (34 pt), rounded, bold : 36 px en Nunito pour la même largeur */
.hi-carte-bas { display: flex; flex-direction: column; align-items: center; gap: 7px; width: 100%; }
.hi-carte-texte { font-size: 12.5px; line-height: 16px; font-weight: 800; color: rgba(255, 255, 255, 0.85); }   /* caption, semibold, blanc .85 */
.hi-carte-violette .hi-barre { width: 170px; background: rgba(255, 255, 255, 0.26); }
.hi-carte-violette .hi-barre i { background: #fff; }
.hi-carte-violette .hi-segments i { background: rgba(255, 255, 255, 0.26); }
.hi-carte-violette .hi-segments i.hi-plein { background: #fff; }

/* ---------- la progression (SegmentsProto : ProtoCommun.swift:247-277) ---------- */
.hi-barre { box-sizing: border-box; height: var(--app-segment-hauteur); border-radius: 99px; overflow: hidden;
  background: color-mix(in srgb, var(--app-encre) 10%, transparent); }
.hi-barre i { display: block; height: 100%; border-radius: 99px; background: var(--app-accent); min-width: 0; }
.hi-segments { display: flex; gap: 3px; height: var(--app-segment-hauteur); width: 100%; }
.hi-segments i { flex: 1; border-radius: 99px; background: color-mix(in srgb, var(--app-encre) 10%, transparent); }
.hi-segments i.hi-plein { background: var(--app-accent); }

/* ---------- la tuile blanche d'une matière (TuileMatiere : ProtoMatieres.swift:131-161) ---------- */
.hi-tuile-matiere, .hi-carte-outil {
  box-sizing: border-box; position: relative; display: flex; flex-direction: column; align-items: center;
  background: var(--app-bloc); border-radius: var(--app-rayon-tuile);
  box-shadow: var(--app-ombre-blanche), inset 0 0 0 1px var(--app-filet-blanc);       /* carteBlanche : ProtoCommun.swift:33-35 */
  color: var(--app-encre); font-family: var(--app-police); text-align: center; corner-shape: squircle;
}
.hi-tuile-matiere { gap: 9px; padding: 14px; width: 100%; max-width: 178px; }
.hi-matiere-dessin { height: 70px; display: flex; align-items: center; justify-content: center; }
.hi-matiere-titre { font-size: 17.5px; line-height: 22px; font-weight: 800; min-height: 44px; display: flex; align-items: center; justify-content: center; }  /* headline, 2 lignes réservées */
.hi-matiere-meta { font-size: 12.5px; line-height: 16px; font-weight: 800; opacity: 0.55; }
.hi-tuile-matiere .hi-segments, .hi-tuile-matiere .hi-barre { width: 100%; }

/* ---------- la carte blanche d'un outil (TuileOutilFinale : ProtoAccueil.swift:295-345) ---------- */
.hi-carte-outil { justify-content: center; gap: 14px; padding: 12px; width: 100%; max-width: 178px; aspect-ratio: 1.18; }
.hi-outil-dessin { height: 58px; display: flex; align-items: center; justify-content: center; }
.hi-outil-titre { font-size: 17.5px; line-height: 22px; font-weight: 800; }
.hi-outil-detail { font-size: 12.5px; line-height: 16px; font-weight: 800; opacity: 0.55; margin-top: -12px; }
.hi-carte-outil.hi-ferme { background: var(--app-gris-ferme); box-shadow: none; }
.hi-carte-outil.hi-ferme .hi-outil-titre { opacity: 0.45; }
.hi-cadenas {                                  /* CadenasRond : ProtoCommun.swift:367-379 */
  position: absolute; top: 10px; right: 10px; width: 30px; height: 30px; border-radius: 50%;
  display: grid; place-items: center; background: var(--app-bloc); color: var(--app-accent); box-shadow: var(--app-ombre-cadenas);
}
