:root {
  --color-background: #fff5e6;
  --color-text-primary: #333;
  --color-text-secondary: #666;
  --color-text-hover: #333;
  --color-white: #fff3e0;
  --font-family-main: "Poppins", sans-serif;
}

html body {
  background-color: var(--color-background);
  color: var(--color-white);
  font-family: var(--font-family-main);
}

body {
  display: flex;
  flex-direction: column;
  height: 100vh;
  overflow: hidden;
  margin: 0;
  padding: 0;
}

h1 {
  text-align: center;
  color: var(--color-text-primary);
  padding: 0;
  margin: 0;
  font-size: 5rem;
  display: flex;
  justify-content: center;
  gap: 1rem;
}

.h1-first,
.h1-second {
  display: inline-block;
  transition: transform 0.5s ease, opacity 0.3s ease;
  opacity: 1;
}

.index-page-container.minimized .h1-first {
  transform: translateX(-100px);
  opacity: 0;
}

.index-page-container.minimized .h1-second {
  transform: translateX(100px);
  opacity: 0;
}

.subtitle {
  color: var(--color-text-secondary);
  font-size: 1.2rem;
  font-weight: 400;
  margin: 0;
  opacity: 0.8;
  text-align: center;
  margin-top: -0.5rem;
  transition: opacity 0.3s ease, transform 0.5s ease;
}

.index-page-container.minimized .subtitle {
  opacity: 0;
  transform: translateY(20px);
}

header {
  position: fixed;
  top: 0;
  width: 100%;
  background-color: var(--color-background);
  z-index: 100;
  padding: 0.1rem;
  box-shadow: none;
  transition: box-shadow 0.3s ease;
}

header ul {
  display: flex;
  justify-content: center;
  gap: 2rem;
  align-items: center;
  list-style: none;
  padding: 0;
  margin: 0;
}

header a {
  color: var(--color-text-secondary);
  text-decoration: none;
  font-size: 1.5rem;
  transition: color 0.3s ease, transform 0.3s ease;
  font-weight: 400;
  display: flex;
  justify-content: center;
  align-items: center;
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background-color: rgba(255, 255, 255, 0.1);
}

header a:hover {
  color: var(--color-text-hover);
  transform: translateY(-3px);
  background-color: rgba(255, 255, 255, 0.2);
}

header i {
  font-size: 2.2rem;
}

/* Style pour le badge CV */
.cv-link {
  position: relative;
}

.cv-badge {
  position: absolute;
  top: 5px;
  left: 5px;
  background-color: rgba(102, 102, 102, 0.8);
  color: var(--color-white);
  font-size: 0.65rem;
  font-weight: 500;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  display: flex;
  justify-content: center;
  align-items: center;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.15);
  transition: transform 0.3s ease, background-color 0.3s ease;
  border: 1px solid rgba(255, 255, 255, 0.3);
  z-index: 2;
}

.cv-link:hover .cv-badge {
  transform: scale(1.1);
  background-color: rgba(102, 102, 102, 1);
}

.content-section {
  background-color: white;
  flex: 1;
  margin-top: 60px;
  min-height: calc(100vh - 60px);
  position: relative;
  z-index: 1;
  display: flex;
  box-shadow: inset 0 6px 12px rgba(51, 51, 51, 0.2);
}

.content-left {
  width: 10%;
  position: relative;
  padding: 2rem;
  background-color: var(--color-text-primary);
}

