
/* Définition du jeu de caractères et import de la police */
@charset "UTF-8";

:root {
  --bg: #f0f4f8;
  --surface: #ffffff;
  --border: #b0bec5;
  --text: #2d3748;
  --text-muted: #4a5568;
  --heading: #1a202c;
  --shadow-sm: 0 2px 8px rgba(0,0,0,0.06);
  --shadow-md: 0 4px 16px rgba(0,0,0,0.1);
}

body.dark {
  --bg: #0f1117;
  --surface: #1a1f2e;
  --border: #2d3748;
  --text: #e2e8f0;
  --text-muted: #a0aec0;
  --heading: #f7fafc;
  --shadow-sm: 0 2px 8px rgba(0,0,0,0.3);
  --shadow-md: 0 4px 16px rgba(0,0,0,0.4);
}

/* Reset CSS */
* {
  box-sizing: border-box; /* Inclut le padding et la bordure dans la largeur et la hauteur totales des éléments */
  margin: 0; /* Réinitialise les marges à zéro */
  padding: 0; /* Réinitialise les paddings à zéro */
}

/* Configuration de base pour html et body */
html {
  scroll-behavior: smooth;
}

html, body {
  overflow-x: hidden;
  width: 100%;
}

body {
  font-family: 'Inter', Arial, sans-serif;
  background-color: var(--bg);
  color: var(--text);
  transition: background-color 0.3s, color 0.3s;
  padding-top: 60px; /* Ajoute un padding en haut */
  line-height: 1.6; /* Définit l'interligne */
  min-height: 100vh; /* Définit la hauteur minimale à 100% de la hauteur de la fenêtre */
  display: flex; /* Utilise le modèle de boîte flexible */
  flex-direction: column; /* Aligne les éléments en colonne */
}

.main-container {
  flex: 1; /* Permet au conteneur principal de prendre tout l'espace disponible */
}

/* Bannière */
.banner {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  background-color: var(--surface);
  height: 60px;
  display: flex;
  align-items: center;
  padding: 0 20px;
  z-index: 1000;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
  border-bottom: 3px solid #1a73e8;
}

.banner h1 {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text);
  letter-spacing: 0.01em;
  flex: 1;
}

.theme-toggle {
  background: none;
  border: 1.5px solid var(--border);
  border-radius: 8px;
  padding: 6px 10px;
  cursor: pointer;
  transition: background 0.2s, border-color 0.2s;
  line-height: 1;
  color: var(--text);
  display: flex;
  align-items: center;
}

.theme-toggle:hover {
  background: var(--bg);
  border-color: #1a73e8;
}

.banner img {
  cursor: pointer; /* Change le curseur en pointeur */
  margin-right: 15px; /* Ajoute une marge à droite */
  width: 40px; /* Définit la largeur */
  height: 40px; /* Définit la hauteur */
}

/* Menu latéral */
.sidenav {
  height: 100%; /* Définit la hauteur à 100% */
  width: 0; /* Définit la largeur à 0 */
  position: fixed; /* Positionne le menu de manière fixe */
  z-index: 1001; /* Définit l'ordre d'empilement */
  top: 0; /* Aligne le menu en haut */
  left: 0; /* Aligne le menu à gauche */
  background-color: #111; /* Définit la couleur de fond */
  overflow-x: hidden; /* Cache le défilement horizontal */
  transition: 0.5s; /* Ajoute une transition */
  padding-top: 60px; /* Ajoute un padding en haut */
}

.sidenav a {
  padding: 16px 32px; /* Ajoute un padding */
  text-decoration: none; /* Supprime la décoration du texte */
  font-size: 18px; /* Définit la taille de la police */
  color: white; /* Définit la couleur du texte */
  display: block; /* Affiche les éléments en bloc */
  transition: 0.3s; /* Ajoute une transition */
}

.sidenav a:hover {
  color: #1a73e8;
  transform: translateX(10px);
  border-left: 3px solid #1a73e8;
  padding-left: 29px;
}

.sidenav .closebtn {
  position: absolute; /* Positionne le bouton de manière absolue */
  top: 0; /* Aligne le bouton en haut */
  right: 25px; /* Aligne le bouton à droite */
  font-size: 36px; /* Définit la taille de la police */
  color: white; /* Définit la couleur du texte */
  padding: 8px; /* Ajoute un padding */
  transition: 0.3s; /* Ajoute une transition */
}

