/* Grille de vignettes */
.tiles {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
  gap: 1rem;
}
@media (min-width: 768px) {
  .tiles { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 1.25rem; }
}
.tile {
  --tile-bg: #0d6efd;
  --tile-fg: #fff;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: .75rem;
  aspect-ratio: 1 / 1;
  padding: 1rem .75rem;
  border-radius: 1rem;
  background: var(--tile-bg);
  color: var(--tile-fg);
  text-align: center;
  text-decoration: none;
  box-shadow: 0 2px 6px rgba(0, 0, 0, .12);
  transition: transform .15s ease, box-shadow .15s ease;
}
.tile:hover, .tile:focus-visible {
  color: var(--tile-fg);
  transform: translateY(-3px);
  box-shadow: 0 8px 18px rgba(0, 0, 0, .2);
}
.tile:focus-visible { outline: 3px solid #212529; outline-offset: 3px; }
.tile-icon { font-size: 2.6rem; line-height: 1; }
.tile-title {
  font-weight: 600;
  font-size: .95rem;
  line-height: 1.2;
  overflow-wrap: anywhere;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Admin : petite vignette d'aperçu */
.tile-sm { width: 64px; aspect-ratio: 1 / 1; padding: .4rem; border-radius: .6rem; gap: .25rem; box-shadow: none; }
.tile-sm .tile-icon { font-size: 1.5rem; }
.tile-sm:hover { transform: none; box-shadow: none; }
.tile-preview { width: 150px; }
.admin-list td { vertical-align: middle; }
.url-cell { max-width: 320px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* Champ piège anti-robots : hors écran (pas display:none, que certains robots détectent) */
.hp-field {
  position: absolute !important;
  left: -10000px !important;
  width: 1px; height: 1px;
  overflow: hidden;
}

/* Admin : sélecteur d'icônes */
.icon-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(92px, 1fr));
  gap: .5rem;
}
.icon-cell {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: .4rem;
  padding: .7rem .3rem .5rem;
  border: 1px solid #dee2e6;
  border-radius: .5rem;
  background: #fff;
  color: #212529;
  cursor: pointer;
}
.icon-cell i { font-size: 1.5rem; }
.icon-cell span {
  font-size: .68rem;
  line-height: 1.15;
  color: #6c757d;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.icon-cell:hover { border-color: #0d6efd; background: #f0f6ff; }
.icon-cell.active { border-color: #0d6efd; background: #0d6efd; color: #fff; }
.icon-cell.active span { color: #fff; }
@media (min-width: 992px) {
  .col-lg-4 > .card:first-child { position: sticky; top: 1rem; }
}
