/* ==================================================
   1. VARIABLES & THÈMES
================================================== */
:root {
  /* Couleurs primaires */
  --primary: #3a86ff;
  --primary-dark: #2667cc;
  --primary-light: #5c9fff;
  
  /* Couleurs d'accentuation */
  --accent: #FF4E45;
  --accent-dark: #e03c34;
  --accent-light: #ff6b63;
  
  /* Couleurs de base – Mode clair */
  --bg-main: #ffffff;
  --bg-alt: #ffffff;
  --text: #2c3e50;
  --text-light: #64748b;
  
  /* Nuances de gris complémentaires */
  --gray-light: #e0e0e0;
  --gray-medium: #b0b0b0;
  
  /* Ombres, bordures et transitions */
  --shadow-sm: 0 2px 10px rgba(0,0,0,0.05);
  --shadow-md: 0 5px 15px rgba(0,0,0,0.07);
  --shadow-lg: 0 10px 25px rgba(0,0,0,0.1);
  --border-radius: 8px;
  --transition: all 0.3s ease;
}

/* Mode sombre */
body.dark-mode {
  --primary: #4e95ff;
  --primary-dark: #3a7fd9;
  --primary-light: #6ba5ff;
  
  --bg-main: #0a0a0a;
  --bg-alt: #1a1a1a;
  --text: #F8F9FA;
  --text-light: #d1d5db;
  
  --shadow-sm: 0 2px 10px rgba(0,0,0,0.1);
  --shadow-md: 0 5px 15px rgba(0,0,0,0.15);
  --shadow-lg: 0 10px 25px rgba(0,0,0,0.2);
}

/* ==================================================
   2. RÉINITIALISATION & STYLES GLOBAUX
================================================== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Inter', sans-serif;
  color: var(--text);
  background-color: var(--bg-main);
  line-height: 1.6;
  transition: background-color 0.3s ease, color 0.3s ease;
}

h1, h2, h3, h4 {
  font-family: 'Playfair Display', serif;
  color: var(--text);
  margin-bottom: 1rem;
  font-weight: 700;
  line-height: 1.3;
}

a {
  color: var(--primary);
  text-decoration: none;
  transition: var(--transition);
}

a:hover {
  color: var(--primary-dark);
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 2rem;
  position: relative;
}

.section {
  padding: 4rem 0; /* Ajuster cette valeur si nécessaire */
  margin: 2rem 0; /* Réduire cette valeur */
  position: relative;
}

.section:nth-child(even) {
  background-color: var(--bg-alt);
}

/* ==================================================
   3. ANIMATIONS
================================================== */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes cardAppear {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ==================================================
   4. HEADER & NAVIGATION
================================================== */
.header {
  background-color: var(--bg-main);
  box-shadow: var(--shadow-sm);
  position: fixed;
  width: 100%;
  top: 0;
  z-index: 1000;
  transition: 0.3s ease, box-shadow 0.3s ease;
}

.header.scrolled {
  box-shadow: var(--shadow-md);
}

.nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 0;
  position: relative;
}

.nav__logo {
  font-family: 'Playfair Display', serif;
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text);
  text-decoration: none;
  display: flex;
  align-items: center;
}

.logo-highlight {
  color: var(--accent);
}

.nav__menu {
  display: flex;
}

.nav__list {
  display: flex;
  list-style: none;
  align-items: center;
  gap: 2.5rem;
}

.nav__link {
  color: var(--text);
  text-decoration: none;
  font-weight: 500;
  transition: var(--transition);
  position: relative;
  font-size: 0.95rem;
  padding: 0.5rem 0;
}

.nav__link::after {
  content: '';
  position: absolute;
  width: 0;
  height: 2px;
  bottom: 0;
  left: 0;
  background-color: var(--primary);
  transition: var(--transition);
}

.nav__link:hover,
.nav__link.active {
  color: var(--primary);
}

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

.nav__toggle {
  display: none;
  cursor: pointer;
  font-size: 1.5rem;
  color: var(--text);
}

.theme-toggle {
  cursor: pointer;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
  background-color: var(--bg-alt);
  border: none;
  color: var(--text);
  font-size: 1.2rem;
  margin-left: 1rem;
}

.theme-toggle:hover {
  background-color: var(--primary-light);
  color: #fff;
}

/* Styles pour le switch du thème */
.theme-switch {
font-size: 17px;
position: relative;
display: inline-block;
width: 4em;
height: 2.2em;
margin-left: 1rem;
}

/* Cache la checkbox HTML par défaut */
.theme-switch input {
opacity: 0;
width: 0;
height: 0;
}

/* Le slider */
.theme-slider {
position: absolute;
cursor: pointer;
top: 0;
left: 0;
right: 0;
bottom: 0;
background-color: #2a2a2a;
transition: 0.4s;
border-radius: 30px;
overflow: hidden;
}

.theme-slider:before {
position: absolute;
content: "";
height: 1.2em;
width: 1.2em;
border-radius: 20px;
left: 0.5em;
bottom: 0.5em;
transition: 0.4s;
transition-timing-function: cubic-bezier(0.81, -0.04, 0.38, 1.5);
box-shadow: inset 8px -4px 0px 0px #fff;
}

.theme-switch input:checked + .theme-slider {
background-color: #2a2a2a; /* Couleur de fond nuit */
}

.theme-switch input:not(:checked) + .theme-slider {
background-color: #00a6ff; /* Couleur de fond jour */
}

.theme-switch input:checked + .theme-slider:before {
transform: translateX(1.8em);
box-shadow: inset 8px -4px 0px 0px #fff; /* Lune */
}

.theme-switch input:not(:checked) + .theme-slider:before {
box-shadow: inset 15px -4px 0px 15px #ffcf48; /* Soleil */
}


/* Correction pour les étoiles et le nuage dans le thème */

/* Remplacez par ces définitions correctes */
.theme-star {
background-color: #fff;
border-radius: 50%;
position: absolute;
width: 5px;
height: 5px;
transition: all 0.4s;
}

.theme-star_1 {
left: 0.51em;
top: 0.5em;
}

.theme-star_2 {
left: 0.6em;
top: 1.2em;
}

.theme-star_3 {
left: 1.4em;
top: 0.9em;
}

.theme-cloud {
width: 3.5em;
position: absolute;
bottom: -1.4em;
left: 1em;
opacity: 0;
transition: all 0.4s;
}

/* Assurez-vous que ces règles sont correctes */
.theme-switch input:checked ~ .theme-slider .theme-star {
opacity: 1;
}

.theme-switch input:not(:checked) ~ .theme-slider .theme-star {
opacity: 0;
}

.theme-switch input:checked ~ .theme-slider .theme-cloud {
opacity: 0;
}

.theme-switch input:not(:checked) ~ .theme-slider .theme-cloud {
opacity: 1;
}

/* Styles pour le sélecteur de langue */
.lang-switch {
display: unset;
align-items: center;
margin-left: 1rem;
background-color: var(--bg-alt);
border-radius: 20px;
padding: 0.3rem 0.6rem;
}

.lang-btn {
background: none;
border: none;
font-size: 0.9rem;
font-weight: 600;
color: var(--text-light);
cursor: pointer;
padding: 0.2rem 0.4rem;
transition: color 0.3s;
}

.lang-btn.active {
color: var(--primary);
}

.lang-separator {
color: var(--text-light);
margin: 0 0.2rem;
}

body.dark-mode .lang-switch {
background-color: var(--bg-main);
}

/* ==================================================
   5. SECTION HERO
================================================== */
.hero {
  padding: 2rem 0 1rem;
  min-height: 75vh;
  display: flex;
  align-items: center;
  background-color: var(--bg-main);
  position: relative;
  overflow: hidden;
  margin-bottom: -7rem; 
}

.hero__pattern {
  position: absolute;
  top: 0;
  right: 0;
  width: 100%;
  height: 100%;
  background-image: 
    radial-gradient(var(--gray-light) 1px, transparent 1px), 
    radial-gradient(var(--gray-light) 1px, transparent 1px);
  background-size: 20px 20px;
  background-position: 0 0, 10px 10px;
  opacity: 0.3;
  z-index: 1;
}

.hero__container {
  margin-top: 4.5rem;
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  align-items: center;
  gap: 4rem;
  position: relative;
  z-index: 2;
}

.hero__content {
  animation: fadeIn 0.8s ease forwards;
}

