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

.realisations-container {
    max-width: 900px;
    margin: 30px auto 40px auto;
    display: flex;
    flex-wrap: wrap;
    gap: 24px;
    justify-content: center;
}

.realisation-block {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(44,62,80,0.08);
    padding: 24px;
    width: 350px;
    min-height: 180px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    transition: transform 0.2s;
}
.realisation-block:hover {
    transform: translateY(-6px) scale(1.03);
    box-shadow: 0 6px 18px rgba(44,62,80,0.12);
}
.realisation-block h2 {
    margin-top: 0;
    color: #2980b9;
    font-size: 22px;
}
.realisation-block a {
    margin-top: 12px;
    color: #e67e22;
    font-weight: bold;
    text-decoration: none;
}
.realisation-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;
  }
}
