/* ================================================
   JACQUES-ARMAND MONNY — Portfolio
   Style : Aristide Benoist × Violet dark
   ================================================ */

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

:root {
  --bg:            #07070f;
  --surface:       #0d0d1a;
  --text:          #ecedf8;
  --muted:         #6a6880;
  --accent:        #8b78ff;
  --accent-dim:    rgba(139,120,255,0.10);
  --accent-border: rgba(139,120,255,0.28);
  --border:        #18182e;
  --serif:         'Cormorant Garamond', Georgia, serif;
  --sans:          'Inter', system-ui, sans-serif;
  --condensed:     'Barlow Condensed', sans-serif;
  --ease:          cubic-bezier(0.25,0.46,0.45,0.94);
  --ease-out:      cubic-bezier(0.16,1,0.3,1);
}

html { scroll-behavior: smooth; font-size: 16px; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-weight: 300;
  line-height: 1.65;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

img { display: block; width: 100%; height: 100%; object-fit: cover; }
a   { color: inherit; text-decoration: none; }


/* ================================================
   GRAIN
   ================================================ */
.grain {
  position: fixed;
  inset: -50%;
  width: 200%; height: 200%;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 512 512' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.75' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  background-size: 200px 200px;
  opacity: 0.035;
  pointer-events: none;
  z-index: 9999;
  animation: grainMove 0.8s steps(2) infinite;
}
@keyframes grainMove {
  0%   { transform: translate(0,0); }
  25%  { transform: translate(-2%,3%); }
  50%  { transform: translate(3%,-1%); }
  75%  { transform: translate(-1%,-3%); }
  100% { transform: translate(2%,1%); }
}


/* ================================================
   CURSEUR
   ================================================ */
.cursor, .cursor-dot { display: none; }


/* ================================================
   UTILITAIRES
   ================================================ */
.section-label {
  font-size: 0.66rem;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 1rem;
}
.section-title {
  font-family: var(--serif);
  font-size: clamp(2.2rem,4.5vw,3.6rem);
  font-weight: 300;
  color: var(--text);
}
.reveal { opacity: 0; transform: translateY(28px); transition: opacity .9s var(--ease), transform .9s var(--ease); }
.reveal.is-visible { opacity: 1; transform: none; }


/* ================================================
   NAV
   ================================================ */
.nav {
  position: fixed;
  inset-block-start: 0; inset-inline: 0;
  z-index: 100;
  padding: 1.4rem 4vw;
  transition: background .5s, border-color .5s;
  border-bottom: 1px solid transparent;
}
.nav--scrolled {
  background: rgba(7,7,15,0.90);
  backdrop-filter: blur(18px);
  border-color: var(--border);
}
.nav__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.nav__logo {
  font-family: var(--condensed);
  font-weight: 700;
  font-size: 0.95rem;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--text);
  transition: opacity .3s;
}
.nav__logo:hover { opacity: .6; }

/* Barre de progression centrale */
.nav__progress {
  display: flex;
  align-items: center;
  gap: 0.9rem;
}
.nav__idx, .nav__total {
  font-size: 0.62rem;
  letter-spacing: 0.16em;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}
.nav__track {
  width: 110px;
  height: 1px;
  background: rgba(255,255,255,0.08);
}
.nav__fill {
  height: 100%;
  background: var(--accent);
  transition: width .7s var(--ease);
}

/* Liens droite */
.nav__right {
  display: flex;
  gap: 2rem;
}
.nav__right a {
  font-size: 0.62rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--muted);
  transition: color .3s;
}
.nav__right a:hover { color: var(--text); }


/* ================================================
   STAGE — plein écran
   ================================================ */
.stage {
  position: relative;
  height: 100svh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}


/* ================================================
   VUE GRILLE — mini cards
   ================================================ */
.stage-grid {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2.5rem;
  transition: opacity .5s var(--ease), transform .5s var(--ease);
}
.stage-grid.is-hidden {
  opacity: 0;
  pointer-events: none;
  transform: scale(0.97);
}
.stage-grid__label {
  font-size: 0.6rem;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--muted);
}

/* Rangée de cards */
.mini-cards {
  display: flex;
  gap: 3px;
  align-items: stretch;
}

/* Card individuelle */
.mini-card {
  position: relative;
  width: 65px;
  height: 290px;
  overflow: hidden;
  background: var(--surface);
  border: 1px solid rgba(255,255,255,0.06);
  cursor: pointer;
  transition: width .6s var(--ease), border-color .4s;
  padding: 0;
  flex-shrink: 0;
}
.mini-card:hover {
  border-color: rgba(255,255,255,0.16);
}

