/* =================== Variables (couleurs) =================== */
:root {
  --main-bg:       #0F0F0F; /* Fond global */
  --section-bg-1:  #141414;
  --section-bg-2:  #1A1A1A;
  --section-bg-3:  #202020;
  --accent-color:  #00d1ff;  /* Bleu “cyber” */
  --text-color:    #ffffff;
  --subtext-color: #aaaaaa;
}

/* =================== Base =================== */
html, body {
  margin: 0;
  padding: 0;
  background: var(--main-bg);
  color: var(--text-color);
  font-family: 'Roboto', sans-serif;
  font-size: 18px;
  line-height: 1.8;
  scroll-behavior: smooth;
  overflow-x: hidden;
}

/* Footer */
footer {
  background-color: var(--section-bg-2);
  color: var(--text-color);
  text-align: center;
  padding: 10px 20px;
  font-size: 0.9em;
  box-shadow: 0px -2px 5px rgba(0, 0, 0, 0.3);
}

/* Titres */
h1, h2, h3 {
  margin-top: 0;
  color: var(--accent-color);
}
h1 {
  font-size: 5em;
}
h2 {
  margin-bottom: 20px;
  font-size: 2.4em;
  text-align: center;
}
h3 {
  margin-bottom: 10px;
  font-size: 1.6em;
}

/* =================== Nav =================== */
nav {
  background: var(--main-bg);
  padding: 10px 0;
  position: fixed;
  width: 100%;
  top: 0;
  z-index: 1000;
  display: flex;
  justify-content: center;
  align-items: center;
  box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

/* Style normal du menu */
#nav-links {
  list-style: none;
  display: flex;
  justify-content: center;
  align-items: center;
  margin: 0;
  padding: 0;
}

#nav-links li {
  margin: 0 20px;
}

#nav-links li a {
  text-decoration: none;
  color: var(--text-color);
  font-size: 1.2em;
  font-weight: 500;
}

#nav-links li a:hover {
  color: var(--accent-color);
}

/* =================== Menu hamburger =================== */
.hamburger {
  display: none; /* Caché sur PC */
  cursor: pointer;
  position: absolute;
  top: 15px;
  right: 20px;
  z-index: 1001;
}

.hamburger span {
  display: block;
  width: 30px;
  height: 4px;
  background: var(--accent-color); /* Couleur du menu */
  margin: 6px auto;
  transition: 0.3s;
}

/* =================== Menu responsive =================== */
@media (max-width: 768px) {
  .hamburger {
      display: block; /* Affiche le hamburger sur mobile */
  }

  #nav-links {
      display: none;
      flex-direction: column;
      position: absolute;
      top: 60px;
      left: 0;
      width: 100%;
      background: var(--main-bg);
      box-shadow: 0px 4px 6px rgba(0, 0, 0, 0.1);
      text-align: center;
      padding: 10px 0;
      transition: all 0.3s ease-in-out;
  }

  /* Quand le menu est actif (ouvert) */
  #nav-links.active {
      display: flex;
  }

  /* Style des liens */
  #nav-links li {
      margin: 10px;
  }

  #nav-links a {
      color: var(--text-color);
      font-size: 1.2em;
      text-decoration: none;
      padding: 10px;
      display: block;
  }

  #nav-links a:hover {
      color: var(--accent-color);
  }
}


/* =================== Header =================== */
header {
  height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  background: var(--main-bg);
  text-align: center;
  position: relative;
}
header h1 {
  margin: 0;
  font-weight: 700;
  white-space: nowrap;
  border-right: 2px solid var(--accent-color);
  animation: blink 0.7s step-end infinite;
}
@keyframes blink {
  from { border-color: transparent; }
  to   { border-color: var(--accent-color); }
}
header p {
  font-size: 1.5em;
  margin-top: 20px;
  color: var(--subtext-color);
}

