/* Structure de base */

.main-container {
  padding: 2rem;
}

.projets-grid {
  display: inline-grid;
  grid-template-columns: repeat(auto-fill, minmax(290px, 1fr));
  gap: 1.5rem;
}

.carte-projet {
  border: 1px solid #dddddd;
  border-radius: 6px;
  overflow: hidden;
  cursor: pointer;
  transition: box-shadow 0.3s ease;
}

.carte-projet:hover {
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.carte-image {
  width: 100%;
  height: 180px;
  object-fit: cover;
}

.carte-texte {
  padding: 1rem;
}

.btn-container {
  text-align: center;
  margin-top: 2rem;
}

.btn-voir-plus {
  padding: 0.75rem 2rem;
  font-size: 1rem;
  background-color: #004e7c;
  color: white;
  border: none;
  border-radius: 4px;
  cursor: pointer;
}

.hidden {
  display: none !important;
}

/* Modale */
.modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: rgba(0, 0, 0, 0.6);
  z-index: 1000;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.modal.visible {
  opacity: 1;
  pointer-events: all;
}

.modal-content-wrapper {
  background-color: #fff;
  max-width: 800px;
  width: 90%;
  padding: 2rem;
  border-radius: 8px;
  position: relative;
  max-height: 90vh;
  overflow-y: auto;
  z-index: 500;

}

.modal-close {
  position: absolute;
  top: 10px;
  right: 15px;
}

.modal-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.modal-body {
  flex: 1;
  padding: 0 20px;
}

.modal-image {
  width: 100%;
  height: auto;
  max-height: 400px;
  object-fit: cover;
  margin: 1rem;
  padding-top: 1rem;
}

/*.modal-nav {
  background: none;
  border: none;
  font-size: 2rem;
  cursor: pointer;
}*/

body.modal-open {
  overflow: hidden;
}







.modal-header {
  align-items: center;
  margin-top: 3rem;
}


.modal-title {
  font-size: 1.6rem;
  font-weight: 700;
  margin: 0;
}

.modal-description {
  margin: 1rem 0 1.5rem 0;
  color: #444;
  font-size: 1.05rem;
}

.modal-infos {
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem 1.2rem;
  margin-bottom: 1.2rem;
}

.modal-info {
  background: #f4f4f8;
  border-radius: 0.5rem;
  padding: 0.4rem 0.9rem;
  font-size: 0.98rem;
  display: flex;
  align-items: center;
  gap: 0.5em;
}

.modal-info .icon {
  font-size: 1.1em;
}

.modal-missions h4 {
  font-size: 1.1rem;
  margin-bottom: 0.4rem;
  text-align: left;
  text-decoration: underline;
}

.modal-image-large {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 1rem;
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
  flex-shrink: 0;
}


.modal-missions span {
  font-size: 1rem;
  line-height: 1.5;
  margin: 0.2em;
  padding: 0 0.3em;
  background: #f0f8ff;
  border-radius: 0.3rem;
  text-align: left;
}

.modal-missions {
  text-align: left;
}