.mini-card__img {
  position: absolute;
  inset: 0;
}
.mini-card__img img {
  width: 100%; height: 100%;
  object-fit: cover;
  object-position: top center;
  transition: transform .8s var(--ease), filter .4s;
  filter: brightness(0.55);
}
.mini-card:hover .mini-card__img img {
  transform: scale(1.05);
  filter: brightness(0.75);
}

/* Overlay texte en bas */
.mini-card__overlay {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 1.4rem 1.2rem;
  background: linear-gradient(to top, rgba(7,7,15,0.85) 0%, transparent 55%);
}
.mini-card__num {
  font-family: var(--condensed);
  font-weight: 700;
  font-size: 0.65rem;
  letter-spacing: 0.2em;
  color: var(--accent);
  margin-bottom: 0.4rem;
}
.mini-card__title {
  font-family: var(--serif);
  font-size: 1.1rem;
  font-weight: 300;
  color: var(--text);
  line-height: 1.2;
  margin-bottom: 0.3rem;
}
.mini-card__type {
  font-size: 0.58rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.4);
}


/* ================================================
   VUE DÉTAIL — plein écran au clic
   ================================================ */
.stage-detail {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity .6s var(--ease);
}
.stage-detail.is-active {
  opacity: 1;
  pointer-events: auto;
}

/* Lettres géantes en fond */
.detail-letters {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0;
  pointer-events: none;
  user-select: none;
}
.detail-letters span {
  font-family: var(--condensed);
  font-weight: 900;
  font-size: clamp(200px, 32vw, 520px);
  line-height: 0.82;
  color: rgba(255,255,255,0.055);
  letter-spacing: -0.02em;
  text-transform: uppercase;
}

/* Corps */
.detail-body {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.4rem;
  width: min(42vw, 580px);
}

/* Image */
.detail-img-wrap {
  display: block;
  width: 100%;
  aspect-ratio: 3/2;
  overflow: hidden;
  background: var(--surface);
}
.detail-img-wrap img {
  width: 100%; height: 100%;
  object-fit: cover;
  object-position: top center;
  transition: transform 1s var(--ease);
}
.detail-img-wrap:hover img { transform: scale(1.03); }

/* Pied */
.detail-foot {
  width: 100%;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 2rem;
  padding-top: 1.2rem;
  border-top: 1px solid rgba(255,255,255,0.07);
}
.detail-meta {
  display: flex;
  gap: 2.5rem;
}
.detail-meta-col {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}
.detail-meta-label {
  font-size: 0.56rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.28);
}
.detail-meta-val {
  font-size: 0.76rem;
  color: rgba(255,255,255,0.65);
  letter-spacing: 0.03em;
}
.detail-cta {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.6rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--accent);
  white-space: nowrap;
  transition: gap .3s;
  padding-top: 0.15rem;
}
.detail-cta:hover { gap: 1rem; }

/* Galerie projet (côté droit) */
.project-gallery {
  position: absolute;
  right: 2.5vw;
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  flex-direction: column;
  gap: 4px;
  z-index: 2;
}
.project-gallery__img {
  width: 72px;
  height: 50px;
  object-fit: cover;
  display: block;
  opacity: 0.45;
  border: 1px solid rgba(255,255,255,0.08);
  transition: opacity .3s;
}
.project-gallery__img:hover { opacity: 1; }

/* Bouton retour */
.detail-back {
  position: absolute;
  top: 5.5rem;
  left: 4vw;
  z-index: 3;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.6rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--muted);
  background: none;
  border: none;
  cursor: pointer;
  transition: color .3s;
}
.detail-back:hover { color: var(--text); }


/* ================================================
   BARRE BAS FIXE
   ================================================ */
.bottom-bar {
  position: fixed;
  bottom: 0; inset-inline: 0;
  z-index: 50;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  padding: 1.2rem 4vw;
  pointer-events: none;
}
.bottom-bar__left, .bottom-bar__right { pointer-events: auto; }

.bottom-bar__left {
  display: flex;
  flex-direction: column;
  gap: 0.18rem;
}
.bottom-bar__name {
  font-size: 0.6rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.25);
}
.bottom-bar__status {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.58rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: #5a9e6e;
}
.bottom-bar__status em {
  display: inline-block;
  width: 5px; height: 5px;
  background: #5a9e6e;
  border-radius: 50%;
  font-style: normal;
  animation: pulse 2s ease-in-out infinite;
}

.bottom-bar__right {
  display: flex;
  gap: 1.6rem;
}
.bottom-bar__right a {
  font-size: 0.58rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.25);
  transition: color .3s;
}
.bottom-bar__right a:hover { color: var(--text); }


/* ================================================
   À PROPOS
   ================================================ */
