* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html, body {
  height: 100%;
  width: 100%;
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  background-color: #142b4f; /* un bleu foncé mais distinct du header/footer */
  color: #f0f0f0;
  line-height: 1.5;
}

/* HEADER */
header {
  background-color: rgba(8, 20, 42, 0.9);
  padding: 15px 1rem;     
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: fixed;
  height: auto;
  min-height: 80px;       
  width: 100%;
  top: 0;
  z-index: 1000;
}

.logo {
  height: 60px;           
  cursor: pointer;
}

/* Menu burger (mobile) */
.menu-toggle {
  display: none;
  background: none;
  border: none;
  font-size: 2rem;       
  cursor: pointer;
  color: white;
}

/* Nav links */
.nav-links {
  list-style: none;
  display: flex;
  gap: 40px;
  align-items: center;
}

.nav-links li a {
  text-decoration: none;
  font-weight: 600;
  color: #4da6ff;
}


/* Responsive */
@media (max-width: 768px) {
  header {
    justify-content: center; 
  }

  /* Burger visible, à gauche */
  .menu-toggle {
    display: block;
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    z-index: 1000;
  }

  /* Logo centré */
  .logo {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
  }

  /* Nav links cachés par défaut */
  .nav-links {
    display: none;
    flex-direction: column;
    align-items: center;
    text-align: center;
    position: absolute;
    top: 60px;
    left: 0;
    width: 100%;
    background-color: rgba(8, 20, 42, 0.95);
    padding: 1rem 0;
    z-index: 999;
    margin-top: 15px;

  }


  .nav-links.show {
    display: flex;
  }
  .container {
    padding: 180px 20px 20px; 
  }

}

.container {
  padding: 120px 20px 40px;
  max-width: 1200px;
  margin: auto;
}


main {
  flex: 1;
}


.header-spacer {
  height: 100px; 
}

@media (max-width: 768px) {
  .header-spacer {
    height: 30px; 
  }
}

.section-block {
  background: rgba(255, 255, 255, 0.05);
  padding: 25px;
  border-radius: 18px;
  margin: 30px auto;        
  max-width: 900px;         
  box-shadow: 0 0 12px rgba(0, 122, 255, 0.1);
  color: #cbd5e1;
  font-size: 1rem;
  line-height: 1.6;
}

/* Titres dans sections */
.section-block h2 {
  color: #4da6ff;
  border-bottom: 2px solid rgba(77, 166, 255, 0.4);
  padding-bottom: 8px;
  margin-bottom: 20px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}




.btn-profil {
  background: rgba(30, 41, 59, 0.7); 
  color: #fff;
  padding: 10px 20px;
  border-radius: 30px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  text-decoration: none;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: inherit;
  font-size: 1rem;
  backdrop-filter: blur(6px);
  box-shadow: 0 0 10px rgba(0, 204, 255, 0.3);

}

.btn-profil i {
  font-size: 1rem;
  color: rgb(12, 110, 215);
}

.btn-profil:hover {
  background: rgba(30, 41, 59, 0.9);
  box-shadow: 0 0 14px rgba(0, 204, 255, 0.5);
}


.dropdown {
  position: relative;
}

/* Dropdown menu stylé */
.dropdown-menu {
  position: absolute;
  top: 110%;
  right: 0;
  background: rgba(30, 41, 59, 0.85);
  border-radius: 16px;
  padding: 0.5rem 0;
  margin-top: 10px;
  list-style: none;
  box-shadow: 0 8px 16px rgba(0, 204, 255, 0.1);
  backdrop-filter: blur(8px);
  z-index: 999;
  border: 1px solid rgba(255, 255, 255, 0.1);
  min-width: 180px;
}

.dropdown-menu li {
  text-align: center;
}

.dropdown-menu li a {
  display: block;
  padding: 10px 16px;
  text-decoration: none;
  color: #e0f2fe;
  font-weight: 500;
  border-radius: 8px;
}

.dropdown-menu li a:hover {
  background-color: rgba(14, 165, 233, 0.2);
  color:#1a73e8;;
}

