/* ============================= */
/*         VARIABLES            */
/* ============================= */
:root {
  --bg-color: #ffffff;
  --text-color: #000000;
}
[data-theme="dark"] {
  --bg-color: #181818;
  --text-color: #f0f0f0;
}

/* ============================= */
/*        BASE & RESET          */
/* ============================= */
@import url("https://fonts.googleapis.com/css?family=IBM+Plex+Mono");

html {
  line-height: 1.15;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  padding: 0;
  font-size: 100%;
  line-height: 1.5;
  font-family: 'IBM Plex Mono', monospace;
  background-color: var(--bg-color);
  color: var(--text-color);
  transition: background-color 0.3s, color 0.3s;
}

/* ============================= */
/*         NAVIGATION           */
/* ============================= */
.nav, .topbar {
  position: sticky;
  top: 0;
  z-index: 1000;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 2rem;
  background-color: rgba(255, 255, 255, 0.8);
  backdrop-filter: blur(10px);
  transition: background-color 0.3s;
}
[data-theme="dark"] .nav, [data-theme="dark"] .topbar {
  background-color: rgba(24, 24, 24, 0.8);
}

.nav-links {
  display: flex;
  gap: 1.5rem;
}

.nav-links a {
  text-decoration: none;
  color: var(--text-color);
  font-weight: bold;
  padding: 0.5em 1.25em;
  border-radius: 9999px;
  transition: background-color 0.3s, color 0.3s;
}

.nav-links a:hover,
.nav-links a.active {
  background-color: rgba(0, 0, 0, 0.1);
  color: black;
}
[data-theme="dark"] .nav-links a:hover,
[data-theme="dark"] .nav-links a.active {
  background-color: rgba(255, 255, 255, 0.1);
  color: white;
}

.burger {
  display: none;
  background: none;
  border: none;
  font-size: 2rem;
  color: var(--text-color);
  cursor: pointer;
}
@media (max-width: 768px) {
  .burger {
    display: block;
  }
  .nav-links {
    display: none;
    flex-direction: column;
    width: 100%;
    margin-top: 1rem;
  }
  .nav-links.active {
    display: flex;
  }
}

/* ============================= */
/*         PROJECTS             */
/* ============================= */
.user-projects {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2rem;
  padding: 2rem;
}

.project-card {
  background: var(--bg-color);
  color: var(--text-color);
  border-left: 5px solid #007acc;
  padding: 1.5rem;
  border-radius: 0.75rem;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
  transition: transform 0.3s ease;
  break-inside: avoid;
}
.project-card:hover {
  transform: translateY(-5px);
}

.project-card h3 {
  font-size: 1.3rem;
  margin-bottom: 0.5rem;
}

.project-card p {
  font-size: 0.95rem;
  color: var(--text-color);
  text-align: justify;
  margin-bottom: 1rem;
}

.project-card .btn {
  background-color: transparent;
  border: 1px solid #007acc;
  color: #007acc;
  padding: 0.5rem 1rem;
  text-decoration: none;
  border-radius: 0.25rem;
  transition: all 0.3s ease;
  font-weight: bold;
}
.project-card .btn:hover {
  background-color: #007acc;
  color: white;
}

/* ============================= */
/*         UTILITAIRES          */
/* ============================= */
.blinking-cursor {
  font-weight: bold;
  font-size: 1.25em;
  color: var(--text-color);
  animation: blink 1s step-start infinite;
}

@keyframes blink {
  50% {
    opacity: 0;
  }
}

/* ===== HEADER PRINCIPAL ===== */

#particles-js {
  background: linear-gradient(135deg, #3b7ba3 100%) !important;
}

/* Même fond pour tous les thèmes */
[data-theme="light"] #particles-js,
[data-theme="dark"] #particles-js,
[data-theme="auto"] #particles-js {
  background: linear-gradient(135deg, #336a8c 100%) !important;
}

