/* ========================================================= */
/* IMPORTATION DE POLICE
/* ========================================================= */
@import url("https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap");

/* ========================================================= */
/* VARIABLES GLOBALES
/* ========================================================= */
:root {
  --bg-color: #ffffff;
  --gray-light: #f5f5f5;
  --text-color: #1a1a1a;
  --text-light: #555;
  --gray-dark: #333;
  --footer-text: #aaa; /* AJOUT : Variable pour le texte du footer */
  --accent: #f1c40f;
  --accent-dark: #e0b40e;
  --pro-color: #2980b9;
  --border-color: #e5e5e5;
  --transition: 0.3s ease-in-out;
  --radius: 12px;
  --shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
  --shadow-hover: 0 8px 20px rgba(0, 0, 0, 0.1);
  --container-width: 1100px;
}

/* ========================================================= */
/* RESET / BASE
/* ========================================================= */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}
html {
  scroll-behavior: smooth;
}
body {
  font-family: "Inter", sans-serif;
  line-height: 1.7;
  color: var(--text-light);
  background: var(--bg-color);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
a {
  text-decoration: none;
  color: inherit;
  transition: color var(--transition);
}
ul {
  list-style-type: disc;
  margin-left: 20px;
}
.project-content ul {
  margin-left: 20px;
  margin-bottom: 1.5rem;
  padding-left: 1rem;
}
.project-content li {
  font-size: 1.1rem;
  font-weight: 300;
  margin-bottom: 0.5rem;
}
h1,
h2,
h3,
h4 {
  font-weight: 700;
  color: var(--text-color);
  line-height: 1.3;
}
p {
  font-weight: 300;
  margin-bottom: 1rem;
}

/* ========================================================= */
/* NAVBAR (FLOTTANTE)
/* ========================================================= */
.navbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: sticky;
  top: 1.5rem;
  z-index: 1000;
  margin: 1.5rem;
  width: auto;
  padding: 1.25rem 2.5rem;
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);
  border-radius: var(--radius);
  box-shadow: var(--shadow-hover);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-bottom: none;
}
.logo {
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--text-color);
}

/* Roux en jaune dans la navbar
.logo-accent {
  color: var(--accent);
  transition: color var(--transition);
}
*/

.nav-links {
  display: flex;
  gap: 2rem;
  list-style-type: none;
  padding-left: 0;
  align-items: center; /* Ajout pour aligner le bouton de langue */
}
.nav-links a {
  font-weight: 500;
  position: relative;
  color: var(--text-light);
}
.nav-links a:hover {
  color: var(--text-color);
}
.nav-links a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -5px;
  width: 0%;
  height: 3px;
  background: var(--accent);
  transition: width var(--transition);
  border-radius: 2px;
}
/* On exclut le bouton de langue de l'effet de surlignage */
.nav-links a:not(#lang-toggle-btn):hover::after {
  width: 100%;
}
.menu-toggle {
  display: none;
  font-size: 1.8rem;
  cursor: pointer;
  color: var(--text-color);
  background: none;
  border: none;
}

/* ========================================================= */
/* BOUTON DE LANGUE (AJOUT)
/* ========================================================= */
.nav-links #lang-toggle-btn {
  font-weight: 600;
  padding: 5px 12px;
  border-radius: 50px; /* Assorti au CTA */
  background-color: rgba(0, 0, 0, 0.05); /* Discret */
  border: 1px solid transparent;
  transition: var(--transition);
  color: var(--text-light);
  line-height: 1.5; /* Ajustement de la hauteur de ligne */
}

.nav-links #lang-toggle-btn:hover {
  color: var(--text-color);
  background-color: rgba(0, 0, 0, 0.08);
  border-color: var(--accent);
}
/* Pas besoin d'effet ::after pour le bouton de langue */
.nav-links #lang-toggle-btn::after {
  display: none;
}

#lang-icon {
  font-family: "Noto Color Emoji", sans-serif;
  font-weight: 400;
  font-style: normal;
  font-variant-emoji: emoji;
}

/* ========================================================= */
/* HERO
/* ========================================================= */
.hero {
  text-align: center;
  padding: 6rem 2rem;
  background: var(--bg-color);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}