.hero__subtitle-label {
  font-weight: 600;
  color: var(--primary);
  text-transform: uppercase;
  letter-spacing: 1.5px;
  font-size: 0.9rem;
  margin-bottom: 1rem;
  display: inline-block;
  position: relative;
  padding-left: 30px;
}

.hero__subtitle-label::before {
  content: "";
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 20px;
  height: 2px;
  background-color: var(--primary);
}

.hero__content h1 {
  font-size: 3.5rem;
  line-height: 1.2;
  margin-bottom: 1.5rem;
  font-weight: 800;
  color: var(--text);
}

.hero__content h1 .highlight {
  color: var(--primary);
  position: relative;
  display: inline-block;
}

.hero__content h1 .highlight::after {
  content: '';
  position: absolute;
  width: 100%;
  height: 30%;
  bottom: 0;
  left: 0;
  background-color: rgba(10, 102, 194, 0.1);
  z-index: -1;
}

.hero__subtitle {
  font-size: 1.25rem;
  color: var(--text-light);
  margin-bottom: 2rem;
  font-weight: 500;
}

.hero__description {
  font-size: 1.1rem;
  max-width: 550px;
  margin-bottom: 2.5rem;
  color: var(--text-light);
}

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

.hero__img-container {
  position: relative;
}

.hero__img {
  max-width: 100%;
  border-radius: 20px;
  box-shadow: var(--shadow-lg);
  position: relative;
  z-index: 2;
}

.hero__img-bg {
  position: absolute;
  width: 100%;
  height: 100%;
  background-color: var(--primary-light);
  border-radius: 20px;
  transform: rotate(-3deg) scale(0.95);
  top: 0;
  left: 0;
  z-index: 1;
}

/* ==================================================
   6. SECTION ABOUT
================================================== */
.about {
  position: relative;
  margin-top: 2rem; /* Ajuster cette valeur pour réduire l'espace */
}

.section__header {
  text-align: center;
  margin-bottom: 5rem;
}

.section__pretitle {
  color: var (--primary);
  text-transform: uppercase;
  letter-spacing: 2px;
  font-weight: 600;
  font-size: 0.9rem;
  margin-bottom: 1rem;
}

.section__title {
  font-size: 2.5rem;
  font-weight: 700;
  display: inline-block;
  margin-bottom: 1.5rem;
  color: var(--text);
  position: relative;
}

.section__title::after {
  content: '';
  position: absolute;
  width: 70px;
  height: 4px;
  background-color: var(--primary);
  bottom: -15px;
  left: 50%;
  transform: translateX(-50%);
  border-radius: 2px;
}

.section__subtitle {
  color: var(--text-light);
  font-size: 1.1rem;
  max-width: 700px;
  margin: 0 auto;
}

.about__container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 5rem;
  align-items: center;
}

.about__img {
  width: 100%;
  border-radius: var(--border-radius);
  box-shadow: var(--shadow-md);
  animation: fadeIn 0.8s ease forwards;
}

.about__content h3 {
  font-size: 2rem;
  color: var(--text);
  margin-bottom: 1.5rem;
  position: relative;
  padding-bottom: 15px;
}

.about__content h3::after {
  content: '';
  position: absolute;
  width: 50px;
  height: 3px;
  background-color: var(--primary);
  bottom: 0;
  left: 0;
}

.about__description {
  margin-bottom: 2.5rem;
  color: var(--text-light);
  font-size: 1.05rem;
  line-height: 1.8;
}

.about__stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
  margin-bottom: 2.5rem;
}

.about__stat {
  background: var(--bg-main);
  padding: 1.5rem;
  border-radius: var(--border-radius);
  text-align: center;
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
  border-bottom: 3px solid var(--primary);
  animation: cardAppear 0.5s ease forwards;
}

.about__stat:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow-md);
}

.stat__number {
  font-size: 2.2rem;
  font-weight: 700;
  color: var (--primary);
  margin-bottom: 0.7rem;
  display: block;
  content: '+';
}
.stat__number--plus::before {
  content: '+';
  display: inline-block;
}
.stat__label {
  content: '+';
  font-size: 0.9rem;
  color: var(--text-light);
  line-height: 1.4;
}

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

/* Styles pour la section About modernisée */

.about__container.modern {
max-width: 1100px;
margin: 0 auto;
padding: 2rem 0;
display: grid;
grid-template-areas:
  "top-content top-content"
  "stats-container stats-container"
  "buttons buttons";
gap: 2.5rem;
}

.about__top-content {
grid-area: top-content;
text-align: center;
}

.about__heading {
font-size: 2.4rem;
line-height: 1.3;
margin-bottom: 1.8rem;
font-weight: 700;
text-align: center;
font-family: 'Playfair Display', serif;
}

