:root {
  --primary: #ffffff;
  --secondary: #000000;
  --accent: #333333;
  --text: #f2f2f2;
  --theme-transition: color 0.3s ease, background-color 0.3s ease,
    border-color 0.3s ease;
  --color-accent-green: #39ff14;
}

body.light-mode {
  --primary: #000000;
  --secondary: #ffffff;
  --accent: #f8f8f8;
  --text: #333333;
}

body.light-mode .nav-container {
  mix-blend-mode: normal;
}

body.light-mode .footer {
  border-top-color: rgba(0, 0, 0, 0.1);
}

.cursor {
  mix-blend-mode: difference;
}

body.light-mode .cursor {
  mix-blend-mode: normal;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: "Space Grotesk", sans-serif;
  background-color: var(--secondary);
  color: var(--primary);
  overflow-x: hidden;
}

.nav-right-group {
  display: flex;
  align-items: center;
  gap: 2rem;
}

.theme-btn {
  background: none;
  border: none;
  color: var(--primary);
  font-size: 1.2rem;
  cursor: pointer;
  padding: 0.5rem;
  position: relative;
  transition: transform 0.3s ease;
  z-index: 102;
}

.theme-btn:hover {
  transform: scale(1.2) rotate(15deg);
}

.loader {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: var(--secondary);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 9999;
  animation: fadeOutLoader 0.5s forwards 3.5s;
}

.loader-text {
  font-size: 1.5rem;
  font-weight: 600;
  overflow: hidden;
}

.loader-text span {
  display: inline-block;
  transform: translateY(100%);
  animation: revealText 2s forwards;
}

@keyframes revealText {
  to {
    transform: translateY(0);
  }
}

header {
  height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  position: relative;
  overflow: hidden;
}

@keyframes fadeOutLoader {
  to {
    opacity: 0;
    visibility: hidden;
  }
}

body,
.btn,
.contact-form input,
.contact-form textarea,
.social-icon,
.skill-tag,
.filter-btn,
.language-switcher button {
  transition: var(--theme-transition);
}

header,
section {
  transition: var(--theme-transition);
}

.nav-container > .nav-links {
  display: flex;
  justify-content: flex-end;
  gap: 2rem;
}

.language-switcher {
  display: flex;
  gap: 0.5rem;
}

.nav-container {
  position: fixed;
  top: 0;
  width: 100%;
  padding: 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  z-index: 100;
  opacity: 0;
  animation: fadeIn 1s forwards 3.5s;
  transition: padding 0.3s ease, background-color 0.3s ease;
}

.logo {
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: 2px;
  transition: var(--transition);
}

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

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

.nav-links a {
  color: var(--primary);
  text-decoration: none;
  font-size: 1rem;
  position: relative;
  padding: 0.5rem 0;
  transition: var(--transition);
}

.nav-links a::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background-color: var(--primary);
  transition: var(--transition);
}

.nav-links a:hover::after {
  width: 100%;
}

.hero {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 0 2rem;
  z-index: 10;
}

.hero .btn {
  opacity: 0;
  animation: fadeIn 1s forwards 4.7s;
}

.hero-title {
  font-size: 7vw;
  font-weight: 700;
  margin-bottom: 1rem;
  overflow: hidden;
  line-height: 1.1;
}

.hero-title span {
  display: inline-block;
  transform: translateY(100%);
  animation: revealTitle 1s forwards 3.7s;
}

@keyframes revealTitle {
  to {
    transform: translateY(0);
  }
}

.hero-subtitle {
  font-size: 1.5rem;
  font-weight: 400;
  margin-bottom: 2rem;
  opacity: 0;
  animation: fadeIn 1s forwards 4.2s;
}

@keyframes fadeIn {
  to {
    opacity: 1;
  }
}

.scroll-down {
  position: absolute;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  font-size: 1.2rem;
  opacity: 0;
  animation: fadeIn 1s forwards 4.7s, bounce 2s infinite 4.7s;
}

@keyframes bounce {
  0%,
  20%,
  50%,
  80%,
  100% {
    transform: translateY(0) translateX(-50%);
  }
  40% {
    transform: translateY(-30px) translateX(-50%);
  }
  60% {
    transform: translateY(-15px) translateX(-50%);
  }
}

.btn {
  display: inline-block;
  padding: 0.8rem 1.8rem;
  font-size: 0.95rem;
  font-weight: 600;
  text-decoration: none;
  position: relative;
  transition: all 0.3s ease;
  border-radius: 8px;
  border: 2px solid transparent;
  background-color: var(--primary);
  color: var(--secondary);
}

.btn:hover {
  transform: scale(1.05) translateY(-2px);
}

.btn.btn-outline {
  background-color: transparent;
  color: var(--primary);
  border-color: var(--primary);
}

.btn.btn-outline:hover {
  background-color: var(--primary);
  color: var(--secondary);
}

.about-section {
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding: 8rem 5%;
  position: relative;
}

.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: center;
}

.about-image {
  position: relative;
  overflow: hidden;
  height: 70vh;
  max-height: 600px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.about-image-placeholder {
  width: 100%;
  height: 100%;
  position: relative;
  border-radius: 20px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.25);
  background-color: transparent;
  overflow: hidden;
  transition: transform 0.3s ease;
}

.about-image-placeholder:hover {
  transform: scale(1.02);
}

.about-image-placeholder img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.about-image-placeholder::after {
  content: "AM";
  position: absolute;
  top: 20px;
  left: 20px;
  transform: none;
  font-size: 2rem;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.8);
  background: rgba(0, 0, 0, 0.4);
  padding: 6px 12px;
  border-radius: 8px;
  backdrop-filter: blur(4px);
}

