/* Styles pour la page des associations */

/* Bouton de retour */
.back-button {
    display: inline-flex;
    align-items: center;
    color: rgba(255, 255, 255, 0.8);
    transition: color 0.3s ease;
}

.back-button:hover {
    color: white;
}

.back-button svg {
    transition: transform 0.3s ease;
}

.back-button:hover svg {
    transform: translateX(-4px);
}

/* Styles pour les cartes d'associations */
.grid > div {
    display: flex;
    flex-direction: column;
    height: 100%;
}

/* Styles pour les cartes d'associations */
.association-card {
    position: relative;
    overflow: hidden;
}

/* Titre des associations - force sur une ligne */
.association-card h3 {
    white-space: nowrap;
    overflow: visible; /* Permet l'affichage des points de suspension */
    text-overflow: unset; /* Supprime toute troncature CSS */
    max-width: calc(100% - 40px); /* Réserve l'espace pour le logo (minimal) */
    line-height: 1.2;
    height: 1.2em;
    flex: 1;
    min-width: 0; /* Permet au flex de se rétrécir */
    transition: all 0.3s ease; /* Animation fluide */
    font-size: 1.25rem; /* Réduction de la taille de police (au lieu de text-2xl) */
}

/* Conteneur du header de l'association */
.association-card .flex.items-center {
    min-width: 0; /* Permet au conteneur flex de se rétrécir */
}

/* Conteneur flex-1 du titre */
.association-card .flex-1 {
    min-width: 0; /* Permet au conteneur flex de se rétrécir */
    overflow: hidden;
}

.association-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 2px;
    background: linear-gradient(90deg, transparent, rgba(34, 197, 94, 0.4), transparent);
    animation: shimmer 3s infinite;
}

@keyframes shimmer {
    0% {
        left: -100%;
    }
    100% {
        left: 100%;
    }
}

/* Contenu de l'association - DESIGN AMÉLIORÉ */
.association-content {
    position: relative;
    width: 100%;
    min-height: 300px;
    border-radius: 1rem;
    overflow: hidden;
    box-shadow: none;
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #1e1e3a 100%);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    border: 1px solid rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
}

/* Effet de brillance au survol */
.association-content::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
    transition: left 0.6s ease;
}

.association-content:hover::before {
    left: 100%;
}

/* Bouton association */
.association-button {
    display: inline-block;
    text-decoration: none;
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    box-shadow: none;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.association-button:hover {
    background: linear-gradient(135deg, #059669 0%, #047857 100%);
    box-shadow: none;
    transform: translateY(-2px);
}

.association-button::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s;
}

.association-button:hover::before {
    left: 100%;
}

/* Statistiques améliorées */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
}

.stat-item {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.08) 0%, rgba(255, 255, 255, 0.03) 100%);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 0.75rem;
    padding: 1rem;
    text-align: center;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.stat-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent, rgba(34, 197, 94, 0.5), transparent);
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.stat-item:hover {
    transform: translateY(-2px);
    box-shadow: none;
    border-color: rgba(34, 197, 94, 0.3);
}

.stat-item:hover::before {
    transform: scaleX(1);
}

