.titre-competences {
    margin-top: 90px; /* Pour ne pas être caché par le menu fixe */
    text-align: center;
    color: #2c3e50;
}

.competences-container {
    /* Un bloc par ligne, largeur complète du conteneur */
    max-width: 900px;
    margin: 15px auto 20px auto;
    display: flex;
    flex-direction: column;
    gap: 12px; /* moins d'espace entre les blocs */
    justify-content: center;
    padding: 0 12px;
}

.competences-block {
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 2px 6px rgba(44,62,80,0.06);
    padding: 14px 16px; /* moins de blanc intérieur */
    width: 100%; /* occupe toute la largeur du conteneur */
    min-height: auto; /* s'adapte au contenu */
    display: flex;
    flex-direction: column;
    justify-content: center;
    transition: transform 0.18s, box-shadow 0.18s;
}
.competences-block:hover {
    transform: translateY(-4px) scale(1.01);
    box-shadow: 0 6px 14px rgba(44,62,80,0.10);
}
.competences-block h2 {
    margin: 0 0 6px 0; /* moins d'espace au-dessus et en dessous */
    color: #2980b9;
    font-size: 18px; /* légèrement plus compact */
    line-height: 1.2;
}
.competences-block a {
    margin-top: 6px; /* espace réduit entre le titre et le lien */
    color: #e67e22;
    font-weight: 700;
    text-decoration: none;
    align-self: flex-start;
    font-size: 14px;
}
.competences-block a:hover {
    text-decoration: underline;
}
/* =======================================================
   === STYLE MODALE DE RÉALISATION AVANCÉE ===
   ======================================================= */

/* Empêche le fond de défiler quand la modale est ouverte */
body.modal-open {
  overflow: hidden;
}

/* Fond semi-transparent + flou */
.modal {
  display: none;
  position: fixed;
  inset: 0;
  background-color: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(4px);
  z-index: 100;
  justify-content: center;
  align-items: center;
  animation: fadeIn 0.3s ease-in-out;
}

/* Conteneur principal */
.modal-content {
  background: #fff;
  border-radius: 15px;
  width: calc(100% - 20px);
  max-width: 1200px;
  max-height: 90vh;
  overflow-y: auto;
  position: relative;
  display: flex;
  flex-direction: column;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
  animation: zoomIn 0.3s ease-in-out;
  transition: all 0.3s ease;
}

/* Quand agrandie */
.modal-content.expanded {
  width: calc(100% - 20px);
  height: calc(100vh - 20px);
  max-width: none;
  max-height: none;
}

/* Bouton de fermeture */
.close {
  position: absolute;
  top: 15px;
  right: 25px;
  font-size: 30px;
  cursor: pointer;
  color: #555;
  transition: 0.2s;
  z-index: 10;
}
.close:hover {
  color: #000;
  transform: scale(1.1);
}

/* Bouton Agrandir / Réduire */
.expand-btn {
  position: absolute;
  top: 15px;
  left: 25px;
  background: #007bff;
  color: white;
  border: none;
  border-radius: 8px;
  padding: 8px 14px;
  cursor: pointer;
  font-size: 14px;
  transition: background 0.3s, transform 0.2s;
  z-index: 10;
}
.expand-btn:hover {
  background: #0056b3;
  transform: translateY(-1px);
}

/* Structure interne */
.modal-body {
  display: flex;
  gap: 40px;
  padding: 70px 50px 50px;
}

/* Partie gauche : contenu défilant */
.modal-text {
  flex: 3;
  overflow-y: auto;
  max-height: 70vh;
  scroll-behavior: smooth;
}
.modal-text h1 {
  margin-top: 0;
  color: #222;
  font-size: 1.9em;
}
.modal-text h2 {
  margin-top: 1.5em;
  color: #333;
  font-size: 1.3em;
  border-left: 4px solid #007bff;
  padding-left: 10px;
}
.modal-text p {
  line-height: 1.6;
  color: #444;
  margin-bottom: 1em;
}

/* Partie droite : sommaire fixe */
.sommaire-fixed {
  flex: 1;
  max-width: 250px;
  position: sticky;
  top: 80px;
  align-self: flex-start;
  background: #f9f9f9;
  border-radius: 12px;
  padding: 15px;
  height: fit-content;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
}
.sommaire-fixed h3 {
  margin-top: 0;
  font-size: 1.1em;
  color: #222;
}
.sommaire-fixed ul {
  list-style: none;
  padding-left: 0;
  margin: 0;
}
.sommaire-fixed li {
  margin: 6px 0;
}
.sommaire-fixed a {
  text-decoration: none;
  color: #333;
  display: block;
  font-size: 0.95em;
  transition: color 0.2s, font-weight 0.2s;
}
.sommaire-fixed a:hover {
  color: #007bff;
}
.sommaire-fixed a.active {
  font-weight: bold;
  color: #007bff;
}

/* Scroll interne */
.modal-text::-webkit-scrollbar {
  width: 8px;
}
.modal-text::-webkit-scrollbar-thumb {
  background: #ccc;
  border-radius: 4px;
}
.modal-text::-webkit-scrollbar-thumb:hover {
  background: #999;
}

/* Animations */
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}
@keyframes zoomIn {
  from { transform: scale(0.97); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}

/* Responsive */
@media (max-width: 800px) {
  .modal-body {
    flex-direction: column;
    padding: 60px 20px;
  }
  .sommaire-fixed {
    position: relative;
    top: 0;
    max-width: none;
    width: 100%;
    margin-bottom: 25px;
  }
  .modal-text {
    max-height: none;
  }
  .expand-btn {
    top: 10px;
    left: 10px;
  }
}