.sidenav .closebtn:hover {
  color: #f1f1f1; /* Change la couleur du texte au survol */
  transform: rotate(90deg); /* Fait tourner le bouton au survol */
}

/* Style spécifique pour la section À propos */
#aPropos {
  margin-bottom: 30px; /* Ajoute une marge en bas */
}

.content {
  position: relative;
  padding: 20px;
  margin-top: 80px;
  max-width: 1200px;
  margin-left: auto;
  margin-right: auto;
}

.content h1 {
  position: relative;
  padding-bottom: 12px;
  margin-bottom: 24px;
  color: var(--heading);
  font-weight: 700;
}

.content h1::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 48px;
  height: 3px;
  background-color: #1a73e8;
  border-radius: 2px;
}

/* Style spécifique pour l'image dans la section À propos */
.content .image-area {
  float: right; /* Aligne l'image à droite */
  margin-left: 20px; /* Ajoute une marge à gauche */
  margin-bottom: 20px; /* Ajoute une marge en bas */
}

.content .image-area img {
  max-width: 150px; /* Définit la largeur maximale */
  height: auto; /* Ajuste la hauteur automatiquement */
  border-radius: 10px; /* Ajoute un bord arrondi */
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2); /* Ajoute une ombre */
}

/* Pour éviter les problèmes de float */
.content::after {
  content: ""; /* Ajoute du contenu vide */
  display: table; /* Utilise le modèle de boîte de table */
  clear: both; /* Efface les flottements */
}

/* Conteneurs */
.container {
  background-color: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 20px;
  margin: 20px 0;
  display: flex;
  align-items: center;
  gap: 20px;
  box-shadow: var(--shadow-sm);
  transition: box-shadow 0.2s ease;
}

.container:hover {
  box-shadow: var(--shadow-md);
}

.text-area {
  flex: 1; /* Permet à la zone de texte de prendre tout l'espace disponible */
}

.image-area {
  flex-shrink: 0; /* Empêche la zone d'image de se rétrécir */
}

.image-area img {
  width: 150px; /* Définit la largeur */
  height: 150px; /* Définit la hauteur */
  border-radius: 10px; /* Ajoute un bord arrondi */
  object-fit: cover; /* Maintient les proportions */
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2); /* Ajoute une ombre */
}

/* Compétences */
.skills-container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 20px;
  padding: 20px;
  background-color: var(--surface);
  border-radius: 12px;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
}

.skill-box {
  background-color: var(--bg);
  border: 1px solid var(--border);
  border-top: 3px solid transparent;
  border-radius: 8px;
  padding: 15px;
  text-align: center;
  transition: transform 0.2s ease, border-top-color 0.2s ease, box-shadow 0.2s ease;
}

.skill-box:hover {
  transform: translateY(-4px);
  border-top-color: #1a73e8;
  box-shadow: 0 4px 12px rgba(26, 115, 232, 0.12);
}

/* Section Divers */
.divers-container {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  grid-template-rows: repeat(3, auto);
  gap: 20px;
  max-width: 1200px;
  margin: 0 auto;
  padding: 20px;
}

.divers-box {
  background-color: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 15px;
  text-align: center;
  box-shadow: var(--shadow-sm);
  transition: box-shadow 0.2s ease, transform 0.2s ease;
}

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

/* Section Contact (Footer) */
.contact-section {
  width: 100%;
  background-color: var(--surface);
  color: var(--text);
  padding: 40px 20px;
  text-align: center;
  border-top: 3px solid #1a73e8;
  margin-top: 60px;
  position: relative;
  bottom: 0;
}

.contact-section h1 {
  color: var(--heading);
  margin-bottom: 12px;
}

.contact-section p {
  color: var(--text-muted);
  margin-bottom: 8px;
}

/* Style pour les liens de contact */
.contact-info a {
  color: #1a73e8;
  text-decoration: none;
  font-weight: 600;
  transition: color 0.2s;
}

.contact-info a:hover {
  color: #1557b0;
}

/* Section CV */
.cv-section {
  background-color: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 20px;
  margin: 20px 0;
  display: flex;
  align-items: center;
  gap: 20px;
  box-shadow: var(--shadow-sm);
}

.cv-preview {
  width: 150px; /* Définit la largeur */
  height: 200px; /* Définit la hauteur */
  object-fit: cover; /* Maintient les proportions */
  border-radius: 10px; /* Ajoute un bord arrondi */
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2); /* Ajoute une ombre */
}

