/**
 * LoveConnect - Discover Page Styles
 * Styles pour la page de découverte des profils
 */

/* =========================
   LAYOUT PRINCIPAL
   ========================= */

.discover-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 2rem 1rem;
    display: grid;
    grid-template-columns: 300px 1fr;
    gap: 2rem;
    align-items: start;
}

.discover-main {
    min-height: 100vh;
}

.discover-header {
    margin-bottom: 2rem;
    text-align: center;
}

.discover-header h1 {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
    background: linear-gradient(135deg, #FF7F89, #FFD93D);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.discover-header p {
    color: #d1d5db;
    font-size: 1.1rem;
}

.results-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    padding: 1rem;
    background: rgba(26, 31, 58, 0.95);
    border-radius: 12px;
    border: 1px solid rgba(255, 195, 0, 0.2);
    box-shadow: var(--shadow);
}

#resultsCount {
    font-weight: 600;
    color: #FFD93D;
}

/* =========================
   PANNEAU DE FILTRES
   ========================= */

.filters-panel {
    background: linear-gradient(135deg, rgba(26, 31, 58, 0.98), rgba(35, 40, 75, 0.98));
    border-radius: 16px;
    padding: 2rem;
    border: 1px solid rgba(255, 195, 0, 0.3);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(10px);
    position: sticky;
    top: 100px;
    max-height: calc(100vh - 120px);
    overflow-y: auto;
}

.filters-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    padding-bottom: 1.5rem;
    border-bottom: 2px solid rgba(255, 195, 0, 0.4);
    gap: 1rem;
    flex-wrap: wrap;
}

.filters-header h3 {
    margin: 0;
    color: #FFD93D;
    font-size: 1.4rem;
    font-weight: 700;
    letter-spacing: 0.5px;
    flex: 1 1 auto;
    min-width: 150px;
}

#resetFilters {
    flex-shrink: 0;
    white-space: nowrap;
}

.filter-group {
    margin-bottom: 2.5rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid rgba(255, 195, 0, 0.15);
}

.filter-group:last-child {
    border-bottom: none;
}

.filter-group > label:not(.checkbox-filter) {
    display: block;
    margin-bottom: 0.75rem;
    font-weight: 700;
    color: #FFD93D;
    font-size: 1.05rem;
    letter-spacing: 0.3px;
}

/* Labels checkbox doivent rester en flex */
.filter-group label.checkbox-filter {
    display: flex;
    margin-bottom: 0;
}

.filter-input,
.filter-select {
    width: 100%;
    padding: 0.95rem 1rem;
    border: 2px solid rgba(255, 195, 0, 0.2);
    border-radius: 8px;
    font-size: 1rem;
    background: rgba(5, 8, 20, 0.8);
    color: #ffffff;
    transition: all 0.3s ease;
}

.filter-input::placeholder,
.filter-select {
    color: rgba(255, 255, 255, 0.7);
}

.filter-input:focus,
.filter-select:focus {
    outline: none;
    border-color: #FFD93D;
    background: rgba(5, 8, 20, 1);
    box-shadow: var(--shadow-glow), inset 0 0 10px rgba(255, 195, 0, 0.1);
}

/* Sliders d'âge - Layout compact */
.age-range-compact {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
    padding: 0.5rem 0;
}