.about-content {
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.section-heading {
  font-size: 3rem;
  font-weight: 700;
  margin-bottom: 2rem;
  position: relative;
  text-align: center;
}

.section-heading::after {
  content: "";
  position: absolute;
  bottom: -10px;
  left: 50%;
  transform: translateX(-50%);
  width: 60px;
  height: 4px;
  background-color: var(--primary);
}

/* LA CORRECTION EST ICI */
.about-content .section-heading {
  text-align: left;
}
.about-content .section-heading::after {
  left: 0;
  transform: translateX(0);
}


.about-text {
  font-size: 1.1rem;
  line-height: 1.8;
  margin-bottom: 2rem;
}

.skills-container {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-top: 2rem;
}

.skill-tag {
  padding: 0.5rem 1.5rem;
  background-color: transparent;
  border: 1px solid var(--primary);
  opacity: 0.7;
  border-radius: 30px;
  font-size: 0.9rem;
  transition: var(--transition);
}

.skill-tag:hover {
  background-color: var(--primary);
  color: var(--secondary);
  transform: translateY(-5px);
  opacity: 1;
}

.counter-section {
  padding: 5rem 5%;
  background-color: var(--accent);
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 3rem;
  text-align: center;
}

.counter-item {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.counter-number {
  font-size: 3rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
}

.counter-text {
  font-size: 1.1rem;
}

.cursor {
  position: fixed;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background-color: var(--primary);
  pointer-events: none;
  transform: translate(-50%, -50%);
  z-index: 10000;
  mix-blend-mode: difference;
  transition: transform 0.1s ease-out, width 0.2s ease-out, height 0.2s ease-out;
}

.cursor-follower {
  position: fixed;
  width: 40px;
  height: 40px;
  border: 1px solid var(--primary);
  opacity: 0.5;
  border-radius: 50%;
  pointer-events: none;
  transform: translate(-50%, -50%);
  z-index: 9999;
  transition: transform 0.2s ease-out, width 0.3s ease-out, height 0.3s ease-out,
    border 0.3s ease-out, opacity 0.3s ease-out;
}

.reveal {
  position: relative;
  opacity: 0;
  transform: translateY(50px);
  transition: opacity 1s ease, transform 1s ease;
}

.reveal.active {
  opacity: 1;
  transform: translateY(0);
}

.bg-shape {
  position: absolute;
  border-radius: 50%;
  background: radial-gradient(
    circle,
    rgba(255, 255, 255, 0.05) 0%,
    rgba(0, 0, 0, 0) 70%
  );
  z-index: 1;
  animation: floatAnimation 25s infinite alternate ease-in-out;
}

.shape1 {
  width: 40vw;
  height: 40vw;
  top: -15vh;
  right: -10vw;
}

.shape2 {
  width: 35vw;
  height: 35vw;
  bottom: -10vh;
  left: -5vw;
  animation-delay: 5s;
}

@keyframes floatAnimation {
  0% {
    transform: translate(0, 0) scale(1);
  }
  50% {
    transform: translate(5%, 5%) scale(1.1);
  }
  100% {
    transform: translate(-5%, -5%) scale(0.9);
  }
}

.featured-projects-section {
  padding: 8rem 5%;
  background-color: var(--secondary);
}

.featured-projects-grid {
  display: flex;
  flex-direction: column;
  gap: 8rem;
}

.project-card {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: center;
}

.project-card:nth-child(even) .project-image {
  grid-column: 2 / 3;
  grid-row: 1 / 2;
}

.project-card:nth-child(even) .project-content {
  grid-column: 1 / 2;
  grid-row: 1 / 2;
  text-align: right;
}

.project-image {
  position: relative;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
  transition: transform 0.4s ease;
}

.project-image:hover {
  transform: scale(1.03) translateY(-5px);
}

.project-image img {
  width: 100%;
  display: block;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  object-position: top center;
}

.project-content {
  display: flex;
  flex-direction: column;
}

.project-card:nth-child(even) .project-content {
  align-items: flex-end;
}

.project-category {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--primary);
  opacity: 0.7;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 0.5rem;
}

.project-title {
  font-size: 2.2rem;
  font-weight: 700;
  margin-bottom: 1.5rem;
}

.project-description {
  font-size: 1.1rem;
  line-height: 1.8;
  margin-bottom: 2rem;
}

.project-tech-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-bottom: 2rem;
}

.project-card:nth-child(even) .project-tech-list {
  justify-content: flex-end;
}

.project-tech-item {
  padding: 0.4rem 1.2rem;
  background-color: rgba(255, 255, 255, 0.1);
  border-radius: 20px;
  font-size: 0.85rem;
}

.project-links {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
}

.experience-section {
  padding: 8rem 5%;
  background-color: var(--secondary);
}

.timeline {
  max-width: 800px;
  margin: 0 auto;
  position: relative;
  padding: 2rem 0;
}

.timeline::before {
  content: "";
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 3px;
  height: 100%;
  background-color: var(--primary);
  opacity: 0.15;
}

.timeline-item {
  position: relative;
  margin-bottom: 4rem;
}
.timeline-item:last-child {
  margin-bottom: 0;
}

.timeline-dot {
  position: absolute;
  top: 20px;
  left: 50%;
  transform: translateX(-50%);
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background-color: var(--primary);
  z-index: 2;
  box-shadow: 0 0 10px var(--primary);
}

.timeline-content {
  width: 45%;
  padding: 2rem;
  background-color: var(--accent);
  border-radius: 8px;
  position: relative;
  border: 1px solid color-mix(in srgb, var(--primary) 10%, transparent);
}

.timeline-item:nth-child(odd) .timeline-content {
  margin-left: calc(50% + 30px);
}
.timeline-item:nth-child(even) .timeline-content {
  margin-right: calc(50% + 30px);
  margin-left: 0;
}

.timeline-item .timeline-content::before {
  content: "";
  position: absolute;
  top: 20px;
  border-width: 10px;
  border-style: solid;
}
.timeline-item:nth-child(odd) .timeline-content::before {
  left: -20px;
  border-color: transparent var(--accent) transparent transparent;
}
.timeline-item:nth-child(even) .timeline-content::before {
  right: -20px;
  border-color: transparent transparent transparent var(--accent);
}

.timeline-content h3 {
  font-size: 1.4rem;
  margin-bottom: 0.5rem;
  color: var(--primary);
}
.timeline-content h3 a {
  color: var(--primary);
  text-decoration: underline;
  text-decoration-color: rgba(255, 255, 255, 0.5);
  transition: text-decoration-color 0.3s;
}
.timeline-content h3 a:hover {
  text-decoration-color: var(--primary);
}

.timeline-date {
  display: block;
  font-size: 0.9rem;
  margin-bottom: 1rem;
  opacity: 0.7;
  font-style: italic;
}
.timeline-content p {
  line-height: 1.7;
  font-size: 1rem;
}

.contact-section {
  padding: 8rem 5%;
  background-color: var(--accent);
  position: relative;
  overflow: hidden;
}

.shape4 {
  width: 40vw;
  height: 40vw;
  bottom: -10vh;
  left: -10vw;
  animation-delay: 3s;
  background: radial-gradient(
    circle,
    rgba(255, 255, 255, 0.04) 0%,
    rgba(0, 0, 0, 0) 70%
  );
}

.contact-container {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 4rem;
  max-width: 1200px;
  margin: 0 auto;
  align-items: flex-start;
}

.contact-item {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  margin-bottom: 2rem;
  font-size: 1.1rem;
}

.contact-item i {
  font-size: 1.8rem;
  color: var(--primary);
  width: 30px;
  text-align: center;
}

.social-icons {
  display: flex;
  gap: 1.5rem;
  margin-top: 2rem;
}

.social-icon {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 45px;
  height: 45px;
  border-radius: 50%;
  background-color: color-mix(in srgb, var(--primary) 10%, transparent);
  color: var(--primary);
  text-decoration: none;
  font-size: 1.2rem;
  transition: var(--transition);
}

.social-icon:hover {
  background-color: var(--primary);
  color: var(--secondary);
  transform: translateY(-5px) scale(1.1);
}

.form-group {
  margin-bottom: 1.5rem;
}

.contact-form input,
.contact-form textarea {
  width: 100%;
  padding: 1rem;
  background-color: color-mix(in srgb, var(--secondary) 80%, transparent);
  border: 1px solid color-mix(in srgb, var(--primary) 20%, transparent);
  color: var(--primary);
  font-family: "Space Grotesk", sans-serif;
  border-radius: 5px;
  transition: var(--transition);
  font-size: 1rem;
}

.contact-form input::placeholder,
.contact-form textarea::placeholder {
  color: color-mix(in srgb, var(--primary) 60%, transparent);
  opacity: 1;
}

.contact-form input:focus,
.contact-form textarea:focus {
  outline: none;
  border-color: var(--primary);
  background-color: color-mix(in srgb, var(--secondary) 90%, transparent);
}

.contact-form textarea {
  min-height: 150px;
  resize: vertical;
}

.contact-form .btn {
  width: 100%;
  cursor: pointer;
  margin-top: 1rem;
}

.footer {
  padding: 3rem 5%;
  text-align: center;
  background-color: var(--secondary);
  border-top: 1px solid color-mix(in srgb, var(--primary) 10%, transparent);
}

.footer-content {
  max-width: 600px;
  margin: 0 auto;
}

.footer .logo {
  margin-bottom: 1rem;
  font-size: 1.8rem;
}
.footer p {
  font-size: 0.9rem;
  opacity: 0.7;
}

