/* Ajouts propres au portfolio, par dessus le gabarit.
   Le gabarit livre une feuille Tailwind deja compilee : les quelques utilitaires
   dont j'avais besoin et qui n'y figuraient pas sont ecrits ici a la main,
   avec les memes valeurs de theme (espacement 0.25rem, points de rupture
   40/48/64/80rem, violet #8d59ff). */

/* ---------- Console ---------- */

.term-scroll {
  scrollbar-width: thin;
  scrollbar-color: rgb(255 255 255 / 0.18) transparent;
}

.term-scroll::-webkit-scrollbar {
  width: 6px;
}

.term-scroll::-webkit-scrollbar-thumb {
  background: rgb(255 255 255 / 0.18);
  border-radius: 999px;
}

#term-input {
  caret-color: #8d59ff;
}

#term-output {
  cursor: text;
}

/* ---------- Utilitaires manquants ---------- */

.bg-background-13\/45 {
  background-color: rgb(13 13 18 / 0.45);
}

/* Les captures de sites clairs passent sous ces deux surfaces : il leur faut
   assez d'opacite pour que le texte blanc reste lisible. */
.bg-background-13\/65 {
  background-color: rgb(13 13 18 / 0.65);
}

.bg-background-13\/85 {
  background-color: rgb(13 13 18 / 0.85);
}

.bg-background-13\/70 {
  background-color: rgb(13 13 18 / 0.7);
}

.break-all {
  word-break: break-all;
}

.fill-ky-purple {
  fill: #8d59ff;
}

.gap-12 {
  gap: 3rem;
}

.gap-px {
  gap: 1px;
}

.gap-x-8 {
  column-gap: 2rem;
}

.gap-y-7 {
  row-gap: 1.75rem;
}

.h-\[300px\] {
  height: 300px;
}

.h-\[340px\] {
  height: 340px;
}

.hover\:opacity-100:hover {
  opacity: 1;
}

.items-baseline {
  align-items: baseline;
}

.leading-\[1\.8\] {
  line-height: 1.8;
}

.max-w-\[560px\] {
  max-width: 560px;
}

.max-w-\[760px\] {
  max-width: 760px;
}

.min-h-\[380px\] {
  min-height: 380px;
}

.ml-2 {
  margin-left: 0.5rem;
}

.mt-3 {
  margin-top: 0.75rem;
}

.mt-8 {
  margin-top: 2rem;
}

.mt-10 {
  margin-top: 2.5rem;
}

.object-top {
  object-position: top;
}

.opacity-60 {
  opacity: 0.6;
}

.outline-none {
  outline-style: none;
}

.placeholder\:text-white\/30::placeholder {
  color: rgb(255 255 255 / 0.3);
}

.pt-4 {
  padding-top: 1rem;
}

.px-2\.5 {
  padding-inline: 0.625rem;
}

.py-10 {
  padding-block: 2.5rem;
}

.text-\[12\.5px\] {
  font-size: 12.5px;
}

.text-\[13px\] {
  font-size: 13px;
}

.text-\[20px\] {
  font-size: 20px;
}

.text-ky-purple {
  color: #8d59ff;
}

.text-white\/35 {
  color: rgb(255 255 255 / 0.35);
}

.text-white\/40 {
  color: rgb(255 255 255 / 0.4);
}

.text-white\/45 {
  color: rgb(255 255 255 / 0.45);
}

.text-white\/70 {
  color: rgb(255 255 255 / 0.7);
}

.w-auto {
  width: auto;
}

/* ---------- Pastilles produits du heros ---------- */
/* Le fond et la bordure sont poses en style en ligne, une teinte par marque. */

.brand-pill {
  border: 1px solid transparent;
  transition:
    transform 0.3s ease,
    box-shadow 0.3s ease;
}

/* Pastilles claires : un eclaircissement au survol les delaverait,
   on souleve avec une ombre a la place. */
.brand-pill:hover {
  transform: translateY(-3px);
  box-shadow: 0 14px 30px -12px rgb(13 13 18 / 0.45);
}

.brand-pill img {
  transition: transform 0.3s ease;
}

.brand-pill:hover img {
  transform: scale(1.08);
}

@media (prefers-reduced-motion: reduce) {
  .brand-pill,
  .brand-pill img,
  .brand-pill:hover,
  .brand-pill:hover img {
    transform: none;
    transition: none;
  }
}

/* ---------- Theme clair ---------- */

.bg-background-13 {
  background-color: #0d0d12;
}

.group:hover .group-hover\:text-background-13 {
  color: #0d0d12;
}

.border-t {
  border-top-style: var(--tw-border-style, solid);
  border-top-width: 1px;
}

.h-4 {
  height: 1rem;
}

