/* Variables de couleurs */
:root {
    --bg-dark: #0a0b14;        /* Plus sombre, presque noir */
    --card-bg: #161b2c;       /* Bleu nuit profond */
    --accent-purple: #7c3aed;  /* Violet plus vif (type Tailwind) */
    --accent-yellow: #facc15;  /* Jaune ambre plus chaud */
    --text-white: #f8fafc;
    --text-gray: #94a3b8;      /* Gris plus doux pour la lecture */
    --card-border: rgba(255, 255, 255, 0.08);
}
body {
    background-color: var(--bg-dark);
    color: var(--text-white);
    font-family: 'Poppins', sans-serif;
    margin: 0;
    line-height: 1.6;
}
/* Avatar — taille configurable */
:root {
  --avatar-size: 300px;
  --rotating-gap: 12px;
}

/* Conteneur principal */
.hero-image .circle-gradient {
  width: var(--avatar-size);
  height: var(--avatar-size);
  background: linear-gradient(45deg, var(--accent-purple), transparent);
  border-radius: 50%;
  box-shadow: 0 0 50px rgba(108, 92, 231, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

/* Wrapper : CLIP circulaire réel */
.hero-image .img-wrapper {
  position: relative;
  width: 100%;
  height: 100%;
  padding: var(--rotating-gap);
  border-radius: 50%;
  overflow: hidden; /* 🔥 IMPORTANT : force la forme circulaire */
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Bordure animée bien centrée */
.hero-image .rotating-border {
  position: absolute;
  inset: calc(-1 * var(--rotating-gap));
  border-radius: 50%;
  border: 4px solid rgba(255, 255, 255, 0.6);
  border-top-color: transparent;
  border-right-color: transparent;
  pointer-events: none;
  z-index: 1;
  animation: spin 8s linear infinite;
}

/* Image : ronde + bien centrée */
.hero-image .img-wrapper img {
  width: 100%;
  height: 100%;
  object-fit: cover; /* 🔥 remplit bien le cercle */
  border-radius: 50%;
   object-position: center 20%;
  display: block;
  z-index: 2;
}

/* Animation */
@keyframes spin {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}






/* copilot   */
/* place l'indicateur correctement par rapport à la nav */
nav { position: relative; }

/* indicateur de soulignement animé */
.nav-underline {
  position: absolute;
  height: 3px;
  background: var(--accent-purple); /* ou change en --accent-yellow si tu préfères */
  left: 0;
  width: 0;
  bottom: 12px;               /* ajuste si la ligne est trop haute/basse */
  border-radius: 4px;
  transition: left 260ms cubic-bezier(.2,.8,.2,1), width 260ms cubic-bezier(.2,.8,.2,1), opacity 160ms;
  opacity: 0;
  pointer-events: none;
  z-index: 10;
}
.nav-underline.visible { opacity: 1; }


/*  image  */








/* Header */
/* ---------- HEADER : état "solid" après scroll ---------- */
/* transition douce pour le changement de fond */
header {
  transition: background-color 300ms ease, color 300ms ease, box-shadow 300ms ease;
}

/* État appliqué quand on sort du hero (ou après un certain scroll) */
header.solid {
  background-color: #ffffff;        /* fond clair comme sur ton image */
  background-image: none;
  box-shadow: 0 6px 22px rgba(2,6,23,0.06);
}

/* Ajuste les couleurs des éléments de la nav en mode "solid" */
header.solid .logo {
  color: var(--accent-purple); /* logo couleur principale (ou change en --accent-yellow) */
}
header.solid nav ul li a {
  color: rgba(0,0,0,0.55);      /* liens en gris foncé */
}
header.solid nav ul li a:hover {
  color: var(--accent-purple);
}

/* couleur spécifique pour le lien actif en mode normal et en mode solid */
nav ul li a.active {
  color: var(--accent-yellow) !important;  /* lien actif (jaune) */
  font-weight: 700;
}

/* si on veut que le lien actif soit différent en 'solid' (optionnel) */
header.solid nav ul li a.active {
  color: var(--accent-yellow) !important; /* conserve jaune mais tu peux changer si tu veux */
}

/* underline : couleur selon l'état du header */
.nav-underline {
  background: var(--accent-purple);  /* couleur par défaut de la ligne */
}
header.solid .nav-underline {
  background: var(--accent-purple);  /* si tu veux une autre couleur en mode solid, remplace ici */
}
header {
    position: fixed;
    top: 0;
    width: 100%;
    background: rgba(15, 15, 27, 0.9);
    backdrop-filter: blur(10px);
    z-index: 1000;
}

nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 10%;
}

.logo {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--accent-yellow);
}

nav ul {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
}

nav ul li {
    margin-left: 30px;
}

nav ul li a {
    color: var(--text-white);
    text-decoration: none;
    font-weight: 400;
    transition: color 0.3s;
}

nav ul li a:hover {
    color: var(--accent-purple);
}

/* Menu hamburger pour mobile */
.menu-toggle {
    display: none;
    flex-direction: column;
    cursor: pointer;
}

.menu-toggle span {
    width: 25px;
    height: 3px;
    background: var(--text-white);
    margin: 3px 0;
    transition: 0.3s;
}

.menu-toggle.active span:nth-child(1) {
    transform: rotate(-45deg) translate(-5px, 6px);
}

.menu-toggle.active span:nth-child(2) {
    opacity: 0;
}

.menu-toggle.active span:nth-child(3) {
    transform: rotate(45deg) translate(-5px, -6px);
}

/* Hero Section */
.hero {
    display: flex;
    align-items: center;
    justify-content: space-around;
    padding: 50px 10% 30px;
    min-height: 100vh;
}

.hero-content h1 {
    font-size: 3rem;
    line-height: 1;
    margin-bottom: 20px;
}

.cursor {
    animation: blink 1s infinite;
}

@keyframes blink {
    0%, 50% { opacity: 1; }
    51%, 100% { opacity: 0; }
}

.hero-content h1 span {
    color: var(--accent-yellow);
}

.hero-content p {
    font-size: 1.2rem;
    color: var(--text-gray);
    margin-bottom: 30px;
}

.stats {
    display: flex;
    gap: 30px;
    margin: 30px 0;
}

.stat h3 {
    font-size: 2.5rem;
    color: var(--accent-purple);
    margin: 0;
}

.stat p {
    color: var(--text-gray);
    margin: 5px 0 0;
    font-size: 0.9rem;
}

.buttons {
    display: flex;
    gap: 15px;
}

.btn-yellow {
    background: var(--accent-yellow);
    padding: 12px 25px;
    border-radius: 8px;
    text-decoration: none;
    color: black;
    font-weight: bold;
    transition: background 0.3s;
}

.btn-yellow:hover {
    background: #e6b800;
}

.btn-purple {
    background: var(--accent-purple);
    padding: 12px 25px;
    border-radius: 8px;
    text-decoration: none;
    color: white;
    font-weight: bold;
    transition: background 0.3s;
}

.btn-purple:hover {
    background: #5a4fcf;
}

/* Cercle lumineux derrière l'image */
/* Cercle lumineux derrière l'image */
.hero-image {
    position: relative;
}

.circle-gradient {
    width: 300px;
    height: 300px;
    background: linear-gradient(45deg, var(--accent-purple), transparent);
    border-radius: 50%;
    padding: 10px;
    box-shadow: 0 0 50px rgba(108, 92, 231, 0.5);
    /* PAS d'animation ici pour que l'image reste fixe */
}

.circle-gradient img {
    width: 100%;
    border-radius: 50%;
    object-fit: cover;
}

@keyframes rotate {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* Sections communes */
section {
    padding: 10px 7%;
}

section h2 {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 50px;
    color: var(--accent-yellow);
}

/* Grille de Projets */
.project-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
}

.card {
    background: var(--card-bg);
    border-radius: 15px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: transform 0.3s, box-shadow 0.3s;
}

.card:hover {
    transform: translateY(-10px);
    box-shadow: 0 10px 30px rgba(108, 92, 231, 0.3);
}

.card img {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.card-info {
    padding: 20px;
}

.card-info h3 {
    margin-bottom: 10px;
}

.card-info p {
    color: var(--text-gray);
    margin-bottom: 15px;
}

.tags span {
    background: rgba(108, 92, 231, 0.2);
    color: var(--accent-purple);
    padding: 5px 10px;
    border-radius: 5px;
    font-size: 0.8rem;
    margin-right: 5px;
     margin-bottom: 5px; 
    display: inline-block;
}

.project-links {
    display: flex;
    gap: 10px;
    margin-top: 15px;
}

.btn-small {
    padding: 8px 15px;
    border-radius: 5px;
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    transition: background 0.3s;
}

.btn-small:nth-child(1) {
    background: var(--accent-purple);
    color: white;
}

.btn-small:nth-child(1):hover {
    background: #5a4fcf;
}

.btn-small:nth-child(2) {
    background: var(--accent-yellow);
    color: black;
}

.btn-small:nth-child(2):hover {
    background: #e6b800;
}

/* About Section */
/* ======= Styles pour la "skills panel" (Compétences & Expertises) ======= */
/* ========== About section (stacked cards, glow, left icons) ========== */

/* layout: stacked cards */
.about-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 28px;
}

/* base card */
.about-card {
  position: relative;
  background: var(--card-bg);
  border-radius: 20px;
  /* laisser de l'espace gauche pour l'icône qui dépasse */
  padding: 32px 32px 32px 110px;
  border: 1px solid rgba(255,255,255,0.06);
  overflow: visible;
  transition: transform .22s ease, box-shadow .22s ease;
}
.about-card:hover { transform: translateY(-6px); }

/* left icon (absolute) - shared */
.left-icon {
  position: absolute;
  left: 22px;              /* ajuster pour plus ou moins de dépassement */
  top: 28px;
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: var(--accent-purple);
  display:flex;
  align-items:center;
  justify-content:center;
  box-shadow: 0 12px 42px rgba(124,58,237,0.22);
  z-index: 2;
}
.left-icon svg { width:36px; height:36px; display:block; color:white; }

/* variants for sizes */
.left-icon--small { width:56px; height:56px; left:22px; top:24px; }
.left-icon--big   { width:72px; height:72px; left:18px; top:24px; }
.left-icon--circle { width:56px; height:56px; left:18px; top:28px; }

/* content area to the right of the icon (no extra margin needed because padding-left on card) */
.about-content {}

/* headings inside cards */
.about-card h3 {
  color: var(--accent-yellow);
  margin: 0 0 12px 0;
  font-size: 1.45rem;
  font-weight: 800;
}

/* formation details */
.formation-item { margin-bottom: 16px; }
.formation-item h4 { margin:0 0 6px; color:var(--text-white); font-weight:700; font-size:1.04rem; }
.formation-item .small { color:var(--text-gray); margin:6px 0 0; display:block; }
.formation-item .date { color: rgba(255,255,255,0.22); margin-top:8px; display:block; }

/* mission text */
.mission-text, .about-card p { color: var(--text-gray); line-height:1.6; margin-top:6px; }

/* ================= gold glow (apply with .about-card--glow) ================= */
.about-card--glow {
  padding: 36px 36px 36px 120px; /* plus d'espace à gauche pour icône */
  border-radius: 22px;
  border: 1px solid rgba(255,255,255,0.04);
}

/* gold outer glow */
.about-card--glow::before {
  content: "";
  position: absolute;
  inset: -18px;
  border-radius: 26px;
  z-index: -2;
  box-shadow: 0 26px 90px rgba(241,178,26,0.36);
  filter: blur(8px);
}
/* subtle inner rounded border */
.about-card--glow::after {
  content: "";
  position: absolute;
  inset: 8px;
  border-radius: 16px;
  z-index: -1;
  border: 1px solid rgba(255,255,255,0.03);
}

/* ================= Ma Mission: inner white border ================= */
.about-card--outlined {
  padding: 32px 32px 32px 110px;
  border-radius: 20px;
  border: none;
  position: relative;
}
.about-card--outlined::after {
  content: "";
  position: absolute;
  inset: 8px;
  border-radius: 14px;
  z-index: -1;
  border: 2px solid rgba(255,255,255,0.12);
}

/* ================= Skills panel inner grid and cards ================= */
.skills-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
  margin-top: 8px;
}

