/* Eurêka Grid Popup Styles - Version Responsive */

/* Reset et base */
.eureka-grid-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    height: 100dvh;
    padding: 20px;
    box-sizing: border-box;
    font-family: 'Source Sans Pro', sans-serif;
    background: #f8f9fa;
    z-index: 999999;
    overflow-y: auto;
}

/* Titre principal */
.grid-header {
    text-align: center;
    margin-bottom: 30px;
}

.grid-title {
    font-weight: 900;
    font-size: 2.5rem;
    color: #CC9922;
    margin: 0;
    letter-spacing: 2px;
    text-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

/* Grille responsive */
.grid-layout {
    display: grid;
    width: 100%;
    align-content: start;
}

/* Grille responsive simple */
.grid-layout {
    grid-template-columns: repeat(3, 1fr);
    gap: 40px;
    height: auto;
}

/* Tablet : 2 colonnes */
@media (max-width: 1023px) {
    .grid-layout {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Mobile : 1 colonne */
@media (max-width: 767px) {
    .grid-layout {
        grid-template-columns: 1fr;
        gap: 30px;
    }
}

/* Cartes de la grille */
.grid-card {
    width: 100%;
    aspect-ratio: 16/9;
    overflow: hidden;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    border-radius: 10px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.1);
}

.grid-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 40px rgba(0,0,0,0.2);
}

/* Images des cartes */
.card-image {
    width: 100%;
    height: 100%;
    overflow: hidden;
    position: relative;
}

.card-hero-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.grid-card:hover .card-hero-image {
    transform: scale(1.05);
}

/* Pop-up */
.popup-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    padding: 20px;
}

.popup-overlay.active {
    display: flex;
}

.popup-card {
    background: white;
    border-radius: 20px;
    max-width: 500px;
    width: 100%;
    max-height: 80vh;
    overflow-y: auto;
    position: relative;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
}

/* Bouton fermer */
.close-button {
    position: absolute;
    top: 15px;
    right: 15px;
    background: none;
    border: none;
    font-size: 24px;
    color: #666;
    cursor: pointer;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    z-index: 10;
}

.close-button:hover {
    background: #f0f0f0;
    color: #333;
}

/* Contenu du pop-up */
.popup-content {
    padding: 40px 30px 30px;
}

.popup-title {
    font-size: 1.8rem;
    font-weight: 700;
    color: #333;
    margin-bottom: 20px;
    line-height: 1.3;
}

.popup-description {
    margin-bottom: 30px;
}

.popup-description ul {
    list-style: none !important;
    padding: 0;
    margin: 0;
}

.popup-description li {
    padding: 8px 0;
    padding-left: 25px;
    position: relative;
    color: #555;
    line-height: 1.5;
}

.popup-description li:before {
    content: "";
    color: #28a745;
    font-weight: bold;
    font-size: 1.2rem;
    position: absolute;
    left: 0;
    top: 6px;
}

/* Bouton du pop-up */
.popup-link {
    display: block;
    background: linear-gradient(135deg, #CC9922 0%, #B8860B 100%);
    color: white;
    text-decoration: none;
    padding: 15px 30px;
    border-radius: 25px;
    font-weight: 600;
    font-size: 1rem;
    transition: all 0.3s ease;
    box-shadow: 0 5px 15px rgba(204, 153, 34, 0.3);
    text-align: center;
    margin: 0 auto;
    width: fit-content;
}

.popup-link:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(204, 153, 34, 0.4);
    color: white;
    text-decoration: none;
}

.link-text {
    display: inline-block;
}

/* Responsive pour le pop-up */
@media (max-width: 768px) {
    .popup-card {
        max-width: 95%;
        margin: 10px;
    }
    
    .popup-content {
        padding: 30px 20px 20px;
    }
    
    .popup-title {
        font-size: 1.5rem;
    }
    
    .popup-link {
        width: 100%;
        text-align: center;
        box-sizing: border-box;
    }
}

/* Animation d'entrée pour le pop-up */
@keyframes popupFadeIn {
    from {
        opacity: 0;
        transform: scale(0.8);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.popup-overlay.active .popup-card {
    animation: popupFadeIn 0.3s ease-out;
}