.gradient-text {
background: linear-gradient(120deg, var(--primary), #6a11cb);
-webkit-background-clip: text;
background-clip: text;
-webkit-text-fill-color: transparent;
display: inline-block;
}

.about__description {
font-size: 1.05rem;
line-height: 1.7;
color: var(--text-light);
text-align: center;
margin-bottom: 3rem;
max-width: 900px;
margin-left: auto;
margin-right: auto;
}

.about__stats-container {
grid-area: stats-container;
}

.about__stats {
display: grid;
grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
gap: 1.5rem;
margin: 0 auto;
}

.about__stat {
background-color: var(--bg-alt);
border-radius: var(--border-radius);
padding: 1.8rem;
box-shadow: var(--shadow-sm);
transition: transform 0.3s ease, box-shadow 0.3s ease;
border-top: 4px solid var(--primary);
display: flex;
flex-direction: column;
align-items: center;
text-align: center;
}

.about__stat:hover {
transform: translateY(-8px);
box-shadow: var(--shadow-md);
}

.stat__number {
font-size: 2.8rem;
font-weight: 700;
color: var(--primary);
display: block;
margin-bottom: 0.7rem;
line-height: 1;
}

.stat__label {
font-size: 1.1rem;
font-weight: 600;
color: var(--text);
margin-bottom: 1rem;
display: block;
}

.stat__context {
font-size: 0.9rem;
line-height: 1.5;
color: var(--text-light);
display: block;
}

.about__cta-container {
grid-area: buttons;
text-align: center;
margin-top: 2rem;
padding: 2rem;
background-color: var(--bg-alt);
border-radius: var(--border-radius);
box-shadow: var(--shadow-sm);
}

.about__cta-title {
font-size: 1.6rem;
margin-bottom: 1.5rem;
color: var(--text);
position: relative;
display: inline-block;
}

.about__cta-title::after {
content: '';
position: absolute;
bottom: -10px;
left: 50%;
transform: translateX(-50%);
width: 80px;
height: 3px;
background-color: var(--primary);
border-radius: 2px;
}

.about__buttons-container {
display: flex;
justify-content: center;
gap: 1.5rem;
margin-top: 2rem;
}

.btn--large {
padding: 1.2rem 2rem;
display: flex;
align-items: center;
justify-content: flex-start;
width: 280px;
transition: transform 0.3s ease, box-shadow 0.3s ease;
animation: pulse 2s infinite;
}

.btn--large:hover {
transform: translateY(-8px);
box-shadow: var(--shadow-lg);
animation: none;
}

/* Animation pulse pour les boutons CTA */
@keyframes pulse {
0% { transform: scale(1); }
50% { transform: scale(1.05); }
100% { transform: scale(1); }
}

.btn--accent {
background-color: var (--accent);
color: white;
border: none;
}

.btn--accent:hover {
background-color: var(--accent-dark);
color: white;
}

.cta-icon {
font-size: 1.8rem;
margin-right: 1rem;
}

.btn__content {
display: flex;
flex-direction: column;
align-items: flex-start;
text-align: left;
}

.btn__title {
font-weight: 600;
font-size: 1rem;
margin-bottom: 0.2rem;
}

.btn__subtitle {
font-size: 0.8rem;
opacity: 0.9;
}

@media screen and (max-width: 768px) {
.about__stats {
  grid-template-columns: 1fr;
}

.about__heading {
  font-size: 1.8rem;
  text-align: left;
}

.about__description {
  text-align: left;
  font-size: 1rem;
}

.about__buttons-container {
  flex-direction: column;
  align-items: center;
}

.btn--large {
  width: 100%;
  max-width: 320px;
}
}

/* Mise à jour des styles pour la section About */

.about__container.modern {
max-width: 1000px;
margin: 0 auto;
padding: 2rem 0;
}

.about__heading {
font-size: 2.4rem;
line-height: 1.3;
margin-bottom: 1.8rem;
font-weight: 700;
text-align: center;
font-family: 'Playfair Display', serif;
}

.about__description {
font-size: 1.05rem;
line-height: 1.7;
color: var(--text-light);
text-align: center;
margin-bottom: 3rem;
max-width: 900px;
margin-left: auto;
margin-right: auto;
}

.gradient-text {
background: linear-gradient(120deg, var(--primary), #6a11cb);
-webkit-background-clip: text;
background-clip: text;
-webkit-text-fill-color: transparent;
display: inline-block;
}

.about__stats-container {
margin: 3rem 0;
}

.about__stats {
display: grid;
grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
gap: 1.5rem;
margin: 0 auto;
}

.about__stat {
background-color: var(--bg-alt);
border-radius: var(--border-radius);
padding: 1.8rem;
box-shadow: var(--shadow-sm);
transition: transform 0.3s ease, box-shadow 0.3s ease;
border-top: 4px solid var(--primary);
display: flex;
flex-direction: column;
align-items: center;
text-align: center;
}

.about__stat:hover {
transform: translateY(-8px);
box-shadow: var(--shadow-md);
}

.stat__number {
font-size: 2.8rem;
font-weight: 700;
color: var(--primary);
display: block;
margin-bottom: 0.7rem;
line-height: 1;
}

.stat__label {
font-size: 1.1rem;
font-weight: 600;
color: var(--text);
margin-bottom: 1rem;
display: block;
}

.stat__context {
font-size: 0.9rem;
line-height: 1.5;
color: var (--text-light);
display: block;
}

/* 
.about__quote {
background-color: var(--bg-alt);
border-left: 4px solid var (--primary);
border-radius: 0 var(--border-radius) var(--border-radius) 0;
padding: 2rem;
margin: 3rem auto;
position: relative;
max-width: 800px;
}

.quote-icon {
position: absolute;
top: 1.5rem;
left: 1.5rem;
font-size: 1.8rem;
color: var(--primary);
opacity: 0.3;
}

.about__quote p {
font-style: italic;
color: var(--text);
font-size: 1.1rem;
font-weight: 500;
line-height: 1.6;
padding-left: 2.5rem;
}
*/

.about__buttons {
display: flex;
gap: 1.2rem;
margin-top: 2.5rem;
justify-content: center;
}

/* Responsive */
@media screen and (max-width: 768px) {
.about__heading {
  font-size: 1.8rem;
  text-align: left;
}

.about__description {
  text-align: left;
  font-size: 1rem;
}

.about__quote {
  padding: 1.5rem;
  margin: 2rem auto;
}

.about__quote p {
  font-size: 1rem;
  padding-left: 1.8rem;
}

.quote-icon {
  font-size: 1.5rem;
  top: 1.2rem;
  left: 1.2rem;
}

.about__stats {
  grid-template-columns: 1fr;
}

.about__buttons {
  flex-direction: column;
}
}

/* ==================================================
   7. EXPERTISE & SKILLS / CARDS
================================================== */

/* Section Skills */
.skills.section {
  padding: 4rem 0; /* Ajustez selon votre préférence */
}

.section__header {
  text-align: center;
  margin-bottom: 3rem;
}

/* Onglets d'expertise */
.expertise__tabs {
display: flex;
justify-content: center;
flex-wrap: wrap;
gap: 1rem;
margin-bottom: 2rem;
}

.expertise__tab {
padding: 0.8rem 1.5rem;
background-color: var(--bg-alt);
border: none;
border-radius: 50px;
font-weight: 500;
color: var(--text);
cursor: pointer;
transition: all 0.3s ease;
box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.expertise__tab.active {
background-color: var(--primary);
color: white;
transform: translateY(-3px);
box-shadow: 0 4px 8px rgba(0,0,0,0.15);
}

.expertise__tab:hover:not(.active) {
transform: translateY(-3px);
background-color: #f0f0f0;
}

/* Grille de compétences */
.skills__grid {
display: grid;
grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
gap: 2rem;
opacity: 1; /* Important: doit être 1 par défaut */
transition: opacity 0.3s ease;
}

/* Category Card */
.skills__category {
  background-color: var(--bg-main);
  border-radius: var (--border-radius);
  box-shadow: var(--shadow-sm);
  padding: 2rem;
  transition: var(--transition);
}

.skills__category:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-5px);
}

.category__header {
  display: flex;
  align-items: center;
  margin-bottom: 1.5rem;
}

.category__icon {
  font-size: 1.8rem;
  color: var(--primary);
  margin-right: 0.75rem;
}

.category__title {
  font-size: 1.3rem;
  font-weight: 600;
  color: var (--text);
}

/* Liste de compétences */
.skills__list {
  border-radius: 18px;
  background: var(--bg-alt);
  box-shadow: 0 2px 12px 0 rgba(44, 62, 80, 0.06);
  padding: 1.5rem 1.5rem 1rem 1.5rem;
  margin-top: 1rem;
}

.skill__item {
  border-radius: 14px;
  background: rgba(44, 62, 80, 0.03);
  margin-bottom: 0.7rem;
  padding: 0.7rem 1.2rem;
  display: flex;
  align-items: center;
  transition: box-shadow 0.2s, background 0.2s;
  box-shadow: 0 1px 4px 0 rgba(44, 62, 80, 0.04);
  position: relative;
}

.skill__item:hover, .skill__item:focus {
  background: rgba(44, 62, 80, 0.08);
  box-shadow: 0 4px 16px 0 rgba(44, 62, 80, 0.10), 0 0 0 4px rgba(44,130,255,0.18);
}

body.dark-mode .skill__item:hover, 
body.dark-mode .skill__item:focus {
  background: rgba(44, 130, 255, 0.10);
  box-shadow: 0 4px 16px 0 rgba(44,130,255,0.10), 0 0 0 4px rgba(44,130,255,0.28);
}

.skill__main {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 0.7rem;
}

.skill__icon {
  color: var(--primary);
  font-size: 1.1rem;
}

.skill__info-icon {
  margin-left: 0.7rem;
  color: var(--primary);
  opacity: 0.7;
  font-size: 1rem;
  cursor: pointer;
  transition: color 0.2s;
}

.skill__info-icon:hover {
  color: var(--accent);
  opacity: 1;
}

/* --- Dark Mode Adjustments for Skills Section --- */
body.dark-mode .skills__list {
  background: #232a36;
  box-shadow: 0 2px 12px 0 rgba(0,0,0,0.18);
}
body.dark-mode .skill__item {
  background: rgba(255,255,255,0.03);
  box-shadow: 0 1px 4px 0 rgba(0,0,0,0.10);
}
body.dark-mode .skill__item:hover, 
body.dark-mode .skill__item:focus {
  background: rgba(44, 130, 255, 0.10);
  box-shadow: 0 4px 16px 0 rgba(44,130,255,0.10);
}

.skill__name {
  font-weight: 500;
  color: var(--text);
  font-size: 1rem;
}

/* Quand on survole un skill item, on change aussi la couleur de l'icône */
.skill__item:hover .skill__icon {
  color: #fff;
}

/* Ajoutez ce CSS à la fin de votre fichier existant */

/* Style pour les tooltips des compétences */


.skill__info-icon {
  color: var(--primary);
  font-size: 0.9rem;
  opacity: 0.7;
  margin-left: auto;
  transition: var(--transition);
}

.skill__item:hover .skill__info-icon {
  opacity: 1;
  transform: scale(1.2);
}

.skill-tooltip {
  position: absolute;
  top: 0;
  left: 0;
  background-color: var(--bg-main);
  color: var(--text);
  padding: 0.8rem 1.2rem;
  border-radius: var(--border-radius);
  font-size: 0.85rem;
  box-shadow: var(--shadow-md);
  width: max-content;
  max-width: 300px;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
  z-index: 100;
  text-align: center;
  pointer-events: none;
}

.skill-tooltip::after {
  content: '';
  position: absolute;
  left: 50%;
  bottom: -8px;
  transform: translateX(-50%);
  border-left: 8px solid transparent;
  border-right: 8px solid transparent;
  border-top: 8px solid var(--bg-main);
}

.skill__item:hover .skill-tooltip {
  opacity: 1;
  visibility: visible;
  transform: translate(-50%, calc(-100% - 10px));
}

/* Adaptation pour le mode sombre */
body.dark-mode .skill-tooltip {
  background-color: var(--bg-alt);
  box-shadow: var(--shadow-lg);
}

body.dark-mode .skill-tooltip::after {
  border-top-color: var(--bg-alt);
}

/* Styles pour les onglets de compétences */








/* ==================================================
   8. EDUCATION
================================================== */

.education.section {
  /* On réduit éventuellement le padding */
  padding: 3rem 0;
}

.education__timeline {
  position: relative;
  max-width: 900px;
  margin: 0 auto;
  /* Supprimez ou ajustez ce qui suit si besoin */
}




.education__timeline::before {
  content: '';
  position: absolute;
  width: 2px;
  background-color: var(--primary-light);
  top: 0;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
}

.timeline__item {
  padding: 2rem;
  background-color: var(--bg-main);
  border-radius: var(--border-radius);
  box-shadow: var(--shadow-sm);
  
  position: relative;
 
  transition: var(--transition);
  animation: cardAppear 0.5s ease forwards;
  width: 100%; /* pour un affichage plein écran */
  float: none !important;
  margin-bottom: 2rem;
}

.timeline__item:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-md);
}