.back-to-top {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background-color: var(--primary);
  color: var(--secondary);
  display: flex;
  justify-content: center;
  align-items: center;
  text-decoration: none;
  transition: opacity 0.3s, transform 0.3s, background-color 0.3s;
  opacity: 0;
  visibility: hidden;
  z-index: 999;
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.3);
}

.back-to-top.visible {
  opacity: 1;
  visibility: visible;
}

.back-to-top:hover {
  transform: translateY(-5px) scale(1.1);
}
.back-to-top i {
  font-size: 1.2rem;
}

.language-switcher button {
  background: color-mix(in srgb, var(--primary) 10%, transparent);
  border: 1px solid color-mix(in srgb, var(--primary) 40%, transparent);
  color: var(--primary);
  padding: 0.4rem 0.8rem;
  cursor: pointer;
  font-family: "Space Grotesk", sans-serif;
  font-size: 0.85rem;
  border-radius: 5px;
  transition: var(--theme-transition);
}

.language-switcher button:hover {
  background-color: color-mix(in srgb, var(--primary) 20%, transparent);
  border-color: var(--primary);
}

.language-switcher button.active {
  background-color: var(--primary);
  color: var(--secondary);
  font-weight: bold;
  border-color: var(--primary);
}

.skills-section {
  position: relative;
  overflow: hidden;
  padding: 8rem 0;
  background-color: var(--secondary);
  transition: var(--theme-transition);
}

#skills-scene-container {
  position: relative;
  width: 100%;
  height: 80vh;
  min-height: 600px;
  max-height: 750px;
}
#starfield-canvas {
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 100%;
  z-index: 1;
}
#skills-solar-system {
  position: absolute;
  top: 50%; left: 50%;
  width: 1px; height: 1px;
  z-index: 10;
}

#skill-sun {
  position: absolute;
  width: 140px; height: 140px;
  transform: translate(-50%, -50%);
  z-index: 10;
}
.sun-core {
  width: 100%; height: 100%;
  border-radius: 50%;
  background: radial-gradient(ellipse, #ffd700 0%, #ff8c00 70%, #ff4500 100%);
  box-shadow: 0 0 50px #ff8c00, 0 0 100px #ff4500, inset 0 0 20px rgba(255,255,255,0.5);
  display: flex;
  justify-content: center;
  align-items: center;
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--secondary);
  text-shadow: 0 0 10px rgba(0,0,0,0.5);
  animation: sun-pulse 8s infinite ease-in-out;
}
.sun-flare {
  position: absolute;
  top: -50%; left: -50%;
  width: 200%; height: 200%;
  background: radial-gradient(circle, rgba(255, 165, 0, 0.4) 30%, transparent 70%);
  border-radius: 50%;
  animation: sun-flare-rotate 20s infinite linear;
  opacity: 0.7;
}
@keyframes sun-pulse { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.03); } }
@keyframes sun-flare-rotate { from { transform: rotate(0deg); } to { transform: rotate(360deg); } }

.orbit-path {
  position: absolute;
  top: 50%; left: 50%;
  border: 1px dashed color-mix(in srgb, var(--primary) 20%, transparent);
  border-radius: 50%;
  transform: translate(-50%, -50%);
  pointer-events: none;
  will-change: transform;
}

.skill-planet-container {
  position: absolute;
  top: 50%; left: 0;
  width: 100px; height: 100px;
  transform: translate(-50%, -50%);
  z-index: 25;
  cursor: pointer;
  pointer-events: all;
}

.skill-planet {
  width: 100%; height: 100%;
  border-radius: 50%;
  display: flex;
  justify-content: center;
  align-items: center;
  text-align: center;
  font-weight: 600;
  font-size: 0.9rem;
  color: #fff;
  padding: 0.5rem;
  text-shadow: 0 0 5px rgba(0,0,0,0.7);
  border: 1px solid rgba(255, 255, 255, 0.4);
  transition: transform 0.4s ease, box-shadow 0.4s ease;
  will-change: transform, box-shadow;
  animation: counter-rotate var(--duration) linear infinite var(--direction);
}
@keyframes counter-rotate { from { transform: rotate(0deg); } to { transform: rotate(-360deg); } }

.skill-planet-container:hover { animation-play-state: paused; }
.skill-planet-container:hover .skill-planet {
  animation-play-state: paused;
  transform: scale(1.2);
  box-shadow: 0 0 30px var(--planet-color);
}

#frontend { --planet-color: #61DAFB; background: radial-gradient(circle, #61DAFB, #007B9E); }
#backend { --planet-color: #8993be; background: radial-gradient(circle, #8993be, #3B4368); }
#design { --planet-color: #A259FF; background: radial-gradient(circle, #f24e1e, #A259FF); }
#shopify { --planet-color: #95BF47; background: radial-gradient(circle, #95BF47, #5E8E3E); }
#tools { --planet-color: #a7a7a7; background: radial-gradient(circle, #a7a7a7, #5A5A5A); }

#skills-infobox {
  position: absolute;
  top: 50%;
  left: calc(50% + 340px + 40px);
  transform: translateY(-50%) scale(0.95);
  width: 100%;
  max-width: 280px;
  padding: 1.5rem;
  background: color-mix(in srgb, var(--accent) 85%, transparent);
  backdrop-filter: blur(12px);
  border: 1px solid color-mix(in srgb, var(--primary) 15%, transparent);
  border-radius: 12px;
  color: var(--text);
  z-index: 100;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.4s ease, transform 0.4s ease, background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease;
  transform-origin: left center;
}

#skills-infobox.visible {
  opacity: 1;
  transform: translateY(-50%) scale(1);
}

.language-section-v2 {
  padding-top: 4rem;
  padding-bottom: 8rem;
  background-color: var(--accent);
  transition: var(--theme-transition);
}

.language-section-v2 .skills-subheading {
  text-align: center;
  margin-bottom: 4rem;
  font-size: 1.8rem;
}

.code-block-container {
  max-width: 700px;
  margin: 0 auto;
  padding: 0 1rem;
}

.code-block {
  background-color: color-mix(in srgb, var(--secondary) 85%, black);
  border-radius: 12px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
  overflow: hidden;
  border: 1px solid color-mix(in srgb, var(--primary) 10%, transparent);
}

.code-block-header {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.8rem 1rem;
  background-color: color-mix(in srgb, var(--secondary) 60%, black);
  position: relative;
}

