/*
Theme Name: Artfully Child
Template: googly
*/

:root {
    --primary: #1a1a2e;
    --accent: #e94560;
    --accent-light: #ff6b89;
    --bg: #f8f9fa;
    --card-bg: #ffffff;
    --text: #2d3436;
    --text-light: #636e72;
    --border: #e1e8ed;
    --shadow: rgba(0, 0, 0, 0.08);
    --shadow-hover: rgba(0, 0, 0, 0.15);
    --success: #00b894;
}

body {
    font-family: 'Inter', sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 2rem;
}

/* ── ARCHIVE HEADER ── */

.events-header {
    background: linear-gradient(135deg, var(--primary) 0%, #0f3460 100%);
    padding: 4rem 0 3rem;
    position: relative;
    overflow: hidden;
}

.events-header::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -10%;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(233, 69, 96, 0.15) 0%, transparent 70%);
    border-radius: 50%;
}

.header-content {
    position: relative;
    z-index: 2;
}

.events-header h1 {
    font-family: 'Italiana', sans-serif;
    font-size: 3.5rem;
    font-weight: 400;
    color: white;
    margin-bottom: 0.5rem;
    letter-spacing: -1px;
}

.header-subtitle {
    font-size: 1.1rem;
    color: rgba(255, 255, 255, 0.8);
    font-weight: 400;
}

/* ── FILTRES ── */

.filters-section {
    background: white;
    padding: 2rem 0;
    box-shadow: 0 2px 8px var(--shadow);
    position: sticky;
    top: 0;
    z-index: 100;
    margin-bottom: 3rem;
}

.filters-container {
    display: flex;
    gap: 1.5rem;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
}

.filters-left {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    flex: 1;
}

.search-box {
    position: relative;
    min-width: 300px;
}

.search-box input {
    width: 100%;
    padding: 0.9rem 1rem 0.9rem 3rem;
    border: 2px solid var(--border);
    border-radius: 12px;
    font-size: 0.95rem;
    transition: all 0.3s ease;
    font-family: 'Inter', sans-serif;
}

.search-box input:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(233, 69, 96, 0.1);
}

.search-box i {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-light);
}

.filter-select {
    padding: 0.9rem 2.5rem 0.9rem 1rem;
    border: 2px solid var(--border);
    border-radius: 12px;
    font-size: 0.95rem;
    background: white;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: 'Inter', sans-serif;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23636e72' d='M6 9L1 4h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 1rem center;
}

.filter-select:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(233, 69, 96, 0.1);
}

.view-toggle {
    display: flex;
    gap: 0.5rem;
    background: var(--bg);
    padding: 0.3rem;
    border-radius: 10px;
}

.view-btn {
    padding: 0.7rem 1.2rem;
    border: none;
    background: transparent;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 1rem;
    color: var(--text-light);
}

.view-btn.active {
    background: white;
    color: var(--accent);
    box-shadow: 0 2px 4px var(--shadow);
}

/* ── GRILLE ÉVÉNEMENTS ── */

.events-container {
    padding: 2rem 0 4rem;
}

.events-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 2rem;
    animation: fadeIn 0.5s ease;
}

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

.event-card {
    background: var(--card-bg);
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 4px 12px var(--shadow);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    position: relative;
}

.event-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 24px var(--shadow-hover);
}

.event-image {
    width: 100%;
    height: 240px;
    object-fit: cover;
    transition: transform 0.5s ease;
}

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

.event-date-badge {
    position: absolute;
    top: 1rem;
    left: 1rem;
    background: var(--accent);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.85rem;
    box-shadow: 0 4px 12px rgba(233, 69, 96, 0.4);
    z-index: 10;
}

.event-content { padding: 1.5rem; }

