/* ============================================
   VARIABLES DARK ROSE TECH
   ============================================ */

:root {
  /* Palette Dark Rose */
  --rose-darkest: #8B4F6F;    /* Titres, accents forts */
  --rose-dark: #A0627C;       /* CTA, liens actifs */
  --rose-medium: #B5778A;     /* Hover, secondaire */
  --rose-light: #CA8C98;      /* UI légère */
  --rose-lightest: #DFA1A6;   /* Borders, glow */
  
  /* Backgrounds */
  --bg-black: #0b0b10;
  --bg-dark: #12121a;
  --bg-darker: #1a1a24;
  --bg-card: #1f1f2e;
  
  /* Text */
  --text-light: #ffffff;
  --text-rose: #DFA1A6;
  --text-muted: #CA8C98;
  
  /* Transitions maîtrisées */
  --easing-smooth: cubic-bezier(0.25, 0.46, 0.45, 0.94);
  --duration-base: 600ms;
  --duration-quick: 400ms;
  --duration-slow: 800ms;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  background: var(--bg-black);
}

body {
  font-family: 'Poppins', sans-serif;
  background: var(--bg-black);
  color: var(--text-rose);
  line-height: 1.6;
  overflow-x: hidden;
}

/* ============================================
   PARTICULES BACKGROUND
   ============================================ */

#particles-bg {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
  background: var(--bg-black);
}

/* ============================================
   ANIMATIONS MAÎTRISÉES
   ============================================ */

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(1.875rem);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

.section {
  animation: fadeInUp var(--duration-base) var(--easing-smooth) both;
}

.section:nth-child(even) {
  animation-delay: 0.1s;
}

/* ============================================
   NAVBAR
   ============================================ */

.navbar {
  position: fixed;
  top: 0;
  width: 100%;
  height: 5rem;
  display: flex;
  align-items: center;
  padding: 0 5%;
  background: rgba(18, 18, 26, 0.95) !important;
  border-bottom: 0.0625rem solid rgba(139, 79, 111, 0.3);
  backdrop-filter: blur(10px);
  box-shadow: 0 0.125rem 1.25rem rgba(139, 79, 111, 0.2);
  z-index: 1000;
  animation: fadeIn var(--duration-quick) var(--easing-smooth) both;
}

.logo {
  height: 4.2rem;
  width: auto;
  transition: transform var(--duration-quick) var(--easing-smooth);
  filter: drop-shadow(0 0 0.625rem rgba(139, 79, 111, 0.5));
}

.logo:hover {
  transform: scale(1.05);
  filter: drop-shadow(0 0 1rem rgba(139, 79, 111, 0.8));
}

.navbar nav {
  flex: 1;
  display: flex;
  justify-content: center;
}

.navbar nav ul {
  display: flex;
  list-style: none;
  gap: 2rem;
}

.navbar nav ul li a {
  color: var(--text-rose);
  text-decoration: none;
  font-weight: 500;
  position: relative;
  padding-bottom: 0.25rem;
  transition: color var(--duration-quick) var(--easing-smooth);
}

.navbar nav ul li a::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: 0;
  width: 0;
  height: 0.125rem;
  background: var(--rose-dark);
  box-shadow: 0 0 0.625rem var(--rose-dark);
  transition: width var(--duration-quick) var(--easing-smooth);
}

.navbar nav ul li a:hover {
  color: var(--text-light);
}

.navbar nav ul li a:hover::after {
  width: 100%;
}

#lang-btn {
  margin-left: 1.5rem;
  padding: 0.5rem 1.2rem;
  border-radius: 1.25rem;
  background: transparent;
  border: 0.125rem solid var(--rose-darkest);
  color: var(--rose-darkest);
  cursor: pointer;
  transition: all var(--duration-quick) var(--easing-smooth);
  font-weight: 500;
}

#lang-btn:hover {
  background: var(--rose-darkest);
  color: var(--text-light);
  transform: translateY(-0.125rem);
  box-shadow: 0 0 1rem rgba(139, 79, 111, 0.6);
}

