/* Page Structure - Style moderne cohérent avec annonce.css */

main {
  background: #7c7aff1c;
  padding-top: 2rem;
  padding-bottom: 2rem;
}

.structure-title {
  font-size: 2rem;
  font-weight: 700;
  color: #0a4f70;
  text-transform: uppercase;
  margin-bottom: 2rem;
}

/* Cards avec effet d'ombre */
.card-structure {
  background: white;
  border-radius: 16px;
  padding: 2rem;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  border: 1px solid rgba(0, 0, 0, 0.05);
  display: flex;
  flex-direction: column;
  position: relative;
}

/* Icône crayon pour édition */
.edit-icon,
.edit-icon-secondary {
  position: absolute;
  top: 1.5rem;
  right: 1.5rem;
  width: 36px;
  height: 36px;
  background: #0a4f70;
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  transition: all 0.3s ease;
  z-index: 999;
  box-shadow: 0 2px 8px rgba(10, 79, 112, 0.3);
}

.edit-icon:hover,
.edit-icon-secondary:hover {
  background: #083d57;
  transform: scale(1.1);
  box-shadow: 0 4px 12px rgba(10, 79, 112, 0.5);
  color: white;
}

.edit-icon i,
.edit-icon-secondary i {
  font-size: 14px;
}

/* Icône secondaire pour les sous-sections */
.edit-icon-secondary {
  top: auto;
  bottom: 1.5rem;
  background: #FCC71C;
}

.edit-icon-secondary:hover {
  background: #e6b419;
}


.card-structure-title {
  font-size: 1.5rem;
  font-weight: 700;
  color: #0a4f70;
  margin-bottom: 1.5rem;
  padding-bottom: 0.75rem;
  border-bottom: 3px solid #FCC71C;
}

.card-structure-content {
  color: #333;
  line-height: 1.8;
  flex-grow: 1;
  display: flex;
  flex-direction: column;
}

.card-structure-content strong {
  color: #0a4f70;
  font-weight: 600;
  font-size: 1.05rem;
}

.card-structure-content p {
  margin: 0;
  color: #666;
  font-size: 0.95rem;
}

/* Limitation de la description à 7 lignes */
.text-truncate-7 {
  display: -webkit-box;
  -webkit-line-clamp: 7;
  line-clamp: 7;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.8;
}

/* Container pour le contenu texte */
.card-content-text {
  flex-grow: 1;
}

/* Texte tronqué */
.text-truncate-5 {
  display: -webkit-box;
  -webkit-line-clamp: 5;
  line-clamp: 5;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Carousel Photos personnalisé */
.carousel-photos {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 1rem;
  margin-bottom: 1rem;
}

.photo-principale {
  border-radius: 12px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.photo-principale img {
  width: 100%;
  height: auto;
  max-height: 400px;
  object-fit: contain;
  border-radius: 12px;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.1);
  cursor: pointer;
  transition: transform 0.3s;
}

.photo-principale img:hover {
  transform: scale(1.05);
}

.photos-miniatures {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.5rem;
}

.miniature {
  border-radius: 8px;
  overflow: hidden;
  cursor: pointer;
  border: 2px solid transparent;
  transition: all 0.3s;
  aspect-ratio: 1;
}

.miniature img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #f9fafb;
}

.miniature:hover {
  border-color: #0a4f70;
  transform: scale(1.05);
}

.miniature.active {
  border-color: #f8b739;
  box-shadow: 0 2px 8px rgba(248, 183, 57, 0.4);
}

/* Dots de navigation */
.carousel-dots {
  display: flex;
  justify-content: center;
  gap: 0.5rem;
  margin-top: 1rem;
}

.dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background-color: #ddd;
  cursor: pointer;
  transition: all 0.3s;
}

.dot:hover {
  background-color: #0a4f70;
}

.dot.active {
  background-color: #f8b739;
  width: 24px;
  border-radius: 6px;
}

/* Liens modernes "Voir plus" */
.link-voir-plus {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  color: #0a4f70;
  text-decoration: none;
  font-weight: 600;
  font-size: 0.95rem;
  transition: all 0.3s ease;
  position: relative;
  align-self: flex-end;
  margin-top: auto;
}

.link-voir-plus::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 0;
  height: 2px;
  background: #0a4f70;
  transition: width 0.3s ease;
}

.link-voir-plus:hover {
  color: #0d6eaa;
  transform: translateX(4px);
}

.link-voir-plus:hover::after {
  width: 100%;
}

.link-voir-plus i {
  font-size: 0.875rem;
  transition: transform 0.3s ease;
}

.link-voir-plus:hover i {
  transform: translateX(4px);
}

/* Lien "Ouvrir carte" */
.link-ouvrir-carte {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  color: #0a4f70;
  text-decoration: none;
  font-weight: 600;
  font-size: 0.9rem;
  transition: all 0.3s ease;
  position: relative;
}

.link-ouvrir-carte::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 0;
  height: 2px;
  background: #0a4f70;
  transition: width 0.3s ease;
}