#particles-js .particles-js-canvas-el {
  width: 100% !important;
  height: 100vh !important;
}

.header {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 80%;
  text-align: center;
  color: #fff;
  font-family: 'IBM Plex Mono', monospace;
  z-index: 1;
  transform: translate(-50%, -50%);
}

.header .site-title {
  font-size: 35px;
  display: block;
  line-height: 1;
  margin: 0;
}

@media only screen and (min-width: 550px) {
  .header .site-title {
    font-size: 100px;
  }
}

.header .site-description {
  font-size: 20px;
  margin-top: 10px;
  line-height: 1;
}

@media only screen and (min-width: 550px) {
  .header .site-description {
    font-size: 40px;
  }
}

.header-links {
  margin: 10px;
}

.header-links .link {
  color: #fff;
  text-decoration: none;
  font-size: 15px;
  margin: 10px;
}

@media only screen and (min-width: 550px) {
  .header-links .link {
    font-size: 20px;
  }
}

.header-icons {
  display: flex;
  justify-content: center;
  text-align: center
}

.down,
.header-icons .icon {
  color: #fff;
  text-align: center
}

.header-icons .icon {
  height: 20px;
  padding: 10px;
  border-radius: 50%;
  border: 2px solid #fff;
  transition: all .7s;
  width: 20px;
  font-size: 20px;
  margin: 5px
}

.header-icons .icon:active,
.header-icons .icon:hover {
  color: #1488CC;
  background: #fff
}

.overlay {
  position: absolute;
  top: 0; left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.3); /* foncé transparent */
  z-index: 0;
}

@media only screen and (min-width:550px) {
  .header-icons .icon {
      width: 35px;
      height: 35px;
      font-size: 35px
  }
}

.down {
  position: absolute;
  bottom: 25px;
  width: 100%;
  margin: 0 auto;
  display: block;
  font-size: 30px;
  cursor: pointer
}

.down .icon {
  position: absolute;
  -webkit-transform-style: preserve-3d;
  transform-style: preserve-3d;
  top: 50%;
  left: 50%;
  -webkit-transform: translate(-50%, -50%);
  transform: translate(-50%, -50%);
  width: 100px;
  height: 100px;
  fill: #fff;
  -webkit-animation: pulse 1.3s infinite;
  animation: pulse 1.3s infinite
}

.down .icon:active,
.down .icon:hover,
.footer a:active,
.footer a:hover {
  color: #266790
}

/* Animation de pulsation */
@keyframes pulse {
  0% { transform: translate(-50%, -50%) scale(1); }
  50% { transform: translate(-50%, -50%) scale(1.1); }
  100% { transform: translate(-50%, -50%) scale(1); }
}

/* ===== SECTION ABOUT ===== */

#about {
  width: 90%;
  margin: 0 auto;
  max-width: 960px;
}

@media only screen and (min-width: 550px) {
  #about {
    width: 80%;
  }
}

.user {
  text-align: center;
  font-size: 60px;
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  justify-content: space-between;
}

.user p {
  font-size: 16px;
}

@media only screen and (min-width: 550px) {
  .user {
    flex-wrap: nowrap;
    font-size: 75px;
  }
}

.user-details {
  text-align: center;
  margin: 5px auto;
}

.about-text {
  margin-bottom: 2.5rem;
}

[data-theme="dark"] .about-text {
  color: #ccc;
}

[data-theme="dark"] .about-text strong {
  color: #fff;
}

[data-theme="dark"] .user-details h1 {
  color: #fff;
}

/* ===== SECTION PROJETS ===== */

#projects {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  width: 90%;
  max-width: 960px;
  margin: 0 auto;
}

@media only screen and (min-width: 550px) {
  #projects {
    width: 80%;
  }
}

.projects-grid {
  column-count: 3;
  column-gap: 2rem;
  max-width: 1200px;
  margin: 0 auto;
}

@media (max-width: 992px) {
  .projects-grid {
    column-count: 2;
  }
}