.skill-card {
  background: linear-gradient(180deg, rgba(17,18,25,0.35), rgba(21,23,30,0.36));
  border-radius: 14px;
  padding: 18px;
  border: 1px solid rgba(124,58,237,0.06);
  min-height: 120px;
  display:flex;
  flex-direction:column;
  gap:10px;
  transition: transform .18s, box-shadow .18s;
}
.skill-card:hover { transform: translateY(-6px); box-shadow: 0 12px 40px rgba(0,0,0,0.36); }

.skill-head { display:flex; align-items:center; gap:14px; }
.skill-icon {
  width:56px;
  height:56px;
  border-radius:10px;
  background: var(--accent-yellow);
  display:flex;
  align-items:center;
  justify-content:center;
  color:#111;
  font-weight:800;
  box-shadow: 0 8px 28px rgba(241,178,26,0.12);
  flex-shrink:0;
}
.skill-title { color:var(--accent-yellow); font-weight:800; font-size:1.03rem; }
.skill-card p { color:var(--text-gray); margin:0; font-size:0.95rem; line-height:1.45; }

/* place big skill card under first column */
.skill-card.big { grid-column: 1 / 2; }

/* ================= Responsive ================= */
@media (max-width: 1100px) {
  .skills-grid { grid-template-columns: repeat(2, 1fr); gap:18px; }
  .about-card, .about-card--outlined, .about-card--glow { padding-left: 96px; }
  .left-icon { left: 18px; }
}
@media (max-width: 768px) {
  /* stack icons above content on mobile */
  .about-card { padding: 20px; padding-left: 24px; }
  .left-icon { position: relative; left: 0; top: 0; margin-bottom: 12px; width:56px; height:56px; }
  .about-grid { gap: 18px; }
  .skills-grid { grid-template-columns: 1fr; }
  .skill-card.big { grid-column: auto; }
  .about-card--glow::before { inset: -12px; filter: blur(6px); box-shadow: 0 18px 50px rgba(241,178,26,0.28); }
}
/* Contact Section */
/* SECTION CONTACT – STYLE CARTE 2 COLONNES */
/* Contact Section - Nouveau design moderne */