.hero h2 {
  font-size: 3rem;
  margin-bottom: 1rem;
}

/* ========================================================= */
/* PRÉSENTATION
/* ========================================================= */
.presentation {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 3rem;
  max-width: 900px;
  margin: 2rem auto 0;
  text-align: justify;
}
.presentation p {
  flex: 1;
  font-size: 1.25rem;
  line-height: 1.6;
  font-weight: 300;
  color: var(--text-light);
  margin-bottom: 0;
}
.photo-profil {
  width: 150px;
  height: auto;
  border-radius: var(--radius);
  flex-shrink: 0;
  border: 2px solid var(--accent);
  box-shadow: var(--shadow);
  object-fit: cover;
}
.presentation-text {
  flex: 1;
}

/* ========================================================= */
/* BOUTONS (CTA / LIEN RETOUR) - AMÉLIORÉ
/* ========================================================= */
.cta-button,
.back-link {
  display: inline-flex;
  align-items: center;
  background: var(--accent);
  color: var(--text-color);
  font-weight: 600;
  padding: 0.75rem 1.5rem;
  border-radius: 50px;
  text-decoration: none;
  transition: background-color var(--transition), box-shadow var(--transition),
    transform var(--transition);
  box-shadow: var(--shadow);
}
.cta-button:hover,
.back-link:hover {
  background: var(--accent-dark);
  box-shadow: var(--shadow-hover);
  color: var(--text-color);
}
.cta-button {
  gap: 0.75rem;
  margin-top: 1rem;
}
.cta-button:hover {
  transform: translateY(-2px);
}
.back-link {
  gap: 0.5rem;
  margin: 2rem 0;
}

/* ========================================================= */
/* SECTIONS
/* ========================================================= */
section {
  padding: 5rem 5%;
}
section:nth-of-type(even) {
  background: var(--gray-light);
}
.project-content {
  background: var(--bg-color);
  padding: 2rem;
}
section h2 {
  text-align: center;
  font-size: 2.5rem;
  margin-bottom: 3.5rem;
  color: var(--text-color);
  position: relative;
  display: block;
  width: fit-content;
  margin-left: auto;
  margin-right: auto;
  padding-bottom: 0.5rem;
}
section h2::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 60px;
  height: 4px;
  background: var(--accent);
  border-radius: 2px;
}
h3 {
  font-size: 1.5rem;
  margin: 3rem 0 1.5rem;
  color: var(--gray-dark);
  border-left: 4px solid var(--accent);
  padding-left: 0.75rem;
}

/* ========================================================= */
/* CARTES / GRID
/* ========================================================= */
.grid {
  display: grid;
  gap: 2rem;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  max-width: var(--container-width);
  margin-left: auto;
  margin-right: auto;
}
/* AJOUT : Correction pour les grilles à 1 seul item */
.grid-single-item {
  /* Annule la règle "1fr" (grandir) */
  grid-template-columns: minmax(280px, 360px); 
  
  /* Centre cette unique colonne dans la page */
  justify-content: center; 
}
.card {
  background: var(--bg-color);
  padding: 1.25rem;
  border-radius: var(--radius);
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow);
  transition: transform var(--transition), box-shadow var(--transition),
    border-color var(--transition);
  display: block;
  text-decoration: none;
  color: inherit;
}
.card h4 {
  margin-bottom: 0.5rem;
  color: var(--gray-dark);
  font-size: 1.15rem;
  font-weight: 600;
}
.card p {
  color: var(--text-light);
  font-size: 0.95rem;
  font-weight: 300;
  margin-bottom: 0;
}
.card-img {
  width: 100%;
  height: 200px;
  object-fit: cover;
  border-radius: 8px;
  margin-bottom: 1rem;
  border: 1px solid var(--border-color);
}

/* Effets Hover Cartes (Groupés) - AMÉLIORÉ */
a.card:hover,
.contact-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-hover);
  border-color: var(--accent);
}

