/**
 * CHEVAL DASHBOARD - STYLES
 * Page de gestion des matchs sauvegardés
 */

/* ========================================
   VARIABLES (héritées)
======================================== */
:root {
    --cheval-green: #2c5f2d;
    --cheval-green-light: #3d7a3f;
    --cheval-green-dark: #1e4020;
    --cheval-beige: #f5f1e8;
    --cheval-beige-dark: #e8e0d0;
    --cheval-gold: #d4af37;
    --cheval-gold-light: #e6c963;
    --cheval-white: #ffffff;
    --cheval-black: #1a1a1a;
    --cheval-gray: #666666;
    --cheval-gray-light: #e0e0e0;
    --cheval-red: #dc3545;
    --cheval-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
    --cheval-shadow-light: 0 4px 12px rgba(0, 0, 0, 0.08);
}

/* ========================================
   CONTAINER PRINCIPAL
======================================== */
#cheval-dashboard-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 40px 20px;
    background: var(--cheval-beige);
    min-height: 100vh;
}

/* ========================================
   HEADER DASHBOARD
======================================== */
.dashboard-header {
    margin-bottom: 40px;
    text-align: center;
}

.dashboard-header h1 {
    color: var(--cheval-green);
    font-size: 36px;
    font-weight: 700;
    margin: 0 0 10px 0;
}

.dashboard-header .subtitle {
    color: var(--cheval-gray);
    font-size: 16px;
    margin: 0 0 15px 0;
}

/* Badge Statut Utilisateur */
.user-status-badge {
    display: inline-block;
    padding: 10px 20px;
    border-radius: 25px;
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 20px;
}

.user-status-badge.premium {
    background: linear-gradient(135deg, var(--cheval-gold), var(--cheval-gold-light));
    color: var(--cheval-white);
}

.user-status-badge.free {
    background: var(--cheval-beige-dark);
    color: var(--cheval-gray);
}

.dashboard-stats {
    display: flex;
    justify-content: center;
    gap: 30px;
    margin-top: 25px;
    flex-wrap: wrap;
}

.stat-card {
    background: var(--cheval-white);
    padding: 20px 30px;
    border-radius: 16px;
    box-shadow: var(--cheval-shadow-light);
    min-width: 150px;
}

.stat-number {
    display: block;
    font-size: 36px;
    font-weight: 700;
    color: var(--cheval-green);
    line-height: 1;
}

.stat-label {
    display: block;
    font-size: 14px;
    color: var(--cheval-gray);
    margin-top: 5px;
}

/* ========================================
   FILTRES ET TRI
======================================== */
.dashboard-controls {
    background: var(--cheval-white);
    padding: 20px;
    border-radius: 16px;
    box-shadow: var(--cheval-shadow-light);
    margin-bottom: 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
    flex-wrap: wrap;
}

.control-group {
    display: flex;
    align-items: center;
    gap: 10px;
}

.control-group label {
    font-size: 14px;
    color: var(--cheval-gray);
    font-weight: 600;
}

.control-group select {
    padding: 8px 15px;
    border: 2px solid var(--cheval-beige);
    border-radius: 8px;
    font-size: 14px;
    color: var(--cheval-black);
    background: var(--cheval-white);
    cursor: pointer;
    transition: border-color 0.3s ease;
}

.control-group select:hover,
.control-group select:focus {
    border-color: var(--cheval-green);
    outline: none;
}

/* Lien retour */
.back-to-matching {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    background: var(--cheval-green);
    color: var(--cheval-white);
    text-decoration: none;
    border-radius: 25px;
    font-weight: 600;
    font-size: 14px;
    transition: background 0.3s ease;
}

.back-to-matching:hover {
    background: var(--cheval-green-dark);
}

/* ========================================
   GRILLE DE MATCHS
======================================== */
.matches-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 25px;
}

.match-card {
    background: var(--cheval-white);
    border-radius: 16px;
    overflow: hidden;
    box-shadow: var(--cheval-shadow-light);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    position: relative;
}

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

/* Image du match */
.match-image {
    width: 100%;
    height: 200px;
    background-size: cover;
    background-position: center;
    position: relative;
}