/* BURGER */

.burger {
  display: none;
  flex-direction: column;
  gap: 0.3125rem;
  background: none;
  border: none;
  cursor: pointer;
  margin-left: 1rem;
}

.burger span {
  width: 1.5625rem;
  height: 0.1875rem;
  background: var(--rose-darkest);
  transition: all var(--duration-quick) var(--easing-smooth);
}

.burger:hover span {
  background: var(--rose-light);
  box-shadow: 0 0 0.625rem var(--rose-light);
}

/* ============================================
   HERO
   ============================================ */

.hero {
  min-height: 100vh;
  padding-top: 7.5rem;
  padding-bottom: 3.75rem;
  background: transparent;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 50rem;
  height: 50rem;
  background: radial-gradient(circle, rgba(139, 79, 111, 0.15) 0%, transparent 70%);
  pointer-events: none;
  animation: pulse 4s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 0.5; transform: translate(-50%, -50%) scale(1); }
  50% { opacity: 0.8; transform: translate(-50%, -50%) scale(1.1); }
}

.hero h1 {
  font-size: 3.5rem;
  color: var(--text-light);
  font-weight: 700;
  margin-bottom: 1rem;
  animation: fadeInUp var(--duration-base) var(--easing-smooth) both;
  position: relative;
  z-index: 1;
  text-shadow: 0 0 1.25rem rgba(139, 79, 111, 0.5);
}

.hero h2 {
  font-size: 2rem;
  color: var(--rose-light);
  font-weight: 400;
  margin-bottom: 1rem;
  animation: fadeInUp var(--duration-base) var(--easing-smooth) 0.2s both;
  position: relative;
  z-index: 1;
}

.hero p {
  max-width: 37.5rem;
  margin: 1.5rem auto;
  color: var(--text-muted);
  font-size: 1.1rem;
  animation: fadeInUp var(--duration-base) var(--easing-smooth) 0.4s both;
  position: relative;
  z-index: 1;
}

.hero-btns {
  display: flex;
  gap: 1.5rem;
  animation: fadeInUp var(--duration-base) var(--easing-smooth) 0.6s both;
  position: relative;
  z-index: 1;
}

/* ============================================
   BUTTONS
   ============================================ */

.btn {
  padding: 0.9rem 2rem;
  border-radius: 1.875rem;
  background: var(--rose-dark);
  color: var(--text-light);
  text-decoration: none;
  font-weight: 600;
  border: none;
  cursor: pointer;
  transition: all var(--duration-quick) var(--easing-smooth);
  box-shadow: 0 0.25rem 0.9375rem rgba(160, 98, 124, 0.4);
}

.btn:hover {
  background: var(--rose-medium);
  transform: translateY(-0.1875rem);
  box-shadow: 0 0.625rem 1.875rem rgba(160, 98, 124, 0.6);
}

.btn:active {
  transform: translateY(-0.0625rem);
}

.btn-outline {
  padding: 0.9rem 2rem;
  border-radius: 1.875rem;
  border: 0.125rem solid var(--rose-darkest);
  background: transparent;
  color: var(--rose-darkest);
  text-decoration: none;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--duration-quick) var(--easing-smooth);
}

.btn-outline:hover {
  background: var(--rose-darkest);
  color: var(--text-light);
  transform: translateY(-0.1875rem);
  box-shadow: 0 0.625rem 1.875rem rgba(139, 79, 111, 0.5);
}

/* ============================================
   SECTIONS
   ============================================ */

.section {
  padding: 5rem 10%;
  text-align: center;
  background: transparent;
}

.section.dark {
  background: var(--bg-dark);
  border-top: 0.0625rem solid rgba(139, 79, 111, 0.2);
  border-bottom: 0.0625rem solid rgba(139, 79, 111, 0.2);
}

.section h2 {
  font-size: 2.5rem;
  margin-bottom: 2rem;
  color: var(--rose-darkest);
  font-weight: 700;
  position: relative;
  display: inline-block;
  text-shadow: 0 0 1.25rem rgba(139, 79, 111, 0.5);
}

