

/* ===================================
   OPPORTUNITÉS MANAGER - STYLES
   =================================== */

:root {
    --opp-primary: #e63946;
    --opp-secondary: #457b9d;
    --opp-success: #2a9d8f;
    --opp-warning: #f4a261;
    --opp-info: #264653;
    --opp-light: #f8f9fa;
    --opp-dark: #212529;
    --opp-border: #dee2e6;
    --opp-radius: 12px;
    --opp-shadow: 0 2px 8px rgba(0,0,0,0.08);
    --opp-shadow-hover: 0 4px 16px rgba(0,0,0,0.12);
    --opp-transition: all 0.3s ease;
}

/* Container principal */
.opportunites-manager {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
}
/* Styles spécifiques pour la page single */
.opportunite-single-container {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Critères d'éligibilité */
.criteria-list {
    list-style-type: none;
    padding-left: 0;
}

.criteria-item {
    padding: 12px 0;
    border-bottom: 1px dashed #eee;
    display: flex;
    align-items: flex-start;
}

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

.criteria-checkbox {
    display: inline-block;
    width: 24px;
    height: 24px;
    border: 2px solid #3498db;
    border-radius: 4px;
    margin-right: 15px;
    position: relative;
    flex-shrink: 0;
}

.criteria-checkbox.checked:after {
    content: '✓';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: #3498db;
    font-weight: bold;
}

/* ===================================
   FILTRES ET RECHERCHE
   =================================== */

.opp-filters {
    margin-bottom: 30px;
}

.opp-search-wrapper {
    position: relative;
    margin-bottom: 20px;
}

.opp-search-input {
    width: 100%;
    padding: 14px 48px 14px 20px;
    font-size: 15px;
    border: 2px solid var(--opp-border);
    border-radius: var(--opp-radius);
    transition: var(--opp-transition);
    outline: none;
    background: white;
}

.opp-search-input:focus {
    border-color: var(--opp-primary);
    box-shadow: 0 0 0 3px rgba(230, 57, 70, 0.1);
}

.opp-search-icon {
    position: absolute;
    right: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: #6c757d;
    pointer-events: none;
}

.opp-category-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.opp-filter-btn {
    padding: 10px 20px;
    font-size: 14px;
    font-weight: 500;
    background: white;
    border: 2px solid var(--opp-border);
    border-radius: 25px;
    cursor: pointer;
    transition: var(--opp-transition);
    white-space: nowrap;
}

.opp-filter-btn:hover {
    border-color: var(--opp-primary);
    color: var(--opp-primary);
    transform: translateY(-2px);
}

.opp-filter-btn.active {
    background: var(--opp-primary);
    border-color: var(--opp-primary);
    color: white;
}
/* Styles pour les badges avec couleurs dynamiques */
.opp-badge {
    /* Les styles inline seront ajoutés dynamiquement via PHP */
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-right: 5px;
    margin-bottom: 5px;
    border: none;
    transition: all 0.3s ease;
}

.opp-badge-icon {
    font-size: 14px;
}

.opp-badge-urgent {
    background-color: #dc3545 !important;
    color: white !important;
}

/* ===================================
   GRILLE DE CARTES
   =================================== */

.opp-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
    margin-bottom: 30px;
}

@media (max-width: 992px) {
    .opp-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 576px) {
    .opp-grid {
        grid-template-columns: 1fr;
    }
}

/* ===================================
   CARTE D'OPPORTUNITÉ
   =================================== */

.opp-card {
    background: white;
    border-radius: var(--opp-radius);
    overflow: hidden;
    box-shadow: var(--opp-shadow);
    transition: var(--opp-transition);
    display: flex;
    flex-direction: column;
    height: 100%;
}

.opp-card:hover {
    box-shadow: var(--opp-shadow-hover);
    transform: translateY(-4px);
}

.opp-card-image {
    position: relative;
    width: 100%;
    height: 200px;
    overflow: hidden;
    background: var(--opp-light);
}

.opp-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--opp-transition);
}

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

.opp-card-badges {
    position: absolute;
    top: 12px;
    left: 12px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.opp-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    font-size: 12px;
    font-weight: 600;
    border-radius: 6px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    backdrop-filter: blur(10px);
}

.opp-badge-icon {
    font-size: 14px;
    line-height: 1;
}

.opp-badge-formation {
    background: rgba(69, 123, 157, 0.95);
    color: white;
}

.opp-badge-emploi {
    background: rgba(42, 157, 143, 0.95);
    color: white;
}

.opp-badge-benevolat {
    background: rgba(244, 162, 97, 0.95);
    color: white;
}

.opp-badge-subvention {
    background: rgba(38, 70, 83, 0.95);
    color: white;
}

.opp-badge-urgent {
    background: rgba(230, 57, 70, 0.95);
    color: white;
    animation: pulse 2s infinite;
}

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

.opp-card-content {
    padding: 20px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.opp-card-title {
    font-size: 18px;
    font-weight: 700;
    color: var(--opp-dark);
    margin: 0 0 12px 0;
    line-height: 1.4;
}

.opp-card-excerpt {
    font-size: 14px;
    color: #6c757d;
    line-height: 1.6;
    margin: 0 0 16px 0;
    flex-grow: 1;
}

.opp-card-meta {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 16px;
    padding: 12px 0;
    border-top: 1px solid var(--opp-border);
}

.opp-meta-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: #6c757d;
}

.opp-meta-item svg {
    flex-shrink: 0;
    color: var(--opp-primary);
}

