/* Pages Highlighted - Frontend Styles */

.pages-highlighted-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    margin: 40px 0;
    /*max-width: 1200px;*/
}

.grid-item {
    aspect-ratio: 1;
    overflow: hidden;
    border-radius: 8px;
    position: relative;
    /*background: #f5f5f5;*/
    transition: all 0.3s ease;
}

/* Case avec page */
/*.grid-item-page {*/
/*    box-shadow: 0 2px 8px rgba(0,0,0,0.1);*/
/*}*/

.grid-item-page:hover {
    transform: translateY(-5px);
    /*box-shadow: 0 8px 20px rgba(0,0,0,0.15);*/
}

.grid-item-link {
    display: block;
    width: 100%;
    height: 100%;
    position: relative;
    text-decoration: none;
    color: inherit;
    overflow: hidden;
}

.grid-item-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: opacity 0.4s ease;
}

.grid-item-link:hover .grid-item-image {
    opacity: 0;
}

/* Overlay coloré au hover */
.grid-item-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 30px;
    opacity: 0;
    transition: opacity 0.4s ease;
    border-radius: 8px;
}

.grid-item-link:hover .grid-item-overlay {
    opacity: 1;
}

/* Icône blanche dans l'overlay */
.overlay-icon {
    max-width: 100px;
    max-height: 100px;
    width: auto;
    height: auto;
    object-fit: contain;
    margin-bottom: 20px;
    filter: brightness(0) invert(1);
    display: block;
}

/* Titre dans l'overlay */
.overlay-title {
    font-family: Brandon_bold, sans-serif;
    color: #fff;
    font-size: 45px;
    font-weight: 700;
    text-align: center;
    line-height: 1.3;
    text-transform: none;
    width: 48%;
}

.grid-item-title {
    color: #fff;
    font-size: 16px;
    font-weight: 600;
    display: block;
}

/* Case sans image */
.grid-item-no-image {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.grid-item-no-image .grid-item-title {
    color: #fff;
    font-size: 18px;
    font-weight: 700;
    text-align: center;
}

/* Case wording (texte personnalisé) */
.grid-item-wording {
    font-family: Brandon_bold, sans-serif;
    background: #F6AB6E;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 30px;
    /*box-shadow: 0 4px 15px rgba(0,0,0,0.2);*/
}

.grid-item-wording .wording-content {
    font-size: 25px;
}

div#home-grille-wording-black {
    text-align: left;
    background: #000;
    width: max-content;
    padding: .1rem 1.5rem;
    border-radius: 99px;
    margin-top: 1em;
    font-size: 30px;
}

.wording-content {
    color: #fff;
    font-size: 20px;
    font-weight: 700;
    /*text-align: center;*/
    line-height: 1.4;
}

/* Case vide */
.grid-item-empty {
    background: transparent;
    border: none;
}

/* Image personnalisée (sans overlay, sans lien) */
.grid-item-image {
    overflow: hidden;
}

.grid-item-static-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* Responsive */
@media (max-width: 768px) {
    .pages-highlighted-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
        margin: 30px 0;
    }

    .grid-item-title {
        font-size: 14px;
    }

    .overlay-title {
        font-size: 18px;
    }

    .overlay-icon {
        max-width: 70px;
        max-height: 70px;
        margin-bottom: 15px;
    }

    .wording-content {
        font-size: 16px;
        padding: 20px;
    }
}

@media (max-width: 480px) {
    .pages-highlighted-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .overlay-title {
        font-size: 35px;
    }

    .overlay-icon {
        max-width: 50px;
        max-height: 50px;
    }

    .wording-content {
        font-size: 14px;
    }
}

/* Animation au chargement */
.grid-item {
    animation: fadeInUp 0.6s ease-out forwards;
    opacity: 0;
}

.grid-item:nth-child(1) { animation-delay: 0.1s; }
.grid-item:nth-child(2) { animation-delay: 0.2s; }
.grid-item:nth-child(3) { animation-delay: 0.3s; }
.grid-item:nth-child(4) { animation-delay: 0.4s; }
.grid-item:nth-child(5) { animation-delay: 0.5s; }
.grid-item:nth-child(6) { animation-delay: 0.6s; }
.grid-item:nth-child(7) { animation-delay: 0.7s; }
.grid-item:nth-child(8) { animation-delay: 0.8s; }
.grid-item:nth-child(9) { animation-delay: 0.9s; }

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}


@media all and (min-width: 1024px) and (max-width: 1399px) {
    .grid-item-wording .wording-content {
        font-size: 20px;
    }

    div#home-grille-wording-black {
        font-size: 25px;
    }

    .overlay-title {
        font-size: 35px;
    }
}

@media all and (max-width: 1023px) {
    .grid-item-wording .wording-content {
        font-size: 20px;
    }

    div#home-grille-wording-black {
        font-size: 25px;
    }
}
