/* ==========================================================================
   Nodeline — portfolio public

   Une barre de navigation en verre qui flotte au-dessus du contenu, des
   sections aérées, des cartes tonales lisibles. Le verre sert ce qui
   surnage ; le texte repose toujours sur une surface pleine.
   ========================================================================== */

html { scroll-behavior: smooth; scroll-padding-top: 6.5rem; }
.site { --max: 74rem; }

/* --------------------------------------------------------------------------
   Barre du haut — îlot de verre détaché du bord
   -------------------------------------------------------------------------- */

.topbar {
  position: sticky; top: 0; z-index: 40;
  padding: 0.75rem var(--gutter) 0;
  padding-top: max(0.75rem, env(safe-area-inset-top));
  transition: padding var(--dur-l) var(--ease);
}
.topbar__inner {
  display: flex; align-items: center; gap: 1.25rem;
  max-width: var(--max); margin: 0 auto; padding: 0.5rem 0.6rem 0.5rem 1.1rem;
  border-radius: var(--r-full);
  background: var(--glass-strong);
  border: 1px solid var(--glass-line);
  box-shadow: var(--glass-sheen), var(--e1);
  transition: box-shadow var(--dur-l) var(--ease), background var(--dur-l);
}
@supports ((-webkit-backdrop-filter: blur(1px)) or (backdrop-filter: blur(1px))) {
  .topbar__inner {
    background: var(--glass);
    -webkit-backdrop-filter: var(--glass-blur);
    backdrop-filter: var(--glass-blur);
  }
}
.topbar.is-scrolled .topbar__inner { box-shadow: var(--glass-sheen), var(--e3); }

.topbar .logo { font-size: 1.0625rem; }
.topbar .logo__mark { width: 1.9rem; }

.topbar__nav { margin-left: auto; }
.topbar__nav ul { display: flex; gap: 0.15rem; }
.topbar__nav a:not(.btn) {
  position: relative; display: block;
  padding: 0.5rem 0.95rem; border-radius: var(--r-full);
  text-decoration: none; font-weight: 550; font-size: 0.9375rem;
  color: var(--on-surface-variant);
  transition: background var(--dur-m) var(--ease), color var(--dur-m);
}
.topbar__nav a:not(.btn):hover { background: color-mix(in srgb, var(--on-surface) 7%, transparent); color: var(--on-surface); }
.topbar__nav a.is-active { color: var(--primary); background: color-mix(in srgb, var(--primary) 14%, transparent); font-weight: 650; }

.topbar__actions { display: flex; align-items: center; gap: 0.35rem; }
.topbar .theme-toggle { width: 2.4rem; height: 2.4rem; }
.topbar__cta-mobile { display: none; }
.topbar__burger { display: none; }

@media (max-width: 899px) {
  .topbar__actions { margin-left: auto; }
  .topbar__cta { display: none; }
  .topbar__burger {
    display: inline-grid; place-content: center; gap: 5px;
    width: 2.4rem; height: 2.4rem; padding: 0;
    border: 0; border-radius: 50%; background: var(--primary-container);
    transition: background var(--dur-m);
  }
  .topbar__burger span {
    display: block; width: 17px; height: 2px; border-radius: 2px;
    background: var(--on-primary-container);
    transition: transform var(--dur-m) var(--ease);
  }
  .topbar__burger[aria-expanded="true"] span:first-child { transform: translateY(3.5px) rotate(45deg); }
  .topbar__burger[aria-expanded="true"] span:last-child { transform: translateY(-3.5px) rotate(-45deg); }

  .topbar__nav {
    position: absolute; left: var(--gutter); right: var(--gutter); top: calc(100% + 0.5rem);
    margin: 0; padding: 0.75rem;
    border-radius: var(--r-xl);
    background: var(--glass-strong);
    border: 1px solid var(--glass-line);
    box-shadow: var(--glass-sheen), var(--e4);
    display: grid; gap: 0.6rem;
    transform: translateY(-0.75rem) scale(0.98); transform-origin: top center;
    opacity: 0; visibility: hidden;
    transition: transform var(--dur-m) var(--ease), opacity var(--dur-s), visibility var(--dur-m);
  }
  @supports ((-webkit-backdrop-filter: blur(1px)) or (backdrop-filter: blur(1px))) {
    .topbar__nav { background: var(--glass); -webkit-backdrop-filter: var(--glass-blur); backdrop-filter: var(--glass-blur); }
  }
  .topbar__nav.is-open { transform: none; opacity: 1; visibility: visible; }
  .topbar__nav ul { display: grid; gap: 0.15rem; }
  .topbar__nav a:not(.btn) { padding: 0.85rem 1rem; font-size: 1.0625rem; font-weight: 600; color: var(--on-surface); border-radius: var(--r-md); }
  .topbar__cta-mobile { display: inline-flex; }
}