.h-8 {
  height: 2rem;
}

.pb-0 {
  padding-bottom: 0;
}

.pt-12 {
  padding-top: 3rem;
}

.w-\[230px\] {
  width: 230px;
}

@media (min-width: 40rem) {
  .sm\:w-\[270px\] {
    width: 270px;
  }
}

@media (min-width: 48rem) {
  .md\:pt-16 {
    padding-top: 4rem;
  }
}

@media (min-width: 64rem) {
  .lg\:w-\[330px\] {
    width: 330px;
  }
}

.pt-2 {
  padding-top: 0.5rem;
}

:where(.space-y-5 > :not(:last-child)) {
  margin-block-start: 0rem;
  margin-block-end: 1.25rem;
}

.transition-color {
  transition-property: color;
  transition-timing-function: var(--tw-ease, cubic-bezier(0.4, 0, 0.2, 1));
  transition-duration: var(--tw-duration, 150ms);
}

.bg-white\/85 {
  background-color: rgb(255 255 255 / 0.85);
}

.bg-background-13\/10 {
  background-color: rgb(13 13 18 / 0.1);
}

.bg-background-13\/90 {
  background-color: rgb(13 13 18 / 0.9);
}

.hover\:bg-background-13\/20:hover {
  background-color: rgb(13 13 18 / 0.2);
}

.text-background-13\/45 {
  color: rgb(13 13 18 / 0.45);
}

.hover\:text-background-13:hover {
  color: #0d0d12;
}

.group\/nav-item:hover .group-hover\/nav-item\:text-background-13 {
  color: #0d0d12;
}

.ring-background-7 {
  --tw-ring-color: #f8f9fa;
}

/* Anneau sombre : detache les pastilles techniques du heros reste sombre */
.ring-background-5 {
  --tw-ring-color: #11141d;
}