/* ========================================================= */
/* PAGES PROJETS
/* ========================================================= */
.project-header {
  text-align: center;
  padding: 4.5rem 2rem;
  background: var(--gray-light);
  border-bottom: 1px solid var(--border-color);
}
.project-header h1 {
  font-size: 2.8rem;
  color: var(--gray-dark);
  margin-bottom: 1rem;
}
.project-header p {
  display: inline-block;
  background-color: var(--bg-color);
  color: var(--text-light);
  font-size: 0.95rem;
  font-weight: 500;
  padding: 0.35rem 1.25rem;
  border-radius: 50px;
  margin-bottom: 0;
  border: 1px solid var(--accent);
}
.project-content {
  max-width: 800px;
  margin: 0 auto;
  line-height: 1.8;
  color: var(--text-color);
}
.project-content p {
  text-align: justify;
  text-indent: 0;
  font-size: 1.1rem;
  font-weight: 300;
  margin-bottom: 1.5rem;
}
section.project-content h2 {
  color: var(--gray-dark);
  font-size: 1.75rem;
  margin-top: 2.5rem;
  margin-bottom: 1rem;
  border-left: 4px solid var(--accent);
  padding-left: 0.75rem;
  text-align: left;
  position: static;
  display: block;
  width: auto;
  margin-left: 0;
  padding-bottom: 0;
}
section.project-content h2::after {
  display: none;
}
.project-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1.5rem;
  margin: 2rem 0;
}
.project-gallery img {
  width: 100%;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  object-fit: cover;
  height: 200px;
  transition: transform var(--transition), box-shadow var(--transition);
  cursor: pointer;
}
.project-gallery img:hover {
  transform: scale(1.03);
  box-shadow: var(--shadow-hover);
}

/* ========================================================= */
/* COMPÉTENCES
/* ========================================================= */
.competence-card {
  text-align: center;
  padding-top: 2rem;
  padding-bottom: 2rem;
}
.competence-card i {
  font-size: 2.5rem;
  color: var(--accent);
  margin-bottom: 1.5rem;
}
.competence-card h4 {
  font-size: 1.2rem;
  margin-bottom: 1rem;
  color: var(--gray-dark);
}
.competence-card ul {
  list-style-type: none;
  padding-left: 0;
  margin-left: 0;
  margin-bottom: 0;
}
.competence-card li {
  font-size: 1rem;
  font-weight: 300;
  color: var(--text-light);
  margin-bottom: 0.5rem;
  line-height: 1.5;
}

/* ========================================================= */
/* PARCOURS (Option 2: Cartes Groupées)
/* ========================================================= */
.parcours {
  background-color: var(--gray-light);
}
.parcours h3 {
  margin-top: 3rem;
  margin-bottom: 1.5rem;
}
.parcours .grid {
  gap: 1.5rem;
}
.parcours-card {
  padding: 1.5rem;
  text-align: left;
}
.parcours-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.5rem;
}
.parcours-header i {
  font-size: 1.4rem;
  width: 25px;
  text-align: center;
}
.parcours-header i.icon-acad {
  color: var(--accent);
}
.parcours-header i.icon-pro {
  color: var(--pro-color);
}
.parcours-card h4 {
  font-size: 1.1rem;
  color: var(--gray-dark);
  margin-bottom: 0;
  flex: 1;
}
.parcours-date {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-light);
  margin-bottom: 0.75rem;
  padding-left: calc(25px + 0.75rem);
}
.parcours-org {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding-left: calc(25px + 0.75rem);
}
.parcours-org .org-logo {
  width: 18px;
  height: 18px;
  object-fit: contain;
  border-radius: 4px;
  flex-shrink: 0;
}
.parcours-org p {
  font-size: 0.9rem;
  color: var(--text-light);
  margin-bottom: 0;
  line-height: 1.4;
}
.parcours-org .small-text {
  font-size: 0.8rem;
  color: var(--text-light);
  margin-top: 0.1rem;
  display: block;
}

/* ========================================================= */
/* COMPÉTENCES "TAGS" (Page Projet)
/* ========================================================= */
.competence-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 2rem;
  justify-content: center;
}
.tag-badge {
  display: inline-block;
  background-color: var(--bg-color);
  color: var(--text-color);
  font-weight: 500;
  font-size: 0.9rem;
  padding: 0.4rem 1.1rem;
  border-radius: 50px;
  border: 1px solid var(--accent);
  box-shadow: var(--shadow);
}

