/* ============================================================
   Portfolio QA — Michael Belcastro
   Thème : navy profond + néons violet/bleu (palette du logo)
   ============================================================ */

:root {
  --bg: #0e0c22;
  --bg-sidebar: #12102a;
  --bg-chrome: #161331;
  --panel: rgba(24, 21, 52, .7);
  --border: rgba(150, 120, 255, .2);
  --border-soft: rgba(150, 120, 255, .14);
  --purple: #b16cf2;
  --cyan: #58c6f2;
  --green: #3ddc97;
  --yellow: #f2c94c;
  --red: #f25c8a;
  --text: #e8e6f5;
  --text-soft: #b8b3d4;
  --text-dim: #9a94b8;
  --text-faint: #6b6590;
  --gradient: linear-gradient(90deg, var(--purple), var(--cyan));
  --font-display: 'Chakra Petch', sans-serif;
  --font-body: 'IBM Plex Sans', system-ui, sans-serif;
  --font-mono: 'IBM Plex Mono', monospace;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
}

a { color: var(--cyan); text-decoration: none; }
a:hover { color: var(--purple); }

/* ---------- Animations ---------- */
@keyframes float {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(-14px); }
}
@keyframes glow {
  0%, 100% { opacity: .5; }
  50%      { opacity: 1; }
}

/* ---------- Barre "app chrome" ---------- */
.chrome {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 18px;
  background: var(--bg-chrome);
  border-bottom: 1px solid rgba(150, 120, 255, .16);
}
.chrome__dots { display: flex; gap: 7px; }
.dot { width: 11px; height: 11px; border-radius: 50%; }
.dot--red    { background: var(--red); }
.dot--yellow { background: var(--yellow); }
.dot--green  { background: var(--green); }
.chrome__title {
  flex: 1;
  text-align: center;
  font: 500 12.5px var(--font-mono);
  color: var(--text-dim);
}
.lang-btn {
  cursor: pointer;
  padding: 4px 11px;
  border: 1px solid rgba(150, 120, 255, .35);
  border-radius: 6px;
  background: none;
  color: var(--purple);
  font: 600 11.5px var(--font-mono);
}
.lang-btn:hover { background: rgba(177, 108, 242, .12); }

/* ---------- Layout ---------- */
.layout {
  display: grid;
  grid-template-columns: 260px 1fr;
  min-height: 100vh;
}

/* ---------- Sidebar ---------- */
.sidebar {
  border-right: 1px solid var(--border-soft);
  background: var(--bg-sidebar);
  padding: 24px 18px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  /* La sidebar reste visible et suit le défilement */
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
}
.sidebar__top { display: flex; align-items: center; justify-content: space-between; }
.profile { display: flex; align-items: center; gap: 12px; padding: 0 6px 20px; }

/* Bouton menu burger (mobile uniquement) */
.burger {
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  width: 44px;
  height: 44px;
  background: none;
  border: 1px solid rgba(150, 120, 255, .35);
  border-radius: 8px;
  cursor: pointer;
}
.burger span {
  display: block;
  width: 18px;
  height: 2px;
  border-radius: 1px;
  background: var(--purple);
}

.nav { display: flex; flex-direction: column; gap: 6px; }
.profile img { width: 44px; height: 44px; }
.profile__name { font: 700 14px var(--font-display); letter-spacing: .04em; }
.profile__role { font: 400 11px var(--font-mono); color: var(--text-dim); }

.nav-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 12px;
  border-radius: 8px;
  font: 500 13px var(--font-body);
  color: var(--text-soft);
}
.nav-item:hover { background: rgba(177, 108, 242, .08); color: var(--text-soft); }
.nav-item--active {
  background: linear-gradient(90deg, rgba(177, 108, 242, .18), rgba(88, 198, 242, .12));
  border: 1px solid rgba(150, 120, 255, .35);
  color: var(--text);
}
.nav-item__count { font: 600 11px var(--font-mono); color: var(--text-faint); }
.nav-item--active .nav-item__count { color: var(--purple); }