@media (max-width: 600px) {
  .projects-grid {
    column-count: 1;
  }
}

/* Carte Projet */
.project-card {
  border-left: 5px solid #007acc;
  padding: 1.5rem;
  background-color: #fff;
  margin-bottom: 2rem;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
  border-radius: 0.75rem;
  transition: transform 0.3s ease;
  break-inside: avoid;
}

.project-card:hover {
  transform: translateY(-5px);
}

.project-card h3 {
  font-size: 1.3rem;
  margin-bottom: 0.5rem;
}

.project-card p {
  font-size: 0.95rem;
  color: #444;
  text-align: justify;
  margin-bottom: 1rem;
}

.project-card img {
  width: 100%;
  height: auto;
  object-fit: cover;
  border-radius: 0.5rem;
  display: block;
}

/* Bouton dans la carte projet */
.project-card .btn {
  background-color: transparent;
  border: 1px solid #007acc;
  color: #007acc;
  padding: 0.5rem 1rem;
  text-decoration: none;
  border-radius: 0.25rem;
  transition: all 0.3s ease;
  font-weight: bold;
}

.project-card .btn:hover {
  background-color: #007acc;
  color: white;
}

/* ===== SECTION TECH SKILLS ===== */

/* Conteneur principal des cartes */
.tech-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 2rem;
}

/* Carte individuelle */
.tech-card {
  background-color: #fff;
  border-radius: 1.5rem;
  box-shadow: 0 0 20px rgba(0, 0, 0, 0.05);
  padding: 2rem;
  max-width: 48%;
  flex: 1 1 48%; /* Pour permettre le wrapping si besoin */
  text-align: center;
  transition: transform 0.3s ease;
  box-sizing: border-box;
  margin-bottom: 3rem;
}

/* Effet hover sur carte */
.tech-card:hover {
  transform: translateY(-5px);
}

/* Titre dans la carte */
.tech-card h2 {
  position: relative;
  display: inline-block;
  z-index: 1;
  padding: 0.5rem 1rem;
  background: rgba(0, 153, 255, 0.1);
  border-radius: 8px;
  font-size: 1.5rem;
  font-weight: 600;
  color: #111;
  box-shadow: 0 2px 8px rgba(0, 153, 255, 0.15);
}

/* Icônes dans la carte */
.tech-card i {
  font-size: 3rem;
  margin: 0.5rem;
}

/* Texte descriptif */
.tech-card p {
  font-size: 0.95rem;
  text-align: justify;
  margin-top: 1rem;
}

/* Mode dark sur tech-card */
[data-theme="dark"] .tech-card {
  background-color: #1e1e1e;
  box-shadow: 0 0 20px rgba(255, 255, 255, 0.05);
}

[data-theme="dark"] .tech-card h2 {
  background: rgba(0, 153, 255, 0.1);
  color: #f0f0f0;
  box-shadow: 0 2px 8px rgba(0, 153, 255, 0.2);
}

[data-theme="dark"] .tech-card p {
  color: #ccc;
}

/* Titre de section (optionnel si utilisé) */
.section-title {
  text-align: center;
  margin-bottom: 2rem;
}

.section-title h1 {
  font-size: 2.5rem;
  margin-bottom: 0.5rem;
}

/* Icon Row (pour plusieurs icônes alignées) */
.icon-row {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 15px;
  margin-bottom: 15px;
  font-size: 2rem;
}

/* ===== SECTION GALERIE PHOTO ===== */

/* Conteneur général de la galerie */
.photo-gallery {
  display: flex;
  flex-wrap: wrap;
  gap: 2rem;
  justify-content: center;
  margin-top: 2rem;
  padding: 2rem;
  position: relative;
}

/* Carte individuelle (flip card) */
.flip-card {
  background-color: transparent;
  width: 200px;
  height: 260px;
  perspective: 1000px; /* profondeur pour l'effet 3D */
  transition: transform 0.3s ease;
}

