/* Typo système, minimalisme */
* { box-sizing: border-box; }
html, body { height: 100%; }

/* Barre de chargement */
@keyframes bosLoad {
  from { width: 0%; }
  to   { width: 100%; }
}

/* Lancement: remplir la barre en ~1.6s */
#loaderFill {
  width: 0%;
  animation: bosLoad 1.6s ease-out forwards;
}

/* Réduction des animations si l’utilisateur préfère moins de mouvement */
@media (prefers-reduced-motion: reduce) {
  #loaderFill {
    animation: none;
    width: 100%;
  }
}

/* Apparition du site après le préloader */
body.site-loaded #site {
  opacity: 1;
}

/* Touches de détail en noir & blanc uniquement */
a { text-decoration: none; }
a:focus { outline: 2px dashed #fff; outline-offset: 2px; }

.terminal {
  border: 1px solid rgba(0,0,0,0.12);
  box-shadow: 0 10px 30px rgba(0,0,0,0.08);
}

.cursor {
  animation: cursorBlink 1s steps(1) infinite;
}

@keyframes cursorBlink {
  50% { opacity: 0; }
}

/* Indicateur de statut (point vert) */
.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 9999px;
  background: #22c55e; /* green-500 */
  box-shadow: 0 0 0 2px rgba(34, 197, 94, 0.25);
  display: inline-block;
}

/* Grille technologies: noir & blanc, minimaliste */
.tech-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  /* Réduit la marge top appliquée par mt-6 via override */
  margin-top: 0.75rem;
}
@media (min-width: 640px) {
  .tech-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
@media (min-width: 1024px) {
  .tech-grid { grid-template-columns: repeat(8, minmax(0, 1fr)); }
}

.tech-category { margin-top: 1.25rem; }

.tech-item {
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 8px;
  background: #000;
  color: #fff;
  padding: 10px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  transition: transform 160ms ease, box-shadow 160ms ease, border-color 160ms ease, background-color 160ms ease;
}
.tech-item:hover {
  transform: translateY(-1px);
  border-color: rgba(255,255,255,0.18);
  box-shadow: 0 4px 18px rgba(255,255,255,0.06);
}

.tech-icon {
  width: 28px;
  height: 28px;
  display: block;
  filter: invert(1) brightness(0.97);
}

.tech-label {
  font-size: 0.78rem;
  letter-spacing: 0.01em;
  color: rgba(255,255,255,0.78);
}

.tech-category-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  border-bottom: 1px solid rgba(255,255,255,0.12);
  padding-bottom: 6px;
}
.tech-category-title {
  font-weight: 600;
  letter-spacing: 0.01em;
}
.tech-category-subtitle {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: rgba(255,255,255,0.5);
}

/* États init pour les animations au scroll */
.reveal,
.reveal-group > * {
  opacity: 0;
  transform: translateY(12px);
  will-change: transform, opacity;
}

/* Accessibilité: réduire les animations si demandé */
@media (prefers-reduced-motion: reduce) {
  .reveal,
  .reveal-group > * {
    opacity: 1 !important;
    transform: none !important;
    transition: none !important;
  }
}

#siteHeader {
  transition: opacity 0.2s ease, transform 0.2s ease;
  background: transparent;
  border: none;
}

.header-hidden {
  opacity: 0;
  transform: translateY(-12px);
  pointer-events: none;
}

.header-visible {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

/* Header adaptatif selon le fond */
.header-nav {
  color: #000; /* par défaut noir */
  transition: color 0.3s ease;
}
.header-nav.on-dark {
  color: #fff; /* blanc sur fond sombre */
}
.header-nav.on-light {
  color: #000; /* noir sur fond clair */
}

/* Liens du header minimaliste */
#siteHeader .nav-link {
  color: inherit;
  padding-bottom: 2px;
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s ease, opacity 0.2s ease;
}
#siteHeader .nav-link:hover {
  border-bottom-color: currentColor;
}
/* Label ultra-compact pour "stacks et outils" */
.tech-section-label {
  display: inline-block;
  font-size: 0.75rem; /* augmenté légèrement */
  line-height: 1;
  letter-spacing: 0.16em; /* un peu plus serré */
  text-transform: uppercase;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.45);
  margin: 0;
  padding: 0;
}

/* Header minimaliste, terminal, etc. */
.tech-category-header {
  border-bottom: 1px solid rgba(255,255,255,0.12);
  padding-bottom: 6px;
}
.tech-toggle {
  all: unset;
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  width: 100%;
  cursor: pointer;
}
.tech-toggle:focus-visible {
  outline: 2px dashed rgba(255,255,255,0.4);
  outline-offset: 3px;
}
.chevron {
  font-size: 0.9rem;
  line-height: 1;
  transition: transform 160ms ease;
  color: rgba(255,255,255,0.6);
}
.tech-category.collapsed .chevron {
  transform: rotate(-90deg);
}
.tech-category.collapsed .tech-grid {
  display: none;
}
.bos-mark { line-height: 0; }
.bos-mark .b-logo {
  width: 72px;
  height: 72px;
}  display: inline-block;
}
@media (min-width: 768px) {
  .bos-mark .b-logo {
    width: 56px;
    height: 56px;
  }
}