.timeline__item:nth-child(odd) {
  float: left;
  clear: both;
}

.timeline__item:nth-child(even) {
  float: right;
  clear: both;
}

.timeline__item::after {
  content: '';
  position: absolute;
  width: 24px;
  height: 24px;
  background-color: var(--primary);
  border: 4px solid var(--bg-main);
  border-radius: 50%;
  top: 20px;
  box-shadow: var(--shadow-sm);
}

.timeline__item:nth-child(odd)::after {
  right: -52px;
}

.timeline__item:nth-child(even)::after {
  left: -52px;
}

.timeline__date {
  display: inline-block;
  padding: 0.4rem 1rem;
  background-color: var (--primary);
  color: var (--bg-main);
  border-radius: 30px;
  font-size: 0.9rem;
  font-weight: 500;
  margin-bottom: 1rem;
}

.timeline__title {
  margin-bottom: 0.5rem;
  font-size: 1.4rem;
  color: var(--text);
}

.timeline__subtitle {
  color: var(--text-light);
  margin-bottom: 1rem;
  font-weight: 500;
}

.timeline__content {
  font-size: 0.95rem;
  color: var(--text-light);
  line-height: 1.7;
}

/* Education Section */
.education__timeline {
display: flex;
flex-direction: column;
gap: 40px;
margin-top: 40px;
position: relative;
}

.education__timeline::before {
content: '';
position: absolute;
left: 35px;
top: 40px;
height: calc(100% - 100px);
width: 2px;
background: var(--border-color);
}

.education__item {
display: flex;
gap: 30px;
position: relative;
}

.education__icon-container {
flex-shrink: 0;
width: 70px;
height: 70px;
border-radius: 50%;
background-color: var(--bg-alt);
display: flex;
align-items: center;
justify-content: center;
overflow: hidden;
border: 2px solid var(--primary);
box-shadow: var(--shadow-md);
z-index: 2;
}

.education__icon {
width: 100%;
height: 100%;
object-fit: cover;
}

.education__content {
flex-grow: 1;
background-color: var(--bg-alt);
border-radius: 20px;
padding: 25px;
box-shadow: var(--shadow-sm);
}

.education__title {
font-size: 1.4rem;
margin-bottom: 5px;
color: var(--primary);
}

.education__period {
color: var(--text-light);
font-style: italic;
margin-bottom: 15px;
}

.education__description {
line-height: 1.6;
margin-bottom: 20px;
}

.education__details {
display: flex;
flex-direction: column;
gap: 12px;
}

.education__detail {
display: flex;
align-items: flex-start;
gap: 10px;
}

.education__detail i {
color: var(--primary);
margin-top: 4px;
}

.education__awards {
display: flex;
flex-direction: column;
gap: 20px;
}

.education__award {
background-color: rgba(var(--primary-rgb), 0.1);
padding: 15px;
border-radius: 10px;
border-left: 4px solid var(--primary);
}

.award__title {
font-weight: 600;
margin-bottom: 5px;
font-size: 1.1rem;
}

.award__organization {
color: var(--text-light);
font-style: italic;
margin-bottom: 10px;
font-size: 0.9rem;
}

.award__description {
line-height: 1.6;
}

/* Responsive adjustments */
@media (max-width: 768px) {
.education__timeline::before {
  left: 25px;
}

.education__icon-container {
  width: 50px;
  height: 50px;
}

.education__item {
  gap: 20px;
}
}

/* Nouvelle mise en page pour Education */
.education__grid {
display: flex;
flex-direction: column;
gap: 3rem;
margin-top: 2rem;
}

.education__row {
display: grid;
grid-template-columns: 1fr auto 1fr;
gap: 1rem;
align-items: center;
}

.education__card {
background-color: var(--bg-alt);
border-radius: 15px;
padding: 1.5rem;
box-shadow: var(--shadow-md);
transition: all 0.3s ease;
position: relative;
overflow: hidden;
}



/* Styles pour les cartes à gauche */
.education__card--left {
background: linear-gradient(135deg, var(--bg-alt) 60%, rgba(58, 134, 255, 0.15));
border-left: 4px solid var(--primary);
width: 150%;
margin-right: -10%;
z-index: 5;
}

.education__card--left:hover {
background: linear-gradient(135deg, var(--bg-alt) 50%, rgba(58, 134, 255, 0.25));
}

/* Styles pour les cartes à droite */
.education__card--right {
background: linear-gradient(225deg, var(--bg-alt) 60%, rgba(255, 78, 69, 0.15));
border-right: 4px solid var(--accent);
}

.education__card--right:hover {
background: linear-gradient(225deg, var(--bg-alt) 50%, rgba(255, 78, 69, 0.25));
}

/* Ligne de connexion SVG */
.connection-line {
width: 100%;
height: 30px;
padding: 0 10px;
}

.connection-line svg {
width: 100%;
height: 100%;
}

.connection-line svg line {
animation: dash 1.5s linear infinite;
}

@keyframes dash {
to {
  stroke-dashoffset: -16;
}
}

/* Styles pour le contenu des cartes */
.education__icon-container {
width: 60px;
height: 60px;
border-radius: 50%;
overflow: hidden;
border: 2px solid var(--primary);
box-shadow: var(--shadow-sm);
margin-bottom: 1rem;
background-color: white;
}

.education__icon {
width: 100%;
height: 100%;
object-fit: cover;
}

.education__title {
font-size: 1.4rem;
margin-bottom: 0.5rem;
color: var(--primary);
}

.education__period {
color: var(--text-light);
font-style: italic;
font-size: 0.9rem;
margin-bottom: 1rem;
display: inline-block;
padding: 0.2rem 0.8rem;
background-color: rgba(0, 0, 0, 0.05);
border-radius: 15px;
}

.education__description {
margin-bottom: 1rem;
color: var(--text-light);
line-height: 1.6;
}

.education__details {
display: flex;
flex-direction: column;
gap: 0.5rem;
}

.education__detail {
display: flex;
align-items: center;
gap: 0.5rem;
}

.education__detail i {
color: var(--primary);
width: 20px;
text-align: center;
}

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

.education__award {
padding: 1rem;
background-color: rgba(255, 255, 255, 0.6);
border-radius: 10px;
border-left: 3px solid var(--accent);
}

.award__title {
font-weight: 600;
margin-bottom: 0.2rem;
font-size: 1.1rem;
}

.award__organization {
color: var(--text-light);
font-style: italic;
margin-bottom: 0.5rem;
font-size: 0.85rem;
}

.award__description {
font-size: 0.9rem;
color: var(--text-light);
line-height: 1.5;
}

/* Responsive pour mobile */
@media screen and (max-width: 768px) {
.education__row {
  grid-template-columns: 1fr;
  grid-template-rows: auto auto auto;
  gap: 2rem;
}

.connection-line {
  transform: rotate(90deg);
  width: 30px;
  height: 100px;
  margin: 0 auto;
}

.education__card--left,
.education__card--right {
  width: 100%;
  border: none;
}

.education__card--left {
  border-top: 4px solid var(--primary);
}

.education__card--right {
  border-top: 4px solid var(--accent);
}
}