/* Flèches animées */
.arrows {
  position: absolute;
  bottom: 50px;
  width: 100%;
  pointer-events: none;
}
.arrow {
  width: 30px;
  height: 30px;
  border: solid var(--accent-color);
  border-width: 0 4px 4px 0;
  transform: rotate(45deg);
  animation: bounce 1.5s infinite;
  pointer-events: none;
}
#arrow-left {
  position: absolute;
  left: 15%;
  transform: translateX(-50%);
}
#arrow-right {
  position: absolute;
  left: 85%;
  transform: translateX(-50%);
  animation-delay: 0.5s;
}
@keyframes bounce {
  0%,20%,50%,80%,100% { transform: translateY(0) rotate(45deg); }
  40% { transform: translateY(10px) rotate(45deg); }
  60% { transform: translateY(5px) rotate(45deg); }
}

/* =================== Sections =================== */
#presentation {
  background: var(--section-bg-1);
  padding: 80px 20px;
  text-align: center;
}
.skill-text {
  max-width: 900px;
  margin: 0 auto;
  color: var(--subtext-color);
  text-align: justify;
  line-height: 1.6;
  hyphens: auto; /* Permet de couper proprement les mots pour éviter les gros espaces */
}

/* Désactive le texte justifié sur mobile pour éviter des espaces irréguliers */
@media (max-width: 768px) {
  .skill-text {
    text-align: left;
  }
}
#projects {
  background: var(--section-bg-2);
  padding: 80px 20px;
  text-align: center;
}
#speciality {
  background: var(--section-bg-3);
  padding: 80px 20px;
  text-align: center;
  color: var(--text-color);
}
#contact {
  background: var(--section-bg-1);
  padding: 80px 20px;
  text-align: center;
}

/* =================== Projets grid =================== */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
  gap: 20px;
  max-width: 1200px;
  margin: 40px auto 0 auto; /* Centre la grille et marge top de 40px */
  justify-content: center;
}

/* Cartes overlay */
.project-card.overlay-card {
  position: relative;
  width: 100%;      /* La carte occupe la colonne */
  height: 250px;    /* Hauteur fixe => 250px */
  background-size: cover;
  background-position: center;
  border: 2px solid var(--accent-color);
  border-radius: 10px;
  overflow: hidden;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.project-card.overlay-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 16px rgba(0,0,0,0.3);
}

/* Overlay sombre plus haut */
.project-card.overlay-card .overlay {
  position: absolute;
  bottom: 0; 
  left: 0;
  width: 100%;
  height: 100%;
  /* Un dégradé qui couvre ~50% du bas : 
     => 0.8 d'opacité à 50% de la hauteur 
  */
  background: linear-gradient(
    to top,
    rgba(0, 0, 0, 0.8) 50%, 
    rgba(0, 0, 0, 0) 100%
  );
}

/* Contenu textuel encore plus bas */
.project-card.overlay-card .card-content {
  position: absolute;
  bottom: 10px; /* descendu à 10px du bord */
  left: 20px;
  right: 20px;
  color: #ffffff;
  text-align: center; /* On peut centrer si on veut le texte centré */
}

.project-card.overlay-card .card-content h3 {
  margin: 0 0 10px;
  color: var(--accent-color);
  font-size: 1.4em;
}

.project-card.overlay-card .card-content p {
  margin: 0;
  font-size: 1.1em;
}

/* =================== Carrousel Swiper & Contact list etc. =================== */
/* ... Reste du code Swiper, contact-list, media queries identique ... */

/* Swiper container, etc. */
.swiper-container {
  position: relative;
  width: 100%;
  max-width: 800px;
  height: 350px;
  margin: 20px auto;
  overflow: hidden;
}

.swiper-slide img {
  width: auto;
  max-height: 100%;
  object-fit: contain;
  border-radius: 10px;
}

.swiper-button-next,
.swiper-button-prev {
  color: var(--text-color);
  background: none;
  border: none;
  font-size: 2rem;
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 10;
  cursor: pointer;
}
.swiper-button-next {
  right: 10px;
}
.swiper-button-prev {
  left: 10px;
}
.swiper-button-next:hover,
.swiper-button-prev:hover {
  color: var(--accent-color);
}