/* Section globale */
.contact {
  padding: 80px 10%;
  text-align: center; /* Centrer le titre et l'intro */
}

/* Titre centré avec soulignement */
.contact h2 {
  font-size: 2.25rem; /* text-4xl */
  font-weight: bold;
  margin-bottom: 1rem; /* mb-4 */
  letter-spacing: -0.025em; /* tracking-tight */
  position: relative;
  display: inline-block; /* Pour centrer le soulignement */
}

.contact h2::after {
  content: '';
  display: block;
  width: 5rem; /* w-20 */
  height: 0.25rem; /* h-1 */
  background-color: var(--accent-purple);
  margin: 1rem auto 0; /* mx-auto mt-4 */
  border-radius: 9999px; /* rounded-full */
  box-shadow: 0 0 10px rgba(147, 51, 234, 0.5);
}

/* Texte d'intro centré */
.contact-intro {
  max-width: 640px;
  margin: 0 auto 3rem; /* mb-16, centré */
  color: #9ca3af; /* text-gray-400 */
  font-size: 1.125rem; /* text-lg */
  line-height: 1.625; /* leading-relaxed */
  text-align: center;
}

/* Grille principale (inchangée, mais ajustée pour responsive) */
.contact-wrapper {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); /* Simplifié pour 1:1 */
  gap: 3rem; /* gap-12 */
  align-items: flex-start;
}