.event-category {
    display: inline-block;
    background: rgba(233, 69, 96, 0.1);
    color: var(--accent);
    padding: 0.3rem 0.8rem;
    border-radius: 6px;
    font-size: 0.8rem;
    font-weight: 600;
    margin-bottom: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.event-title {
    font-family: 'Playfair Display', serif;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 0.8rem;
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.event-meta {
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border);
}

.meta-item {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    color: var(--text-light);
    font-size: 0.9rem;
}

.meta-item i { color: var(--accent); width: 16px; }

.status-badge {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: rgba(0, 0, 0, 0.7);
    color: white;
    padding: 0.4rem 0.9rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.status-badge.past     { background: rgba(99, 110, 114, 0.9); }
.status-badge.upcoming { background: rgba(0, 184, 148, 0.9); }

/* Vue liste */
.events-list { display: flex; flex-direction: column; gap: 1.5rem; }

.events-list .event-card {
    display: grid;
    grid-template-columns: 300px 1fr;
    gap: 2rem;
}

.events-list .event-image  { width: 100%; height: 100%; min-height: 200px; }
.events-list .event-content { padding: 2rem; }
.events-list .event-title  { font-size: 1.8rem; }
.events-list .event-meta   { flex-direction: row; flex-wrap: wrap; }

/* Empty state */
.empty-state { text-align: center; padding: 4rem 2rem; }
.empty-state i { font-size: 4rem; color: var(--text-light); margin-bottom: 1.5rem; display: block; }
.empty-state h3 { font-size: 1.5rem; color: var(--text); margin-bottom: 0.5rem; }
.empty-state p { color: var(--text-light); }

/* Spinner */
.loading { display: flex; justify-content: center; align-items: center; padding: 4rem; }
.spinner { width: 50px; height: 50px; border: 4px solid var(--border); border-top-color: var(--accent); border-radius: 50%; animation: spin 1s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ── SINGLE HERO ── */

.event-hero {
    position: relative;
    height: 70vh;
    min-height: 500px;
    overflow: hidden;
    background: var(--primary);
}

.hero-image {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    object-fit: cover;
    opacity: 0.4;
}

.hero-overlay {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: linear-gradient(to bottom, transparent 0%, rgba(26, 26, 46, 0.9) 100%);
}

.hero-content {
    position: relative;
    z-index: 10;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem 4rem;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
}

.event-badge {
    display: inline-block;
    background: var(--accent);
    color: white;
    padding: 0.6rem 1.2rem;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 1.5rem;
    width: fit-content;
    box-shadow: 0 4px 15px rgba(233, 69, 96, 0.5);
}

.event-hero h1 {
    font-family: 'Italiana', sans-serif;
    font-size: 4rem;
    font-weight: 400;
    color: white;
    margin-bottom: 1rem;
    line-height: 1.1;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

.event-subtitle {
    font-size: 1.3rem;
    color: rgba(255, 255, 255, 0.9);
    max-width: 700px;
    font-weight: 400;
}

/* ── BOUTON RETOUR ── */
/* Positionné en absolu sur desktop, dans le flux sur mobile */

.back-button {
    position: absolute;
    top: 5rem;
    left: 2rem;
    z-index: 20;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: white;
    text-decoration: none;
    font-weight: 500;
    padding: 0.8rem 1.5rem;
    background: rgba(255, 255, 255, 0.5);
    border-radius: 10px;
    transition: all 0.3s ease;
}

.back-button:hover {
    background: rgba(255, 255, 255, 0.65);
    transform: translateX(-5px);
}

/* ── SINGLE CONTENU ── */

.event-content-wrapper {
    max-width: 1200px;
    margin: -3rem auto 0;
    padding: 0 2rem 4rem;
    position: relative;
    z-index: 15;
}

.content-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 3rem;
}

.main-content {
    background: white;
    border-radius: 20px;
    padding: 3rem;
    box-shadow: 0 10px 40px var(--shadow);
    min-width: 0; /* FIX débordement CSS grid */
}

.main-content .img-fluid {
    width: 100%;
    height: auto;
    border-radius: 12px;
    display: block;
}

.event-description {
    font-size: 1.1rem;
    line-height: 1.8;
    color: var(--text);
    margin-bottom: 2rem;
    word-break: break-word;
}

.event-description h2 { font-family: 'Playfair Display', serif; font-size: 2rem; color: var(--primary); margin: 2rem 0 1rem; }
.event-description p  { margin-bottom: 1rem; }
.event-description ul { margin: 1rem 0 1rem 2rem; }
.event-description li { margin-bottom: 0.5rem; }

/* ── SIDEBAR ── */

.sidebar { display: flex; flex-direction: column; gap: 2rem; }

.info-card {
    background: white;
    border-radius: 20px;
    padding: 2rem;
    box-shadow: 0 10px 40px var(--shadow);
}

.info-card h3 {
    font-family: 'Italiana', sans-serif;
    font-size: 1.5rem;
    color: var(--primary);
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.7rem;
}

.info-card h3 i { color: var(--accent); }

.info-item {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    padding: 1rem 0;
    border-bottom: 1px solid var(--border);
}

.info-item:last-child { border-bottom: none; }

.info-icon {
    width: 40px; height: 40px; min-width: 40px;
    background: rgba(233, 69, 96, 0.1);
    border-radius: 10px;
    display: flex; align-items: center; justify-content: center;
    color: var(--accent);
    flex-shrink: 0;
}

.info-details { flex: 1; min-width: 0; }

.info-label {
    font-size: 0.85rem;
    color: var(--text-light);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 0.3rem;
    font-weight: 600;
}

.info-value { font-size: 1rem; color: var(--text); font-weight: 500; word-break: break-word; }

.cta-button {
    width: 100%;
    padding: 1.2rem;
    background: linear-gradient(135deg, var(--accent) 0%, var(--accent-light) 100%);
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(233, 69, 96, 0.3);
    margin-top: 1rem;
}

.cta-button:hover { transform: translateY(-2px); box-shadow: 0 6px 20px rgba(233, 69, 96, 0.4); }
.cta-button i { margin-right: 0.5rem; }

.status-indicator {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: rgba(0, 184, 148, 0.1);
    color: var(--success);
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.9rem;
    margin-top: 1rem;
}

.status-indicator.past { background: rgba(99, 110, 114, 0.1); color: var(--text-light); }
.status-dot { width: 8px; height: 8px; background: currentColor; border-radius: 50%; animation: pulse 2s infinite; }
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.5; } }

/* ── MAP ── */

.map-card {
    background: white;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 10px 40px var(--shadow);
    margin-top: 3rem;
}

.map-header { padding: 1.5rem 2rem; border-bottom: 1px solid var(--border); }
.map-header h3 { font-family: 'Italiana', sans-serif; font-size: 1.5rem; color: var(--primary); display: flex; align-items: center; gap: 0.7rem; }
.map-header h3 i { color: var(--accent); }
.map-container { width: 100%; height: 400px; background: var(--bg); }
#map { width: 100%; height: 100%; }
.map-address { padding: 1.5rem 2rem; background: var(--bg); }
.map-address p { display: flex; align-items: center; gap: 0.7rem; color: var(--text); font-size: 1rem; }
.map-address i { color: var(--accent); }

.get-directions {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--accent);
    text-decoration: none;
    font-weight: 600;
    margin-top: 1rem;
    padding: 0.8rem 1.5rem;
    border: 2px solid var(--accent);
    border-radius: 10px;
    transition: all 0.3s ease;
}