/* Pagination (petits points) */
.swiper-pagination-bullet {
  background: #ccc;
  opacity: 0.7;
}
.swiper-pagination-bullet-active {
  background: var(--accent-color);
  opacity: 1;
}


/* Contact list */
.contact-list {
  list-style: none;
  padding: 0;
  margin: 20px auto;
  max-width: 600px;
  font-size: 1.2em;
  text-align: left;
}
.contact-list li {
  margin-bottom: 15px;
}
.contact-list strong {
  color: var(--accent-color);
}
.contact-list a {
  color: var(--text-color);
  text-decoration: none;
}
.contact-list a:hover {
  color: var(--accent-color);
  text-decoration: underline;
}

/* =================== MEDIA QUERIES =================== */
@media (max-width: 900px) {
  body { font-size: 17px; }
  h1 { font-size: 4.2em; }
  h2 { font-size: 2.2em; }
  h3 { font-size: 1.4em; }
  .projects-grid {
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  }
  .project-card.overlay-card { height: 220px; }
}

@media (max-width: 600px) {
  body { font-size: 16px; }
  h1 { font-size: 3em; }
  h2 { font-size: 1.8em; }
  h3 { font-size: 1.2em; }
  .projects-grid {
    grid-template-columns: 1fr; /* 1 seule carte par ligne */
  }
  .project-card.overlay-card { height: 200px; }
}

/* =================== Carrousel Flickity Responsive =================== */
.gallery {
  background: #1f1f1f;
  max-width: 800px;
  margin: 0 auto; /* Centre le carrousel */
  overflow: hidden;
}

/* Chaque élément du carrousel */
.gallery-cell {
  width: 100%; /* Occupe toute la largeur du carrousel */
  display: flex;
  justify-content: center;
  align-items: center;
  overflow: hidden;
}

/* Images du carrousel */
.gallery-cell img {
  width: auto;
  max-height: 400px; /* Ajuste la hauteur max */
  object-fit: contain;
  border-radius: 10px;
  max-width: 100%; /* Assure l’adaptabilité */
}

/* =================== Flickity Responsive =================== */
@media (max-width: 1024px) {
  .gallery {
    max-width: 600px; /* Réduit la taille sur tablette */
  }
  .gallery-cell img {
    max-height: 350px;
  }
}

@media (max-width: 768px) {
  .gallery {
    max-width: 90%; /* Utilise 90% de l’écran sur mobile */
  }
  .gallery-cell img {
    max-height: 300px;
  }
}

@media (max-width: 480px) {
  .gallery {
    max-width: 100%; /* Pleine largeur */
  }
  .gallery-cell img {
    max-height: 250px; /* Encore plus petit sur petits écrans */
  }
}


/* Retire le fond gris autour des flèches Flickity */
.flickity-button {
  background: transparent !important;
  border: none !important;
}

/* Au survol, rien non plus */
.flickity-button:hover {
  background: transparent !important;
}

/* Couleur de l’icône */
.flickity-button svg {
  fill: var(--accent-color); /* le bleu “cyber” */
}

/* Changer la taille du bouton */
.flickity-button.flickity-prev-next-button {
  width: 40px;
  height: 40px;
  opacity: 0.8;
}
.flickity-button.flickity-prev-next-button:hover {
  opacity: 1;
}

/* Petits points de pagination */
/* Sélecteur générique */
.flickity-page-dots .dot {
  background: var(--accent-color);
  opacity: 0.5;
  border-radius: 50%;
  width: 10px;
  height: 10px;
  margin: 0 5px;
  transition: opacity 0.3s ease;
}
.my-flickity .flickity-page-dots .dot {
  background: var(--accent-color);
  opacity: 0.5;
}
.flickity-page-dots .dot.is-selected {
  opacity: 1;
}

.contact-icons {
  display: flex;
  justify-content: center;  /* centre horizontalement */
  gap: 30px;                /* espace entre icônes */
  margin-top: 30px;         /* espace sous le paragraphe */
}