/* Colonne gauche - Cartes info avec hover */
.contact-left {
  display: flex;
  flex-direction: column;
  gap: 1.5rem; /* space-y-6 */
}

.contact-card {
  display: flex;
  align-items: center;
  padding: 1.5rem; /* p-6 */
  border-radius: 1rem; /* rounded-2xl */
  background: #16162a; /* bg-[#16162a] */
  border: 1px solid #1f2937; /* border-gray-800 */
  transition: all 0.2s; /* transition-all */
  cursor: pointer;
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05); /* shadow-lg */
}

.contact-card:hover {
  border-color: var(--accent-purple); /* hover:border-purple-500 */
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05), 0 0 0 1px rgba(147, 51, 234, 0.1); /* hover:shadow-purple-500/10 */
  transform: translateY(-2px); /* Ajout pour effet lift */
}

/* Icône dans cercle violet */
.contact-icon {
  width: 3rem; /* w-12 */
  height: 3rem; /* h-12 */
  border-radius: 0.75rem; /* rounded-xl */
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--accent-purple); /* bg-purple-600 */
  margin-right: 1rem; /* mr-4 */
  transition: transform 0.2s; /* transition-transform */
  flex-shrink: 0; /* Évite déformation */
}

.contact-card:hover .contact-icon {
  transform: scale(1.1); /* group-hover:scale-110 */
}

/* Suppression des anciens pseudo-éléments pour icônes, on garde simple */
.email-icon::before,
.phone-icon::before,
.location-icon::before {
  content: none; /* Supprimé pour utiliser des icônes SVG ou texte */
}

/* Ajout d'icônes SVG simples (remplace par tes icônes préférées) */
.email-icon::after { content: "📧"; font-size: 1.25rem; color: white; }
.phone-icon::after { content: "📞"; font-size: 1.25rem; color: white; }
.location-icon::after { content: "📍"; font-size: 1.25rem; color: white; }

/* Texte des cartes */
.contact-text h3 {
  margin: 0 0 0.5rem; /* mb-2 */
  font-size: 0.875rem; /* text-sm */
  font-weight: 500; /* font-medium */
  color: #6b7280; /* text-gray-500 */
}

.contact-text p {
  margin: 0;
  color: var(--text-white);
  font-weight: 600; /* font-semibold */
}

/* Colonne droite - Formulaire dans une carte */
.contact-right {
  background: #16162a; /* bg-[#16162a] */
  border-radius: 1.5rem; /* rounded-3xl */
  padding: 2rem; /* p-8 */
  border: 1px solid #1f2937; /* border-gray-800 */
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25); /* shadow-2xl */
  text-align: left;
}

/* Formulaire */
.contact-form {
  display: flex;
  flex-direction: column;
  gap: 1.5rem; /* space-y-6 */
}

/* Groupes de formulaire */
.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.5rem; /* space-y-2 */
}

