/**
 * CHEVAL MATCHING - STYLES
 * Design moderne avec couleurs : Vert forêt #2c5f2d, Beige #f5f1e8, Doré #d4af37
 */

/* ========================================
   VARIABLES
======================================== */
: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-gold-dark: #b8942f;
    --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-matching-container {
    max-width: 500px;
    margin: 0 auto;
    padding: 20px;
    background: var(--cheval-beige);
    min-height: 100vh;
    position: relative;
}

/* ========================================
   HEADER
======================================== */
.cheval-header {
    text-align: center;
    margin-bottom: 30px;
    padding: 20px;
    background: var(--cheval-white);
    border-radius: 16px;
    box-shadow: var(--cheval-shadow-light);
}

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

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

/* Compteur de matchs */
.match-counter {
    display: inline-block;
    padding: 12px 24px;
    background: var(--cheval-white);
    border-radius: 25px;
    margin-top: 15px;
    font-size: 15px;
    font-weight: 600;
    color: var(--cheval-black);
    box-shadow: var(--cheval-shadow-light);
}

.match-counter.limited strong {
    color: var(--cheval-green);
    font-weight: 700;
}

.match-counter.unlimited {
    background: linear-gradient(135deg, var(--cheval-gold), var(--cheval-gold-light));
    color: var(--cheval-white);
    font-weight: 600;
}

.match-counter.depleted {
    background: var(--cheval-red);
    color: var(--cheval-white);
}

.premium-badge {
    display: inline-block;
    margin-right: 5px;
}

/* Compteur de cartes - SUPPRIMÉ (pas UX) */
// .card-counter {
//     display: block;
//     text-align: center;
//     font-size: 14px;
//     color: var(--cheval-gray);
//     margin-top: 10px;
// }

/* ========================================
   CARTE CHEVAL
======================================== */
.cheval-card-wrapper {
    position: relative;
    height: 600px;
    margin-bottom: 30px;
}

.cheval-card {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    width: 100%;
    height: 100%;
    background: var(--cheval-white);
    border-radius: 24px;
    box-shadow: var(--cheval-shadow);
    overflow: hidden;
    cursor: grab;
    transition: transform 0.3s ease;
}

.cheval-card:active {
    cursor: grabbing;
}

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

/* Badge */
.cheval-badge {
    position: absolute;
    top: 20px;
    right: 20px;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 5px;
    box-shadow: var(--cheval-shadow-light);
}

.cheval-badge.hidden {
    display: none;
}

.cheval-badge.favorite {
    background: var(--cheval-gold);
    color: var(--cheval-white);
}

.cheval-badge.urgent {
    background: var(--cheval-green);
    color: var(--cheval-white);
}

.cheval-badge.rescue {
    background: var(--cheval-red);
    color: var(--cheval-white);
}

.badge-icon {
    font-size: 16px;
}

/* Indicateurs de swipe */
.swipe-indicator {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    padding: 20px 30px;
    border-radius: 12px;
    font-size: 24px;
    font-weight: 700;
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
    z-index: 10;
}

.swipe-indicator.like {
    left: 30px;
    background: var(--cheval-green);
    color: var(--cheval-white);
    border: 3px solid var(--cheval-white);
}

.swipe-indicator.pass {
    right: 30px;
    background: var(--cheval-red);
    color: var(--cheval-white);
    border: 3px solid var(--cheval-white);
}

.swipe-indicator.active {
    opacity: 1;
}

/* Informations du cheval */
.cheval-info {
    padding: 25px;
}

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

.cheval-details {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
    margin-bottom: 15px;
}

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

.detail-icon {
    font-size: 16px;
}

/* Compteur de compatibilité */
.compatibility-meter {
    margin-top: 15px;
}

.compatibility-label {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.compatibility-label span {
    font-size: 14px;
    color: var(--cheval-gray);
}

.compatibility-score {
    font-size: 20px;
    font-weight: 700;
    color: var(--cheval-green);
}

.compatibility-bar {
    width: 100%;
    height: 12px;
    background: var(--cheval-beige);
    border-radius: 10px;
    overflow: hidden;
}

.compatibility-fill {
    height: 100%;
    border-radius: 10px;
    transition: width 0.5s ease, background 0.3s ease;
}

.compatibility-fill.high {
    background: linear-gradient(90deg, var(--cheval-green), var(--cheval-green-light));
}

.compatibility-fill.medium {
    background: linear-gradient(90deg, var(--cheval-gold), var(--cheval-gold-light));
}

.compatibility-fill.low {
    background: linear-gradient(90deg, #f39c12, #e67e22);
}

/* ========================================
   BOUTONS D'ACTION
======================================== */
.cheval-actions {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 20px;
    padding: 0 20px;
}

.action-btn {
    width: 70px;
    height: 70px;
    border-radius: 50%;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 30px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: var(--cheval-shadow-light);
}

.action-btn:hover {
    transform: scale(1.1);
    box-shadow: var(--cheval-shadow);
}

.action-btn:active {
    transform: scale(0.95);
}

.btn-pass {
    background: var(--cheval-white);
    color: var(--cheval-red);
    border: 3px solid var(--cheval-red);
}

.btn-like {
    background: var(--cheval-green);
    color: var(--cheval-white);
    width: 80px;
    height: 80px;
    font-size: 36px;
}

.btn-info {
    background: var(--cheval-white);
    color: var(--cheval-gold);
    border: 3px solid var(--cheval-gold);
}

/* ========================================
   PANNEAU INFO (VRAI POPUP MODAL)
======================================== */
.info-panel-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(8px);
    z-index: 999999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s;
}

.info-panel-overlay.active {
    opacity: 1;
    visibility: visible;
}

.info-panel {
    background: var(--cheval-white);
    border-radius: 20px;
    padding: 30px;
    max-width: 500px;
    width: 90%;
    max-height: 85vh;
    overflow-y: auto;
    position: relative;
    transform: translateY(30px);
    transition: transform 0.3s ease;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.5);
}