.contact-icon {
  color: var(--text-color);
  font-size: 2rem;          /* agrandir l’icône */
  text-decoration: none;    /* pas de soulignement */
  transition: color 0.3s ease;
}

.contact-icon:hover {
  color: var(--accent-color);
}

/* Optionnel : Style quand on clique ou focus */
.contact-icon:focus {
  outline: 2px solid var(--accent-color);
  outline-offset: 4px;
}

/* =================== Bouton Google Translate =================== */
/* =================== Bouton Google Translate (Compact) =================== */
.translate-button {
  position: fixed;
  right: 10px; /* Plus proche du bord */
  top: 50%;
  transform: translateY(-50%);
  background-color: var(--section-bg-2); /* Fond cohérent avec le design */
  border: none;
  border-radius: 50px; /* Arrondi pour un effet bouton discret */
  padding: 6px 10px;
  display: flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  transition: background 0.3s ease-in-out, transform 0.2s;
  text-decoration: none;
  color: var(--text-color);
  font-weight: bold;
  font-size: 14px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

.translate-button:hover {
  background-color: var(--accent-color);
  transform: translateY(-50%) scale(1.08);
}

/* Icône Google Translate */
.translate-button img {
  width: 30px; /* Réduction de la taille de l'icône */
  height: 30px;
  vertical-align: middle;
}

/* =================== Responsive =================== */
@media (max-width: 768px) {
  .translate-button {
    font-size: 12px; /* Texte plus petit */
    padding: 4px 8px; /* Réduction du padding */
    gap: 4px;
    right: 5px; /* Encore plus proche du bord sur mobile */
  }
  
  .translate-button img {
    width: 18px;
    height: 18px;
  }
}

/* SECTION globale */
#skills {
  background: #1f1f1f;      /* Fond sombre */
  padding: 60px 20px;
  text-align: center;       /* Centre le titre et l’intro */
}

#skills h2 {
  font-size: 2.4em;
  color: #00d1ff;           /* Vert “néon” */
  margin-bottom: 20px;
}

/* Petit texte explicatif */
.skills-intro {
  max-width: 800px;
  margin: 0 auto 40px;
  color: #cccccc;
  font-size: 1.1em;
  line-height: 1.6;
}

/* Conteneur des cartes */
.skills-grid {
  display: flex;
  flex-wrap: wrap;          /* Passe à la ligne si trop large */
  gap: 30px;                /* Espace horizontal/vertical */
  justify-content: center;  /* Centre les cartes */
}

/* Chaque carte de compétence */
.skill-card {
  background: #2b2b2b;
  width: 250px;             /* Largeur fixe ou adaptative */
  border-radius: 15px;
  padding: 20px;
  box-shadow: 0 4px 8px rgba(0,0,0,0.2);
  text-align: left;         /* Alignement du texte dans la carte */
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  /* Optionnel: petit effet au survol */
}
.skill-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 16px rgba(0,0,0,0.3);
}

.skill-card h3 {
  color: #00d1ff;
  margin: 0 0 10px;
  font-size: 1.3em;
}

/* Liste de points clés */
.skill-card ul {
  list-style: disc;
  margin: 0;
  padding-left: 20px;
  color: #ffffff;
  font-size: 1em;
  line-height: 1.8;
  padding-left: 20px; /* Espace à gauche pour mieux aligner */
}

.skill-card ul li {
  position: relative;
  margin-bottom: 10px;
  font-size: 18px;
  list-style: none; /* Supprime les puces par défaut */
}

.skill-card ul li::before {
  content: "➭"; /* Remplace par un point personnalisé */
  color: var(--accent-color); /* Utilise la couleur bleue du site */
  font-weight: bold;
  position: absolute;
  left: -15px; /* Ajuste la position pour rester aligné */
}

/* Responsive : sur mobile (<600px), 100% large */
@media (max-width: 600px) {
  .skill-card {
    width: 100%;
  }
}