.status-card {
  margin-top: auto;
  padding: 14px 12px;
  border-radius: 10px;
  border: 1px solid rgba(61, 220, 151, .25);
  background: rgba(61, 220, 151, .06);
}
.status-card__head {
  display: flex;
  align-items: center;
  gap: 8px;
  font: 600 12px var(--font-mono);
  color: var(--green);
}
.status-card__pulse {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 8px var(--green);
  animation: glow 2s infinite;
}
.status-card__body { font: 400 11.5px/1.5 var(--font-body); color: var(--text-dim); margin-top: 6px; }

/* ---------- Main ---------- */
.main {
  padding: 28px 32px 340px;
  display: grid;
  gap: 26px;
  align-content: start;
  max-width: 1100px;
  width: 100%;
  /* Contenu centré dans la colonne */
  justify-self: center;
}
.section-title {
  font: 700 15px var(--font-display);
  letter-spacing: .1em;
  color: var(--text-dim);
  margin: 0 0 12px;
}

/* ---------- Badges ---------- */
.badge {
  padding: 3px 10px;
  border-radius: 5px;
  font: 700 11px var(--font-mono);
  letter-spacing: .08em;
}
.badge--critical { background: rgba(242, 92, 138, .15);  border: 1px solid rgba(242, 92, 138, .5);  color: var(--red); }
.badge--open     { background: rgba(88, 198, 242, .12);  border: 1px solid rgba(88, 198, 242, .4);  color: var(--cyan); }
.badge--progress { background: rgba(242, 201, 76, .1);   border: 1px solid rgba(242, 201, 76, .4);  color: var(--yellow); letter-spacing: .06em; padding: 4px 11px; }
.badge--resolved { background: rgba(61, 220, 151, .1);   border: 1px solid rgba(61, 220, 151, .4);  color: var(--green);  letter-spacing: .06em; padding: 4px 11px; }
.badge--archived { background: rgba(107, 101, 144, .12); border: 1px solid rgba(107, 101, 144, .45); color: var(--text-dim); letter-spacing: .06em; padding: 4px 11px; }
.badge--passed   { background: rgba(61, 220, 151, .1);   border: 1px solid rgba(61, 220, 151, .4);  color: var(--green); font-size: 10.5px; padding: 3px 9px; }

.ticket-id { font: 600 12.5px var(--font-mono); color: var(--text-faint); }

/* ---------- Ticket héros ---------- */
.hero {
  border: 1px solid rgba(242, 92, 138, .4);
  border-radius: 12px;
  background: var(--panel);
  overflow: hidden;
  box-shadow: 0 0 30px rgba(177, 108, 242, .12);
}
.hero__bar {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 22px;
  border-bottom: 1px solid var(--border-soft);
  background: rgba(242, 92, 138, .06);
}
.hero__bar .ticket-id { color: var(--text-dim); }
.hero__sprint { margin-left: auto; font: 400 12px var(--font-mono); color: var(--text-faint); }
.hero__body {
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 10px;
  align-items: center;
  padding: 30px 24px 32px;
  background: radial-gradient(ellipse 420px 300px at 88% 50%, rgba(139, 150, 242, .14), transparent 65%);
}
.hero__title { font: 700 28px/1.2 var(--font-display); margin: 0; }
.hero__desc { font: 400 15px/1.7 var(--font-body); color: var(--text-soft); margin-top: 12px; max-width: 640px; }
.hero__steps-label {
  font: 600 13px var(--font-mono);
  color: var(--text-dim);
  display: block;
  margin-bottom: 6px;
}
.hero__tags { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 18px; }
.tag {
  padding: 4px 10px;
  border-radius: 5px;
  font: 500 12px var(--font-mono);
}
.tag--purple { background: rgba(177, 108, 242, .1); border: 1px solid rgba(177, 108, 242, .35); color: var(--purple); }
.tag--cyan   { background: rgba(88, 198, 242, .1);  border: 1px solid rgba(88, 198, 242, .3);  color: var(--cyan); }
.hero__actions { display: flex; align-items: center; gap: 14px; margin-top: 22px; }
.hero__assignee { font: 400 12.5px var(--font-mono); color: var(--text-faint); }