/* Indicateurs de type */
.type-indicator {
    display: inline-flex;
    align-items: center;
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.type-ong {
    background: linear-gradient(135deg, #60a5fa 0%, #3b82f6 100%);
    color: #1e40af;
    border: 1px solid #2563eb;
}

.type-fondation {
    background: linear-gradient(135deg, #a78bfa 0%, #8b5cf6 100%);
    color: #6b21a8;
    border: 1px solid #7c3aed;
}

.type-syndicat {
    background: linear-gradient(135deg, #f87171 0%, #ef4444 100%);
    color: #991b1b;
    border: 1px solid #dc2626;
}

.type-association {
    background: linear-gradient(135deg, #4ade80 0%, #22c55e 100%);
    color: #14532d;
    border: 1px solid #16a34a;
}

/* Mission */
.mission-badge {
    position: relative;
    overflow: hidden;
}

.mission-badge::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(34, 197, 94, 0.3), transparent);
    animation: missionGlow 2s infinite;
}

@keyframes missionGlow {
    0% {
        left: -100%;
    }
    100% {
        left: 100%;
    }
}

/* Live caritatif - DESIGN AMÉLIORÉ */
.charity-live-badge {
    position: relative;
    overflow: hidden;
    background: linear-gradient(135deg, rgba(251, 191, 36, 0.15) 0%, rgba(245, 158, 11, 0.15) 100%);
    border: 1px solid rgba(251, 191, 36, 0.3);
    box-shadow: none;
    transition: all 0.3s ease;
}

.charity-live-badge:hover {
    transform: translateY(-2px);
    box-shadow: none;
}

/* Mission badge amélioré */
.mission-badge {
    background: linear-gradient(135deg, rgba(34, 197, 94, 0.15) 0%, rgba(16, 185, 129, 0.15) 100%);
    border: 1px solid rgba(34, 197, 94, 0.3);
    box-shadow: none;
    transition: all 0.3s ease;
}

.mission-badge:hover {
    transform: translateY(-2px);
    box-shadow: none;
}

.charity-live-badge::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(251, 191, 36, 0.3), transparent);
    animation: charityGlow 2s infinite;
}

@keyframes charityGlow {
    0% {
        left: -100%;
    }
    100% {
        left: 100%;
    }
}

/* Animation pour le montant collecté */
.charity-amount {
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
}

/* Styles pour les logos des associations */
.association-card img {
    transition: transform 0.3s ease, filter 0.3s ease;
    border-radius: 50%;
    object-fit: contain;
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
}

.association-card:hover img {
    transform: scale(1.05);
    filter: brightness(1.1);
}

/* Conteneur du logo */
.association-card .w-16.h-16 {
    overflow: hidden;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border: 2px solid rgba(34, 197, 94, 0.3);
}

/* Fallback avec initiales */
.association-card .w-12.h-12 {
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* Responsive */
@media (max-width: 768px) {
    .association-content {
        min-height: 150px;
        padding: 1rem;
    }
    
    .association-button {
        padding: 0.75rem 1.5rem;
        font-size: 0.875rem;
    }
}

/* Animations d'entrée */
.association-card {
    animation: fadeInUp 0.6s ease-out;
}

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

/* Délai d'animation pour chaque carte */
.association-card:nth-child(1) { animation-delay: 0.1s; }
.association-card:nth-child(2) { animation-delay: 0.2s; }
.association-card:nth-child(3) { animation-delay: 0.3s; }
.association-card:nth-child(4) { animation-delay: 0.4s; }
.association-card:nth-child(5) { animation-delay: 0.5s; }
.association-card:nth-child(6) { animation-delay: 0.6s; }

/* Effet de survol pour les logos */
.association-card img {
    transition: transform 0.3s ease, filter 0.3s ease;
}

.association-card:hover img {
    transform: scale(1.05);
    filter: brightness(1.1);
}

/* Style pour les liens externes */
.association-button[target="_blank"]::after {
    content: '↗';
    margin-left: 0.5rem;
    font-size: 0.875rem;
    opacity: 0.7;
    transition: opacity 0.3s ease;
}

.association-button[target="_blank"]:hover::after {
    opacity: 1;
}

/* Grille d'informations */
.grid.grid-cols-2 {
    gap: 1rem;
}

.grid.grid-cols-2 > div {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 0.5rem;
    padding: 0.75rem;
    text-align: center;
    transition: background-color 0.3s ease;
}

.grid.grid-cols-2 > div:hover {
    background: rgba(255, 255, 255, 0.1);
}

/* Indicateurs de statut */
.status-indicator {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.status-dot {
    width: 0.75rem;
    height: 0.75rem;
    border-radius: 50%;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.5;
    }
}