/* --------------------------------------------------------------------------
   Ouverture
   -------------------------------------------------------------------------- */

.hero {
  display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
  align-items: center; gap: 2rem 4rem;
  max-width: calc(var(--max) + var(--gutter) * 2); margin: 0 auto;
  padding: clamp(3rem, 7vw, 6rem) var(--gutter) clamp(3.5rem, 8vw, 7rem);
}
.hero__text { display: grid; gap: 1.35rem; justify-items: start; }

.hero .status {
  padding: 0.4rem 0.9rem 0.4rem 0.8rem; border-radius: var(--r-full);
  background: var(--glass-strong); border: 1px solid var(--glass-line);
  box-shadow: var(--glass-sheen);
}
@supports ((-webkit-backdrop-filter: blur(1px)) or (backdrop-filter: blur(1px))) {
  .hero .status { background: var(--glass); -webkit-backdrop-filter: var(--glass-blur); backdrop-filter: var(--glass-blur); }
}

.hero__title { font-size: var(--h1); font-weight: 800; line-height: 0.98; letter-spacing: -0.04em; }
.hero__title span { display: inline-block; }
.hero__title span:last-child {
  background: linear-gradient(102deg, var(--primary), color-mix(in srgb, var(--secondary) 72%, var(--primary)));
  -webkit-background-clip: text; background-clip: text;
  color: transparent;
}
.hero__role { display: flex; flex-wrap: wrap; align-items: center; gap: 0.35rem 0.9rem; font-size: var(--text-lg); font-weight: 600; }
.hero__place { display: inline-flex; align-items: center; gap: 0.3rem; font-weight: 450; color: var(--on-surface-variant); font-size: 1rem; }
.hero__tagline { max-width: 36ch; font-size: var(--text-lg); line-height: 1.55; color: var(--on-surface-variant); }
.hero__tagline em, .lead em, .section__intro em, .contact h2 em { font-style: normal; color: var(--primary); font-weight: 650; }
.hero__actions { display: flex; flex-wrap: wrap; gap: 0.75rem; margin-top: 0.35rem; }
.hero .btn { min-height: 3rem; padding-inline: 1.75rem; font-size: 1rem; }

.hero__art { justify-self: center; width: min(100%, 29rem); }
.hero__portrait { position: relative; }
.hero__portrait img {
  position: absolute; left: 42%; top: 16%; width: 38%; aspect-ratio: 1; object-fit: cover;
  border-radius: 50%; border: 5px solid var(--surface); box-shadow: var(--e3);
}

@media (max-width: 899px) {
  .hero { grid-template-columns: 1fr; padding-top: 2rem; }
  .hero__art { order: -1; width: min(64%, 17rem); justify-self: start; }
}

/* Tracé animé de l'illustration */
.js .art__line { stroke-dasharray: 260; stroke-dashoffset: 260; animation: draw 1s var(--ease) forwards; }
.js .art__line:nth-child(2) { animation-delay: 0.15s; }
.js .art__line:nth-child(3) { animation-delay: 0.3s; }
.js .art__line:nth-child(4) { animation-delay: 0.45s; }
.js .art__line:nth-child(5) { animation-delay: 0.6s; }
.js .art__node { transform-box: fill-box; transform-origin: center; animation: pop 0.7s var(--ease-spring) both; }
.js .art__node--accent { animation-delay: 0.1s; }
.js .art__node--ring { animation-delay: 0.35s; }
.js .art__node--coral { animation-delay: 0.5s; }
.js .art__node--ink { animation-delay: 0.65s; }
.js .art__node--sun { animation-delay: 0.8s; }
.js .art__node--dot { animation-delay: 0.9s; }

/* --------------------------------------------------------------------------
   Sections
   -------------------------------------------------------------------------- */

.section { position: relative; padding: clamp(3.5rem, 8vw, 6.5rem) var(--gutter); }
.section__inner { max-width: var(--max); margin: 0 auto; }

/* Bande teintée : un voile tonal translucide, pas un flou plein écran —
   flouter toute la largeur coûte cher et n'apporte rien sur un fond plat. */
.section--tinted::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: var(--glass);
  border-block: 1px solid var(--glass-line);
}

