* { margin: 0; padding: 0; box-sizing: border-box; }

body {
    font-family: Arial, sans-serif;
    background: linear-gradient(180deg, #6B7FE8 0%, #8B9BF5 100%);
    min-height: 100vh;
    display: flex;
    justify-content: center;
}

.container {
    width: 100%;
    max-width: 480px;
    min-height: 100vh;
    background: white;
    position: relative;
}

header {
    background: linear-gradient(180deg, #6B7FE8 0%, #8B9BF5 100%);
    color: white;
    padding: 20px;
    text-align: center;
}

header h1 { font-size: 24px; margin: 0; }

.content {
    padding: 20px;
    padding-bottom: 80px;
    min-height: calc(100vh - 140px);
}

.btn {
    display: block;
    width: 100%;
    padding: 15px;
    margin: 10px 0;
    border: none;
    border-radius: 25px;
    font-size: 16px;
    cursor: pointer;
    text-decoration: none;
    text-align: center;
    background: #ddd;
    color: #333;
}

.btn-primary {
    background: #6B7FE8;
    color: white;
}

input, textarea, select {
    width: 100%;
    padding: 12px;
    margin: 10px 0;
    border: 2px solid #ddd;
    border-radius: 10px;
    font-size: 16px;
}

textarea { min-height: 80px; }

.error {
    background: #FFEBEE;
    color: #FF5252;
    padding: 12px;
    border-radius: 10px;
    margin: 10px 0;
}

/* ========== SWIPE CARDS ========== */
#swipeContainer {
    position: relative;
    height: 500px;
    margin: 20px 0;
}

.card {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border-radius: 20px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.3);
    transition: transform 0.3s ease;
    overflow: hidden;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

.card.no-photo {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.card.no-photo::before {
    content: '👤';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 120px;
    opacity: 0.2;
    z-index: 0;
}

.card-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to bottom, 
        transparent 0%, 
        rgba(0,0,0,0.3) 50%,
        rgba(0,0,0,0.95) 100%);
    z-index: 1;
}

.card-content {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    z-index: 2;
    padding: 25px 20px;
}

.card-content h2 { 
    font-size: 32px;
    font-weight: bold;
    margin: 0 0 12px 0;
    color: white;
    text-shadow: 0 2px 10px rgba(0,0,0,0.8);
}

.card-content p { 
    margin: 6px 0;
    font-size: 16px;
    color: white;
    text-shadow: 0 1px 5px rgba(0,0,0,0.8);
}

.tags-container {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 12px;
}

.tag {
    background: rgba(255,255,255,0.25);
    color: white;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 13px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255,255,255,0.3);
    text-shadow: 0 1px 3px rgba(0,0,0,0.5);
}

/* Boutons de swipe */
.swipe-btns {
    display: flex;
    justify-content: center;
    gap: 30px;
    margin-top: 20px;
}

.btn-yes {
    background: #4CAF50 !important;
    color: white !important;
    width: 70px;
    height: 70px;
    border-radius: 50%;
    font-size: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 4px solid white;
    box-shadow: 0 4px 15px rgba(76,175,80,0.4);
}

.btn-no {
    background: #FF5252 !important;
    color: white !important;
    width: 70px;
    height: 70px;
    border-radius: 50%;
    font-size: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 4px solid white;
    box-shadow: 0 4px 15px rgba(255,82,82,0.4);
}

/* ========== MATCHES ========== */
.match-card {
    display: block;
    background: linear-gradient(135deg, #FF6B9D 0%, #FFA6C9 100%);
    color: white;
    padding: 20px;
    border-radius: 15px;
    margin: 15px 0;
    text-decoration: none;
    position: relative;
}

.match-card h3 { margin: 0 0 5px; }
.match-card p { opacity: 0.9; margin: 0; }

.badge {
    position: absolute;
    top: 20px;
    right: 20px;
    background: #FF5252;
    color: white;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
}

/* ========== CHAT ========== */
.chat { padding: 0; }

.messages {
    padding: 20px;
    max-height: calc(100vh - 200px);
    overflow-y: auto;
}

.msg {
    display: flex;
    margin: 10px 0;
}

.msg.sent {
    justify-content: flex-end;
}

.bubble {
    background: #f0f0f0;
    padding: 12px 16px;
    border-radius: 18px;
    max-width: 70%;
    word-wrap: break-word;
    word-break: break-word;
    overflow-wrap: break-word;
    white-space: pre-wrap;
}

.msg.sent .bubble {
    background: #6B7FE8;
    color: white;
}

.msg-form {
    position: fixed;
    bottom: 60px;
    left: 50%;
    transform: translateX(-50%);
    width: 100%;
    max-width: 480px;
    background: white;
    padding: 15px;
    display: flex;
    gap: 10px;
    box-shadow: 0 -2px 10px rgba(0,0,0,0.1);
}

.msg-form input {
    flex: 1;
    margin: 0;
    border-radius: 25px;
}

.msg-form button {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    padding: 0;
    margin: 0;
}

/* ========== PROFILE ========== */
.photo-box {
    width: 150px;
    height: 150px;
    border-radius: 50%;
    background: #f0f0f0;
    margin: 20px auto;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    overflow: hidden;
}

.photo-box img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.photo-box span {
    color: #999;
    font-size: 14px;
}

/* ========== POPUP ========== */
.popup {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.8);
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.popup-content {
    background: white;
    padding: 30px;
    border-radius: 20px;
    text-align: center;
    max-width: 300px;
}

.popup.active { display: flex; }

/* ========== NAVIGATION ========== */
.nav {
    position: fixed;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 100%;
    max-width: 480px;
    background: white;
    display: flex;
    justify-content: space-around;
    padding: 15px 0;
    box-shadow: 0 -2px 10px rgba(0,0,0,0.1);
}

.nav a {
    font-size: 24px;
    text-decoration: none;
}

@media (max-width: 480px) {
    .container { max-width: 100%; }
}