.btn-login {
  background-color: #1a73e8;
  color: white !important;
  padding: 12px 24px;   
  border-radius: 25px;
  text-decoration: none;
}

/* ======================================= */
/* 🚀 1. STYLES POUR LA GRILLE (MULTIPLES IMAGES) */
/* ======================================= */

.gallery-container {
  /* Disposition de grille et centrage global */
  display: grid;
  gap: 15px; /* Espacement entre les cartes */
  margin-top: 40px; 
  grid-template-columns: repeat(3, minmax(250px, 1fr)); /* 3 colonnes flexibles */
  
  max-width: 1000px; /* Limite la largeur de la grille */
  margin-left: auto; 
  margin-right: auto; /* Centre la grille */
  
  padding: 0 15px; 
}

/* Conteneur de chaque carte (Tuile) */
.gallery-container .gallery-item {
    display: flex;
    justify-content: center;
    align-items: center;
    aspect-ratio: 1/1; /* Format carré pour l'uniformité des tuiles */
    width: 100%;
    background-color: transparent; 
    box-shadow: none;
    transition: none;
}

/* Style de l'image dans la grille (Couverture totale) */
.gallery-container .gallery-item img.modal-image {
  width: 100%; 
  height: 100%; 
  object-fit: cover; /* L'image remplit la tuile (peut être rognée) */
  border-radius: 12px;
  box-shadow: 0 8px 18px rgba(0,0,0,0.4);
  transition: transform 0.3s ease-out, box-shadow 0.3s ease-out;
}

.gallery-container .gallery-item:hover img.modal-image {
  transform: scale(1.03); 
  box-shadow: 0 12px 25px rgba(0,0,0,0.6);
}

/* ======================================= */
/* 🖼️ 2. STYLE POUR L'IMAGE UNIQUE (CENTREE) */
/* ======================================= */

.gallery-container.single {
  /* Écrase le mode grille et active le centrage Flexbox */
  display: flex; 
  flex-direction: column; 
  justify-content: center; 
  align-items: center; 
  
  max-width: 100%; 
  width: 100%; 
  margin: 0; 
  padding: 60px 0; 

  /* Annule la grille pour ne pas perturber le centrage */
  grid-template-columns: none; 
}

.gallery-container.single .gallery-item {
    /* Règle de taille pour l'image unique (l'ancienne "carte") */
    aspect-ratio: auto;
    
    /* MODIFICATION DE LA TAILLE : Réduit à 600px */
    max-width: 300px; 
    
    width: 100%; 
    box-shadow: none;
    transition: none;
    background-color: transparent;
}

.gallery-container.single .gallery-item img.modal-image {
    width: 100%; 
    height: auto; /* Permet la hauteur naturelle de l'image */
    object-fit: contain; /* L'image n'est JAMAIS coupée en mode single */
    
    border-radius: 16px; 
    box-shadow: 0 15px 40px rgba(0,0,0,0.5); 
    transform: none; /* Annule l'effet hover de la grille */
}

/* ======================================= */
/* 📱 3. RESPONSIVE */
/* ======================================= */

@media (max-width: 768px) { 
  .gallery-container {
    /* La grille redevient 1 colonne sur mobile */
    grid-template-columns: 1fr; 
    gap: 10px; 
    max-width: 100%; 
    padding: 0 10px; 
  }
}

  @media (max-width: 600px) {
.section-block {
    margin: 20px 0;
    padding: 20px;
  }

}


.admin-buttons {
  display: flex;
  justify-content: flex-end; /* ALIGNE À DROITE */
  gap: 10px;                 /* espace entre les boutons */
  margin-top: 15px;
}

.button-edit,
.button-delete {
  display: inline-block;
  padding: 8px 15px;
  border: none;
  text-decoration: none;
  color: white;
  border-radius: 4px;
  font-size: 0.9rem;
  transition: background-color 0.2s;
  cursor: pointer;
}

.button-edit {
  background-color: #28a745;
}

.button-edit:hover {
  background-color: #218838;
}

.button-delete {
  background-color: #dc3545;
}

.button-delete:hover {
  background-color: #c82333;
}
  