.btn-primary {
  display: inline-block;
  padding: 12px 24px;
  border-radius: 8px;
  background: var(--gradient);
  color: #0c0a1d;
  font: 700 13.5px var(--font-display);
  letter-spacing: .06em;
}
.btn-primary:hover { color: #0c0a1d; filter: brightness(1.1); }

/* Logo flottant + circuits */
.hero__logo {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
  align-self: stretch;
}
.hero__logo-hex {
  width: 190px;
  height: 190px;
  clip-path: polygon(50% 0%, 100% 25%, 100% 75%, 50% 100%, 0% 75%, 0% 25%);
  filter: drop-shadow(0 0 36px rgba(139, 150, 242, .55));
  animation: float 6s ease-in-out infinite;
}
.hero__logo-perspective { width: 100%; height: 100%; perspective: 1200px; }
.hero__logo-rotator {
  position: relative;
  width: 100%;
  height: 100%;
  transform-style: preserve-3d;
  transition: transform 1s cubic-bezier(.4, .1, .2, 1);
  transform: rotateY(0deg);
}
.hero__logo-rotator.is-flipped { transform: rotateY(180deg); }
.hero__logo-face {
  position: absolute;
  inset: 0;
  backface-visibility: hidden;
  overflow: hidden;
}
.hero__logo-face--front {
  background: radial-gradient(ellipse at 50% 40%, rgba(139, 150, 242, .18), #161331);
  display: flex;
  align-items: center;
  justify-content: center;
}
.hero__logo-face--front img { width: 70%; height: 70%; object-fit: contain; }
.hero__logo-face--back { transform: rotateY(180deg); }
.hero__logo-face--back img { width: 100%; height: 100%; object-fit: cover; object-position: 35% 40%; }
.circuit { position: absolute; height: 2px; }
.circuit--top    { top: 16%; right: 2%; width: 90px;  background: linear-gradient(90deg, transparent, var(--purple)); }
.circuit--bottom { bottom: 12%; left: 0; width: 110px; background: linear-gradient(90deg, var(--cyan), transparent); }
.circuit-node { position: absolute; width: 9px; height: 9px; border-radius: 50%; }
.circuit-node--top    { top: 16%; right: 0;   border: 2px solid var(--purple); box-shadow: 0 0 10px rgba(177, 108, 242, .8); }
.circuit-node--bottom { bottom: 12%; left: -2%; border: 2px solid var(--cyan);   box-shadow: 0 0 10px rgba(88, 198, 242, .8); }

/* ---------- Tickets expériences ---------- */
.ticket-list { display: grid; gap: 10px; }
.ticket {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px 20px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--panel);
}
.ticket:hover { border-color: rgba(177, 108, 242, .55); }
.ticket .ticket-id { width: 56px; }
.ticket__content { flex: 1; }
.ticket__title { font: 600 15.5px var(--font-body); }
.ticket__meta { font: 400 12.5px var(--font-mono); color: var(--text-dim); margin-top: 3px; }

/* ---------- Projets ---------- */
.projects {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}
.project {
  display: flex;
  flex-direction: column;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--panel);
  overflow: hidden;
}
.project:hover { border-color: rgba(177, 108, 242, .55); }
.project__img {
  height: 130px;
  overflow: hidden;
  border-bottom: 1px solid var(--border-soft);
}
.project__img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.project__img--logo {
  display: flex;
  align-items: center;
  justify-content: center;
  background: #f2f0ea;
}
.project__img--logo img { max-height: 34px; max-width: 70%; width: auto; height: auto; object-fit: contain; }
.project__body { display: flex; flex-direction: column; flex: 1; padding: 16px 18px 18px; }
.project__head { display: flex; align-items: center; gap: 10px; }
.project__title { font: 600 17px var(--font-display); margin-top: 10px; }
.project__desc { font: 400 13.5px/1.65 var(--font-body); color: var(--text-dim); margin-top: 6px; }
.project__link { margin-top: auto; padding-top: 14px; font: 600 12.5px var(--font-mono); }

