/*
 * slayxi/ui — direction artistique commune.
 * Sombre et sobre : fond noir, gris neutres, Inter Tight, beaucoup d'air,
 * cartes nettes ; le bleu ne sert qu'au bouton d'appel.
 * Aucun style en ligne dans les vues (CSP stricte) : tout est ici.
 */

@font-face {
  font-family: 'Inter Tight';
  src: url('inter-tight.woff2') format('woff2');
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'JetBrains Mono';
  src: url('jetbrains-mono.woff2') format('woff2');
  font-weight: 400 700;
  font-style: normal;
  font-display: swap;
}

:root {
  --sx-fond: #000000;
  --sx-surface: #0c0c0d;
  --sx-surface-2: #161617;
  --sx-bord: rgba(255, 255, 255, 0.08);
  --sx-bord-fort: rgba(255, 255, 255, 0.16);

  --sx-texte: #f2f2f2;
  --sx-gris: #a1a1a6;
  --sx-pale: #6e6e73;

  --sx-primaire: #0066ff;
  --sx-accent: #00d4ff;
  --sx-vert: #34d399;
  --sx-degrade: linear-gradient(180deg, #ffffff 15%, #8e8e93 100%);

  --sx-police: 'Inter Tight', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --sx-mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, Consolas, monospace;

  --sx-largeur: 1140px;
  --sx-marge: clamp(20px, 5vw, 40px);
  --sx-section: clamp(72px, 10vw, 128px);
  --sx-rayon: 14px;
  --sx-rayon-grand: 20px;
  --sx-entete: 76px;
  --sx-ease: cubic-bezier(0.22, 1, 0.36, 1);
}

/* ------------------------------------------------------------------ */
/* Base                                                               */
/* ------------------------------------------------------------------ */

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--sx-entete) + 16px);
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--sx-fond);
  color: var(--sx-texte);
  font-family: var(--sx-police);
  font-size: 16px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

h1, h2, h3, h4, h5, h6, p, ul, ol, dl, dd, figure, blockquote {
  margin: 0;
}

ul, ol {
  padding: 0;
  list-style: none;
}

a {
  color: inherit;
  text-decoration: none;
}

img, svg {
  display: block;
  max-width: 100%;
}

button {
  font: inherit;
  color: inherit;
}

::selection {
  background: rgba(255, 255, 255, 0.85);
  color: #000;
}

:focus-visible {
  outline: 2px solid #fff;
  outline-offset: 3px;
  border-radius: 6px;
}

.sx-main {
  position: relative;
  z-index: 1;
  outline: none;
}

.sx-evitement {
  position: fixed;
  top: 12px;
  left: 12px;
  z-index: 100;
  padding: 10px 16px;
  border-radius: 999px;
  background: #fff;
  color: #000;
  font-weight: 600;
  transform: translateY(-200%);
}

.sx-evitement:focus {
  transform: none;
}

/* Fond : un halo bleu en haut et une grille fine qui s'efface. */
.sx-decor {
  position: absolute;
  inset: 0 0 auto;
  height: 700px;
  z-index: 0;
  pointer-events: none;
  background: radial-gradient(60% 60% at 50% 0%, rgba(255, 255, 255, 0.07) 0%, rgba(255, 255, 255, 0) 100%);
}

/* ------------------------------------------------------------------ */
/* Typographie                                                        */
/* ------------------------------------------------------------------ */

.sx-h1,
.sx-h2,
.sx-h3,
.sx-h4 {
  font-weight: 600;
  color: #f5f5f7;
  text-wrap: balance;
}

.sx-h1 {
  font-size: clamp(2.5rem, 1.5rem + 3.6vw, 4.5rem);
  line-height: 1.04;
  letter-spacing: -0.04em;
}

.sx-h2 {
  font-size: clamp(1.9rem, 1.35rem + 1.8vw, 2.75rem);
  line-height: 1.12;
  letter-spacing: -0.03em;
}

.sx-h3 {
  font-size: clamp(1.3rem, 1.15rem + 0.5vw, 1.6rem);
  line-height: 1.25;
  letter-spacing: -0.02em;
}

.sx-h4 {
  font-size: 1.125rem;
  line-height: 1.35;
  letter-spacing: -0.01em;
}