.form-group label {
  font-size: 0.875rem; /* text-sm */
  font-weight: 500; /* font-medium */
  color: #d1d5db; /* text-gray-300 */
}

/* Inputs et textarea */
.contact-form input,
.contact-form textarea {
  width: 100%; /* w-full */
  padding: 1rem; /* p-4 */
  border-radius: 0.75rem; /* rounded-xl */
  border: 1px solid #374151; /* border-gray-700 */
  background: #0b0b1a; /* bg-[#0b0b1a] */
  color: var(--text-white);
  font-family: "Poppins", sans-serif;
  font-size: 0.95rem;
  transition: border-color 0.2s; /* transition-colors */
  resize: none; /* Pour textarea */
}

.contact-form input:focus,
.contact-form textarea:focus {
  outline: none;
  border-color: var(--accent-purple); /* focus:border-purple-500 */
}

.contact-form textarea {
  min-height: 5rem; /* rows="5" approx */
}

/* Bouton submit */
.contact-submit {
  width: 100%; /* w-full */
  background: #ffc131; /* bg-[#ffc131] */
  color: #000000; /* text-black */
  font-weight: bold;
  padding: 1rem; /* py-4 */
  border-radius: 0.75rem; /* rounded-xl */
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem; /* gap-2 */
  transition: all 0.2s;
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05), 0 0 0 1px rgba(255, 193, 49, 0.1); /* shadow-lg shadow-yellow-500/10 */
}

.contact-submit:hover {
  background: #e6ae2c; /* hover:bg-[#e6ae2c] */
  transform: translateY(-1px);
}

.contact-submit:active {
  transform: scale(0.98); /* active:scale-[0.98] */
}

/* Ajout d'icône au bouton (SVG pour envoyer) */
.contact-submit::before {
  content: "📤";
  font-size: 1.25rem;
}

/* Message de statut */
.contact-status {
  text-align: center;
  font-weight: 500; /* font-medium */
  margin-top: 1rem; /* mt-4 */
  color: var(--text-gray);
}

/* Responsive */
@media (max-width: 900px) {
  .contact-wrapper {
    grid-template-columns: 1fr; /* 1 colonne sur mobile */
    gap: 2rem;
  }

  .contact-right {
    order: 2; /* Formulaire en bas */
  }

  .contact-left {
    order: 1; /* Cartes en haut */
  }

  .contact h2 {
    font-size: 2rem; /* Réduction sur mobile */
  }

  .contact-intro {
    font-size: 1rem;
  }
}

/*  fin  contacte  */


/* Expériences Section */
.experience-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 20px;
}

.exp-card {
    background: #222639;
    border-radius: 15px;
    padding: 20px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: transform 0.3s, box-shadow 0.3s;
    position: relative;
}

.exp-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 10px 30px rgba(108, 92, 231, 0.3);
}

.exp-date {
    background: var(--accent-purple);
    color: white;
    padding: 5px 10px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    display: inline-block;
    margin-bottom: 15px;
}

.exp-info h3 {
    margin-bottom: 10px;
    color: var(--accent-yellow);
}

.exp-info p {
    color: var(--text-gray);
    margin-bottom: 15px;
}

.exp-info ul {
    list-style: none;
    padding: 0;
    margin-bottom: 15px;
}

.exp-info ul li {
    color: var(--text-gray);
    margin-bottom: 5px;
    position: relative;
    padding-left: 20px;
}

.exp-info ul li:before {
    content: "•";
    color: var(--accent-purple);
    position: absolute;
    left: 0;
}

.exp-tags span {
    background: rgba(108, 92, 231, 0.2);
    color: var(--accent-purple);
    padding: 5px 10px;
    border-radius: 5px;
    font-size: 0.8rem;
    margin-right: 5px;
    display: inline-block;
}

/* Footer */
footer {
    background: var(--card-bg);
    text-align: center;
    padding: 30px 10%;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-content p {
    margin-bottom: 20px;
    color: var(--text-gray);
}

.footer-links {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 20px;
}

.footer-links a {
    color: var(--accent-purple);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s;
}

.footer-links a:hover {
    color: var(--accent-yellow);
}

/* Responsive Design */
@media (max-width: 768px) {
    nav ul {
        display: none;
        flex-direction: column;
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background: var(--bg-dark);
        padding: 20px 0;
    }

    nav ul.active {
        display: flex;
    }

    nav ul li {
        margin: 10px 0;
        text-align: center;
    }

    .menu-toggle {
        display: flex;
    }

    .hero {
        flex-direction: column;
        text-align: center;
        padding: 120px 5% 50px;
    }

    .hero-content {
        margin-bottom: 50px;
    }

    .hero-content h1 {
        font-size: 2.5rem;
    }

    .buttons {
        justify-content: center;
    }

    .circle-gradient {
        width: 250px;
        height: 250px;
    }

    .about {
        flex-direction: column;
        text-align: center;
        padding: 30px;
    }

    .about-content {
        padding-right: 0;
        margin-bottom: 30px;
    }

    .about-image img {
        width: 250px;
        height: 250px;
    }

    .project-grid {
        grid-template-columns: 1fr;
    }

    section {
        padding: 50px 5%;
    }

    section h2 {
        font-size: 2rem;
    }
}

@media (max-width: 480px) {
    .hero-content h1 {
        font-size: 2rem;
    }

    .circle-gradient {
        width: 200px;
        height: 200px;
    }

    .about-image img {
        width: 200px;
        height: 200px;
    }
}

#typewriter::after {
    content: '|';
    margin-left: 5px;
    color: #ffcc00; /* La couleur jaune de votre thème */
    animation: blink 0.7s infinite;
}

