/* ==============================
   RESET DE BASE
============================== */

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

/* ==============================
   PALETTE BLACK MODE RED TEAM
============================== */

:root {
  --bg-color: #0a0a0a;        /* Fond principal noir profond */
  --text-color: #e0e0e0;      /* Texte clair pour contraste */
  --accent-color: #b00020;    /* Rouge foncé pour titres, boutons, bordures */
  --accent-glow: rgba(176,0,32,0.18); /* Halo rouge subtil */
  --link-hover: #ff4d4d;       /* Rouge clair au survol */
  --header-bg: #1c0d0d;        /* Navbar sombre */
  --header-border: #330000;    /* Bordure navbar rouge foncé */
}

/* ==============================
   BASE TYPOGRAPHIE ET CORPS
============================== */

html, body {
  font-family: 'Poppins', Arial, sans-serif;
  font-size: 16px;
  background-color: var(--bg-color);
  color: var(--text-color);
  line-height: 1.6;
  scroll-behavior: smooth;
}

/* Curseur personnalisé */
.custom-cursor {
  position: fixed;
  top: 0;
  left: 0;
  width: 24px;              /* taille du cercle extérieur */
  height: 24px;
  border: 2px solid white;  /* cercle blanc */
  border-radius: 50%;
  pointer-events: none;     /* pour ne pas bloquer les clics */
  transform: translate(-50%, -50%);
  transition: transform 0.1s ease-out, width 0.2s ease, height 0.2s ease;
  z-index: 9999;
  mix-blend-mode: difference; /* subtil sur fond sombre */
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Point central */
.custom-cursor::before {
  content: "";
  width: 4px;
  height: 4px;
  background-color: white;
  border-radius: 50%;
}

/* ==============================
   NAVBAR
============================== */

header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  background-color: var(--header-bg);
  border-bottom: 1px solid var(--header-border);
  z-index: 1000;
  transition: transform 0.3s ease, background-color 0.3s ease;
  padding: 0 20px;
}

/* Hide au scroll vers le bas */
header.hide {
  transform: translateY(-100%);
}

nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 60px;
}

.logo a {
  text-decoration: none;
  color: var(--text-color);
  font-weight: 700;
  font-size: 1.2rem;
}

.nav-links {
  display: flex;
  list-style: none;
  gap: 30px;
}

.nav-links a {
  text-decoration: none;
  color: var(--text-color);
  font-weight: 500;
  transition: color 0.3s;
}

.nav-links a:hover {
  color: var(--link-hover);
}

/* ==============================
SECTION ACCUEIL - FOND GRADIENT DYNAMIQUE RED TEAM
============================== */

.acceuil {
  position: relative;
  overflow: hidden;
  border-bottom: solid 0.1em var(--accent-color);
  display: grid;
  grid-template-columns: 2fr 1fr;
  align-items: center;
  justify-items: center;
  height: 100vh;
  padding: 0 5%;
  gap: 40px;

  /* Dégradé noir-gris visible même sur écrans sombres */
  background: linear-gradient(
    120deg,
    #141414 0%,
    #1b1b1b 50%,
    #141414 100%
  );
  background-size: 400% 400%;
  animation: bgMove 20s ease-in-out infinite;
}

/* Animation fluide du fond */
@keyframes bgMove {
  0% { background-position: 0% 50%; }
  25% { background-position: 50% 50%; }
  50% { background-position: 100% 50%; }
  75% { background-position: 50% 50%; }
  100% { background-position: 0% 50%; }
}

/* Bloc texte */
.acceuil-text {
  width: 100%;
  max-width: 700px;
  text-align: left;
  margin-left: auto;
  margin-right: auto;
}

.acceuil-text h1 {
  font-size: 2.8rem;
  color: var(--accent-color);
  margin-bottom: 20px;
  text-align: left;
}

.acceuil-text p {
  margin-bottom: 15px;
  font-size: 1.1rem;
  text-align: left;
  line-height: 1.6;
  color: var(--text-color);
}

/* Bloc photo */
.acceuil-photo {
  display: flex;
  justify-content: center;
  align-items: center;
}