/* Style du bouton CV */
.cv-button {
  display: inline-block; /* Affiche le bouton en ligne */
  padding: 12px 24px; /* Ajoute un padding */
  background-color: #1a73e8; /* Définit la couleur de fond */
  color: white; /* Définit la couleur du texte */
  text-decoration: none; /* Supprime la décoration du texte */
  border-radius: 5px; /* Ajoute un bord arrondi */
  font-weight: bold; /* Met le texte en gras */
  border: none; /* Supprime la bordure */
  cursor: pointer; /* Change le curseur en pointeur */
  transition: all 0.3s ease; /* Ajoute une transition */
  font-size: 16px; /* Définit la taille de la police */
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2); /* Ajoute une ombre */
}

.cv-button:hover {
  background-color: #1557b0; /* Change la couleur de fond au survol */
  transform: translateY(-2px); /* Déplace le bouton vers le haut au survol */
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2); /* Ajoute une ombre au survol */
}

.cv-button:active {
  transform: translateY(0); /* Réinitialise la position du bouton lorsqu'il est actif */
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2); /* Ajoute une ombre lorsqu'il est actif */
}

.cv-content {
  flex: 1; /* Permet au contenu du CV de prendre tout l'espace disponible */
  display: flex; /* Utilise le modèle de boîte flexible */
  flex-direction: column; /* Aligne les éléments en colonne */
  gap: 15px; /* Ajoute un espace entre les éléments */
}

.about-container {
  display: flex; /* Utilise le modèle de boîte flexible */
  align-items: flex-start; /* Aligne les éléments en haut */
  padding-top: 0; /* Supprime le padding en haut */
  gap: 30px; /* Ajoute un espace entre le texte et l'image */
}

.text-area {
  flex: 1; /* Permet à la zone de texte de prendre tout l'espace disponible */
  display: flex; /* Utilise le modèle de boîte flexible */
  flex-direction: column; /* Aligne les éléments en colonne */
  justify-content: flex-start; /* Aligne le contenu en haut */
  padding-top: 20px; /* Ajuste la position verticale du texte */
}

.image-area {
  margin-left: 20px; /* Ajoute une marge à gauche */
}

.progress-container {
  margin-top: 15px; /* Ajoute une marge en haut */
}

.progress-bar {
  background-color: #eee; /* Définit la couleur de fond */
  height: 20px; /* Définit la hauteur */
  border-radius: 10px; /* Ajoute un bord arrondi */
  overflow: hidden; /* Cache le débordement */
  position: relative; /* Positionne la barre de progression de manière relative */
}

.progress {
  background-color: #1a73e8; /* Définit la couleur de fond */
  height: 100%; /* Définit la hauteur */
  border-radius: 10px; /* Ajoute un bord arrondi */
  transition: width 0.5s ease; /* Ajoute une transition */
}

.progress-text {
  display: inline-block; /* Affiche le texte en ligne */
  margin-left: 10px; /* Ajoute une marge à gauche */
  font-weight: bold; /* Met le texte en gras */
}

.techniques-container {
  background-color: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 20px;
  margin: 20px auto;
  display: flex;
  gap: 20px;
  box-shadow: var(--shadow-sm);
  max-width: 1160px;
}



.menu-section {
  width: 250px; /* Définit la largeur */
}

.main-menu-item {
  background-color: var(--surface);
  margin-bottom: 10px;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: 8px; /* Ajoute un bord arrondi */
  cursor: pointer; /* Change le curseur en pointeur */
  transition: all 0.3s ease; /* Ajoute une transition */
}

.main-menu-item:hover {
  transform: translateY(-2px); /* Déplace l'élément vers le haut au survol */
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1); /* Ajoute une ombre au survol */
}

.main-menu-item.active {
  background-color: #1a73e8; /* Change la couleur de fond lorsque l'élément est actif */
  color: white; /* Change la couleur du texte lorsque l'élément est actif */
  border-color: #1a73e8; /* Change la couleur de la bordure lorsque l'élément est actif */
}

.skills-section {
  flex-grow: 1; /* Permet à la section de prendre tout l'espace disponible */
  max-height: 500px; /* Définit la hauteur maximale */
  overflow-y: auto; /* Ajoute une barre de défilement verticale */
}