.info-panel-overlay.active .info-panel {
    transform: translateY(0);
}

.close-info {
    position: absolute;
    top: 15px;
    right: 15px;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: none;
    background: var(--cheval-beige);
    color: var(--cheval-black);
    font-size: 22px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    z-index: 10;
    line-height: 1;
}

.close-info:hover {
    background: var(--cheval-beige-dark);
    transform: scale(1.1);
}

.close-info:active {
    transform: scale(0.95);
}

.info-panel h3 {
    color: var(--cheval-green);
    font-size: 24px;
    margin: 0 0 20px 0;
}

.info-section {
    margin-bottom: 20px;
}

.info-section h4 {
    color: var(--cheval-black);
    font-size: 16px;
    font-weight: 600;
    margin: 0 0 8px 0;
}

.info-section p {
    color: var(--cheval-gray);
    font-size: 14px;
    line-height: 1.6;
    margin: 0;
}

.info-link {
    display: inline-block;
    margin-top: 20px;
    padding: 12px 24px;
    background: var(--cheval-green);
    color: var(--cheval-white);
    text-decoration: none;
    border-radius: 25px;
    font-weight: 600;
    transition: background 0.3s ease;
}

.info-link:hover {
    background: var(--cheval-green-dark);
}

/* ========================================
   ÉTAT VIDE
======================================== */
.no-more-horses {
    text-align: center;
    padding: 60px 20px;
    background: var(--cheval-white);
    border-radius: 24px;
    box-shadow: var(--cheval-shadow-light);
}

.no-more-horses .icon {
    font-size: 80px;
    margin-bottom: 20px;
}

.no-more-horses h2 {
    color: var(--cheval-green);
    font-size: 28px;
    margin: 0 0 15px 0;
}

.no-more-horses p {
    color: var(--cheval-gray);
    font-size: 16px;
    line-height: 1.6;
    margin: 0 0 10px 0;
}

.btn-primary {
    display: inline-block;
    margin-top: 20px;
    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);
}

/* ========================================
   MODAL PREMIUM
======================================== */
.cheval-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.8);
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.cheval-modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.cheval-modal {
    background: var(--cheval-white);
    border-radius: 24px;
    padding: 40px 30px;
    max-width: 400px;
    width: 100%;
    text-align: center;
    position: relative;
    transform: scale(0.8);
    transition: transform 0.3s ease;
}

.cheval-modal-overlay.active .cheval-modal {
    transform: scale(1);
}

.close-modal {
    position: absolute;
    top: 15px;
    right: 15px;
    width: 35px;
    height: 35px;
    border-radius: 50%;
    border: none;
    background: var(--cheval-beige);
    color: var(--cheval-black);
    font-size: 20px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.premium-icon {
    font-size: 60px;
    margin-bottom: 20px;
}

.cheval-modal h2 {
    color: var(--cheval-green);
    font-size: 28px;
    margin: 0 0 15px 0;
}

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

.premium-price {
    margin: 25px 0;
    padding: 20px;
    background: var(--cheval-beige);
    border-radius: 16px;
}

.premium-price .price {
    display: inline-flex;
    align-items: baseline;
    font-size: 56px;
    font-weight: 700;
    color: var(--cheval-green);
    line-height: 1;
}

.premium-price .price .cents {
    font-size: 28px;
    margin-left: 2px;
}

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

.btn-premium {
    display: inline-block;
    padding: 14px 40px;
    background: linear-gradient(135deg, var(--cheval-gold), var(--cheval-gold-light));
    color: var(--cheval-white);
    text-decoration: none;
    border-radius: 25px;
    font-weight: 700;
    font-size: 18px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    box-shadow: var(--cheval-shadow-light);
}

.btn-premium:hover {
    transform: translateY(-2px);
    box-shadow: var(--cheval-shadow);
}

/* ========================================
   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);
}

/* ========================================
   LOADER
======================================== */
.cheval-loader {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(245, 241, 232, 0.9);
    z-index: 4000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.cheval-loader.active {
    opacity: 1;
    visibility: visible;
}

.spinner {
    width: 50px;
    height: 50px;
    border: 5px solid var(--cheval-beige-dark);
    border-top-color: var(--cheval-green);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

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

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

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

    .cheval-card-wrapper {
        height: 550px;
    }

    .cheval-name {
        font-size: 24px;
    }

    .action-btn {
        width: 60px;
        height: 60px;
        font-size: 24px;
    }

    .btn-like {
        width: 70px;
        height: 70px;
        font-size: 30px;
    }

    .swipe-indicator {
        padding: 15px 20px;
        font-size: 18px;
    }

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

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