/* ============================================================
   🌌 Portfolio Morel Ethan — Thème Violet Futuriste
   Fichier : styles.css
   Auteur : Morel Ethan
   ============================================================ */

/* --- RESET DE BASE --- */
*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Poppins', 'Inter', system-ui, sans-serif;
  background: #0e0b16; /* violet très sombre */
  color: #f3f3f8;
  line-height: 1.6;
  min-height: 100vh;
  overflow-x: hidden;
}

/* --- VARIABLES COULEURS --- */
:root {
  --violet: #8b5cf6;
  --violet-light: #a78bfa;
  --violet-dark: #5b21b6;
  --gray: #9ca3af;
  --bg-dark: #0e0b16;
  --bg-card: #161327;
  --bg-hover: #1f1a33;
  --white: #f3f3f8;
  --shadow: 0 0 30px rgba(139, 92, 246, 0.1);
  --radius: 16px;
  --transition: all 0.3s ease;
}

/* --- CONTAINERS --- */
.container {
  width: min(1200px, 90%);
  margin: 0 auto;
}

/* --- HEADER --- */
.site-header {
  position: fixed;
  top: 0;
  width: 100%;
  background: rgba(14, 11, 22, 0.7);
  backdrop-filter: blur(10px);
  z-index: 1000;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  transition: var(--transition);
}

.header-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 0;
}

.logo {
  font-weight: 700;
  font-size: 1.25rem;
  color: var(--violet-light);
  text-decoration: none;
}

.nav ul {
  display: flex;
  list-style: none;
  gap: 4rem;
}

.nav a {
  color: var(--white);
  text-decoration: none;
  position: relative;
  transition: var(--transition);
}

/*.nav a::after {
  content: "";
  position: absolute;
  bottom: -5px;
  left: 0;
  width: 0%;
  height: 2px;
  background: var(--violet);
  transition: var(--transition);
}
  
C'est les bar en dessous des href de la barre nav*/

.nav a:hover::after,
.nav a.active::after {
  width: 100%;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.lang-switch {
  display: flex;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  overflow: hidden;
}

.lang-btn {
  background: transparent;
  color: var(--gray);
  border: none;
  padding: 0.4rem 0.8rem;
  cursor: pointer;
  transition: var(--transition);
}

.lang-btn.active,
.lang-btn:hover {
  background: var(--violet-dark);
  color: var(--white);
}

.nav-toggle {
  display: none;
  font-size: 1.5rem;
  color: var(--white);
  background: none;
  border: none;
}

/* --- HERO --- */
.hero {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  padding-top: 100px;
  position: relative;
  overflow: hidden;
}

.hero-inner {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
  align-items: center;
}

.hero-content h1 {
  font-size: 2.5rem;
  color: var(--white);
}

.hero-content span#role {
  color: var(--violet-light);
}

.hero-content p {
  margin: 1rem 0 2rem;
  color: var(--gray);
  font-size: 1.1rem;
  max-width: 600px;
}

.hero-ctas {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

/* --- BUTTONS --- */
.btn {
  display: inline-block;
  text-decoration: none;
  padding: 0.75rem 1.5rem;
  border-radius: var(--radius);
  font-weight: 500;
  cursor: pointer;
  transition: var(--transition);
}

.btn.primary {
  background: var(--violet);
  color: var(--white);
  box-shadow: var(--shadow);
}

.btn.primary:hover {
  background: var(--violet-light);
  /*transform: translateY(-3px);*/
}

.btn.ghost {
  border: 1px solid var(--violet);
  color: var(--violet);
}

.btn.ghost:hover {
  background: var(--violet);
  color: var(--white);
}

.btn.outline {
  border: 1px solid var(--gray);
  color: var(--gray);
}

.btn.outline:hover {
  border-color: var(--violet);
  color: var(--violet);
}

.btn.small {
  padding: 0.5rem 1rem;
  font-size: 0.9rem;
}

/* --- HERO MEDIA --- */
.hero-media img {
  width: 300px;
  height: 300px;
  border-radius: 50%; /* ✅ REND LA PHOTO PARFAITEMENT RONDE */
  object-fit: cover; /* ✅ Évite l’effet ovale */
  object-position: center;
  border: 3px solid var(--violet-dark);
  box-shadow: 0 0 40px rgba(139, 92, 246, 0.25);
  transition: transform 0.5s ease, box-shadow 0.5s ease;
  margin-left: 10rem;
}


.hero-decor {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  animation: float 20s ease-in-out infinite alternate;
}

@keyframes float {
  0% { transform: translateY(0px); }
  100% { transform: translateY(30px); }
}

/* --- SECTIONS GÉNÉRALES --- */
section {
  padding: 6rem 0;
}

h2 {
  font-size: 2rem;
  margin-bottom: 2rem;
  text-align: center;
  color: var(--violet-light);
}

/* --- ABOUT --- */
.about-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
  align-items: start;
}

