.btn-link {
  display: inline-block;
  padding: 3px 10px;
  background-color: #c254c2;
  color: white;
  text-decoration: none;
  border: solid 1px black;
  border-radius: 5px;
  font-weight: bold;
  font-size: 0.9em;
}

.btn-link:hover {
  background-color: #b159b1;
}

.btn-standard {
  display: inline-block;
  padding: 0px 7px;
  background-color: #f0f0f0;
  color: #000;
  text-decoration: none;
  border: solid 1px black;
  border-radius: 3px;
  font-size: 0.9em;
}

.btn-delete-image {
  display: inline-block;
  padding: 3px 10px;
  background-color: #c254c2;
  color: white;
  text-decoration: none;
  border: solid 1px black;
  border-radius: 5px;
  font-weight: bold;
  font-size: 0.9em;
}

.btn-delete-image:hover {
  background-color: #b159b1;
}

.modal-buttons {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 15px;
  flex-wrap: wrap;
  margin-top: 20px;
}

.modal-buttons button {
  flex: 0 0 auto;
  padding: 10px 20px;
  border: none;
  border-radius: 5px;
  white-space: nowrap;
  font-weight: bold;
  cursor: pointer;
}

.delete-button {
  background-color: #e74c3c;
  color: white;
}

.cancel-button {
  background-color: #ccc;
  color: #333;
}

.fiche-header {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: 20px;
  margin-bottom: 20px;
}

.fiche-header img {
  max-width: 100%;
  height: auto;
  border: 1px solid #ccc;
  flex: 1 1 250px;
}

.fiche-meta {
  flex: 1 1 250px;
}

.fiche-images {
  display: flex;
  flex-wrap: wrap;
  gap: 15px;
}

.fiche-images img {
  max-width: 100%;
  height: auto;
  border: 1px solid #ccc;
}

.multi-col-list {
  /* nombre de colonnes par défaut */
  columns: 3;
  column-gap: 20px;
  /* pour que les puces restent visibles */
  list-style-position: inside;
  padding: 0;
  margin-left: 5px;
}

.multi-col-list li {
  /* assure qu’un item ne se coupe pas à la colonne */
  break-inside: avoid;
  margin-bottom: 8px;
}

/* À 800px et moins, 2 colonnes */
@media (max-width: 800px) {
  .multi-col-list {
    columns: 2;
  }
}

/* À 500px et moins, 1 colonne */
@media (max-width: 500px) {
  .multi-col-list {
    columns: 1;
  }
}

.results-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 10px;
  margin-top: 10px;
}

.result-item {
  border: 1px solid #ccc;
  padding: 10px;
  border-radius: 4px;
  background: #fafafa;
}

.result-item h3 {
  margin: 0 0 5px;
  font-size: 1.1em;
  text-align: left;
}

.result-item small {
  color: #555;
}

/* Formulaire en ligne */
.search-form {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  margin-bottom: 15px;
  justify-content: space-around;
}

.search-form label {
  display: flex;
  flex-direction: column;
  margin: 0;
  font-size: 0.9em;
  color: #333;
}

.search-form input[type="text"],
.search-form select {
  padding: 5px;
  font-size: 1em;
  width: 200px;
  box-sizing: border-box;
}

.search-form button {
  padding: 6px 12px;
  font-size: 1em;
  cursor: pointer;
}

@media (max-width: 600px) {
  .results-grid {
    grid-template-columns: 1fr;
  }

  .search-form {
    flex-direction: column;
    align-items: stretch;
  }

  .search-form input[type="text"],
  .search-form select {
    width: 100%;
  }
}

.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.6);
  display: none;
  justify-content: center;
  align-items: center;
  z-index: 1000;
}

.modal-content {
  background: white;
  padding: 20px;
  max-width: 500px;
  border-radius: 8px;
  box-shadow: 0 0 20px rgba(0, 0, 0, 0.4);
  position: relative;
  text-align: center;
}

.modal-content button {
  margin-top: 15px;
}

.modal-content>.close-button {
  position: absolute;
  top: 10px;
  right: 10px;
}


.doc-card {
  position: relative;
  width: 220px;
  height: 220px;
  margin: 10px;
  display: inline-block;
}

.doc-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.doc-card .overlay-title {
  position: absolute;
  top: 0;
  left: 0;
  width: 96%;
  background: #c254c2;
  color: white;
  padding: 2%;
  font-size: 14px;
  font-weight: bold;
  text-align: center;
}

.doc-card .overlay-theme {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  background: rgba(255, 255, 255, 0.8);
  color: #000;
  padding: 5px;
  font-size: 13px;
  text-align: center;
}


.images-lightbox-container {
  display: flex;
  flex-wrap: wrap;
  gap: 15px;
}

.images-lightbox-container .thumb img {
  max-width: 250px;
  cursor: pointer;
  border: 1px solid #ccc;
  transition: transform .2s;
}

.images-lightbox-container .thumb img:hover {
  transform: scale(1.05);
}

/* Modal */
.lightbox-modal {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.8);
  justify-content: center;
  align-items: center;
  z-index: 1000;
}

.lightbox-content {
  position: relative;
  max-width: 90%;
  max-height: 90%;
  background: #fff;
  padding: 1rem;
  text-align: center;
  border-radius: 8px;
}

.lightbox-content .lightbox-img {
  max-width: 100%;
  max-height: 70vh;
}

.lightbox-close {
  position: absolute;
  padding: 0.5rem 1rem;
  top: 0.5rem;
  right: 0.5rem;
  background: rgba(255, 255, 255, 0.5);
  border: none;
  border-radius: 1rem;
  font-size: 2rem;
  cursor: pointer;
}

