/* ═══════════════════════════════════════════
   VARIABLES
═══════════════════════════════════════════ */
:root {
  --primary-color: #ff7271;
  --secondary-color: #51abb2;
  --background-color: #339097;
  --text-color: #ffffff;
  --glow-color: rgba(255, 117, 165, 0.5);
  --card-bg: rgba(255, 255, 255, 0.05);
  --nav-h: 64px;
  --projects-header-h: 80px; /* fallback, écrasé par JS */
}

/* ═══════════════════════════════════════════
   RESET & BASE
═══════════════════════════════════════════ */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-snap-type: y proximity;
  overflow-x: hidden;
}

body {
  font-family: 'JetBrains Mono', monospace;
  background-color: var(--background-color);
  color: var(--text-color);
  line-height: 1.6;
  overflow-x: hidden;
}

/* ═══════════════════════════════════════════
   SCROLL SNAP — sections ancrées
═══════════════════════════════════════════ */
#home,
#projects,
#contact {
  scroll-snap-align: start;
  scroll-snap-stop: always;
  scroll-margin-top: calc(var(--nav-h) - 1rem);
}

/* ═══════════════════════════════════════════
   GLOWING EFFECTS
═══════════════════════════════════════════ */
.glow-text {
  text-shadow: 0 0 10px var(--glow-color);
}

.glow-icon {
  color: var(--primary-color);
  font-size: 1.5rem;
  transition: all 0.3s;
}
.glow-icon:hover {
  text-shadow: 0 0 10px var(--glow-color);
  transform: scale(1.1);
}

.glow-link::after {
  content: '';
  position: absolute;
  bottom: -5px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--primary-color);
  transition: width 0.3s;
  box-shadow: 0 0 10px var(--glow-color);
}
.glow-link:hover::after {
  width: 100%;
}

/* ═══════════════════════════════════════════
   BOUTONS
═══════════════════════════════════════════ */
.glow-button {
  padding: 0.8rem 1.5rem;
  border: 0.5px solid rgba(255, 255, 255, 0.1);
  border-radius: 0;
  background: transparent;
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  color: rgba(255, 255, 255, 0.9);
  font-weight: 400;
  cursor: pointer;
  transition: all 0.3s;
  box-shadow: 0 0 20px var(--glow-color);
  text-decoration: none;
}
.glow-button:hover {
  transform: translateY(-2px);
  background: var(--primary-color);
  border-color: rgba(255, 255, 255, 0.4);
  box-shadow: 0 0 30px var(--glow-color);
  color: var(--secondary-color);
  font-weight: 600;
}
.glow-button.outline {
  background: transparent;
  border: 0.5px solid rgba(255, 255, 255, 0.15);
  color: rgba(255, 255, 255, 0.9);
  font-weight: 400;
}
.glow-button.outline:hover {
  background: var(--secondary-color);
  border-color: rgba(255, 255, 255, 0.4);
  box-shadow: 0 0 30px var(--glow-color);
  color: var(--primary-color);
  font-weight: 600;
}

/* ═══════════════════════════════════════════
   #HOME
═══════════════════════════════════════════ */
#home {
  height: 100svh;
    display: grid;
    grid-template-rows: 1fr auto;
    align-items: center;
    justify-items: center;
    position: relative;
    overflow: hidden;
}

.particle-background {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: radial-gradient(circle at center, var(--glow-color) 0%, transparent 70%);
  opacity: 0.1;
}

.content {
  text-align: center;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.6rem;
}

.cta-buttons {
  display: flex;
  gap: 1rem;
  margin-top: 0.5rem;
  flex-wrap: wrap;
  justify-content: center;
}

/* Titre glitch arc-en-ciel */
.glitch-title {
  font-family: 'JetBrains Mono', monospace;
  font-size: clamp(2rem, 5vw, 4rem);
  font-weight: 900;
  letter-spacing: -0.02em;
  background: linear-gradient(90deg,
    #ff00ff, #ffff00, #00ffff,
    #ff00ff, #ffff00, #00ffff, #ff00ff
  );
  background-size: 300% auto;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: rainbow-shift 30s linear infinite, neon-pulse 3s ease-in-out infinite;
}

@keyframes rainbow-shift {
  0%   { background-position: 0% center; }
  100% { background-position: 300% center; }
}

@keyframes neon-pulse {
  0%, 100% { filter:
    drop-shadow(0 0 6px rgba(255,255,255,0.7))
    drop-shadow(0 0 18px rgba(255,255,255,0.35))
    drop-shadow(0 0 35px rgba(255,255,255,0.15));
  }
  50% { filter:
    drop-shadow(0 0 12px rgba(255,255,255,1))
    drop-shadow(0 0 30px rgba(255,255,255,0.6))
    drop-shadow(0 0 60px rgba(255,255,255,0.3));
  }
}

.typing-text {
  min-height: 2em;
  display: block;
}

/* ═══════════════════════════════════════════
   #ABOUT
═══════════════════════════════════════════ */
#about {
  min-height: 70vh;
  height: auto;
  padding: var(--nav-h) 2rem var(--projects-header-h) 2rem;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  scroll-margin-top: var(--nav-h);
}

