/* ====================================================================
   VARIABLES TITANE / MÉTAL
==================================================================== */
:root {
  --bg-deep: #090a0d;
  --card-bg: linear-gradient(160deg, #16181d 0%, #0e1014 100%);
  --metal-edge: #383c48;
  --metal-border: #232630;
  --metal-highlight: rgba(255, 255, 255, 0.05);
  --text-main: #f0f2f5;
  --text-muted: #8b92a4;
  --accent-steel: #8fa0b5;
  --accent-bright: #cbd5e1;
  --input-bg: rgba(255, 255, 255, 0.035);
  --input-border: rgba(255, 255, 255, 0.1);
  --input-focus: #58a6ff;
}

/* ====================================================================
   RESET ET SÉCURITÉ RESPONSIVE
==================================================================== */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html,
body {
  width: 100%;
  min-height: 100vh;
  overflow-x: hidden;
  background-color: var(--bg-deep);
  color: var(--text-main);
  font-family:
    "Space Grotesk",
    -apple-system,
    BlinkMacSystemFont,
    sans-serif;
  line-height: 1.5;
}

body {
  padding: 1rem 0.85rem;
  background-image: radial-gradient(
    ellipse at 50% 0%,
    rgba(143, 160, 181, 0.08) 0%,
    transparent 70%
  );
}

/* ====================================================================
   CONTENEUR PRINCIPAL & ANIMATION D'APPARITION
==================================================================== */
@keyframes hubFadeIn {
  0% {
    opacity: 0;
    transform: translateY(10px);
  }
  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

.hub-wrapper {
  width: 100%;
  max-width: 500px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  animation: hubFadeIn 0.8s cubic-bezier(0.16, 1, 0.3, 1) forwards;
  will-change: opacity, transform;
}

/* ====================================================================
   STYLE DES CARTES & EFFET ARC ÉLECTRIQUE (MOBILE + DESKTOP)
==================================================================== */
.card {
  width: 100%;
  background: var(--card-bg);
  border: 1px solid var(--metal-border);
  border-top: 1px solid var(--metal-edge);
  border-radius: 12px;
  padding: 1.25rem;
  box-shadow:
    0 8px 24px rgba(0, 0, 0, 0.55),
    inset 0 1px 0 var(--metal-highlight);
  position: relative;
  overflow: hidden;
  z-index: 1;
}

/* Décharge électrique rotative (centrée et élargie pour mobile portrait) */
.hub-wrapper .card::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 350%;
  height: 350%;
  transform: translate(-50%, -50%);
  background: conic-gradient(
    transparent 0deg,
    transparent 60deg,
    rgba(64, 200, 255, 0.8) 80deg,
    #ffffff 90deg,
    rgba(64, 200, 255, 0.8) 100deg,
    transparent 120deg,
    transparent 360deg
  );
  animation: electricArc 7s linear infinite;
  z-index: -2;
  opacity: 0.6;
  filter: drop-shadow(0 0 8px #38bdf8);
}

/* Contour intérieur net */
.hub-wrapper .card::after {
  content: "";
  position: absolute;
  inset: 1.5px;
  background: inherit;
  border-radius: inherit;
  z-index: -1;
}

/* Survol desktop & appui tactile mobile */
.hub-wrapper .card:hover::before,
.hub-wrapper .card:active::before {
  opacity: 0.95;
  filter: drop-shadow(0 0 12px #38bdf8) drop-shadow(0 0 20px #0ea5e9);
  animation-duration: 3s;
}

@keyframes electricArc {
  0% {
    transform: translate(-50%, -50%) rotate(0deg);
  }
  100% {
    transform: translate(-50%, -50%) rotate(360deg);
  }
}

/* ====================================================================
   1. HERO / PROFIL
==================================================================== */
.badge {
  display: inline-block;
  font-family: "JetBrains Mono", monospace;
  font-size: 0.68rem;
  letter-spacing: 0.12em;
  color: var(--accent-steel);
  border: 1px solid rgba(143, 160, 181, 0.25);
  background: rgba(143, 160, 181, 0.05);
  padding: 0.25rem 0.6rem;
  border-radius: 4px;
  margin-bottom: 1rem;
}

.profile-header {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 0.9rem;
}

.avatar {
  width: 68px;
  height: 68px;
  min-width: 68px;
  border-radius: 10px;
  object-fit: cover;
  border: 1px solid var(--metal-edge);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.5);
}

.profile-text {
  min-width: 0;
  flex: 1;
}

h1 {
  font-size: 1.35rem;
  font-weight: 700;
  color: #fff;
  letter-spacing: -0.02em;
  word-break: break-word;
}

.tagline {
  font-family: "JetBrains Mono", monospace;
  font-size: 0.78rem;
  color: var(--accent-steel);
  margin-top: 0.2rem;
}

.bio {
  font-size: 0.88rem;
  color: var(--text-muted);
  line-height: 1.55;
}

/* ====================================================================
   2. RUBRIQUES CONNEXES
==================================================================== */
.card-rubriques {
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  gap: 0.6rem;
}

.card-rubriques-head {
  display: flex;
  align-items: center;
  margin-bottom: 0.2rem;
}

.category-tag {
  font-family: "JetBrains Mono", monospace;
  font-size: 0.7rem;
  color: var(--accent-bright);
  letter-spacing: 0.1em;
}

.rubriques-list {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  align-items: flex-start;
}

.cta-link {
  display: inline-block;
  font-family: "JetBrains Mono", monospace;
  font-size: 0.85rem;
  color: #fff;
  font-weight: 600;
  text-decoration: none;
  border-bottom: 1px solid var(--accent-steel);
  padding-bottom: 2px;
  margin-top: 0;
  transition:
    border-color 0.2s ease,
    color 0.2s ease;
}

.cta-link:hover {
  color: var(--accent-bright);
  border-bottom-color: #fff;
}

/* ====================================================================
   3. STACK & INGÉNIERIE
==================================================================== */
h3 {
  font-size: 0.88rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--accent-bright);
  margin-bottom: 0.85rem;
}

.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.tag-list span {
  font-family: "JetBrains Mono", monospace;
  font-size: 0.74rem;
  background: #111317;
  border: 1px solid var(--metal-border);
  color: var(--text-main);
  padding: 0.3rem 0.6rem;
  border-radius: 4px;
}

/* ====================================================================
   4. MÉTHODE
==================================================================== */
.mindset-block:not(:last-child) {
  margin-bottom: 0.85rem;
}

.mindset-block strong {
  display: block;
  font-size: 0.88rem;
  color: #fff;
  margin-bottom: 0.15rem;
}

.mindset-block p {
  font-size: 0.82rem;
  color: var(--text-muted);
  line-height: 1.4;
}

/* ====================================================================
   5. RÉSEAUX SOCIAUX
==================================================================== */
.link-grid {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.link-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  text-decoration: none;
  background: #111317;
  border: 1px solid var(--metal-border);
  border-radius: 6px;
  padding: 0.65rem 0.85rem;
  color: var(--text-main);
  font-family: "JetBrains Mono", monospace;
  font-size: 0.82rem;
  transition:
    background 0.15s ease,
    border-color 0.15s ease;
}

.link-item:hover,
.link-item:active {
  background: #1b1e26;
  border-color: var(--accent-steel);
  color: #fff;
}

/* ====================================================================
   6. CONTACT & FORMULAIRE (AVEC REFLET BOUTON)
==================================================================== */
.legal-card {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.hub-form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  width: 100%;
}

.form-row {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  width: 100%;
}

.form-field {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  width: 100%;
}

.form-field label {
  font-family: "JetBrains Mono", monospace;
  font-size: 0.72rem;
  color: var(--accent-steel);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.form-field input,
.form-field textarea {
  width: 100%;
  box-sizing: border-box;
  background: var(--input-bg);
  border: 1px solid var(--input-border);
  border-radius: 8px;
  padding: 0.85rem 1rem;
  color: #fff;
  font-family: "Space Grotesk", sans-serif;
  font-size: 1rem;
  outline: none;
  -webkit-appearance: none;
  appearance: none;
  transition:
    border-color 0.2s ease,
    background 0.2s ease,
    box-shadow 0.2s ease;
}

.form-field input:focus,
.form-field textarea:focus {
  border-color: var(--input-focus);
  background: rgba(255, 255, 255, 0.06);
  box-shadow: 0 0 0 3px rgba(88, 166, 255, 0.15);
}

.form-field textarea {
  resize: vertical;
  min-height: 110px;
}

.form-action {
  width: 100%;
}

.hub-btn {
  width: 100%;
  display: inline-flex;
  justify-content: center;
  align-items: center;
  min-height: 50px;
  background: #141822;
  color: #f0f6fc;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-top: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 8px;
  padding: 0.85rem 1.25rem;
  font-family: "JetBrains Mono", monospace;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  letter-spacing: 0.03em;
  position: relative;
  overflow: hidden;
  transition:
    background 0.2s ease,
    border-color 0.2s ease,
    transform 0.1s ease;
}

/* Éclairage dynamique sur le bouton */
.hub-btn::after {
  content: "";
  position: absolute;
  top: 0;
  left: -150%;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.35),
    rgba(56, 189, 248, 0.7),
    transparent
  );
  transform: skewX(-25deg);
  transition: 0.6s ease-in-out;
}

