/* === Base === */
body {
  margin: 0;
  font-family: 'Segoe UI', sans-serif;
  background: #121212;
  color: #f1f1f1;
}

/* === Accueil === */
.accueil {
  display: flex;
  justify-content: center;
  align-items: center;
  height: 100vh;
  background: linear-gradient(135deg, #1f1c2c, #928dab);
}

.welcome-container {
  text-align: center;
  max-width: 600px;
}

.cta-button {
  display: inline-block;
  margin-top: 2rem;
  padding: 1rem 2rem;
  background-color: #00bcd4;
  color: white;
  text-decoration: none;
  border-radius: 10px;
  transition: background 0.3s;
}

.cta-button:hover {
  background-color: #0097a7;
}

/* === Vidéo de fond === */
#bg-video {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  object-fit: cover;
  z-index: -1;
  filter: brightness(0.6) contrast(1.2) saturate(1.1);
  image-rendering: -webkit-optimize-contrast;
  image-rendering: crisp-edges;
  -webkit-backface-visibility: hidden;
  backface-visibility: hidden;
  transform: translateZ(0);
  will-change: transform;
}

/* === Navbar === */
.navbar {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 1rem 2rem;
  position: fixed;
  width: 100%;
  top: 0;
  z-index: 1000;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(10px);
}

.logo {
  font-size: 1.5rem;
  font-weight: bold;
  color: #00bcd4;
  text-decoration: none;
  transition: transform 0.3s ease;
}

.logo:hover {
  transform: scale(1.1);
}

.nav-links a {
  margin-left: 1.5rem;
  color: #fff;
  text-decoration: none;
  transition: color 0.3s;
}

.nav-links a:hover {
  color: #00eaff;
}

/* === Catégories === */
.categories-page {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding-top: 5rem;
}

.overlay-content {
  z-index: 1;
  text-align: center;
  color: white;
}

.animated-title {
  color: white;
  font-size: 2rem;
  text-align: center;
  margin-bottom: 3rem;
  position: relative;
}

.animated-title .dot {
  display: inline-block;
  width: 12px;
  height: 12px;
  background: #00bcd4;
  border-radius: 50%;
  margin-right: 10px;
  animation: bounce 1s infinite;
  vertical-align: middle;
}

@keyframes bounce {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}

.categories-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 2rem;
  max-width: 800px;
  margin: auto;
}

.category-card {
  background: rgba(255, 255, 255, 0.05);
  padding: 1.5rem;
  border-radius: 15px;
  text-decoration: none;
  color: white;
  font-weight: 500;
  font-size: 1.1rem;
  transition: all 0.4s ease;
  backdrop-filter: blur(5px);
  position: relative;
  overflow: hidden;
  animation: slide-up 0.8s ease forwards;
  opacity: 0;
}

.category-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(120deg, transparent, rgba(0,188,212,0.3), transparent);
  transition: all 0.6s ease;
}

.category-card:hover::before {
  left: 100%;
}

.category-card:hover {
  background: rgba(0, 188, 212, 0.2);
  transform: translateY(-8px) scale(1.05);
  color: #00eaff;
}

@keyframes slide-up {
  0% {
    transform: translateY(30px);
    opacity: 0;
  }
  100% {
    transform: translateY(0);
    opacity: 1;
  }
}

/* === Pages internes === */
.page-content {
  padding: 3rem 2rem;
  max-width: 1000px;
  margin: auto;
}

.project-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2rem;
  margin-top: 2rem;
}

.project-card {
  background: #1e1e1e;
  padding: 1.5rem;
  border-radius: 10px;
  box-shadow: 0 5px 15px rgba(0,0,0,0.2);
}

.skills-list {
  list-style: none;
  padding: 0;
  margin-top: 1rem;
}

.skills-list li {
  background: rgba(255, 255, 255, 0.05);
  margin-bottom: 0.8rem;
  padding: 1rem;
  border-radius: 8px;
}

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

.skills-grid span {
  background: rgba(255, 255, 255, 0.08);
  padding: 0.8rem 1.2rem;
  border-radius: 10px;
  font-weight: 500;
}

form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  max-width: 500px;
  margin: 2rem auto;
}

input, textarea {
  padding: 1rem;
  border: none;
  border-radius: 8px;
  background: #2b2b2b;
  color: white;
}

button {
  padding: 1rem;
  background: #00bcd4;
  border: none;
  border-radius: 8px;
  color: white;
  cursor: pointer;
  transition: background 0.3s;
}

button:hover {
  background: #0097a7;
}