.link-ouvrir-carte:hover {
  color: #0d6eaa;
}

.link-ouvrir-carte:hover::after {
  width: 100%;
}

.link-ouvrir-carte i {
  font-size: 0.875rem;
  transition: transform 0.3s ease;
}

.link-ouvrir-carte:hover i {
  transform: translate(2px, -2px);
}

/* Carte avec style */
#map {
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.15);
  border: 2px solid #f0f0f0;
}

/* Avantages */
.avantages-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 0.75rem;
}

.avantage-item {
  display: flex;
  align-items: center;
  padding: 0.2rem;
}

.avantage-item span {
  font-size: 0.95rem;
  line-height: 1.6;
  color: #333;
}

/* Info items */
.info-item {
  display: flex;
  gap: 1rem;
  align-items: flex-start;
  padding: 1rem 0;
  border-bottom: 1px solid #e9ecef;
  transition: background-color 0.2s;
}

.info-item:last-child {
  border-bottom: none;
}

.info-icon {
  color: #0a4f70;
  font-size: 1.25rem;
  flex-shrink: 0;
  margin-top: 0.25rem;
}

.info-content strong {
  display: block;
  color: #0a4f70;
  font-weight: 600;
  margin-bottom: 0.25rem;
  font-size: 0.95rem;
  text-align: left;
}

.info-content p {
  margin: 0;
  color: #666;
  font-size: 0.9rem;
  line-height: 1.5;
}

/* Section Annonces */
.annonces-section {
  border-top: 2px solid #e9ecef;
  padding-top: 1.5rem;
}

.annonces-title {
  font-size: 1.25rem;
  font-weight: 700;
  color: #0a4f70;
  margin-bottom: 1rem;
}

.annonce-card {
  display: grid;
  grid-template-columns: 70px 90px 1fr;
  gap: 1rem;
  align-items: center;
  padding: 1.25rem 1.5rem 1.25rem 0;
  background: white;
  border-radius: 20px;
  margin-bottom: 1rem;
  transition: all 0.3s;
  border: 2px solid #f8b739;
}

.annonce-card:hover {
  box-shadow: 0 6px 16px rgba(248, 183, 57, 0.2);
  transform: translateY(-2px);
}

.annonce-logo {
  width: 70px;
  height: 70px;
  border-radius: 12px;
  overflow: hidden;
  background: white;
  display: flex;
  align-items: center;
  justify-content: center;
  padding-top: 0.5rem;
  padding-right: 0.5rem;
  padding-bottom: 0.5rem;
  box-shadow: none;
}

.annonce-logo img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  position: relative;
  left: -3px;
}

.annonce-form {
  margin: 0;
}

.btn-voir-annonce {
  background: white;
  color: #FCC71C;
  border: 2px solid #FCC71C;
  padding: 0.6rem 1rem;
  border-radius: 25px;
  font-weight: 700;
  font-size: 0.9rem;
  cursor: pointer;
  transition: all 0.3s;
  white-space: nowrap;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.btn-voir-annonce:hover {
  color: white;
  background: #FCC71C;
  transform: scale(1.05);
  box-shadow: 0 4px 12px rgba(248, 183, 57, 0.4);
}


.annonce-content {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.annonce-title {
  font-weight: 700;
  color: #0a4f70;
  font-size: 1.1rem;
  margin-bottom: 0.25rem;
}

.annonce-details {
  color: #0a4f70;
  font-size: 0.95rem;
  margin-bottom: 0.25rem;
}

.annonce-salaire {
  color: #0a4f70;
  font-weight: 600;
  font-size: 1rem;
}

/* Témoignage */
.temoignage-item {
  padding: 1.5rem;
  background: white;
  margin-bottom: 1rem;
}

.temoignage-texte {
  color: #333;
  line-height: 1.8;
  margin: 0;
  font-size: 1rem;
}

.temoignage-auteur {
  text-align: center;
  margin: 0;
  color: #0a4f70;
  font-weight: 600;
  font-size: 1.1rem;
}

/* Équipe */
.equipe-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 1rem;
}

.equipe-membre {
  text-align: center;
}

.equipe-photo {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  overflow: hidden;
  margin: 0 auto 0.75rem;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  border: 3px solid #f8b739;
  transition: all 0.3s;
}

@media (max-width: 768px) {
  .equipe-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 480px) {
  .equipe-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

.equipe-photo:hover {
  transform: scale(1.1);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.15);
}

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

.equipe-nom {
  font-weight: 700;
  color: #0a4f70;
  font-size: 0.95rem;
  margin-bottom: 0.25rem;
}

.equipe-poste {
  color: #666;
  font-size: 0.875rem;
}

/* Carousel - largeur et hauteur uniformes */
.carousel-wrapper {
  width: 100%;
}

.carousel-wrapper .carousel {
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

.carousel-wrapper .carousel-inner {
  border-radius: 16px;
  overflow: visible !important;
}

.carousel-wrapper .carousel-item {
  height: 300px;
  overflow: hidden;
}

.carousel-wrapper .carousel-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  border-radius: 16px;
}

/* Bouton Retour */
.btn-retour {
  background: #f87BC6;
  color: white;
  border: none;
  padding: 0.875rem 2.5rem;
  border-radius: 50px;
  font-weight: 600;
  font-size: 1rem;
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgba(233, 30, 99, 0.3);
  cursor: pointer;
  position: relative;
  overflow: hidden;
}

.btn-retour::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: rgba(255, 255, 255, 0.2);
  transition: left 0.3s ease;
}