/* Mode sombre */
body.dark-mode .education__card--left {
background: linear-gradient(135deg, var(--bg-alt) 60%, rgba(78, 149, 255, 0.2));
}

body.dark-mode .education__card--right {
background: linear-gradient(225deg, var(--bg-alt) 60%, rgba(255, 98, 89, 0.2));
}

body.dark-mode .education__card--left:hover {
background: linear-gradient(135deg, var(--bg-alt) 50%, rgba(78, 149, 255, 0.3));
}

body.dark-mode .education__card--right:hover {
background: linear-gradient(225deg, var(--bg-alt) 50%, rgba(255, 98, 89, 0.3));
}

body.dark-mode .education__award {
background-color: rgba(255, 255, 255, 0.1);
}

/* Style pour agrandir les cartes d'éducation de 20% */
.education__card--large {
width: 120%; /* Élargir la carte de 20% */
margin-right: -20%; /* Compenser pour éviter de décaler la grille */
z-index: 5;
}



/* Pour la carte de droite (Junior Entreprise), il faut ajuster différemment */
.education__row:first-child .education__card--right {
width: 100%; /* Taille normale */
}

/* Pour la carte de gauche (Lycée Descartes) */
.education__row:nth-child(2) .education__card--left.education__card--large {
width: 120%;
margin-left: -20%; /* Alignement à droite de la cellule */
z-index: 5;
}

/* Ajuster la ligne de connexion pour qu'elle reste centrée */
.education__card--large + .connection-line,
.connection-line + .education__card--large {
z-index: 4;
}

/* Ajustement pour le responsive */
@media screen and (max-width: 768px) {
.education__card--large,
.education__row:nth-child(2) .education__card--left.education__card--large {
  width: 100%;
  margin-left: 0;
  margin-right: 0;
}
}

/* Mise à jour de la disposition pour les cartes d'éducation */

/* Disposition en grille pour afficher les cartes côte à côte */
.education__row {
display: grid;
grid-template-columns: 1fr auto 1fr; /* La première et dernière colonne pour les cartes, celle du milieu pour le SVG */
gap: 1.5rem;
align-items: center;
margin-bottom: 3rem;
}

/* Style commun pour toutes les cartes d'éducation */
.education__card {
background-color: var(--bg-alt);
border-radius: 15px;
padding: 1.5rem;
box-shadow: var(--shadow-md);
transition: all 0.3s ease;
position: relative;
overflow: hidden;
height: 100%; /* Assure une hauteur égale pour les cartes */
}

/* Style pour la carte de gauche */
.education__card--left {
background: linear-gradient(135deg, var(--bg-alt) 60%, rgba(58, 134, 255, 0.15));
border-left: 4px solid var(--primary);
justify-self: end; /* Aligne à droite de sa cellule */
width: 100%; /* Utilise toute la largeur disponible */
}

/* Style pour la carte de droite */
.education__card--right {
background: linear-gradient(225deg, var(--bg-alt) 60%, rgba(255, 78, 69, 0.15));
border-right: 4px solid var(--accent);
justify-self: start; /* Aligne à gauche de sa cellule */
width: 100%; /* Utilise toute la largeur disponible */
}

/* Style pour les cartes larges - s'assurer qu'elles sont élargies */
.education__card--large {
width: 450px; 
height: 700px;
}

/* Correction pour le SVG central */
.connection-line {
width: 100%;
height: 10px;
display: flex;
align-items: center;
justify-content: center;
}

.connection-line svg {
width: 100%;
height: 100%;
}

/* Animation pour la ligne SVG */
.connection-line svg line {
animation: dash 1.5s linear infinite;
}

@keyframes dash {
to {
  stroke-dashoffset: -16;
}
}

/* Responsive: ajustements pour mobile */
@media screen and (max-width: 768px) {
.education__row {
  grid-template-columns: 1fr; /* Une seule colonne sur mobile */
  grid-template-rows: auto auto auto; /* Trois rangées: carte1, svg, carte2 */
  gap: 1rem;
}

.education__card--left,
.education__card--right {
  width: 100%;
  justify-self: center; /* Centre les cartes */
}

.connection-line {
  transform: rotate(90deg); /* Tourne la ligne pour l'orientation verticale */
  height: 30px;
  margin: 0.5rem 0;
}
}

/* Optimisation de la section éducation pour mobile */
@media screen and (max-width: 768px) {
.education__card {
  padding: 1rem; /* Réduction du padding */
}

.education__card--large {
  height: auto; /* Hauteur auto au lieu de 700px fixe */
}

.education__title {
  font-size: 1.2rem; /* Réduction de la taille du titre */
  margin-bottom: 0.3rem;
}

.education__period {
  font-size: 0.8rem; /* Réduction de la taille de la période */
  margin-bottom: 0.5rem;
}

.education__description {
  font-size: 0.9rem; /* Réduction de la taille de la description */
  margin-bottom: 0.8rem;
}

.education__detail {
  font-size: 0.85rem; /* Réduction de la taille des détails */
  margin-bottom: 0.5rem;
}

.education__award {
  padding: 0.8rem; /* Réduction du padding des awards */
}

.award__title {
  font-size: 1rem; /* Réduction de la taille du titre des awards */
}

.award__organization {
  font-size: 0.8rem; /* Réduction de la taille de l'organisation */
}

.award__description {
  font-size: 0.85rem; /* Réduction de la taille de la description des awards */
}

.education__icon-container {
  width: 40px; /* Réduction de la taille du container d'icône */
  height: 40px;
  margin-bottom: 0.8rem;
}

.connection-line {
  height: 20px; /* Réduction de la hauteur de la ligne de connexion */
}
}

/* Masquer la ligne de connexion dans Education sur mobile */
@media (max-width: 768px) {
.education .connection-line {
  display: none;
}
}

/* Afficher les projets en grille 2x2 sur mobile */
@media (max-width: 768px) {
.projects__grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
}

/* Optionnellement, adaptez les project__card si besoin */
.project__card {
  flex: initial;
}
}

/* ==================================================
   9. PROJECTS
================================================== */
.projects {
  background-color: var(--bg-alt);
  position: relative;
  overflow: hidden;
  animation: fadeIn 0.8s ease forwards;
}

.projects__filters {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 1rem;
  margin-bottom: 4rem;
}

.filter__btn {
  border: none;
  background-color: transparent;
  padding: 0.7rem 1.5rem;
  border-radius: 50px;
  cursor: pointer;
  font-weight: 500;
  transition: var (--transition);
  color: var(--text-light);
  font-size: 0.95rem;
}

.filter__btn:hover {
  color: var(--text);
  background-color: var(--gray-light);
}

.filter__btn.active {
  background-color: var(--primary);
  color: white;
  box-shadow: 0 4px 10px rgba(10,102,194,0.2);
}

.projects__grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
  gap: 2.5rem;
}

.project__card {
  background-color: var(--bg-main);
  border-radius: var(--border-radius);
  overflow: hidden;
  box-shadow: var(--shadow-md);
  transition: var (--transition);
  height: 100%;
  display: flex;
  flex-direction: column;
  position: relative;
  animation: cardAppear 0.5s ease forwards;
}

.project__card:hover {
  transform: translateY(-12px);
  box-shadow: var(--shadow-lg);
}

.project__card::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 3px;
  background: linear-gradient(to right, var(--primary), var(--accent));
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.5s ease;
}

.project__card:hover::after {
  transform: scaleX(1);
}

.project__img-container {
  position: relative;
  overflow: hidden;
  height: 240px;
}

.project__img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.7s;
}

.project__card:hover .project__img {
  transform: scale(1.08);
}

.project__overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(to bottom, transparent, rgba(0,0,0,0.7));
  opacity: 0;
  transition: var(--transition);
}

.project__card:hover .project__overlay {
  opacity: 1;
}

.project__category {
  position: absolute;
  top: 1rem;
  left: 1rem;
  padding: 0.5rem 1rem;
  background-color: var(--primary);
  color: white;
  border-radius: 30px;
  font-size: 0.8rem;
  font-weight: 600;
  z-index: 1;
}

.project__content {
  padding: 2rem;
  flex-grow: 1;
  display: flex;
  flex-direction: column;
}

.project__title {
  font-size: 1.4rem;
  margin-bottom: 1rem;
  color: var(--text);
  position: relative;
  padding-bottom: 15px;
}

/* Ajoutez ce CSS à la fin de votre fichier CSS existant */

