/**
 * @file
 * Page /resources — liste de téléchargements (vues, li.downloads).
 */

.path-resources .view-resources .view-content .item-list > ul,
.path-resources .view-resources .view-content.row .item-list > ul,
.path-ressources .view-resources .view-content .item-list > ul,
.path-ressources .view-resources .view-content.row .item-list > ul {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.path-resources  .view-resources .view-content .item-list > ul > li.downloads,
.path-resources  .view-resources .view-content.row .item-list > ul > li.downloads,
.path-ressources  .view-resources .view-content .item-list > ul > li.downloads,
.path-ressources  .view-resources .view-content.row .item-list > ul > li.downloads {
  display: grid;
  grid-template-columns: 88px minmax(0, 1fr);
  grid-template-rows: auto 1fr auto;
  gap: 0 18px;
  align-items: start;
  margin: 0;
  padding: 20px 22px;
  background: #fff;
  border-radius: 14px;
  border: 1px solid #e8eaef;
  box-shadow: 0 4px 18px rgba(15, 23, 42, 0.07);
}

.path-resources li.downloads .views-field,
.path-ressources li.downloads .views-field {
  margin: 0;
  padding: 0;
}

/* Icône PDF (gauche) */
.path-resources li.downloads .views-field-nothing,
.path-ressources li.downloads .views-field-nothing {
  grid-column: 1;
  grid-row: 1 / -1;
  align-self: center;
}

.path-resources li.downloads .views-field-nothing .icon,
.path-ressources li.downloads .views-field-nothing .icon {
  width: 72px;
  height: 90px;
  margin: 0 auto;
  border-radius: 10px;
  background-color: #fff;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 72 90'%3E%3Crect x='6' y='4' width='60' height='82' rx='6' fill='%23fff' stroke='%23e5e7eb' stroke-width='2'/%3E%3Crect x='6' y='4' width='60' height='22' rx='6' fill='%23dc2626'/%3E%3Ctext x='36' y='19' text-anchor='middle' fill='%23fff' font-family='system-ui,sans-serif' font-size='11' font-weight='700'%3EPDF%3C/text%3E%3Cpath d='M24 38h24M24 46h24M24 54h16' stroke='%23cbd5e1' stroke-width='2' stroke-linecap='round'/%3E%3Cpath d='M38 62l8 8 8-8' stroke='%23dc2626' stroke-width='2.5' fill='none' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: center;
  background-size: contain;
}

/* Titre */
.path-resources li.downloads .views-field-title-1,
.path-ressources li.downloads .views-field-title-1 {
  grid-column: 2;
  grid-row: 1;
}

.path-resources li.downloads .views-field-title-1 .field-content,
.path-ressources li.downloads .views-field-title-1 .field-content {
  display: block;
  font-size: 15px;
  font-weight: 800;
  line-height: 1.3;
  color: #111827;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

/* Description */
.path-resources li.downloads .views-field-body,
.path-ressources li.downloads .views-field-body {
  grid-column: 2;
  grid-row: 2;
  margin-top: 8px;
}

.path-resources li.downloads .views-field-body .field-content,
.path-resources li.downloads .views-field-body p,
.path-ressources li.downloads .views-field-body .field-content,
.path-ressources li.downloads .views-field-body p {
  margin: 0;
  font-size: 14px;
  line-height: 1.5;
  color: #4b5563;
}

/* Pied : meta + bouton */
.path-resources li.downloads .views-field-field-file,
.path-ressources li.downloads .views-field-field-file {
  grid-column: 2;
  grid-row: 3;
  margin-top: 14px;
  width: 100%;
}

.path-resources li.downloads .views-field-field-file .field-content,
.path-ressources li.downloads .views-field-field-file .field-content {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
}

/* Remplacez par un champ « taille » dans la vue si vous voulez la vraie valeur (ex. 14,5 Mo). */
.path-resources li.downloads .views-field-field-file .field-content::before,
.path-ressources li.downloads .views-field-field-file .field-content::before {
  content: "PDF";
  font-size: 13px;
  font-weight: 600;
  color: #6b7280;
  flex: 0 0 auto;
}

.path-resources li.downloads .views-field-field-file .file,
.path-ressources li.downloads .views-field-field-file .file {
  flex: 0 0 auto;
  margin-left: auto;
}

.path-resources li.downloads .views-field-field-file .file a,
.path-ressources li.downloads .views-field-field-file .file a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 0 18px;
  border: 0;
  border-radius: 10px;
  background: #1e3a5f;
  color: #fff;
  font-weight: 700;
  font-size: 0;
  line-height: 0;
  text-decoration: none;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  transition: background 0.18s ease, transform 0.12s ease;
}

.path-resources li.downloads .views-field-field-file .file a::before,
.path-ressources li.downloads .views-field-field-file .file a::before {
  content: "TÉLÉCHARGER";
  font-size: 12px;
  line-height: 1.2;
  color: #fff;
}

.path-resources li.downloads .views-field-field-file .file a::after,
.path-ressources li.downloads .views-field-field-file .file a::after {
  content: "";
  display: inline-block;
  width: 16px;
  height: 16px;
  background-color: #fff;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='black' d='M12 3a1 1 0 0 1 1 1v9.59l2.3-2.29a1 1 0 0 1 1.4 1.42l-4 4a1 1 0 0 1-1.4 0l-4-4a1 1 0 0 1 1.4-1.42L11 13.59V4a1 1 0 0 1 1-1zm-7 14a1 1 0 0 1 1 1v1h12v-1a1 1 0 1 1 2 0v2a1 1 0 0 1-1 1H4a1 1 0 0 1-1-1v-2a1 1 0 0 1 1-1z'/%3E%3C/svg%3E") center / contain no-repeat;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='black' d='M12 3a1 1 0 0 1 1 1v9.59l2.3-2.29a1 1 0 0 1 1.4 1.42l-4 4a1 1 0 0 1-1.4 0l-4-4a1 1 0 0 1 1.4-1.42L11 13.59V4a1 1 0 0 1 1-1zm-7 14a1 1 0 0 1 1 1v1h12v-1a1 1 0 1 1 2 0v2a1 1 0 0 1-1 1H4a1 1 0 0 1-1-1v-2a1 1 0 0 1 1-1z'/%3E%3C/svg%3E") center / contain no-repeat;
}

.path-resources li.downloads .views-field-field-file .file a:hover,
.path-resources li.downloads .views-field-field-file .file a:focus-visible,
.path-ressources li.downloads .views-field-field-file .file a:hover,
.path-ressources li.downloads .views-field-field-file .file a:focus-visible {
  background: #152a45;
  outline: none;
}

.path-resources li.downloads .views-field-field-file .file a:focus-visible,
.path-ressources li.downloads .views-field-field-file .file a:focus-visible {
  box-shadow: 0 0 0 3px rgba(30, 58, 95, 0.35);
}

@media (max-width: 1100px) {
  .path-resources .view-content .item-list > ul,
  .path-resources .view-content.row .item-list > ul,
  .path-ressources .view-content .item-list > ul,
  .path-ressources .view-content.row .item-list > ul {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 700px) {
  .path-resources .view-content .item-list > ul,
  .path-resources .view-content.row .item-list > ul,
  .path-ressources .view-content .item-list > ul,
  .path-ressources .view-content.row .item-list > ul {
    grid-template-columns: 1fr;
  }
}
