/**
 * DarMatch Matching Page Styles
 * Styles pour la page de matching voyageur/hote
 */

/* Menu Item Matching */
.darmatch-matching-menu a {
    color: #F5A623 !important;
    font-weight: 600 !important;
    transition: all 0.3s !important;
}

.darmatch-matching-menu a:hover {
    color: #E8940C !important;
    transform: scale(1.05);
}

/* Variables */
:root {
    --dm-orange: #F5A623;
    --dm-orange-dark: #E8940C;
    --dm-gradient: linear-gradient(135deg, #F5A623, #E8940C);
    --dm-success: #27AE60;
    --dm-warning: #F39C12;
    --dm-danger: #E74C3C;
    --dm-info: #3498DB;
    --dm-gray-100: #F8F9FA;
    --dm-gray-200: #E9ECEF;
    --dm-gray-300: #DEE2E6;
    --dm-gray-400: #CED4DA;
    --dm-gray-500: #ADB5BD;
    --dm-gray-600: #6C757D;
    --dm-gray-700: #495057;
    --dm-gray-800: #343A40;
    --dm-gray-900: #212529;
    --dm-white: #FFFFFF;
    --dm-radius: 16px;
    --dm-radius-sm: 8px;
    --dm-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    --dm-shadow-lg: 0 8px 40px rgba(0, 0, 0, 0.12);
}

/* Page Container */
.dm-matching-page {
    max-width: 1300px;
    margin: 0 auto;
    padding: 50px 30px;
    min-height: 60vh;
}

/* Page Header */
.dm-matching-header {
    text-align: center;
    margin-bottom: 50px;
}

.dm-matching-header h1 {
    font-size: 3.5rem;
    font-weight: 800;
    color: #1a1a1a;
    margin-bottom: 20px;
}

.dm-matching-header .subtitle {
    font-size: 1.5rem;
    color: #444444;
    margin-bottom: 25px;
    font-weight: 500;
}

/* Filters Bar */
.dm-matching-filters {
    background: var(--dm-white);
    border-radius: var(--dm-radius);
    padding: 30px 35px;
    margin-bottom: 35px;
    box-shadow: 0 6px 30px rgba(0,0,0,0.1);
    border: 2px solid #e8e8e8;
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    align-items: stretch;
}

.dm-filter-group {
    display: flex;
    flex-direction: column;
    gap: 10px;
    justify-content: flex-end;
}

.dm-filter-group > label:first-child {
    font-size: 15px;
    font-weight: 700;
    color: #1a1a1a;
    margin-bottom: 5px;
}

.dm-filter-group select {
    padding: 14px 20px;
    border: 2px solid #d0d0d0;
    border-radius: 10px;
    font-size: 15px;
    min-width: 220px;
    background: #fafafa;
    color: #333333;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    height: 54px;
    box-sizing: border-box;
}

.dm-filter-group select option {
    text-transform: uppercase;
    font-weight: 600;
    padding: 10px;
}

.dm-filter-group input[type="checkbox"] {
    width: 22px;
    height: 22px;
    accent-color: var(--dm-orange);
}

.dm-filter-group select:focus,
.dm-filter-group input:focus {
    outline: none;
    border-color: var(--dm-orange);
    box-shadow: 0 0 0 4px rgba(245, 166, 35, 0.25);
    background: #ffffff;
}

.dm-filter-btn {
    background: var(--dm-gradient);
    color: var(--dm-white);
    border: none;
    padding: 0 40px;
    border-radius: 10px;
    font-weight: 700;
    font-size: 15px;
    cursor: pointer;
    transition: all 0.3s;
    box-shadow: 0 4px 15px rgba(245, 166, 35, 0.3);
    height: 54px;
    align-self: flex-end;
}

.dm-filter-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(245, 166, 35, 0.5);
    background: #e8940c;
}