/* Styles pour le filtrage des projets */
.projects__filters {
display: flex;
justify-content: center;
flex-wrap: wrap;
gap: 1rem;
margin-bottom: 3rem;
}

.filter__btn {
background-color: var(--bg-main);
border: none;
padding: 0.8rem 1.5rem;
border-radius: 50px;
font-weight: 500;
transition: var(--transition);
cursor: pointer;
color: var(--text);
box-shadow: var(--shadow-sm);
}

.filter__btn:hover, .filter__btn.active {
background-color: var(--primary);
color: white;
box-shadow: var(--shadow-md);
transform: translateY(-3px);
}

/* Styles pour les cartes de projet */
.project__card {
transition: all 0.4s ease;
}

.project__tags {
display: flex;
flex-wrap: wrap;
gap: 0.5rem;
margin-bottom: 1.5rem;
}

.project__tag {
background-color: rgba(58, 134, 255, 0.1);
color: var(--primary);
padding: 0.4rem 0.8rem;
border-radius: 20px;
font-size: 0.8rem;
font-weight: 500;
transition: var(--transition);
}

.project__tag:hover {
background-color: var(--primary);
color: white;
}

.project__description {
margin-bottom: 1.5rem;
color: var(--text-light);
font-size: 0.95rem;
line-height: 1.7;
}

/* Modal pour l'accès GitHub */
.github-modal {
position: fixed;
top: 0;
left: 0;
width: 100%;
height: 100%;
background-color: rgba(0, 0, 0, 0.8);
display: none;
align-items: center;
justify-content: center;
z-index: 2000;
opacity: 0;
transition: opacity 0.3s ease;
}

.github-modal.show {
opacity: 1;
}

.github-modal__content {
background-color: var(--bg-main);
padding: 2.5rem;
border-radius: var(--border-radius);
width: 90%;
max-width: 500px;
position: relative;
box-shadow: var(--shadow-lg);
transform: scale(0.9);
transition: transform 0.3s ease;
}

.github-modal.show .github-modal__content {
transform: scale(1);
}

.github-modal__close {
position: absolute;
top: 1rem;
right: 1rem;
font-size: 1.8rem;
cursor: pointer;
color: var(--text);
transition: var(--transition);
}

.github-modal__close:hover {
color: var(--primary);
transform: rotate(90deg);
}

.github-modal__title {
font-size: 1.6rem;
margin-bottom: 1rem;
color: var(--text);
}

.github-modal__description {
color: var(--text-light);
margin-bottom: 1.5rem;
}

.github-modal__form {
display: flex;
flex-direction: column;
gap: 1.5rem;
}

.btn--disabled {
opacity: 0.7;
cursor: not-allowed;
}

.btn--disabled:hover {
transform: none;
background-color: var(--bg-main);
color: var(--primary);
}

.success-message {
text-align: center;
padding: 1.5rem;
color: var(--primary);
}

.success-message i {
font-size: 3rem;
margin-bottom: 1rem;
color: #28a745;
}

/* Responsive adjustments */
@media screen and (max-width: 768px) {
.project__tags {
  justify-content: center;
}

.project__links {
  display: flex;
  justify-content: center;
}

.github-modal__content {
  padding: 1.5rem;
  width: 95%;
}
}

/* ==================================================
   10. CONTACT
================================================== */
.contact {
  background-color: var(--bg-main);
  animation: fadeIn 0.8s ease forwards;
}

.contact__container {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 4rem;
  margin-top: 2rem;
}