.opp-button {
    display: block;
    width: 100%;
    padding: 12px 24px;
    font-size: 14px;
    font-weight: 600;
    text-align: center;
    color: white;
    background: var(--opp-primary);
    border: none;
    border-radius: 8px;
    text-decoration: none;
    cursor: pointer;
    transition: var(--opp-transition);
}

.opp-button:hover {
    background: #d62839;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(230, 57, 70, 0.3);
}

/* ===================================
   PAGINATION
   =================================== */

.opp-pagination-wrapper {
    margin-top: 30px;
}

.opp-pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
}

.opp-page-btn {
    min-width: 40px;
    height: 40px;
    padding: 0 12px;
    font-size: 14px;
    font-weight: 500;
    background: white;
    border: 2px solid var(--opp-border);
    border-radius: 8px;
    cursor: pointer;
    transition: var(--opp-transition);
}

.opp-page-btn:hover {
    border-color: var(--opp-primary);
    color: var(--opp-primary);
}

.opp-page-btn.active {
    background: var(--opp-primary);
    border-color: var(--opp-primary);
    color: white;
}

.opp-page-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* ===================================
   ÉTATS ET FEEDBACK
   =================================== */

.opp-loading {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 9999;
}

.opp-spinner {
    width: 50px;
    height: 50px;
    border: 4px solid var(--opp-light);
    border-top-color: var(--opp-primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

.opp-no-results {
    text-align: center;
    padding: 60px 20px;
    font-size: 16px;
    color: #6c757d;
    grid-column: 1 / -1;
}

/* ===================================
   ANIMATIONS
   =================================== */

.opp-card {
    animation: fadeInUp 0.5s ease;
}

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

/* ===================================
   RESPONSIVE
   =================================== */

@media (max-width: 768px) {
    .opportunites-manager {
        padding: 15px;
    }
    
    .opp-category-filters {
        overflow-x: auto;
        flex-wrap: nowrap;
        padding-bottom: 10px;
        -webkit-overflow-scrolling: touch;
    }
    
    .opp-category-filters::-webkit-scrollbar {
        height: 6px;
    }
    
    .opp-category-filters::-webkit-scrollbar-track {
        background: var(--opp-light);
        border-radius: 3px;
    }
    
    .opp-category-filters::-webkit-scrollbar-thumb {
        background: var(--opp-primary);
        border-radius: 3px;
    }
    
    .opp-card-title {
        font-size: 16px;
    }
}

/* ===================================
   COMPATIBILITÉ ELEMENTOR
   =================================== */

.elementor-widget-shortcode .opportunites-manager {
    max-width: 100%;
}

/* ===================================
   UTILITAIRES
   =================================== */

.opp-hidden {
    display: none !important;
}

.opp-fade-in {
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}
/* ============================================
   STYLES POUR LES BADGES DE CATÉGORIE
   ============================================ */

.opp-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-right: 8px;
    margin-bottom: 8px;
    border: 2px solid transparent;
    transition: all 0.3s ease;
    box-shadow: 0 2px 6px rgba(0,0,0,0.1);
    position: relative;
    overflow: hidden;
}

.opp-badge::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(255,255,255,0.1) 0%, rgba(255,255,255,0) 100%);
    pointer-events: none;
}

.opp-badge:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    border-color: rgba(255,255,255,0.3);
}

.opp-badge-icon {
    font-size: 14px;
    line-height: 1;
    filter: drop-shadow(0 1px 2px rgba(0,0,0,0.2));
}

.opp-badge-urgent {
    background: linear-gradient(135deg, #dc3545 0%, #c82333 100%) !important;
    color: white !important;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(220, 53, 69, 0.4);
    }
    70% {
        box-shadow: 0 0 0 10px rgba(220, 53, 69, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(220, 53, 69, 0);
    }
}

/* Variantes de badges pour différentes couleurs */
.opp-badge-primary {
    background-color: #0073aa !important;
    color: white !important;
}

.opp-badge-success {
    background-color: #28a745 !important;
    color: white !important;
}

.opp-badge-warning {
    background-color: #ffc107 !important;
    color: #212529 !important;
}

.opp-badge-info {
    background-color: #17a2b8 !important;
    color: white !important;
}

.opp-badge-dark {
    background-color: #343a40 !important;
    color: white !important;
}

.opp-badge-light {
    background-color: #f8f9fa !important;
    color: #212529 !important;
    border-color: #dee2e6 !important;
}
/* Indicateur de recherche */
.opp-search-indicator {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 15px;
    background: #e3f2fd;
    border: 1px solid #bbdefb;
    border-radius: 8px;
    margin-top: 10px;
    font-size: 14px;
    color: #1565c0;
    animation: slideDown 0.3s ease;
}

.opp-search-indicator span {
    font-weight: 600;
}

.opp-search-clear-btn {
    background: none;
    border: none;
    color: #1565c0;
    font-size: 18px;
    cursor: pointer;
    padding: 0 5px;
    transition: color 0.3s;
}

.opp-search-clear-btn:hover {
    color: #0d47a1;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Message d'erreur */
.opp-error {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 15px 20px;
    background: #ffebee;
    border: 1px solid #ffcdd2;
    border-radius: 8px;
    margin-bottom: 20px;
    color: #c62828;
    font-weight: 500;
    animation: slideDown 0.3s ease;
}

.opp-error svg {
    flex-shrink: 0;
    color: #c62828;
}