@keyframes blink {
    0% { opacity: 1; }
    50% { opacity: 0; }
    100% { opacity: 1; }
}

/* Forcer le texte fixe en blanc */
.text-white {
    color: var(--text-white) !important;
}

/* Couleur spéciale pour Mohammed */
.highlight {
    color: var(--accent-yellow);
    font-weight: bold;
}
/* Texte fixe : espace en bas */
.fixed-text {
    display: inline-block;
    margin-bottom: 12px; /* ajuste ici (8px / 10px / 15px) */
}

/* Le nom animé */
#typewriter .name {
    font-family: 'Playfair Display', serif; /* exemple élégant */
    letter-spacing: 1px;
}

/* Mohammed (highlight) */
.highlight {
    color: var(--accent-yellow);
    font-weight: 700;
}

/* traduction  */
/* language toggle button */
.nav-controls { display:flex; align-items:center; gap:10px; }
.lang-toggle{
  background: transparent;
  border: 1px solid rgba(255,255,255,0.08);
  color: var(--text-white);
  padding: 6px 10px;
  border-radius: 8px;
  cursor: pointer;
  font-weight:600;
  transition: background .18s, color .18s, border-color .18s, transform .12s;
}
.lang-toggle:hover { background: rgba(255,255,255,0.03); transform: translateY(-1px); }
header.solid .lang-toggle {
  border-color: rgba(0,0,0,0.08);
  color: rgba(0,0,0,0.7);
  background: transparent;
}
.lang-toggle[aria-pressed="true"] {
  background: linear-gradient(90deg,var(--accent-yellow),var(--accent-purple));
  color: #0b0b0b;
  border-color: transparent;
}


/*  voir demo  */
/* ---------- Modal projet amélioré (gallery + video) ---------- */
.project-modal__overlay {
  position: fixed;
  inset: 0;
  background: rgba(2,6,23,0.66);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2200;
  opacity: 0;
  pointer-events: none;
  transition: opacity .22s ease;
}
.project-modal__overlay.open { opacity: 1; pointer-events: auto; }