.contact__info {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.contact__card {
  background-color: var(--bg-alt);
  padding: 2rem;
  border-radius: var(--border-radius);
  display: flex;
  gap: 1.5rem;
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
}

.contact__card:hover {
  background-color: var(--primary-light);
  color: white;
  transform: translateY(-8px);
}

.contact__card:hover i,
.contact__card:hover .contact__card-title,
.contact__card:hover .contact__card-data {
  color: white;
}

.contact__card i {
  font-size: 2rem;
  color: var(--primary);
}

.contact__card-info {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.contact__card-title {
  font-size: 1.2rem;
  font-weight: 600;
  color: var(--text);
}

.contact__card-data {
  font-size: 0.95rem;
  color: var(--text-light);
}

.contact__form {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.form__group {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.form__label {
  font-weight: 500;
  font-size: 0.95rem;
  color: var(--text);
}

.form__input {
  padding: 1rem;
  background-color: var(--bg-alt);
  border: none;
  border-radius: var(--border-radius);
  font-family: inherit;
  color: var(--text);
}

.form__input::placeholder {
  color: var(--text-light);
  opacity: 0.7;
}

textarea.form__input {
  resize: none;
  height: 150px;
}

/* ==================================================
   11. FOOTER
================================================== */
.footer {
  background-color: var(--bg-alt);
  padding: 4rem 0 2rem;
}

.footer__container {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 4rem;
  margin-bottom: 3rem;
}

.footer__info {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.footer__logo {
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--text);
  font-family: 'Playfair Display', serif;
}

.footer__description {
  font-size: 0.95rem;
  color: var(--text-light);
  max-width: 350px;
  line-height: 1.7;
}

.footer__social {
  display: flex;
  gap: 1rem;
  margin-top: 1rem;
}

.footer__social-link {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background-color: var(--bg-main);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--primary);
  font-size: 1.2rem;
  transition: var(--transition);
}

.footer__social-link:hover {
  background-color: var(--primary);
  color: white;
  transform: translateY(-5px);
}

.footer__title {
  font-size: 1.3rem;
  color: var(--text);
  margin-bottom: 1.5rem;
}

.footer__links ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
}

.footer__link {
  color: var(--text-light);
  font-size: 0.95rem;
  transition: var (--transition);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.footer__link:hover {
  color: var(--primary);
  transform: translateX(5px);
}

.footer__copy {
  text-align: center;
  padding-top: 2rem;
  border-top: 1px solid rgba(0,0,0,0.1);
  font-size: 0.9rem;
  color: var (--text-light);
}

/* ==================================================
   12. BOUTON "SCROLL TO TOP"
================================================== */
.scroll-top {
  position: fixed;
  right: 1.5rem;
  bottom: -20%;
  width: 40px;
  height: 40px;
  background-color: var(--primary);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  font-size: 1.2rem;
  z-index: 99;
  cursor: pointer;
  transition: 0.4s;
  opacity: 0;
  box-shadow: var(--shadow-md);
}

.scroll-top.show {
  bottom: 3rem;
  opacity: 1;
}

/* ==================================================
   13. RESPONSIVE
================================================== */
@media screen and (max-width: 992px) {
  .container { padding: 0 1.5rem; }
  .hero__container {
    margin-top: 4rem;
    grid-template-columns: 1fr;
    gap: 2rem;
    text-align: center;
  }
  .hero__buttons { justify-content: center; }
  .hero__social {
    position: static;
    flex-direction: row;
    justify-content: center;
    margin-top: 2rem;
  }
  .about__container { grid-template-columns: 1fr; gap: 3rem; }
  
  .timeline__item {
    width: calc(100% - 40px);
    float: none !important;
    margin: 0 auto 2rem auto;
  }
  .timeline__item::after { left: -52px !important; }
  .education__timeline::before { left: 20px; }
  .projects__grid { grid-template-columns: 1fr; }
  .contact__container { grid-template-columns: 1fr; }
  .footer__container { grid-template-columns: 1fr; gap: 2rem; }
}



@media screen and (max-width: 480px) {
  .hero__content h1 { font-size: 2rem; }
  .section__title { font-size: 2rem; }
  .about__stats { grid-template-columns: 1fr; }
  .hero__buttons {
    flex-direction: column;
    align-items: center;
    width: 100%;
  }
  .hero__buttons .btn {
    width: 100%;
    text-align: center;
    justify-content: center;
  }
}

/* ==================================================
   14. OVERRIDE MODE SOMBRE
================================================== */
body.dark-mode .header,
body.dark-mode .nav__link,
body.dark-mode .theme-toggle {
  color: var(--text);
}

body.dark-mode .category__title,
body.dark-mode .project__title,
body.dark-mode h1,
body.dark-mode h2,
body.dark-mode h3,
body.dark-mode h4 {
  color: var(--primary);
}

body.dark-mode .section__title,
body.dark-mode .about__cta-title {
  color: var(--primary);
}
body.dark-mode .section__title::after,
body.dark-mode .about__cta-title::after {
  background-color: var(--primary);
}
body.dark-mode h1,
body.dark-mode h2,
body.dark-mode h3,
body.dark-mode h4 {
  color: var(--primary);
}
body.dark-mode .footer__copy {
  color: #b0b8c1;
}

/* Ajoutez ce CSS à la fin de votre fichier existant */

/* Style pour la section des connaissances théoriques */
#coursework {
background-color: var(--bg-alt);
}

.knowledge__grid {
display: grid;
grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
gap: 2rem;
margin-top: 2rem;
}

.knowledge__card {
background-color: var(--bg-main);
border-radius: var(--border-radius);
padding: 2rem;
box-shadow: var(--shadow-md);
transition: var(--transition);
height: 100%;
display: flex;
flex-direction: column;
position: relative;
overflow: hidden;
border-top: 4px solid var(--primary);
}

.knowledge__card:hover {
transform: translateY(-10px);
box-shadow: var(--shadow-lg);
border-top-color: var(--accent);
}

.knowledge__title {
font-size: 1.3rem;
margin-bottom: 0.8rem;
color: var(--text);
}

.knowledge__source {
color: var(--primary);
font-size: 0.9rem;
margin-bottom: 1.5rem;
font-weight: 500;
padding-bottom: 0.8rem;
border-bottom: 1px solid rgba(0,0,0,0.1);
}

.knowledge__description {
color: var(--text-light);
margin-bottom: 1.5rem;
font-size: 0.95rem;
line-height: 1.6;
flex-grow: 1;
}

.knowledge__tags {
display: flex;
flex-wrap: wrap;
gap: 0.5rem;
margin-top: auto;
}

.knowledge__tag {
padding: 0.4rem 0.8rem;
background-color: rgba(58, 134, 255, 0.1);
color: var(--primary);
border-radius: 20px;
font-size: 0.8rem;
font-weight: 500;
transition: var(--transition);
}

.knowledge__tag:hover {
background-color: var(--primary);
color: white;
transform: scale(1.05);
}

/* Adaptation pour le mode sombre */
body.dark-mode .knowledge__card {
border-top-color: var(--primary-dark);
}

body.dark-mode .knowledge__card:hover {
border-top-color: var(--accent);
}

body.dark-mode .knowledge__source {
border-bottom: 1px solid rgba(255,255,255,0.1);
}

body.dark-mode .knowledge__tag {
background-color: rgba(78, 149, 255, 0.2);
}

/* Responsive pour les grilles de connaissances */
@media screen and (max-width: 1200px) {
.knowledge__grid {
  grid-template-columns: repeat(2, 1fr);
}
}

@media screen and (max-width: 768px) {
.knowledge__grid {
  grid-template-columns: 1fr;
}
}

/* Ajoutez ce CSS à la fin de votre fichier existant */



/* Ajoutez ces styles pour le bouton See More et les cartes cachées */

.hidden-card {
display: none;
opacity: 0;
transition: opacity 0.3s ease, transform 0.3s ease;
}

.show-more-btn {
display: block;
margin: 2rem auto;
padding: 0.8rem 2rem;
font-size: 1rem;
background-color: transparent;
color: var(--primary);
border: 2px solid var(--primary);
border-radius: 50px;
cursor: pointer;
transition: all 0.3s ease;
font-weight: 600;
}

.show-more-btn:hover {
background-color: var(--primary);
color: white;
transform: translateY(-5px);
box-shadow: var(--shadow-md);
}

.show-more-btn.active {
background-color: var(--primary);
color: white;
}

.show-more-btn i {
margin-left: 0.5rem;
transition: transform 0.3s ease;
}

.show-more-btn.active i {
transform: rotate(180deg);
}

/* Ajoutez ce CSS pour mettre en évidence les boutons CTA */

.about__cta-container {
grid-area: buttons;
text-align: center;
margin-top: 2rem;
padding: 2rem;
background-color: var(--bg-alt);
border-radius: var(--border-radius);
box-shadow: var(--shadow-sm);
}

.about__cta-title {
font-size: 1.6rem;
margin-bottom: 1.5rem;
color: var(--text);
position: relative;
display: inline-block;
}

.about__cta-title::after {
content: '';
position: absolute;
bottom: -10px;
left: 50%;
transform: translateX(-50%);
width: 80px;
height: 3px;
background-color: var(--primary);
border-radius: 2px;
}

.about__buttons-container {
display: flex;
justify-content: center;
gap: 1.5rem;
margin-top: 2rem;
}

.btn--large {
padding: 1.2rem 2rem;
display: flex;
align-items: center;
justify-content: flex-start;
width: 280px;
transition: transform 0.3s ease, box-shadow 0.3s ease;
animation: pulse 2s infinite;
}

.btn--large:hover {
transform: translateY(-8px);
box-shadow: var(--shadow-lg);
animation: none;
}

.btn--accent {
background-color: var (--accent);
color: white;
border: none;
}

.btn--accent:hover {
background-color: var(--accent-dark);
color: white;
}

.cta-icon {
font-size: 1.8rem;
margin-right: 1rem;
}

.btn__content {
display: flex;
flex-direction: column;
align-items: flex-start;
text-align: left;
}

.btn__title {
font-weight: 600;
font-size: 1rem;
margin-bottom: 0.2rem;
}

.btn__subtitle {
font-size: 0.8rem;
opacity: 0.9;
}



.btn--large {
animation: pulse 2s infinite;
}

.btn--large:hover {
animation: none;
}

/* Responsive */
@media screen and (max-width: 768px) {
.about__buttons-container {
  flex-direction: column;
  align-items: center;
}

.btn--large {
  width: 100%;
  max-width: 320px;
}
}

/* Styles pour le modal de prévisualisation du CV */
.cv-preview-modal {
display: none;
position: fixed;
z-index: 1000;
left: 0;
top: 0;
width: 100%;
height: 100%;
overflow: auto;
background-color: rgba(0, 0, 0, 0.7);
backdrop-filter: blur(5px);
}

.cv-modal__content {
background-color: var(--bg-main);
margin: 5% auto;
padding: 30px;
border-radius: 15px;
width: 80%;
max-width: 1000px;
box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
position: relative;
animation: modalFadeIn 0.4s ease;
}

.cv-modal__close {
position: absolute;
top: 20px;
right: 25px;
font-size: 28px;
font-weight: bold;
cursor: pointer;
color: var(--text-light);
transition: color 0.3s;
}

.cv-modal__close:hover {
color: var(--accent);
}

.cv-modal__title {
font-size: 1.8rem;
margin-bottom: 20px;
padding-bottom: 15px;
border-bottom: 1px solid var(--border-color);
color: var(--text-dark);
}

.cv-modal__document {
width: 100%;
margin-bottom: 25px;
display: flex;
justify-content: center;
border-radius: 10px;
overflow: hidden;
box-shadow: 0 5px 20px rgba(0, 0, 0, 0.15);
}

.cv-modal__img {
width: 100%;
max-height: 70vh;
object-fit: contain;
background-color: white;
}

.cv-modal__actions {
display: flex;
justify-content: center;
gap: 20px;
margin-top: 20px;
}

@keyframes modalFadeIn {
from {
  opacity: 0;
  transform: translateY(-20px);
}
to {
  opacity: 1;
  transform: translateY(0);
}
}


#main-nav,
.lang-switch--mobile {
  display: none;
}
#main-nav ul li a {
display: none;
}


/* MOBILE : Afficher l'icône burger en haut à droite et masquer le menu desktop */
@media (max-width: 768px) {
/* Cacher le menu desktop */
#nav-menu {
display: none;
}

.lang-switch--desktop {
display: none;
}

/* Icône burger : Position et apparence */
.mobile-menu-toggle {
display: flex;
flex-direction: column;
gap: 4px;
cursor: pointer;
padding: 0.5rem;
position: absolute;
top: 1rem;
right: 1rem;
z-index: 300;
}

.mobile-menu-toggle span {
display: block;
width: 28px;
height: 3px;
background-color: var(--text);
transition: all 0.3s ease-in-out;
}

/* Menu mobile : Cacher par défaut */
#main-nav {
display: flex;
flex-direction: column;
justify-content: center;
align-items: center;
position: fixed;
top: 0;
right: -100%;
width: 100%;
height: 100%;
background-color: var(--bg-main);
transition: right 0.3s ease-in-out;
z-index: 200;
box-shadow: var(--shadow-lg);
}