.sx-grand {
  font-size: clamp(1.05rem, 1rem + 0.25vw, 1.2rem);
  line-height: 1.65;
}

.sx-petit {
  font-size: 0.875rem;
}

.sx-gris { color: var(--sx-gris); }
.sx-pale { color: var(--sx-pale); }
.sx-cyan { color: #d4d4d8; }

.sx-mono {
  font-family: var(--sx-mono);
  font-size: 0.8125rem;
  letter-spacing: 0;
}

.sx-ligne {
  display: block;
}

.sx-degrade {
  background: var(--sx-degrade);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* Petit titre de section : mono, capitales, accent. */
.sx-surtitre {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--sx-mono);
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--sx-gris);
}

.sx-surtitre::before {
  content: '';
  width: 18px;
  height: 1px;
  background: currentColor;
  opacity: 0.7;
}

/* Grand sous-titre espacé : « SOFTWARE ENGINEER ». */
.sx-espace {
  font-size: clamp(1rem, 0.85rem + 0.7vw, 1.5rem);
  font-weight: 300;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: #d4d6dc;
}

.sx-lien {
  color: var(--sx-gris);
  transition: color 0.2s;
}

.sx-lien:hover,
.sx-lien:focus-visible {
  color: var(--sx-texte);
}

/* ------------------------------------------------------------------ */
/* Mise en page                                                       */
/* ------------------------------------------------------------------ */

.sx-conteneur {
  width: 100%;
  max-width: calc(var(--sx-largeur) + var(--sx-marge) * 2);
  margin: 0 auto;
  padding: 0 var(--sx-marge);
}

.sx-section {
  position: relative;
  padding: var(--sx-section) 0;
}

.sx-section + .sx-section {
  padding-top: 0;
}

.sx-section-entete {
  display: flex;
  flex-direction: column;
  gap: 14px;
  max-width: 640px;
  margin-bottom: 48px;
}

.sx-section-entete--centre {
  align-items: center;
  margin-inline: auto;
  text-align: center;
}

.sx-section-entete .sx-gris {
  font-size: 1.05rem;
}

.sx-separateur {
  height: 1px;
  border: 0;
  margin: 0;
  background: linear-gradient(90deg, transparent, var(--sx-bord-fort), transparent);
}

/* ------------------------------------------------------------------ */
/* Composants                                                         */
/* ------------------------------------------------------------------ */

.sx-bouton {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  height: 48px;
  padding: 0 24px;
  border: 1px solid transparent;
  border-radius: 999px;
  background: #fff;
  color: #000;
  font-size: 0.9375rem;
  font-weight: 600;
  white-space: nowrap;
  cursor: pointer;
  transition: background 0.2s, border-color 0.2s, color 0.2s, transform 0.2s var(--sx-ease);
}

.sx-bouton:hover {
  background: #d9d9de;
  transform: translateY(-1px);
}

.sx-bouton-fleche {
  transition: transform 0.25s var(--sx-ease);
}

.sx-bouton:hover .sx-bouton-fleche {
  transform: translateX(3px);
}

.sx-bouton--contour {
  border-color: var(--sx-bord-fort);
  background: rgba(255, 255, 255, 0.02);
  color: var(--sx-texte);
}

.sx-bouton--contour:hover {
  border-color: rgba(255, 255, 255, 0.35);
  background: rgba(255, 255, 255, 0.06);
}

.sx-bouton--bleu {
  background: var(--sx-primaire);
  color: #fff;
  box-shadow: 0 8px 30px -10px rgba(0, 102, 255, 0.7);
}

.sx-bouton--bleu:hover {
  background: #1a75ff;
}

.sx-bouton--petit {
  height: 38px;
  padding: 0 16px;
  font-size: 0.875rem;
}

.sx-boutons {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

/* Badge de disponibilité. */
.sx-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  border: 1px solid rgba(52, 211, 153, 0.25);
  border-radius: 999px;
  background: rgba(52, 211, 153, 0.06);
  font-size: 0.8125rem;
  font-weight: 500;
  color: #c9f5e2;
}

.sx-pastille {
  display: inline-block;
  flex: none;
  width: 7px;
  height: 7px;
  margin-right: 8px;
  border-radius: 50%;
  background: var(--sx-vert);
  box-shadow: 0 0 0 0 rgba(52, 211, 153, 0.6);
  animation: sx-pouls 2.4s infinite;
}