.project-modal {
  width: min(1100px, 96%);
  max-height: 88vh;
  overflow: auto;
  background: linear-gradient(180deg,#0e1520 0%, #0b1118 100%);
  border-radius: 12px;
  padding: 20px;
  color: var(--text-white);
  border: 1px solid rgba(255,255,255,0.03);
  box-shadow: 0 24px 60px rgba(3,6,18,0.8);
}

/* header */
.project-modal__header{ display:flex; align-items:flex-start; justify-content:space-between; gap:12px; margin-bottom: 12px; }
.project-modal__title{ font-size:1.45rem; font-weight:800; color:var(--accent-purple); text-align:left; }
.project-modal__subtitle{ color:var(--text-gray); margin-top:6px; font-size:0.95rem; }

/* close */
.project-modal__close{ background:transparent; border:none; color:var(--text-gray); font-size:20px; cursor:pointer; padding:6px; border-radius:6px; }
.project-modal__close:hover{ background: rgba(255,255,255,0.03); color:var(--text-white); }

/* body */
.project-modal__body{ display:grid; grid-template-columns: 1fr; gap:16px; }

/* preview area (shows selected image or video) */
.project-preview{ display:none; width:100%; border-radius:10px; overflow:hidden; background: #071122; padding:8px; }
.project-preview.open{ display:block; }
.project-preview img, .project-preview video, .project-preview iframe{ width:100%; height:auto; border-radius:8px; display:block; }

/* gallery thumbnails */
.project-gallery{ display:grid; grid-template-columns: repeat(3, 1fr); gap:12px; }
.project-gallery .thumb{ cursor:pointer; border-radius:8px; overflow:hidden; border:1px solid rgba(255,255,255,0.03); box-shadow:0 8px 18px rgba(0,0,0,0.35); transition:transform .15s ease, filter .15s; }
.project-gallery .thumb img{ width:100%; height:120px; object-fit:cover; display:block; }
.project-gallery .thumb:hover{ transform:translateY(-6px); filter:brightness(.98); }

/* if a gallery item is a video, show small play badge */
.project-gallery .thumb .play-badge{
  position:absolute; right:8px; bottom:8px; background:rgba(0,0,0,0.5); color:white; padding:6px 8px; border-radius:999px; font-size:12px;
}

/* description card */
.project-desc{ background: rgba(255,255,255,0.02); padding:14px; border-radius:8px; color:var(--text-gray); border:1px solid rgba(255,255,255,0.03); line-height:1.55; }

/* tech tags */
.project-tech{ display:flex; gap:8px; flex-wrap:wrap; margin-top:6px; }
.project-tech .tag{ background: linear-gradient(90deg, rgba(124,58,237,0.14), rgba(250,204,21,0.06)); color:var(--accent-yellow); padding:8px 12px; border-radius:999px; font-weight:700; font-size:0.86rem; border:1px solid rgba(255,255,255,0.03); }

/* responsive */
@media (max-width: 880px){
  .project-gallery{ grid-template-columns: repeat(2,1fr); }
  .project-gallery .thumb img{ height:100px; }
}
@media (max-width: 520px){
  .project-gallery{ grid-template-columns: 1fr 1fr; gap:8px; }
  .project-gallery .thumb img{ height:90px; }
  .project-modal{ padding:12px; }
  .project-modal__title{ font-size:1.1rem; }
}

/* ASSISTANT */
#ai-assistant {
    position: fixed;
    bottom: 2.5rem;
    right: 2.5rem;
    z-index: 3000;
}

#ai-toggle {
    width: 65px;
    height: 65px;
    background: var(--primary);
    border: none;
    border-radius: 50%;
    font-size: 1.8rem;
    cursor: pointer;
    box-shadow: 0 12px 35px rgba(124, 58, 237, 0.5);
    transition: var(--transition);
}

#ai-toggle:hover {
    transform: scale(1.1) rotate(5deg);
}

#ai-chat {
    position: absolute;
    bottom: 85px;
    right: 0;
    width: 360px;
    height: 480px;
    background: var(--bg-dark);
    border: 1px solid var(--border);
    border-radius: 24px;
    display: flex;
    flex-direction: column;
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.6);
    overflow: hidden;
    transform-origin: bottom right;
    transition: var(--transition);
}

#ai-chat.hidden {
    display: none;
    opacity: 0;
    transform: scale(0.9);
}

.chat-header {
    background: var(--primary);
    padding: 1.2rem 1.8rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

#chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 1.8rem;
    display: flex;
    flex-direction: column;
    gap: 1.2rem;
}

.msg {
    padding: 0.9rem 1.2rem;
    border-radius: 16px;
    font-size: 0.9rem;
    max-width: 85%;
}

.msg.ai {
    background: var(--bg-card);
    align-self: flex-start;
    border-bottom-left-radius: 2px;
}

.msg.user {
    background: var(--primary);
    color: white;
    align-self: flex-end;
    border-bottom-right-radius: 2px;
}

#chat-form {
    padding: 1.2rem;
    display: flex;
    gap: 0.8rem;
    border-top: 1px solid var(--border);
}

#chat-input {
    flex: 1;
    padding: 0.8rem 1.2rem;
    border-radius: 12px;
    font-size: 0.9rem;
}

#chat-form button {
    background: var(--primary);
    border: none;
    color: white;
    padding: 0 1.2rem;
    border-radius: 12px;
    cursor: pointer;
    font-weight: 700;
}

/* ANIMATIONS */
@keyframes blink { 50% { opacity: 0; } }
@keyframes spin { from { transform: rotate(0); } to { transform: rotate(360deg); } }
@keyframes zoomIn { from { transform: scale(0.92); opacity: 0; } to { transform: scale(1); opacity: 1; } }

/* RESPONSIVE */
@media (max-width: 1024px) {
    h1 { font-size: 3.5rem; }
    .hero-container { flex-direction: column-reverse; text-align: center; gap: 3rem; }
    .hero-desc, .hero-stats { margin-left: auto; margin-right: auto; }
    .hero-btns { justify-content: center; }
    .img-wrapper { width: 320px; height: 320px; }
}

@media (max-width: 768px) {
    .nav-links {
        display: none; /* Cache les liens sur mobile */
        flex-direction: column;
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background: var(--bg-dark);
        padding: 2rem;
        border-top: 1px solid var(--border);
    }
    .nav-links.mobile-show { display: flex; }
    #mobile-toggle { display: flex; }
    .about-grid { grid-template-columns: 1fr; }
    .contact-wrapper { grid-template-columns: 1fr; }
    .form-row { grid-template-columns: 1fr; }
    #ai-chat { width: 300px; height: 420px; }
}


