/**
 * Styles principaux du plugin Défi Complet Claude
 *
 * @package Defi_Complet_Claude
 */

/* ==========================================================================
   Variables CSS
   ========================================================================== */

:root {
    --defi-primary: #0073aa;
    --defi-primary-hover: #005a87;
    --defi-success: #46b450;
    --defi-warning: #ffc107;
    --defi-error: #dc3232;
    --defi-info: #00a0d2;

    --defi-text: #333;
    --defi-text-light: #666;
    --defi-border: #ddd;
    --defi-bg: #f9f9f9;

    --defi-border-radius: 8px;
    --defi-shadow: 0 2px 8px rgba(0,0,0,0.1);
    --defi-shadow-hover: 0 4px 16px rgba(0,0,0,0.15);

    --defi-transition: all 0.3s ease;
}

/* ==========================================================================
   Reset et Base
   ========================================================================== */

.defi-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.defi-section {
    margin: 40px 0;
}

.defi-section-title {
    font-size: 2em;
    margin-bottom: 30px;
    color: var(--defi-text);
}

/* ==========================================================================
   Grid de Défis (Archive)
   ========================================================================== */

.defi-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 30px;
    margin: 30px 0;
}

.defi-card {
    background: white;
    border-radius: var(--defi-border-radius);
    overflow: hidden;
    box-shadow: var(--defi-shadow);
    transition: var(--defi-transition);
    cursor: pointer;
}

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

.defi-card-image {
    width: 100%;
    height: 200px;
    object-fit: cover;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.defi-card-content {
    padding: 25px;
}

.defi-card-title {
    font-size: 1.5em;
    margin: 0 0 15px 0;
    color: var(--defi-text);
}

.defi-card-description {
    color: var(--defi-text-light);
    margin-bottom: 20px;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.defi-card-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid var(--defi-border);
}

.defi-meta-item {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 0.9em;
    color: var(--defi-text-light);
}

.defi-card-amount {
    font-size: 1.8em;
    font-weight: bold;
    color: var(--defi-success);
    margin: 15px 0;
}

.defi-card-footer {
    padding: 20px 25px;
    background: var(--defi-bg);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.defi-participants-count {
    color: var(--defi-text-light);
    font-size: 0.9em;
}

.defi-card-btn {
    padding: 10px 20px;
    background: var(--defi-primary);
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: var(--defi-transition);
    font-weight: 600;
}

.defi-card-btn:hover {
    background: var(--defi-primary-hover);
}

/* ==========================================================================
   Badges et Tags
   ========================================================================== */

.defi-badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 0.85em;
    font-weight: 600;
}

.badge-category {
    background: #e3f2fd;
    color: #1976d2;
}

.badge-18plus {
    background: #fce4ec;
    color: #c2185b;
}

.badge-general {
    background: #e8f5e9;
    color: #388e3c;
}

/* ==========================================================================
   Page Single Défi
   ========================================================================== */

.defi-single {
    background: white;
    border-radius: var(--defi-border-radius);
    padding: 40px;
    box-shadow: var(--defi-shadow);
    margin: 30px 0;
}

.defi-single-header {
    margin-bottom: 30px;
    padding-bottom: 30px;
    border-bottom: 2px solid var(--defi-border);
}

.defi-single-title {
    font-size: 2.5em;
    margin: 0 0 20px 0;
    color: var(--defi-text);
}

.defi-single-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    font-size: 1.1em;
}

.defi-single-content {
    line-height: 1.8;
    color: var(--defi-text);
    margin: 30px 0;
}

.defi-requirements {
    background: var(--defi-bg);
    padding: 25px;
    border-radius: var(--defi-border-radius);
    border-left: 4px solid var(--defi-primary);
    margin: 30px 0;
}

.defi-requirements h3 {
    margin-top: 0;
    color: var(--defi-primary);
}

.defi-action-section {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 40px;
    border-radius: var(--defi-border-radius);
    text-align: center;
    margin: 40px 0;
}

.defi-participate-btn {
    padding: 15px 40px;
    background: white;
    color: var(--defi-primary);
    border: none;
    border-radius: 30px;
    font-size: 1.2em;
    font-weight: bold;
    cursor: pointer;
    transition: var(--defi-transition);
    margin-top: 20px;
}

.defi-participate-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 8px 24px rgba(255,255,255,0.3);
}

.defi-participate-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* ==========================================================================
   Filtres
   ========================================================================== */

.defi-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    margin-bottom: 30px;
    padding: 20px;
    background: white;
    border-radius: var(--defi-border-radius);
    box-shadow: var(--defi-shadow);
}

.defi-filter-btn {
    padding: 10px 20px;
    border: 2px solid var(--defi-border);
    background: white;
    border-radius: 20px;
    cursor: pointer;
    transition: var(--defi-transition);
}

.defi-filter-btn:hover,
.defi-filter-btn.active {
    border-color: var(--defi-primary);
    background: var(--defi-primary);
    color: white;
}

/* ==========================================================================
   Layout 2 Colonnes (Général | 18+)
   ========================================================================== */

.defi-two-columns {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 40px;
    margin: 40px 0;
}

.defi-column {
    background: white;
    border-radius: var(--defi-border-radius);
    overflow: hidden;
    box-shadow: var(--defi-shadow);
}

.defi-column-header {
    padding: 25px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    text-align: center;
}

.defi-column-header.header-18plus {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
}

.defi-column-header h2 {
    margin: 0;
    font-size: 2em;
}

.defi-column-content {
    padding: 30px;
}

/* ==========================================================================
   Responsive
   ========================================================================== */

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

    .defi-two-columns {
        grid-template-columns: 1fr;
    }

    .defi-single {
        padding: 20px;
    }

    .defi-single-title {
        font-size: 1.8em;
    }

    .defi-filters {
        flex-direction: column;
    }

    .defi-filter-btn {
        width: 100%;
    }
}

/* ==========================================================================
   Animations
   ========================================================================== */

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

.defi-card {
    animation: fadeIn 0.5s ease;
}

.defi-card:nth-child(1) { animation-delay: 0.1s; }
.defi-card:nth-child(2) { animation-delay: 0.2s; }
.defi-card:nth-child(3) { animation-delay: 0.3s; }
.defi-card:nth-child(4) { animation-delay: 0.4s; }

/* ==========================================================================
   Utilitaires
   ========================================================================== */

.defi-text-center { text-align: center; }
.defi-text-right { text-align: right; }
.defi-mb-20 { margin-bottom: 20px; }
.defi-mt-20 { margin-top: 20px; }
.defi-p-20 { padding: 20px; }

.defi-success-message {
    background: #e8f5e9;
    border-left: 4px solid var(--defi-success);
    padding: 15px 20px;
    border-radius: 4px;
    margin: 20px 0;
}

.defi-error-message {
    background: #ffebee;
    border-left: 4px solid var(--defi-error);
    padding: 15px 20px;
    border-radius: 4px;
    margin: 20px 0;
}

.defi-info-message {
    background: #e3f2fd;
    border-left: 4px solid var(--defi-info);
    padding: 15px 20px;
    border-radius: 4px;
    margin: 20px 0;
}

/* ==========================================================================
   Print
   ========================================================================== */

@media print {
    .defi-card-btn,
    .defi-participate-btn,
    .defi-filters {
        display: none;
    }
}