/* ---------- Certification ---------- */
.cert {
  display: flex;
  align-items: center;
  gap: 24px;
  padding: 22px 26px;
  border: 1px solid rgba(61, 220, 151, .3);
  border-radius: 10px;
  background:
    radial-gradient(ellipse 320px 200px at 8% 50%, rgba(61, 220, 151, .07), transparent 70%),
    var(--panel);
}
.cert:hover { border-color: rgba(61, 220, 151, .55); }
.cert__seal {
  flex: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  width: 84px;
  height: 84px;
  clip-path: polygon(50% 0%, 100% 25%, 100% 75%, 50% 100%, 0% 75%, 0% 25%);
  background: linear-gradient(150deg, rgba(61, 220, 151, .22), rgba(88, 198, 242, .18));
  border: none;
}
.cert__seal-level { font: 700 13px var(--font-display); letter-spacing: .1em; color: var(--green); }
.cert__seal-num { font: 500 11px var(--font-mono); color: var(--text-dim); }
.cert__content { flex: 1; }
.cert__head { display: flex; align-items: center; gap: 10px; }
.cert__name { font: 700 20px var(--font-display); margin: 8px 0 0; }
.cert__meta { font: 400 13.5px/1.6 var(--font-body); color: var(--text-dim); margin: 6px 0 0; }
.cert__link { display: inline-block; margin-top: 12px; font: 600 12.5px var(--font-mono); }

/* ---------- Stack & outils ---------- */
.stack { display: flex; flex-wrap: wrap; gap: 10px; }
.stack-item {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--panel);
  font: 600 13px var(--font-mono);
  color: var(--text-soft);
}
.stack-item:hover { border-color: rgba(177, 108, 242, .55); }
.stack-item__check { color: var(--green); font-weight: 700; }

/* ---------- Contact ---------- */
.contact {
  display: flex;
  align-items: center;
  gap: 18px;
  border: 1px dashed rgba(150, 120, 255, .35);
  border-radius: 10px;
  padding: 20px 24px;
  background: rgba(177, 108, 242, .04);
}
.contact__content { flex: 1; }
.contact__title { font: 600 16px var(--font-display); }
.contact__links { font: 400 13px var(--font-mono); color: var(--text-dim); margin-top: 5px; }

/* ---------- Footer ---------- */
.footer {
  text-align: center;
  font: 400 12px var(--font-mono);
  color: var(--text-faint);
}

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .layout { grid-template-columns: 1fr; }

  /* La sidebar devient une barre en haut de page */
  .sidebar {
    position: static;
    height: auto;
    overflow: visible;
    border-right: none;
    border-bottom: 1px solid var(--border-soft);
    padding: 14px 16px;
  }
  .profile { padding: 0; }

  /* Menu burger : la nav est repliée par défaut */
  .burger { display: flex; }
  .nav { display: none; padding-top: 12px; }
  .nav--open { display: flex; }

  /* Carte « Disponible » : flottante en bas à droite, suit le scroll */
  .status-card {
    position: fixed;
    bottom: 14px;
    right: 14px;
    z-index: 60;
    margin: 0;
    max-width: 220px;
    background: linear-gradient(rgba(61, 220, 151, .08), rgba(61, 220, 151, .08)) var(--bg-sidebar);
    box-shadow: 0 8px 24px rgba(0, 0, 0, .5);
  }

  .hero__body { grid-template-columns: 1fr; }
  .hero__logo { min-height: 220px; }
  .projects { grid-template-columns: 1fr; }
  .cert { flex-direction: column; align-items: flex-start; gap: 16px; }
}