/* === compact-overrides.css ===
   Coller à la fin du CSS principal pour réduire les espaces inutiles
*/

/* Variables d'espacement — change ici pour toute la page */
:root{
  --space-xxs: 6px;
  --space-xs: 8px;
  --space-sm: 10px;
  --space-md: 14px;   /* valeur par défaut réduite */
  --space-lg: 20px;
  --space-xl: 28px;

  --card-radius: 12px;
  --btn-vert-padding: 10px;
  --btn-horiz-padding: 14px;
  --section-vert-padding: 28px; /* moins d'espace entre sections */
}

/* Header / Nav : plus compact */
header {
  padding: 10px 4% !important;
  transition: background-color 200ms ease, box-shadow 200ms ease;
}
nav { gap: 12px; }
nav ul li { margin-left: 18px !important; } /* réduit l'espacement des items */
.logo { font-size: 1.25rem; }

/* Hero : réduire paddings / gap */
.hero {
  padding: calc(var(--section-vert-padding) - 6px) 6% calc(var(--section-vert-padding) - 12px);
  gap: 18px;
  min-height: auto; /* enlève grand min-height si tu veux plus compact */
}
.hero-content h1 { margin-bottom: var(--space-sm); }
.hero-content p { margin-bottom: var(--space-md); }

/* Réduire boutons */
.buttons { gap: var(--space-sm); }
.btn-yellow, .btn-purple {
  padding: var(--btn-vert-padding) var(--btn-horiz-padding);
  border-radius: 10px;
  font-size: 0.95rem;
}

/* Sections : marges verticales plus réduites */
section {
  padding: var(--section-vert-padding) 6% !important;
}
section h2 {
  margin-bottom: var(--space-lg);
}

/* Cards & grids : diminuer paddings et gaps */
.card { border-radius: var(--card-radius); padding: var(--space-md) !important; }
.card-info { padding: var(--space-sm) !important; }
.card img { height: 160px; } /* réduction hauteur preview */
.project-grid { gap: 14px !important; }

/* About & skill cards */
.about-card, .about-card--glow, .about-card--outlined {
  padding: 18px 18px 18px 82px !important; /* réduit espace gauche pour icône */
  border-radius: 14px !important;
}
.left-icon { width: 62px; height: 62px; left: 18px; top: 20px; }
.skills-grid { gap: 14px; }
.skill-card { padding: 12px; border-radius: 12px; }

/* Contact : plus compact */
.contact { padding: 40px 6% !important; }
.contact-wrapper { gap: 18px !important; }
.contact-card { padding: 12px !important; border-radius: 12px; }
.contact-right { padding: 16px !important; }

/* Project modal : réduire padding */
.project-modal { padding: 12px !important; max-height: 82vh; }
.project-modal__body { gap: 10px !important; }
.project-gallery .thumb img { height: 90px !important; }

/* Footer : réduire paddings */
footer { padding: 18px 6% !important; }

/* Reduce global spacings for lists, stats, etc. */
.stats { gap: 16px !important; margin: 18px 0 !important; }
.stat h3 { font-size: 2rem; }

/* Buttons small */
.btn-small { padding: 6px 10px; border-radius: 8px; }

/* Form inputs spacing */
.contact-form input, .contact-form textarea {
  padding: 12px !important; border-radius: 10px;
}

/* Mobile adjustments (plus compact on smaller screens) */
@media (max-width: 900px) {
  :root { --section-vert-padding: 20px; --avatar-size: 200px; }
  header { padding: 10px 4%; }
  .hero { padding: 80px 4% 20px; gap: 16px; }
  .card img { height: 140px; }
  .project-gallery .thumb img { height: 80px; }
  .about-card { padding: 14px 14px 14px 68px !important; }
}

/* Une règle générique pour supprimer marges verticales inutiles sur les titres et paragraphes */
h1,h2,h3,h4 { margin-top: 0; margin-bottom: 0.45em; }
p { margin-top: 0; margin-bottom: 0.8em; }

/* Nettoyage des doublons visuels : réduire les ombres trop larges */
.card, .about-card, .contact-card, .project-modal {
  box-shadow: 0 8px 24px rgba(3,6,18,0.45); /* plus léger que certaines ombres lourdes */
}

/* Si certaines règles plus spécifiques persistent, forcer avec !important (utiliser avec parcimonie) */
.section--force-compact { padding: 12px 4% !important; }

/* Debug helper (temporaire) : afficher outline pour repérer gros paddings/margins */
.debug-outline * {
  /* retirer cette section après debug */
  /* outline: 1px dashed rgba(255,0,0,0.06); */
}