.about {
  padding: 9rem 5vw;
  border-top: 1px solid var(--border);
}
.about__inner {
  max-width: 1100px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 1.4fr;
  gap: 6rem;
  align-items: start;
}
.about__title {
  font-family: var(--serif);
  font-size: clamp(2.8rem,5vw,4.5rem);
  font-weight: 300;
  line-height: 1;
}
.about__title em { font-style: italic; color: var(--accent); }
.about__text {
  font-size: 0.92rem;
  color: var(--muted);
  line-height: 1.9;
  margin-bottom: 2rem;
}
.about__tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}
.about__tags span {
  font-size: 0.62rem;
  letter-spacing: 0.12em;
  padding: 0.3rem 0.8rem;
  border: 1px solid var(--border);
  color: var(--muted);
}


/* ================================================
   EXPÉRIENCES
   ================================================ */
.xp { padding: 9rem 5vw; border-top: 1px solid var(--border); }
.xp__inner { max-width: 1100px; margin: 0 auto; }
.xp__header { margin-bottom: 4rem; }
.xp__list { display: flex; flex-direction: column; gap: 0; }
.xp__item {
  display: grid;
  grid-template-columns: 180px 32px 1fr;
  gap: 0 1.5rem;
  padding-bottom: 3.5rem;
}
.xp__item-line { display: flex; flex-direction: column; align-items: center; position: relative; }
.xp__item-line::before {
  content: '';
  position: absolute;
  top: 8px; bottom: -3.5rem;
  width: 1px;
  background: var(--border);
  left: 50%;
  transform: translateX(-50%);
}
.xp__item:last-child .xp__item-line::before { display: none; }
.xp__dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--accent);
  border: 2px solid var(--bg);
  outline: 1px solid var(--accent-border);
  margin-top: 4px;
  flex-shrink: 0;
  position: relative; z-index: 1;
}
.xp__item-left { display: flex; flex-direction: column; gap: .3rem; padding-top: 2px; text-align: right; }
.xp__date { font-size: .72rem; color: var(--accent); letter-spacing: .04em; font-weight: 500; }
.xp__location { font-size: .65rem; color: var(--muted); letter-spacing: .06em; }
.xp__item-right { padding-bottom: .5rem; }
.xp__item-head { display: flex; align-items: baseline; gap: .8rem; flex-wrap: wrap; margin-bottom: 1rem; }
.xp__title { font-family: var(--serif); font-size: 1.4rem; font-weight: 400; color: var(--text); }
.xp__company { font-size: .7rem; letter-spacing: .16em; text-transform: uppercase; color: var(--muted); }
.xp__bullets { list-style: none; display: flex; flex-direction: column; gap: .45rem; margin-bottom: 1.2rem; }
.xp__bullets li { font-size: .84rem; color: var(--muted); line-height: 1.65; padding-left: 1rem; position: relative; }
.xp__bullets li::before { content: '—'; position: absolute; left: 0; color: var(--accent-border); font-size: .7rem; }
.xp__tags { display: flex; flex-wrap: wrap; gap: .4rem; }
.xp__tags span { font-size: .62rem; letter-spacing: .1em; padding: .3rem .7rem; border: 1px solid var(--border); color: var(--muted); border-radius: 2px; }


/* ================================================
   FORMATION
   ================================================ */