.get-directions:hover { background: var(--accent); color: white; }

/* ── PARTAGE ── */

.share-section {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border);
    flex-wrap: wrap; /* FIX débordement */
}

.share-label { font-weight: 600; color: var(--text); white-space: nowrap; }
.share-buttons { display: flex; gap: 0.5rem; flex-wrap: wrap; }

.share-btn {
    width: 40px; height: 40px;
    border-radius: 10px;
    display: flex; align-items: center; justify-content: center;
    border: none; cursor: pointer;
    transition: all 0.3s ease;
    font-size: 1rem;
}

.share-btn.facebook { background: #1877f2; color: white; }
.share-btn.twitter  { background: #1da1f2; color: white; }
.share-btn.linkedin { background: #0a66c2; color: white; }
.share-btn.email    { background: var(--text-light); color: white; }
.share-btn:hover { transform: translateY(-3px); box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2); }

h2.elementor-heading-title { margin-bottom: 0.5em; }

/* ══════════════════════════════════════════
   RESPONSIVE — tablette large (≤ 1024px)
   ══════════════════════════════════════════ */

@media (max-width: 1024px) {
    .content-grid {
        grid-template-columns: 3fr 2fr;
        gap: 2rem;
    }
}

/* ══════════════════════════════════════════
   RESPONSIVE — tablette (≤ 768px)
   ══════════════════════════════════════════ */

@media (max-width: 768px) {

    /* Archive */
    .events-header { padding: 3rem 0 2rem; }
    .events-header h1 { font-size: 2.5rem; }
    .events-grid { grid-template-columns: 1fr; }
    .search-box { min-width: 100%; }
    .filters-container { flex-direction: column; align-items: stretch; }
    .filters-left { flex-direction: column; }
    .events-list .event-card { grid-template-columns: 1fr; }
    .events-list .event-image { height: 220px; }

    /* Single hero : on empile verticalement */
    .event-hero {
        height: auto;
        min-height: 0;
        display: flex;
        flex-direction: column;
    }

    /* Image redevient statique et visible */
    .hero-image {
        position: relative;
        height: 260px;
        width: 100%;
        opacity: 1;
        flex-shrink: 0;
    }

    /* On cache l'overlay (remplacé par fond uni sur .hero-content) */
    .hero-overlay { display: none; }

    /* Bouton retour dans le flux, pleine largeur, tout en haut */
    .back-button {
        position: relative;
        top: auto; left: auto;
        order: -1;
        width: 100%;
        border-radius: 0;
        background: rgba(26, 26, 46, 0.95);
        border-bottom: 1px solid rgba(255, 255, 255, 0.15);
        padding: 1rem 1.25rem;
        justify-content: flex-start;
        transform: none;
    }

    .back-button:hover { transform: none; background: rgba(26, 26, 46, 0.95); }

    /* Bloc texte sur fond sombre */
    .hero-content {
        position: relative;
        background: var(--primary);
        padding: 1.75rem 1.25rem 2rem;
        height: auto;
        justify-content: flex-start;
    }

    .event-hero h1  { font-size: 2rem; }
    .event-subtitle { font-size: 1rem; }

    /* Contenu */
    .event-content-wrapper {
        margin-top: 0;
        padding: 1.25rem 1rem 3rem;
    }

    .content-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    /* Sidebar avant le contenu principal */
    .sidebar      { order: -1; }
    .main-content { order: 1; padding: 1.5rem; }

    .map-card      { margin-top: 1.5rem; }
    .map-container { height: 280px; }
}

/* ══════════════════════════════════════════
   RESPONSIVE — mobile (≤ 480px)
   ══════════════════════════════════════════ */

@media (max-width: 480px) {

    .container { padding: 0 0.75rem; }

    /* Archive */
    .events-container { padding: 1rem 0 2rem; }
    .events-grid { gap: 1.25rem; }

    /* Single */
    .hero-image { height: 200px; }
    .event-hero h1 { font-size: 1.75rem; }
    .hero-content { padding: 1.25rem 1rem 1.5rem; }

    .event-content-wrapper { padding: 1rem 0.75rem 2rem; }
    .main-content { padding: 1.25rem; border-radius: 14px; }
    .info-card    { padding: 1.25rem; border-radius: 14px; }
    .event-description { font-size: 1rem; }

    .share-section { flex-direction: column; align-items: flex-start; }

    .map-container { height: 220px; }
    .map-header,
    .map-address  { padding: 1rem 1.25rem; }
}