.code-block-header .dot { width: 12px; height: 12px; border-radius: 50%; }
.dot.red { background-color: #ff5f56; }
.dot.yellow { background-color: #ffbd2e; }
.dot.green { background-color: #27c93f; }

.code-block pre { margin: 0; padding: 1.5rem 2rem; }
.code-block code {
  font-family: 'Space Mono', monospace;
  font-size: 0.95rem;
  line-height: 1.8;
  white-space: pre-wrap;
  color: var(--text);
}
.json-key { color: #82aaff; }
.json-string { color: #c3e88d; }
.json-comment { color: #637777; font-style: italic; }
.json-punctuation { color: var(--primary); opacity: 0.8; }
.json-boolean { color: #f78c6c; }

.code-block pre[contenteditable="true"] { cursor: text; }
.typing-caret {
  display: inline-block;
  width: 8px;
  height: 1.2em;
  background-color: var(--primary);
  animation: blink 1s infinite;
  margin-left: 2px;
  vertical-align: middle;
}
@keyframes blink { 0%, 100% { opacity: 1; } 50% { opacity: 0; } }

body.light-mode .json-string { color: #0d873c; }
body.light-mode .json-key { color: #005cc5; }
body.light-mode .json-comment { color: #5c6370; }

.code-block-title {
  color: color-mix(in srgb, var(--primary) 60%, transparent);
  font-size: 0.85rem;
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
}

#hamburger-btn {
  display: none;
  width: 30px;
  height: 25px;
  position: relative;
  background: none;
  border: none;
  cursor: pointer;
  z-index: 1001;
}
#hamburger-btn span {
  display: block; position: absolute; height: 3px; width: 100%;
  background: var(--primary); border-radius: 3px; left: 0;
  transition: transform 0.3s ease-in-out, opacity 0.3s ease-in-out, top 0.3s ease-in-out;
}
#hamburger-btn span:nth-child(1) { top: 0px; }
#hamburger-btn span:nth-child(2) { top: 10px; }
#hamburger-btn span:nth-child(3) { top: 20px; }

body.mobile-menu-open #hamburger-btn span:nth-child(1) { top: 10px; transform: rotate(135deg); }
body.mobile-menu-open #hamburger-btn span:nth-child(2) { opacity: 0; transform: translateX(-20px); }
body.mobile-menu-open #hamburger-btn span:nth-child(3) { top: 10px; transform: rotate(-135deg); }

#mobile-menu {
  position: fixed; top: 0; right: 0; width: 100%; height: 100%;
  background-color: var(--secondary);
  z-index: 1000;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: center;
  transform: translateX(100%);
  transition: transform 0.4s cubic-bezier(0.77, 0, 0.175, 1);
  padding: 8rem 2rem 3rem;
}

body.mobile-menu-open { overflow: hidden; }
body.mobile-menu-open #mobile-menu { transform: translateX(0); }

.mobile-menu-links {
  display: flex; flex-direction: column; align-items: center; gap: 2rem;
}
.mobile-menu-links a {
  font-size: 2rem; font-weight: 600; color: var(--primary); text-decoration: none;
  opacity: 0; transform: translateY(20px);
  transition: opacity 0.4s ease, transform 0.4s ease;
}
body.mobile-menu-open .mobile-menu-links a { opacity: 1; transform: translateY(0); }
body.mobile-menu-open .mobile-menu-links a:nth-child(1) { transition-delay: 0.2s; }
body.mobile-menu-open .mobile-menu-links a:nth-child(2) { transition-delay: 0.3s; }
body.mobile-menu-open .mobile-menu-links a:nth-child(3) { transition-delay: 0.4s; }
body.mobile-menu-open .mobile-menu-links a:nth-child(4) { transition-delay: 0.5s; }

.mobile-menu-bottom {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2.5rem;
  width: 100%;
}
.mobile-menu-bottom .nav-socials {
  display: flex;
  gap: 2rem;
  font-size: 1.5rem;
}
.mobile-controls-group {
  display: flex;
  align-items: center;
  gap: 2rem;
}

.nav-container.scrolled {
  background-color: color-mix(in srgb, var(--secondary) 70%, transparent);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  padding-top: 1rem;
  padding-bottom: 1rem;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

.evolution-popup-overlay {
  position: fixed; bottom: 0; right: 0; width: 100%; height: 100%;
  background-color: rgba(0, 0, 0, 0.2);
  display: flex; justify-content: flex-end; align-items: flex-end;
  z-index: 10001;
  pointer-events: none; opacity: 0;
  transition: opacity 0.4s ease;
}
.evolution-popup-overlay.visible { opacity: 1; pointer-events: all; cursor: pointer; }
.evolution-popup {
  background-color: var(--accent); color: var(--primary);
  border: 1px solid color-mix(in srgb, var(--primary) 15%, transparent);
  border-radius: 12px; padding: 1.5rem; margin: 2rem; max-width: 320px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.25); position: relative;
  transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease;
  cursor: default;
  animation: float-subtle 6s ease-in-out infinite;
}
@keyframes float-subtle { 0% { transform: translateY(0); } 50% { transform: translateY(-8px); } 100% { transform: translateY(0); } }
.evolution-popup.exploding { animation: explode-out 0.4s cubic-bezier(0.68, -0.55, 0.27, 1.55) forwards; }
@keyframes explode-out { 0% { transform: translateY(0) scale(1); opacity: 1; } 100% { transform: translateY(-20px) scale(1.3) rotate(15deg); opacity: 0; } }
.evolution-popup h4 { font-family: 'Space Grotesk', sans-serif; font-size: 1.2rem; margin-bottom: 0.8rem; }
.evolution-popup p { font-size: 0.95rem; line-height: 1.6; margin: 0; }
.evolution-popup p b { color: var(--primary); font-weight: 600; }
.evolution-popup-close {
  position: absolute; top: 0.5rem; right: 0.8rem; background: none; border: none;
  font-size: 1.8rem; color: var(--primary); opacity: 0.5; cursor: pointer;
  transition: opacity 0.3s, transform 0.3s;
}
.evolution-popup-close:hover { opacity: 1; transform: scale(1.1); }

.nav-socials { display: flex; align-items: center; gap: 1.5rem; }
.nav-socials a { color: var(--primary); font-size: 1.2rem; transition: transform 0.3s ease, color 0.3s; }
.nav-socials a:hover { transform: scale(1.2) translateY(-2px); }

#nowa-tooltip, #case-study-tooltip {
  position: fixed; display: none; background-color: #c53030; color: #fff;
  padding: 0.6rem 1rem; border-radius: 8px; font-size: 0.9rem;
  z-index: 10002; pointer-events: none;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
  white-space: nowrap;
}
#case-study-tooltip { background-color: #000; }
:root { --win-bg: #C0C0C0; --win-title-bar-blue: #000080; --border-light: #FFFFFF; --border-dark: #404040; --font-terminal: 'VT323', 'Courier New', monospace; }
#case-study-overlay {
  position: fixed; top: 0; left: 0; width: 100%; height: 100%;
  background: #008080; z-index: 10000; display: none;
  font-family: 'Tahoma', 'Verdana', 'MS Sans Serif', sans-serif;
  -webkit-font-smoothing: none; -moz-osx-font-smoothing: grayscale;
}
#boot-sequence, #binary-rain-canvas { position: absolute; top: 0; left: 0; width: 100%; height: 100%; z-index: 10001; }
#boot-sequence {
  background: #000; color: #00FF00; font-family: var(--font-terminal);
  font-size: 1.5em; padding: 20px; box-sizing: border-box; overflow: hidden; z-index: 10002;
}
#boot-sequence .boot-line { opacity: 0; animation: fadeIn 0.1s forwards; white-space: pre; }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

.case-study-window, .case-study-popup-window {
  position: absolute; background: var(--win-bg); border: 2px solid;
  border-color: var(--border-light) var(--border-dark) var(--border-dark) var(--border-light);
  box-shadow: 5px 5px 15px rgba(0,0,0,0.5); font-size: 13px;
}
.case-study-window {
  top: 50%; left: 50%; transform: translate(-50%, -50%);
  width: 90%; max-width: 700px; min-height: 450px;
  z-index: 10003; display: none; flex-direction: column;
}
.case-study-title-bar {
  background: var(--win-title-bar-blue); padding: 5px;
  display: flex; justify-content: space-between; align-items: center;
  color: white; font-size: 14px; cursor: move; font-weight: bold;
}
.title-bar-controls button {
  background: var(--win-bg); border: 1px solid;
  border-color: var(--border-light) var(--border-dark) var(--border-dark) var(--border-light);
  width: 20px; height: 20px; font-family: "Courier New", monospace;
  font-weight: bold; padding: 0; margin-left: 2px;
}
.case-study-window-body {
  padding: 10px; margin: 0 4px 4px 4px; border: 2px solid;
  border-color: var(--border-dark) var(--border-light) var(--border-light) var(--border-dark);
  flex-grow: 1; color: #000; overflow-y: auto;
}
#case-study-content h4 { font-size: 1.1em; font-weight: bold; margin: 15px 0 5px 0; color: #000; }
#case-study-content p, #case-study-content strong, #case-study-content li { font-size: 1.05em; line-height: 1.6; color: #000; }
.case-study-popup-window {
  top: 60%; left: 65%; transform: translate(-50%, -50%) rotate(-3deg);
  width: 320px; z-index: 10004; padding: 2px; display: none;
}
.case-study-popup-window .popup-body {
  background: var(--win-bg); padding: 20px; display: flex;
  align-items: flex-start; gap: 15px; color: #000;
}
.case-study-popup-window .popup-icon { width: 32px; height: 32px; flex-shrink: 0; }
.case-study-popup-window .popup-footer { text-align: center; padding: 10px 0; display:flex; justify-content:center; gap: 10px; }
.case-study-popup-window button {
  background: var(--win-bg); border: 2px solid;
  border-color: var(--border-light) var(--border-dark) var(--border-dark) var(--border-light);
  padding: 5px 25px; cursor: pointer; color: #000;
}
.case-study-popup-window button:active { border-color: var(--border-dark) var(--border-light) var(--border-light) var(--border-dark); }

.btn.btn-case-study {
  background-color: transparent;
  color: var(--color-accent-green);
  border-color: var(--color-accent-green);
  animation: flicker-glow 2.5s infinite ease-in-out;
}
.btn.btn-case-study:hover {
  background-color: var(--color-accent-green);
  color: var(--secondary);
  box-shadow: 0 0 15px var(--color-accent-green);
}
.btn-hero { padding: 1.2rem 2.5rem; font-size: 1.1rem; font-weight: 700; }
a { color: var(--primary); text-decoration: none; transition: opacity 0.3s ease; }
a:not(.btn):not(.social-icon):hover { opacity: 0.7; }

@keyframes flicker-glow {
  0%, 100% { box-shadow: 0 0 5px var(--color-accent-green), 0 0 10px var(--color-accent-green); text-shadow: 0 0 2px var(--color-accent-green); }
  50% { box-shadow: 0 0 10px var(--color-accent-green), 0 0 20px var(--color-accent-green); text-shadow: 0 0 5px var(--color-accent-green); }
}

.nav-cv-btn {
  display: flex; align-items: center; gap: 0.5rem;
  padding: 0.5rem 1rem; border-radius: 5px;
  font-size: 0.9rem; font-weight: 500;
  transition: all 0.3s ease;
  background-color: var(--primary); color: var(--secondary);
  border: 1px solid var(--primary);
}
.nav-cv-btn:hover {
  background-color: var(--secondary); color: var(--primary);
  border: 1px solid var(--primary);
  transform: translateY(-2px);
  box-shadow: 0 4px 10px rgba(255, 255, 255, 0.1);
}
.nav-cv-btn i { font-size: 1rem; }

.form-result {
  margin-top: 1.5rem; padding: 1rem; border-radius: 8px;
  text-align: center; font-weight: 500; opacity: 0;
  transform: translateY(10px);
  transition: opacity 0.4s ease, transform 0.4s ease;
  display: none;
}
.form-result.visible { opacity: 1; transform: translateY(0); display: block; }
.form-result.success { background-color: rgba(57, 255, 20, 0.15); color: #39ff14; border: 1px solid #39ff14; }
.form-result.error { background-color: rgba(255, 99, 71, 0.15); color: #ff6347; border: 1px solid #ff6347; }


/****************************************************************/
/*                                                              */
/*          >>> SECTION RESPONSIVE ENTIÈREMENT RÉÉCRITE <<<     */
/*          (Copiez à partir d'ici pour remplacer l'ancienne)   */
/*                                                              */
/****************************************************************/

/* =================================================================== */
/*  1. Breakpoint pour Laptops & Grandes Tablettes (~1200px et moins)  */
/* =================================================================== */
@media (max-width: 1200px) {
  #skills-infobox {
    display: none; /* On cache l'infobox qui risque de déborder */
  }
}

/* ======================================================= */
/*  2. Breakpoint pour Tablettes (~992px et moins)         */
/* ======================================================= */
@media (max-width: 992px) {
  /* --- AJUSTEMENTS GÉNÉRAUX --- */
  .section-heading {
    font-size: 2.5rem;
  }
  .about-text, .project-description {
    font-size: 1.05rem;
  }
  .project-title {
    font-size: 2rem;
  }

  /* --- NAVIGATION --- */
  .nav-cv-btn span {
    display: none; /* On cache le texte du bouton CV, icône seule */
  }
  .nav-cv-btn {
    padding: 0.6rem 0.8rem; /* On le rend plus carré */
  }
  .nav-right-group {
    gap: 1.5rem;
  }

  /* --- SECTION "À PROPOS" --- */
  .about-grid {
    grid-template-columns: 1fr; /* Passage à une seule colonne */
    gap: 3rem;
  }
  .about-image {
    height: auto;
    max-height: 50vh;
  }
  
  /* --- PROJETS "FEATURED" (CORRIGÉ) --- */
  .project-card {
    display: flex;
    flex-direction: column; 
    gap: 2rem;
  }
  .project-card .project-content {
    text-align: left !important;
    align-items: flex-start !important;
  }
  .project-card .project-tech-list {
      justify-content: flex-start !important;
  }
  .project-card .project-image { order: 1; }
  .project-card .project-content { order: 2; }
  
  /* --- NOUVEAU : CORRECTION POUR LES BOUTONS SUR TABLETTE --- */
  .project-links {
    flex-direction: column; /* On empile les boutons verticalement */
    align-items: stretch; /* Les boutons prennent toute la largeur */
  }
  .project-links .btn {
    text-align: center; /* On centre le texte des boutons */
  }
  /* --- FIN DE LA CORRECTION --- */


  /* --- TIMELINE --- */
  .timeline::before {
    left: 15px; /* On déplace la ligne sur la gauche */
    transform: translateX(0);
  }
  .timeline-dot {
    left: 15px;
    transform: translateX(-50%);
  }
  .timeline-item:nth-child(odd) .timeline-content,
  .timeline-item:nth-child(even) .timeline-content {
    width: calc(100% - 60px); /* Les bulles prennent toute la largeur restante */
    margin-left: 60px;
    margin-right: 0;
  }
  /* On s'assure que toutes les flèches pointent vers la gauche */
  .timeline-item .timeline-content::before {
    left: -20px;
    right: auto;
    border-color: transparent var(--accent) transparent transparent;
  }

  /* --- CONTACT --- */
  .contact-container {
    grid-template-columns: 1fr; /* Passage à une seule colonne */
    gap: 3rem;
  }
  .contact-info {
    text-align: center; /* Centrer les infos de contact */
  }
  .contact-item {
    justify-content: center;
  }
  .social-icons {
    justify-content: center;
  }
}


/* ======================================================= */
/*  3. Breakpoint pour Mobiles (~768px et moins)           */
/* ======================================================= */
/* ======================================================= */
/*  3. Breakpoint pour Mobiles (~768px et moins) - VÉRIFIÉ  */
/* ======================================================= */
@media (max-width: 768px) {
  /* --- AJUSTEMENTS GÉNÉRAUX --- */
  body {
    font-size: 15px;
  }
  .about-section, .featured-projects-section, .experience-section, .contact-section {
    padding-top: 6rem;
    padding-bottom: 6rem;
  }
  .section-heading {
    font-size: 2rem;
  }

  /* --- NAVIGATION & MENU MOBILE --- */
  .nav-right-group,
  .nav-container > .nav-links,
  .nav-container > .language-switcher {
    display: none;
  }

  .nav-container {
    padding: 1rem 1.5rem;
  }
  
  /* --- STYLES DU BOUTON HAMBURGER --- */
  #hamburger-btn {
    display: block;
    z-index: 1001; /* Doit être supérieur au z-index du menu (1000) */
  }

  /* ✅ LA CORRECTION DÉFINITIVE EST ICI */
  body.mobile-menu-open #hamburger-btn {
    position: fixed; /* Le bouton est positionné par rapport à l'écran */
    top: 1rem;     /* Pour qu'il reste visible */
    right: 1.5rem; /* Par-dessus le menu */
  }
  
  body.light-mode .nav-container.scrolled,
  .nav-container.scrolled {
      background-color: transparent;
      backdrop-filter: none;
      box-shadow: none;
      padding-top: 1rem;
      padding-bottom: 1rem;
  }

  /* --- DISPOSITION DU BAS DU MENU MOBILE --- */
  .mobile-menu-bottom {
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    padding: 0 1rem;
    gap: 1.5rem;
  }

  /* --- HERO HEADER --- */
  .hero-title {
    font-size: 12vw;
    line-height: 1.1;
  }
  .hero-subtitle {
    font-size: 1.2rem;
  }
  .btn-hero {
    padding: 1rem 2rem;
    font-size: 1rem;
  }

  /* --- COMPÉTENCES (SYSTÈME SOLAIRE) --- */
  #skills-scene-container {
    height: 65vh;
    min-height: 550px;
    transform: scale(0.9);
  }

  /* --- PROJETS --- */
  .featured-projects-grid {
    gap: 5rem;
  }
  .project-title {
    font-size: 1.8rem;
  }
  
  /* --- COMPTEURS --- */
  .counter-section {
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
  }
  .counter-number {
    font-size: 2.5rem;
  }

  /* --- TIMELINE --- */
  .timeline-content {
    padding: 1.5rem;
  }

  /* --- FOOTER --- */
  .footer {
    padding: 2.5rem 5%;
  }

  /* --- POPUP ÉVOLUTION --- */
  .evolution-popup {
    max-width: calc(100% - 2rem);
    margin: 1rem;
    margin-bottom: 1.5rem;
  }

  /* NOUVELLE RÈGLE POUR LA GRILLE DES BOUTONS */
  .project-links {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
  }

  .project-links .btn-case-study {
    grid-column: 1 / -1;
    text-align: center;
  }

  /* Dans votre fichier style.css, à l'intérieur de @media (max-width: 768px) */

body.mobile-menu-open #hamburger-btn {
  position: fixed; /* Rend le bouton indépendant du défilement et le positionne par rapport à la fenêtre */
  top: 1rem;     /* Le place en haut */
  right: 1.5rem; /* Le place à droite */
}
}


/* ======================================================= */
/*  4. Breakpoint pour Petits Mobiles (~480px et moins)    */
/* ======================================================= */
@media (max-width: 480px) {
  /* --- AJUSTEMENTS GÉNÉRAUX --- */
  .btn {
    padding: 0.9rem 1.5rem;
    font-size: 0.9rem;
  }

  /* --- HERO HEADER --- */
  .hero-title {
    font-size: 14vw;
  }

  /* --- COMPÉTENCES (SYSTÈME SOLAIRE) --- */
  #skills-scene-container {
    transform: scale(0.75); /* On réduit encore un peu pour les petits écrans */
    height: 60vh;
    min-height: 500px;
  }
  
  /* --- PROJETS --- */
  .featured-projects-section, .experience-section {
      padding-left: 3%;
      padding-right: 3%;
  }

  /* --- BLOC JSON --- */
  .code-block code {
    font-size: 0.85rem;
    line-height: 1.7;
  }
  .code-block pre {
    padding: 1.2rem 1rem;
  }

  /* --- CONTACT --- */
  .contact-section {
    padding-left: 3%;
    padding-right: 3%;
  }
  .contact-item {
    font-size: 1rem;
    gap: 1rem;
  }
  .contact-item i {
    font-size: 1.5rem;
  }
}

/* ======================================================= */
/*  5. Préférences de l'utilisateur                       */
/* ======================================================= */
@media (prefers-reduced-motion: reduce) {
  /* On désactive les animations pour les utilisateurs qui le demandent */
  * {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* ======================================================= */
/*    STYLES CORRIGÉS POUR LA SECTION RÉTRO METHODOLOGIE    */
/* ======================================================= */

.retro-methodology-section {
  padding: 0; /* Pas besoin de padding, GSAP s'en occupe */
  background-color: var(--secondary);
  font-family: "Tahoma", "MS Sans Serif", sans-serif;
  font-smooth: never;
  -webkit-font-smoothing: none;
  overflow: hidden; /* Important pour éviter les débordements */
}

.retro-container {
  position: relative;
  /* La hauteur est maintenant plus petite que l'écran pour permettre le scroll "interne" */
  height: 80vh;
  width: 100%;
  max-width: 600px;
  margin: auto;
  /* Centrage vertical dans la section épinglée */
  display: flex;
  align-items: center;
  justify-content: center;
}

.retro-window {
  position: absolute; /* Permet aux fenêtres de se superposer */
  width: 95%;
  max-width: 480px; /* Taille maximale pour les fenêtres */
  background-color: #C0C0C0;
  border: 2px solid;
  border-color: #FFFFFF #404040 #404040 #FFFFFF;
  box-shadow: 2px 2px 0px #000;
  padding: 2px;
  display: none;
  opacity: 0;
}

.retro-title-bar {
  background: linear-gradient(to right, #000080, #1084d0);
  color: white;
  padding: 3px 5px;
  font-weight: bold;
  display: flex;
  justify-content: space-between;
  align-items: center;
  user-select: none;
}

.retro-title-buttons span {
  background: #C0C0C0;
  border: 1px solid;
  border-color: #fff #404040 #404040 #fff;
  padding: 0 4px;
  color: black;
  margin-left: 2px;
  font-size: 10px;
  box-shadow: 1px 1px 0 #000;
}

.retro-window-body {
  padding: 20px;
  text-align: center;
  color: #000; /* Assure que le texte est noir */
}

.search-bar-retro {
  background: white;
  border: 2px inset #C0C0C0;
  padding: 5px;
  position: relative;
  margin: 15px 0;
}

#retro-search-input {
  width: 100%;
  border: none;
  outline: none;
  font-size: 16px;
  background-color: white; /* Fond blanc explicite */
  color: black;
}

#typing-caret {
  color: black;
  animation: blink-caret 1s step-end infinite;
}

@keyframes blink-caret {
  from, to { opacity: 1; }
  50% { opacity: 0; }
}

.search-buttons-retro {
  margin-top: 15px;
  display: flex;
  justify-content: center;
  gap: 10px;
}

.retro-button, .search-buttons-retro button {
  background: #C0C0C0;
  border: 2px outset #C0C0C0;
  padding: 5px 15px;
  box-shadow: 1px 1px 1px #000;
  color: #000;
  cursor: pointer;
}

.search-buttons-retro button:active {
  border-style: inset;
}

/* Styles pour la fenêtre de résultats */
.results-body {
  text-align: left;
  max-height: 300px;
  overflow-y: auto;
}

.search-result {
  margin-bottom: 15px;
}

.search-result a {
  color: #0000FF;
  text-decoration: underline;
  font-size: 16px;
}

.search-result p {
  color: #000;
  margin: 2px 0;
  font-size: 13px;
}

.search-result span {
  color: #008000;
  font-size: 12px;
}

/* Styles pour la fenêtre de téléchargement */
#download-box-window {
  width: 95%;
  max-width: 400px;
}

.download-body {
  padding: 15px;
  font-size: 14px;
  text-align: left;
}

.download-progress-bar {
  border: 2px inset #C0C0C0;
  padding: 2px;
  background-color: #fff;
  margin: 10px 0;
}

#download-progress-fill {
  width: 0%;
  height: 20px;
  background: #000080;
}