.section-title {
  text-align: center;
  font-size: 2.5rem;
  margin-bottom: auto;
}

.about-content {
  display: flex;
  gap: 4rem;
  max-width: 1200px;
  margin: 0 auto;
}

.profile-card {
  flex: 1;
  background: var(--card-bg);
  padding: 1rem 2rem 0 1rem;
  border-radius: 10px;
  text-align: center;
  transform-style: preserve-3d;
  transition: transform 0.3s;
}

.profile-card img {
  width: 200px;
  height: 200px;
  border-radius: 50%;
  border: none;
  box-shadow: 0 0 25px var(--glow-color), 0 0 60px var(--glow-color);
  margin-bottom: 1rem;
}

.social-links {
  display: flex;
  justify-content: center;
  gap: 1rem;
}

/* Bio toggle */
.bio-suite {
  max-height: 0 !important;


  overflow: hidden;
  transition: max-height 0.6s ease;
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.7);
  text-align: justify;
  margin-top: 0;
}
.bio-suite.open {
  max-height: 600px !important;
  margin-bottom: calc(var(--nav-h) + 1.5rem)!important;
}
.bio-toggle {
  background: none;
  border: none;
  color: var(--primary-color);
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.75rem;
  cursor: pointer;
  margin-top: 0.5rem;
  padding: 0;
  letter-spacing: 0.05em;
}
.bio-toggle:hover {
  text-decoration: underline;
}

/* ═══════════════════════════════════════════
   #PROJECTS
═══════════════════════════════════════════ */
#projects.section {

  overflow: hidden;
  padding-block: 2svh;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
   padding-bottom: 3svh;
}

#projects .section-wrapper {
  display: flex !important;
  flex-direction: column;
  align-items: center;
  width: 100%;
}

#projects .header {
  text-align: center;
  padding-top: 0;
  margin-bottom: 1svh;
}

#projects .hgroup {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.2em;
}

#projects .section-title {
  font-size: clamp(1.4rem, 2.5vw, 2.8rem);
}

.typing-title {
  display: inline-block;
  min-height: 1.2em;
}

.scrolling-words {
  min-height: 1.5em;
  overflow: hidden;
  text-align: center;
  font-size: clamp(0.9rem, 1.5vw, 1.6rem);
}
.scrolling-words p {
  margin: 0;
  opacity: 1;
  transition: none;
}

/* Carousel */
.album-cover {
  width: 100%;
  flex: 1;
  display: flex;
  align-items: center;
}

.album-cover .swiper {
  width: 100%;
  padding: 1svh 0 2svh;
  overflow: visible !important;
}

.album-cover .swiper-slide {
  position: relative;
  aspect-ratio: 1 / 1;
  border-radius: 12px;
  width: 77vw;
}

@media (min-width: 768px) {
  .album-cover .swiper-slide { width: auto; }
}

.album-cover .swiper-slide img {
  object-fit: cover;
  width: 100%;
  height: 100%;
  border-radius: inherit;
  pointer-events: none;
  user-select: none;
}

.album-cover .overlay { display: none; }

.album-cover .swiper-slide-active .overlay {
  display: flex;
  align-items: center;
  justify-content: center;
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
  border-radius: inherit;
  opacity: 0;
  transition: opacity 0.4s linear;
}
.album-cover .swiper-slide-active:hover .overlay { opacity: 1; }

.album-cover .swiper-slide .overlay i {
  font-size: clamp(1.4rem, 3vw, 2.2rem);
  color: #c8b8a2;
  opacity: 0;
  transition: opacity 0.3s;
}
.album-cover .swiper-slide-active:hover .overlay i { opacity: 1; }

/* Info panel */
.proj-info-panel {
  width: 90vw;
  margin: 0 auto;
  padding: 0 4vw 1svh;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.proj-info-panel h3 {
  height: 2.8em;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-wrap: balance;
  font-size: clamp(1.1rem, 3vw, 2.2rem);
  font-weight: 800;
  line-height: 1.3;
}

.proj-info-panel p {
  height: 3em;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  font-size: clamp(0.8rem, 2vw, 1.3rem);
  font-style: italic;
  opacity: 0.6;
  margin-bottom: 1svh;
}

/* Barre de progression */
.proj-progress {
  width: 100%;
  margin: 0 auto 1.2em;
  appearance: none;
  -webkit-appearance: none;
  height: 5px;
  background: rgba(163, 162, 164, 0.2);
  border-radius: 4px;
  cursor: pointer;
  outline: none;
}
.proj-progress::-webkit-slider-thumb {
  appearance: none;
  -webkit-appearance: none;
  width: 14px;
  aspect-ratio: 1 / 1;
  border-radius: 50%;
  background: rgba(200, 184, 162, 0.9);
  outline: 3px solid rgba(228, 228, 229, 0.6);
  box-shadow: 0 0 30px var(--glow-color);
  cursor: pointer;
}
.proj-progress::-moz-range-thumb {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: rgba(200, 184, 162, 0.9);
  outline: 3px solid rgba(228, 228, 229, 0.6);
  border: none;
  cursor: pointer;
}

/* Contrôles */
.proj-controls {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: clamp(1rem, 4vw, 2rem);
}

.proj-controls button {
  display: flex;
  align-items: center;
  justify-content: center;
  width: clamp(44px, 12vw, 58px);
  aspect-ratio: 1 / 1;

  background: rgba(163, 162, 164, 0.15);
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: rgba(255, 255, 255, 0.9);
  font-size: clamp(0.8rem, 1.5vw, 1rem);
  cursor: pointer;
  transition: all 0.3s;
  box-shadow: 0 0 20px var(--glow-color);
}
.proj-controls button:hover {
  border-color: rgba(255, 255, 255, 0.4);
  box-shadow: 0 0 30px var(--glow-color);
  color: var(--secondary-color);
}
.proj-controls .proj-play {
  transform: scale(1.3);
}

/* ═══════════════════════════════════════════
   #CONTACT
═══════════════════════════════════════════ */
#contact {
  min-height: 100svh;
  height: auto;
  padding: calc(var(--nav-h) - 1rem) 2rem clamp(3rem, 8vh, 6rem);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.02);
}