.formation { padding: 9rem 5vw; border-top: 1px solid var(--border); }
.formation__inner { max-width: 1100px; margin: 0 auto; }
.formation__header { margin-bottom: 4rem; }
.formation__grid { display: grid; grid-template-columns: repeat(2,1fr); gap: 1.5rem; margin-bottom: 5rem; }
.formation__card { border: 1px solid var(--border); padding: 2rem; transition: border-color .35s; }
.formation__card:hover { border-color: var(--accent-border); }
.formation__card-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 1.4rem; }
.formation__year { font-size: .68rem; letter-spacing: .1em; color: var(--accent); }
.formation__badge { font-size: .58rem; letter-spacing: .16em; text-transform: uppercase; padding: .25rem .65rem; border-radius: 20px; background: var(--accent-dim); color: var(--accent); border: 1px solid var(--accent-border); }
.formation__badge--done { background: rgba(90,158,110,.1); color: #5a9e6e; border-color: rgba(90,158,110,.3); }
.formation__degree { font-family: var(--serif); font-size: 1.5rem; font-weight: 400; color: var(--text); margin-bottom: .5rem; line-height: 1.2; }
.formation__spec { font-size: .8rem; color: var(--muted); margin-bottom: 1.2rem; line-height: 1.6; }
.formation__school { font-size: .65rem; letter-spacing: .18em; text-transform: uppercase; color: var(--accent); }

.skills { padding-top: 1rem; }
.skills__groups { display: flex; flex-direction: column; gap: 1.4rem; }
.skills__group { display: grid; grid-template-columns: 120px 1fr; gap: 1rem; align-items: start; padding-bottom: 1.4rem; border-bottom: 1px solid var(--border); }
.skills__group:last-child { border-bottom: none; }
.skills__group-label { font-size: .65rem; letter-spacing: .18em; text-transform: uppercase; color: var(--muted); padding-top: .3rem; }
.skills__tags { display: flex; flex-wrap: wrap; gap: .5rem; }
.skills__tags span { font-size: .72rem; padding: .35rem .85rem; border: 1px solid var(--border); color: var(--text); border-radius: 3px; transition: border-color .3s, color .3s; }
.skills__tags span:hover { border-color: var(--accent-border); color: var(--accent); }


/* ================================================
   CONTACT
   ================================================ */
.contact { padding: 11rem 5vw; border-top: 1px solid var(--border); }
.contact__inner { max-width: 960px; margin: 0 auto; }
.contact__top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 2rem; }
.contact__avail { display: flex; align-items: center; gap: .5rem; font-size: .62rem; letter-spacing: .2em; text-transform: uppercase; color: #5a9e6e; }
.contact__avail::before { content: ''; display: inline-block; width: 6px; height: 6px; background: #5a9e6e; border-radius: 50%; animation: pulse 2s ease-in-out infinite; }
.contact__title { font-family: var(--serif); font-size: clamp(3rem,8vw,7rem); font-weight: 300; line-height: .95; margin-bottom: 4rem; letter-spacing: -.01em; }
.contact__title em { font-style: italic; color: var(--accent); }
.contact__email { display: inline-flex; align-items: center; gap: 1.2rem; font-size: clamp(.85rem,1.4vw,1.05rem); letter-spacing: .06em; color: var(--muted); border-bottom: 1px solid var(--border); padding-bottom: 1rem; transition: color .35s, border-color .35s, gap .35s; }
.contact__email:hover { color: var(--text); border-color: var(--accent-border); gap: 2rem; }
.contact__arrow { flex-shrink: 0; transition: transform .35s var(--ease); }
.contact__email:hover .contact__arrow { transform: translateX(6px); }


/* ================================================
   FOOTER
   ================================================ */
.footer { padding: 2rem 5vw; border-top: 1px solid var(--border); position: relative; overflow: hidden; }
.footer__inner { max-width: 1440px; margin: 0 auto; display: flex; align-items: center; justify-content: space-between; position: relative; z-index: 1; }
.footer__name { font-family: var(--serif); font-size: .95rem; font-weight: 400; letter-spacing: .05em; color: var(--text); }
.footer__copy { font-size: .7rem; color: var(--muted); letter-spacing: .06em; }
.footer__watermark { position: absolute; right: -1vw; bottom: -.5em; font-family: var(--serif); font-size: clamp(5rem,16vw,14rem); font-weight: 300; font-style: italic; color: transparent; -webkit-text-stroke: 1px var(--border); line-height: 1; pointer-events: none; user-select: none; letter-spacing: -.04em; }


/* ================================================
   ANIMATIONS
   ================================================ */
@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50%       { opacity: .5; transform: scale(.8); }
}
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(22px); }
  to   { opacity: 1; transform: none; }
}


/* ================================================
   RESPONSIVE
   ================================================ */
@media (max-width: 900px) {
  .mini-card { width: 55px; height: 240px; }
  .mini-card:hover { width: 180px; }
  .detail-body { width: min(70vw, 480px); }
  .detail-letters span { font-size: clamp(120px, 24vw, 280px); }
  .project-gallery { display: none; }
  .about__inner { grid-template-columns: 1fr; gap: 3rem; }
}

@media (max-width: 640px) {
  .nav__progress { display: none; }
  .nav__right { gap: 1.2rem; }
  .mini-card { width: 48px; height: 200px; }
  .mini-card:hover { width: 160px; }
  .detail-body { width: 88vw; }
  .detail-letters span { font-size: clamp(80px, 28vw, 160px); }
  .detail-foot { flex-direction: column; gap: 1rem; }
  .detail-meta { gap: 1.2rem; flex-wrap: wrap; }
  .bottom-bar { padding: .9rem 5vw; }

  .xp__item { grid-template-columns: 1fr; grid-template-rows: auto auto auto; gap: .6rem; }
  .xp__item-left { text-align: left; flex-direction: row; gap: .8rem; align-items: center; }
  .xp__item-line { display: none; }

  .formation__grid { grid-template-columns: 1fr; }
  .skills__group { grid-template-columns: 1fr; gap: .6rem; }

  .contact__title { font-size: clamp(2.8rem,12vw,4rem); }
  .footer__inner { flex-direction: column; gap: .5rem; text-align: center; }
  .footer__watermark { display: none; }
}