.download-details-container {
  display: flex;
  justify-content: space-between;
  margin: 10px 0;
  font-size: 12px;
}

.download-footer {
  text-align: center;
  margin-top: 15px;
}

/* Styles pour la fenêtre finale */
.final-report {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 15px;
}

.final-report p {
  font-size: 16px;
  font-weight: bold;
}

/* ======================================================= */
/*    STYLES RESPONSIVE ADDITIONNELS POUR LES ÉLÉMENTS COMPLEXES   */
/* ======================================================= */

/* --- Améliorations pour la modale Case Study sur mobile --- */
@media (max-width: 768px) {
  .case-study-window {
    /* Occupe plus de place sur mobile pour une meilleure lisibilité */
    width: 95%;
    min-height: 400px;
    font-size: 12px; /* On ajuste la taille de la police de base */
  }

  .case-study-window-body {
    padding: 8px; /* Padding réduit pour maximiser l'espace */
  }

  /* On s'assure que le popup de contact ne soit pas trop grand */
  .case-study-popup-window {
    width: 90%;
    left: 50%;
    top: 55%;
    transform: translate(-50%, -50%);
  }

  .popup-body {
      padding: 15px;
      gap: 10px;
  }
}

/* --- Styles responsifs pour la section Rétro (pour usage futur) --- */
@media (max-width: 768px) {
  .retro-container {
    height: 90vh; /* On donne un peu plus d'espace vertical sur mobile */
  }

  .retro-window {
      max-width: 90%; /* Fenêtre plus large sur mobile */
  }

  /* Ajustement de la taille de l'image du logo Google */
  .retro-window-body img {
      max-width: 150px !important;
  }
  
  /* Ajustement de la taille de la police dans les fenêtres */
  .search-result a { font-size: 14px; }
  .search-result p { font-size: 12px; }
  .search-result span { font-size: 11px; }

  .download-body, .final-report p {
      font-size: 13px;
  }
}

