/* ----------------- Reset et polices ----------------- */
* {
    box-sizing: border-box;
  }
  body {
    margin: 0;
    font-family: 'Barlow', sans-serif;
    display: flex;
    flex-direction: column;
    height: 100vh;
    overflow-x: hidden;
  }
  
  /* ----------------- Header ----------------- */
  header {
    display: flex;
    align-items: center;       /* centre verticalement logo et titre */
    justify-content: flex-start; /* tout à gauche */
    position: relative;        /* nécessaire pour bouton absolu */
    padding: 10px 20px;
    background-color: #006072;
    color: white;
  }
  
  header img {
    height: 40px;
    margin-right: 20px;
  }
  
  header h1 {
    margin: 0;
    font-weight: 500;
    font-size: 1.5em;
  }
  
  /* Bouton "?" à droite */
  .about-btn {
    position: absolute;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
    background-color: #004f57;
    color: white;
    border : none;
    border-radius: 50%;
    width: 32px;
    height: 32px;
    font-size: 1.2em;
    font-weight: bold;
    cursor: pointer;
  }
  .about-btn:hover {
    background-color: #002f36;
  }
  
  /* ----------------- Contenu principal ----------------- */
  main {
    display: flex;
    flex: 1;
    gap: 10px;
    padding: 10px;
    overflow: hidden;
    flex-wrap: nowrap;
    background-color: #f5f5f5;
  }
  
  /* Colonnes - panel, colA et colB partagent les mêmes règles */
  .panel, #colA, #colB {
      display: flex;
      flex-direction: column;
      flex-grow: 1;
      flex-shrink: 1;
      flex-basis: 0;
      min-width: 200px; /* minimum largeur pour éviter que la colonne rétrécisse trop */
      max-width: 90%; /* jamais dépasser le conteneur */
      gap: 5px;
      max-height: 100%;
      overflow: hidden;
      color: #006072;
  }
  
  /* Menus déroulants Tom Select */
  .ts-control {
      width: 100%;
  }
  .ts-dropdown,
  .ts-control,
  .ts-input {
      font-family: 'Barlow', sans-serif;
      font-size: 0.95em;
  }
  
  /* Visionneuse */
  .viewer-container {
    display: flex;
    flex-direction: column;
    flex: 1;
    gap: 5px;
    overflow: hidden;
  }
  .viewer {
    flex: 1;
    min-height: 300px;
    border: none;
    border-radius: 3px;
  }
  
  /* Titres */
  .title {
      text-align: center;
      font-weight: 800;
      margin: 5px 0;
      font-size: 1.1em;
      white-space: nowrap;
      overflow: hidden;
      text-overflow: ellipsis;
  }
  .panel h3 {
      text-align: center;
      font-weight: 500;
      font-size: 1.2em;
      margin-bottom: 5px;
  }
  
  /* Navigation */
  .nav-btn {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: 5px;
  }
  .btn-nav {
    background-color: #006072;
    color: white;
    border: none;
    padding: 5px 15px;
    cursor: pointer;
    border-radius: 3px;
    font-size: 1em;
  }
  .btn-nav:hover {
    background-color: #004f57;
  }
  
  /* Splitter */
  #splitter {
    width: 2px;
    background-color: #006072;
    cursor: col-resize;
    flex: 0 0 auto;
    z-index: 10;
  }
  
  /* ----------------- Footer ----------------- */
  footer {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 4px 12px;
    background-color: #303846;
    color: #fff;
    font-size: 0.8em;
    height: 25px;
  }
  footer a {
    margin-left: auto;
  }
  footer a img {
    height: 15px;
    transition: opacity 0.2s;
  }
  footer a img:hover {
    opacity: 0.7;
  }
  
  /* ----------------- Modal ----------------- */
  .modal {
    display: none;               /* caché par défaut */
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.5);
  
    align-items: center;         /* centre verticalement */
    justify-content: center;     /* centre horizontalement */
    padding: 10px;               /* petit padding si écran petit */
  }
  
  .modal-content {
    background-color: #fff;
    width: 90%;
    max-width: 900px;
    max-height: 90%;
    padding: 20px;
    border-radius: 8px;
    text-align: justify;
    box-shadow: 0 4px 12px rgba(0,0,0,0.3);
    overflow-y: auto;
    position: relative;
  }
  
  .modal-content h2 {
    margin-top: 0;
    text-align: center;
    color: #006072;
  }
  .modal-content img {
    display: block;
    margin: 10px auto 0;
    max-height: 50px;
  }
  .close {
    position: absolute;
    top: 5px;
    right: 10px;
    font-size: 28px;
    font-weight: bold;
    color: #aaa;
    cursor: pointer;
  }
  .close:hover { color: #000; }
  
  /* ----------------- Scroll interne Tom Select ----------------- */
  .ts-dropdown {
    max-height: 200px;
    overflow-y: auto;
  }

  /* ----------------- Ligne filtre + select ----------------- */
.select-row {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
}

.select-row input[type="text"] {
  flex: 0 0 20%;
  min-width: 100px;
  padding: 4px 6px;
  font-size: 0.9em;
  border: 1px solid #ccc;
  border-radius: 3px;
}

.select-row select {
  flex: 1; /* occupe le reste de la ligne */
  padding: 4px 6px;
  font-size: 0.9em;
  border: 1px solid #ccc;
  border-radius: 3px;
  background-color: #fff;
}

 /* ----------------- Responsive ----------------- */
  @media (max-width: 1000px) {
    main {
      flex-direction: column;
      gap: 10px;
      padding: 10px; /* tu peux réduire si besoin */
    }
    #colA, #colB {
      flex: 1 1 auto;
      min-width: 0;
      max-width: 100%; /* <-- important */
    }
    #splitter {
      height: 3px;
      width: 100%;
      cursor: row-resize;
    }
  }