.age-slider-wrapper {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.age-value {
    font-weight: 700;
    color: #FFD93D;
    font-size: 0.95rem;
    text-align: center;
    letter-spacing: 0.3px;
}

.age-slider {
    width: 100%;
    height: 8px;
    border-radius: 4px;
    background: linear-gradient(90deg, rgba(255, 195, 0, 0.2), rgba(255, 195, 0, 0.25));
    outline: none;
    -webkit-appearance: none;
}

.age-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: linear-gradient(135deg, #FF7F89, #FFD93D);
    cursor: pointer;
    box-shadow: var(--shadow-glow-red), 0 2px 8px rgba(0, 0, 0, 0.4);
    transition: transform 0.2s ease;
}

.age-slider::-webkit-slider-thumb:hover {
    transform: scale(1.2);
    box-shadow: var(--shadow-glow-red), 0 4px 12px rgba(0, 0, 0, 0.6);
}

/* Checkbox personnalisée */
.checkbox-filter {
    display: flex;
    align-items: center;
    cursor: pointer;
    gap: 1rem;
    margin-bottom: 0;
    padding: 0.75rem;
    border-radius: 8px;
    transition: all 0.2s ease;
}

.checkbox-filter:hover {
    background: rgba(255, 195, 0, 0.05);
}

.checkbox-filter input[type="checkbox"] {
    display: none;
}

.checkmark {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    border: 2px solid rgba(255, 195, 0, 0.3);
    border-radius: 6px;
    background: rgba(5, 8, 20, 0.8);
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.checkbox-filter input[type="checkbox"]:checked + .checkmark {
    background: linear-gradient(135deg, #FF7F89, #FFD93D);
    border-color: #FFD93D;
    box-shadow: var(--shadow-glow-red);
}

.checkbox-filter input[type="checkbox"]:checked + .checkmark::after {
    content: '✓';
    color: white;
    font-size: 0.9rem;
    font-weight: bold;
}

.checkbox-filter span:last-child {
    color: #ffffff;
    font-weight: 600;
    font-size: 1rem;
    white-space: nowrap;
    flex: 1;
}

/* Tags d'intérêts */
.interests-tags {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 0.75rem;
    max-height: 280px;
    overflow-y: auto;
    padding-right: 0.5rem;
    align-content: start;
}

.interest-tag {
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
}

.interest-tag input[type="checkbox"] {
    display: none;
}

.tag-text {
    padding: 0.65rem 1rem;
    background: rgba(5, 8, 20, 0.8);
    border: 2px solid rgba(255, 195, 0, 0.2);
    border-radius: 22px;
    font-size: 0.95rem;
    font-weight: 500;
    color: #ffffff;
    transition: all 0.2s ease;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    text-align: center;
    min-height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.interest-tag input[type="checkbox"]:checked + .tag-text {
    background: linear-gradient(135deg, #FF7F89, #FFD93D);
    color: #ffffff;
    border-color: #FFD93D;
    font-weight: 700;
    box-shadow: var(--shadow-glow-red);
}

.interest-tag:hover .tag-text {
    border-color: #FFD93D;
    color: #FFD93D;
}

/* =========================
   GRILLE DE PROFILS
   ========================= */

/* Base Desktop (> 1200px) - Force 5 colonnes */
.profiles-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 1.5rem;
    margin-bottom: 2rem;
    width: 100%;
}

/* Tablet / Petit Desktop (768px - 1200px) */
@media (max-width: 1200px) {
    .profiles-grid {
        grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
        gap: 1rem;
    }
}

.profile-card {
    background: rgba(26, 31, 58, 0.98);
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid rgba(255, 195, 0, 0.15);
    transition: all 0.3s ease;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.4);
    cursor: pointer;
    position: relative;
}

/* Fonds colorés pastels selon le genre */
.profile-card.gender-male {
    background: rgba(26, 31, 58, 0.95);
    border-color: var(--border);
}

.profile-card.gender-female {
    background: rgba(26, 31, 58, 0.95);
    border-color: var(--border);
}

.profile-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-lg), var(--shadow-glow-red);
    border-color: #FFD93D;
}

.profile-card.gender-male:hover {
    background: rgba(26, 31, 58, 0.95);
    border-color: #FFD93D;
}

.profile-card.gender-female:hover {
    background: rgba(26, 31, 58, 0.95);
    border-color: #FFD93D;
}

/* Overlay au hover pour indiquer que c'est cliquable */
.profile-card::before {
    content: '👁️ Voir le profil';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, #FF7F89, #E56B75);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 1.1rem;
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: 5;
    pointer-events: none;
    border: 2px solid var(--sparkly-yellow);
}

.profile-card:hover::before {
    opacity: 1;
}

.profile-image-container {
    position: relative;
    width: 100%;
    padding-top: 100%; /* Crée un ratio carré (hauteur = largeur) */
    overflow: hidden;
}

.profile-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    /* object-position sera défini par inline style avec position du visage détecté */
    background-color: #f5f5f5;
    transition: transform 0.3s ease;
}

/* Pour les photos avec visages très excentrés, utiliser contain au lieu de cover */
.profile-image[data-face-extreme="true"] {
    object-fit: contain;
    background: linear-gradient(135deg, #4A90E2 0%, #2C5282 100%);
}

.profile-card:hover .profile-image {
    transform: scale(1.08);
}

/* Drapeau principal en haut à droite - EMOJIS UNIQUEMENT */
.profile-country-flag-main {
    position: absolute;
    top: 0.75rem;
    right: 0.75rem;
    width: 24px;
    height: 18px;
    border: 0px solid white;
    border-radius: 6px;
    box-shadow: 
        0 0 16px rgba(0, 0, 0, 0.3),
        0 2px 8px rgba(0, 0, 0, 0.2);
    cursor: help;
    transition: all 0.3s ease;
    z-index: 10;
    overflow: hidden;
    /* Flag-icons SVG */
    background-size: cover;
    background-position: center;
}

/* Effet hover sur le drapeau */
.profile-country-flag-main:hover {
    transform: scale(1.15);
    box-shadow: 
        0 6px 24px rgba(0, 0, 0, 0.4),
        0 3px 12px rgba(0, 0, 0, 0.3);
}

.profile-status {
    position: absolute;
    top: 0.75rem;
    right: 0.75rem;
    width: 36px;
    height: 36px;
    background: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.15);
}