.skill-item {
  background-color: var(--surface);
  margin-bottom: 10px;
  padding: 15px;
  border: 1px solid var(--border);
  border-radius: 8px; /* Ajoute un bord arrondi */
  cursor: pointer; /* Change le curseur en pointeur */
  transition: all 0.3s ease; /* Ajoute une transition */
}

.skill-item:hover {
  transform: translateY(-2px); /* Déplace l'élément vers le haut au survol */
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1); /* Ajoute une ombre au survol */
}

.skill-content {
  display: none;
  padding: 15px;
  background-color: var(--bg);
  margin-top: 10px;
  border-radius: 8px;
  border: 1px solid var(--border);
}

.progress-bar {
  background-color: #eee; /* Définit la couleur de fond */
  height: 20px; /* Définit la hauteur */
  border-radius: 10px; /* Ajoute un bord arrondi */
  margin-top: 20px; /* Ajoute une marge en haut */
  overflow: hidden; /* Cache le débordement */
  box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.2); /* Ajoute une ombre interne */
}

.progress {
  background-color: #1a73e8; /* Définit la couleur de fond */
  height: 100%; /* Définit la hauteur */
  border-radius: 10px; /* Ajoute un bord arrondi */
  width: 90%; /* Définit la largeur */
  transition: width 0.5s ease; /* Ajoute une transition */
}

/* Style du bouton CV */
.projet-button {
  display: inline-block; /* Affiche le bouton en ligne */
  padding: 12px 24px; /* Ajoute un padding */
  background-color: #1a73e8; /* Définit la couleur de fond */
  color: white; /* Définit la couleur du texte */
  text-decoration: none; /* Supprime la décoration du texte */
  border-radius: 5px; /* Ajoute un bord arrondi */
  font-weight: bold; /* Met le texte en gras */
  border: none; /* Supprime la bordure */
  cursor: pointer; /* Change le curseur en pointeur */
  transition: all 0.3s ease; /* Ajoute une transition */
  font-size: 16px; /* Définit la taille de la police */
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2); /* Ajoute une ombre */
}

.projet-button:hover {
  background-color: #1557b0; /* Change la couleur de fond au survol */
  transform: translateY(-2px); /* Déplace le bouton vers le haut au survol */
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2); /* Ajoute une ombre au survol */
}

.projet-button:active {
  transform: translateY(0); /* Réinitialise la position du bouton lorsqu'il est actif */
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2); /* Ajoute une ombre lorsqu'il est actif */
}

.projet-icon {
  width: 200px; /* Définit la largeur */
  height: 200px; /* Définit la hauteur */
  border-radius: 10px; /* Ajoute un bord arrondi */
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2); /* Ajoute une ombre */
}

.tete img {
    width: 300px; /* Réduit la largeur */
    height: 400px; /* Réduit la hauteur proportionnelle */
    border: 2px solid #ddd; /* Ajoute une bordure */
    border-radius: 5px; /* Ajoute un bord arrondi */
    margin-left: 40px; /* Ajoute une marge à gauche */
    margin-top: -50px; /* Remonte l'image */
    object-fit: cover; /* Maintient les proportions */
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1); /* Ajoute une ombre */
}

/* ----- Styles pour la section Projets / carrousel ----- */
/* Styles pour les onglets de projets */
.projects-tabs {
    display: flex;
    gap: 15px;
    margin: 20px 0;
    justify-content: center;
}


/* Style commun pour tous les boutons d'onglet de projets (IUT et Personnels) */
.proj-tab {
  padding: 10px 20px;
  background: #fff;
  border: 2px solid #1a73e8;
  border-radius: 8px;
  cursor: pointer;
  font-size: 16px;
  font-weight: bold;
  transition: all 0.3s ease;
}

.proj-tab:hover {
    background: #e8f0fe;
}

.proj-tab.active {
  background: #1a73e8;
  color: #fff;
  border: 2px solid #1a73e8;
  /* Garde la même taille, padding, police que .proj-tab */
  font-size: 16px;
  font-weight: bold;
  padding: 10px 20px;
  border-radius: 8px;
  box-shadow: none;
  outline: none;
  transition: all 0.3s ease;
}