.contact-container {
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: 4rem;
  max-width: 1200px;
  width: 100%;
  margin: 0 auto;
}

.contact-info {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.info-item {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.contact-form {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.form-group {
  position: relative;
}

.form-group input,
.form-group textarea {
  width: 100%;
  padding: 1rem;
  background: var(--card-bg);
  border: none;
  border-radius: 5px;
  color: var(--text-color);
  font-size: 1rem;
}

.form-group textarea {
  height: 150px;
  resize: none;
}

.focus-border {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--primary-color);
  transition: width 0.3s;
}
.form-group input:focus ~ .focus-border,
.form-group textarea:focus ~ .focus-border {
  width: 100%;
}

/* ═══════════════════════════════════════════
   BACK TO TOP
═══════════════════════════════════════════ */
.back-to-top {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s;
}
.back-to-top.visible {
  opacity: 1;
  visibility: visible;
}

/* ═══════════════════════════════════════════
   ANIMATIONS
═══════════════════════════════════════════ */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}

[data-aos] {
  opacity: 0;
  transform: translateY(20px);
  transition: all 0.8s;
}
[data-aos].aos-animate {
  opacity: 1;
  transform: translateY(0);
}

/* ═══════════════════════════════════════════
   CSS PROPERTIES
═══════════════════════════════════════════ */
@layer reset, base, utilities, components, layout, overrides;

@property --angle {
  syntax: '<angle>';
  initial-value: 0deg;
  inherits: false;
}

@property --direction {
  syntax: '<number>';
  initial-value: 1;
  inherits: true;
}

/* ═══════════════════════════════════════════
   RESPONSIVE — desktop
═══════════════════════════════════════════ */
@media (min-width: 769px) {
  .proj-info-panel { width: 70vw; }
}

@media (min-width: 1024px) {
  .proj-info-panel { width: 45vw; }
}

@media (min-width: 1440px) {
  .proj-info-panel { width: 40vw; }
}

@media (min-width: 1920px) {
  .proj-info-panel { width: 35vw; }
}

/* ═══════════════════════════════════════════
   RESPONSIVE — mobile (tout regroupé ici)
═══════════════════════════════════════════ */
@media (max-width: 768px) {

  /* Nav */
  .nav-links { display: none; }

  /* About */
  .about-content { flex-direction: column; }

  #about {
    padding-top: calc(var(--nav-h) - 3rem) !important;
    padding-bottom: 0 !important;
  }

  /* Projects */
  #projects.section {

    overflow: hidden;
    padding: 2svh 0;
    justify-content: space-evenly;
    align-items: stretch;
    gap: 0;
  }

  #projects .section-wrapper {
    height: 100%;
    flex: 1;
  }

  #projects .header {
    margin-bottom: 0;
    padding-bottom: 3svh;
  }

  .album-cover {
    flex: none;
  }

  .album-cover .swiper {
    padding: 2svh 0;
    touch-action: pan-x;
  }

  .album-cover .swiper-slide {
    width: 65vw;
  }

  .proj-info-panel {
    width: 90vw;
    gap: 0.5rem;
    padding: 2svh 4vw 0;
  }

  .proj-info-panel h3 {

    font-size: clamp(1.2rem, 5.5vw, 1.7rem);
  }

  .proj-info-panel p {
    height: 2.8em;
    font-size: clamp(0.75rem, 3vw, 0.95rem);
    margin-bottom: 1svh;
  }

  .proj-progress {
    margin: 2svh auto 2svh;
  }

  .proj-controls {
    margin-bottom: 1svh;
  }

  /* Contact */
  .contact-container { grid-template-columns: 1fr; }

  #contact .contact-info {
    margin-top: 1rem;
    align-items: flex-end;
    text-align: right;
    gap: 0.5rem;
  }

  #contact .contact-info .social-links {
    justify-content: flex-end !important;
  }
}
