/* =========================================
   DEFI LA FAMILLE PARFAITE - FRONTEND CSS
   ========================================= */

/* Variables */
:root {
    --defi-primary: #667eea;
    --defi-secondary: #764ba2;
    --defi-success: #4CAF50;
    --defi-warning: #ff9800;
    --defi-danger: #f44336;
    --defi-dark: #1a1a1a;
    --defi-light: #f5f5f5;
    --defi-gold: #FFD700;
    --defi-gradient: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --defi-gradient-success: linear-gradient(135deg, #11998e 0%, #38ef7d 100%);
    --defi-gradient-danger: linear-gradient(135deg, #f44336 0%, #e91e63 100%);
    --defi-radius: 15px;
    --defi-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
    --defi-transition: all 0.3s ease;
}

/* Cards Container */
.defi-cards-container {
    display: grid;
    gap: 25px;
    padding: 20px 0;
}

.defi-cols-1 { grid-template-columns: 1fr; }
.defi-cols-2 { grid-template-columns: repeat(2, 1fr); }
.defi-cols-3 { grid-template-columns: repeat(3, 1fr); }
.defi-cols-4 { grid-template-columns: repeat(4, 1fr); }
.defi-cols-5 { grid-template-columns: repeat(5, 1fr); }

@media (max-width: 1200px) {
    .defi-cols-5, .defi-cols-4 { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 992px) {
    .defi-cols-5, .defi-cols-4, .defi-cols-3 { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 576px) {
    .defi-cards-container { grid-template-columns: 1fr; }
}

/* Single Card */
.defi-card {
    background: white;
    border-radius: var(--defi-radius);
    overflow: hidden;
    box-shadow: var(--defi-shadow);
    transition: var(--defi-transition);
    position: relative;
}

.defi-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15);
}

.defi-card-18plus {
    border: 3px solid var(--defi-danger);
}

.defi-card-general {
    border: 3px solid var(--defi-success);
}

/* Card Badge */
.defi-card-badge {
    position: absolute;
    top: 15px;
    left: 15px;
    padding: 8px 15px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: bold;
    text-transform: uppercase;
    z-index: 10;
}

.defi-badge-18plus {
    background: var(--defi-gradient-danger);
    color: white;
}

.defi-badge-general {
    background: var(--defi-gradient-success);
    color: white;
}

/* Card Image */
.defi-card-image {
    position: relative;
    height: 200px;
    overflow: hidden;
}

.defi-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--defi-transition);
}

.defi-card:hover .defi-card-image img {
    transform: scale(1.1);
}

.defi-card-no-image {
    width: 100%;
    height: 100%;
    background: var(--defi-gradient);
    display: flex;
    align-items: center;
    justify-content: center;
}

.defi-card-no-image .dashicons {
    font-size: 60px;
    width: 60px;
    height: 60px;
    color: rgba(255,255,255,0.5);
}

/* Blurred Card */
.defi-card-blurred .defi-card-image.blurred img {
    filter: blur(20px);
}

.defi-blur-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
}

.defi-blur-message {
    color: white;
    padding: 20px;
}

.defi-blur-message .dashicons {
    font-size: 40px;
    width: 40px;
    height: 40px;
    margin-bottom: 10px;
}

/* Card Content */
.defi-card-content {
    padding: 20px;
}

.defi-card-title {
    margin: 0 0 10px 0;
    font-size: 18px;
}

.defi-card-title a {
    color: var(--defi-dark);
    text-decoration: none;
}

.defi-card-title a:hover {
    color: var(--defi-primary);
}

.defi-card-host {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 14px;
    color: #666;
    margin-bottom: 15px;
}

/* Card Meta */
.defi-card-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    margin-bottom: 15px;
}

.defi-card-montant {
    display: flex;
    align-items: center;
    gap: 5px;
}

.defi-montant-value {
    font-size: 24px;
    font-weight: bold;
    color: var(--defi-success);
}

.defi-card-participants {
    display: flex;
    align-items: center;
    gap: 5px;
    color: #666;
}