/* Grand drapeau en haut à droite (remplace le status) */
.profile-country-flag-large {
    position: absolute;
    top: 0.75rem;
    right: 0.75rem;
    width: 48px;
    height: 36px;
    border: 2px solid white;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    line-height: 1;
    box-shadow: 
        0 3px 12px rgba(0, 0, 0, 0.2),
        0 2px 6px rgba(0, 0, 0, 0.15);
    cursor: help;
    transition: all 0.2s ease;
    z-index: 10;
    overflow: hidden;
    background: white;
}

/* Style pour les grands drapeaux flag-icons */
.profile-country-flag-large.fi {
    background: none !important;
    font-size: 0 !important;
    background-size: cover !important;
    background-position: center !important;
    background-repeat: no-repeat !important;
}

/* Effet hover sur le grand drapeau */
.profile-country-flag-large:hover {
    transform: scale(1.1);
    box-shadow: 
        0 4px 16px rgba(0, 0, 0, 0.25),
        0 2px 8px rgba(0, 0, 0, 0.2);
}

.profile-country-flag {
    position: absolute;
    top: 0.75rem;
    left: 0.75rem;
    width: 28px;
    height: 21px;
    border: 2px solid white;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
    line-height: 1;
    box-shadow: 
        0 2px 8px rgba(0, 0, 0, 0.15),
        0 1px 3px rgba(0, 0, 0, 0.1);
    cursor: help;
    transition: all 0.2s ease;
    z-index: 10;
    overflow: hidden;
}

/* Style pour les drapeaux flag-icons (priorité) */
.profile-country-flag.fi {
    background: none !important;
    font-size: 0 !important;
    background-size: cover !important;
    background-position: center !important;
    background-repeat: no-repeat !important;
}

/* Style pour les drapeaux emoji (fallback) */
.profile-country-flag:not(.fi) {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.95), rgba(248, 250, 252, 0.95));
    backdrop-filter: blur(10px);
}

.profile-country-flag:hover {
    transform: scale(1.15);
    box-shadow: 
        0 4px 12px rgba(0, 0, 0, 0.2),
        0 2px 6px rgba(0, 0, 0, 0.15);
}

.profile-info {
    padding: 1.5rem;
    background: #050814;
}

.profile-header {
    display: flex;
    flex-direction: column;
}

.profile-name {
    margin: 0;
    font-size: 1.25rem;
    color: #ffffff;
    font-weight: 700;
    line-height: 1.3;
}

.profile-location {
    font-size: 0.8rem;
    color: #d1d5db;
    font-weight: 500;
    display: none; /* Caché car info redondante avec le drapeau */
}

.profile-interests {
    display: none !important; /* Masqué pour un rendu plus professionnel et épuré */
    visibility: hidden !important;
    height: 0 !important;
    overflow: hidden !important;
}

.interest-badge {
    padding: 0.65rem 1.1rem;
    background: linear-gradient(135deg, #FF7F89, #FFD93D);
    color: #ffffff;
    border-radius: 20px;
    font-size: 0.95rem;
    font-weight: 600;
    line-height: 1.3;
    box-shadow: 0 4px 12px rgba(230, 57, 70, 0.25);
    transition: all 0.3s ease;
    display: inline-block;
}

.interest-badge:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(230, 57, 70, 0.35);
}

.more-interests {
    padding: 0.65rem 1rem;
    background: rgba(255, 195, 0, 0.2);
    color: #333;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 600;
    line-height: 1.2;
    border: 1px solid rgba(255, 195, 0, 0.3);
}

/* Actions dans la modale de profil */
.profile-modal-actions {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-top: 1rem;
    padding-top: 1.5rem;
    border-top: 1px solid rgba(200, 200, 200, 0.2);
    animation: slideInRight 0.5s ease 0.6s both;
}

.profile-modal-actions .btn {
    width: 100%;
    padding: 1rem;
    font-weight: 700;
    font-size: 1rem;
    border: none;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    position: relative;
    overflow: hidden;
}

.profile-modal-actions .btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.4) 0%, transparent 70%);
    transition: left 0.5s ease;
    z-index: 0;
}

.profile-modal-actions .btn:hover::before {
    left: 100%;
}

.profile-modal-actions .btn > * {
    position: relative;
    z-index: 1;
}