/* Fenêtres projets superposées (stack sticky + fond blanc + fenêtres grises) */
.deck {
  position: relative;
  height: 80vh;
  overflow-y: auto;
  scroll-snap-type: none;
}
.project-window {
  position: sticky;
  top: 0;
  height: 80vh;
  display: flex;
  align-items: center;
  justify-content: center; /* centre horizontalement le contenu */
}
.project-window .terminal {
  transition: transform 160ms ease, opacity 160ms ease, box-shadow 160ms ease;
  transform: translateY(calc(var(--p, 0) * -24px)) scale(calc(1 - var(--p, 0) * 0.03));
  opacity: calc(1 - var(--p, 0) * 0.10);
  box-shadow: 0 10px 30px rgba(0,0,0,0.15);
}

/* Style gris façon hero */
.terminal-grey .terminal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #f2f2f2;
  color: rgba(0,0,0,0.6);
  border-bottom: 1px solid rgba(0,0,0,0.08);
}
.terminal-grey .terminal-header span {
  background: rgba(0,0,0,0.2);
}
.terminal-grey .terminal-body {
  background: #f7f7f7;
  color: #000;
}
.terminal-grey .terminal-body a {
  color: #000;
}
.terminal-grey .terminal-body a:hover {
  opacity: 0.7;
}

/* Pastilles latérales sur fond blanc */
.deck-dots {
  position: absolute;
  right: 20px;
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.deck-dots .dot {
  width: 8px;
  height: 8px;
  border-radius: 9999px;
  border: 1px solid rgba(0,0,0,0.5);
  background: transparent;
  cursor: pointer;
  transition: background-color 160ms ease, transform 160ms ease, border-color 160ms ease;
}
.deck-dots .dot:hover { transform: scale(1.2); }
.deck-dots .dot.active {
  background: #000;
  border-color: #000;
}

/* Thèmes clair/sombre pour terminal */
.terminal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom-width: 1px;
}
.theme-dark .terminal-header {
  background: #0a0a0a;
  color: rgba(255,255,255,0.6);
  border-color: rgba(255,255,255,0.08);
}
.theme-dark .terminal-header span {
  background: rgba(255,255,255,0.2);
}
.theme-dark .terminal-body {
  background: #000;
  color: #fff;
}
.theme-dark .terminal-body a {
  color: #fff;
}
.theme-dark .terminal-body a:hover {
  opacity: 0.85;
}

.theme-light .terminal-header {
  background: #fff;
  color: rgba(0,0,0,0.6);
  border-color: rgba(0,0,0,0.12);
}
.theme-light .terminal-header span {
  background: rgba(0,0,0,0.2);
}
.theme-light .terminal-body {
  background: #fff;
  color: #000;
}
.theme-light .terminal-body a {
  color: #000;
}
.theme-light .terminal-body a:hover {
  opacity: 0.7;
}

/* Pastilles latérales */
.deck-dots {
  position: absolute;
  right: 20px;
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.deck-dots .dot {
  width: 8px;
  height: 8px;
  border-radius: 9999px;
  border: 1px solid rgba(255,255,255,0.5);
  background: transparent;
  cursor: pointer;
  transition: background-color 160ms ease, transform 160ms ease, border-color 160ms ease;
}
.deck-dots .dot:hover { transform: scale(1.2); }
.deck-dots .dot.active {
  background: #fff;
  border-color: #fff;
}

/* Bloc ASCII pour les terminaux */
.ascii-logo {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
  font-size: 12px;
  line-height: 1.1;
  white-space: pre;
  color: inherit;
  opacity: 0.9;
}
/* Couleur orange pour le logo ASCII Proxmox */
.ascii-proxmox {
  color: #f15a24;
}

/* Alignement à droite des sous-titres de catégories */
.tech-category-header .tech-toggle {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
}
.tech-category-header .tech-category-subtitle {
  margin-left: auto;
  text-align: right;
  font-size: 0.75rem; /* aligné sur la ref */
  line-height: 1;
  letter-spacing: 0.16em;
  text-transform: uppercase; /* harmonisé avec la ref */
  font-weight: 600;
  opacity: 0.65;
}

/* Icônes inline pour la section À propos */
.inline-icon {
  width: 16px;
  height: 16px;
  display: inline-block;
  vertical-align: text-bottom;
  margin-right: 6px;
  filter: invert(1) brightness(0.97); /* icônes claires sur fond noir */
}
.inline-tech strong {
  margin-right: 12px;
}

/* styles pixel art pour titre de projet */
.pixel-title {
  font-family: 'Press Start 2P', monospace;
  font-size: 0.95rem;
  line-height: 1.6;
  letter-spacing: 0.03em;
  display: block;
}
/* Taille réduite pour l'ASCII Nody */
.ascii-nody {
  font-size: 10px;   /* au lieu de 12px par défaut */
  line-height: 1.05; /* resserré pour compacter verticalement */
}
/* Taille spécifique pour Gitea (un peu plus grande) */
.inline-icon.gitea-icon {
  width: 18px;
  height: 18px;
}
/* Boutons d'icônes (LinkedIn, Gitea) centrés */
.icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}