/* Countdown */
.defi-card-countdown {
    width: 100%;
}

.countdown-timer {
    display: flex;
    gap: 10px;
    justify-content: center;
    background: var(--defi-light);
    padding: 10px;
    border-radius: 10px;
}

.countdown-item {
    text-align: center;
}

.countdown-item span:first-child {
    display: block;
    font-size: 20px;
    font-weight: bold;
    color: var(--defi-primary);
}

.countdown-item small {
    font-size: 10px;
    color: #666;
    text-transform: uppercase;
}

/* Card Status */
.defi-card-status {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 15px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 500;
    margin-bottom: 15px;
}

.defi-status-open {
    background: #e8f5e9;
    color: #2e7d32;
}

.defi-status-closed {
    background: #fff3e0;
    color: #e65100;
}

.defi-status-streaming {
    background: #ffebee;
    color: #c62828;
    animation: pulse 1s infinite;
}

.status-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: currentColor;
}

.status-dot.pulse {
    animation: pulse 1s infinite;
}

.status-dot.live {
    background: #f44336;
    animation: pulse 0.5s infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.5; transform: scale(1.2); }
}

/* Buttons */
.defi-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 25px;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: var(--defi-transition);
}

.defi-btn-primary {
    background: var(--defi-gradient);
    color: white;
}

.defi-btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(102, 126, 234, 0.4);
    color: white;
}

.defi-btn-secondary {
    background: var(--defi-light);
    color: var(--defi-dark);
}

.defi-btn-secondary:hover {
    background: #e0e0e0;
}

.defi-btn-discord {
    background: #5865F2;
    color: white;
}

.defi-btn-discord:hover {
    background: #4752c4;
    color: white;
}

.defi-btn-block {
    width: 100%;
}

.defi-btn-large {
    padding: 18px 35px;
    font-size: 16px;
}

.defi-btn-small {
    padding: 8px 15px;
    font-size: 12px;
}

/* =========================================
   SINGLE DEFI PAGE
   ========================================= */