/* Bouton Message */
.btn-send-message {
    background: linear-gradient(135deg, #ff6b9d 0%, #E56B75 100%);
    color: white;
    box-shadow: 0 8px 24px rgba(255, 107, 157, 0.35);
}

.btn-send-message:hover {
    transform: translateY(-3px);
    box-shadow: 
        0 15px 40px rgba(255, 107, 157, 0.5),
        0 8px 20px rgba(0, 0, 0, 0.2);
}

.btn-send-message:active {
    transform: translateY(-1px);
}

/* Bouton Favoris */
.btn-toggle-favorite {
    background: linear-gradient(135deg, rgba(255, 182, 193, 0.3), rgba(255, 218, 185, 0.2));
    color: var(--accent-red);
    border: 2px solid rgba(255, 107, 157, 0.4);
    box-shadow: inset 0 2px 8px rgba(255, 107, 157, 0.1);
}

.btn-toggle-favorite:hover {
    background: linear-gradient(135deg, rgba(255, 182, 193, 0.5), rgba(255, 218, 185, 0.4));
    border-color: var(--accent-pink);
    transform: translateY(-2px);
    box-shadow: 
        0 8px 24px rgba(255, 107, 157, 0.3),
        inset 0 2px 8px rgba(255, 107, 157, 0.2);
}

.btn-toggle-favorite.btn-favorite-active {
    background: linear-gradient(135deg, #ffc0cb 0%, #ffb6c1 100%);
    color: white;
    border-color: var(--accent-pink);
    box-shadow: 0 8px 24px rgba(255, 192, 203, 0.4);
}

.btn-toggle-favorite.btn-favorite-active:hover {
    transform: translateY(-3px) scale(1.02);
    box-shadow: 
        0 15px 40px rgba(255, 192, 203, 0.5),
        0 8px 20px rgba(0, 0, 0, 0.15);
}

/* Bouton Débloquer */
.btn-unblock {
    background: linear-gradient(135deg, rgba(100, 200, 255, 0.3), rgba(150, 100, 255, 0.2));
    color: var(--accent-blue);
    border: 2px solid rgba(100, 200, 255, 0.4);
}

.btn-unblock:hover {
    background: linear-gradient(135deg, rgba(100, 200, 255, 0.5), rgba(150, 100, 255, 0.4));
    border-color: var(--accent-blue);
    transform: translateY(-2px);
}

/* Bouton Inscription */
.btn-register-prompt {
    background: linear-gradient(135deg, #00d4ff 0%, #0099cc 100%);
    color: white !important;
    box-shadow: 0 8px 24px rgba(0, 212, 255, 0.35);
}

.btn-register-prompt:hover {
    transform: translateY(-3px);
    box-shadow: 
        0 15px 40px rgba(0, 212, 255, 0.5),
        0 8px 20px rgba(0, 0, 0, 0.2);
}

/* Spinner loading */
.profile-actions-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    padding: 1.5rem;
    animation: fadeIn 0.3s ease;
}

.spinner {
    width: 32px;
    height: 32px;
    border: 3px solid rgba(255, 107, 157, 0.2);
    border-top-color: var(--accent-pink);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

.profile-actions-loading p {
    color: #999;
    font-weight: 600;
    font-size: 0.9rem;
}

.profile-actions-loaded {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

/* =========================
   PAGINATION
   ========================= */

.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.5rem;
    margin: 2rem 0;
}

.pagination-btn {
    padding: 0.75rem 1rem;
    border: 1px solid var(--border);
    background: rgba(26, 31, 58, 0.95);
    color: #ffffff;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    font-weight: 500;
}

.pagination-btn:hover {
    border-color: #FFD93D;
    color: #FFD93D;
    background: rgba(255, 195, 0, 0.1);
}

.pagination-btn.active {
    background: linear-gradient(135deg, #FF7F89, #E56B75);
    color: white;
    border-color: #FFD93D;
}

.pagination-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.pagination-dots {
    padding: 0.75rem 0.5rem;
    color: #d1d5db;
}

/* =========================
   MODALE PROFIL DÉTAILLÉ
   ========================= */

/* ============ MODALE PROFIL - REFONTE CRÉATIVE ============ */

.profile-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(135% 135% at 50% 0%, rgba(20, 20, 40, 0.95) 0%, rgba(0, 0, 0, 0.98) 100%);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 10000;
    backdrop-filter: blur(8px);
    animation: backdropFadeIn 0.4s ease;
}

@keyframes backdropFadeIn {
    from {
        opacity: 0;
        backdrop-filter: blur(0px);
    }
    to {
        opacity: 1;
        backdrop-filter: blur(8px);
    }
}

.profile-modal {
    background: linear-gradient(135deg, #ffffff 0%, #f9f9ff 100%);
    border-radius: 28px;
    max-width: 920px;
    width: 95%;
    max-height: 92vh;
    overflow-y: auto;
    overflow-x: hidden;
    box-shadow: 
        0 30px 120px rgba(255, 70, 150, 0.35),
        0 15px 60px rgba(0, 0, 0, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.8);
    border: 1px solid rgba(255, 255, 255, 0.4);
    transform: scale(0.85) translateY(30px);
    animation: modalSlideUp 0.5s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
    position: relative;
}

@keyframes modalSlideUp {
    to {
        transform: scale(1) translateY(0);
        opacity: 1;
    }
}

/* Scrollbar élégante */
.profile-modal::-webkit-scrollbar {
    width: 8px;
}

.profile-modal::-webkit-scrollbar-track {
    background: rgba(200, 200, 200, 0.1);
    border-radius: 10px;
}

.profile-modal::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, var(--accent-pink) 0%, var(--accent-red) 100%);
    border-radius: 10px;
    transition: background 0.3s;
}

.profile-modal::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, var(--accent-red) 0%, var(--accent-pink) 100%);
}