/* Range Input Styling */
.dm-score-wrapper input[type="range"] {
    -webkit-appearance: none;
    flex: 1;
    min-width: 120px;
    height: 8px;
    border-radius: 4px;
    background: linear-gradient(to right, #F5A623 0%, #e0e0e0 0%);
    outline: none;
    padding: 0;
    margin: 0;
    border: none;
    cursor: pointer;
}

.dm-score-wrapper input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: linear-gradient(135deg, #F5A623, #E8940C);
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(245, 166, 35, 0.5);
    border: 2px solid #ffffff;
}

.dm-score-wrapper input[type="range"]::-moz-range-thumb {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: linear-gradient(135deg, #F5A623, #E8940C);
    cursor: pointer;
    border: 2px solid #ffffff;
    box-shadow: 0 2px 8px rgba(245, 166, 35, 0.5);
}

.dm-score-wrapper input[type="range"]::-webkit-slider-runnable-track {
    height: 8px;
    border-radius: 4px;
}

.dm-score-wrapper input[type="range"]::-moz-range-track {
    height: 8px;
    border-radius: 4px;
    background: #e0e0e0;
}

/* Score Filter Styling */
.dm-filter-score {
    min-width: 280px;
}

.dm-filter-score > label {
    display: block;
}

.dm-score-wrapper {
    display: flex;
    align-items: center;
    gap: 15px;
    background: #fafafa;
    padding: 14px 20px;
    border-radius: 10px;
    border: 2px solid #d0d0d0;
    height: 54px;
    box-sizing: border-box;
}

.dm-score-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 60px;
    padding: 8px 12px;
    background: linear-gradient(135deg, #F5A623, #E8940C);
    color: #ffffff;
    font-size: 15px;
    font-weight: 800;
    border-radius: 8px;
    box-shadow: 0 3px 10px rgba(245, 166, 35, 0.4);
    flex-shrink: 0;
}

/* Checkbox filter group */
.dm-filter-checkbox {
    justify-content: flex-end;
}

.dm-checkbox-wrapper {
    display: flex;
    align-items: center;
    gap: 12px;
    background: #fafafa;
    padding: 14px 22px;
    border-radius: 10px;
    border: 2px solid #d0d0d0;
    cursor: pointer;
    transition: all 0.2s;
    height: 54px;
    box-sizing: border-box;
}

.dm-checkbox-wrapper:hover {
    border-color: var(--dm-orange);
    background: #fff8e6;
}

.dm-checkbox-wrapper input[type="checkbox"] {
    width: 22px;
    height: 22px;
    accent-color: var(--dm-orange);
    cursor: pointer;
    flex-shrink: 0;
}

.dm-checkbox-wrapper label {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    font-size: 15px;
    font-weight: 600;
    color: #333333;
    margin: 0;
}

.dm-checkbox-icon {
    font-size: 1.2rem;
}

/* Stats Bar */
.dm-matching-stats {
    display: flex;
    gap: 25px;
    margin-bottom: 40px;
    flex-wrap: wrap;
}

.dm-stat-card {
    background: var(--dm-white);
    border-radius: var(--dm-radius);
    padding: 25px 40px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
    border: 2px solid #e8e8e8;
    display: flex;
    align-items: center;
    gap: 20px;
}

.dm-stat-icon {
    width: 70px;
    height: 70px;
    border-radius: 50%;
    background: var(--dm-gradient);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.2rem;
    box-shadow: 0 4px 12px rgba(245, 166, 35, 0.3);
}

.dm-stat-info h3 {
    font-size: 2.8rem;
    font-weight: 800;
    color: #1a1a1a;
    margin: 0;
}

.dm-stat-info span {
    font-size: 15px;
    color: #555555;
    font-weight: 500;
}

/* Results Grid */
.dm-matching-results {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(420px, 1fr));
    gap: 30px;
}

/* ══ LISTING-STYLE VARIABLES FOR CARDS ══ */
.dm-host-card {
    --dm-orange: #F5A623;
    --dm-orange-lt: #fef3e2;
    --dm-orange-bd: #fde4b0;
    --dm-dark: #1a1a1a;
    --dm-body: #444;
    --dm-muted: #888;
    --dm-line: #ebebeb;
    --dm-bg: #f8f8f8;
    --dm-white: #ffffff;

    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: var(--dm-white);
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
    transition: transform 0.3s, box-shadow 0.3s;
    border: 1px solid var(--dm-line);
}

.dm-host-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 40px rgba(0,0,0,0.12);
}

