:root {
  --bg: #0f172a;
  --bg-sc:#050c1e;
  --text: #e2e8f0;
  --accent: rgba(8, 230, 246, 0.881);
  --muted: #94a3b8;
  --card: #1e293b;
  --radius: 14px;
  --transition: 0.3s;
}

* { box-sizing: border-box; margin: 0; padding: 0; font-family: 'Poppins', sans-serif; }

body {
  background: var(--bg-sc);
  color: var(--text);
  line-height: 1.6;
}

html { 
    scroll-behavior: smooth; 
}

/* ---- HEADER ---- */
header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  background: rgba(10, 15, 30, 0.9);
  backdrop-filter: blur(10px);
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 15px 8%;
  z-index: 1000;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}


.logo {
  font-size: 1.7em;
  font-weight: 700;
  color: #ffffff;
  letter-spacing: 1px;
  cursor: pointer;
  transition: all 0.3s ease;
}

.logo:hover {
  color: #00bcd4;
  text-shadow: 0 0 10px rgba(0, 188, 212, 0.6);
}

.logo span { color: var(--accent);}

nav ul { list-style: none; display: flex; gap: 20px; margin: 10px; padding: 0;}
nav a { color: var(--text); text-decoration: none; font-weight: 500; transition: var(--transition);}
nav a:hover, nav a.active { color: var(--accent);}
/* 
---- HERO ---- */

.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 8%;
  background: radial-gradient(circle at top left, black,--bg-sc);
  text-align: center;
}

.hero .content {
  max-width: 700px;
  animation: fadeInUp 1.2s ease-in-out;
}

.titre {
  font-size: 2.4em;
  color: white;
  margin-bottom: 15px;
  line-height: 1.3;
}

.titre .highlight {
  color: var(--accent);
  text-shadow: 0 0 12px rgba(8, 230, 246, 0.7);
}

/* ===== NAVBAR ===== */
nav ul {
  display: flex;
  align-items: center;
  gap: 35px;
  list-style: none;
  margin: 0;
}

#accueil {
  padding-top: 120px; 
}
nav a {
  text-decoration: none;
  color: #eaeaea;
  font-size: 1rem;
  font-weight: 500;
  letter-spacing: 0.5px;
  transition: 0.3s ease;
  position: relative;
}

/* Effet soulignement moderne */
nav a::after {
  content: '';
  position: absolute;
  bottom: -5px;
  left: 0;
  width: 0%;
  height: 2px;
  background: #00bcd4;
  transition: width 0.3s ease;
}

nav a:hover::after,
nav a.active::after {
  width: 100%;
}

nav a:hover {
  color: #00bcd4;
}


/* 👋 Effet main animée */
.wave {
  display: inline-block;
  animation: wave 2s infinite;
  transform-origin: 70% 70%;
}

.hello span { color: red;}

@keyframes wave {
  0% { transform: rotate(0deg); }
  10% { transform: rotate(14deg); }
  20% { transform: rotate(-8deg); }
  30% { transform: rotate(14deg); }
  40% { transform: rotate(-4deg); }
  50% { transform: rotate(10deg); }
  60% { transform: rotate(0deg); }
  100% { transform: rotate(0deg); }
}

.paragraphe {
  color: var(--muted);
  font-size: 1.1em;
  margin-bottom: 30px;
  line-height: 1.8;
}

/* ---- PHOTO ---- */
.photo-profil {
  margin: 20px 0 35px;
  display: flex;
  justify-content: center;
}

.photo-profil img {
  width: 260px;
  height: 260px;
  object-fit: cover;
  border-radius: 50%;
  border: 3px solid var(--accent);
  box-shadow: 0 0 25px rgba(8, 230, 246, 0.5);
  position: relative;
}

/* Anneau lumineux animé autour de la photo */
.photo-profil::before {
  content: "";
  position: absolute;
  width: 260px;
  height: 260px;
  border-radius: 50%;
  border: 3px solid rgba(8, 230, 246, 0.416);
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0% { transform: scale(1); opacity: 0.8; }
  50% { transform: scale(1.15); opacity: 0.4; }
  100% { transform: scale(1); opacity: 0.8; }
}

/* ---- BOUTONS ---- */
.buttons {
  display: flex;
  justify-content: center;
  gap: 15px;
  flex-wrap: wrap;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 12px 28px;
  border-radius: var(--radius);
  font-weight: 600;
  text-decoration: none;
  transition: all 0.3s ease;
}

