/* === Resurgo Events — Front styles === */

/* Container injecté après le contenu de l'article :
   on essaye de capter la largeur du contenu parent.
   La majorité des thèmes définissent une max-width sur .entry-content / .post-content / etc.
   Si l'injection se retrouve hors de ce container, on lui force la même contrainte. */
.resurgo-event-injection {
    display: block;
    width: 100%;
    max-width: 760px;          /* fallback raisonnable, ajustable selon le thème */
    margin-left: auto;
    margin-right: auto;
    box-sizing: border-box;
    padding-left: 20px;
    padding-right: 20px;
}

.resurgo-event-details {
    display: block;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    margin: 2rem 0;
    padding: 1.5rem;
    background: #f8f9fb;
    border-radius: 10px;
    border-left: 4px solid #c9a96e;
}
.resurgo-event-meta {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1.25rem;
    margin-bottom: 1.5rem;
}
.resurgo-meta-item { display: flex; gap: 0.75rem; align-items: flex-start; }
.resurgo-meta-icon { font-size: 1.5rem; line-height: 1; flex-shrink: 0; }
.resurgo-meta-content { display: flex; flex-direction: column; }
.resurgo-meta-label {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #777;
    font-weight: 600;
}
.resurgo-meta-value { font-size: 1rem; color: #222; line-height: 1.4; }
.resurgo-event-map {
    width: 100%;
    height: 320px;
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid #e1e1e1;
}
/* Sécurité : Leaflet doit s'étendre */
.resurgo-event-map .leaflet-container {
    width: 100% !important;
    height: 100% !important;
}

/* === Cartes liste d'événements === */
.resurgo-events-list { display: grid; gap: 1.5rem; margin: 2rem 0; }
.resurgo-cols-1 { grid-template-columns: 1fr; }
.resurgo-cols-2 { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
.resurgo-cols-3 { grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
.resurgo-cols-4 { grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }

.resurgo-event-card {
    background: #fff;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.resurgo-event-card:hover { transform: translateY(-3px); box-shadow: 0 6px 18px rgba(0,0,0,0.1); }
.resurgo-event-card-link { text-decoration: none; color: inherit; display: block; }
.resurgo-event-card-thumb img { width: 100%; height: 180px; object-fit: cover; display: block; }
.resurgo-event-card-body { padding: 1.25rem; }
.resurgo-event-card-title { font-size: 1.15rem; margin: 0 0 0.5rem; line-height: 1.3; }
.resurgo-event-card-date { color: #c9a96e; font-weight: 600; font-size: 0.9rem; margin-bottom: 0.4rem; }
.resurgo-event-card-venue { color: #666; font-size: 0.9rem; margin-bottom: 0.6rem; }
.resurgo-event-card-excerpt { font-size: 0.9rem; color: #555; line-height: 1.5; margin-bottom: 0.8rem; }
.resurgo-event-card-cta { color: #c9a96e; font-weight: 600; font-size: 0.9rem; }
.resurgo-no-events { padding: 2rem; text-align: center; background: #f5f5f5; border-radius: 8px; color: #666; }

/* === Wrapper formulaire GF === */
.resurgo-booking-wrapper {
    display: block;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    margin: 2.5rem 0;
    padding: 1.5rem;
    background: #fff;
    border: 1px solid #ececec;
    border-radius: 12px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.04);
}
.resurgo-booking-wrapper .gform_wrapper,
.resurgo-booking-wrapper form { width: 100%; max-width: 100%; box-sizing: border-box; }
.resurgo-form-title {
    margin: 0 0 1.25rem;
    font-size: 1.4rem;
    padding-bottom: 0.65rem;
    border-bottom: 2px solid #c9a96e;
}

/* Notices */
.resurgo-notice {
    padding: 1.25rem;
    margin: 2rem 0;
    border-radius: 8px;
    text-align: center;
    font-weight: 500;
}
.resurgo-notice-closed  { background: #fdecea; color: #8a1a13; border: 1px solid #f5b3ad; }
.resurgo-notice-warning { background: #fff8e1; color: #6b4f00; border: 1px solid #ffe082; }

@media (max-width: 600px) {
    .resurgo-booking-wrapper { padding: 1rem; }
    .resurgo-event-details   { padding: 1.25rem; }
}