/* ══ PROFILE SECTION (same as listing page §1) ══ */
.dm-mc-profile {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 2.5rem;
    align-items: center;
    padding: 2.5rem 2rem 2rem;
    position: relative;
}

.dm-mc-avatar-wrap {
    position: relative;
    width: fit-content;
}

.dm-mc-avatar {
    width: 150px;
    height: 150px;
    border-radius: 50%;
    background: var(--dm-orange-lt);
    border: 3px solid var(--dm-orange-bd);
    overflow: hidden;
}

.dm-mc-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.dm-host-photo-placeholder {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #F5A623, #E8940C);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
    font-weight: 700;
    color: #fff;
}

.dm-mc-online-dot {
    width: 16px;
    height: 16px;
    background: var(--dm-orange);
    border-radius: 50%;
    border: 3px solid white;
    position: absolute;
    bottom: 6px;
    right: 6px;
}

.dm-mc-info {
    min-width: 0;
}

.dm-mc-name {
    font-size: 2.8rem;
    font-weight: 700;
    color: var(--dm-dark);
    margin-bottom: .4rem;
    letter-spacing: -.02em;
    line-height: 1.1;
}

.dm-mc-name em {
    font-style: italic;
    font-family: 'Lora', serif;
    font-weight: 400;
    color: var(--dm-orange);
}