.modal {
  display: flex;
  align-items: center;
  justify-content: center;
  position: fixed;
  z-index: 1000;
  padding: 20px;
  left: 0;
  top: 0;
  width: 100vw;
  height: 100vh;
  background-color: rgba(0,0,0,0.8);
}

.modal[hidden] {
  display: none;
}

.modal-content {
  max-width: 90%;
  max-height: 90%;
  border-radius: 10px;
  box-shadow: 0 0 15px #fff;
}

.modal-close {
  position: absolute;
  top: 20px;
  right: 30px;
  color: white;
  font-size: 2rem;
  font-weight: bold;
  cursor: pointer;
}

/* Conteneur général : centré et largeur limitée */
.info-group {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 24px;
  margin: 30px auto;          /* centré verticalement et horizontalement */
  padding: 0 20px;
  max-width: 1200px;          /* limite la largeur totale */
  justify-items: center;      /* centre les cartes dans chaque colonne */
}

/* Cartes individuelles */
.info-item {
  background: rgba(13, 28, 57, 0.95);
  color: #fff;
  padding: 20px 25px;
  border-radius: 14px;
  box-shadow: 0 4px 15px rgba(0, 204, 255, 0.12);
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  cursor: default;
  width: 100%;
  max-width: 300px;  /* limite la largeur de chaque carte */
}

/* Hover pour les cartes */
.info-item:hover {
  transform: translateY(-6px);
  box-shadow: 0 10px 25px rgba(0, 204, 255, 0.25);
}

/* Responsive : sur mobile */
@media (max-width: 768px) {
  .info-group {
    grid-template-columns: 1fr; /* une carte par ligne */
    padding: 0 15px;
  }

  .info-item {
    max-width: 100%;  /* occupe toute la largeur possible */
  }
}





.text-block {
  background: rgba(30, 41, 59, 0.95);
  border-left: 5px solid #4da6ff;
  padding: 25px 30px;
  border-radius: 12px;
  margin: 30px 0;
  font-size: 1.1rem;
  line-height: 1.65;
  color: #cbd6f1;
  max-width: 900px;
  user-select: text;
  box-shadow: 0 3px 15px rgba(77, 166, 255, 0.15);
}

/* Responsive adjustments */
@media (max-width: 600px) {
  .info-group {
    grid-template-columns: repeat(1, 1fr);
  }
  
  .text-block {
    font-size: 1rem;
    padding: 20px;
  }
}