.btn-retour:hover::before {
  left: 100%;
}

.btn-retour:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(233, 30, 99, 0.4);
  color: white;
}

.btn-retour:active {
  transform: translateY(0);
}

/* Modals */
.modal-content {
  border-radius: 16px;
  border: none;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
}

.modal-header {
  background: #0a4e71 !important;
  color: white;
  border-radius: 16px 16px 0 0;
  padding: 1.5rem;
}

.modal-header .btn-close {
  filter: brightness(0) invert(1);
}

.modal-title {
  font-weight: 700;
  font-size: 1.25rem;
  color: white !important;
}

.modal-body {
  padding: 2rem;
  line-height: 1.8;
}

/* Modal Photos Plein Écran */
#modalPhotos .modal-fullscreen .modal-content {
  border-radius: 0;
}

#modalPhotos .carousel-control-prev,
#modalPhotos .carousel-control-next {
  opacity: 0.7;
  transition: opacity 0.3s ease;
}

#modalPhotos .carousel-control-prev:hover,
#modalPhotos .carousel-control-next:hover {
  opacity: 1;
}

#modalPhotos .carousel-control-prev-icon,
#modalPhotos .carousel-control-next-icon {
  background-color: rgba(255, 255, 255, 0.2);
  border-radius: 50%;
  padding: 1rem;
}

#modalPhotos .carousel-indicators button {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background-color: rgba(255, 255, 255, 0.5);
  border: none;
  margin: 0 5px;
  transition: all 0.3s ease;
}

#modalPhotos .carousel-indicators button.active {
  background-color: #FCC71C;
  width: 30px;
  border-radius: 6px;
}

#modalPhotos .carousel-indicators button:hover {
  background-color: rgba(255, 255, 255, 0.8);
}

#modalPhotos .carousel-item img {
  cursor: default;
  image-rendering: -webkit-optimize-contrast;
  image-rendering: crisp-edges;
}

/* Animations */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.card-structure {
  animation: fadeInUp 0.5s ease-out;
}

.card-structure:nth-child(1) {
  animation-delay: 0.1s;
}

.card-structure:nth-child(2) {
  animation-delay: 0.2s;
}

.card-structure:nth-child(3) {
  animation-delay: 0.3s;
}

/* Alignement des colonnes */
.row.g-4 {
  align-items: stretch;
}

.row.g-4 > [class*="col-"] {
  display: flex;
  flex-direction: column;
}

/* Colonne droite - alignement du carousel en bas */
.col-lg-5 {
  display: flex;
  flex-direction: column;
}

.col-lg-5 .carousel-wrapper {
  margin-top: auto;
}

/* Responsive */
@media (max-width: 991px) {
  .structure-title {
    font-size: 1.5rem;
  }
  
  .card-structure {
    padding: 1.5rem;
  }
  
  .card-structure:hover {
    transform: none;
  }
  
  .avantages-grid {
    grid-template-columns: 1fr;
  }
  
  .annonce-card {
    grid-template-columns: 60px 85px 1fr;
    gap: 0.75rem;
    padding: 1rem 1.25rem;
  }
  
  .annonce-logo {
    width: 60px;
    height: 60px;
  }
  
  .btn-voir-annonce {
    padding: 0.5rem 1.25rem;
    font-size: 0.85rem;
  }
  
  .equipe-grid {
    grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
  }
  
  .carousel-wrapper .carousel-item {
    height: 250px;
  }
  
  .btn-retour {
    padding: 0.75rem 2rem;
    font-size: 0.95rem;
  }
}

@media (max-width: 576px) {
  .card-structure {
    padding: 1.25rem;
    border-radius: 12px;
  }
  
  .card-structure-title {
    font-size: 1.25rem;
  }
  
  .annonce-card {
    grid-template-columns: 1fr;
    gap: 1rem;
    text-align: center;
    padding: 1.5rem 1rem;
  }
  
  .annonce-logo {
    margin: 0 auto;
    width: 60px;
    height: 60px;
  }
  
  .btn-voir-annonce {
    width: auto;
    min-width: 120px;
    margin: 0 auto;
  }
  
  .annonce-content {
    gap: 0.5rem;
  }
  
  .annonce-title {
    font-size: 1rem;
  }
  
  .annonce-details {
    font-size: 0.875rem;
  }
  
  .annonce-salaire {
    font-size: 0.95rem;
  }
  
  .equipe-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .carousel-wrapper .carousel-item {
    height: 200px;
  }
  
  .btn-retour {
    width: 100%;
  }
}