/*
 * Section Instagram.
 *
 * Grille carree, comme sur le compte d'origine : le visiteur reconnait
 * immediatement ce qu'il regarde. La legende n'apparait qu'au survol pour ne
 * pas alourdir la page, mais reste dans le texte alternatif de l'image, donc
 * accessible a un lecteur d'ecran.
 */

.insta {
    padding: 3.5rem 0;
    background: var(--ye-cream, #fffaf2);
}

.insta-in {
    max-width: 1180px;
    margin: 0 auto;
    padding: 0 1.25rem;
}

.insta-entete {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.insta-surtitre {
    display: flex;
    align-items: center;
    gap: .4rem;
    margin: 0 0 .25rem;
    /* 5,3:1 sur le fond creme */
    color: #6b625c;
    font-size: .85rem;
    font-weight: 700;
}

.insta-titre {
    margin: 0;
    font-size: clamp(1.5rem, 3vw, 2rem);
    font-weight: 800;
    color: var(--ye-ink, #1f1a1c);
}

.insta-suivre {
    display: inline-flex;
    align-items: center;
    gap: .45rem;
    padding: .7rem 1.3rem;
    border-radius: 999px;
    background: var(--ye-green-800, #087553);
    color: #fff;                    /* 5,7:1 */
    font-weight: 700;
    font-size: .92rem;
    text-decoration: none;
    transition: background-color .2s ease;
}

.insta-suivre:hover,
.insta-suivre:focus-visible {
    background: var(--ye-green-950, #063c2c);
    color: #fff;
}

.insta-grille {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: .75rem;
    margin: 0;
    padding: 0;
    list-style: none;
}

.insta-case a {
    position: relative;
    display: block;
    border-radius: 14px;
    overflow: hidden;
    background: #e8e2d8;
    text-decoration: none;
}

.insta-case img {
    display: block;
    width: 100%;
    height: auto;
    aspect-ratio: 1 / 1;
    object-fit: cover;
    transition: transform .35s ease;
}

.insta-case a:hover img,
.insta-case a:focus-visible img {
    transform: scale(1.04);
}

.insta-case a:focus-visible {
    outline: 3px solid var(--ye-orange, #ff7a1a);
    outline-offset: 3px;
}

/* Pastille de lecture sur les videos et Reels. */
.insta-lecture {
    position: absolute;
    top: .6rem;
    right: .6rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: rgba(18, 32, 47, .72);
    color: #fff;
    font-size: .8rem;
}

/* Legende au survol. Le voile est assez dense pour que le blanc y reste
   lisible (contraste superieur a 7:1 sur la partie basse de l'image). */
.insta-legende {
    position: absolute;
    inset: auto 0 0 0;
    padding: 2.2rem .8rem .7rem;
    background: linear-gradient(to top, rgba(18, 32, 47, .92), rgba(18, 32, 47, 0));
    color: #fff;
    font-size: .8rem;
    line-height: 1.4;
    opacity: 0;
    transition: opacity .25s ease;
}

.insta-case a:hover .insta-legende,
.insta-case a:focus-visible .insta-legende {
    opacity: 1;
}

/* Sur ecran tactile, il n'y a pas de survol : la legende reste affichee. */
@media (hover: none) {
    .insta-legende { opacity: 1; }
}

@media (prefers-reduced-motion: reduce) {
    .insta-case img,
    .insta-legende { transition: none; }
    .insta-case a:hover img { transform: none; }
}