.content-right {
  width: 90%;
  position: relative;
  padding: 1rem 2rem 0 2rem;
  box-shadow: inset 6px 0 12px rgba(51, 51, 51, 0.4);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.index-center-box {
  display: flex;
  flex-direction: column;
  padding: 1rem;
  justify-content: center;
  align-items: center;
  overflow: hidden;
  background-color: var(--color-background);
  border-radius: 1rem;
  width: 100%;
  height: 100%;
  gap: 2rem;
}

.index-page-container {
  width: 100%;
  height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  transition: transform 0.5s ease, box-shadow 0.3s ease;
  position: fixed;
  bottom: 0;
  left: 0;
  background-color: var(--color-background);
  z-index: 2;
  box-shadow: none;
}

.index-page-container.minimized {
  transform: translateY(calc(100vh - 60px));
  box-shadow: 0 -6px 12px rgba(51, 51, 51, 0.2);
}

.index-page-container.minimized .index-center-box {
  height: 60px;
  padding: 0;
  gap: 0;
}

.index-page-container.minimized .arrow {
  animation: none;
  transform: translateY(0);
}

.scroll-button {
  background: none;
  border: none;
  cursor: pointer;
  padding: 10px;
  transition: transform 0.3s ease;
  position: relative;
  z-index: 3;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
}

.scroll-button:hover {
  transform: translateY(5px);
}

.scroll-button-minimized {
  opacity: 0;
  visibility: hidden;
  position: fixed;
  bottom: 15px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 3;
  background: none;
  border: none;
  cursor: pointer;
  padding: 10px;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

.index-page-container.minimized + .scroll-button-minimized {
  opacity: 1;
  visibility: visible;
}

.scroll-button-minimized .arrow {
  animation: none;
  transform: translateY(0);
}

.scroll-button-minimized:hover {
  transform: translateX(-50%) translateY(-5px);
}

.arrow {
  font-size: 2.5em;
  color: var(--color-text-primary);
  display: block;
  animation: bounce 2s infinite;
  text-align: center;
  line-height: 1;
}

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

.footer {
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  padding: 1.5rem;
  background-color: var(--color-background);
  text-align: center;
  color: var(--color-text-secondary);
  font-size: 0.9rem;
  z-index: 3;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.5s ease, visibility 0.5s ease;
}

.footer-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 0.5rem;
  position: relative;
}

.footer-line {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
}

.footer-separator {
  opacity: 0.7;
}

.info-container {
  position: relative;
  display: inline-block;
  margin-left: 0.5rem;
}

.info-icon {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background-color: transparent;
  color: var(--color-text-secondary);
  font-size: 0.7rem;
  font-style: normal;
  font-weight: bold;
  cursor: pointer;
  transition: color 0.3s ease;
  border: 1px solid var(--color-text-secondary);
  line-height: 1;
  padding-top: 2px;
}

.info-icon:hover {
  color: var(--color-text-hover);
  border-color: var(--color-text-hover);
}

.legal-notice-popup {
  position: absolute;
  bottom: 100%;
  left: 50%;
  transform: translateX(-50%);
  background-color: white;
  color: var(--color-text-secondary);
  padding: 0.8rem 1rem;
  border-radius: 0.5rem;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
  width: 600px;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
  z-index: 10;
  margin-bottom: 10px;
}

.info-container:hover .legal-notice-popup {
  opacity: 1;
  visibility: visible;
}

.legal-notice-popup p {
  margin: 0;
  font-size: 0.8rem;
  line-height: 1.4;
  text-align: center;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.legal-notice-popup::after {
  content: "";
  position: absolute;
  bottom: -8px;
  left: 50%;
  transform: translateX(-50%);
  border-left: 8px solid transparent;
  border-right: 8px solid transparent;
  border-top: 8px solid white;
}

.contact-line {
  display: none;
}

.legal-notice {
  display: none;
}

.footer a {
  color: var(--color-text-secondary);
  text-decoration: none;
  transition: color 0.3s ease;
}

.footer a:hover {
  color: var(--color-text-hover);
}

.index-page-container:not(.minimized) ~ .footer {
  opacity: 1;
  visibility: visible;
}

.nav-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin-top: 20%;
  height: 80%;
}

.nav-item {
  padding: 0.5rem 0.5rem;
  cursor: pointer;
  transition: all 0.3s ease;
  border-radius: 0.5rem;
  color: var(--color-white);
  font-size: 1.5rem;
  width: fit-content;
}

.nav-item[data-section="competences"] {
  position: relative;
  padding-right: 0.5rem;
  padding-bottom: 1.5rem;
  order: 10;
}

.nav-item[data-section="competences"]::after {
  content: "▾";
  position: absolute;
  left: 50%;
  bottom: 0.2rem;
  transform: translateX(-50%);
  font-size: 1rem;
  opacity: 0.7;
  transition: transform 0.3s ease, opacity 0.3s ease;
}

.nav-item[data-section="competences"].active::after {
  opacity: 1;
  transform: translateX(-50%) rotate(180deg);
}

.nav-item:hover {
  background-color: rgba(255, 255, 255, 0.1);
  color: white;
  width: fit-content;
}

.nav-item.active {
  background-color: rgba(255, 255, 255, 0.2);
  color: white;
  font-weight: 500;
  width: fit-content;
}

.content-right .content-section {
  display: none;
  opacity: 0;
  transition: opacity 0.3s ease;
  box-shadow: none;
  height: 100%;
  overflow-y: auto;
  padding-bottom: 2rem;
  padding-top: 1rem;
  margin-top: 0;
}

.content-right .content-section.active {
  display: flex;
  flex-direction: column;
  opacity: 1;
  max-height: calc(100vh - 120px);
  overflow-y: auto;
}

.content-right h2 {
  color: var(--color-text-primary);
  margin-bottom: 1.5rem;
  margin-top: 0;
  padding-top: 0;
  font-size: 2rem;
}

.content-right p {
  color: var(--color-text-secondary);
  line-height: 1.6;
  font-size: 1.1rem;
  margin-bottom: 2rem;
}

.content-section-active {
  display: block;
  opacity: 1;
  visibility: visible;
  padding: 2rem;
}

.index-page-container.minimized ~ header {
  box-shadow: none;
}

/* Styles pour la carte des technologies */
.tech-card {
  background-color: transparent;
  padding: 0.8rem 1.5rem 1.5rem 1.5rem;
  margin-top: 0;
  width: 40%;
  height: auto;
  margin-left: 0;
}

.section-title {
  color: var(--color-text-primary);
  margin-top: 0;
  margin-bottom: 2rem;
  text-align: center;
  font-size: 2rem;
  width: 100%;
  font-weight: 500;
}

.tech-card h3 {
  margin-top: 0;
  margin-bottom: 1.5rem;
}

.tech-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.4rem;
  column-gap: 0.2rem;
  row-gap: 0.7rem;
  margin-top: 3rem;
}

