/*
Theme Name: ACSJ / AFSJ On the Go
Theme URI: https://fetishltd.com/
Description: Thème WordPress sur mesure, léger et multilingue conçu spécifiquement pour l'ONG ACSJ. Optimisé pour Gutenberg.
Author: Sharl85
Version: 1.0.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: acsj-theme
Domain Path: /languages
*/

/* =========================================
   WIDGETS CUSTOM ACSJ — Contenus récents
   (Articles, Événements, Opportunités)
   Structure générée par : class-acsj-widget-abstract.php
   ========================================= */

.acsj-widget-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.acsj-widget-item {
    margin: 0;
}

.acsj-widget-item-link {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    color: inherit;
    padding: 8px;
    border-radius: 8px;
    transition: background-color 0.2s ease, transform 0.2s ease;
}

.acsj-widget-item-link:hover,
.acsj-widget-item-link:focus {
    background-color: #f5f5f5;
    transform: translateX(2px);
    outline: none;
}

.acsj-widget-item-link:focus-visible {
    box-shadow: 0 0 0 2px #1e5aa8;
}

.acsj-widget-item-thumb {
    flex-shrink: 0;
    width: 64px;
    height: 64px;
    border-radius: 8px;
    overflow: hidden;
    display: block;
    background-color: #e0e0e0;
}

.acsj-widget-item-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.acsj-widget-item-body {
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 0;
}

.acsj-widget-item-title {
    font-weight: 600;
    font-size: 0.95rem;
    line-height: 1.3;
    color: #1a1a1a;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.acsj-widget-item-date {
    font-size: 0.8rem;
    color: #757575;
}

.acsj-widget-empty {
    font-size: 0.9rem;
    color: #757575;
    font-style: italic;
    padding: 8px;
    margin: 0;
}

/* --- Variantes de couleur par post_type (classe générée dynamiquement) --- */

.acsj-widget-post .acsj-widget-item-link:hover {
    background-color: #eef4ff;
}
.acsj-widget-post .acsj-widget-item-link:hover .acsj-widget-item-title {
    color: #1e5aa8;
}

.acsj-widget-event .acsj-widget-item-link:hover {
    background-color: #fff4e6;
}
.acsj-widget-event .acsj-widget-item-link:hover .acsj-widget-item-title {
    color: #c8720b;
}

.acsj-widget-opportunity .acsj-widget-item-link:hover {
    background-color: #e9f9ee;
}
.acsj-widget-opportunity .acsj-widget-item-link:hover .acsj-widget-item-title {
    color: #1e8a4c;
}

/* --- Responsive : sidebars étroites (mobile / footer colonne) --- */

@media (max-width: 480px) {
    .acsj-widget-item-thumb {
        width: 52px;
        height: 52px;
    }

    .acsj-widget-item-title {
        font-size: 0.9rem;
    }
}

/* =========================================
   WIDGET ÉVÉNEMENTS — Variante numérotée
   Espacements + design des titres
   ========================================= */

.acsj-widget-event--numbered {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.acsj-widget-item--numbered {
    padding-bottom: 16px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.08); /* Séparateur par défaut : adapté à un fond clair */
}

.acsj-widget-item--numbered:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.acsj-widget-item--numbered .acsj-widget-item-link {
    align-items: flex-start;
    gap: 16px;
    padding: 6px 4px;
}

.acsj-widget-item-number {
    flex-shrink: 0;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background-color: #c8720b;
    color: #ffffff;
    font-weight: 700;
    font-size: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
    margin-top: 2px;
}

.acsj-widget-item--numbered .acsj-widget-item-link:hover .acsj-widget-item-number {
    background-color: #a35b08;
    transform: scale(1.05);
    transition: transform 0.2s ease, background-color 0.2s ease;
}

.acsj-widget-item-body {
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding-top: 2px;
    min-width: 0; /* Sécurité : évite l'écrasement en flex avec le rond numéroté */
}

