/* ============================================
   COOKIES & LEGAL - chargé indépendamment du thème
   ============================================ */

/* ===== POPUP COOKIE ===== */
#cookie-modal {
    display: none !important;
    position: fixed !important;
    bottom: 24px !important;
    right: 24px !important;
    left: auto !important;
    top: auto !important;
    z-index: 99999 !important;
    background: #fff !important;
    border-radius: 14px !important;
    box-shadow: 0 8px 32px rgba(0,0,0,0.22) !important;
    border: 1px solid #e2e8f0 !important;
    padding: 20px 18px 16px !important;
    width: 300px !important;
    max-width: calc(100vw - 40px) !important;
    text-align: center !important;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif !important;
}

#cookie-modal.active {
    display: block !important;
    animation: cookiePop 0.3s ease !important;
}

@keyframes cookiePop {
    from { opacity: 0; transform: translateY(12px); }
    to   { opacity: 1; transform: translateY(0); }
}

#cookie-modal .cookie-modal__icon {
    font-size: 2rem;
    margin-bottom: 6px;
    display: block;
}

#cookie-modal .cookie-modal__title {
    font-size: 1rem !important;
    font-weight: 700 !important;
    color: #1a202c !important;
    margin: 0 0 8px !important;
}

#cookie-modal .cookie-modal__text {
    font-size: 0.78rem !important;
    color: #6b7280 !important;
    line-height: 1.5 !important;
    margin: 0 0 8px !important;
}

#cookie-modal .cookie-modal__link {
    display: block;
    font-size: 0.74rem !important;
    color: #007bff !important;
    text-decoration: underline !important;
    margin-bottom: 14px !important;
}

#cookie-modal .cookie-modal__actions {
    display: flex !important;
    flex-direction: column !important;
    gap: 6px !important;
}

#cookie-modal .cookie-btn {
    display: block !important;
    width: 100% !important;
    padding: 8px 12px !important;
    border-radius: 8px !important;
    border: none !important;
    font-size: 0.8rem !important;
    font-weight: 600 !important;
    cursor: pointer !important;
    transition: opacity 0.2s !important;
}

#cookie-modal .cookie-btn:hover { opacity: 0.85 !important; }

#cookie-modal .cookie-btn--accept {
    background: #007bff !important;
    color: #fff !important;
}

#cookie-modal .cookie-btn--essential {
    background: #f1f5f9 !important;
    color: #475569 !important;
    border: 1px solid #cbd5e1 !important;
}

#cookie-modal .cookie-btn--refuse {
    background: transparent !important;
    color: #94a3b8 !important;
    border: 1px solid #e2e8f0 !important;
}

/* ===== FOOTER ===== */
footer.site-footer {
    background: #1a1a2e !important;
    color: #ccc;
    padding: 28px 20px 20px;
    text-align: center;
}

.footer-inner {
    max-width: 900px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
}