.profile-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding: 2rem 2.5rem;
    background: linear-gradient(135deg, rgba(255, 182, 193, 0.15) 0%, rgba(255, 218, 185, 0.1) 100%);
    border-bottom: 1px solid rgba(255, 200, 200, 0.3);
    border-radius: 28px 28px 0 0;
}

.profile-modal-header h2 {
    margin: 0;
    font-size: 1.8rem;
    color: #1a1a2e;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 0.8rem;
}

.close-profile-modal {
    background: linear-gradient(135deg, rgba(255, 100, 150, 0.1), rgba(255, 150, 100, 0.1));
    border: 1px solid rgba(255, 100, 150, 0.3);
    border-radius: 50%;
    width: 42px;
    height: 42px;
    font-size: 1.6rem;
    cursor: pointer;
    color: #ff5277;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    transform: scale(1);
}

.close-profile-modal:hover {
    background: linear-gradient(135deg, rgba(255, 100, 150, 0.25), rgba(255, 150, 100, 0.2));
    border-color: rgba(255, 100, 150, 0.6);
    transform: scale(1.15) rotate(90deg);
    box-shadow: 0 8px 24px rgba(255, 100, 150, 0.3);
}

.profile-modal-content {
    display: grid;
    grid-template-columns: 1fr 1.1fr;
    gap: 2.5rem;
    padding: 2.5rem;
    align-items: start;
}

/* ========== GALERIE PHOTOS ========== */

