@import url('../_components/lists.css'); 
/* ===== Agenda ===== */
.agenda-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

#events-list {
    display: grid;
    gap: 20px;
    margin-top: 20px;
}

.event {
    background-color: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px var(--shadow-color);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    cursor: pointer;
    display: flex;
}

.event:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.15);
}

.event-date {
    background-color: var(--secondary-color);
    color: var(--text-color-light);
    padding: 5px 10px;
    font-weight: bold;
    font-size: 0.9em;
    display: inline-block;
    margin: 10px;
    border-radius: 4px;
    width:4rem;
    height:auto;
    text-align: center;
    align-self: center;
}

.event-date-futur {
    background-color: #026c00;
}
.event-descr {
    display: inline-block;
    margin: 10px;
    text-align: left;
    flex:1;
}

.event-type {
    color: var(--secondary-color);
    font-weight: 600;
    text-transform: uppercase;
    font-size: 1em;
}

.event-title {
    font-weight: 600;
    font-size: 1.5em;
    line-height: 1em;
    margin: 3px 0px 3px 0px;
    padding: 0;
}

.event-location {
    font-weight: normal;
    font-size: 0.7em;
    line-height: 1em;
}

.event-summary {
    color: #555;
    font-size: 0.95em;
    line-height: 1em;
    margin-top: 7px;
}


/* ===== Popup (Modal) ===== */
.event-modal-content {
    background-color: white;
    border-radius: 8px;
    max-width: 800px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    padding: 20px;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.3);
}

.event-modal-image {
    width: 100%;
    max-height: 400px;
    object-fit: contain;
    border-radius: 4px;
    margin-bottom: 15px;
}

.event-modal-date {
    color: var(--secondary-color);
    font-weight: 600;
    margin-bottom: 10px;
    font-size: 1.1em;
}

.event-modal-type {
    color: #666;
    font-size: 0.9em;
    margin-bottom: 10px;
    text-align: left;
}

.event-modal-title {
    font-size: 1.5em;
    margin: 0 0 15px;
    color: var(--text-color-dark);
}

.event-modal-dates-title {
    text-align: left;
}

.event-modal-description {
    line-height: 1.6;
    color: #333;
    text-align: justify;
    margin-bottom: 15px;
}

/* ===== Responsive ===== */
@media (max-width: 768px) {
    #events-list {
        grid-template-columns: 1fr;
    }

    .event-modal-content {
        width: 95%;
        padding: 15px;
    }

    .event-modal-image {
        max-height: 300px;
    }
}

/* Modale */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    animation: fadeIn 0.3s;
}

.modal.active{
    display: block;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.modal-content {
    position: relative;
    background: linear-gradient(135deg, #f5f7fa 0%, #e4e8f0 100%);
    width: 90%;
    max-width: 700px;
    max-height: 90vh;
    margin: 5vh auto;

    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.3);
    overflow: hidden;
}

.modal-body {
    margin-top: 45px; /* Espace pour le bouton close */
    max-height: calc(90vh - 45px);
    overflow-y: auto;
    padding: 20px;  
    background-color: white;
}

.close {
    position: absolute;
    top: 10px;
    right: 15px;
    color: #777;
    font-size: 30px;/* en px car c'est une icone */
    font-weight: bold;
    cursor: pointer;
    transition: color 0.2s;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.8);
}

.close:hover {
    color: #333;
    background: rgba(255, 255, 255, 1);
}