.hub-btn:hover::after,
.hub-btn:active::after {
  left: 150%;
}

.hub-btn:hover,
.hub-btn:active {
  background: #1f2533;
  border-color: var(--input-focus);
  transform: translateY(-1px);
}

.legal-notice {
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  padding-top: 1.1rem;
  margin-top: 0.2rem;
  text-align: center;
}

.legal-notice p {
  font-size: 0.74rem;
  color: var(--text-muted);
  line-height: 1.65;
  margin: 0 auto;
  max-width: 650px;
  text-align: center;
}

.legal-notice a {
  color: var(--accent-steel);
  text-decoration: underline;
  text-underline-offset: 3px;
  word-break: break-all;
}

.legal-notice a:hover {
  color: #fff;
}

/* ====================================================================
   ACCESSIBILITÉ (RÉDUCTION DE MOUVEMENT)
==================================================================== */
@media (prefers-reduced-motion: reduce) {
  .hub-wrapper {
    animation: none;
    opacity: 1;
    transform: none;
  }
  .hub-wrapper .card::before {
    animation: none;
    display: none;
  }
  .hub-btn::after {
    display: none;
  }
}

/* ====================================================================
   ADAPTATION PC / GRAND ÉCRAN (>= 900px)
==================================================================== */
@media (min-width: 900px) {
  body {
    padding: 3rem 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
  }

  .hub-wrapper {
    max-width: 1050px;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.25rem;
  }

  .card {
    padding: 1.75rem;
  }

  .hero {
    grid-column: span 2;
  }

  .card-rubriques {
    grid-column: span 1;
  }

  .skills {
    grid-column: span 1;
  }

  .mindset {
    grid-column: span 1;
  }

  .links {
    grid-column: span 1;
  }

  .legal-card {
    grid-column: 1 / -1;
  }

  .form-row {
    flex-direction: row;
    gap: 1.25rem;
  }

  .form-row .form-field {
    flex: 1;
  }

  .hub-btn {
    width: auto;
    min-height: auto;
  }
}