.section h2::after {
  content: '';
  position: absolute;
  bottom: -0.625rem;
  left: 50%;
  transform: translateX(-50%);
  width: 3.75rem;
  height: 0.25rem;
  background: var(--rose-dark);
  border-radius: 0.125rem;
  box-shadow: 0 0 0.625rem var(--rose-dark);
}

.section p {
  color: var(--text-muted);
  max-width: 50rem;
  margin: 0 auto 2rem;
  font-size: 1.05rem;
}

/* ============================================
   SKILLS
   ============================================ */

.skills-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(10rem, 1fr));
  gap: 1.8rem;
  max-width: 72rem;
  margin: 3rem auto 0;
}

.skill-card {
  background: var(--bg-card);
  padding: 2rem;
  border-radius: 1.25rem;
  border: 0.125rem solid rgba(139, 79, 111, 0.3);
  transition: all var(--duration-base) var(--easing-smooth);
  box-shadow: 0 0.25rem 0.9375rem rgba(139, 79, 111, 0.1);
  aspect-ratio: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.skill-card:hover {
  transform: translateY(-0.5rem);
  border-color: var(--rose-dark);
  box-shadow: 0 0.5rem 1.875rem rgba(139, 79, 111, 0.4);
  background: var(--bg-darker);
}

.skill-card i {
  font-size: 2.8rem;
  margin-bottom: 0.8rem;
  filter: drop-shadow(0 0 0.625rem rgba(139, 79, 111, 0.5));
}

.skill-card img.skill-icon {
  width: 2.8rem;
  height: 2.8rem;
  margin-bottom: 0.8rem;
  filter: drop-shadow(0 0 0.625rem rgba(139, 79, 111, 0.5));
}

.skill-card h3 {
  color: var(--rose-light);
  margin-bottom: 0;
  font-size: 1.1rem;
  text-align: center;
}

/* ============================================
   PROJECTS - EFFET FLIP 3D
   ============================================ */

.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(17.5rem, 1fr));
  gap: 2rem;
  max-width: 68.75rem;
  margin: 2rem auto 0;
  perspective: 62.5rem;
}

.project-card-wrapper {
  perspective: 62.5rem;
  height: 20rem;
}

.project-card {
  position: relative;
  width: 100%;
  height: 100%;
  transition: transform var(--duration-slow) var(--easing-smooth);
  transform-style: preserve-3d;
  cursor: pointer;
}

.project-card-wrapper:hover .project-card {
  transform: rotateY(180deg);
}

.card-front,
.card-back {
  position: absolute;
  width: 100%;
  height: 100%;
  backface-visibility: hidden;
  border-radius: 0.9375rem;
  padding: 2rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
}

/* FACE AVANT */
.card-front {
  background: var(--bg-card);
  border: 0.125rem solid rgba(139, 79, 111, 0.3);
  box-shadow: 0 0.25rem 0.9375rem rgba(139, 79, 111, 0.2);
}

.card-front h3 {
  color: var(--rose-darkest);
  font-size: 1.6rem;
  margin-bottom: 1rem;
  text-shadow: 0 0 0.625rem rgba(139, 79, 111, 0.5);
}

/* FACE ARRIÈRE */
.card-back {
  background: linear-gradient(135deg, var(--bg-darker) 0%, var(--bg-card) 100%);
  border: 0.125rem solid rgba(139, 79, 111, 0.5);
  transform: rotateY(180deg);
  color: #ffffff;
  box-shadow: 0 0.5rem 1.875rem rgba(139, 79, 111, 0.4);
  padding: 1.25rem;
  overflow: hidden;
}

.card-back h3 {
  color: #ffffff;
  font-size: 1.25rem;
  margin-bottom: 0.75rem;
  border-bottom: 0.125rem solid rgba(255, 255, 255, 0.3);
  padding-bottom: 0.4rem;
  text-shadow: 0 0 0.625rem rgba(139, 79, 111, 0.8);
  font-weight: 600;
}