/* Styles pour le carrousel de projets */
.projects-carousel {
    position: relative;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 15px;
    padding: 30px;
    margin: 20px auto;
    max-width: 1200px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

.carousel-container {
    overflow: hidden;
    margin: 0 40px;
}

.carousel-wrapper {
    min-height: 300px;
    transition: opacity 0.3s ease-out, transform 0.3s ease-out;
    transform-origin: center center;
    margin: 0;
    padding: 0;
}

.carousel-wrapper.fade-out {
    opacity: 0;
    transform: scale(0.95);
}

.carousel-wrapper.fade-in {
    opacity: 1;
    transform: scale(1);
}

.project-content {
    display: flex;
    gap: 30px;
    align-items: center;
    padding: 20px;
    background: var(--surface);
    border-radius: 10px;
    margin: 0;
    min-height: 300px;
    box-sizing: border-box;
}

.project-info {
    flex: 1;
}

.project-info h2 {
    margin-bottom: 15px;
    color: var(--heading);
}

.project-info p {
    margin-bottom: 20px;
    color: var(--text-muted);
}

.project-image {
    flex: 0 0 200px;
}

.project-image img {
    width: 200px;
    height: 140px;
    object-fit: cover;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.carousel-button {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 40px;
    height: 40px;
    background: #1a73e8;
    color: white;
    border: none;
    border-radius: 50%;
    font-size: 20px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
    transition: all 0.3s ease;
    z-index: 10;
}

.carousel-button:hover {
    background: #1557b0;
    transform: translateY(-50%) scale(1.1);
}

.carousel-button.prev {
    left: 10px;
}

.carousel-button.next {
    right: 10px;
}

/* Catégories projets */
.proj-category {
  text-align: center;
  margin: 30px 0 10px 0;
  font-size: 1.5em;
  color: #000000;
}

@media (max-width: 700px) {
  .carousel-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: transparent;
    color: #222;
    border: none;
    width: 40px;
    height: 40px;
    font-size: 2.5em;
    cursor: pointer;
    z-index: 2;
    transition: color 0.2s;
  }
  .carousel-arrow:hover {
    color: #1a73e8;
  }
  .carousel-arrow.left { left: 0; }
  .carousel-arrow.right { right: 0; }
}

/* ==================== Responsive rules ==================== */
/* Make images fluid by default */
img {
  max-width: 100%;
  height: auto;
}

/* Tweak layout for medium screens (tablets and small laptops) */
@media (max-width: 900px) {
  .about-container {
    flex-direction: column;
    align-items: center;
    gap: 15px;
  }

  .tete img {
    width: 60%;
    max-width: 300px;
    height: auto;
    margin-left: 0;
    margin-top: 0;
  }

  .container,
  .cv-section,
  .project-content {
    flex-direction: column;
    align-items: center;
  }

  .projects-carousel {
    padding: 20px;
  }

  .carousel-container {
    margin: 0 10px;
  }
}

/* Mobile specific adjustments */
@media (max-width: 600px) {
  body {
    padding-top: 64px; /* allow space for the fixed banner */
  }

  .banner {
    height: 56px;
    padding: 0 12px;
  }

  .banner h1 {
    font-size: 1rem;
    margin-left: 8px;
  }

  .banner img {
    width: 36px;
    height: 36px;
  }

  .content {
    margin-top: 72px;
    padding: 12px;
  }

  /* Stack containers vertically */
  .container,
  .techniques-container,
  .divers-container,
  .cv-section,
  .project-content {
    display: flex;
    flex-direction: column;
    gap: 12px;
    align-items: stretch;
  }

  .menu-section {
    width: auto;
  }

  /* Make grid sections single column */
  .divers-container {
    grid-template-columns: 1fr;
  }

  .skills-container {
    grid-template-columns: 1fr;
  }

  /* Project card image should scale */
  .project-image img,
  .cv-preview,
  .projet-icon {
    width: 100%;
    height: auto;
  }

  /* Smaller carousel padding and buttons */
  .projects-carousel {
    padding: 12px;
  }

  .carousel-button {
    width: 36px;
    height: 36px;
    font-size: 18px;
  }

  /* Ensure the profile image doesn't overflow */
  .tete img {
    width: 100%;
    max-width: 240px;
    margin: 0 auto;
    display: block;
  }

  /* Side navigation adjusts for smaller banner */
  .sidenav {
    padding-top: 56px;
  }
}

/* Small utility: hide big headings on very small screens if needed */
@media (max-width: 360px) {
  .banner h1 {
    font-size: 0.9rem;
  }
}

/* End responsive rules */