/* Cartes jetées "aléatoirement" */
.flip-card:nth-child(1) {
  transform: rotate(-7deg);
}

.flip-card:nth-child(2) {
  transform: rotate(4deg);
  margin-top: 10px;
}

.flip-card:nth-child(3) {
  transform: rotate(-3deg);
}

.flip-card:nth-child(4) {
  transform: rotate(6deg);
  margin-top: 20px;
}

/* Effet au hover : redresse la carte et agrandit */
.flip-card:hover {
  transform: rotate(0deg) scale(1.05);
  z-index: 10;
}

/* Intérieur de la carte (qui va flipper) */
.flip-card-inner {
  position: relative;
  width: 100%;
  height: 100%;
  transition: transform 0.3s;
  transform-style: preserve-3d;
}

/* Animation au hover */
.flip-card:hover .flip-card-inner {
  transform: rotateY(180deg);
}

/* Face avant et arrière */
.flip-card-front,
.flip-card-back {
  position: absolute;
  width: 100%;
  height: 100%;
  backface-visibility: hidden;
  border-radius: 15px;
  overflow: hidden;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

/* Images de face et de dos */
.flip-card-front img,
.flip-card-back img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Face arrière */
.flip-card-back {
  transform: rotateY(180deg);
  position: relative;
}

/* Sceau de date sur la face arrière */
.date-stamp {
  position: absolute;
  top: 40%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-family: 'IBM Plex Mono', monospace;
  font-size: 1rem;
  text-align: center;
  color: #444;
  padding: 0.4rem 0.8rem;
  backdrop-filter: blur(2px);
}

/* ===== FLOATING BLOBS (fond animé) ===== */

/* Conteneur général pour les blobs */
.floating-blobs {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none; /* on désactive toute interaction */
  z-index: -1; /* en arrière-plan */
  overflow: hidden;
}

/* Style général des blobs */
.blob {
  position: absolute;
  width: 400px;
  height: 400px;
  background: rgba(0, 153, 255, 0.15); /* couleur bleue transparente */
  border-radius: 50%;
  filter: blur(80px); /* effet de flou */
  animation: blobMove 5s ease-in-out infinite alternate;
  mix-blend-mode: multiply; /* pour un bel effet de fusion */
}

/* Chaque blob a un emplacement différent */
.blob1 {
  top: 10%;
  left: 20%;
  animation-delay: 0s;
}

.blob2 {
  top: 50%;
  left: 60%;
  animation-delay: 2s;
}

.blob3 {
  top: 30%;
  left: 80%;
  animation-delay: 4s;
}

/* Animation des blobs */
@keyframes blobMove {
  0% {
    transform: translate(0, 0) scale(1);
  }
  50% {
    transform: translate(-40px, 30px) scale(1.1);
  }
  100% {
    transform: translate(30px, -20px) scale(0.9);
  }
}

/* ===== GRILLE DE PROJETS TYPE "PINTEREST" ===== */

/* Conteneur principal */
.projects-grid {
  column-count: 3; /* 3 colonnes par défaut */
  column-gap: 2rem; /* espace entre les colonnes */
  max-width: 1200px;
  margin: 0 auto;
}

/* Adaptations responsives */
@media (max-width: 992px) {
  .projects-grid {
    column-count: 2;
  }
}

@media (max-width: 600px) {
  .projects-grid {
    column-count: 1;
  }
}

/* Cartes individuelles */
.project-card {
  border-left: 5px solid #007acc; /* bordure bleue à gauche */
  padding: 1.5rem;
  background-color: #fff;
  margin-bottom: 2rem;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
  border-radius: 0.75rem;
  transition: transform 0.3s ease;
  break-inside: avoid; /* empêche de casser les cartes dans la colonne */
}

/* Effet au survol */
.project-card:hover {
  transform: translateY(-5px);
}

/* Titres dans les cartes */
.project-card h3 {
  font-size: 1.3rem;
  margin-bottom: 0.5rem;
}

/* Description dans les cartes */
.project-card p {
  font-size: 0.95rem;
  color: #444;
  text-align: justify;
  margin-bottom: 1rem;
}

/* Bouton dans les cartes */
.project-card .btn {
  background-color: transparent;
  border: 1px solid #007acc;
  color: #007acc;
  padding: 0.5rem 1rem;
  text-decoration: none;
  border-radius: 0.25rem;
  transition: all 0.3s ease;
  font-weight: bold;
}

/* Effet bouton au hover */
.project-card .btn:hover {
  background-color: #007acc;
  color: white;
}

/* Images dans les cartes */
.project-card img {
  width: 100%;
  height: auto;
  object-fit: cover;
  border-radius: 0.5rem;
  display: block;
}

/* ===== GALERIE DE PHOTOS ===== */
.photo-gallery {
  display: flex;
  flex-wrap: wrap;
  gap: 2rem;
  justify-content: center;
  margin-top: 2rem;
  padding: 2rem;
  position: relative;
}

/* ===== CARTE FLIPPABLE (FRONT/BACK) ===== */
.flip-card {
  background-color: transparent;
  width: 200px;
  height: 260px;
  perspective: 1000px; /* 👈 pour l'effet 3D */
  transition: transform 0.3s ease;
}

/* PETITE ROTATION ALÉATOIRE DE BASE */
.flip-card:nth-child(1) {
  transform: rotate(-7deg);
}
.flip-card:nth-child(2) {
  transform: rotate(4deg);
  margin-top: 10px;
}
.flip-card:nth-child(3) {
  transform: rotate(-3deg);
}
.flip-card:nth-child(4) {
  transform: rotate(6deg);
  margin-top: 20px;
}

/* AU SURVOL : REMET DROIT ET ZOOM UN PEU */
.flip-card:hover {
  transform: rotate(0deg) scale(1.05);
  z-index: 10;
}

/* INTÉRIEUR DE LA CARTE QUI "FLIP" */
.flip-card-inner {
  position: relative;
  width: 100%;
  height: 100%;
  transition: transform 0.3s;
  transform-style: preserve-3d; /* 👈 important pour le flip */
}

/* LE FLIP */
.flip-card:hover .flip-card-inner {
  transform: rotateY(180deg);
}

/* FACE AVANT ET FACE ARRIÈRE */
.flip-card-front,
.flip-card-back {
  position: absolute;
  width: 100%;
  height: 100%;
  backface-visibility: hidden;
  border-radius: 15px;
  overflow: hidden;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

/* IMAGES EN FRONT/BACK */
.flip-card-front img,
.flip-card-back img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* LA FACE ARRIÈRE APRES ROTATION */
.flip-card-back {
  transform: rotateY(180deg);
  position: relative;
}

/* PETIT TEXTE (DATE OU AUTRE) AU MILIEU */
.date-stamp {
  position: absolute;
  top: 40%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-family: 'IBM Plex Mono', monospace;
  font-size: 1rem;
  text-align: center;
  color: #444;
  padding: 0.4rem 0.8rem;
  backdrop-filter: blur(2px);
}

/* ===== STYLE TYPE "TERMINAL" POUR LES PROJETS ===== */
.terminal-projects {
  font-family: 'IBM Plex Mono', monospace;
  padding: 0;
  border-radius: 14px;
  overflow: hidden;
  margin: 2rem auto;
  transition: background-color 0.3s, color 0.3s;
}

/* Terminal clair */
[data-theme="light"] .terminal-projects {
  background-color: #f5f5f5;
  color: #111;
  box-shadow: 0 0 30px rgba(0, 0, 0, 0.1);
}

/* Terminal foncé */
[data-theme="dark"] .terminal-projects {
  background-color: #0e0e0e;
  color: #33ff33;
  box-shadow: none;
}

/* Enveloppe du terminal */
.terminal-wrapper {
  background-color: #1e1e1e;
  border-radius: 14px;
  overflow: hidden;
}

/* En mode clair */
[data-theme="light"] .terminal-wrapper {
  background-color: #f5f5f5;
}

/* Barre du haut (header) du terminal */
.terminal-topbar {
  background-color: #2e2e2e;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.4rem 1rem;
  font-size: 0.8rem;
  color: #ccc;
  font-family: 'IBM Plex Mono', monospace;
}

/* Barre du haut en thème clair */
[data-theme="light"] .terminal-topbar {
  background-color: #dcdcdc;
  color: #444;
}

/* Titre centré du terminal */
.terminal-title {
  flex: 1;
  text-align: center;
  font-weight: 500;
}

/* Boutons type Mac (rouge, jaune, vert) */
.traffic-buttons {
  display: flex;
  gap: 0.4rem;
}

.traffic-buttons .btn {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  display: inline-block;
}

.traffic-buttons .red {
  background-color: #ff5f56;
}
.traffic-buttons .yellow {
  background-color: #ffbd2e;
}
.traffic-buttons .green {
  background-color: #27c93f;
}

/* Contenu du terminal */
.terminal-body {
  padding: 1.5rem;
  font-size: 0.95rem;
}

/* Header interne (optionnel) */
.terminal-header {
  font-weight: bold;
  margin-bottom: 1rem;
  padding-left: 0.5rem; /* Petit décalage visuel */
}

/* ===== STYLE DE PROMPT, PATH, ET COMMANDES TERMINAL ===== */

/* Le signe de prompt ($) */
.prompt {
  color: #33ff33; /* Vert fluo en mode dark */
}

/* En mode clair */
[data-theme="light"] .prompt {
  color: #008000; /* Vert plus classique */
}

/* Le chemin (genre ~/projects) */
.path {
  color: #409eff; /* Bleu lumineux */
}

/* En mode clair */
[data-theme="light"] .path {
  color: #0077cc; /* Bleu plus classique */
}

/* Les commandes tapées */
.cmd {
  font-weight: bold;
  font-size: 1.1rem;
  margin-bottom: 0.2rem;
  display: block;
}

/* Bloc de détails après la commande */
.details {
  padding-left: 1.5rem; /* indentation */
  line-height: 1.5;
}

/* Texte important dans les détails */
.details em {
  font-style: normal;
  opacity: 0.85;
}

/* Couleur en dark */
[data-theme="dark"] .details em {
  color: #ff5555; /* Rouge doux */
}

/* Couleur en light */
[data-theme="light"] .details em {
  color: #444;
}

/* Liens dans les détails */
.details a {
  text-decoration: none;
}

/* Couleur lien en dark */
[data-theme="dark"] .details a {
  color: #00aaff;
}

/* Couleur lien en light */
[data-theme="light"] .details a {
  color: #0077cc;
}

/* Hover sur lien */
.details a:hover {
  text-decoration: underline;
}

/* ===== ANIMATION DU TERMINAL ===== */

/* Texte qui s'affiche comme dans un terminal */
.animated-terminal {
  white-space: nowrap; /* Pas de retour à la ligne */
  overflow: hidden; /* Coupe ce qui déborde */
  font-size: 1rem; /* Taille du texte */
}

/* Curseur clignotant */
.cursor {
  display: inline-block;
  margin-left: 2px;
  animation: blink 1s infinite; /* Clignote toutes les secondes */
  color: #33ff33; /* Vert fluo pour dark mode */
}

/* Animation du curseur */
@keyframes blink {
  0%, 50%, 100% { opacity: 1; }
  25%, 75% { opacity: 0; }
}

/* ===== DARK MODE : Texte clair pour les blocs importants ===== */

/* Description "about" dans la section à propos */
[data-theme="dark"] .about-text {
  color: #ccc; /* gris clair lisible sur fond sombre */
}

/* Mots en gras dans cette section */
[data-theme="dark"] .about-text strong {
  color: #fff; /* blanc éclatant */
}

/* Titre principal dans la section user */
[data-theme="dark"] .user-details h1 {
  color: #fff; /* lisible même sur fond sombre */
}

/* ===== OVERLAY de la modale ===== */
.modal-overlay {
  display: none;
  position: fixed;
  z-index: 9999;
  top: 0; left: 0;
  width: 100vw;
  height: 100vh;
  background-color: rgba(0,0,0,0.6); /* fond noir semi-transparent */
  justify-content: center;
  align-items: center;
}

/* ===== CONTENU de la modale ===== */
.modal-content {
  background-color: #1e1e1e;
  color: #ffffff !important;
  padding: 2rem;
  border-radius: 1rem;
  max-width: 90%;
  width: 600px;
  box-shadow: 0 0 30px rgba(0, 0, 0, 0.3);
  position: relative;
  font-family: 'IBM Plex Mono', monospace;
  max-height: 80vh;
  overflow-y: auto;
  padding-right: 1rem;
}

/* Adaptation en dark mode */
[data-theme="dark"] .modal-content {
  background-color: #1e1e1e;
  color: #f0f0f0;
}

/* Close button */
.close-modal-btn {
  position: absolute;
  top: 1rem;
  right: 1.2rem;
  font-size: 1.5rem;
  font-weight: bold;
  cursor: pointer;
}

/* Contenu spécifique : liens, titres, etc. */
.modal-content a,
.modal-content strong,
.modal-content li,
.modal-content h4 {
  color: #ffffff !important;
}

.modal-gallery {
  display: flex;
  overflow-x: auto;
  gap: 1rem;
  margin-bottom: 1.5rem;
  padding-bottom: 0.5rem;
  scroll-snap-type: x mandatory;
}

.modal-gallery img {
  height: 140px;
  border-radius: 10px;
  scroll-snap-align: start;
  flex-shrink: 0;
  transition: transform 0.3s;
}

.modal-gallery img:hover {
  transform: scale(1.05);
  cursor: pointer;
}

.modal-video {
  margin-top: 2rem;
}

.modal-video h5 {
  font-size: 1rem;
  margin-bottom: 0.8rem;
  color: #fff;
}

.modal-video video {
  width: 100%;
  height: auto;
  border-radius: 10px;
  outline: none;
}

@media (max-width: 549px) {
  .header .site-title {
    font-size: 2rem;
  }

  .header .site-description {
    font-size: 1.2rem;
  }

  .user {
    flex-direction: column;
    font-size: 40px;
  }

  .tech-card {
    max-width: 100%;
    padding: 1rem;
  }

  .project-card {
    padding: 1rem;
  }

  .photo-gallery {
    gap: 1rem;
    padding: 1rem;
  }

  .flip-card {
    width: 100%;
    height: auto;
  }
}

@media (max-width: 768px) {
  .tech-card {
    max-width: 100%;
    flex: 1 1 100%;
  }
}

.burger {
  display: none;
  background: none;
  border: none;
  font-size: 2rem;
  color: var(--text-color);
  cursor: pointer;
}

@media (max-width: 768px) {
  .burger {
    display: block;
  }

  .nav-links {
    display: none;
    flex-direction: column;
    width: 100%;
    margin-top: 1rem;
  }

  .nav-links.active {
    display: flex;
  }
}

.theme-toggle button {
  background: none;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
  color: var(--text-color);
  padding: 0.3em;
  border-radius: 50%;
  transition: background 0.3s;
}

.theme-toggle button:hover {
  background: rgba(0, 0, 0, 0.1);
}

/* ======== FOOTER ======== */
.footer {
  background: linear-gradient(135deg, #235c80 50%, #000000 100%);
  padding: 10px 0;
  margin-top: 100px;
  text-align: center;
  color: #fff;
}

.footer .love {
  color: red
}

.footer a {
  text-decoration: none;
  margin: 0;
  color: #fff
}