.commentaires {
  margin-top: 40px;
  max-width: 800px;         
  margin-left: auto;
  margin-right: auto;        
  padding: 0 15px;          
  background: rgba(255, 255, 255, 0.05);  
  border-radius: 18px;
  box-shadow: 0 4px 15px rgba(0, 122, 255, 0.15);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

/* Chaque commentaire */
.commentaire {
  background: rgba(22, 30, 50, 0.9);
  padding: 20px 20px 15px 20px;
  margin-bottom: 20px;
  border-radius: 12px;
  box-shadow: 0 4px 12px rgba(0, 115, 255, 0.3);
  color: #dbe9ff;
}

.commentaire:hover {
  box-shadow: 0 6px 20px rgba(26, 115, 232, 0.6);
}

/* Bouton supprimer */
.commentaire .delete {
  color: #ff4d4d;
  font-size: 0.9rem;
  display: inline-block;
  margin-top: 8px;
  cursor: pointer;
  transition: color 0.3s ease;
}

.commentaire .delete:hover {
  color: #ff1a1a;
}

/* Formulaire textarea */
form textarea {
  width: 100%;
  max-width: 800px;    
  margin: 0 auto;      
  display: block;
  padding: 15px;
  background-color: rgba(26, 46, 95, 0.85);
  border: none;
  border-radius: 14px;
  color: #f0f0f0;
  font-size: 1rem;
  resize: vertical;
  box-shadow: 0 0 8px rgba(26, 115, 232, 0.3);
  transition: background-color 0.3s ease, box-shadow 0.3s ease;
}

form textarea:focus {
  background-color: rgba(40, 68, 141, 0.9);
  outline: none;
  box-shadow: 0 0 12px #1a73e8;
}

/* Bouton envoyer */
form button {
  margin: 15px auto 0;
  display: block;
  background-color: #1a73e8;
  color: white;
  border: none;
  padding: 14px 30px;
  border-radius: 30px;
  font-weight: 700;
  cursor: pointer;
  font-size: 1.05rem;
  box-shadow: 0 4px 10px rgba(26, 115, 232, 0.5);
  max-width: 200px;
  text-align: center;
}

form button:hover {
  background-color: #0b5ed7;
  box-shadow: 0 6px 18px rgba(11, 94, 215, 0.7);
}

/* Responsive */
@media (max-width: 600px) {
  .commentaires,
  form textarea {
    max-width: 100%;
    padding: 0 10px;
  }

  form button {
    width: 100%;      
    padding: 15px 0;   
    font-size: 1.3rem; 
    border-radius: 10px; 
  }
}


.back-link {
  display: inline-block;
  margin-bottom: 20px;
  color: #007BFF;
  text-decoration: none;
  font-weight: bold;
}

.back-link:hover {
  text-decoration: underline;
}
/* Responsive */
@media (max-width: 768px) {
  .info-group {
    flex-direction: column;
  }

  .project-images-gallery {
    flex-direction: column;
    align-items: center;
  }

  .project-image {
    max-width: 100%;
  }
}


.footer {
  background-color: #031626;
  color: #f0f0f0;
  padding: 20px 20px; 
  font-size: 0.95rem;
  margin-top: 60px;
  text-align: center;
}

.footer-top {
  max-width: 1000px;
  margin: auto;
  display: flex;
  flex-direction: column;  
  align-items: center;
  gap: 15px;
  text-align: center;
}


.footer-left,
.footer-center,
.footer-right,
.footer-login {
  flex: 1 1 100%;
  display: flex;
  justify-content: center;
  flex-wrap: nowrap;  
  gap: 20px;
  white-space: nowrap; 
}

.footer-left p {
  margin-top: 15px;
  margin-bottom: 15px;
  font-weight: bold;
}

.footer-center a,
.footer-right a {
  color: #4da6ff;
  text-decoration: none;
  transition: color 0.3s ease;
  padding: 5px 10px;
  white-space: nowrap; 
  max-width: 120px;
  overflow: hidden;
  text-overflow: ellipsis;
}

.footer-center a:hover,
.footer-right a:hover {
  color: #1a8cff;
}

.footer-right i {
  font-size: 1.2rem;
}

.contact-button {
  background-color: #4da6ff;
  color: white;
  padding: 6px 15px;
  border-radius: 4px;
  text-decoration: none;
  font-size: 1rem;
  display: inline-block;
  cursor: pointer;
  white-space: nowrap;
}

.contact-button :hover {
  background-color: #285a8e;
}

/* Desktop */
@media (min-width: 601px) {
  .footer-top {
    flex-direction: row;       
    justify-content: center;   
    gap: 40px;
    text-align: center;
  }
  
  .footer-left,
  .footer-center,
  .footer-right,
  .footer-login {
    flex: 1;                  
    justify-content: center;  
  }
}

.tags-type-row {
  display: flex;
  align-items: center;
  gap: 10px; /* Espace entre les tags et le type */
  flex-wrap: wrap;
  margin-top: 10px;
}

/* Styles pour les tags */
.tags .tag {
  display: inline-block;
  background-color: #e0f7fa; /* Couleur de fond claire */
  color: #006064;            /* Couleur du texte */
  font-size: 0.85rem;
  font-weight: 500;
  padding: 4px 10px;
  border-radius: 12px;
  margin-right: 5px;
  margin-bottom: 5px;
  transition: background-color 0.3s;
  cursor: default;
}

.tags .tag:hover {
  background-color: #b2ebf2;
}

/* Styles pour le type */
.type-button {
  background-color: #ffecb3;  /* Fond léger */
  color: #795548;             /* Texte plus foncé */
  font-weight: 600;
  padding: 5px 12px;
  border-radius: 16px;
  font-size: 0.9rem;
  cursor: default;
  transition: background-color 0.3s, transform 0.2s;
}

.type-button:hover {
  background-color: #ffe082;
  transform: scale(1.05);
}