/* ========================================================= */
/* CONTACT
/* ========================================================= */
.contact > p {
  max-width: var(--container-width);
  margin-left: auto;
  margin-right: auto;
  text-align: center;
  font-size: 1.1rem;
  margin-bottom: 3rem;
}
.contact .grid {
  margin-top: 0;
}
.contact-card {
  text-align: center;
}
/* Style de survol déjà groupé avec a.card:hover plus haut */
.contact-card i {
  margin-bottom: 1rem;
  color: var(--accent);
  font-size: 2rem;
}
.contact-card h4 {
  margin-top: 0.5rem;
  margin-bottom: 0.25rem;
  font-size: 1.1rem;
  color: var(--gray-dark);
}
.contact-card p {
  font-size: 0.95rem;
  color: var(--text-light);
}

/* ========================================================= */
/* FOOTER - AMÉLIORÉ
/* ========================================================= */
footer {
  text-align: center;
  padding: 2.5rem;
  background: var(--gray-dark);
  color: var(--footer-text); /* Utilisation d'une variable */
  font-size: 0.9rem;
  font-weight: 300;
  margin-top: 5rem;
}
.project-content + footer {
  margin-top: 0;
}

/* ========================================================= */
/* LECTEUR VIDÉO
/* ========================================================= */
.video-container {
  width: 100%;
  max-width: 900px;
  margin: 4rem auto 0;
  text-align: center;
}
.video-container h3 {
  font-size: 1.5rem;
  color: var(--gray-dark);
  margin-bottom: 1.5rem;
  border-left: 4px solid var(--accent);
  padding-left: 0.75rem;
  text-align: left;
}
.video-wrapper {
  position: relative;
  padding-bottom: 56.25%;
  height: 0;
  overflow: hidden;
  border-radius: var(--radius);
  box-shadow: var(--shadow-hover);
  background: #000;
}
.video-wrapper iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

/* ========================================================= */
/* RESPONSIVE - CORRIGÉ
/* ========================================================= */
/* Bloc média unique fusionné */
@media (max-width: 768px) {
  section {
    padding: 3rem 1.5rem;
  }
  .navbar {
    padding: 1rem 1.5rem;
    margin: 1rem;
    top: 1rem;
  }
  .nav-links {
    display: none;
    flex-direction: column;
    gap: 1rem;
    background: var(--bg-color);
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    padding: 1.5rem;
    margin-top: 0.5rem;
    box-shadow: var(--shadow-hover);
    border-radius: var(--radius);
    border-top: none;
    align-items: center; /* Centrer les éléments en mobile */
  }
  .nav-links.active {
    display: flex;
  }
  .menu-toggle {
    display: block;
  }
  .hero {
    padding-top: 4rem;
  }
  .hero h2 {
    font-size: 2.5rem;
  }
  .presentation {
    flex-direction: column;
    text-align: center;
    gap: 2rem;
  }
  .presentation p {
    text-align: justify;
    font-size: 1.1rem;
  }
  .presentation-text {
    display: flex;
    flex-direction: column;
    align-items: center;
  }
  .photo-profil {
    width: 150px;
    height: 150px;
    object-fit: cover;
    border-radius: var(--radius);
  }
  section h2 {
    font-size: 2rem;
  }
 .grid {
    grid-template-columns: 1fr;
    gap: 1rem;
  }
  
  .project-header {
    padding: 4rem 1.5rem 2rem;
  }
  .project-header h1 {
    font-size: 2rem;
  }
  .project-content {
    padding: 1.5rem;
  }
  .project-content p,
  .project-content li {
    font-size: 1rem;
  }
  section.project-content h2 {
    font-size: 1.5rem;
  }

  /* Responsive Cartes Parcours */
  .parcours-card {
    padding: 1.25rem;
  }
  .parcours-header i {
    font-size: 1.2rem;
    width: 20px;
  }
  .parcours-card h4 {
    font-size: 1rem;
  }
  .parcours-date {
    font-size: 0.85rem;
    padding-left: calc(20px + 0.75rem);
  }
  .parcours-org {
    padding-left: calc(20px + 0.75rem);
  }
  .parcours-org .org-logo {
    width: 16px;
    height: 16px;
  }
  .parcours-org p {
    font-size: 0.85rem;
  }
  .parcours-org .small-text {
    font-size: 0.75rem;
  }

  /* --- AJOUTS POUR RÉDUIRE LE CONTENU DES CARTES --- */
  .card {
    padding: 1rem;
  }
  .card h4 {
    font-size: 1rem;
    margin-bottom: 0.4rem;
  }
  .card p {
    font-size: 0.85rem;
    line-height: 1.5;
  }
  .card-img {
    height: 120px;
    margin-bottom: 0.75rem;
  }

  /* Ajustements spécifiques si besoin (ex: cartes compétences) */
  .competence-card i {
    font-size: 2rem;
    margin-bottom: 1rem;
  }
  .competence-card h4 {
    font-size: 1rem;
  }
  .competence-card li {
    font-size: 0.9rem;
    line-height: 1.4;
  }

  /* Ajustements spécifiques cartes parcours (si Option 2) */
  .parcours-card h4 {
    font-size: 0.95rem;
  }
  .parcours-date {
    font-size: 0.8rem;
  }
  .parcours-org p {
    font-size: 0.8rem;
  }
  .parcours-org .small-text {
    font-size: 0.7rem;
  }
  .parcours-header i {
    font-size: 1.1rem;
  }
  .parcours-org .org-logo {
    width: 14px;
    height: 14px;
  }

  /* Ajustement bouton de langue en mobile */
  .nav-links #lang-toggle-btn {
    width: fit-content;
    margin-top: 10px;
    margin-left: 0; /* Déjà centré par .nav-links */
    margin-right: 0; /* Déjà centré par .nav-links */
    padding: 0.5rem 1.5rem;
    text-align: center;
  }
}