.btn.primary {
  background: var(--accent);
  color: white;
  box-shadow: 0 0 15px rgba(8, 230, 246, 0.6);
}

.btn.primary:hover {
  transform: translateY(-3px);
  box-shadow: 0 0 25px rgba(8, 230, 246, 0.8);
}

.btn.cv {
  border: 1.5px solid var(--accent);
  color: var(--accent);
}

.btn.cv:hover {
  background: var(--accent);
  color: white;
}

/* Animation d'apparition */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ---- Responsive ---- */
@media (max-width: 768px) {
  .titre { font-size: 1.9em; }
  .photo-profil img { width: 200px; height: 200px; }
  .photo-profil::before { width: 220px; height: 220px; }
}


/* ---- Boutons stylés ---- */
.buttons {
  display: flex;
  gap: 15px;
  justify-content: center;
  flex-wrap: wrap;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  border: 1px solid var(--accent);
  border-radius: var(--radius);
  padding: 12px 25px;
  font-weight: 600;
  transition: all 0.3s ease;
  text-decoration: none;
}

.btn.primary {
  background: var(--accent);
  color: #fff;
  box-shadow: 0 0 10px rgba(8, 230, 246, 0.6);
}

.btn.primary:hover {
  transform: translateY(-3px);
  box-shadow: 0 0 20px rgba(8, 230, 246, 0.9);
}

.btn.cv {
  background: transparent;
  color: var(--accent);
  border: 1.5px solid var(--accent);
}

.btn.cv:hover {
  background: var(--accent);
  color: #fff;
  transform: translateY(-3px);
}

/* ---- Animation de fade ---- */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}


/* ---- MENU BURGER ---- */
.menu-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
}

.menu-toggle span {
  width: 28px;
  height: 3px;
  background: #00bcd4;
  border-radius: 2px;
  transition: all 0.3s ease;
}

.menu-toggle.open span:nth-child(1) {
  transform: rotate(45deg) translateY(8px);
}
.menu-toggle.open span:nth-child(2) {
  opacity: 0;
}
.menu-toggle.open span:nth-child(3) {
  transform: rotate(-45deg) translateY(-8px);
}

/* ---- À PROPOS ---- */
.text span { color: var(--accent);}
.about { display: flex; justify-content: space-between; align-items: center; gap: 40px; flex-wrap: wrap; padding: 100px 10%; background-color:#050c1e;}
.about .text { flex: 1; min-width: 280px; text-align: center; }
.about .about-img { flex: 1; display: flex; justify-content: center;}
.about .about-img img { width: 400px; border-radius: var(--radius); box-shadow: 0 6px 20px rgba(0,0,0,0.3);}
.skills { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 10px;}
.skills span { background: var(--card); padding: 6px 12px; border-radius: var(--radius); border: 1px solid rgba(255,255,255,0.05);}
/* ---- EXPÉRIENCE ---- */

#experience { padding: 100px 10%; text-align: center; }
.timeline { display: flex; flex-direction: column; gap: 20px; }
.exp { background: var(--card); padding: 20px; border-radius: var(--radius); border-left: 3px solid var(--accent);}
.exp span { color: var(--muted); font-size: 0.9em; }

/* ---- PROJETS ---- */
#projets { padding: 100px 10%; background: #050c1e; text-align: center;}
.projects { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 20px;}
.card { background: var(--card); padding: 0; border-radius: var(--radius); overflow: hidden; transition: var(--transition);}
.card img { width: 100%; height: 160px; object-fit: cover;}
.card:hover { 
    transform: translateY(-4px); 
    /* Amélioration de l'effet de profondeur et de brillance: */
    box-shadow: 0 10px 30px rgba(8, 230, 246, 0.15); 
    border: 1px solid var(--accent); /* Bordure subtile au survol */
}
.card h3, .card p, .card a { padding: 10px 15px;}
.card p { color: var(--muted);}

/* ---- CONTACT ---- */
#contact { padding: 100px 10%; text-align: center; background:var(--bg-sc);}
form { display: flex; flex-direction: column; gap: 10px; max-width: 600px; margin: auto;}

input, textarea { background: var(--card); border: none; padding: 12px; color: var(--text); border-radius: var(--radius);}
textarea { min-height: 120px; resize: vertical;}

/* ---- BOUTONS ---- */
.btn {border: 1px solid var(--accent); padding: 1rem 2.8rem; border-radius: var(--radius); cursor: pointer; color: var(--text); text-decoration: none; transition: var(--transition); text-align: center;}
.btn.primary { background: var(--accent); color: white; text-align: center; display: block;}
.btn:hover { opacity: 0.9; }
.btn.small { font-size: 0.85em; padding: 6px 12px; }

/* ---- FOOTER ---- */
footer { text-align: center; padding: 30px; border-top: 1px solid rgba(255,255,255,0.05); color: var(--muted);}
.social-media a { font-size: 1rem; color: var(--muted); margin: 1rem 0.3rem 1rem 0;}
/* Style et positionnement du bouton */
#scrollToTopButton {
  display: none; 
  position: fixed; 
  bottom: 20px; 
  right: 30px; 
  z-index: 99; 
  border: none; 
  outline: none; 
  background-color: #00bcd4; 
  color: white;
  cursor: pointer; 
  padding: 15px; 
  border-radius: 50%; 
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1); 
  transition: background-color 0.3s, transform 0.3s; 
}