/* Styles pour les éléments tech-item dans la section accueil */
#accueil .tech-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  transition: transform 0.3s ease;
  position: relative;
  cursor: pointer;
}

#accueil .tech-item:hover {
  transform: translateY(-5px);
}

/* Styles généraux pour tech-item (pour les autres sections) */
.tech-item {
  position: relative;
  cursor: pointer;
}

.tech-icon {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 80px;
  height: 80px;
  background-color: transparent;
  border-radius: 50%;
  margin-bottom: 0.5rem;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.tech-icon i {
  font-size: 2.6rem;
}

.tech-item span {
  color: var(--color-text-secondary);
  font-weight: 500;
  text-align: center;
  display: block;
}

/* Styles spécifiques pour les icônes des technologies */
.fa-react {
  color: #61dafb;
}

.fa-js {
  color: #f7df1e;
}

.ts-logo {
  width: 35px;
  height: 35px;
  background-color: #3178c6;
  border-radius: 0;
  display: flex;
  justify-content: flex-end;
  align-items: flex-end;
  padding-right: 2px;
  padding-bottom: 2px;
}

.ts-logo span {
  font-size: 1.3rem;
  color: white;
  font-weight: bold;
  font-family: "Arial", sans-serif;
  line-height: 1;
}

.fa-php {
  color: #777bb4;
}

.fa-java {
  color: #007396;
}

.fa-html5 {
  color: #e34f26;
}

.fa-css3-alt {
  color: #1572b6;
}

/* Couleurs pour les nouvelles technologies */
.fa-node-js {
  color: #68a063;
}

.tech-item:nth-child(9) .fa-database {
  color: #f29111; /* Couleur pour SQL */
}

.tech-item:nth-child(10) .fa-database {
  color: #333333; /* Couleur noire pour NoSQL */
}

.fa-exchange-alt {
  color: #3498db; /* Couleur bleue pour API REST */
}

.fa-cloud {
  color: #0078d4; /* Bleu Azure intense */
  font-size: 2.6rem;
}

/* Styles pour le conteneur de profil */
.profile-container {
  display: flex;
  width: 100%;
  margin-top: 2rem;
  height: auto;
  min-height: 70vh;
  max-height: 80vh;
  align-items: center;
  overflow: hidden;
}

/* Séparateur vertical entre la carte tech et les infos de profil */
.profile-separator {
  width: 1px;
  height: 80%;
  background-color: rgba(0, 0, 0, 0.2);
  margin: 0 2rem;
}

/* Section d'informations de profil */
.profile-info {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  width: 50%;
  gap: 2rem;
}

/* Texte de profil */
.profile-text {
  width: 100%;
}

.profile-text p {
  color: var(--color-text-secondary);
  line-height: 1.6;
  font-size: 1.1rem;
  text-align: center;
}

/* Photo de profil */
.profile-photo {
  width: 200px;
  height: 200px;
  border-radius: 50%;
  overflow: hidden;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.profile-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Media Queries pour la responsivité */
@media screen and (max-width: 1200px) {
  .profile-container {
    flex-direction: column-reverse;
    height: auto;
    gap: 2rem;
  }

  .tech-card {
    width: 80%;
    margin: 0 auto;
  }

  .profile-separator {
    width: 80%;
    height: 1px;
    margin: 1rem auto;
  }

  .profile-info {
    width: 80%;
    margin: 0 auto;
  }
}

@media screen and (max-width: 768px) {
  .content-section {
    flex-direction: column;
  }

  .content-left {
    width: 100%;
    padding: 1rem;
    height: auto;
  }

  .content-right {
    width: 100%;
    padding: 1rem;
    overflow-y: auto;
  }

  .content-right .content-section {
    overflow-y: auto;
    height: auto;
    min-height: 100%;
  }

  .profile-container {
    overflow-y: visible;
    max-height: none;
  }

  .nav-list {
    flex-direction: row;
    justify-content: center;
    flex-wrap: wrap;
    margin-top: 0;
    height: auto;
    gap: 0.5rem;
  }

  .content-separator {
    display: none;
  }

  h1 {
    font-size: 3.5rem;
  }

  .tech-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .index-page-container.minimized {
    transform: translateY(calc(100vh - 80px));
  }

  .index-page-container.minimized .index-center-box {
    height: 80px;
  }

  .footer-content {
    flex-direction: column;
    gap: 0.2rem;
  }

  .footer-content span:nth-child(2) {
    display: none;
  }

  .competence-item,
  .competence-item.reverse {
    flex-direction: column;
    gap: 1.5rem;
  }

  .competence-image {
    width: 100%;
  }

  .competence-text {
    width: 100%;
  }

  .competence-item .competence-image,
  .competence-item.reverse .competence-image {
    order: 1;
  }

  .competence-item .competence-text,
  .competence-item.reverse .competence-text {
    order: 2;
  }

  .competence-container {
    padding-bottom: 6rem; /* Espace supplémentaire en bas sur mobile */
  }

  .competence-container:after {
    height: 80px; /* Hauteur supplémentaire sur mobile */
  }

  .competence-item:last-child {
    margin-bottom: 7rem; /* Marge plus importante sur mobile */
  }
}

@media screen and (max-width: 480px) {
  .content-right {
    max-height: calc(100vh - 150px);
    overflow-y: auto;
  }

  .content-right .content-section {
    max-height: none;
    overflow-y: visible;
  }

  .profile-container {
    overflow-y: visible;
    max-height: none;
    min-height: auto;
  }

  h1 {
    font-size: 2.5rem;
    flex-direction: column;
    gap: 0.5rem;
  }

  header ul {
    gap: 1rem;
  }

  header a {
    width: 50px;
    height: 50px;
  }

  header i {
    font-size: 1.8rem;
  }

  .tech-grid {
    grid-template-columns: repeat(2, 1fr);
    column-gap: 0.2rem;
    row-gap: 0.5rem;
  }

  .profile-photo {
    width: 150px;
    height: 150px;
  }

  .nav-item {
    font-size: 1.2rem;
    padding: 0.3rem;
  }

  .content-right p {
    font-size: 1rem;
  }

  .content-right h2 {
    font-size: 1.5rem;
  }

  .tech-card h3 {
    font-size: 1.3rem;
  }

  .tech-icon {
    width: 60px;
    height: 60px;
  }

  .tech-icon i {
    font-size: 2rem;
  }

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

/* Ajustements pour les très petits écrans */
@media screen and (max-width: 360px) {
  header ul {
    gap: 0.5rem;
  }

  header a {
    width: 45px;
    height: 45px;
  }

  header i {
    font-size: 1.5rem;
  }

  h1 {
    font-size: 2rem;
  }

  .tech-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 0.3rem;
  }

  .profile-photo {
    width: 120px;
    height: 120px;
  }

  .nav-item {
    font-size: 1rem;
  }
}

/* Amélioration pour les appareils tactiles */
@media (hover: none) {
  .nav-item:hover,
  .tech-item:hover,
  header a:hover,
  .scroll-button:hover,
  .scroll-button-minimized:hover {
    transform: none;
  }

  .nav-item:active,
  header a:active {
    background-color: rgba(255, 255, 255, 0.2);
  }

  .tech-item:active {
    transform: translateY(-3px);
  }
}

/* Styles pour la frise chronologique */
.timeline-container {
  position: relative;
  max-width: 800px;
  margin: 2rem auto;
  padding: 2rem 0;
}

.timeline-line {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 50%;
  width: 4px;
  height: 100%;
  transform: translateX(-50%);
  background-image: linear-gradient(
    to bottom,
    transparent 0%,
    transparent 50%,
    var(--color-text-secondary) 50%,
    var(--color-text-secondary) 100%
  );
  background-size: 4px 20px;
  z-index: 1;
}

.timeline-item {
  position: relative;
  display: flex;
  align-items: center;
  margin-bottom: 2rem;
  z-index: 2;
  height: 150px;
}

.timeline-item:last-child {
  margin-bottom: 2rem;
}

.timeline-bubble {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  width: 100px;
  height: 100px;
  border-radius: 50%;
  background-color: white;
  display: flex;
  justify-content: center;
  align-items: center;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
  z-index: 3;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  cursor: pointer;
  position: relative;
}

.timeline-bubble::after {
  content: "i";
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translate(-50%, 50%);
  width: 20px;
  height: 20px;
  background-color: rgba(102, 102, 102, 0.8);
  color: white;
  border-radius: 50%;
  font-size: 14px;
  font-weight: bold;
  display: flex;
  justify-content: center;
  align-items: center;
  font-style: italic;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
  border: 1px solid rgba(255, 255, 255, 0.3);
}

.timeline-bubble:hover {
  transform: translateX(-50%) scale(1.05);
  box-shadow: 0 6px 12px rgba(0, 0, 0, 0.3);
}

.timeline-bubble:hover::after {
  background-color: rgba(102, 102, 102, 1);
}

.timeline-bubble i {
  font-size: 3rem;
  color: var(--color-text-primary);
}

.timeline-content {
  width: 250px;
  padding: 1rem;
  background-color: white;
  border-radius: 0.5rem;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  z-index: 2;
  transition: all 0.3s ease;
}

.timeline-content-left {
  text-align: right;
  position: absolute;
  right: calc(50% + 70px);
  opacity: 0;
  visibility: hidden;
  transform: translateX(-20px);
}

.timeline-bubble:hover ~ .timeline-content-left,
.timeline-content-left:hover {
  opacity: 1;
  visibility: visible;
  transform: translateX(0);
}

.timeline-content-right {
  text-align: left;
  position: absolute;
  left: calc(50% + 70px);
}

.timeline-content h3 {
  color: var(--color-text-primary);
  margin-top: 0;
  margin-bottom: 0.5rem;
  font-size: 1.2rem;
}

.timeline-content p {
  color: var(--color-text-secondary);
  margin: 0;
  font-size: 0.9rem;
  line-height: 1.4;
}

/* Couleurs spécifiques pour chaque icône */
.timeline-item:nth-child(2) .timeline-bubble i {
  color: #3178c6; /* Couleur TypeScript/informatique */
}

.timeline-item:nth-child(3) .timeline-bubble i {
  color: #61dafb; /* Couleur React/développement */
}

.timeline-item:first-child .timeline-bubble i {
  color: #4caf50; /* Couleur verte pour la biologie */
}

/* Media Queries pour la responsivité de la timeline */
@media screen and (max-width: 768px) {
  .timeline-line {
    left: 50px;
  }

  .timeline-item {
    flex-direction: column;
    align-items: flex-start;
    padding-left: 0;
    margin-left: 0;
    margin-bottom: 5rem;
    min-height: 200px;
  }

  .timeline-bubble {
    position: absolute;
    left: 50px;
    transform: translateX(-50%);
  }

  .timeline-bubble:hover {
    transform: translateX(-50%) scale(1.05);
  }

  .timeline-content-right {
    position: absolute;
    left: 100px;
    top: 0;
    width: calc(100% - 120px);
  }

  .timeline-content-left {
    position: absolute;
    left: 100px;
    top: 120px;
    right: auto;
    text-align: left;
    width: calc(100% - 120px);
    transform: translateY(-20px);
  }

  .timeline-bubble:hover ~ .timeline-content-left,
  .timeline-content-left:hover {
    transform: translateY(0);
  }
}

@media screen and (max-width: 480px) {
  .timeline-item {
    margin-bottom: 4rem;
  }

  .timeline-bubble {
    width: 80px;
    height: 80px;
    left: 40px;
  }

  .timeline-bubble i {
    font-size: 2.5rem;
  }

  .timeline-line {
    left: 40px;
  }

  .timeline-content-right,
  .timeline-content-left {
    left: 80px;
    width: calc(100% - 90px);
  }

  .timeline-content-left {
    top: 100px;
  }

  .timeline-bubble::after {
    width: 16px;
    height: 16px;
    font-size: 12px;
    bottom: 5px;
    right: 5px;
  }
}

/* Amélioration pour les appareils tactiles */
@media (hover: none) {
  .timeline-bubble:hover {
    transform: translateX(-50%);
  }

  .timeline-bubble:active {
    transform: translateX(-50%) scale(1.05);
  }

  .timeline-bubble:active ~ .timeline-content-left {
    opacity: 1;
    visibility: visible;
    transform: translateX(0);
  }

  @media screen and (max-width: 768px) {
    .timeline-bubble:hover,
    .timeline-bubble:active {
      transform: translateX(-50%);
    }

    .timeline-bubble:active {
      transform: translateX(-50%) scale(1.05);
    }

    .timeline-bubble:active ~ .timeline-content-left {
      transform: translateY(0);
    }
  }
}

.tech-details {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  width: 100%;
  background: var(--color-background);
  border: 1px solid var(--color-border);
  border-radius: 8px;
  padding: 1rem;
  margin-top: 0.5rem;
  z-index: 1000;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.tech-item.active .tech-details {
  display: block;
}

.tech-block {
  margin-bottom: 1.5rem;
}

.tech-block:last-child {
  margin-bottom: 0;
}

.tech-block h4 {
  color: var(--color-text-primary);
  font-size: 1.1rem;
  margin-bottom: 0.5rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--color-border);
}

.tech-block ul {
  list-style: none;
  padding-left: 1.5rem;
  margin: 0;
}

.tech-block li {
  color: var(--color-text-secondary);
  font-size: 0.9rem;
  margin-bottom: 0.3rem;
  position: relative;
}

.tech-block li::before {
  content: "•";
  position: absolute;
  left: -1rem;
  color: var(--color-accent);
}

@media (max-width: 768px) {
  .tech-details {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 90%;
    max-width: 500px;
    max-height: 80vh;
    overflow-y: auto;
  }
}

.blocs-container {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 2rem;
  padding: 1rem;
}

.tech-block {
  background: white;
  border-radius: 8px;
  padding: 1.5rem;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.tech-block:hover {
  transform: translateY(-5px);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.tech-block h4 {
  color: var(--color-text-primary);
  font-size: 1.2rem;
  margin-bottom: 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid var(--color-accent);
}

.tech-block ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.tech-block li {
  color: var(--color-text-secondary);
  font-size: 0.9rem;
  margin-bottom: 0.5rem;
  padding-left: 1.5rem;
  position: relative;
}

.tech-block li::before {
  content: "•";
  position: absolute;
  left: 0;
  color: var(--color-accent);
}

@media screen and (max-width: 768px) {
  .blocs-container {
    grid-template-columns: 1fr;
    gap: 1rem;
  }

  .tech-block {
    padding: 1rem;
  }
}

/* Styles pour les blocs de détails */
.bloc-details {
  background: white;
  border-radius: 8px;
  padding: 1.5rem;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  margin-top: 1rem;
  max-width: 800px;
  animation: fadeIn 0.3s ease;
}

.bloc-details ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.bloc-details li {
  color: var(--color-text-secondary);
  font-size: 1rem;
  margin-bottom: 0.5rem;
  padding-left: 1.5rem;
  position: relative;
}

.bloc-details li::before {
  content: "•";
  position: absolute;
  left: 0;
  color: var(--color-accent);
}

/* Styles pour le sous-menu */
.sub-menu-container {
  overflow: hidden;
  max-height: 0;
  transition: max-height 0.3s ease;
  margin-left: 1rem;
  order: 11;
}

.sub-menu {
  list-style: none;
  padding: 0;
  margin: 0.5rem 0 1rem 0;
}

.sub-nav-item {
  padding: 0.3rem 0.5rem 0.3rem 1.2rem;
  cursor: pointer;
  transition: all 0.3s ease;
  border-radius: 0.5rem;
  color: var(--color-white);
  font-size: 1rem;
  opacity: 0.8;
  margin-bottom: 0.3rem;
  width: fit-content;
  position: relative;
}

.sub-nav-item::before {
  content: "";
  position: absolute;
  left: 0.5rem;
  top: 0.7rem;
  width: 6px;
  height: 6px;
  background-color: rgba(255, 255, 255, 0.6);
  border-radius: 50%;
  transition: background-color 0.3s ease;
}

.sub-nav-item:hover::before {
  background-color: white;
}

.sub-nav-item:hover {
  background-color: rgba(255, 255, 255, 0.1);
  color: white;
  opacity: 1;
}

.sub-nav-item.active {
  background-color: rgba(255, 255, 255, 0.2);
  color: white;
  font-weight: 500;
  opacity: 1;
}

.sub-nav-item.active::before {
  background-color: white;
  width: 8px;
  height: 8px;
}

.nav-item[data-section="competences"].active + .sub-menu-container {
  max-height: 350px;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media screen and (max-width: 768px) {
  .sub-menu-container {
    margin-left: 0;
  }

  .sub-menu {
    display: flex;
    flex-wrap: wrap;
    gap: 0.3rem;
  }

  .sub-nav-item {
    font-size: 0.9rem;
    padding: 0.2rem 0.4rem;
  }

  .bloc-details {
    padding: 1rem;
  }
}

/* Styles pour l'affichage du PDF */
.pdf-container {
  width: 100%;
  max-width: 1000px;
  margin: 2rem auto;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.pdf-container embed {
  display: block;
  border: none;
}

.pdf-fallback {
  display: none;
  padding: 2rem;
  text-align: center;
  color: var(--color-text-secondary);
}

/* Pour les navigateurs qui ne supportent pas l'affichage des PDF */
.pdf-container:empty + .pdf-fallback {
  display: block;
}

@media screen and (max-width: 768px) {
  .pdf-container {
    height: 500px;
  }

  .pdf-container embed {
    height: 100%;
  }
}

@media screen and (max-width: 480px) {
  .pdf-container {
    height: 400px;
  }
}

/* Styles pour les sections de compétences */
.competence-container {
  max-width: 900px;
  margin: 2rem auto;
  padding: 1rem;
  width: 100%;
  padding-bottom: 4rem;
}

/* Élément invisible pour créer de l'espace en bas */
.competence-container:after {
  content: "";
  display: block;
  height: 60px;
  width: 100%;
}

.content-section .competence-container {
  display: flex;
  flex-direction: column;
  width: 100%;
}

.competence-item {
  display: flex;
  align-items: center;
  gap: 2rem;
  margin-bottom: 2rem;
  flex-direction: row;
}

.competence-item .competence-image {
  order: 1;
}

.competence-item .competence-text {
  order: 2;
}

.competence-item.reverse {
  flex-direction: row-reverse;
}

.competence-item.reverse .competence-image {
  order: 2;
}

.competence-item.reverse .competence-text {
  order: 1;
}

.competence-item:last-child {
  margin-bottom: 5rem; /* Marge importante après le dernier élément */
}

.competence-image {
  flex: 1;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.competence-image:hover {
  transform: translateY(-5px);
  box-shadow: 0 6px 12px rgba(0, 0, 0, 0.2);
}

.competence-image img {
  width: 100%;
  height: auto;
  display: block;
  object-fit: cover;
}

.competence-text {
  flex: 1.5;
}

.competence-text h3 {
  color: var(--color-text-primary);
  margin-top: 0;
  margin-bottom: 1rem;
  font-size: 1.4rem;
}

.competence-text p {
  color: var(--color-text-secondary);
  margin-bottom: 1rem;
  line-height: 1.6;
}

.competence-separator {
  width: 100%;
  height: 1px;
  background-color: rgba(0, 0, 0, 0.1);
  margin: 3rem 0;
}

/* Media Queries pour les compétences */
@media screen and (max-width: 768px) {
  .competence-item,
  .competence-item.reverse {
    flex-direction: column;
    gap: 1.5rem;
  }

  .competence-image {
    width: 100%;
  }

  .competence-text {
    width: 100%;
  }

  .competence-item .competence-image,
  .competence-item.reverse .competence-image {
    order: 1;
  }

  .competence-item .competence-text,
  .competence-item.reverse .competence-text {
    order: 2;
  }

  .competence-container {
    padding-bottom: 6rem; /* Espace supplémentaire en bas sur mobile */
  }

  .competence-container:after {
    height: 80px; /* Hauteur supplémentaire sur mobile */
  }

  .competence-item:last-child {
    margin-bottom: 7rem; /* Marge plus importante sur mobile */
  }
}