/* ======================================================= */
/*    STYLES POUR LE NOUVEAU BOUTON DE FERMETURE MOBILE    */
/* ======================================================= */
#mobile-menu-close-btn {
  position: absolute;
  top: 1.5rem;
  right: 1.5rem;
  background: none;
  border: none;
  color: var(--primary); /* Utilise la couleur du texte du thème actuel */
  font-size: 2.5rem; /* Rend le "X" bien visible */
  font-weight: 300;
  line-height: 1;
  cursor: pointer;
  z-index: 1002; /* S'assure qu'il est au-dessus de tout le reste dans le menu */
  transition: transform 0.3s ease, color 0.3s ease;
}

#mobile-menu-close-btn:hover {
  transform: scale(1.1) rotate(90deg);
  color: #ff6347; /* Un petit effet de couleur au survol */
}

/* Ajoutez ce code à la fin de votre fichier style.css */
.nav-wtf-btn {
  background-color: #ff4500; /* Une couleur qui détonne un peu */
  color: var(--secondary);
  border: none;
  padding: 0.5rem 1rem;
  border-radius: 5px;
  font-family: 'Space Grotesk', sans-serif;
  font-size: 0.9rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 0 10px rgba(255, 69, 0, 0.5);
}

.nav-wtf-btn:hover {
  transform: scale(1.1) rotate(-5deg);
  box-shadow: 0 0 20px rgba(255, 69, 0, 0.8);
}