/* ============================================= */
/* STYLES DE LA LIGHTBOX (CORRIGÉ)
/* ============================================= */
.hidden {
  display: none;
}

/* Cette classe .flex est INDISPENSABLE, 
    c'est elle que votre JS ajoute pour afficher la modal */
.flex {
  display: flex;
  align-items: center;
  justify-content: center;
}

#lightbox-modal {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(0, 0, 0, 0.9);
  padding: 1rem;
  z-index: 2000;
  backdrop-filter: blur(5px);
  /* La propriété 'display' n'est plus ici, elle est gérée par .hidden et .flex */
}
.lightbox-container {
  position: relative;
  max-width: 100%;
  max-height: 100%;
}
#lightbox-image {
  border-radius: var(--radius);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
  max-height: 85vh;
  max-width: 100%;
  object-fit: contain;
}
#lightbox-caption {
  color: white;
  text-align: center;
  margin-top: 1rem;
  font-size: 1.1rem;
  font-weight: 300;
  background-color: rgba(0, 0, 0, 0.5);
  padding: 0.5rem 1rem;
  border-radius: 50px;
  max-width: fit-content;
  margin-left: auto;
  margin-right: auto;
}
.lightbox-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  color: white;
  font-size: 2rem;
  font-weight: bold;
  width: 3rem;
  height: 3rem;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  border-radius: 50%;
  background-color: rgba(0, 0, 0, 0.5);
  border: none;
  cursor: pointer;
  transition: background-color 0.2s, transform 0.2s;
  z-index: 2001;
}

.lightbox-close svg {
  height: 2rem;
}

.lightbox-close:hover {
  background-color: rgba(0, 0, 0, 0.8);
  transform: rotate(90deg);
}
.lightbox-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  padding: 0.5rem;
  width: 3.5rem;
  height: 3.5rem;
  color: #1f2937;
  border-radius: 50%;
  background-color: rgba(255, 255, 255, 0.8);
  font-size: 2rem;
  border: none;
  cursor: pointer;
  transition: background-color 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
}
.lightbox-btn:hover {
  background-color: rgba(255, 255, 255, 1);
}
.lightbox-prev {
  left: 1rem;
}
.lightbox-next {
  right: 1rem;
}