.acceuil-photo img {
  width: 340px;
  height: 440px;
  object-fit: cover;
  border-radius: 50%;
  border: 3px solid var(--accent-color);
  box-shadow: 0 0 30px var(--accent-glow);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.acceuil-photo img:hover {
  transform: scale(1.05);
  box-shadow: 0 0 40px rgba(176,0,32,0.25);
}

/* Responsive */
@media (max-width: 900px) {
  .acceuil {
    grid-template-columns: 1fr;
    height: auto;
    padding: 80px 20px;
    text-align: center;
  }

  .acceuil-text {
    text-align: left;
    max-width: 90%;
  }

  .acceuil-photo {
    margin-top: 30px;
  }

  .acceuil-photo img {
    width: 200px;
    height: 250px;
  }
}

/* ==============================
   EFFET D'ÉCRITURE DU NOM
============================== */

.typed-text {
  color: var(--accent-color);
  font-weight: 700;
  font-size: 2.8rem;
  letter-spacing: 0.5px;
}

.cursor {
  display: inline-block;
  width: 2px;
  height: 1.2em;
  background-color: var(--accent-color);
  margin-left: 6px;
  animation: blink 1s steps(1, start) infinite;
}

@keyframes blink {
  50% { opacity: 0; }
}

/* ==============================
   SECTION MON HISTOIRE — VERSION REWORKED
============================== */

.story {
  position: relative;
  min-height: 100vh;
  display: flex;
  justify-content: center;
  align-items: center;
  background: #101010;
  overflow: hidden;
  padding: 80px 10%;
}

/* Structure principale : 2 colonnes */
.story-content {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  align-items: center;
  gap: 300px; /* ⇐ augmenté l’espace entre texte et visuel */
  width: 100%;
  max-width: 1400px;
  position: relative;
  z-index: 1;
}

/* Bloc texte */
.story-text {
  border-left: 3px solid var(--accent-color);
  padding-left: 25px;
}

.story-text h2 {
  color: var(--accent-color);
  font-size: 2.3rem;
  margin-bottom: 25px;
}

.story-text p {
  color: var(--text-color);
  line-height: 1.8;
  font-size: 1.1rem;
  text-align: justify;
}

.story-text strong {
  color: var(--accent-color);
}

/* Bloc visuel à droite */
.story-visual {
  position: relative;
  height: 400px;
  background: radial-gradient(circle at 70% 40%, rgba(176, 0, 32, 0.12), transparent 70%);
  border: 1px solid rgba(176, 0, 32, 0.2);
  border-radius: 15px;
  overflow: hidden;
  box-shadow: 0 0 30px rgba(176, 0, 32, 0.15);
}

/* Grille cyber subtile */
.grid-overlay {
  position: absolute;
  inset: 0;
  background-image: 
    linear-gradient(to right, rgba(255, 255, 255, 0.05) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(255, 255, 255, 0.05) 1px, transparent 1px);
  background-size: 60px 60px;
  animation: moveGrid 12s linear infinite;
  z-index: 1;
}

/* Halo rouge pulsant */
.red-glow {
  position: absolute;
  width: 180px;
  height: 180px;
  background: radial-gradient(circle, rgba(176, 0, 32, 0.3) 0%, transparent 70%);
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  filter: blur(50px);
  animation: pulse 6s ease-in-out infinite;
  z-index: 0;
}

/* Symbole cyber discret (tu peux mettre autre chose) */
.symbol {
  position: absolute;
  color: rgba(255,255,255,0.05);
  font-size: 180px;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 0;
  pointer-events: none;
}

/* Animations */
@keyframes moveGrid {
  0% { background-position: 0 0; }
  100% { background-position: 100px 100px; }
}

@keyframes pulse {
  0%, 100% { opacity: 0.4; transform: translate(-50%, -50%) scale(1); }
  50% { opacity: 0.7; transform: translate(-50%, -50%) scale(1.1); }
}

/* Responsive */
@media (max-width: 900px) {
  .story-content {
    grid-template-columns: 1fr;
    gap: 40px;
  }

  .story-visual {
    height: 300px;
  }
}

/* ==============================
   SECTION ÉTUDES
============================== */

.etudes {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 100px 10%;
  background: #111;
  border-bottom: 1px solid var(--accent-color);
}

.etudes-container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  gap: 60px;
  max-width: 1100px;
  width: 100%;
  background: #181818;
  border: 1px solid rgba(176, 0, 32, 0.4);
  box-shadow: 0 0 20px rgba(176, 0, 32, 0.1);
  padding: 50px;
  border-radius: 20px;
}

/* ===== CV à gauche ===== */
.etudes-cv {
  display: flex;
  justify-content: center;
  align-items: center;
  overflow: hidden;
}

