/* ---------------------------------------------------------------------------
   Grille du feed Instagram (vue Views.grilleFeed) — classes préfixées .gf-
   Couleurs : variables de style.css (--carte, --bord, --encre, --terracotta…),
   redéfinies en mode sombre par style.css lui-même.
   --------------------------------------------------------------------------- */
.gf-aide { margin: 0 0 10px; }

.gf-barre { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; margin-bottom: 10px; }
.gf-legende { font-size: 13px; }

.gf-ratio { display: inline-flex; border: 1.5px solid var(--bord); border-radius: 999px; overflow: hidden; background: var(--carte); }
.gf-ratio button {
  border: 0; background: transparent; color: var(--encre);
  padding: 8px 16px; min-height: 40px; font-size: 14px; font-weight: 700; cursor: pointer;
}
.gf-ratio button[aria-pressed="true"] { background: var(--terracotta); color: #fff; }
.gf-ratio button:focus-visible { outline: 2px solid var(--terracotta); outline-offset: -2px; }

/* Grille : 3 colonnes, 2 px d'écart comme le profil Instagram */
.gf-grille { display: grid; grid-template-columns: repeat(3, 1fr); gap: 2px; }

.gf-sep {
  grid-column: 1 / -1; display: flex; align-items: center; gap: 8px;
  margin: 10px 0 4px; font-size: 13px; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; color: var(--encre-2);
}
.gf-sep:first-child { margin-top: 0; }
.gf-sep::after { content: ""; flex: 1; height: 1px; background: var(--bord); order: 1; }
.gf-nb { order: 2; font-weight: 700; }

.gf-tuile {
  position: relative; display: block; aspect-ratio: 4 / 5; overflow: hidden;
  background: var(--carte); color: var(--encre); text-decoration: none;
}
.gf-carre .gf-tuile { aspect-ratio: 1 / 1; }
a.gf-tuile:hover { filter: brightness(.94); }
a.gf-tuile:focus-visible { outline: 2px solid var(--terracotta); outline-offset: -2px; z-index: 1; }

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

/* Tuile sans image : couleur du format et titre */
.gf-sans-image {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px;
  width: 100%; height: 100%; padding: 8px; text-align: center;
  background: var(--bleu); color: #fff; text-shadow: 0 1px 2px rgba(0, 0, 0, .35);
}
.gf-ico { font-size: 24px; line-height: 1; }
.gf-titre {
  font-size: 12px; font-weight: 700; line-height: 1.2; overflow-wrap: anywhere;
  display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden;
}

/* Publications prévues : liseré pointillé, un peu estompées */
.gf-prevue::after {
  content: ""; position: absolute; inset: 2px; border: 2px dashed var(--terracotta); border-radius: 3px; pointer-events: none;
}
.gf-prevue .gf-img, .gf-prevue .gf-sans-image { opacity: .82; }

.gf-date {
  position: absolute; left: 6px; bottom: 6px; z-index: 1;
  background: var(--carte); color: var(--encre); border: 1px solid var(--bord);
  border-radius: 999px; padding: 1px 8px; font-size: 12px; font-weight: 800; line-height: 1.5;
  box-shadow: var(--ombre);
}

.gf-reel {
  position: absolute; top: 6px; right: 6px; z-index: 1;
  width: 22px; height: 22px; border-radius: 50%; display: flex; align-items: center; justify-content: center;
  background: rgba(0, 0, 0, .55); color: #fff; font-size: 10px; line-height: 1;
}

.gf-vide { text-align: center; padding: 28px 16px; }
.gf-vide-ico { font-size: 36px; }

@media (min-width: 700px) {
  .gf-grille { max-width: 640px; margin: 0 auto; }
  .gf-aide, .gf-barre { max-width: 640px; margin-left: auto; margin-right: auto; }
  .gf-titre { font-size: 14px; }
}