.defi-single {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

.defi-single-header {
    text-align: center;
    margin-bottom: 40px;
}

.defi-single-badge {
    display: inline-block;
    padding: 10px 25px;
    border-radius: 25px;
    font-weight: bold;
    margin-bottom: 15px;
}

.defi-single-badge.badge-18plus {
    background: var(--defi-gradient-danger);
    color: white;
}

.defi-single-badge.badge-general {
    background: var(--defi-gradient-success);
    color: white;
}

.defi-single-title {
    font-size: 36px;
    margin: 0 0 20px 0;
}

.defi-single-host {
    display: inline-flex;
    align-items: center;
    gap: 15px;
    background: white;
    padding: 15px 25px;
    border-radius: 50px;
    box-shadow: var(--defi-shadow);
}

.defi-single-host img {
    border-radius: 50%;
}

.host-info {
    text-align: left;
}

.host-label {
    display: block;
    font-size: 12px;
    color: #666;
    text-transform: uppercase;
}

.host-name {
    font-weight: bold;
    color: var(--defi-gold);
}

/* Single Main Layout */
.defi-single-main {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 30px;
}

@media (max-width: 992px) {
    .defi-single-main {
        grid-template-columns: 1fr;
    }
}

.defi-single-left {
    display: flex;
    flex-direction: column;
    gap: 25px;
}

.defi-single-media {
    border-radius: var(--defi-radius);
    overflow: hidden;
    box-shadow: var(--defi-shadow);
}

.defi-single-media img {
    width: 100%;
    height: auto;
}

.defi-video-embed iframe {
    width: 100%;
    border: none;
}

.defi-single-description,
.defi-single-equipement {
    background: white;
    padding: 25px;
    border-radius: var(--defi-radius);
    box-shadow: var(--defi-shadow);
}

.defi-single-description h3,
.defi-single-equipement h3 {
    margin-top: 0;
}

/* Right Sidebar */
.defi-single-right {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.defi-prize-box {
    background: var(--defi-gradient);
    color: white;
    padding: 30px;
    border-radius: var(--defi-radius);
    text-align: center;
}

.prize-label {
    font-size: 14px;
    opacity: 0.8;
}

.prize-amount {
    font-size: 48px;
    font-weight: bold;
}

.prize-bonus {
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px solid rgba(255,255,255,0.3);
    font-size: 14px;
}

.defi-countdown-box {
    background: white;
    padding: 25px;
    border-radius: var(--defi-radius);
    box-shadow: var(--defi-shadow);
    text-align: center;
}

.defi-countdown-large {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-top: 15px;
}

.countdown-unit {
    background: var(--defi-light);
    padding: 15px;
    border-radius: 10px;
    min-width: 70px;
}

.countdown-number {
    display: block;
    font-size: 28px;
    font-weight: bold;
    color: var(--defi-primary);
}

.countdown-label {
    font-size: 11px;
    color: #666;
    text-transform: uppercase;
}

.defi-stream-date {
    background: #ffebee;
    padding: 15px 20px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.stream-icon {
    animation: pulse 1s infinite;
}

.defi-action-box {
    background: white;
    padding: 25px;
    border-radius: var(--defi-radius);
    box-shadow: var(--defi-shadow);
}

.defi-participate-warning {
    font-size: 12px;
    color: var(--defi-warning);
    margin-top: 10px;
    text-align: center;
}

.defi-host-notice,
.defi-participant-notice,
.defi-blocked-notice,
.defi-closed-notice {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    padding: 20px;
    border-radius: 10px;
    text-align: center;
}

.defi-host-notice {
    background: linear-gradient(135deg, #FFD700 0%, #FFA500 100%);
}

.defi-participant-notice {
    background: #e8f5e9;
}

.defi-blocked-notice {
    background: #ffebee;
    color: var(--defi-danger);
}

.defi-discord-box {
    margin-top: 10px;
}

/* =========================================
   PARTICIPANTS LIST
   ========================================= */

.defi-participants-section {
    background: white;
    padding: 30px;
    border-radius: var(--defi-radius);
    box-shadow: var(--defi-shadow);
    margin-top: 30px;
}

.defi-participants-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.participant-item {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 15px 20px;
    background: var(--defi-light);
    border-radius: 10px;
    transition: var(--defi-transition);
}

.participant-item:hover {
    background: #e0e0e0;
}

.participant-item.participant-winner {
    background: linear-gradient(135deg, #FFD700 0%, #FFA500 100%);
}

.participant-item.participant-last {
    background: #ffebee;
}

.participant-number {
    font-weight: bold;
    color: var(--defi-primary);
    min-width: 40px;
}

.participant-name {
    flex: 1;
    font-weight: 500;
}

.participant-name.blurred {
    filter: blur(5px);
    user-select: none;
}

.participant-date {
    font-size: 12px;
    color: #666;
}

.participant-proof-btn {
    background: var(--defi-primary);
    color: white;
    padding: 5px 12px;
    border-radius: 5px;
    text-decoration: none;
    font-size: 12px;
}

.participant-no-proof {
    font-size: 12px;
    color: #999;
    font-style: italic;
}

.participant-badge {
    padding: 5px 10px;
    border-radius: 5px;
    font-size: 11px;
    font-weight: bold;
}

.winner-badge {
    background: var(--defi-gold);
    color: #333;
}

.last-badge {
    background: #ffebee;
    color: var(--defi-danger);
}

.participants-blur-notice {
    text-align: center;
    color: #666;
    margin-top: 15px;
    font-size: 14px;
}

/* =========================================
   UPLOAD FORM
   ========================================= */

.defi-upload-section {
    background: white;
    padding: 30px;
    border-radius: var(--defi-radius);
    box-shadow: var(--defi-shadow);
    margin-top: 30px;
}

.defi-upload-form {
    max-width: 500px;
    margin: 0 auto;
}

.upload-option {
    margin-bottom: 20px;
}

.upload-option label {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
    font-weight: 500;
}

.upload-divider {
    text-align: center;
    margin: 20px 0;
    color: #999;
    font-size: 14px;
}

.defi-input {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 14px;
    transition: var(--defi-transition);
}

.defi-input:focus {
    border-color: var(--defi-primary);
    outline: none;
}

.defi-input-file {
    width: 100%;
    padding: 20px;
    border: 2px dashed #e0e0e0;
    border-radius: 8px;
    text-align: center;
    cursor: pointer;
}

.upload-hint {
    font-size: 12px;
    color: #999;
    margin-top: 5px;
}

.upload-agreement {
    margin: 20px 0;
    padding: 15px;
    background: var(--defi-light);
    border-radius: 8px;
}

.upload-agreement label {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    font-size: 14px;
}

.defi-already-uploaded {
    text-align: center;
    padding: 30px;
}

.defi-already-uploaded .dashicons {
    font-size: 50px;
    width: 50px;
    height: 50px;
    color: var(--defi-success);
}

/* =========================================
   LEADERBOARD
   ========================================= */

.defi-leaderboard {
    background: var(--defi-dark);
    color: white;
    padding: 40px;
    border-radius: var(--defi-radius);
    margin-top: 30px;
}

.leaderboard-title {
    text-align: center;
    font-size: 28px;
    margin-bottom: 30px;
}

.leaderboard-item {
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 20px;
    border-radius: 10px;
    margin-bottom: 15px;
}

.leaderboard-item img {
    border-radius: 50%;
    border: 3px solid white;
}

.leaderboard-info {
    flex: 1;
}

.leaderboard-role {
    display: block;
    font-size: 12px;
    opacity: 0.8;
    text-transform: uppercase;
}

.leaderboard-name {
    font-size: 20px;
    font-weight: bold;
}

.leaderboard-prize {
    font-size: 14px;
    color: var(--defi-success);
}

.leaderboard-proof-btn {
    background: white;
    color: var(--defi-dark);
    padding: 10px 20px;
    border-radius: 5px;
    text-decoration: none;
    font-size: 14px;
}

.leaderboard-host .leaderboard-item {
    background: linear-gradient(135deg, #FFD700 0%, #FFA500 100%);
    color: #333;
}

.leaderboard-winner .leaderboard-item {
    background: var(--defi-gradient-success);
}

.leaderboard-last .leaderboard-item {
    background: var(--defi-gradient-danger);
}

.leaderboard-others {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid rgba(255,255,255,0.2);
}

.leaderboard-others h4 {
    text-align: center;
    opacity: 0.7;
    margin-bottom: 15px;
}

.leaderboard-others .leaderboard-item {
    background: rgba(255,255,255,0.1);
    padding: 10px 15px;
}

.leaderboard-position {
    font-weight: bold;
    min-width: 40px;
}

.last-badge-claim {
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px solid rgba(255,255,255,0.3);
}

.badge-countdown {
    font-size: 14px;
    margin-bottom: 10px;
}

/* =========================================
   PROFIL & BADGES
   ========================================= */

.defi-profil-badges {
    background: white;
    padding: 30px;
    border-radius: var(--defi-radius);
    box-shadow: var(--defi-shadow);
}

.badges-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 20px;
}

.badge-item {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 15px;
    background: var(--defi-light);
    border-radius: 10px;
}

.badge-icon {
    font-size: 30px;
}

.badge-name {
    display: block;
    font-weight: 500;
}

.badge-date {
    font-size: 12px;
    color: #666;
}

.badge-winner {
    background: linear-gradient(135deg, #FFD700 0%, #FFA500 100%);
}

.badge-loser_special {
    background: #ffebee;
}

/* =========================================
   NOTICES & MESSAGES
   ========================================= */

.defi-login-required,
.defi-unlock-required {
    text-align: center;
    padding: 50px 30px;
    background: white;
    border-radius: var(--defi-radius);
    box-shadow: var(--defi-shadow);
}

.defi-login-required .dashicons,
.defi-unlock-required .dashicons {
    font-size: 60px;
    width: 60px;
    height: 60px;
    color: var(--defi-primary);
}

.defi-unlock-required .unlock-price {
    font-size: 24px;
    font-weight: bold;
    color: var(--defi-success);
}

.defi-no-results {
    grid-column: 1 / -1;
    text-align: center;
    padding: 60px 30px;
    background: white;
    border-radius: var(--defi-radius);
}

.defi-no-results .dashicons {
    font-size: 60px;
    width: 60px;
    height: 60px;
    color: #ccc;
}

.defi-error {
    background: #ffebee;
    color: var(--defi-danger);
    padding: 15px 20px;
    border-radius: 8px;
    border-left: 4px solid var(--defi-danger);
}

/* =========================================
   UNLOCK 18+ BOX
   ========================================= */

.defi-unlock-18plus-box {
    background: var(--defi-gradient-danger);
    color: white;
    padding: 40px;
    border-radius: var(--defi-radius);
    text-align: center;
}

.unlock-benefits {
    list-style: none;
    padding: 0;
    margin: 20px 0;
}

.unlock-benefits li {
    padding: 8px 0;
    font-size: 16px;
}

.defi-already-unlocked {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    background: #e8f5e9;
    color: var(--defi-success);
    padding: 20px;
    border-radius: 10px;
}

/* =========================================
   ARCHIVES
   ========================================= */

.defi-archives {
    background: white;
    padding: 30px;
    border-radius: var(--defi-radius);
    box-shadow: var(--defi-shadow);
}

.archives-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.archive-item {
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 15px;
    background: var(--defi-light);
    border-radius: 10px;
}

.archive-thumb {
    width: 80px;
    height: 60px;
    overflow: hidden;
    border-radius: 8px;
}

.archive-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.archive-info {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 15px;
}

.archive-title {
    font-weight: 500;
    color: var(--defi-dark);
    text-decoration: none;
}

.archive-title:hover {
    color: var(--defi-primary);
}

.archive-winner {
    color: var(--defi-gold);
    font-weight: bold;
}

.archive-montant {
    font-weight: bold;
    color: var(--defi-success);
}

/* =========================================
   MES PARTICIPATIONS / MES DEFIS
   ========================================= */

.defi-mes-participations,
.defi-mes-defis {
    background: white;
    padding: 30px;
    border-radius: var(--defi-radius);
    box-shadow: var(--defi-shadow);
}

.participations-list,
.mes-defis-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.participation-item,
.mon-defi-item {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 15px 20px;
    background: var(--defi-light);
    border-radius: 10px;
}

.participation-item.winner {
    background: linear-gradient(135deg, #FFD700 0%, #FFA500 100%);
}

.participation-title,
.mon-defi-title {
    flex: 1;
    color: var(--defi-dark);
    text-decoration: none;
    font-weight: 500;
}

.participation-date,
.mon-defi-status {
    font-size: 12px;
    color: #666;
}

.mon-defi-status.status-publish {
    color: var(--defi-success);
}

.mon-defi-status.status-pending {
    color: var(--defi-warning);
}

/* =========================================
   ANIMATIONS
   ========================================= */

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.defi-card {
    animation: fadeIn 0.5s ease forwards;
}

.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; }
.defi-card:nth-child(5) { animation-delay: 0.5s; }
.defi-card:nth-child(6) { animation-delay: 0.6s; }

/* =========================================
   RESPONSIVE TWEAKS
   ========================================= */

@media (max-width: 768px) {
    .defi-single-title {
        font-size: 24px;
    }
    
    .prize-amount {
        font-size: 36px;
    }
    
    .defi-countdown-large {
        gap: 8px;
    }
    
    .countdown-unit {
        padding: 10px;
        min-width: 55px;
    }
    
    .countdown-number {
        font-size: 20px;
    }
    
    .participant-item {
        flex-wrap: wrap;
    }
}