.cv-img {
  width: 100%;
  max-width: 350px;
  border-radius: 10px;
  filter: blur(2px) brightness(0.8);
  transition: all 0.4s ease;
  cursor: pointer;
}

.cv-img:hover {
  filter: blur(0px) brightness(1);
  transform: scale(1.03);
}

/* ===== Texte à droite ===== */
.etudes-text h2 {
  color: var(--accent-color);
  font-size: 2.2rem;
  margin-bottom: 20px;
}

.etudes-text p {
  color: var(--text-color);
  line-height: 1.8;
  font-size: 1.1rem;
  text-align: justify;
}

/* ===== POPUP ===== */
.cv-popup {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(10, 10, 10, 0.8);
  backdrop-filter: blur(4px);
  display: flex;
  justify-content: center;
  align-items: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.4s ease, visibility 0.4s ease;
  z-index: 10000;
}

.cv-popup img {
  max-width: 90%;
  max-height: 90%;
  border-radius: 15px;
  box-shadow: 0 0 40px rgba(176, 0, 32, 0.3);
  transform: scale(0.8);
  transition: transform 0.4s ease;
}

.cv-popup.active {
  opacity: 1;
  visibility: visible;
}

.cv-popup.active img {
  transform: scale(1);
}

/* ==============================
   SECTION PROJETS — Halo rouge
============================== */
.projets {
  background: #101010;
  padding: 80px 10%;
  border-bottom: 1px solid var(--accent-color);
  position: relative;
  overflow: hidden;
}

.projets::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 400px;
  height: 400px;
  background: radial-gradient(circle, rgba(176,0,32,0.15) 0%, transparent 70%);
  transform: translate(-50%, -50%);
  filter: blur(80px);
  z-index: 0;
  pointer-events: none;
}

.projets-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: 1200px;
  margin: 0 auto;
  gap: 50px;
  flex-wrap: wrap;
  position: relative;
  z-index: 1; /* Contenu au-dessus du halo */
}

.projets-text {
  flex: 1;
  max-width: 600px;
}

.projets-text h2 {
  color: var(--accent-color);
  font-size: 2.2rem;
  margin-bottom: 20px;
}

.projets-text p {
  color: var(--text-color);
  font-size: 1.1rem;
  line-height: 1.6;
  margin-bottom: 25px;
}

.projets-text .btn {
  display: inline-block;
  padding: 12px 25px;
  background-color: var(--accent-color);
  color: #fff;
  text-decoration: none;
  border-radius: 8px;
  font-weight: 600;
  transition: background 0.3s, transform 0.3s;
}

.projets-text .btn:hover {
  background-color: var(--link-hover);
  transform: scale(1.05);
}

/* Visualisation compétences */
.projets-visual {
  flex: 1;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 25px;
  flex-wrap: wrap;
}

.skills-icon {
  font-size: 3rem;
  color: rgba(176, 0, 32, 0.6);
  animation: floatSkills 3s ease-in-out infinite;
}

/* Animation flottante subtile */
@keyframes floatSkills {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}

/* Responsive */
@media (max-width: 900px) {
  .projets-container {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }

  .projets-text, .projets-visual {
    max-width: 100%;
  }

  .skills-icon {
    font-size: 2.5rem;
  }
}

.footer {
  background-color: #181818; /* légèrement plus clair que #101010 pour contraste */
  padding: 40px 10%;
  color: var(--text-color);
  font-size: 0.95rem;
}

.footer-container {
  display: flex;
  justify-content: space-between; /* gauche et droite bien espacés */
  align-items: center;
  max-width: 1400px;
  margin: 0 auto;
  flex-wrap: wrap;
  gap: 20px;
}

.footer-left {
  flex: 1;
}

.footer-center {
  flex: 1;
  display: flex;
  justify-content: center; /* centré au milieu */
  gap: 25px;
}

.footer-right {
  flex: 1;
  display: flex;
  justify-content: flex-end; /* aligné à droite */
  gap: 25px;
}

.footer-center a,
.footer-right a {
  color: var(--text-color);
  text-decoration: none;
  transition: color 0.3s;
}

.footer-center a:hover,
.footer-right a:hover {
  color: var(--accent-color);
}

/* Responsive */
@media (max-width: 900px) {
  .footer-container {
    flex-direction: column;
    text-align: center;
  }
  
  .footer-center,
  .footer-right {
    justify-content: center;
  }
}