.footer-logo { font-size: 1.05rem; font-weight: 700; color: #fff; }
.footer-tagline { font-size: 0.78rem; color: #888; margin: 2px 0 0; }

.footer-links {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 6px;
    font-size: 0.82rem;
}

.footer-links a,
.footer-links a:visited,
.footer-links a:link {
    color: #aab4c4 !important;
    text-decoration: none !important;
}

.footer-links a:hover {
    color: #fff !important;
    text-decoration: underline !important;
}

.footer-sep { color: #555; }
.footer-copy { font-size: 0.75rem; color: #666; margin: 0; }

/* ===== PAGES LÉGALES ===== */
.legal-page {
    min-height: 70vh;
    background: #f0f4f8;
    padding: 40px 20px;
}

.legal-container {
    max-width: 800px !important;
    margin: 0 auto !important;
    background: #fff !important;
    border-radius: 14px !important;
    padding: 44px 48px !important;
    box-shadow: 0 4px 24px rgba(0,0,0,0.10), 0 1px 4px rgba(0,0,0,0.06) !important;
}

.legal-back {
    display: inline-block;
    color: #007bff;
    text-decoration: none;
    font-size: 0.85rem;
    margin-bottom: 24px;
}
.legal-back:hover { text-decoration: underline; }

.legal-page h1 {
    font-size: 1.8rem;
    font-weight: 700;
    color: #1a202c;
    margin-bottom: 6px;
}

.legal-date { color: #888; font-size: 0.82rem; margin-bottom: 28px; }

.legal-section {
    margin-bottom: 28px;
    border-bottom: 1px solid #f0f0f0;
    padding-bottom: 24px;
}
.legal-section:last-child { border-bottom: none; }

.legal-section h2 {
    font-size: 1.1rem;
    font-weight: 700;
    color: #2d3748;
    margin-bottom: 10px;
}

.legal-section h3 {
    font-size: 0.95rem;
    font-weight: 600;
    color: #4a5568;
    margin: 14px 0 6px;
}

.legal-section p, .legal-section li {
    font-size: 0.88rem;
    color: #555;
    line-height: 1.65;
    margin: 4px 0;
}

.legal-section ul { padding-left: 20px; margin: 8px 0; }

.legal-section a { color: #007bff; text-decoration: none; }
.legal-section a:hover { text-decoration: underline; }

.cookie-table-wrapper { overflow-x: auto; margin: 12px 0; }

.cookie-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.82rem;
}
.cookie-table th {
    background: #f0f4f8;
    padding: 8px 12px;
    text-align: left;
    font-weight: 600;
    color: #374151;
    border: 1px solid #e2e8f0;
}
.cookie-table td {
    padding: 8px 12px;
    border: 1px solid #e2e8f0;
    color: #555;
}
.cookie-table code {
    background: #f0f4f8;
    padding: 2px 5px;
    border-radius: 3px;
    font-size: 0.78rem;
}

.btn-reset-cookies {
    margin-top: 10px;
    padding: 9px 18px;
    background: #007bff;
    color: #fff;
    border: none;
    border-radius: 6px;
    font-size: 0.85rem;
    cursor: pointer;
    font-weight: 600;
}
.btn-reset-cookies:hover { background: #0056b3; }

@media (max-width: 640px) {
    .legal-container { padding: 24px 18px !important; }
    #cookie-modal { right: 12px !important; bottom: 12px !important; width: calc(100vw - 24px) !important; }
}

/* ===== SECTION ÉVÉNEMENTS - forcé ===== */
.evenements-section {
    padding: 0 !important;
}

.evenements-container {
    display: flex !important;
    justify-content: center !important;
    margin-top: 10px !important;
}

.evenements-box {
    width: 95% !important;
    max-width: 1200px !important;
    background: #f5f5f5 !important;
    padding: 15px !important;
    border-radius: 10px !important;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1) !important;
}

.evenements-grid {
    display: flex !important;
    flex-direction: column !important;
    gap: 12px !important;
}

.evenement-card {
    background: #fff !important;
    border-radius: 10px !important;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06) !important;
    overflow: hidden !important;
    display: flex !important;
}

.evenement-photo-inline {
    margin-top: 10px !important;
}

.evenement-photo-inline img {
    max-width: 800px !important;
    width: 100% !important;
    height: auto !important;
    border-radius: 8px !important;
    display: block !important;
}

.evenement-body {
    display: flex !important;
    gap: 16px !important;
    padding: 14px 18px !important;
    align-items: flex-start !important;
    flex: 1 !important;
}

.evenement-date-badge {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    background: #0da85d !important;
    color: #fff !important;
    border-radius: 8px !important;
    padding: 10px 12px !important;
    min-width: 54px !important;
    text-align: center !important;
    flex-shrink: 0 !important;
}

.ev-day { font-size: 1.5rem !important; font-weight: 800 !important; line-height: 1 !important; }
.ev-month { font-size: 0.68rem !important; text-transform: uppercase !important; color: #fff !important; margin-top: 2px !important; }
.ev-year  { font-size: 0.62rem !important; color: rgba(255,255,255,0.8) !important; margin-top: 1px !important; }

.evenement-info { flex: 1 !important; }
.evenement-titre { font-size: 1rem !important; font-weight: 700 !important; color: #222 !important; margin: 0 0 5px !important; }
.evenement-meta  { font-size: 14px !important; color: #555 !important; margin: 2px 0 !important; }
.evenement-meta i { width: 14px !important; margin-right: 4px !important; color: #0073e6 !important; }
.evenement-desc  { font-size: 13px !important; color: #444 !important; margin: 6px 0 5px !important; line-height: 1.5 !important; }

.evenement-actions { display: flex !important; flex-wrap: wrap !important; gap: 10px !important; margin-top: 6px !important; }
.evenement-lien { font-size: 13px !important; color: #0073e6 !important; text-decoration: none !important; font-weight: bold !important; }
.evenement-lien--pdf { color: #dc3545 !important; }

.evenements-voir-plus { text-align: center !important; margin-top: 16px !important; }
.btn-voir-plus {
    display: inline-block !important;
    padding: 9px 22px !important;
    background: #222 !important;
    color: #fff !important;
    border-radius: 6px !important;
    text-decoration: none !important;
    font-size: 14px !important;
    font-weight: bold !important;
}
.btn-voir-plus:hover { background: #0073e6 !important; color: #fff !important; }

@media (max-width: 600px) {
    .evenement-card  { flex-direction: column !important; }
    .evenement-photo { width: 100% !important; min-width: unset !important; height: 150px !important; }
    .evenement-body  { flex-direction: column !important; }
}

/* ===== MODAL DÉTAIL ÉVÉNEMENT ===== */
.ev-modal-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.6);
    z-index: 9990;
    backdrop-filter: blur(3px);
}
.ev-modal-overlay.active { display: block; }

.ev-modal {
    display: none;
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -48%) scale(0.97);
    z-index: 9991;
    background: #fff;
    border-radius: 14px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.25);
    max-width: 580px;
    width: calc(100vw - 32px);
    max-height: 88vh;
    overflow-y: auto;
    opacity: 0;
    transition: all 0.25s ease;
}
.ev-modal.active {
    display: block;
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
}

.ev-modal-close {
    position: absolute;
    top: 12px;
    right: 14px;
    background: rgba(0,0,0,0.08);
    border: none;
    border-radius: 50%;
    width: 30px;
    height: 30px;
    font-size: 0.85rem;
    cursor: pointer;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
}
.ev-modal-close:hover { background: rgba(0,0,0,0.18); }

.ev-modal-photo-wrap {
    display: none !important;
}

.ev-modal-body {
    padding: 22px 24px 24px;
}

.ev-modal-header {
    display: flex;
    gap: 16px;
    align-items: flex-start;
    margin-bottom: 16px;
}

.ev-modal-badge-large {
    padding: 12px 14px !important;
    min-width: 62px !important;
}
.ev-modal-badge-large .ev-day   { font-size: 1.8rem !important; }
.ev-modal-badge-large .ev-month { font-size: 0.75rem !important; }
.ev-modal-badge-large .ev-year  { font-size: 0.68rem !important; }

.ev-modal-titre {
    font-size: 1.25rem !important;
    font-weight: 700 !important;
    color: #1a202c !important;
    margin: 0 0 8px !important;
}

.ev-modal-desc {
    font-size: 0.88rem;
    color: #444;
    line-height: 1.7;
    white-space: pre-line;
    margin-bottom: 16px;
    padding-top: 8px;
    border-top: 1px solid #f0f0f0;
}

.ev-modal-photo-bottom {
    width: 100%;
    margin: 16px 0;
}
.ev-modal-photo-bottom img {
    width: 100% !important;
    height: auto !important;
    border-radius: 8px !important;
    display: block !important;
}

.ev-modal-actions {
    padding-top: 12px;
    border-top: 1px solid #f0f0f0;
    gap: 14px !important;
}

/* Hint "cliquer pour voir" */
.evenement-voir-plus-hint {
    font-size: 0.72rem !important;
    color: #aaa !important;
    margin: 6px 0 0 !important;
    font-style: italic;
}

.evenement-card:hover .evenement-voir-plus-hint {
    color: #0073e6 !important;
}

/* Badge date plage (plusieurs jours) */
.ev-badge-range {
    flex-direction: row !important;
    align-items: center !important;
    gap: 6px !important;
    min-width: unset !important;
    padding: 8px 12px !important;
}

.ev-date-block {
    display: flex;
    flex-direction: column;
    align-items: center;
    min-width: 40px;
}

.ev-range-arrow {
    font-size: 0.75rem;
    color: #fff;
    flex-shrink: 0;
}

/* ===== SÉPARATEURS MOIS (page tous les événements) ===== */
.ev-mois-separator {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 28px 0 12px;
}
.ev-mois-separator:first-of-type { margin-top: 8px; }

.ev-mois-label {
    font-size: 1rem;
    font-weight: 700;
    color: #0da85d;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    white-space: nowrap;
}

.ev-mois-separator::after {
    content: '';
    flex: 1;
    height: 2px;
    background: #e2e8f0;
    border-radius: 2px;
}

.ev-mois-grid {
    margin-bottom: 8px !important;
}