/* --- Design du titre : par défaut sur fond clair (sidebar standard blanche) --- */
.acsj-widget-item--numbered .acsj-widget-item-title {
    font-size: 1rem;
    font-weight: 600;
    line-height: 1.4;
    color: #1a1a1a; /* sombre par défaut, lisible sur fond blanc */
    letter-spacing: 0.01em;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.acsj-widget-item--numbered .acsj-widget-item-link:hover .acsj-widget-item-title {
    color: #c8720b; /* Cohérent avec la variante event (orange) déjà utilisée ailleurs */
}

.acsj-widget-item--numbered .acsj-widget-item-date {
    font-size: 0.78rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: #757575; /* sombre par défaut, cohérent avec .acsj-widget-item-date de base */
}

/* --- Surcharge : uniquement quand le widget est affiché dans la sidebar navy
     (ex: "Flux Général"), le texte doit rester blanc pour rester lisible --- */
.bg-sidebar-navy .acsj-widget-item--numbered {
    border-bottom-color: rgba(255, 255, 255, 0.12);
}

.bg-sidebar-navy .acsj-widget-item--numbered .acsj-widget-item-title {
    color: #ffffff;
}

.bg-sidebar-navy .acsj-widget-item--numbered .acsj-widget-item-link:hover .acsj-widget-item-title {
    color: #ffb84d;
}

.bg-sidebar-navy .acsj-widget-item--numbered .acsj-widget-item-date {
    color: rgba(255, 255, 255, 0.55);
}

@media (max-width: 480px) {
    .acsj-widget-item-number {
        width: 28px;
        height: 28px;
        font-size: 0.85rem;
    }

    .acsj-widget-item--numbered .acsj-widget-item-title {
        font-size: 0.9rem;
    }
}

.widget-title{
    margin-top: 28px;
    text-transform: uppercase;
}

/* =========================================
   SINGLE ÉVÉNEMENT — Design "Ticket flottant"
   ========================================= */

.acsj-event-hero {
    width: 100%;
    max-height: 480px;
    overflow: hidden;
    position: relative;
}

.acsj-event-hero-img {
    width: 100%;
    height: 480px;
    object-fit: cover;
    display: block;
}

.acsj-event-container {
    max-width: 1000px;
    margin: 0 auto;
    padding: 0 20px;
}

/* --- Carte "ticket" flottante, chevauche le bas de l'image hero --- */
.acsj-event-ticket-card {
    position: relative;
    margin-top: -90px; /* chevauchement sur le hero */
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.12);
    display: flex;
    padding: 32px;
    gap: 32px;
    z-index: 2;
    flex-wrap: wrap;
}

.acsj-ticket-info {
    flex: 1 1 380px;
    min-width: 0;
}

.acsj-event-title {
    font-size: 1.7rem;
    font-weight: 700;
    color: #1a1a1a;
    margin: 0 0 20px;
    line-height: 1.3;
}

.acsj-ticket-row {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 18px;
}

.acsj-ticket-icon {
    color: #e05555;
    font-size: 1.2rem;
    margin-top: 2px;
    flex-shrink: 0;
}

.acsj-ticket-label {
    display: block;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: #9a9a9a;
    font-weight: 600;
    margin-bottom: 2px;
}

.acsj-ticket-value {
    font-size: 0.95rem;
    font-weight: 600;
    color: #333;
}

.acsj-ticket-sub {
    font-weight: 400;
    color: #888;
    font-size: 0.85rem;
}

.acsj-ticket-share {
    margin-top: 24px;
}

.acsj-share-icons {
    display: flex;
    gap: 12px;
}

.acsj-share-icons a {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: #f2f2f2;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #444;
    text-decoration: none;
    transition: background-color 0.2s ease, color 0.2s ease;
}

.acsj-share-icons a:hover {
    background: #1e5aa8;
    color: #fff;
}

/* --- Séparateur pointillé style "billet" (visible desktop uniquement) --- */
.acsj-ticket-divider {
    display: none;
    position: relative;
    width: 1px;
    border-left: 2px dashed #e0e0e0;
}