.lightbox-download {
  display: inline-block;
  margin: 1rem 0;
  padding: 0.4rem 1rem;
  background: #c254c2;
  color: #fff;
  text-decoration: none;
  border-radius: 4px;
}

/* Applique à tous les <input>, <select> et <textarea> de votre formulaire */
form input[type="text"],
form input[type="url"],
form input[type="file"],
form select,
form textarea {
  width: 50%;
  /* remplacez 50% par la largeur souhaitée */
  box-sizing: border-box;
  /* pour inclure padding/border dans la largeur */
  margin-bottom: 1em;
  /* un peu d’espacement vertical */
}

ul.file-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

ul.file-list li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-right: 50%;
  padding: 4px 0;
  border-bottom: 1px solid #eee;
}

ul.file-list li .filename {
  /* occupe tout l’espace disponible */
  flex: 1;
}

ul.file-list li .file-actions {
  /* espace fixe à droite pour le lien supprimer */
  margin-left: 1em;
  white-space: nowrap;
}

/* conteneur scroll horizontal pour petits écrans */
.table-responsive {
  width: 100%;
  margin-bottom: 1em;
}

/* style optionnel pour vos liens-titre */
.link-title {
  color: inherit;
  text-decoration: none;
}

.link-title:hover {
  text-decoration: underline;
}

/* 1) Table pleine largeur, colonnes à largeur fixe */
.full-width-table {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
}

.full-width-table th,
.full-width-table td {
  padding: 8px;
  word-break: break-word;
  border: 1px solid #ccc;
  font-size: 0.9rem;
  vertical-align: middle;
}

.full-width-table tbody tr:nth-child(odd) {
  background: #f1e6ef;
}

.full-width-table tbody tr:nth-child(even) {
  background: #fff;
}

.full-width-table th {
  background: #c254c2;
  color: #fff;
  font-weight: 700;
  text-align: left;
}

/* Par défaut, boutons alignés horizontalement */
.actions-cell {
  display: flex;
  gap: 0.5em;
  align-items: center;
  /* centre verticalement tous les enfants */
  justify-content: space-around;
}

.actions-cell form,
.actions-cell button {
  /* si tu veux virer les outlines et box-shadows */
  outline: none;
}

.actions-cell button:focus,
.actions-cell button:active {
  box-shadow: none;
}

/* pour mobile : empile les boutons au lieu de les écraser hors du conteneur */
@media (max-width: 1000px) {
  .actions-cell {
    flex-direction: column;
    align-items: stretch;
  }

  .actions-cell form,
  .actions-cell button {
    width: 100%;
    margin: 0.25em 0;
  }
}

/* Clip à 3 lignes */
.description-clip {
  max-height: 4.5em;
  /* ~3 lignes */
  overflow: hidden;
  position: relative;
}

.eye {
  display: inline-flex;
  align-items: center;
  line-height: 1.2;
}

.icon-eye {
  width: 2em;
  height: 2em;
  margin-right: 0.3em;
  flex-shrink: 0;
  opacity: 1;
  transition: opacity .2s;
}

.icon-eye:hover {
  opacity: 0.5;
}

.open-fiche-modal {
  display: inline-flex;
  align-items: center;
  cursor: pointer;
  text-decoration: none;
  /* ou underline si vous préférez */
}

.open-fiche-modal:hover {
  text-decoration: underline;
}

.fiche-title {
  white-space: normal !important;
  word-break: break-word;
  margin: 2em 0 1em 0;
  display: -webkit-box;
  line-clamp: 2;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

/* Conteneur flex pour les aperçus PDF */
.pdf-previews {
  display: flex;
  flex-wrap: wrap;
  gap: 1em;
  justify-content: flex-start;
  margin-bottom: 1.5em;
}


.pdf-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(48%, 1fr));
  gap: 20px;
  margin-top: 1em;
}

/* Lien “Ouvrir dans une nouvelle fenêtre” */
.pdf-open-link {
  display: block;
  padding: 8px 12px;
  background: #f5f5f5;
  color: #c254c2;
  font-weight: bold;
  text-decoration: none;
}

.pdf-open-link:hover {
  background: #e0e0e0;
}

.pdf-iframe {
  width: 100%;
  height: 400px;
  border: none;
  flex: 1;
}

/* Conteneur de chaque aperçu PDF */
.pdf-preview {
  overflow: hidden;
  aspect-ratio: 1 / 1.414;
  /* ratio A4 portrait */
  display: flex;
  flex-direction: column;
}

.pdf-preview iframe {
  flex: 1 1 auto;
  width: 100%;
  border: none;
}

.pdf-preview p {
  margin: 0.5em 0;
}

.pdf-preview .btn-link {
  display: inline-block;
  padding: 4px 8px;
  background-color: #c254c2;
  color: #fff;
  border-radius: 4px;
  text-decoration: none;
  font-size: 0.9em;
}

.pdf-preview .btn-link:hover {
  background-color: #b159b1;
}

.taille {
  width: 50%;
  box-sizing: border-box;
}

form input.taille {
  width: 50%;
  box-sizing: border-box;
}
.taille2 {
  width: 33%;
  box-sizing: border-box;
}

form input.taille2 {
  width: 33%;
  box-sizing: border-box;
}

@media (max-width: 700px) {
  .taille {
    width: 95%;
  }

  form input.taille {
    width: 95%;
  }
}
@media (max-width: 700px) {
  .taille2 {
    width: 95%;
  }

  form input.taille2 {
    width: 95%;
  }
}