.eyebrow {
  display: inline-flex; align-items: center; gap: 0.55rem;
  margin-bottom: 0.85rem; padding: 0.3rem 0.85rem 0.3rem 0.7rem;
  border-radius: var(--r-full);
  background: color-mix(in srgb, var(--primary) 12%, transparent);
  font-weight: 650; font-size: var(--text-sm); letter-spacing: 0.02em; color: var(--primary);
}
.eyebrow::before { content: ""; width: 0.45rem; height: 0.45rem; border-radius: 50%; background: currentColor; }
.eyebrow--light { background: rgba(255, 255, 255, 0.18); color: #fff; }

.section__title { font-size: var(--h2); font-weight: 750; letter-spacing: -0.032em; max-width: 22ch; }
.section__subtitle { font-size: var(--h3); font-weight: 700; margin: 3.25rem 0 1.5rem; }
.section__intro { max-width: 54ch; margin-top: 0.9rem; font-size: var(--text-lg); color: var(--on-surface-variant); }
.lead {
  max-width: 32ch; font-family: var(--font-display);
  font-size: var(--h2); font-weight: 700; line-height: 1.18; letter-spacing: -0.028em;
}
.prose { display: grid; gap: 0.9rem; color: var(--on-surface-variant); }

/* Profil */
.profil { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: 2.5rem 4rem; margin-top: 2.5rem; align-items: start; }
.profil__body { max-width: 62ch; }
.facts { display: grid; gap: 0.6rem; }
.facts__item {
  padding: 1rem 1.25rem; border-radius: var(--r-md);
  background: var(--card); box-shadow: inset 0 0 0 1px var(--outline);
  transition: box-shadow var(--dur-m) var(--ease);
}
.facts__item:hover { box-shadow: inset 0 0 0 1px var(--outline-strong), var(--e1); }
.facts__item dt { font-size: var(--text-xs); font-weight: 600; color: var(--on-surface-muted); letter-spacing: 0.02em; }
.facts__item dd { margin-top: 0.1rem; font-size: 1.0625rem; font-weight: 650; }
@media (max-width: 899px) { .profil { grid-template-columns: 1fr; } }

/* --------------------------------------------------------------------------
   Parcours
   -------------------------------------------------------------------------- */

.timeline { list-style: none; padding: 0; margin-top: 2.5rem; display: grid; gap: 1rem; position: relative; }
.timeline::before {
  content: ""; position: absolute; left: 0.85rem; top: 1.75rem; bottom: 1.75rem; width: 2px;
  border-radius: 2px; transform: translateX(-50%);
  background: linear-gradient(to bottom, var(--primary), color-mix(in srgb, var(--outline) 80%, transparent));
}
.timeline--education::before { background: linear-gradient(to bottom, var(--tertiary), color-mix(in srgb, var(--outline) 80%, transparent)); }

.timeline__item { position: relative; padding-left: 2.75rem; }
.timeline__node {
  position: absolute; left: 0.85rem; top: 1.6rem; width: 0.9rem; height: 0.9rem; border-radius: 50%;
  background: var(--surface); box-shadow: inset 0 0 0 3px var(--outline-strong);
  transform: translateX(-50%);
}
.timeline__item--current .timeline__node {
  background: var(--primary); box-shadow: inset 0 0 0 3px var(--primary), 0 0 0 5px color-mix(in srgb, var(--primary) 20%, transparent);
}
.timeline--education .timeline__node { box-shadow: inset 0 0 0 3px var(--tertiary); }

.timeline__card {
  display: grid; gap: 0.5rem; padding: 1.4rem 1.5rem;
  border-radius: var(--r-lg);
  background: var(--card); box-shadow: inset 0 0 0 1px var(--outline);
  transition: box-shadow var(--dur-m) var(--ease), transform var(--dur-m) var(--ease);
}
.timeline__card:hover { transform: translateY(-2px); box-shadow: inset 0 0 0 1px transparent, var(--e3); }
.timeline__card h3 { font-size: var(--h3); font-weight: 700; }
.timeline__period { display: inline-flex; align-items: center; gap: 0.4rem; font-weight: 600; font-size: var(--text-sm); color: var(--primary); }
.timeline--education .timeline__period { color: var(--tertiary); }
.timeline__org { font-weight: 550; }
.timeline__card .chips { margin-top: 0.3rem; }

@media (max-width: 559px) {
  .timeline .timeline__item { padding-left: 2.3rem; }
  .timeline .timeline__card { padding: 1.2rem 1.25rem; }
}

/* --------------------------------------------------------------------------
   Projets
   -------------------------------------------------------------------------- */

.projects { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 21rem), 1fr)); gap: 1.25rem; margin-top: 2.5rem; }
.project {
  display: flex; flex-direction: column; overflow: hidden;
  border-radius: var(--r-xl);
  background: var(--card); box-shadow: inset 0 0 0 1px var(--outline);
  transition: transform var(--dur-l) var(--ease), box-shadow var(--dur-l) var(--ease);
}
.project:hover { transform: translateY(-5px); box-shadow: inset 0 0 0 1px transparent, var(--e4); }