.acsj-ticket-divider-hole {
    position: absolute;
    width: 24px;
    height: 24px;
    background: #f7f7f7; /* doit matcher le fond de la page derrière la carte */
    border-radius: 50%;
    left: -13px;
}

.acsj-ticket-divider-hole--top { top: -32px; }
.acsj-ticket-divider-hole--bottom { bottom: -32px; }

@media (min-width: 768px) {
    .acsj-ticket-divider { display: block; }
}

.acsj-ticket-action {
    flex: 1 1 220px;
    text-align: center;
}

.acsj-ticket-subscribe-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: #1a1a1a;
    margin: 0 0 12px;
}

.acsj-ticket-cta-hint {
    font-size: 0.78rem;
    color: #999;
    margin-bottom: 10px;
}

.acsj-btn-add-calendar {
    display: inline-block;
    background: linear-gradient(135deg, #ff8a65, #ff5f5f);
    color: #fff;
    font-weight: 600;
    font-size: 0.85rem;
    padding: 10px 24px;
    border-radius: 24px;
    text-decoration: none;
    transition: transform 0.2s ease;
}

.acsj-btn-add-calendar:hover {
    transform: translateY(-2px);
    color: #fff;
}

.acsj-ticket-or {
    font-size: 0.75rem;
    color: #bbb;
    margin: 14px 0;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.acsj-qr-wrapper {
    display: flex;
    justify-content: center;
}

.acsj-qr-wrapper img {
    border: 1px solid #eee;
    border-radius: 8px;
    padding: 8px;
}

/* --- Section basse : détails + organisateur --- */
.acsj-event-lower-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 40px;
    margin-top: 48px;
}

@media (min-width: 768px) {
    .acsj-event-lower-grid {
        grid-template-columns: 2fr 1fr;
    }
}

.acsj-section-title {
    font-size: 1.3rem;
    font-weight: 700;
    color: #1a1a1a;
    margin-bottom: 16px;
}

.acsj-event-content {
    font-size: 1rem;
    line-height: 1.8;
    color: #444;
}

.acsj-event-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 12px;
    margin-top: 16px;
}

.acsj-gallery-item img {
    width: 100%;
    height: 120px;
    object-fit: cover;
    border-radius: 8px;
    display: block;
}

/* --- Colonne organisateur --- */
.acsj-organizer-col {
    align-self: start;
}

.acsj-organizer-label {
    display: block;
    font-size: 0.75rem;
    text-transform: uppercase;
    color: #999;
    font-weight: 600;
    margin-bottom: 10px;
}

.acsj-organizer-card {
    background: #fff;
    border: 1px solid #eee;
    border-radius: 10px;
    padding: 20px;
}

.acsj-organizer-avatar img {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    object-fit: cover;
    margin-bottom: 10px;
}

.acsj-organizer-name {
    display: block;
    font-size: 1.05rem;
    color: #1a1a1a;
    margin-bottom: 14px;
}

.acsj-organizer-field {
    margin-bottom: 10px;
    font-size: 0.88rem;
}

.acsj-organizer-field-label {
    display: block;
    font-size: 0.72rem;
    color: #aaa;
    text-transform: uppercase;
    margin-bottom: 2px;
}

.acsj-organizer-field a {
    color: #1e5aa8;
    text-decoration: none;
    word-break: break-word;
}

.acsj-organizer-field a:hover {
    text-decoration: underline;
}

.acsj-event-footer {
    margin: 48px 0 60px;
    padding-top: 24px;
    border-top: 1px solid #eee;
}

/* --- Responsive : mobile, carte ticket empile ses colonnes --- */
@media (max-width: 767px) {
    .acsj-event-ticket-card {
        margin-top: -50px;
        padding: 24px;
        flex-direction: column;
    }

    .acsj-event-hero-img,
    .acsj-event-hero {
        height: 260px;
        max-height: 260px;
    }
}