.card-description {
  color: #ffffff;
  font-size: 0.85rem;
  line-height: 1.5;
  margin-bottom: 1rem;
  flex: 1;
  text-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.3);
  font-weight: 400;
  overflow-y: auto;
  max-height: 11rem;
  text-align: left;
  padding-right: 0.5rem;
}

/* Scrollbar custom pour la description */
.card-description::-webkit-scrollbar {
  width: 0.25rem;
}

.card-description::-webkit-scrollbar-track {
  background: rgba(139, 79, 111, 0.1);
  border-radius: 0.125rem;
}

.card-description::-webkit-scrollbar-thumb {
  background: rgba(139, 79, 111, 0.5);
  border-radius: 0.125rem;
}

.card-description::-webkit-scrollbar-thumb:hover {
  background: rgba(139, 79, 111, 0.7);
}

.card-tags {
  display: flex;
  gap: 0.4rem;
  flex-wrap: wrap;
  justify-content: center;
}

.card-tags span {
  padding: 0.35rem 0.75rem;
  background: rgba(139, 79, 111, 0.3);
  border: 0.0625rem solid rgba(139, 79, 111, 0.6);
  border-radius: 1rem;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.03125rem;
  color: #ffffff;
  text-shadow: 0 0 0.625rem rgba(139, 79, 111, 0.8);
}

/* ============================================
   CONTACT + RGPD
   ============================================ */

.contact-frame {
  max-width: 43.75rem;
  margin: 3rem auto 0;
  padding: 3rem 2.5rem;
  background: var(--bg-card);
  border: 0.125rem solid rgba(139, 79, 111, 0.3);
  border-radius: 1.5rem;
  box-shadow: 0 0.625rem 1.875rem rgba(139, 79, 111, 0.2);
}

form {
  max-width: 37.5rem;
  margin: 2rem auto 0;
  display: flex;
  flex-direction: column;
  gap: 1.2rem;
}

form label {
  color: var(--rose-light);
  font-weight: 500;
  text-align: left;
  display: block;
  margin-bottom: 0.5rem;
}

form input,
form textarea {
  padding: 1rem;
  border-radius: 0.625rem;
  border: 0.125rem solid rgba(139, 79, 111, 0.3);
  background: var(--bg-darker);
  color: var(--text-light);
  font-family: 'Poppins', sans-serif;
  font-size: 1rem;
  transition: all var(--duration-quick) var(--easing-smooth);
}

form input:focus,
form textarea:focus {
  outline: none;
  border-color: var(--rose-dark);
  box-shadow: 0 0 0.625rem rgba(139, 79, 111, 0.3);
}

form input::placeholder,
form textarea::placeholder {
  color: var(--text-muted);
  opacity: 0.6;
}

form textarea {
  resize: vertical;
  min-height: 9.375rem;
}

.rgpd {
  display: flex;
  gap: 0.6rem;
  align-items: flex-start;
  font-size: 0.9rem;
  color: var(--text-muted);
  text-align: left;
}

.rgpd input[type="checkbox"] {
  margin-top: 0.2rem;
  cursor: pointer;
  width: 1.125rem;
  height: 1.125rem;
  accent-color: var(--rose-dark);
}

.rgpd label {
  cursor: pointer;
  line-height: 1.5;
}

/* ============================================
   FOOTER
   ============================================ */

.footer {
  text-align: center;
  padding: 2rem;
  background: var(--bg-dark);
  color: var(--text-rose);
  border-top: 0.0625rem solid rgba(139, 79, 111, 0.3);
}

.footer p {
  color: var(--text-muted);
  margin: 0 0 1rem 0;
}

.footer a {
  color: var(--rose-darkest);
  text-decoration: none;
  font-weight: 600;
  transition: color var(--duration-quick) var(--easing-smooth);
}

.footer a:hover {
  color: var(--rose-light);
  text-shadow: 0 0 0.625rem rgba(139, 79, 111, 0.5);
}