/* ======================================================= */
/*      STYLES FINAUX : TAROT DES COMPÉTENCES (V4)         */
/* ======================================================= */
.tarot-skills-section {
  padding: 8rem 5%;
  background-color: var(--accent);
  overflow: hidden;
  position: relative;
}

.tarot-skills-section::before {
  content: '';
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 100%;
  background-image: url('data:image/svg+xml,%3Csvg width="60" height="60" viewBox="0 0 60 60" xmlns="http://www.w3.org/2000/svg"%3E%3Cg fill="none" fill-rule="evenodd"%3E%3Cg fill="%239C92AC" fill-opacity="0.07"%3E%3Cpath d="M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z"/%3E%3C/g%3E%3C/g%3E%3C/svg%3E');
  opacity: 0.3;
  z-index: 0;
}

.tarot-container {
  position: relative;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 2rem;
  margin-top: 3rem;
  perspective: 1500px;
}

.tarot-card {
  background-color: transparent;
  width: 220px;
  height: 385px;
  perspective: 1000px;
  cursor: pointer;
}

.tarot-card-inner {
  position: relative;
  width: 100%;
  height: 100%;
  transition: transform 0.7s cubic-bezier(0.4, 0.0, 0.2, 1);
  transform-style: preserve-3d;
  box-shadow: 0 10px 35px rgba(0, 0, 0, 0.3);
  border-radius: 12px;
}

/* Effet de lévitation au survol */
.tarot-card:hover .tarot-card-inner {
  transform: translateY(-10px) scale(1.03);
  box-shadow: 0 15px 45px rgba(0, 0, 0, 0.4);
}

.tarot-card.is-flipped .tarot-card-inner {
  transform: rotateY(180deg);
}
.tarot-card.is-flipped:hover .tarot-card-inner {
    transform: rotateY(180deg) translateY(-10px) scale(1.03);
}

.tarot-card-front,
.tarot-card-back {
  position: absolute;
  width: 100%;
  height: 100%;
  -webkit-backface-visibility: hidden;
  backface-visibility: hidden;
  border-radius: 12px;
  overflow: hidden;
}

/* La face avant EST l'image */
.tarot-card-front {
  background-color: #1a1a1a; /* Couleur de fond si l'image charge lentement */
  /* ✅ ANNULATION : la bordure blanche a été supprimée */
}
.tarot-card-front img {
    width: 100%;
    height: 100%;
    /* ✅ ANNULATION : 'contain' redevient 'cover' pour que l'image remplisse parfaitement la carte */
    object-fit: cover;
}

/* Le dos de la carte, avec le texte */
.tarot-card-back {
  transform: rotateY(180deg);
  background-color: #f3eadd;
  color: #3a3a3a;
  border: 1px solid rgba(58, 58, 58, 0.2);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  padding: 1.8rem;
}

.card-number-back {
  font-family: 'Times New Roman', Times, serif;
  font-size: 1.1rem;
  font-weight: bold;
  position: absolute;
  top: 1.5rem;
}

.card-skill-title {
  font-family: 'Montserrat', sans-serif;
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 1.2rem;
}

.card-skill-description {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 0.9rem;
  line-height: 1.6;
}


/* ======================================================= */
/*        NOUVEAUX STYLES : SOFT SKILLS SLOT MACHINE       */
/* ======================================================= */
.soft-skills-slot-section {
  padding: 8rem 5%;
  background-color: var(--secondary);
  font-family: "Tahoma", "MS Sans Serif", sans-serif;
  font-smooth: never;
  -webkit-font-smoothing: none;
}

.slot-machine-container {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 2rem;
  margin-top: 3rem;
}

#slot-machine-window {
  display: block;
  opacity: 1;
  position: relative;
  max-width: 600px;
}