/* === À propos === */
.about-page {
  background: linear-gradient(135deg, #0f0f0f, #1f1f1f);
  color: white;
  padding: 5rem 2rem;
  font-family: 'Inter', sans-serif;
  line-height: 1.8;
}

.about-page section {
  max-width: 900px;
  margin: auto;
  margin-bottom: 4rem;
  text-align: justify;
}

.about-page h1, .about-page h2 {
  animation: fade-in-top 1s ease-out;
  font-weight: 700;
  margin-bottom: 1.5rem;
  position: relative;
}

.about-page h2::after {
  content: "";
  display: block;
  width: 60px;
  height: 3px;
  background: #00bcd4;
  margin-top: 10px;
}

/* === Animations === */
.animate {
  opacity: 0;
  transform: translateY(30px);
  animation: fade-in 0.8s ease-out forwards;
}

.animate.fade-in-up { animation-delay: 0.3s; }

@keyframes fade-in {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fade-in-top {
  0% {
    transform: translateY(-20px);
    opacity: 0;
  }
  100% {
    transform: translateY(0);
    opacity: 1;
  }
}

.typing-text {
  overflow: hidden;
  white-space: nowrap;
  border-right: 2px solid #00bcd4;
  width: fit-content;
  margin: 1rem auto 2rem;
  font-size: 1.3rem;
  animation: typing 3s steps(30, end), blink 0.7s infinite;
}

@keyframes typing {
  from { width: 0ch; }
  to { width: 40ch; } /* adapte à la longueur max de tes phrases */
}

@keyframes blink {
  50% { border-color: transparent; }
}

/* === Confirmation popup === */
.confirmation-popup {
  position: fixed;
  bottom: 30px;
  left: 50%;
  transform: translateX(-50%);
  background-color: #00bcd4;
  color: white;
  padding: 1rem 2rem;
  border-radius: 8px;
  box-shadow: 0 0 12px rgba(0,0,0,0.4);
  font-weight: bold;
  z-index: 999;
  animation: slideInFade 0.4s ease forwards;
}

/* Animation de glissement + fade */
@keyframes slideInFade {
  from {
    opacity: 0;
    transform: translate(-50%, 20px);
  }
  to {
    opacity: 1;
    transform: translate(-50%, 0);
  }
}

.site-footer {
  background-color: #0f0f0f;
  color: #ccc;
  padding: 25px 20px;
  font-family: 'Inter', sans-serif;
  border-top: 1px solid #1e1e1e;
  font-size: 14px;
}

.footer-grid {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 20px;
}

.footer-col {
  flex: 1 1 250px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.footer-col.left {
  align-items: flex-start;
  text-align: left;
}

.footer-col.right {
  align-items: flex-end;
  text-align: right;
}

.footer-col h4 {
  font-size: 15px;
  margin-bottom: 10px;
  color: #eee;
}

.footer-buttons {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.footer-btn {
  background-color: #1a1a1a;
  color: #00ffee;
  padding: 6px 14px;
  border: 1px solid #00ffee;
  border-radius: 5px;
  text-decoration: none;
  font-weight: 500;
  transition: all 0.3s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font-size: 13px;
}

.footer-btn:hover {
  background-color: #00ffee;
  color: #0f0f0f;
  border-color: #00ffee;
}

.footer-btn i {
  font-size: 14px;
}

.competence-table {
  margin: 20px 0 40px 0;
  overflow-x: auto;
}

.competence-table table {
  width: 100%;
  table-layout: fixed;
  border-collapse: collapse;
  margin-top: 30px;
  font-size: 14px;
  background-color: #111;
  color: #ddd;
}

.competence-table th, .competence-table td {
  border: 1px solid #333;
  padding: 12px;
  vertical-align: middle;
  text-align: center;
}

.competence-table th:first-child,
.competence-table td:first-child {
  text-align: left;
  width: 35%;
}

/* Colonnes de compétences avec largeur fixe et alignement parfait */
.competence-table th:not(:first-child),
.competence-table td:not(:first-child) {
  width: 10.83%;
  min-width: 80px;
  text-align: center !important;
  padding: 12px 5px;
}

.competence-table th {
  background-color: #222;
  color: #00ffee;
  text-align: center;
  font-weight: bold;
  font-size: 13px;
}

.competence-table ul {
  margin: 5px 0 0 15px;
  padding-left: 10px;
}

.case {
  display: inline-block;
  padding: 8px;
  border-radius: 6px;
  text-align: center;
  font-weight: bold;
  cursor: default;
  width: 20px;
  height: 20px;
  line-height: 20px;
}

.case.active {
  background-color: #00ffee;
  color: #000;
  cursor: pointer;
  transition: background 0.3s;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.case.active:hover {
  background-color: #00bcd4;
  transform: scale(1.1);
}

.case.inactive {
  background-color: #333;
  color: #777;
  pointer-events: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}