.footer-socials {
  display: flex;
  justify-content: center;
  gap: 1.2rem;
  margin-top: 1rem;
}

.footer-socials a {
  width: 2.625rem;
  height: 2.625rem;
  border-radius: 50%;
  background: transparent;
  border: 0.125rem solid var(--rose-darkest);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--rose-darkest);
  font-size: 1.2rem;
  transition: all var(--duration-quick) var(--easing-smooth);
}

.footer-socials a:hover {
  background: var(--rose-darkest);
  color: var(--text-light);
  transform: translateY(-0.1875rem);
  box-shadow: 0 0 1rem rgba(139, 79, 111, 0.6);
}

.footer-socials .cv-icon {
  font-size: 0.875rem;
  font-weight: 700;
}

/* ============================================
   UTILITAIRES
   ============================================ */

.visually-hidden {
  position: absolute;
  width: 0.0625rem;
  height: 0.0625rem;
  padding: 0;
  margin: -0.0625rem;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border-width: 0;
}

/* ============================================
   RESPONSIVE
   ============================================ */

@media (max-width: 48rem) {

  .burger {
    display: flex;
  }

  .navbar nav {
    position: absolute;
    top: 5rem;
    left: 0;
    width: 100%;
    background: rgba(18, 18, 26, 0.98) !important;
    display: none;
    border-bottom: 0.0625rem solid rgba(139, 79, 111, 0.3);
    box-shadow: 0 0.25rem 1.25rem rgba(139, 79, 111, 0.3);
  }

  .navbar nav.active {
    display: block;
    animation: fadeIn var(--duration-quick) var(--easing-smooth);
  }

  .navbar nav ul {
    flex-direction: column;
    padding: 2rem 0;
    text-align: center;
  }

  .navbar nav ul li a::after {
    left: 50%;
    transform: translateX(-50%);
  }

  .logo {
    height: 3.2rem;
  }

  .hero h1 {
    font-size: 2.2rem;
  }

  .hero h2 {
    font-size: 1.5rem;
  }

  .hero-btns {
    flex-direction: column;
    width: 100%;
    max-width: 18.75rem;
  }

  .section h2 {
    font-size: 2rem;
  }

  .skills-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 1.2rem;
  }

  .skill-card {
    padding: 1.5rem;
    aspect-ratio: 1;
  }

  .skill-card i {
    font-size: 2.2rem;
  }

  .skill-card h3 {
    font-size: 0.95rem;
  }

  .skill-card:hover {
    transform: translateY(-0.3125rem);
  }

  .projects-grid {
    grid-template-columns: 1fr;
    perspective: none;
  }

  .project-card-wrapper {
    height: 23rem;
  }

  .project-card-wrapper.flipped .project-card {
    transform: rotateY(180deg);
  }

  .card-back {
    padding: 1rem;
  }

  .card-back h3 {
    font-size: 1.1rem;
    margin-bottom: 0.6rem;
  }

  .card-description {
    font-size: 0.8rem;
    line-height: 1.4;
    max-height: 10rem;
  }

  .card-tags span {
    padding: 0.3rem 0.6rem;
    font-size: 0.65rem;
  }

  .card-back {
    padding: 1.2rem;
  }

  .card-description {
    font-size: 0.9rem;
  }

  .contact-frame {
    padding: 2rem 1.5rem;
    border-radius: 1.125rem;
  }

  form {
    width: 100%;
    padding: 0;
  }

  form input,
  form textarea {
    font-size: 1rem;
    padding: 1rem;
  }

  .rgpd {
    font-size: 0.85rem;
    line-height: 1.4;
  }
}

@media (min-width: 48.0625rem) {
  section {
    scroll-margin-top: 6.25rem;
  }
}

/* ============================================
   ÉTATS ACCESSIBLES
   ============================================ */

*:focus-visible {
  outline: 0.1875rem solid var(--rose-dark);
  outline-offset: 0.125rem;
  border-radius: 0.25rem;
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  
  .project-card {
    transition: none;
  }
}