.reels-container {
  display: flex;
  justify-content: center;
  gap: 1rem;
  padding: 1rem;
  background: color-mix(in srgb, #000 20%, transparent);
  border: 2px inset #C0C0C0;
  border-radius: 5px;
  overflow: hidden;
}

.reel {
  width: 100px;
  height: 100px;
  background-color: var(--secondary);
  border: 2px solid var(--primary);
  overflow: hidden;
  position: relative;
}

.reel-symbols {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  transition: transform 2.5s cubic-bezier(0.6, 0, 0.2, 1);
}

.reel-symbol {
  width: 100%;
  height: 100px;
  display: flex;
  justify-content: center;
  align-items: center;
  font-size: 3rem;
  color: var(--primary);
}

#slot-payout-display {
  margin-top: 1.5rem;
  padding: 1rem;
  min-height: 80px;
  background-color: color-mix(in srgb, var(--secondary) 80%, transparent);
  border: 1px solid color-mix(in srgb, var(--primary) 20%, transparent);
  border-radius: 5px;
  color: var(--primary);
  text-align: center;
  font-family: "Space Grotesk", sans-serif;
  transition: all 0.3s;
}
#slot-payout-display p {
  color: var(--primary);
}
#slot-payout-display strong {
  color: var(--color-accent-green);
  font-weight: 700;
}


#slot-lever {
  width: 80px;
  height: 200px;
  position: relative;
  cursor: pointer;
}

.lever-stick {
  width: 10px;
  height: 150px;
  background: #888;
  border: 2px solid;
  border-color: #aaa #666 #666 #aaa;
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  border-radius: 5px 5px 0 0;
}

.lever-handle {
  width: 60px;
  height: 60px;
  background: red;
  border-radius: 50%;
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  border: 5px solid #c00;
  box-shadow: inset 0 -5px 10px rgba(0,0,0,0.5);
  transition: transform 0.2s ease;
}

#slot-lever.pulled .lever-handle {
  transform: translate(-50%, 140px);
}

/* ======================================================= */
/*          STYLES : TÉMOIGNAGES TERMINAL (RÉPARÉ)         */
/* ======================================================= */
.testimonials-section {
  padding: 8rem 5%;
  background-color: var(--secondary);
  overflow: hidden;
}

.testimonial-terminal {
  max-width: 900px;
  margin: 3rem auto 0;
  background-color: #000000;
  border: 1px solid color-mix(in srgb, var(--color-accent-green) 30%, transparent);
  border-radius: 8px;
  box-shadow: 0 0 30px rgba(57, 255, 20, 0.15), inset 0 0 15px rgba(0,0,0,0.7);
  display: flex;
  min-height: 450px;
  font-family: 'VT323', monospace;
  color: var(--color-accent-green);
  text-shadow: 0 0 5px rgba(57, 255, 20, 0.5);
  position: relative;
}

.testimonial-terminal::after {
  content: " ";
  display: block;
  position: absolute;
  top: 0; left: 0; bottom: 0; right: 0;
  background: linear-gradient(rgba(18, 16, 16, 0) 50%, rgba(0, 0, 0, 0.25) 50%), linear-gradient(90deg, rgba(255, 0, 0, 0.06), rgba(0, 255, 0, 0.02), rgba(0, 0, 255, 0.06));
  z-index: 2;
  background-size: 100% 3px, 5px 100%;
  pointer-events: none;
}

.testimonial-sources-list {
  width: 35%;
  border-right: 1px solid color-mix(in srgb, var(--color-accent-green) 30%, transparent);
  padding: 1.5rem 1rem;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.testimonial-source-item {
  display: block;
  background: none;
  border: 1px solid transparent;
  color: var(--color-accent-green);
  text-align: left;
  padding: 0.75rem;
  cursor: pointer;
  font-family: inherit;
  font-size: 1.2rem;
  width: 100%;
  transition: background-color 0.2s, color 0.2s;
  opacity: 0.7;
}

.testimonial-source-item:hover {
  opacity: 1;
  background-color: color-mix(in srgb, var(--color-accent-green) 10%, transparent);
}

.testimonial-source-item.active {
  opacity: 1;
  background-color: var(--color-accent-green);
  color: #000000;
  text-shadow: none;
}

.testimonial-source-item strong {
  display: block;
  pointer-events: none; /* Pour que le clic traverse jusqu'au bouton */
}

.testimonial-source-item span {
  font-size: 1rem;
  opacity: 0.8;
  display: block;
  pointer-events: none; /* Pareil ici */
}

.testimonial-display {
  width: 65%;
  padding: 2rem;
  line-height: 1.6;
  font-size: 1.3rem;
  word-wrap: break-word;
}

.testimonial-display .placeholder, .testimonial-sources-list .placeholder-prompt {
  opacity: 0.6;
}

#testimonial-transmission-header {
  margin-bottom: 2rem;
  font-weight: bold;
}

#testimonial-meta p {
  margin: 0;
  line-height: 1.4;
}
#testimonial-meta {
  margin-bottom: 2rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid color-mix(in srgb, var(--color-accent-green) 20%, transparent);
}

#testimonial-quote {
  white-space: pre-wrap;
}

#testimonial-caret {
  display: inline-block;
  background: var(--color-accent-green);
  width: 0.7em;
  height: 1.1em;
  animation: blink 1s step-end infinite;
  vertical-align: bottom;
  box-shadow: 0 0 5px var(--color-accent-green);
}

/* Responsive */
@media (max-width: 768px) {
  .testimonial-terminal {
    flex-direction: column;
    min-height: 550px;
  }
  .testimonial-sources-list, .testimonial-display {
    width: 100%;
  }
  .testimonial-sources-list {
    border-right: none;
    border-bottom: 1px solid color-mix(in srgb, var(--color-accent-green) 30%, transparent);
    max-height: 200px;
  }
  .testimonial-display {
    font-size: 1.1rem;
    padding: 1.5rem;
  }
}

/* ======================================================= */
/*    STYLES POUR LE NOUVEAU POP-UP DE MISE À JOUR (CORRIGÉ) */
/* ======================================================= */
.projects-update-popup-overlay {
  position: fixed;
  bottom: 0;
  right: 0; /* Changé de 'left: 0' à 'right: 0' */
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0); /* Fond transparent, on ne veut que la popup */
  display: flex;
  justify-content: flex-end;  /* Aligné à droite */
  align-items: flex-end;    /* Aligné en bas */
  z-index: 10001;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.4s ease;
  /* On s'assure qu'il ne cache pas le bouton "retour en haut" */
  padding: 2rem;
}

.projects-update-popup-overlay.visible {
  opacity: 1;
  pointer-events: all;
}

.projects-update-popup {
  background-color: var(--accent);
  color: var(--primary);
  border: 1px solid color-mix(in srgb, var(--primary) 15%, transparent);
  border-radius: 12px;
  padding: 1.8rem;
  max-width: 320px; /* Taille similaire à l'autre popup */
  width: 100%;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
  position: relative;
  text-align: left; /* Plus lisible pour ce format */
  cursor: default;
  /* Animation d'apparition */
  transform: translateY(20px);
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  animation: float-subtle 6s ease-in-out infinite; /* Ajout de l'animation de flottement */
}

.projects-update-popup-overlay.visible .projects-update-popup {
    transform: translateY(0);
}

.projects-update-popup h4 {
  font-size: 1.3rem;
  margin-top: 0;
  margin-bottom: 1rem;
}

.projects-update-popup p {
  font-size: 0.95rem;
  line-height: 1.7;
  margin: 0;
}
.projects-update-popup p strong {
    color: var(--color-accent-green);
}

.projects-update-popup-close {
  position: absolute;
  top: 0.5rem;
  right: 0.8rem;
  background: none;
  border: none;
  font-size: 1.8rem;
  color: var(--primary);
  opacity: 0.6;
  cursor: pointer;
  transition: opacity 0.3s, transform 0.3s;
}

.projects-update-popup-close:hover {
  opacity: 1;
  transform: scale(1.1);
}