.compatibility-badge {
    position: absolute;
    top: 15px;
    right: 15px;
    padding: 8px 12px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 700;
    color: var(--cheval-white);
    box-shadow: var(--cheval-shadow-light);
}

.compatibility-badge.high {
    background: var(--cheval-green);
}

.compatibility-badge.medium {
    background: var(--cheval-gold);
}

.compatibility-badge.low {
    background: #f39c12;
}

/* Contenu du match */
.match-content {
    padding: 20px;
}

.match-name {
    font-size: 20px;
    font-weight: 700;
    color: var(--cheval-black);
    margin: 0 0 10px 0;
}

.match-details {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 15px;
}

.match-detail {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    color: var(--cheval-gray);
}

.match-detail-icon {
    font-size: 16px;
    color: var(--cheval-green);
}

/* Actions du match */
.match-actions {
    display: flex;
    gap: 10px;
}

.btn-view {
    flex: 1;
    padding: 10px 20px;
    background: var(--cheval-green);
    color: var(--cheval-white);
    text-decoration: none;
    text-align: center;
    border-radius: 8px;
    font-weight: 600;
    font-size: 14px;
    transition: background 0.3s ease;
    border: none;
    cursor: pointer;
}

.btn-view:hover {
    background: var(--cheval-green-dark);
}

.btn-remove-match {
    padding: 10px 15px;
    background: var(--cheval-beige);
    color: var(--cheval-red);
    border: none;
    border-radius: 8px;
    font-size: 18px;
    cursor: pointer;
    transition: background 0.3s ease;
}

.btn-remove-match:hover {
    background: var(--cheval-red);
    color: var(--cheval-white);
}

/* ========================================
   ÉTAT VIDE
======================================== */
.empty-state {
    grid-column: 1 / -1;
    text-align: center;
    padding: 80px 20px;
    background: var(--cheval-white);
    border-radius: 24px;
    box-shadow: var(--cheval-shadow-light);
}

.empty-icon {
    font-size: 100px;
    margin-bottom: 20px;
}

.empty-state h3 {
    color: var(--cheval-green);
    font-size: 28px;
    margin: 0 0 15px 0;
}

.empty-state p {
    color: var(--cheval-gray);
    font-size: 16px;
    line-height: 1.6;
    margin: 0 0 25px 0;
}

.btn-primary {
    display: inline-block;
    padding: 14px 32px;
    background: var(--cheval-green);
    color: var(--cheval-white);
    text-decoration: none;
    border-radius: 25px;
    font-weight: 600;
    font-size: 16px;
    transition: background 0.3s ease;
}

.btn-primary:hover {
    background: var(--cheval-green-dark);
}

/* ========================================
   NOTIFICATIONS
======================================== */
.cheval-notification {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 15px 25px;
    border-radius: 12px;
    font-size: 14px;
    font-weight: 600;
    box-shadow: var(--cheval-shadow);
    z-index: 3000;
    transform: translateX(400px);
    transition: transform 0.3s ease;
}

.cheval-notification.show {
    transform: translateX(0);
}

.cheval-notification.success {
    background: var(--cheval-green);
    color: var(--cheval-white);
}

.cheval-notification.error {
    background: var(--cheval-red);
    color: var(--cheval-white);
}

/* ========================================
   RESPONSIVE
======================================== */
@media (max-width: 768px) {
    #cheval-dashboard-container {
        padding: 20px 15px;
    }

    .dashboard-header h1 {
        font-size: 28px;
    }

    .dashboard-stats {
        gap: 15px;
    }

    .stat-card {
        padding: 15px 20px;
        min-width: 120px;
    }

    .stat-number {
        font-size: 28px;
    }

    .dashboard-controls {
        flex-direction: column;
        align-items: stretch;
    }

    .control-group {
        flex-direction: column;
        align-items: stretch;
    }

    .control-group select {
        width: 100%;
    }

    .matches-grid {
        grid-template-columns: 1fr;
    }

    .cheval-notification {
        left: 20px;
        right: 20px;
        transform: translateY(-100px);
    }

    .cheval-notification.show {
        transform: translateY(0);
    }
}

@media (max-width: 480px) {
    .match-actions {
        flex-direction: column;
    }

    .btn-remove-match {
        width: 100%;
    }
}