/* Auteur : Rodrigo Sousa
     Date de création : 18.12.2024
     Description : Site du projet 293
     Dernière modification : 14.01.2025 */

     body {
      font-family: Arial, sans-serif;
      margin: 0;
      padding: 0;
      background-color: #f4f4f9;
      text-align: center;
      background-image: url(../img/carte_background.png);
      background-repeat: no-repeat;
      background-size: cover;
      background-position: center center;
      background-attachment: fixed;
      opacity: 0.9;
      color: white;
      overflow: hidden;
    }
    header {
      display: flex;
      flex-direction: column;  
      align-items: center;
      padding: 15px 30px;
      background-color: rgba(0, 0, 0, 0.3);
      position: relative;     
    }
    
    header h1 {
      font-size: 1.8em;
      margin: 0 0 10px 0;
      text-align: center;
      color: white;
    }
    
    .header-controls {
      display: flex;
      align-items: center;
      gap: 10px;
      width: 100%;
      justify-content: center;
    }
    
    #search-input {
      width: 50%;
      padding: 8px 12px;
      border: 1px solid #ccc;
      border-radius: 4px;
      font-size: 14px;
      color: #333;
      background: white;
    }
    
    #login-btn {
      position: absolute;  
      right: 30px;
      top: 50%;
      transform: translateY(-50%);
      padding: 8px 20px;
      border: 1px solid #ccc;
      border-radius: 4px;
      background: white;
      color: #333;
      cursor: pointer;
      font-size: 14px;
    }
    
    #login-btn:hover {
      background: #eee;
    }
    
    .carte-item {
      background: #ddd;
      border-radius: 6px;
      overflow: hidden;
      height: calc((100vh - 90px - 60px) / 2);
      max-height: 300px; 
      cursor: pointer;
    }
    
    .thumbnail {
      width: 100%;
      height: 100%;
      object-fit: cover;
      display: block;
      cursor: pointer;
      transition: transform 0.3s;
    }
    
    .thumbnail:hover {
      transform: scale(1.05);
    }
    
    .lightbox-container {
      display: none;
      position: fixed;
      top: 0; left: 0;
      width: 100%; height: 100%;
      background-color: rgba(0, 0, 0, 0.8);
      justify-content: center;
      align-items: center;
      z-index: 1000;
      padding: 20px;
    }
    
    .lightbox-fiche {
      display: flex;
      flex-direction: row;
      align-items: flex-start;
      background-image: url(../img/carte_background.png);
      background-size: cover;
      background-position: center;
      border-radius: 12px;
      padding: 30px;
      max-width: 800px;
      width: 90%;
      gap: 30px;
      position: relative;
    }
    
    .lightbox-fiche img {
      width: 250px;
      max-width: 40%;
      height: auto;
      border-radius: 8px;
      object-fit: cover;
    }
    
    .lightbox-infos {
      flex: 1;
      text-align: left;
    }
    
    .lightbox-infos p {
      margin: 0 0 16px 0;
      font-size: 16px;
      line-height: 1.5;
      color: #ffffff;
    }
    
    .lb-label {
      font-weight: bold;
      font-size: 14px;
      color: #ccc;
      text-transform: uppercase;
      letter-spacing: 0.5px;
    }
    
    .lightbox-container .close {
      position: absolute;
      top: 12px;
      right: 18px;
      color: white;
      font-size: 32px;
      cursor: pointer;
      z-index: 1001;
    }
    
    .cartes-grid {
      display: grid;
      grid-template-columns: repeat(5, 1fr);
      gap: 12px;
      padding: 20px 40px;
      height: calc(100vh - 90px);
      overflow-y: auto;
      box-sizing: border-box;
    }
    

    @media (max-width: 600px) {
      .lightbox-fiche {
        flex-direction: column;
        align-items: center;
      }
      .lightbox-fiche img {
        width: 100%;
        max-width: 100%;
      }
    }