.sx-badge .sx-pastille {
  margin-right: 0;
}

@keyframes sx-pouls {
  0% { box-shadow: 0 0 0 0 rgba(52, 211, 153, 0.55); }
  70% { box-shadow: 0 0 0 7px rgba(52, 211, 153, 0); }
  100% { box-shadow: 0 0 0 0 rgba(52, 211, 153, 0); }
}

/* Étiquettes (technos, titres). */
.sx-etiquettes {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.sx-etiquette {
  display: inline-flex;
  align-items: center;
  padding: 5px 11px;
  border: 1px solid var(--sx-bord);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.03);
  font-family: var(--sx-mono);
  font-size: 0.75rem;
  font-weight: 500;
  color: #c7c7cc;
  white-space: nowrap;
}

.sx-etiquette--accent {
  border-color: rgba(255, 255, 255, 0.4);
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
}

/* Carte. */
.sx-carte {
  position: relative;
  padding: 28px;
  border: 1px solid var(--sx-bord);
  border-radius: var(--sx-rayon-grand);
  background: linear-gradient(180deg, var(--sx-surface-2) 0%, var(--sx-surface) 100%);
  transition: border-color 0.25s, transform 0.3s var(--sx-ease), background 0.25s;
}

a.sx-carte:hover,
.sx-carte--survol:hover {
  border-color: var(--sx-bord-fort);
  transform: translateY(-3px);
}

/* Pictogramme dans un carré. */
.sx-icone {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border: 1px solid var(--sx-bord);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.04);
  color: #fff;
}

.sx-icone svg {
  width: 22px;
  height: 22px;
}

/* ------------------------------------------------------------------ */
/* En-tête                                                            */
/* ------------------------------------------------------------------ */

.sx-entete {
  position: fixed;
  top: 14px;
  left: 0;
  right: 0;
  z-index: 50;
  padding: 0 var(--sx-marge);
  pointer-events: none;
}

.sx-entete-barre {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  max-width: 1000px;
  height: 56px;
  margin: 0 auto;
  padding: 0 10px 0 18px;
  border: 1px solid transparent;
  border-radius: 999px;
  pointer-events: auto;
  transition: background 0.3s, border-color 0.3s, box-shadow 0.3s;
}

.sx-entete.est-defile .sx-entete-barre,
.sx-menu-ouvert .sx-entete-barre {
  border-color: var(--sx-bord);
  background: rgba(18, 18, 20, 0.72);
  -webkit-backdrop-filter: blur(16px) saturate(140%);
  backdrop-filter: blur(16px) saturate(140%);
  box-shadow: 0 10px 40px -20px rgba(0, 0, 0, 0.8);
}

.sx-marque {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  justify-self: start;
  font-size: 1.05rem;
  font-weight: 600;
  letter-spacing: -0.02em;
}

.sx-marque img {
  width: 28px;
  height: 28px;
  object-fit: contain;
}

.sx-entete-liens {
  display: flex;
  gap: 4px;
}

.sx-entete-lien {
  padding: 7px 14px;
  border-radius: 999px;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--sx-gris);
  transition: color 0.2s, background 0.2s;
}

.sx-entete-lien:hover {
  color: var(--sx-texte);
}

.sx-entete-lien.est-actif {
  background: rgba(255, 255, 255, 0.07);
  color: var(--sx-texte);
}

.sx-entete-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
}

.sx-bouton-menu {
  display: none;
  place-items: center;
  width: 40px;
  height: 40px;
  padding: 0;
  border: 1px solid var(--sx-bord);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.03);
  cursor: pointer;
}

.sx-bouton-menu-traits,
.sx-bouton-menu-traits::before {
  display: block;
  width: 16px;
  height: 1.5px;
  background: currentColor;
  transition: transform 0.3s var(--sx-ease);
}

.sx-bouton-menu-traits {
  position: relative;
  transform: translateY(-3px);
}

.sx-bouton-menu-traits::before {
  content: '';
  position: absolute;
  top: 6px;
}

.sx-menu-ouvert .sx-bouton-menu-traits {
  transform: translateY(0) rotate(45deg);
}