.profile-modal-photos-large {
    position: sticky;
    top: 0;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.photos-gallery-large {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.main-photo-large {
    position: relative;
    border-radius: 20px;
    overflow: hidden;
    cursor: pointer;
    width: 100%;
    aspect-ratio: 3 / 4;
    background: linear-gradient(135deg, #f5f5f5 0%, #e8e8f0 100%);
    box-shadow: 
        0 20px 60px rgba(255, 100, 150, 0.25),
        0 10px 30px rgba(0, 0, 0, 0.15),
        inset 0 1px 0 rgba(255, 255, 255, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.3);
    transform: scale(1);
    transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.main-photo-large:hover {
    transform: scale(1.04) translateY(-4px);
    box-shadow: 
        0 30px 80px rgba(255, 100, 150, 0.4),
        0 15px 40px rgba(0, 0, 0, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.5);
}

.main-photo-large img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.photo-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.8), rgba(0, 0, 0, 0.3), transparent);
    color: white;
    padding: 20px 16px;
    text-align: center;
    font-weight: 600;
    font-size: 0.95rem;
    opacity: 0;
    transition: opacity 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.main-photo-large:hover .photo-overlay {
    opacity: 1;
}

.additional-photos-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
}

.gallery-photo-thumb {
    position: relative;
    aspect-ratio: 3 / 4;
    border-radius: 14px;
    overflow: hidden;
    cursor: pointer;
    background: linear-gradient(135deg, #f5f5f5 0%, #e8e8f0 100%);
    box-shadow: 
        0 8px 24px rgba(0, 0, 0, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.2);
    transform: scale(1);
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.gallery-photo-thumb:hover {
    transform: scale(1.12) translateY(-3px);
    box-shadow: 
        0 15px 40px rgba(255, 100, 150, 0.3),
        0 8px 20px rgba(0, 0, 0, 0.15),
        inset 0 1px 0 rgba(255, 255, 255, 0.3);
}

.gallery-photo-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.photo-overlay-small {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(255, 255, 255, 0.2);
    color: white;
    padding: 8px 12px;
    border-radius: 50%;
    font-size: 1.4rem;
    opacity: 0;
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    backdrop-filter: blur(4px);
    border: 1px solid rgba(255, 255, 255, 0.4);
}

.gallery-photo-thumb:hover .photo-overlay-small {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1.2);
}

.single-photo-large {
    position: relative;
    width: 100%;
    aspect-ratio: 3 / 4;
    border-radius: 20px;
    overflow: hidden;
    cursor: pointer;
    background: linear-gradient(135deg, #f5f5f5 0%, #e8e8f0 100%);
    box-shadow: 
        0 20px 60px rgba(255, 100, 150, 0.25),
        0 10px 30px rgba(0, 0, 0, 0.15),
        inset 0 1px 0 rgba(255, 255, 255, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.3);
    transform: scale(1);
    transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.single-photo-large:hover {
    transform: scale(1.04) translateY(-4px);
    box-shadow: 
        0 30px 80px rgba(255, 100, 150, 0.4),
        0 15px 40px rgba(0, 0, 0, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.5);
}

.single-photo-large img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.single-photo-large:hover .photo-overlay {
    opacity: 1;
}

/* ========== INFOS PROFIL ========== */

.profile-modal-info {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}


.profile-detail {
    padding: 1.2rem;
    background: linear-gradient(135deg, rgba(255, 182, 193, 0.12) 0%, rgba(255, 218, 185, 0.08) 100%);
    border-radius: 12px;
    border-left: 4px solid var(--accent-pink);
    transition: all 0.3s ease;
    animation: slideInRight 0.5s ease forwards;
    animation-fill-mode: both;
    box-shadow: 0 2px 8px rgba(255, 100, 150, 0.1);
}

.profile-detail:nth-child(1) { animation-delay: 0.1s; }
.profile-detail:nth-child(2) { animation-delay: 0.15s; }
.profile-detail:nth-child(3) { animation-delay: 0.2s; }
.profile-detail:nth-child(4) { animation-delay: 0.25s; }
.profile-detail:nth-child(5) { animation-delay: 0.3s; }
.profile-detail:nth-child(6) { animation-delay: 0.35s; }
.profile-detail:nth-child(7) { animation-delay: 0.4s; }
.profile-detail:nth-child(8) { animation-delay: 0.45s; }
.profile-detail:nth-child(9) { animation-delay: 0.5s; }
.profile-detail:nth-child(10) { animation-delay: 0.55s; }

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(-20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.profile-detail:hover {
    background: linear-gradient(135deg, rgba(255, 182, 193, 0.22) 0%, rgba(255, 218, 185, 0.18) 100%);
    border-left-color: #ff4081;
    transform: translateX(4px);
    box-shadow: 0 8px 24px rgba(255, 100, 150, 0.25);
}

.detail-label {
    font-weight: 700;
    color: #ff4081;
    text-transform: uppercase;
    letter-spacing: 0.7px;
    opacity: 0.85;
}

.detail-value {
    color: #1a1a2e;
    font-weight: 600;
    font-size: 1.05rem;
    line-height: 1.4;
    float: right;
}

.profile-bio {
    padding: 1.8rem;
    background: linear-gradient(135deg, rgba(100, 200, 255, 0.12) 0%, rgba(150, 100, 255, 0.08) 100%);
    border-radius: 14px;
    border-left: 4px solid #64c8ff;
    animation: slideInRight 0.5s ease 0.4s both;
    box-shadow: 0 2px 12px rgba(100, 200, 255, 0.15);
}

.profile-bio h4 {
    margin: 0 0 1.2rem 0;
    color: #1a1a2e;
    font-size: 1.25rem;
    font-weight: 700;
    letter-spacing: 0.3px;
}

.profile-bio p {
    color: #2a2a3e;
    line-height: 1.9;
    margin: 0;
    font-size: 1rem;
    word-break: break-word;
    white-space: normal;
}

.profile-interests-full {
    animation: slideInRight 0.5s ease 0.5s both;
    padding: 0.5rem 0;
}

.profile-interests-full h4 {
    margin: 0 0 1.2rem 0;
    color: #1a1a2e;
    font-size: 1.25rem;
    font-weight: 700;
    letter-spacing: 0.3px;
}

.interests-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.8rem;
}

/* LIGHTBOX pour photos en plein écran */
.photo-lightbox {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.95);
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.3s;
}

.lightbox-content {
    position: relative;
    max-width: 95vw;
    max-height: 95vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.lightbox-content img {
    max-width: 100%;
    max-height: 95vh;
    object-fit: contain;
    border-radius: 8px;
}

.lightbox-close {
    position: absolute;
    top: 20px;
    right: 20px;
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    font-size: 2.5rem;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.3s;
    z-index: 10001;
}

.lightbox-close:hover {
    background: rgba(255, 255, 255, 0.3);
}

.lightbox-prev,
.lightbox-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    font-size: 3rem;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    cursor: pointer;
    transition: background 0.3s;
    z-index: 10001;
}

.lightbox-prev {
    left: 20px;
}

.lightbox-next {
    right: 20px;
}

.lightbox-prev:hover,
.lightbox-next:hover {
    background: rgba(255, 255, 255, 0.3);
}

.lightbox-counter {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.7);
    color: white;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 0.9rem;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

/* Ancienne galerie pour compatibilité */
.photos-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.gallery-photo {
    aspect-ratio: 3/4;
    border-radius: 8px;
    overflow: hidden;
    position: relative;
}

.gallery-photo.main-photo {
    grid-column: span 2;
    grid-row: span 2;
}

.gallery-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.gallery-photo:hover img {
    transform: scale(1.05);
}

/* Sections de la modale */
.profile-section {
    margin: 1.5rem 0;
    padding: 1.5rem;
    background: #050814;
    border-radius: 12px;
}

.profile-section h4 {
    margin-bottom: 1rem;
    color: #FF7F89;
    font-size: 1.1rem;
}


.profile-detail.full-width {
    grid-column: 1 / -1;
}

.profile-modal-actions {
    display: flex;
    gap: 1rem;
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border);
}

.profile-modal-actions .btn {
    flex: 1;
}

/* =========================
   ÉTAT VIDE
   ========================= */

.no-results {
    grid-column: 1 / -1;
    text-align: center;
    padding: 4rem 2rem;
    color: #d1d5db;
}

.no-results-icon {
    font-size: 4rem;
    margin-bottom: 1rem;
    opacity: 0.5;
}

.no-results h3 {
    margin-bottom: 0.5rem;
    color: #666666;
}

/* =========================
   SKELETON LOADING
   ========================= */

.loading-card {
    pointer-events: none;
}

.loading-skeleton {
    padding: 1.5rem;
}

.skeleton-image {
    width: 100%;
    height: 280px;
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: loading 1.5s infinite;
    border-radius: 12px;
    margin-bottom: 1rem;
}

.skeleton-content {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.skeleton-line {
    height: 1rem;
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: loading 1.5s infinite;
    border-radius: 4px;
}

.skeleton-line.short {
    width: 60%;
}

.skeleton-line.long {
    width: 80%;
}

@keyframes loading {
    0% {
        background-position: 200% 0;
    }
    100% {
        background-position: -200% 0;
    }
}

/* =========================
   MOBILE FILTERS TOGGLE
   ========================= */

.mobile-filters-toggle {
    display: none;
}

.filters-sidebar {
    transition: transform 0.3s ease;
}

@media (max-width: 1024px) {
    .mobile-filters-toggle {
        display: inline-flex;
        align-items: center;
        gap: 0.5rem;
    }

    .filters-sidebar {
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background: rgba(0, 0, 0, 0.8);
        z-index: 9999;
        transform: translateX(-100%);
        visibility: hidden; /* Added to prevent blocking clicks */
        pointer-events: none; /* Added to prevent blocking clicks */
        display: flex;
        align-items: flex-start;
        justify-content: flex-start;
        padding: 0;
        overflow-y: auto;
    }
    
    .filters-sidebar.mobile-visible {
        transform: translateX(0);
        visibility: visible;
        pointer-events: auto;
    }
    
    .filters-panel {
        max-width: 400px;
        width: 90%;
        margin: 1rem;
        transform: translateX(-20px);
        opacity: 0;
        transition: all 0.3s ease 0.1s;
        position: static;
        max-height: calc(100vh - 2rem);
    }
    
    .filters-sidebar.mobile-visible .filters-panel {
        transform: translateX(0);
        opacity: 1;
    }

    .discover-container {
        grid-template-columns: 1fr;
    }
}

/* Fermeture en cliquant à côté */
@media (max-width: 1024px) {
    .filters-sidebar::before {
        content: '';
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        cursor: pointer;
    }
    
    .filters-panel {
        position: relative;
        z-index: 1;
    }
}

@media (max-width: 1200px) {
    .discover-container {
        grid-template-columns: 280px 1fr;
        gap: 1.5rem;
    }
}

@media (max-width: 1024px) {
    .discover-container {
        grid-template-columns: 1fr;
        padding: 1.5rem;
    }
    
    .filters-panel {
        position: static;
        max-height: none;
    }
    
    /* Pleine largeur disponible (pas de sidebar) -> on agrandit les cartes */
    .profiles-grid {
        grid-template-columns: repeat(auto-fill, minmax(165px, 1fr));
    }
}

@media (max-width: 768px) {
    .discover-container {
        padding: 1rem;
    }
    
    .profiles-grid {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
        gap: 0.875rem;
    }
    
    .profile-card {
        border-radius: 10px;
    }
    
    .profile-image-container {
        height: 160px;
    }
    
    .profile-info {
        padding: 0.625rem 0.75rem 0.75rem 0.75rem;
    }
    
    .profile-name {
        font-size: 0.95rem;
    }
    
    .profile-location {
        font-size: 0.8rem;
    }
    
    .profile-modal-content {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .results-info {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }
    
    /* Drapeaux plus petits sur mobile */
    .profile-country-flag-main {
        width: 40px;
        height: 30px;
        border-width: 2px;
    }
}

@media (max-width: 480px) {
    .discover-header h1 {
        font-size: 2rem;
    }
    
    .filters-panel {
        padding: 1rem;
    }
    
    .filters-content {
        font-size: 0.9rem;
    }
    
    .filters-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.75rem;
    }
    
    .filters-header h3 {
        font-size: 1.2rem;
    }
    
    #resetFilters {
        width: 100%;
    }
    
    .interests-tags {
        grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
        max-height: 200px;
        gap: 0.5rem;
    }
    
    .tag-text {
        font-size: 0.85rem;
        padding: 0.5rem 0.75rem;
        min-height: 40px;
    }
    
    .profiles-grid {
        grid-template-columns: repeat(auto-fill, minmax(135px, 1fr));
        gap: 0.75rem;
    }
    
    .profile-image-container {
        height: 145px;
    }
    
    .profile-info {
        padding: 0.5rem 0.625rem 0.625rem 0.625rem;
    }
    
    .profile-name {
        font-size: 0.9rem;
    }
    
    .interest-badge,
    .more-interests {
        font-size: 0.65rem;
        padding: 0.18rem 0.45rem;
    }
    
    .profile-modal {
        width: 95%;
        margin: 1rem;
    }
    
    .profile-modal-header,
    .profile-modal-content {
        padding: 1.5rem;
    }
    
    /* Drapeaux encore plus petits sur très petits écrans */
    .profile-country-flag-main {
        width: 36px;
        height: 27px;
        border-width: 2px;
        top: 0.5rem;
        right: 0.5rem;
    }
}

/* ============ RESPONSIVE DESIGN MODALE ============ */

/* Tablettes et écrans moyens */
@media (max-width: 768px) {
    .profile-modal {
        width: 96%;
        max-height: 95vh;
        border-radius: 24px;
    }
    
    .profile-modal-content {
        grid-template-columns: 1fr;
        gap: 1.5rem;
        padding: 1.5rem;
    }
    
    .profile-modal-photos-large {
        position: static;
    }
    
    .main-photo-large,
    .single-photo-large {
        aspect-ratio: 2 / 3;
    }
    
    .additional-photos-grid {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .profile-modal-header {
        padding: 1.5rem;
    }
    
    .profile-modal-header h2 {
        font-size: 1.5rem;
    }
    
    
    .profile-detail {
        padding: 0.8rem;
    }
}

/* Petits écrans - Mobile */
@media (max-width: 480px) {
    .profile-modal-overlay {
        background: radial-gradient(135% 135% at 50% 0%, rgba(10, 10, 20, 0.98) 0%, rgba(0, 0, 0, 0.99) 100%);
    }
    
    .profile-modal {
        width: 100%;
        max-height: 98vh;
        border-radius: 20px;
        box-shadow: 
            0 15px 60px rgba(255, 70, 150, 0.3),
            0 8px 30px rgba(0, 0, 0, 0.25);
    }
    
    .profile-modal-header {
        padding: 1.2rem;
        gap: 0.8rem;
    }
    
    .profile-modal-header h2 {
        font-size: 1.3rem;
        gap: 0.5rem;
    }
    
    .close-profile-modal {
        width: 36px;
        height: 36px;
        font-size: 1.4rem;
    }
    
    .profile-modal-content {
        grid-template-columns: 1fr;
        gap: 1.2rem;
        padding: 1.2rem;
    }
    
    .profile-modal-photos-large {
        gap: 0.8rem;
    }
    
    .main-photo-large,
    .single-photo-large {
        border-radius: 16px;
        aspect-ratio: 3 / 4;
    }
    
    .additional-photos-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 8px;
    }
    
    .gallery-photo-thumb {
        border-radius: 10px;
    }
    
    .profile-modal-info {
        gap: 1.2rem;
    }
    
    
    .profile-detail {
        padding: 0.7rem;
        border-radius: 10px;
    }
    
    .profile-bio,
    .profile-interests-full {
        padding: 1rem;
        border-radius: 10px;
    }
    
    .profile-bio h4,
    .profile-interests-full h4 {
        font-size: 1rem;
        margin-bottom: 0.8rem;
    }
    
    .profile-bio p {
        font-size: 0.9rem;
        line-height: 1.6;
    }
    
    .profile-modal-actions {
        gap: 0.8rem;
        margin-top: 0.8rem;
        padding-top: 1rem;
    }
    
    .profile-modal-actions .btn {
        padding: 0.9rem 0.8rem;
        font-size: 0.85rem;
    }
    
    .interests-list {
        gap: 0.5rem;
    }
}

/* Très petits écrans */
@media (max-width: 360px) {
    .profile-modal-header h2 {
        font-size: 1.1rem;
    }
    
    .detail-label {
        font-size: 0.75rem;
    }
    
    .detail-value {
        font-size: 0.9rem;
    }
    
    .profile-bio p,
    .profile-bio h4 {
        font-size: 0.85rem;
    }
    
    .additional-photos-grid {
        grid-template-columns: 1fr;
    }
}