.dm-mc-sub {
    font-size: 1.15rem;
    color: var(--dm-muted);
    margin-bottom: .8rem;
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.dm-mc-tags {
    display: flex;
    flex-wrap: wrap;
    gap: .5rem;
    margin-bottom: .8rem;
}

.dm-mc-tag {
    background: var(--dm-orange-lt);
    border: 1px solid var(--dm-orange-bd);
    border-radius: .5rem;
    padding: .45rem 1rem;
    font-size: 1.05rem;
    font-weight: 500;
    color: var(--dm-orange);
}

.dm-mc-tag.common {
    background: #eaf5ee;
    color: #3a8a5a;
    border-color: #b8dfc7;
}

.dm-mc-tag.grey {
    background: var(--dm-bg);
    border-color: var(--dm-line);
    color: var(--dm-body);
}

.dm-mc-quote {
    font-family: 'Lora', serif;
    font-style: italic;
    font-size: 1.2rem;
    color: var(--dm-body);
    padding-left: 1rem;
    border-left: 3px solid var(--dm-orange);
    line-height: 1.6;
    max-width: 500px;
    margin: 0;
}

/* Match score badge */
.dm-match-score {
    position: absolute;
    top: 1.5rem;
    right: 1.5rem;
    width: 76px;
    height: 76px;
    border-radius: 50%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    box-shadow: 0 4px 15px rgba(0,0,0,0.15);
}

.dm-match-score.excellent {
    background: linear-gradient(135deg, #27AE60, #2ECC71);
    color: #fff;
}

.dm-match-score.good {
    background: linear-gradient(135deg, #F5A623, #F39C12);
    color: #fff;
}

.dm-match-score.fair {
    background: #DEE2E6;
    color: #495057;
}

.dm-match-score .score-value {
    font-size: 1.5rem;
    line-height: 1;
    font-weight: 800;
}

.dm-match-score .score-label {
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    margin-top: 2px;
    letter-spacing: 0.5px;
}

/* Match Details Grid */
.dm-mc-details {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: .6rem;
    padding: 1.2rem 2rem;
    background: var(--dm-bg);
    border-top: 1px solid var(--dm-line);
    border-bottom: 1px solid var(--dm-line);
}

.dm-match-item {
    display: flex;
    align-items: center;
    gap: .5rem;
    font-size: 1.05rem;
    color: var(--dm-muted);
    font-weight: 500;
}

.dm-match-item.matched {
    color: #3a8a5a;
    font-weight: 600;
}

.dm-match-item .check-icon {
    color: #3a8a5a;
    font-weight: 700;
    font-size: 1.15rem;
}

.dm-match-item .cross-icon {
    color: #ccc;
    font-size: 1.15rem;
}

/* Single listing: Consulter button */
.dm-mc-single-listing {
    padding: 1.5rem 2rem;
    text-align: center;
}

.dm-mc-btn-consulter {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: .9rem 2.5rem;
    background: var(--dm-orange);
    color: #fff;
    border-radius: .6rem;
    font-size: 1.1rem;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.2s;
    box-shadow: 0 4px 15px rgba(245,166,35,0.3);
}

.dm-mc-btn-consulter:hover {
    background: #d4820f;
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(245,166,35,0.4);
    text-decoration: none;
}

/* Listings Preview */
.dm-host-listings {
    padding: 1.2rem 2rem 1.5rem;
    border-top: 1px solid var(--dm-line);
}

.dm-listings-title {
    font-size: 1.2rem;
    font-weight: 700;
    color: #1a1a1a;
    margin-bottom: 12px;
}

.dm-listings-grid {
    display: flex;
    gap: 10px;
    overflow-x: auto;
    padding-bottom: 5px;
}

.dm-listing-mini {
    min-width: 150px;
    border-radius: var(--dm-radius-sm);
    overflow: hidden;
    border: 2px solid #e0e0e0;
    transition: all 0.2s;
}

.dm-listing-mini:hover {
    border-color: var(--dm-orange);
    transform: translateY(-3px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.dm-listing-mini img {
    width: 100%;
    height: 100px;
    object-fit: cover;
}

.dm-listing-mini-info {
    padding: 12px;
}

.dm-listing-mini-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: #1a1a1a;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.dm-listing-mini-price {
    font-size: 1.05rem;
    color: #d35400;
    font-weight: 700;
}

/* Card Footer */
.dm-host-footer {
    padding: 20px 25px;
    background: #f5f5f5;
    display: flex;
    gap: 15px;
}

.dm-btn {
    flex: 1;
    padding: 16px 25px;
    border-radius: var(--dm-radius-sm);
    font-weight: 700;
    text-align: center;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.2s;
    border: none;
    font-size: 1.15rem;
}

.dm-btn-primary {
    background: var(--dm-gradient);
    color: var(--dm-white);
}

.dm-btn-primary:hover {
    background: var(--dm-gray-900);
    color: var(--dm-white);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

/* Access Denied Button Specific */
.dm-access-denied .dm-btn {
    font-size: 1.1rem;
    padding: 15px 35px;
    border-radius: 10px;
}

.dm-btn-outline {
    background: var(--dm-white);
    color: #333333;
    border: 2px solid #cccccc;
}

.dm-btn-outline:hover {
    border-color: var(--dm-orange);
    color: var(--dm-orange);
    background: #fff8e6;
}

/* Empty State */
.dm-matching-empty {
    text-align: center;
    padding: 60px 20px;
    background: var(--dm-white);
    border-radius: var(--dm-radius);
    box-shadow: var(--dm-shadow);
}

.dm-empty-icon {
    font-size: 5rem;
    margin-bottom: 20px;
}

.dm-empty-title {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--dm-gray-900);
    margin-bottom: 10px;
}

.dm-empty-text {
    font-size: 1.15rem;
    color: var(--dm-gray-600);
    margin-bottom: 20px;
}

/* Loading State */
.dm-matching-loading {
    text-align: center;
    padding: 60px 20px;
}

.dm-loading-spinner {
    width: 50px;
    height: 50px;
    border: 4px solid var(--dm-gray-200);
    border-top-color: var(--dm-orange);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 20px;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Access Denied */
.dm-access-denied {
    text-align: center;
    padding: 80px 40px;
    background: var(--dm-white);
    border-radius: var(--dm-radius);
    box-shadow: var(--dm-shadow);
    max-width: 550px;
    margin: 60px auto;
}

.dm-access-icon {
    font-size: 6rem;
    margin-bottom: 25px;
}

.dm-access-title {
    font-size: 2.2rem;
    font-weight: 700;
    color: var(--dm-gray-900);
    margin-bottom: 15px;
}

.dm-access-text {
    font-size: 1.25rem;
    color: var(--dm-gray-600);
    margin-bottom: 30px;
    line-height: 1.6;
}

/* Filter Rows Layout */
.dm-filters-row {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    align-items: flex-end;
    width: 100%;
}

.dm-filters-row + .dm-filters-row {
    margin-top: 5px;
    padding-top: 15px;
    border-top: 1px solid var(--dm-gray-200);
}

.dm-filter-full {
    flex: 1 1 100%;
}

/* Chip Group */
.dm-chip-group {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.dm-chip {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 10px 18px;
    border-radius: 25px;
    border: 2px solid var(--dm-gray-300);
    background: var(--dm-white);
    color: var(--dm-gray-700);
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
}

.dm-chip:hover {
    border-color: var(--dm-orange);
    color: var(--dm-orange);
    background: #fff8e6;
}

.dm-chip.active {
    background: var(--dm-gradient);
    color: var(--dm-white);
    border-color: var(--dm-orange);
    box-shadow: 0 3px 10px rgba(245, 166, 35, 0.3);
}

/* Stats breakdown cards */
.dm-stat-excellent .dm-stat-icon-sm,
.dm-stat-good .dm-stat-icon-sm,
.dm-stat-fair .dm-stat-icon-sm {
    width: 50px;
    height: 50px;
    font-size: 1.6rem;
}

.dm-stat-excellent .dm-stat-icon-sm {
    background: linear-gradient(135deg, #27AE60, #2ECC71);
}

.dm-stat-good .dm-stat-icon-sm {
    background: linear-gradient(135deg, #F5A623, #F39C12);
}

.dm-stat-fair .dm-stat-icon-sm {
    background: var(--dm-gray-300);
}

.dm-stat-excellent .dm-stat-info h3,
.dm-stat-good .dm-stat-info h3,
.dm-stat-fair .dm-stat-info h3 {
    font-size: 2rem;
}

.dm-stat-excellent .dm-stat-info span,
.dm-stat-good .dm-stat-info span,
.dm-stat-fair .dm-stat-info span {
    font-size: 1rem;
}

/* Responsive */
@media (max-width: 900px) {
    .dm-matching-results {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .dm-matching-page {
        padding: 30px 15px;
    }

    .dm-matching-header h1 {
        font-size: 2.2rem;
    }

    .dm-matching-header .subtitle {
        font-size: 1.2rem;
    }

    .dm-matching-filters {
        flex-direction: column;
        padding: 20px;
        gap: 20px;
    }

    .dm-filter-group {
        width: 100%;
    }

    .dm-filter-group select {
        width: 100%;
        height: auto;
        padding: 14px 20px;
    }

    .dm-score-wrapper {
        width: 100%;
        height: auto;
        padding: 14px 20px;
    }

    .dm-score-wrapper input[type="range"] {
        flex: 1;
    }

    .dm-checkbox-wrapper {
        width: 100%;
        height: auto;
        justify-content: center;
        padding: 14px 20px;
    }

    .dm-filter-btn {
        width: 100%;
        height: auto;
        padding: 16px 30px;
    }

    .dm-filters-row {
        flex-direction: column;
        gap: 15px;
    }

    .dm-chip-group {
        gap: 6px;
    }

    .dm-chip {
        font-size: 0.9rem;
        padding: 8px 14px;
    }

    .dm-stat-info h3 {
        font-size: 2.2rem;
    }

    .dm-stat-info span {
        font-size: 1.1rem;
    }

    .dm-mc-details {
        grid-template-columns: 1fr;
    }

    .dm-host-footer {
        flex-direction: column;
    }

    .dm-matching-stats {
        justify-content: center;
    }

    .dm-mc-profile {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 1rem;
    }

    .dm-mc-avatar-wrap {
        margin: 0 auto;
    }

    .dm-mc-avatar {
        width: 120px;
        height: 120px;
    }

    .dm-mc-sub {
        justify-content: center;
    }

    .dm-mc-tags {
        justify-content: center;
    }

    .dm-mc-quote {
        margin: 0 auto;
    }

    .dm-mc-name {
        font-size: 2rem;
    }

    .dm-match-score {
        position: relative;
        top: auto;
        right: auto;
        margin: 0 auto;
        width: 65px;
        height: 65px;
    }

    .dm-match-score .score-value {
        font-size: 1.4rem;
    }
}