.about-list {
  list-style: none;
  margin-top: 1rem;
  color: var(--gray);
}

.about-list a {
  color: var(--violet-light);
  text-decoration: none;
}

/* --- PROJECTS --- */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2rem;
}

.project-card {
  background: var(--bg-card);
  border-radius: var(--radius);
  overflow: hidden;
  transition: var(--transition);
  box-shadow: var(--shadow);
}

.project-card:hover {
  transform: translateY(-5px);
  background: var(--bg-hover);
}

.project-thumb {
  width: 100%;
  display: block;
  height: 200px;
  object-fit: cover;
}

.project-body {
  padding: 1.5rem;
}

.project-title {
  font-size: 1.25rem;
  margin-bottom: 0.5rem;
}

.project-desc {
  color: var(--gray);
  font-size: 0.95rem;
  margin-bottom: 1rem;
}

/* --- SKILLS --- */
.skills-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1rem;
}

.skill {
  background: var(--bg-card);
  padding: 1rem 1.5rem;
  border-radius: var(--radius);
  text-align: center;
  transition: var(--transition);
}

.skill:hover {
  background: var(--bg-hover);
  transform: translateY(-4px);
}

.skill-name {
  font-weight: 600;
  color: var(--violet-light);
}

.skill-level {
  font-size: 0.9rem;
  color: var(--gray);
}

/* --- CONTACT --- */
.contact-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2rem;
}

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

.contact-form input,
.contact-form textarea {
  background: var(--bg-card);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: var(--radius);
  color: var(--white);
  padding: 0.75rem 1rem;
  font-size: 1rem;
  resize: none;
  transition: var(--transition);
}

.contact-form input:focus,
.contact-form textarea:focus {
  border-color: var(--violet);
  outline: none;
}

.contact-info {
  color: var(--gray);
}

.social-links {
  list-style: none;
  display: flex;
  gap: 1rem;
  margin: 1rem 0;
}

.social-links a {
  color: var(--violet-light);
  text-decoration: none;
  transition: var(--transition);
}

.social-links a:hover {
  color: var(--violet);
}

/* --- FOOTER --- */
.site-footer {
  text-align: center;
  padding: 2rem 0;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  color: var(--gray);
  font-size: 0.9rem;
}

/* --- LIENS GLOBAUX --- */
a {
  color: var(--violet-light);
  text-decoration: none;
  transition: color 0.3s, background 0.3s, box-shadow 0.3s;
  border-bottom: 1px solid transparent;
  border-radius: var(--radius);
  padding: 0.15em 0.4em;
}

a:hover,
a:focus {
  color: var(--white);
  background: var(--violet);
  box-shadow: var(--shadow);
  border-bottom: 1px solid var(--violet);
  outline: none;
  text-decoration: none;
  
  /* Pas de transform, donc pas de "relèvement" */
}

/* --- RESPONSIVE --- */
@media (max-width: 768px) {
  .nav ul {
    display: none;
    flex-direction: column;
    gap: 1rem;
    background: var(--bg-card);
    position: absolute;
    top: 70px;
    right: 10px;
    padding: 1rem;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
  }

  .nav.open ul {
    display: flex;
  }

  .nav-toggle {
    display: block;
  }

  .hero-content h1 {
    font-size: 2rem;
  }
}