.project__cover { aspect-ratio: 16 / 10; overflow: hidden; }
.project__cover img, .project__cover svg { width: 100%; height: 100%; object-fit: cover; }
.project__cover--0 { background: linear-gradient(140deg, #4a4cc4, #6d5ce0 60%, #8f6be0); }
.project__cover--1 { background: linear-gradient(140deg, #c1462a, #e0693f 60%, #e08a4a); }
.project__cover--2 { background: linear-gradient(140deg, #16161f, #2b2b3d 60%, #3c3c56); }
.project__cover--3 { background: linear-gradient(140deg, #00857c, #12a08f 60%, #35b8a0); }

.cover__line { fill: none; stroke-width: 9; stroke-linecap: round; stroke: rgba(255, 255, 255, 0.9); }
.cover__ring { fill: none; stroke-width: 9; stroke: rgba(255, 255, 255, 0.9); }
.cover__fill { fill: #fff; }
.cover__dot { fill: rgba(0, 0, 0, 0.45); }
.project__cover--2 .cover__fill { fill: #bcbdff; }
.project__cover--2 .cover__dot { fill: #16161f; }

.project__body { display: grid; gap: 0.6rem; padding: 1.4rem 1.5rem 1.5rem; align-content: start; flex: 1; }
.project__meta { font-size: var(--text-xs); font-weight: 600; color: var(--on-surface-muted); letter-spacing: 0.02em; }
.project__title { font-size: var(--h3); font-weight: 720; }
.project__summary { color: var(--on-surface-variant); }
.project__more { margin-top: 0.2rem; border-top: 1px solid var(--outline); padding-top: 0.85rem; }
.project__more summary {
  display: inline-flex; align-items: center; gap: 0.4rem; cursor: pointer; list-style: none;
  font-weight: 650; font-size: var(--text-sm); color: var(--primary);
}
.project__more summary::-webkit-details-marker { display: none; }
.project__more summary .icon { transition: transform var(--dur-m) var(--ease); }
.project__more[open] summary .icon { transform: rotate(180deg); }
.project__more .prose { margin-top: 0.85rem; }
.project__links { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-top: 1rem; }

/* --------------------------------------------------------------------------
   Compétences
   -------------------------------------------------------------------------- */

.legend { display: flex; flex-wrap: wrap; gap: 0.5rem 1.4rem; margin-top: 1.4rem; font-size: var(--text-sm); font-weight: 550; color: var(--on-surface-variant); }
.legend__item { display: inline-flex; align-items: center; gap: 0.5rem; }
.level { display: inline-flex; gap: 3px; flex: none; }
.level i { width: 0.5rem; height: 0.5rem; border-radius: 2px; background: var(--outline); }
.level--1 i:nth-child(1), .level--2 i:nth-child(-n+2), .level--3 i { background: var(--primary); }

.skills { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 16rem), 1fr)); gap: 1rem; margin-top: 2rem; }
.skills__group {
  padding: 1.4rem 1.5rem; border-radius: var(--r-lg);
  background: var(--card); box-shadow: inset 0 0 0 1px var(--outline);
}
.skills__group h3 { font-size: 1.125rem; font-weight: 700; margin-bottom: 0.6rem; }
.skills__list { list-style: none; padding: 0; }
.skills__list li {
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  padding: 0.6rem 0; border-top: 1px solid var(--outline); font-weight: 500;
}
.skills__list li:first-child { border-top: 0; }

/* --------------------------------------------------------------------------
   Contact
   -------------------------------------------------------------------------- */

.contact { padding-top: clamp(2.5rem, 6vw, 4.5rem); }
.contact__panel {
  position: relative; overflow: hidden; isolation: isolate;
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 2.5rem clamp(2rem, 5vw, 4.5rem); align-items: start;
  max-width: var(--max); margin: 0 auto; padding: clamp(2rem, 5vw, 4rem);
  border-radius: var(--r-2xl);
  background: linear-gradient(135deg, #3f42b8, #5a4fd6 45%, #7a52c4);
  color: #fff;
}
:root[data-theme="dark"] .contact__panel { background: linear-gradient(135deg, #23246b, #342f86 45%, #472f7a); }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .contact__panel { background: linear-gradient(135deg, #23246b, #342f86 45%, #472f7a); }
}

.contact__art { position: absolute; left: -2.5rem; bottom: -3.5rem; width: 17rem; z-index: -1; opacity: 0.16; }
.contact__art path { stroke: #fff; }
.contact__art circle { fill: #fff; }

.contact__intro { display: grid; gap: 1rem; align-content: start; }
.contact h2 { font-size: var(--h2); font-weight: 780; letter-spacing: -0.032em; color: #fff; }
.contact h2 em { color: #ffd9a0; }
.contact__text { font-size: var(--text-lg); color: rgba(255, 255, 255, 0.86); max-width: 40ch; }

.contact__mail {
  display: inline-flex; align-items: center; gap: 0.65rem; justify-self: start; margin-top: 0.4rem;
  padding: 0.8rem 1.25rem; border-radius: var(--r-full);
  background: rgba(255, 255, 255, 0.16); border: 1px solid rgba(255, 255, 255, 0.28);
  color: #fff; font-weight: 600; text-decoration: none; overflow-wrap: anywhere;
  transition: background var(--dur-m), transform var(--dur-m) var(--ease);
}
@supports ((-webkit-backdrop-filter: blur(1px)) or (backdrop-filter: blur(1px))) {
  .contact__mail { -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); }
}
.contact__mail:hover { background: rgba(255, 255, 255, 0.26); transform: translateY(-2px); }
.contact__mail .icon { color: #ffd9a0; }

.contact__links { display: flex; flex-wrap: wrap; gap: 0.45rem; }
.contact__links a {
  display: inline-flex; align-items: center; gap: 0.4rem;
  padding: 0.5rem 1rem; border-radius: var(--r-full);
  background: rgba(255, 255, 255, 0.12); color: #fff; font-weight: 550; font-size: var(--text-sm);
  text-decoration: none; transition: background var(--dur-m);
}
.contact__links a:hover { background: rgba(255, 255, 255, 0.24); }

.contact__form {
  display: grid; gap: 1rem; padding: clamp(1.4rem, 3vw, 2rem);
  border-radius: var(--r-xl);
  background: var(--glass-strong); border: 1px solid var(--glass-line);
  color: var(--on-surface); box-shadow: var(--glass-sheen), var(--e4);
}
@supports ((-webkit-backdrop-filter: blur(1px)) or (backdrop-filter: blur(1px))) {
  .contact__form { background: color-mix(in srgb, var(--card) 86%, transparent); -webkit-backdrop-filter: var(--glass-blur); backdrop-filter: var(--glass-blur); }
}
.contact__form h3 { font-size: 1.3125rem; font-weight: 720; }
.contact__trap { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.contact__privacy { font-size: var(--text-xs); text-align: center; }

@media (max-width: 899px) {
  .contact__panel { grid-template-columns: 1fr; }
  .contact { padding-inline: 0.75rem; }
}

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

.footer { padding: 2.5rem var(--gutter) max(2.5rem, env(safe-area-inset-bottom)); }
.footer__inner {
  display: flex; flex-wrap: wrap; align-items: center; gap: 1rem 2rem;
  max-width: var(--max); margin: 0 auto; padding-top: 2rem;
  border-top: 1px solid var(--outline);
}
.footer__inner .subtle { font-size: var(--text-sm); }
.footer__space {
  margin-left: auto; display: inline-flex; align-items: center; gap: 0.45rem;
  padding: 0.55rem 1rem; border-radius: var(--r-full);
  background: var(--surface-container); box-shadow: inset 0 0 0 1px var(--outline);
  text-decoration: none; font-weight: 600; font-size: var(--text-sm); color: var(--on-surface-variant);
  transition: background var(--dur-m), color var(--dur-m);
}
.footer__space:hover { background: var(--surface-high); color: var(--on-surface); }

/* --------------------------------------------------------------------------
   Apparitions
   -------------------------------------------------------------------------- */

.js [data-reveal] { opacity: 0; transform: translateY(18px); transition: opacity 0.6s ease, transform 0.7s var(--ease); }
.js [data-reveal].is-in { opacity: 1; transform: none; }

@keyframes draw { to { stroke-dashoffset: 0; } }
@keyframes pop { from { transform: scale(0); } to { transform: scale(1); } }

@media print {
  body::before { display: none; }
  .topbar, .contact__form, .theme-toggle, .footer__space { display: none !important; }
  .js [data-reveal] { opacity: 1; transform: none; }
}