.sx-menu-ouvert .sx-bouton-menu-traits::before {
  transform: translateY(-6px) rotate(-90deg);
}

.sx-menu {
  position: fixed;
  inset: 0;
  z-index: 40;
  display: flex;
  flex-direction: column;
  gap: 32px;
  padding: calc(var(--sx-entete) + 40px) var(--sx-marge) 40px;
  background: var(--sx-fond);
}

.sx-menu[hidden] {
  display: none;
}

.sx-menu-liens {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.sx-menu-lien {
  font-size: 2rem;
  font-weight: 600;
  letter-spacing: -0.03em;
  color: var(--sx-gris);
}

.sx-menu-lien.est-actif {
  color: var(--sx-texte);
}

.sx-menu-reseaux {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 20px;
  color: var(--sx-gris);
}

.sx-menu .sx-bouton {
  align-self: flex-start;
}

/* ------------------------------------------------------------------ */
/* Pied de page                                                       */
/* ------------------------------------------------------------------ */

.sx-pied {
  position: relative;
  z-index: 1;
  margin-top: var(--sx-section);
  border-top: 1px solid var(--sx-bord);
  font-size: 0.9375rem;
}

.sx-pied-haut {
  display: grid;
  grid-template-columns: 1.6fr 1fr 1fr 1.3fr;
  gap: 40px;
  padding: 64px 0 48px;
}

.sx-pied-marque {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 16px;
}

.sx-pied-dispo {
  display: inline-flex;
  align-items: center;
  color: var(--sx-gris);
}

.sx-pied-colonne {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 10px;
}

.sx-pied-titre {
  margin-bottom: 4px;
  font-family: var(--sx-mono);
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--sx-pale);
}

.sx-pied-lieu {
  color: var(--sx-pale);
  font-variant-numeric: tabular-nums;
}

.sx-pied-bas {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 8px 24px;
  padding: 24px 0 32px;
  border-top: 1px solid var(--sx-bord);
  font-size: 0.875rem;
  color: var(--sx-pale);
}

/* ------------------------------------------------------------------ */
/* Pages d'erreur                                                     */
/* ------------------------------------------------------------------ */

.sx-erreur {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  min-height: 100vh;
  padding-top: var(--sx-entete);
  padding-bottom: 40px;
  text-align: center;
}

.sx-erreur-code {
  font-size: clamp(6rem, 4rem + 10vw, 11rem);
  font-weight: 700;
  line-height: 1;
  letter-spacing: -0.06em;
  background: var(--sx-degrade);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.sx-erreur .sx-bouton {
  margin-top: 12px;
}

/* ------------------------------------------------------------------ */
/* Apparitions (seulement si le script tourne)                        */
/* ------------------------------------------------------------------ */

.sx-js [data-sx-fondu] {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.7s var(--sx-ease), transform 0.7s var(--sx-ease);
}

.sx-js [data-sx-fondu].est-visible {
  opacity: 1;
  transform: none;
}

.sx-machine::after {
  content: '';
  display: inline-block;
  width: 2px;
  height: 1em;
  margin-left: 4px;
  vertical-align: -0.12em;
  background: #fff;
  animation: sx-clignote 1s steps(1) infinite;
}

@keyframes sx-clignote {
  50% { opacity: 0; }
}

/* ------------------------------------------------------------------ */
/* Petits écrans                                                      */
/* ------------------------------------------------------------------ */

@media (max-width: 900px) {
  .sx-pied-haut { grid-template-columns: 1fr 1fr; gap: 36px 24px; }
  .sx-pied-marque { grid-column: 1 / -1; }
}

@media (max-width: 760px) {
  .sx-entete { top: 10px; }
  .sx-entete-barre { grid-template-columns: 1fr auto; padding-left: 16px; }
  .sx-entete-liens,
  .sx-entete-actions .sx-bouton { display: none; }
  .sx-bouton-menu { display: grid; }
  .sx-carte { padding: 22px; }
  .sx-section-entete { margin-bottom: 36px; }
}

@media (max-width: 480px) {
  .sx-pied-haut { grid-template-columns: 1fr; }
  .sx-boutons { flex-direction: column; align-items: stretch; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  .sx-js [data-sx-fondu] { opacity: 1; transform: none; }
}
