/* Portfolio Nino Martel : feuille de styles */

/* Polices hébergées sur le site (dossier /fonts), sans appel à Google */
@font-face { font-family: "Sora"; src: url("fonts/sora-400.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Sora"; src: url("fonts/sora-600.woff2") format("woff2"); font-weight: 600; font-display: swap; }
@font-face { font-family: "Sora"; src: url("fonts/sora-700.woff2") format("woff2"); font-weight: 700; font-display: swap; }
@font-face { font-family: "Atkinson Hyperlegible"; src: url("fonts/atkinson-400.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Atkinson Hyperlegible"; src: url("fonts/atkinson-700.woff2") format("woff2"); font-weight: 700; font-display: swap; }
:root {
  --night: #0d0a1c;
  --night-2: #151030;
  --blue: #3b5bdb;
  --purple: #6b3fa0;
  --orange: #f2884b;
  --text: #f1edf9;
  --muted: #aaa3c4;
  --line: rgba(255, 255, 255, 0.09);
  --grad: linear-gradient(90deg, var(--blue), var(--purple) 50%, var(--orange));
  --display: "Sora", "Segoe UI", Arial, sans-serif;
  --body: "Atkinson Hyperlegible", "Segoe UI", Arial, sans-serif;
}
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--night);
  color: var(--text);
  font-family: var(--body);
  font-size: 1.0625rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--orange); text-underline-offset: 3px; }
a:hover { color: var(--text); }
:focus-visible { outline: 2px solid var(--orange); outline-offset: 3px; border-radius: 4px; }

.wrap { max-width: 1040px; margin: 0 auto; padding-left: 1.5rem; padding-right: 1.5rem; }

/* Hero : un horizon de coucher de soleil, bleu nuit vers orange */
.hero {
  position: relative;
  overflow: hidden;
  padding-top: env(safe-area-inset-top, 0px);
  background:
    radial-gradient(120% 70% at 75% 115%, rgba(242,136,75,0.85) 0%, rgba(201,92,110,0.55) 22%, rgba(107,63,160,0.45) 45%, rgba(59,91,219,0.22) 68%, transparent 85%),
    linear-gradient(180deg, var(--night) 0%, var(--night-2) 100%);
}
.hero::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 1px;
  background: var(--grad);
  opacity: 0.8;
}

nav { display: flex; justify-content: space-between; align-items: center; padding-top: 1.4rem; padding-bottom: 1.4rem; }
.mark { font-family: var(--display); font-weight: 700; font-size: 1.15rem; color: var(--text); text-decoration: none; }
nav ul { display: flex; gap: 1.75rem; list-style: none; margin: 0; padding: 0; }
nav ul a { color: var(--muted); text-decoration: none; font-size: 0.95rem; }
nav ul a:hover { color: var(--text); }