.grid-cols-5 {
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

.justify-items-center {
  justify-items: center;
}

.opacity-75 {
  opacity: 0.75;
}

.text-white\/55 {
  color: rgb(255 255 255 / 0.55);
}

@media (min-width: 40rem) {
  .sm\:block {
    display: block;
  }

  .sm\:grid-cols-3 {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (min-width: 48rem) {
  .md\:gap-x-12 {
    column-gap: 3rem;
  }

  .md\:gap-y-9 {
    row-gap: 2.25rem;
  }

  .md\:h-\[340px\] {
    height: 340px;
  }

  .md\:h-\[420px\] {
    height: 420px;
  }

  .md\:h-\[520px\] {
    height: 520px;
  }

  .md\:h-\[560px\] {
    height: 560px;
  }

  .md\:justify-end {
    justify-content: flex-end;
  }

  .md\:min-h-\[440px\] {
    min-height: 440px;
  }

  .md\:p-8 {
    padding: 2rem;
  }

  .md\:px-6 {
    padding-inline: 1.5rem;
  }

  .md\:py-28 {
    padding-block: 7rem;
  }

  .md\:text-\[13px\] {
    font-size: 13px;
  }

  .md\:w-\[38\%\] {
    width: 38%;
  }

  .md\:w-\[62\%\] {
    width: 62%;
  }

  .md\:grid-cols-10 {
    grid-template-columns: repeat(10, minmax(0, 1fr));
  }

  .md\:grid-cols-3 {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (min-width: 64rem) {
  .lg\:col-span-5 {
    grid-column: span 5 / span 5;
  }

  .lg\:col-span-6 {
    grid-column: span 6 / span 6;
  }

  .lg\:col-span-7 {
    grid-column: span 7 / span 7;
  }

  .lg\:gap-16 {
    gap: 4rem;
  }

  .lg\:gap-y-16 {
    row-gap: 4rem;
  }

  .lg\:grid-cols-12 {
    grid-template-columns: repeat(12, minmax(0, 1fr));
  }

  .lg\:h-\[520px\] {
    height: 520px;
  }

  .lg\:h-\[620px\] {
    height: 620px;
  }

  .lg\:max-w-\[640px\] {
    max-width: 640px;
  }

  .lg\:mt-14 {
    margin-top: 3.5rem;
  }

  .lg\:pl-4 {
    padding-left: 1rem;
  }

  .lg\:pr-4 {
    padding-right: 1rem;
  }

  .lg\:py-36 {
    padding-block: 9rem;
  }

  :where(.lg\:space-y-10 > :not(:last-child)) {
    margin-block-start: 0rem;
    margin-block-end: 2.5rem;
  }

  :where(.lg\:space-y-14 > :not(:last-child)) {
    margin-block-start: 0rem;
    margin-block-end: 3.5rem;
  }
}

@media (min-width: 80rem) {
  .xl\:py-44 {
    padding-block: 11rem;
  }

  .xl\:h-10 {
    height: 2.5rem;
  }
}

@media not all and (min-width: 64rem) {
  .max-lg\:justify-center {
    justify-content: center;
  }

  .max-lg\:text-center {
    text-align: center;
  }
}

@media not all and (min-width: 40rem) {
  .max-sm\:scale-85 {
    scale: 85%;
  }
}

/* Le portrait decoupe se termine a mi-cuisse : on le fond dans le halo du heros
   pour eviter la coupure nette. */
.hero-portrait {
  -webkit-mask-image: linear-gradient(
    to bottom,
    #000 42%,
    rgb(0 0 0 / 0.65) 66%,
    rgb(0 0 0 / 0.25) 82%,
    transparent 94%
  );
  mask-image: linear-gradient(
    to bottom,
    #000 42%,
    rgb(0 0 0 / 0.65) 66%,
    rgb(0 0 0 / 0.25) 82%,
    transparent 94%
  );
}

/* Apercu qui suit le curseur dans la liste savoir-faire.
   Le cadre est au format des captures (16:10) pour montrer le site en entier,
   avec une ombre qui le detache de la page claire. */
.service-reveal-cursor {
  box-shadow: 0 28px 70px -24px rgb(13 13 18 / 0.5);
}

.w-\[288px\] {
  width: 288px;
}

@media (min-width: 48rem) {
  .md\:h-\[270px\] {
    height: 270px;
  }

  .md\:w-\[432px\] {
    width: 432px;
  }
}

@media (min-width: 64rem) {
  .lg\:h-\[320px\] {
    height: 320px;
  }

  .lg\:w-\[512px\] {
    width: 512px;
  }
}

/* Halo de la section contact : la section suivante est le pied de page sombre,
   donc le degrade doit s'eteindre avant le bord au lieu de finir en blanc. */
.glow-fade {
  -webkit-mask-image: linear-gradient(to bottom, #000 0%, rgb(0 0 0 / 0.55) 62%, transparent 92%);
  mask-image: linear-gradient(to bottom, #000 0%, rgb(0 0 0 / 0.55) 62%, transparent 92%);
}

/* ------------------------------------------------------------------ */
/* Mascotte du heros.                                                  */
/* Les deux planches sont des grilles 3x3 : on deplace le fond plutot  */
/* que de charger neuf images. Le JS ne touche qu'a background-position.*/

.mascotte {
  --mascotte-directions: url("../images/mascotte/directions.webp");
  --mascotte-reactions: url("../images/mascotte/reactions.webp");
  /* Collee a l'ecran : elle accompagne le lecteur d'un bout a l'autre de la
     page. Le coin bas-droit est le seul libre (en-tete en haut au centre,
     tiroir mobile a droite). Sous le tiroir (z 9999), au-dessus du reste. */
  position: fixed;
  right: 26px;
  bottom: 26px;
  z-index: 60;
  width: 92px;
  height: 92px;
  background-image: var(--mascotte-directions);
  background-size: 300% 300%;
  background-repeat: no-repeat;
  border: 0;
  padding: 0;
  background-color: transparent;
  cursor: pointer;
  filter: drop-shadow(0 10px 18px rgb(13 13 18 / 0.28));
  transition: transform 0.25s ease;
}

.mascotte:hover {
  transform: translateY(-4px) scale(1.04);
}

.mascotte:focus-visible {
  outline: 2px solid #cafc00;
  outline-offset: 6px;
  border-radius: 12px;
}

/* Sur un ecran etroit elle se range plus haut et plus petite, pour ne
   jamais passer devant le titre. */
@media (max-width: 1023px) {
  .mascotte {
    right: 18px;
    bottom: 18px;
    width: 72px;
    height: 72px;
  }
}

@media (max-width: 639px) {
  .mascotte {
    right: 14px;
    bottom: 14px;
    width: 58px;
    height: 58px;
  }
}

/* ============================================================
   Badge suspendu de la section Contact (assets/lanyard.js).
   Le cadre remonte de la hauteur du padding de la section
   (py-20, md:py-28, lg:py-36, xl:py-44) : le cordon part du
   bord haut de la section.
   ============================================================ */
/* La classe est posée sur le cadre lui-même : sa hauteur vient de .badge-suspendu. */
.lanyard {
  position: relative;
  width: 100%;
  overflow: hidden;
}

.lanyard-canvas {
  display: block;
  width: 100%;
  height: 100%;
}

.badge-suspendu {
  position: relative;
  z-index: 20;
  height: 460px;
  margin-top: -80px;
  margin-bottom: 8px;
}

@media (min-width: 768px) {
  .badge-suspendu {
    height: 600px;
    margin-top: -112px;
  }
}

@media (min-width: 1024px) {
  .badge-suspendu {
    margin-top: -144px;
  }
}

@media (min-width: 1280px) {
  .badge-suspendu {
    margin-top: -176px;
  }
}

/* ============================================================
   Sphère « Tous mes projets » (assets/infinite-menu.js).
   D'après la feuille d'exemple d'InfiniteMenu (React Bits),
   aux polices et au violet du site ; le titre et la phrase
   restent visibles sur petit écran (l'exemple les masquait
   sous 1500 px).
   ============================================================ */
.sphere-projets {
  position: relative;
  height: 520px;
  border-radius: 24px;
  overflow: hidden;
}

@media (min-width: 768px) {
  .sphere-projets {
    height: 600px;
  }
}

/* Posée sur le cadre .sphere-projets lui-même, qui donne la hauteur. */
.infinite-menu {
  position: relative;
}

#infinite-grid-menu-canvas {
  display: block;
  cursor: grab;
  width: 100%;
  height: 100%;
  overflow: hidden;
  position: relative;
  outline: none;
}

#infinite-grid-menu-canvas:active {
  cursor: grabbing;
}

.infinite-menu .face-title {
  user-select: none;
  position: absolute;
  margin: 0;
  font-family: "Instrument Serif", serif;
  font-weight: 400;
  line-height: 1;
  color: rgba(255, 255, 255, 0.92);
}

.infinite-menu .face-description {
  user-select: none;
  position: absolute;
  margin: 0;
  font-family: "Inter Tight", sans-serif;
  line-height: 1.45;
  color: rgba(255, 255, 255, 0.7);
  text-shadow: 0 1px 14px rgba(17, 20, 29, 0.95), 0 0 2px rgba(17, 20, 29, 0.9);
}

.infinite-menu .face-title.active,
.infinite-menu .face-description.active {
  opacity: 1;
  pointer-events: auto;
  transition: 0.5s ease;
}

.infinite-menu .face-title.inactive,
.infinite-menu .face-description.inactive {
  opacity: 0;
  pointer-events: none;
  transition: 0.1s ease;
}

/* Petit écran : titre et phrase centrés au-dessus de la sphère. */
.infinite-menu .face-title {
  left: 50%;
  top: 1.25rem;
  width: 90%;
  font-size: 2.1rem;
  text-align: center;
  transform: translateX(-50%);
}

.infinite-menu .face-description {
  left: 50%;
  top: 4.1rem;
  width: 86%;
  max-width: 34ch;
  font-size: 0.95rem;
  text-align: center;
  transform: translateX(-50%);
}

/* Grand écran : titre à gauche, phrase à droite, comme l'exemple. */
@media (min-width: 1024px) {
  .infinite-menu .face-title {
    left: 1.6em;
    top: 50%;
    width: auto;
    max-width: 30%;
    font-size: 3.4rem;
    text-align: left;
  }

  .infinite-menu .face-title.active {
    transform: translate(20%, -50%);
  }

  .infinite-menu .face-title.inactive {
    transform: translate(10%, -50%);
  }

  .infinite-menu .face-description {
    left: auto;
    right: 4%;
    top: 50%;
    width: auto;
    max-width: 22ch;
    font-size: 1.05rem;
    text-align: left;
  }

  .infinite-menu .face-description.active {
    transform: translate(0, -50%);
  }

  .infinite-menu .face-description.inactive {
    transform: translate(20px, -50%);
  }
}

.infinite-menu .action-button {
  position: absolute;
  left: 50%;
  z-index: 10;
  width: 60px;
  height: 60px;
  display: grid;
  place-items: center;
  background: #8d59ff;
  border-radius: 50%;
  border: 5px solid var(--infinite-menu-background, #11141d);
  color: #fff;
  text-decoration: none;
  cursor: pointer;
}

.infinite-menu .action-button:focus-visible {
  outline: 2px solid #fff;
  outline-offset: 3px;
}

.infinite-menu .action-button.active {
  bottom: 2.6em;
  transform: translateX(-50%) scale(1);
  opacity: 1;
  pointer-events: auto;
  transition: 0.5s ease;
}

.infinite-menu .action-button.inactive {
  bottom: -80px;
  transform: translateX(-50%) scale(0);
  opacity: 0;
  pointer-events: none;
  transition: 0.1s ease;
}

.infinite-menu .action-button-icon {
  user-select: none;
  position: relative;
  top: 1px;
  font-size: 26px;
  line-height: 1;
}

@media (prefers-reduced-motion: reduce) {
  .infinite-menu .face-title,
  .infinite-menu .face-description,
  .infinite-menu .action-button {
    transition: none !important;
  }
}