/* Quand le menu est actif, il glisse */
#main-nav.active {
right: 0;
}
.nav__logo {
font-size: 1.3rem;
}

/* Réduction de l'espace entre les éléments */
.nav__actions {
display: flex;
align-items: center;
gap: 0.8rem;
}

/* Ajustement du bouton mode sombre */
.theme-switch {
width: 60px;
height: 27px;
margin-bottom: 2px;
left:-80px;
}

/* Ajustement du sélecteur de langue */


/* Ajustement de l'icône burger */
.mobile-menu-toggle {
display: flex;
flex-direction: column;
gap: 4px;
top:2px;
cursor: pointer;
padding: 0.4rem;
}

.mobile-menu-toggle span {
display: block;
width: 22px;
height: 2px;
background-color: var(--text);
transition: all 0.3s ease;
}

/* Éviter le chevauchement avec l'encoche de l'iPhone */
.nav {
padding-top: env(safe-area-inset-top);
}

/* Styles des liens du menu */
#main-nav ul {
list-style: none;
padding: 0;
margin: 0;
text-align: center;
}

#main-nav ul li {
margin: 18px 0;
}

#main-nav ul li a {
display: inline;
text-decoration: none;
font-size: 1.6rem;
color: var(--text);
transition: color 0.3s ease;
}

#main-nav ul li a:hover {
color: var(--primary);
}

/* Animation du bouton burger */
.mobile-menu-toggle.active span:nth-child(1) {
transform: rotate(45deg) translate(4px, 6px);
}

.mobile-menu-toggle.active span:nth-child(2) {
opacity: 0;
}

.mobile-menu-toggle.active span:nth-child(3) {
transform: rotate(-45deg) translate(5px, -5px);
}

/* Ajouter ces styles pour le menu de langue mobile après vos styles mobiles existants */

@media (max-width: 768px) {
/* Styles existants... */

/* Amélioration du menu de langue mobile */
.lang-switch--mobile {
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: 2rem;
  background-color: var(--bg-alt);
  border-radius: 30px;
  padding: 0.5rem;
  box-shadow: var(--shadow-sm);
  width: 120px;
}

.lang-switch--mobile .lang-btn {
  padding: 0.5rem 1rem;
  border-radius: 20px;
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-light);
  transition: all 0.3s ease;
}

.lang-switch--mobile .lang-btn.active {
  background-color: var(--primary);
  color: white;
  box-shadow: var(--shadow-sm);
}

.lang-switch--mobile .lang-separator {
  color: var(--text-light);
  margin: 0 0.2rem;
}

/* Adaptation pour le mode sombre */
body.dark-mode .lang-switch--mobile {
  background-color: var(--bg-main);
}

body.dark-mode .lang-switch--mobile .lang-btn.active {
  background-color: var(--primary);
}
}


/* From Uiverse.io by zjssun */ 
.button1 {
position: relative;
padding: 10px 22px;
border-radius: 6px;
border: none;
color: #fff;
cursor: pointer;
background-color: #7d2ae8;
transition: all 0.2s ease;
}

.button1:active {
transform: scale(0.96);
}

.button1:before,
.button1:after {
position: absolute;
content: "";
width: 150%;
left: 50%;
height: 100%;
transform: translateX(-50%);
z-index: -1000;
background-repeat: no-repeat;
}

.button1:hover:before {
top: -70%;
background-image: radial-gradient(circle, #7d2ae8 20%, transparent 20%),
  radial-gradient(circle, transparent 20%, #7d2ae8 20%, transparent 30%),
  radial-gradient(circle, #7d2ae8 20%, transparent 20%),
  radial-gradient(circle, #7d2ae8 20%, transparent 20%),
  radial-gradient(circle, transparent 10%, #7d2ae8 15%, transparent 20%),
  radial-gradient(circle, #7d2ae8 20%, transparent 20%),
  radial-gradient(circle, #7d2ae8 20%, transparent 20%),
  radial-gradient(circle, #7d2ae8 20%, transparent 20%),
  radial-gradient(circle, #7d2ae8 20%, transparent 20%);
background-size: 10% 10%, 20% 20%, 15% 15%, 20% 20%, 18% 18%, 10% 10%, 15% 15%,
  10% 10%, 18% 18%;
background-position: 50% 120%;
animation: greentopBubbles 0.6s ease;
}

@keyframes greentopBubbles {
0% {
  background-position: 5% 90%, 10% 90%, 10% 90%, 15% 90%, 25% 90%, 25% 90%,
    40% 90%, 55% 90%, 70% 90%;
}

50% {
  background-position: 0% 80%, 0% 20%, 10% 40%, 20% 0%, 30% 30%, 22% 50%,
    50% 50%, 65% 20%, 90% 30%;
}

100% {
  background-position: 0% 70%, 0% 10%, 10% 30%, 20% -10%, 30% 20%, 22% 40%,
    50% 40%, 65% 10%, 90% 20%;
  background-size: 0% 0%, 0% 0%, 0% 0%, 0% 0%, 0% 0%, 0% 0%;
}
}

.button1:hover::after {
bottom: -70%;
background-image: radial-gradient(circle, #7d2ae8 20%, transparent 20%),
  radial-gradient(circle, #7d2ae8 20%, transparent 20%),
  radial-gradient(circle, transparent 10%, #7d2ae8 15%, transparent 20%),
  radial-gradient(circle, #7d2ae8 20%, transparent 20%),
  radial-gradient(circle, #7d2ae8 20%, transparent 20%),
  radial-gradient(circle, #7d2ae8 20%, transparent 20%),
  radial-gradient(circle, #7d2ae8 20%, transparent 20%);
background-size: 15% 15%, 20% 20%, 18% 18%, 20% 20%, 15% 15%, 20% 20%, 18% 18%;
background-position: 50% 0%;
animation: greenbottomBubbles 0.6s ease;
}

@keyframes greenbottomBubbles {
0% {
  background-position: 10% -10%, 30% 10%, 55% -10%, 70% -10%, 85% -10%,
    70% -10%, 70% 0%;
}

50% {
  background-position: 0% 80%, 20% 80%, 45% 60%, 60% 100%, 75% 70%, 95% 60%,
    105% 0%;
}

100% {
  background-position: 0% 90%, 20% 90%, 45% 70%, 60% 110%, 75% 80%, 95% 70%,
    110% 10%;
  background-size: 0% 0%, 0% 0%, 0% 0%, 0% 0%, 0% 0%, 0% 0%;
}
}

}

/* Game button modern style */
.about__buttons-container .btn--accent {
  border-radius: 2rem;
  background: linear-gradient(90deg, var(--primary) 60%, var(--primary-light) 100%);
  color: #fff;
  box-shadow: 0 4px 16px 0 rgba(44,130,255,0.10);
  border: none;
  font-weight: 600;
  font-size: 1.1rem;
  display: flex;
  align-items: center;
  gap: 0.7rem;
  padding: 1.1rem 2.2rem;
  transition: box-shadow 0.2s, background 0.2s, transform 0.2s;
}
.about__buttons-container .btn--accent .cta-icon {
  font-size: 1.3rem;
  margin-right: 0.7rem;
}
.about__buttons-container .btn--accent:hover {
  background: linear-gradient(90deg, var(--primary-dark) 60%, var(--primary) 100%);
  box-shadow: 0 8px 24px 0 rgba(44,130,255,0.18);
  transform: translateY(-2px) scale(1.04);
}

.about__buttons-container .btn--primary {
  border-radius: 2rem;
  background: linear-gradient(90deg, var(--primary) 60%, var(--primary-light) 100%);
  color: #fff;
  box-shadow: 0 4px 16px 0 rgba(44,130,255,0.10);
  border: none;
  font-weight: 600;
  font-size: 1.1rem;
  display: flex;
  align-items: center;
  gap: 0.7rem;
  padding: 1.1rem 2.2rem;
  transition: box-shadow 0.2s, background 0.2s, transform 0.2s;
}
.about__buttons-container .btn--primary .cta-icon {
  font-size: 1.3rem;
  margin-right: 0.7rem;
}
.about__buttons-container .btn--primary:hover {
  background: linear-gradient(90deg, var(--primary-dark) 60%, var(--primary) 100%);
  box-shadow: 0 8px 24px 0 rgba(44,130,255,0.18);
  transform: translateY(-2px) scale(1.04);
}