.hero-body { padding-top: clamp(4rem, 14vh, 9rem); padding-bottom: clamp(5rem, 16vh, 10rem); }
.hero h1 {
  font-family: var(--display);
  font-weight: 700;
  font-size: clamp(2.8rem, 9vw, 5.75rem);
  line-height: 1;
  letter-spacing: -0.035em;
  margin: 0 0 1.25rem;
}
.role { font-family: var(--display); font-weight: 600; font-size: clamp(1.15rem, 2.6vw, 1.5rem); margin: 0 0 1rem; color: #ffd2b5; }
.intro { max-width: 33em; margin: 0 0 2.25rem; color: var(--muted); font-size: 1.125rem; }
.actions { display: flex; flex-wrap: wrap; gap: 0.75rem; }
.btn {
  display: inline-block;
  padding: 0.75rem 1.35rem;
  border-radius: 999px;
  text-decoration: none;
  font-weight: 700;
  font-size: 0.98rem;
}
.btn-main { background: var(--text); color: var(--night); }
.btn-main:hover { background: #ffd2b5; color: var(--night); }
.btn-ghost { color: var(--text); border: 1px solid rgba(255,255,255,0.28); }
.btn-ghost:hover { border-color: var(--text); color: var(--text); }

/* En bref */
.facts {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1rem;
  margin-top: -2.5rem;
  position: relative;
}
.fact {
  background: rgba(21, 16, 48, 0.92);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 1.15rem 1.25rem;
}
.fact dt { color: var(--muted); font-size: 0.9rem; }
.fact dd { margin: 0.2rem 0 0; font-family: var(--display); font-weight: 600; font-size: 1.05rem; line-height: 1.35; }

/* Sections */
section.block {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 2.3fr);
  gap: 1.5rem 4rem;
  padding-top: 5rem;
  padding-bottom: 5rem;
  border-bottom: 1px solid var(--line);
}
section.block h2 {
  font-family: var(--display);
  font-weight: 700;
  font-size: clamp(1.7rem, 3.5vw, 2.2rem);
  letter-spacing: -0.02em;
  line-height: 1.1;
  margin: 0;
}
/* La colonne de gauche entière reste visible au défilement, sans chevaucher la légende */
section.block > div:first-child {
  position: sticky;
  top: calc(1.5rem + env(safe-area-inset-top, 0px));
  align-self: start;
}
.lede { color: var(--muted); margin: 0.6rem 0 0; font-size: 0.98rem; max-width: 17em; }

/* Frise : la ligne reprend le dégradé, du plus récent (orange) au plus ancien (bleu) */
.timeline { list-style: none; margin: 0; padding: 0; position: relative; }
.timeline::before {
  content: "";
  position: absolute;
  left: 6px; top: 10px; bottom: 10px;
  width: 2px;
  border-radius: 2px;
  background: linear-gradient(180deg, var(--orange), var(--purple) 50%, var(--blue));
}
.timeline > li { position: relative; padding: 0 0 2.5rem 2.25rem; max-width: 38em; }
.timeline > li:last-child { padding-bottom: 0; }
.timeline > li:last-child::after {
  content: "";
  position: absolute;
  left: 3px; top: 21px; bottom: -12px;
  width: 8px;
  background: var(--night);
}
.timeline > li::before {
  content: "";
  position: absolute;
  left: 0; top: 7px;
  width: 14px; height: 14px;
  border-radius: 50%;
  background: var(--night);
  border: 2px solid var(--text);
}
.timeline h3 { font-family: var(--display); font-weight: 600; font-size: 1.25rem; line-height: 1.3; margin: 0; }
.where { color: #ffd2b5; margin: 0.15rem 0 0; }
.when { color: var(--muted); font-size: 0.95rem; margin: 0.1rem 0 0; }
.note { color: var(--muted); margin: 0.5rem 0 0; }


.roles { list-style: none; margin: 0.85rem 0 0; padding: 0; display: grid; gap: 0.6rem; }
.card {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 0.25rem 1rem;
  width: 100%;
  padding: 0.8rem 1rem;
  background: var(--night-2);
  border: 1px solid var(--line);
  border-radius: 10px;
  color: inherit;
  font: inherit;
  text-align: left;
}
.label { display: inline-flex; align-items: center; gap: 0.6rem; }
.label strong { font-weight: 700; }
.date { color: var(--muted); font-size: 0.95rem; }
button.card, .chip, .legend-btn { cursor: pointer; transition: opacity .2s, border-color .2s, background-color .2s; }
button.card:hover { border-color: rgba(255, 255, 255, 0.28); }

/* Pastilles de couleur : une couleur par poste */
:root { --c-asr: #f2884b; --c-techsi: #b98af0; --c-promosoft: #5f86ff; --c-cardif: #4fc3c8; }
.pips { display: inline-flex; flex: none; }
.pip { width: 9px; height: 9px; border-radius: 50%; background: var(--c); box-shadow: 0 0 0 2px var(--night-2); }
.pip + .pip { margin-left: -2px; }

/* États de liaison */
.is-dim { opacity: 0.3; }
.card.is-lit { border-color: var(--c, var(--orange)); box-shadow: inset 0 0 0 1px var(--c, var(--orange)); }
.chip.is-lit { border-color: var(--c, var(--orange)); background: rgba(242, 136, 75, 0.16); }
.chip[aria-pressed="true"], .legend-btn[aria-pressed="true"] { border-color: var(--text); background: rgba(255, 255, 255, 0.12); }
button.card[aria-pressed="true"] { border-color: var(--text); box-shadow: inset 0 0 0 1px var(--text); }

/* Légende */
.legend { list-style: none; margin: 1.25rem 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 0.45rem; }
.legend-btn {
  display: inline-flex; align-items: center; gap: 0.45rem;
  font: inherit; font-size: 0.88rem; color: var(--text);
  padding: 0.3rem 0.75rem 0.3rem 0.6rem;
  border-radius: 999px;
  background: transparent;
  border: 1px solid var(--line);
}
.legend-btn .pip { box-shadow: none; }

/* Barre de filtre en bas d'écran */
.filterbar {
  position: fixed;
  left: 50%;
  bottom: calc(1rem + env(safe-area-inset-bottom, 0px));
  transform: translateX(-50%);
  z-index: 10;
  display: flex; align-items: center; gap: 0.9rem;
  width: max-content; max-width: calc(100% - 2rem);
  padding: 0.55rem 0.6rem 0.55rem 1.1rem;
  background: rgba(21, 16, 48, 0.96);
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 999px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.45);
  font-size: 0.92rem;
}
.filterbar[hidden] { display: none; }
.filterbar span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.filterbar a { white-space: nowrap; font-weight: 700; }
.filterbar button {
  font: inherit; font-size: 0.88rem; color: var(--text);
  background: rgba(255, 255, 255, 0.1); border: 0; border-radius: 999px;
  padding: 0.35rem 0.8rem; cursor: pointer; white-space: nowrap;
}

/* Compétences */
.skills { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.9rem; }
.skill {
  background: var(--night-2);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 1.1rem 1.2rem 1.2rem;
}
.skill-wide { grid-column: 1 / -1; }
.skill h3 { font-family: var(--display); font-weight: 600; font-size: 1.1rem; margin: 0 0 0.75rem; }
.skill p { color: var(--muted); margin: 0.75rem 0 0; font-size: 0.95rem; }
.chips { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 0.45rem; }
.chip {
  display: inline-flex; align-items: center; gap: 0.45rem;
  font: inherit; font-size: 0.9rem; color: var(--text);
  padding: 0.28rem 0.75rem;
  border-radius: 999px;
  background: rgba(107, 63, 160, 0.28);
  border: 1px solid rgba(255, 255, 255, 0.08);
}
.chip:hover { border-color: rgba(255, 255, 255, 0.3); }
.chip .pip { box-shadow: 0 0 0 2px #2a1f45; }

/* Homelab */
:root { --c-homelab: #f06ba8; --c-cesi: #f5c451; }
.link-btn { margin-top: 1.25rem; }
.lab { display: grid; gap: 0.9rem; }
.machine-pair { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.9rem; }
.machine {
  background: var(--night-2);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 1.1rem 1.2rem 1.2rem;
}
.machine h3 { font-family: var(--display); font-weight: 600; font-size: 1.15rem; margin: 0; }
.specs { color: var(--muted); font-size: 0.95rem; margin: 0.2rem 0 0.9rem; }
.role-note { margin: 0; }
.tag {
  font-size: 0.88rem;
  padding: 0.25rem 0.7rem;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  color: var(--text);
}
.dots { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.4rem; }
.dots li { position: relative; padding-left: 1.1rem; color: var(--muted); }
.dots li::before {
  content: "";
  position: absolute;
  left: 0; top: 0.62em;
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--grad);
}

.cloud { padding: 0.75rem 0.2rem 0; }
.cloud h4 { font-family: var(--display); font-weight: 600; font-size: 1rem; margin: 0 0 0.3rem; color: #ffd2b5; }
.cloud p { margin: 0; color: var(--muted); }

/* Évolution du homelab : du plus ancien (bleu) au plus récent (orange) */
.evo { margin-top: 1.5rem; }
.evo summary {
  display: inline-flex; align-items: center; gap: 0.6rem;
  cursor: pointer; list-style: none;
  font-weight: 700; font-size: 0.98rem;
  padding: 0.6rem 1.1rem;
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 999px;
}
.evo summary::-webkit-details-marker { display: none; }
.evo summary::after { content: "+"; font-size: 1.15rem; line-height: 1; color: var(--orange); }
.evo[open] summary::after { content: "−"; }
.evo summary:hover { border-color: var(--text); }
.more { display: grid; gap: 0.9rem; margin-top: 1.25rem; }

.memo { display: inline-block; margin: 0.4rem 0 0 0.2rem; font-size: 0.92rem; font-weight: 700; }
.cert { margin-top: 2.5rem; }
.cert-title { font-family: var(--display); font-weight: 600; font-size: 1.25rem; margin: 0; }

/* Sécurité et sauvegarde mises en avant : bordure en dégradé */
.skill-key, .priority {
  border: 1px solid transparent;
  background:
    linear-gradient(var(--night-2), var(--night-2)) padding-box,
    linear-gradient(120deg, var(--blue), var(--purple) 50%, var(--orange)) border-box;
}
.priorities { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.9rem; margin-top: 0.4rem; }
.priority { border-radius: 14px; padding: 1.1rem 1.2rem 1.2rem; }
.priority h4 { font-family: var(--display); font-weight: 600; font-size: 1.1rem; margin: 0 0 0.6rem; color: var(--text); }
.lab-next { color: var(--muted); margin: 0.9rem 0.2rem 0; font-size: 0.95rem; }

/* Contact */
.contact {
  margin-top: 5rem;
  margin-bottom: 4rem;
  padding: clamp(2rem, 6vw, 3.5rem);
  border-radius: 20px;
  background:
    radial-gradient(90% 140% at 100% 100%, rgba(242,136,75,0.55), transparent 60%),
    radial-gradient(90% 140% at 0% 0%, rgba(59,91,219,0.45), transparent 60%),
    var(--night-2);
  border: 1px solid var(--line);
}
.contact h2 { font-family: var(--display); font-weight: 700; font-size: clamp(1.6rem, 4vw, 2.4rem); letter-spacing: -0.02em; line-height: 1.15; margin: 0 0 0.75rem; max-width: 16em; }
.contact p { color: var(--muted); margin: 0 0 1.75rem; max-width: 30em; }

footer { color: var(--muted); font-size: 0.9rem; padding-top: 1.5rem; padding-bottom: calc(2.5rem + env(safe-area-inset-bottom, 0px)); border-top: 1px solid var(--line); }

@media (max-width: 980px) {
  .facts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 760px) {
  nav ul { gap: 1.1rem; }
  .facts { grid-template-columns: 1fr; }
  section.block { grid-template-columns: 1fr; padding-top: 3.5rem; padding-bottom: 3.5rem; }
  section.block > div:first-child { position: static; }
  .lede { max-width: none; }
}
@media (max-width: 480px) {
  .skills { grid-template-columns: 1fr; }
  .machine-pair, .priorities { grid-template-columns: 1fr; }
  .fb-long { display: none; }
}
/* Menu compact sur mobile : bouton qui ouvre un panneau déroulant */
.menu-btn { display: none; }
@media (max-width: 640px) {
  nav { position: relative; }
  .menu-btn {
    display: inline-flex; align-items: center; justify-content: center;
    width: 44px; height: 44px; padding: 0;
    background: transparent; color: var(--text);
    border: 1px solid rgba(255, 255, 255, 0.18); border-radius: 12px;
    cursor: pointer;
  }
  .menu-btn:hover { border-color: rgba(255, 255, 255, 0.4); }
  .menu-icon, .menu-icon::before, .menu-icon::after {
    display: block; width: 18px; height: 2px; border-radius: 2px;
    background: currentColor; transition: transform .2s, opacity .2s;
  }
  .menu-icon { position: relative; }
  .menu-icon::before, .menu-icon::after { content: ""; position: absolute; left: 0; }
  .menu-icon::before { top: -6px; }
  .menu-icon::after { top: 6px; }
  .menu-btn[aria-expanded="true"] .menu-icon { background: transparent; }
  .menu-btn[aria-expanded="true"] .menu-icon::before { transform: translateY(6px) rotate(45deg); background: var(--text); }
  .menu-btn[aria-expanded="true"] .menu-icon::after { transform: translateY(-6px) rotate(-45deg); background: var(--text); }

  nav ul {
    display: none;
    position: absolute; top: calc(100% - 0.6rem); left: 1.5rem; right: 1.5rem; z-index: 20;
    flex-direction: column; gap: 0;
    padding: 0.4rem;
    background: var(--night-2);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 14px;
    box-shadow: 0 14px 34px rgba(0, 0, 0, 0.5);
  }
  nav ul.open { display: flex; }
  nav ul a { display: block; padding: 0.75rem 0.9rem; font-size: 1rem; color: var(--text); border-radius: 10px; }
  nav ul a:hover, nav ul a:focus-visible { background: rgba(255, 255, 255, 0.07); }
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } .menu-icon, .menu-icon::before, .menu-icon::after { transition: none; } }