/* Style au survol (hover) */
#scrollToTopButton:hover {
  background-color: #00bcd4; 
  transform: translateY(-2px); 
}

/* Style de l'icône de flèche (si vous utilisez Font Awesome) */
#scrollToTopButton i {
    font-size: 1.2em;
}
/* Amélioration de l'accessibilité : Focus visible pour le clavier */
*:focus { 
    outline: 2px solid var(--accent); 
    outline-offset: 2px;
}
/* ------------------------------------------- */
/* ---- RESPONSIVE : MOBILE & TABLETTE ---- */
/* ------------------------------------------- */

/* Styles pour tablettes et mobiles (max 768px) */
@media (max-width: 768px) {
    /* HEADER (Menu Burger) */
    header {
        padding: 15px 5%; 
    }
    .menu-toggle {
        display: flex;
    }
    nav {
        position: absolute;
        top: 60px;
        left: 0;
        width: 100%;
        background: var(--bg-sc);
        display: none;
        flex-direction: column;
        align-items: center;
        padding: 25px 0;
        border-top: 1px solid rgba(255, 255, 255, 0.05);
    }
    nav.active {
        display: flex;
    }
    nav ul {
        flex-direction: column;
        gap: 20px;
    }
    
    /* SECTIONS GÉNÉRALES */
    section {
        padding: 80px 5%; /* Réduit le padding général */
    }
    .hero {
        padding: 0 5%;
    }
    
    /* ACCUEIL */
    .titre { 
        font-size: 1.9em; 
    }
    .photo-profil img { 
        width: 180px; /* Réduction de la taille de l'image */
        height: 180px; 
    }
    .photo-profil::before { 
        width: 180px; 
        height: 180px; 
    }
    
    /* À PROPOS - Centrage ! */
    .about {
        justify-content: center; /* Empile et centre les blocs (texte et image) */
    }
    .about .text { 
        text-align: center; /* Centre le texte dans la colonne */
        min-width: unset; 
    }
    .about .about-img img { 
        max-width: 300px; /* Limite la taille de l'image */
    }
    .skills {
        justify-content: center; /* Centre les jetons de compétences */
    }
    
    /* EXPÉRIENCE, PROJETS, CONTACT */
    .timeline, .projects, form {
        max-width: 100%; /* S'adapte mieux à la largeur */
    }

    .card {
        text-align: center; /* Centre le contenu des cartes de projet */
    }
    .card h3, .card p {
        padding: 10px 5px;
    }

    .exp {
        text-align: center; /* Centre le contenu des cartes d'expérience */
    }
}

/* Styles pour les téléphones les plus petits (max 480px) */
@media (max-width: 480px) {
    .titre {
        font-size: 1.5em; 
    }
    .paragraphe {
        font-size: 0.95em;
    }
    
    /* Boutons qui s'empilent bien */
    .buttons {
        flex-direction: column;
        gap: 10px;
    }
    .btn {
        width: 90%; 
        margin: 0 auto;
    }

    /* Le bouton de retour en haut est décalé un peu plus à droite pour ne pas être trop près du bord */
    #scrollToTopButton {
        right: 15px; 
        padding: 12px;
    }
}
/* --- ANIMATION DU MENU BURGER --- */
.menu-toggle.open span:nth-child(1) { transform: rotate(45deg) translate(5px, 5px); }
.menu-toggle.open span:nth-child(2) { opacity: 0; }
.menu-toggle.open span:nth-child(3) { transform: rotate(-45deg) translate(5px, -5px); }
