*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
img { -webkit-user-drag: none; user-select: none; -webkit-user-select: none; }

:root {
    --primary: #7848A1;
    --primary-dark: #5e3480;
    --primary-light: #8b5cf6;
    --secondary: #ae269e;
    --purple: #7848A1;
    --bg: #f2f2f2;
    --bg-darker: #e4e4e4;
    --bg-card: #ffffff;
    --hover: #ebebeb;
    --text: #2d2d2d;
    --white: #ffffff;
    --gray: #6b7280;
    --border: #d1d5db;
    --success: #10b981;
    --error: #ef4444;
    --radius: 8px;
    --card-bg: #ffffff;
    --text-muted: #6b7280; /* texte secondaire discret (= --gray) : loaders, dates, compteurs */
    --shadow: 0 1px 3px rgba(0, 0, 0, 0.08); /* ombre douce des blocs blancs, cohérente avec le reste du site */
    /* Échelle z-index */
    --z-sticky:   10;
    --z-dropdown: 100;
    --z-fab:      1100;
    --z-nav:      1200;
    --z-modal:    1250;
    --z-filters:  1300;
    --z-lightbox: 1400;
    --z-tiktok:   1500;
    --z-sheet:    1600;
    --z-toast:    1700;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* NAV */
header { background: rgba(120, 72, 161, 0.85); position: sticky; top: 0; z-index: 200; }
.site-banner { background: rgba(243,156,18,0.12); border-bottom: 1px solid rgba(243,156,18,0.35); color: #7a4e00; text-align: center; padding: 0.55rem 1rem; font-size: 0.88rem; font-weight: 500; }
.site-banner-link { color: #7a4e00; font-weight: 700; text-decoration: underline; }
.site-banner-link:hover { color: #5a3900; }
nav {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0.2rem 1rem;
    display: flex;
    align-items: center;
    gap: 1rem;
}
.logo {
    text-decoration: none;
    flex-shrink: 0;
    display: flex;
    align-items: center;
}
.nav-links { display: flex; gap: 1rem; align-items: center; flex: 1; justify-content: center; }
.nav-links a {
    color: rgba(255,255,255,0.85);
    text-decoration: none;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 0.35rem;
    position: relative;
}
.nav-links a svg { flex-shrink: 0; }
.nav-links a:hover { color: var(--white); }
.nav-links a.nav-active { color: #fff; border-bottom: 2px solid #fff; padding-bottom: 0.15rem; }

.nav-home { display: none; }

/* Header avatar + dropdown */
.avatar-menu-wrap { position: relative; flex-shrink: 0; }
.header-avatar-btn {
    background: none; border: none; padding: 0; cursor: pointer; display: block;
}
.header-avatar-wrap { position: relative; width: 42px; height: 42px; }
.header-avatar {
    width: 42px; height: 42px; border-radius: 50%;
    object-fit: cover; border: 2px solid rgba(255,255,255,0.5);
}
.header-avatar-default {
    width: 42px; height: 42px; border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    background: rgba(255,255,255,0.2); color: #fff;
    font-weight: 700; font-size: 0.85rem;
}
.header-avatar-online {
    position: absolute; bottom: -2px; right: -2px;
    width: 14px; height: 14px; border-radius: 50%;
    background: #22c55e; border: 2px solid var(--primary);
}
.badge-certifie-header {
    position: absolute; top: -3px; right: -3px; left: auto;
    width: 14px; height: 14px;
}

.avatar-dropdown {
    display: none;
    position: absolute; top: calc(100% + 8px); right: 0;
    background: var(--white); border: 1px solid var(--border);
    border-radius: var(--radius); box-shadow: 0 4px 16px rgba(0,0,0,0.15);
    min-width: 200px; z-index: var(--z-dropdown);
    padding: 0.3rem 0;
}
.avatar-dropdown.active { display: block; }
.avatar-dropdown-user {
    padding: 0.5rem 1rem;
}
.avatar-dropdown-pseudo {
    font-weight: 600; font-size: 0.9rem; color: var(--text);
}
.avatar-dropdown a {
    display: flex; align-items: center; gap: 0.5rem;
    padding: 0.5rem 1rem; color: var(--text); text-decoration: none;
    font-size: 0.85rem; transition: background 0.15s;
}
.avatar-dropdown a:hover { background: var(--bg); }
.avatar-dropdown a svg { flex-shrink: 0; color: var(--gray); }
.avatar-dropdown-sep { height: 1px; background: var(--border); margin: 0.2rem 0; }
.avatar-dropdown-logout { color: var(--error) !important; }
.avatar-dropdown-logout svg { color: var(--error) !important; }
.avatar-dropdown-mobile { display: none; }

/* MAIN */
main {
    max-width: 1100px;
    margin: 0 auto;
    padding: 1rem 1rem;
    flex: 1;
    width: 100%;
}

/* CAROUSEL MEMBRES */
.membres-carousel { max-width: 600px; margin: 0 auto 1rem; background: var(--white); border-radius: var(--radius); border: 1px solid var(--border); box-shadow: var(--shadow); overflow: hidden; }
.carousel-tabs { display: flex; gap: 0; border-bottom: 1px solid var(--border); }
.carousel-tab { flex: 1; background: none; border: none; padding: 0.55rem 0.5rem; font-size: 0.82rem; font-weight: 600; color: var(--gray); cursor: pointer; border-bottom: 2px solid transparent; margin-bottom: -1px; transition: color 0.15s, border-color 0.15s; }
.carousel-tab.active { color: var(--primary); border-bottom-color: var(--primary); }
.carousel-wrap { position: relative; display: flex; align-items: center; }
.carousel-arrow { flex-shrink: 0; background: none; border: none; color: var(--gray); font-size: 1.6rem; line-height: 1; padding: 0 0.4rem; cursor: pointer; transition: color 0.15s; z-index: 1; }
.carousel-arrow:hover { color: var(--primary); }
.carousel-track { flex: 1; display: flex; gap: 0.5rem; overflow-x: auto; padding: 0.7rem 0.2rem; scroll-snap-type: x mandatory; scrollbar-width: none; -ms-overflow-style: none; }
.carousel-track::-webkit-scrollbar { display: none; }
.ccard { flex: 0 0 82px; scroll-snap-align: start; text-decoration: none; color: inherit; display: flex; flex-direction: column; align-items: center; }
.ccard-photo-wrap { position: relative; width: 68px; height: 68px; flex-shrink: 0; }
.ccard-photo { width: 68px; height: 68px; border-radius: 50%; overflow: hidden; background: var(--bg-darker); }
.ccard-photo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.ccard-online { position: absolute; bottom: 2px; right: 2px; width: 10px; height: 10px; background: #22c55e; border-radius: 50%; border: 2px solid var(--white); }
.ccard-info { margin-top: 0.3rem; text-align: center; width: 100%; }
.ccard-pseudo { font-size: 0.72rem; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: var(--text); }
.ccard-meta { display: flex; align-items: center; justify-content: center; gap: 0.2rem; font-size: 0.65rem; color: var(--gray); margin-top: 0.05rem; }
.ccard-loc { font-size: 0.64rem; color: var(--gray); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-top: 0.05rem; }
.ccard-more-btn { background: var(--bg); display: flex; align-items: center; justify-content: center; border: 2px dashed var(--border); }
.ccard-more-btn svg { stroke: var(--primary); }
.ccard-more:hover .ccard-more-btn { border-color: var(--primary); background: var(--bg-darker); }

/* FIL D'ACTUALITES */
.fil-page { max-width: 600px; margin: 0 auto; }
.fil-header {
    display: flex; align-items: center; gap: 0.8rem;
    background: var(--white);
    border-radius: var(--radius);
    border: 1px solid var(--border);
    box-shadow: 0 1px 3px rgba(0,0,0,0.08);
    padding: 1.2rem 1.5rem;
    margin-bottom: 0.25rem;
}
.fil-header h1 { font-size: 1.2rem; margin: 0; flex: 1; display: flex; align-items: center; gap: 0.5rem; color: var(--text); }
.fil-empty { text-align: center; padding: 3rem 1rem; color: var(--gray); }
.fil-empty svg { margin-bottom: 0.5rem; color: var(--border); }
.fil-list { display: flex; flex-direction: column; gap: 1rem; }
.fil-item {
    background: var(--white); border-radius: var(--radius);
    border: 1px solid var(--border); padding: 1rem;
}
.fil-item-top { display: flex; align-items: center; gap: 0.6rem; margin-bottom: 0.6rem; }
.fil-avatar { position: relative; flex-shrink: 0; text-decoration: none; }
.fil-avatar img, .fil-avatar-default {
    width: 42px; height: 42px; border-radius: 50%;
    object-fit: cover; flex-shrink: 0;
}
.fil-avatar-default {
    display: flex; align-items: center; justify-content: center;
    background: var(--primary); color: #fff;
    font-weight: 700; font-size: 0.9rem;
}
.fil-avatar .msg-online { bottom: -2px; right: -2px; }
.fil-avatar .badge-certifie { position: absolute; top: -2px; right: -2px; }
.fil-item-info { flex: 1; min-width: 0; }
.fil-pseudo {
    font-weight: 600; font-size: 0.95rem; color: var(--text);
    text-decoration: none; display: flex; align-items: center; gap: 0.3rem;
}
.fil-pseudo:hover { text-decoration: underline; }
.fil-meta { font-size: 0.8rem; color: var(--gray); display: flex; align-items: center; gap: 0.3rem; flex-wrap: wrap; }
.fil-text { font-size: 0.9rem; margin: 0 0 0.5rem; color: var(--text); }
.fil-photo { display: block; border-radius: var(--radius); overflow: hidden; }
.fil-photo img { width: 100%; max-height: 400px; object-fit: cover; display: block; }

/* Fil lightbox — bloc membre en bas à gauche */
.fil-lightbox-member {
    position: absolute; bottom: 50px; left: 20px; z-index: 1;
    display: flex; align-items: center; gap: 0.5rem;
}
.fil-lightbox-avatar { width: 36px; height: 36px; border-radius: 50%; overflow: hidden; flex-shrink: 0; text-decoration: none; border: 2px solid rgba(255,255,255,0.6); }
.fil-lightbox-avatar img { width: 100%; height: 100%; object-fit: cover; }
.fil-lightbox-avatar-default {
    width: 100%; height: 100%; background: var(--primary); color: #fff;
    display: flex; align-items: center; justify-content: center;
    font-size: 0.7rem; font-weight: 600;
}
.fil-lightbox-pseudo {
    color: #fff; font-weight: 600; font-size: 0.95rem; text-decoration: none;
    text-shadow: 0 1px 4px rgba(0,0,0,0.7); display: flex; align-items: center; gap: 0.3rem;
}
.fil-lightbox-pseudo:hover { text-decoration: underline; }

/* Fil TikTok viewer (mobile) */
.fil-tiktok {
    display: none; position: fixed; inset: 0; z-index: var(--z-lightbox); background: #000; overflow: hidden;
}
.fil-tiktok.active { display: block; }
.fil-tiktok-slide {
    width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; position: relative;
}
.fil-tiktok-bg {
    position: absolute; inset: 0; background-size: cover; background-position: center;
    filter: blur(30px) brightness(0.3); transform: scale(1.2); pointer-events: none;
}
.fil-tiktok-slide > img {
    position: relative; max-width: 100%; max-height: 100%; object-fit: contain; z-index: 1;
}
.fil-tiktok-member {
    position: absolute; bottom: 4rem; left: 1rem; z-index: 2;
    display: flex; align-items: center; gap: 0.5rem;
}
.fil-tiktok-avatar { width: 36px; height: 36px; border-radius: 50%; overflow: hidden; flex-shrink: 0; text-decoration: none; border: 2px solid #fff; }
.fil-tiktok-avatar img { width: 100%; height: 100%; object-fit: cover; }
.fil-tiktok-avatar-default {
    width: 100%; height: 100%; background: var(--primary); color: #fff;
    display: flex; align-items: center; justify-content: center;
    font-size: 0.7rem; font-weight: 600;
}
.fil-tiktok-pseudo { color: #fff; font-weight: 600; font-size: 0.9rem; text-decoration: none; text-shadow: 0 1px 4px rgba(0,0,0,0.7); display: flex; align-items: center; gap: 0.3rem; }

.fil-tiktok .photo-interactions {
    position: absolute; right: 0.8rem; bottom: 5rem; z-index: 2;
    display: flex; flex-direction: column; align-items: center; gap: 1.2rem;
}
.fil-tiktok .photo-like-btn,
.fil-tiktok .photo-comment-btn,
.fil-tiktok .photo-report-btn {
    background: none; border: none; cursor: pointer;
    display: flex; flex-direction: column; align-items: center; gap: 0.2rem;
    color: #fff; text-shadow: 0 1px 4px rgba(0,0,0,0.7);
}
.fil-tiktok .photo-like-btn svg,
.fil-tiktok .photo-comment-btn svg { width: 26px; height: 26px; stroke: #fff; }
.fil-tiktok .photo-report-btn svg { width: 22px; height: 22px; stroke: #fff; }
.fil-tiktok .photo-like-btn.liked svg { fill: #ff4757; stroke: #ff4757; }
.fil-tiktok .photo-like-count,
.fil-tiktok .photo-comment-count { font-size: 0.75rem; }
.fil-tiktok.active .tiktok-close {
    display: flex; position: fixed; top: 12px; right: 12px; z-index: 1;
}



/* Fil menu dropdown */
.fil-menu-wrap { position: relative; margin-left: auto; flex-shrink: 0; }
.fil-menu-btn {
    background: none; border: none; cursor: pointer;
    color: var(--gray); padding: 0.3rem; border-radius: 50%;
}
.fil-menu-btn:hover { background: var(--bg); color: var(--text); }
.fil-menu-dropdown {
    display: none; position: absolute; top: 100%; right: 0;
    background: var(--white); border: 1px solid var(--border);
    border-radius: var(--radius); box-shadow: 0 4px 16px rgba(0,0,0,0.12);
    min-width: 220px; z-index: var(--z-dropdown); padding: 0.3rem 0;
}
.fil-menu-dropdown.active { display: block; }
.fil-menu-action {
    display: flex; align-items: center; gap: 0.5rem; width: 100%;
    background: none; border: none; padding: 0.55rem 0.8rem;
    font-size: 0.85rem; color: var(--text); cursor: pointer; text-align: left;
}
.fil-menu-action:hover { background: var(--bg); }
.fil-menu-action svg { flex-shrink: 0; color: var(--gray); }
.fil-menu-danger { color: var(--error); }
.fil-menu-danger svg { color: var(--error); }
.fil-menu-sep { height: 1px; background: var(--border); margin: 0.2rem 0; }

.signal-motifs { display: flex; flex-direction: column; gap: 0.4rem; }
.signal-motif {
    display: flex; align-items: center; gap: 0.5rem;
    padding: 0.45rem 0.6rem; border-radius: var(--radius);
    font-size: 0.88rem; cursor: pointer; transition: background 0.15s;
}
.signal-motif:hover { background: var(--bg); }
.signal-motif input[type="radio"] { accent-color: var(--error); }

.fil-actions {
    display: flex; gap: 1rem; padding: 0.4rem 0 0;
    border-top: 1px solid var(--border);
}
.fil-like-btn, .fil-comment-toggle {
    background: none; border: none; cursor: pointer;
    display: flex; align-items: center; gap: 0.3rem;
    color: var(--gray); font-size: 0.85rem;
    padding: 0.3rem 0; transition: color 0.15s;
}
.fil-like-btn:hover { color: #e11d48; }
.fil-like-btn.liked { color: #e11d48; }
.fil-comment-toggle:hover { color: var(--primary); }

.comment-modal-list {
    max-height: 50vh; overflow-y: auto;
    padding: 0.8rem; display: flex; flex-direction: column; gap: 0.5rem;
}
.fil-comment-item {
    display: flex; gap: 0.5rem; align-items: flex-start;
}
.fil-comment-avatar {
    width: 28px; height: 28px; border-radius: 50%;
    object-fit: cover; flex-shrink: 0;
}
.fil-comment-avatar-default {
    width: 28px; height: 28px; border-radius: 50%;
    background: var(--primary); color: #fff;
    display: flex; align-items: center; justify-content: center;
    font-size: 0.65rem; font-weight: 700; flex-shrink: 0;
}
.fil-comment-body {
    background: var(--bg); border-radius: 12px;
    padding: 0.35rem 0.6rem; flex: 1; min-width: 0;
}
.fil-comment-pseudo {
    font-weight: 600; font-size: 0.8rem; color: var(--text);
    text-decoration: none;
}
.fil-comment-pseudo:hover { color: var(--primary); }
.fil-comment-text { font-size: 0.85rem; color: var(--text); margin: 0; word-break: break-word; }
.fil-comment-top { display: flex; justify-content: space-between; align-items: center; }
.fil-comment-date { font-size: 0.7rem; color: var(--gray); margin-top: 0.1rem; }
.comment-report-btn {
    background: none; border: none; cursor: pointer; color: var(--gray);
    padding: 0.15rem; border-radius: 4px; line-height: 1; transition: color 0.15s;
}
.comment-report-btn:hover { color: var(--error); }
.comment-report-bubble {
    position: absolute; right: 0; top: 100%;
    background: var(--white); border: 1px solid var(--border);
    border-radius: var(--radius); box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    padding: 0.6rem 0.8rem; z-index: 10; min-width: 180px;
}
.comment-report-bubble p {
    font-size: 0.82rem; margin: 0 0 0.5rem; color: var(--text);
}
.comment-report-bubble-actions { display: flex; gap: 0.4rem; justify-content: flex-end; }

.fil-comment-form {
    display: flex; gap: 0.4rem; align-items: center;
}
.fil-comment-input {
    flex: 1; border: 1px solid var(--border); border-radius: 20px;
    padding: 0.4rem 0.8rem; font-size: 0.85rem;
    outline: none; transition: border-color 0.15s;
}
.fil-comment-input:focus { border-color: var(--primary); }
.fil-comment-send {
    background: var(--primary); border: none; border-radius: 50%;
    width: 32px; height: 32px; display: flex; align-items: center;
    justify-content: center; cursor: pointer; color: #fff;
    flex-shrink: 0; transition: background 0.15s;
}
.fil-comment-send:hover { background: var(--primary-dark, #6d28d9); }
.emoji-quick { display: flex; gap: 0.15rem; flex-shrink: 0; }
.emoji-btn {
    background: none; border: none; cursor: pointer;
    font-size: 1.2rem; padding: 0.15rem; line-height: 1;
    border-radius: 4px; transition: background 0.15s;
}
.emoji-btn:hover { background: var(--bg); }

/* HERO */
.hero {
    text-align: center;
    padding: 0;
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
}
.hero-overlay {
    max-width: 520px;
    margin: 0 auto;
    background: var(--white);
    padding: 2rem;
    border-radius: var(--radius);
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}
.hero-logo {
    width: 280px;
    height: auto;
    margin-bottom: 0.2rem;
}
.hero-h1 {
    font-size: 0.8rem;
    font-weight: 400;
    font-style: italic;
    color: #9ca3af;
    margin: 0 0 0.5rem;
}
.hero-h1 strong { font-style: normal; }

.hero-tagline {
    font-size: 1rem;
    color: #9ca3af;
    font-weight: 400;
    margin-bottom: 1rem;
    letter-spacing: 0.3px;
}
.hero-text {
    text-align: left;
    margin-bottom: 2rem;
}
.hero-text p {
    color: #4b5563;
    font-size: 0.95rem;
    line-height: 1.8;
    margin-bottom: 1rem;
}
.hero-text p:last-child { margin-bottom: 0; }
.hero-gentlemen {
    font-style: italic;
    color: #9ca3af !important;
    border-left: 2px solid #e5e7eb;
    padding-left: 1rem;
    margin-top: 1rem !important;
}
.hero-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
    margin-top: 2.5rem;
}
.btn-lg { padding: 0.75rem 2rem; font-size: 0.95rem; }

/* BUTTONS */
.btn {
    display: inline-block;
    padding: 0.7rem 1.8rem;
    border-radius: var(--radius);
    text-decoration: none;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    border: none;
    transition: background 0.2s;
}
.btn-primary { background: var(--primary); color: var(--white); }
.btn-primary:hover { background: var(--primary-dark); }
.btn-secondary { background: var(--white); color: var(--primary); border: 2px solid var(--primary); }
.btn-secondary:hover { background: var(--bg); }
.btn-outline { background: var(--white); color: var(--text); border: 1px solid var(--border); }
.btn-outline:hover { background: var(--bg); }

/* FORMS */
.form-page {
    max-width: 520px;
    margin: 0 auto;
    background: var(--white);
    padding: 2rem;
    border-radius: var(--radius);
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}
.form-page h1 { margin-bottom: 1.5rem; font-size: 1.5rem; }
.form-group { margin-bottom: 1rem; }
.form-group label {
    display: block;
    margin-bottom: 0.3rem;
    font-weight: 500;
    font-size: 0.9rem;
}
.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 0.6rem 0.8rem;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    font-size: 1rem;
}
.form-group input:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(120,72,161,0.15);
}

/* PASSWORD TOGGLE */
.input-password-wrapper {
    position: relative;
}
.input-password-wrapper input {
    padding-right: 2.8rem;
}
.btn-toggle-pwd {
    position: absolute;
    right: 0.5rem;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    cursor: pointer;
    color: var(--gray);
    padding: 0.2rem;
    display: flex;
    align-items: center;
}
.btn-toggle-pwd:hover { color: var(--primary); }

/* FORM ROW (2 colonnes) */
.form-row {
    display: flex;
    gap: 1rem;
}
.form-col {
    flex: 1;
    min-width: 0;
}
.form-row .form-group {
    margin-bottom: 0;
}

/* STEPS INDICATOR */
.steps-indicator {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
}
.steps-indicator .step {
    flex: 1;
    text-align: center;
    padding: 0.5rem;
    font-size: 0.85rem;
    font-weight: 500;
    border-radius: var(--radius);
    background: #e5e7eb;
    color: var(--gray);
}
.steps-indicator .step.active {
    background: var(--primary);
    color: var(--white);
}
.steps-indicator .step.done {
    background: var(--success);
    color: var(--white);
}

/* PASSWORD RULES */
.password-rules {
    margin-top: 0.5rem;
}
.rule {
    font-size: 0.8rem;
    color: var(--gray);
    padding: 1px 0;
}
.rule .icon {
    display: inline-block;
    width: 1.2em;
    font-weight: 700;
}
.rule-ok { color: var(--success); }
.rule-ok .icon { color: var(--success); }
.rule-ko { color: #9ca3af; }
.rule-ko .icon { color: var(--error); }

/* FORM SEPARATOR */
.form-separator {
    border-top: 1px solid var(--border);
    margin: 1.5rem 0;
}

/* BUTTON FULL WIDTH */
.btn-full {
    width: 100%;
    text-align: center;
    margin-top: 0.5rem;
}
.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* FORM PAGE WIDE (step 2) */
.form-page-wide {
    max-width: 520px;
}

/* FIELDSETS */
.form-fieldset {
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.2rem 1rem 0.8rem;
    margin-bottom: 1.5rem;
}
.form-fieldset legend {
    font-weight: 600;
    font-size: 1rem;
    color: var(--primary);
    padding: 0 0.4rem;
}

/* COUPLE 2-COLUMN LAYOUT */
.couple-cols {
    display: flex;
    gap: 1.5rem;
}
.couple-col {
    flex: 1;
    min-width: 0;
}
.couple-col-title {
    text-align: center;
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--primary-dark);
    margin-bottom: 0.8rem;
    padding-bottom: 0.4rem;
    border-bottom: 2px solid var(--primary);
}

/* CHECKBOX GRID (recherche) */
.checkbox-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.5rem 1rem;
}
.checkbox-grid .checkbox-label {
    font-size: 0.88rem;
}

/* EMOJI BAR */
.emoji-bar {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.2rem;
    padding: 0.4rem;
    background: #f9f5ff;
    border: 1px solid var(--border);
    border-top: none;
    border-radius: 0 0 var(--radius) var(--radius);
}
.emoji-bar button {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 1.25rem;
    padding: 0.15rem 0.3rem;
    border-radius: 4px;
    transition: background 0.15s;
    line-height: 1;
}
.emoji-bar button:hover {
    background: rgba(120,72,161,0.15);
}
textarea.has-emoji-bar {
    border-bottom-left-radius: 0;
    border-bottom-right-radius: 0;
}

/* TEXTAREA */
.form-group textarea {
    resize: vertical;
    min-height: 100px;
    font-family: inherit;
}
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(120,72,161,0.15);
}

/* FORM EXTRAS */
.required { color: var(--error); }
.form-hint { display: block; margin-top: 0.3rem; font-size: 0.8rem; color: var(--gray); }
.checkbox-label {
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
    font-size: 0.9rem;
    cursor: pointer;
}
.checkbox-label input[type="checkbox"] {
    width: auto;
    margin-top: 0.25rem;
}
.checkbox-label a { color: var(--primary); }
.form-link { text-align: center; margin-top: 0.8rem; font-size: 0.9rem; }
.form-link a { color: var(--primary); }
.btn-link { background: none; border: none; color: var(--primary); cursor: pointer; font-size: 0.9rem; text-decoration: underline; padding: 0; }

/* ALERTS */
.alert {
    position: fixed;
    bottom: 5rem;
    left: 50%;
    transform: translateX(-50%) translateY(1rem);
    background: #1e1e1e;
    color: #fff;
    padding: 0.7rem 1.4rem;
    border-radius: 8px;
    font-size: 0.9rem;
    z-index: var(--z-toast);
    opacity: 0;
    transition: opacity 0.3s, transform 0.3s;
    pointer-events: none;
    box-shadow: 0 4px 12px rgba(0,0,0,0.3);
    max-width: 90vw;
    text-align: center;
}
.alert.show { opacity: 1; transform: translateX(-50%) translateY(0); }
.alert-success { background: rgba(30,30,30,0.9); }
.alert-error { background: rgba(153,27,27,0.9); }

/* PROFIL PAGE */
.profil-page {
    max-width: 620px;
    margin: 0 auto;
    background: var(--white);
    border-radius: var(--radius);
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}
.profil-header {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 1rem;
    padding: 1.5rem;
    border-bottom: 1px solid var(--border);
    overflow: visible;
    position: relative;
    z-index: var(--z-sticky);
}
.profil-avatar img,
.profil-avatar-default {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    object-fit: cover;
}
.profil-avatar-default {
    background: var(--primary);
    color: var(--white);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.6rem;
    font-weight: 700;
    letter-spacing: 1px;
}
.avatar-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 26px;
    background: rgba(0,0,0,0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 0 0 50% 50%;
    opacity: 0;
    transition: opacity 0.2s;
    color: #fff;
}
.profil-avatar:hover .avatar-overlay { opacity: 1; }
.avatar-menu {
    position: absolute;
    top: calc(100% + 6px);
    left: 50%;
    transform: translateX(-50%);
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: 0 4px 16px rgba(0,0,0,0.13);
    z-index: var(--z-dropdown);
    min-width: 160px;
    overflow: hidden;
}
.avatar-menu button {
    display: block;
    width: 100%;
    padding: 0.6rem 1rem;
    background: none;
    border: none;
    text-align: left;
    font-size: 0.9rem;
    cursor: pointer;
    color: var(--text);
}
.avatar-menu button:hover { background: var(--bg); color: var(--primary); }
.profil-identity { flex: 1; }
.profil-identity h1 { font-size: 1.4rem; margin-bottom: 0; line-height: 1.2; }
.profil-contact { width: 100%; display: flex; gap: 0.3rem; flex-wrap: wrap; margin-top: 0.2rem; justify-content: flex-start; }
.profil-contact .btn,
.profil-contact .btn-coup-de-coeur { display: flex; align-items: center; gap: 0.3rem; font-size: 0.8rem; padding: 0.35rem 0.6rem; white-space: nowrap; }
#btnBloquer span, #btnSignaler span { display: none; }
#btnBloquer, #btnSignaler { padding: 0.35rem 0.5rem; }
.btn-coup-de-coeur {
    display: flex;
    align-items: center;
    gap: 0.3rem;
    padding: 0.35rem 0.6rem;
    border-radius: var(--radius);
    border: 1px solid #ef4444;
    background: #fff;
    color: #ef4444;
    font-size: 0.8rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}
.btn-coup-de-coeur svg { fill: #ef4444; stroke: #ef4444; }
.btn-coup-de-coeur:hover { background: #ef4444; color: #fff; border-color: #ef4444; }
.btn-coup-de-coeur:hover svg { fill: #fff; stroke: #fff; }
.btn-coup-de-coeur.sent {
    background: #f3f4f6;
    color: #b0b0b0;
    border-color: #e5e7eb;
    cursor: default;
    opacity: 0.6;
}
.btn-coup-de-coeur.sent svg { fill: #d1d5db; stroke: #d1d5db; }
.btn-coup-de-coeur.sent:hover { background: #f3f4f6; color: #b0b0b0; border-color: #e5e7eb; }
.btn-coup-de-coeur.sent:hover svg { fill: #d1d5db; stroke: #d1d5db; }
.btn-coup-de-coeur:disabled { opacity: 0.6; }
.profil-location { font-size: 0.88rem; color: var(--gray); margin: 0; line-height: 1.3; }
.profil-infos-line { display: flex; flex-wrap: wrap; align-items: center; gap: 0.4rem; margin: 0.1rem 0 0; }
.profil-age-inline { font-size: 0.93rem; font-weight: 500; color: var(--text); }
.profil-genre-icon { display: inline-flex; align-items: center; background: none !important; padding: 0; border: none; }
.profil-genre-icon.badge-homme { color: #3b82f6; }
.profil-genre-icon.badge-femme { color: #ec4899; }
.profil-genre-icon.badge-trans_femme, .profil-genre-icon.badge-trans_homme { color: #f97316; }
.profil-genre-icon.badge-groupe { color: #8b5cf6; }
.profil-sexualite { font-size: 0.9rem; color: var(--text); }
.profil-badges { display: flex; flex-wrap: wrap; gap: 0.4rem; margin-top: 0.15rem; }

/* BADGES */
.badge {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.15rem 0.5rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
}
.badge svg { flex-shrink: 0; vertical-align: middle; }
.badge-sexualite { background: var(--secondary); color: var(--white); }
.badge-certifie { background: var(--success); color: var(--white); }
.badge-role { gap: 0.2rem; }
.badge-admin, .badge-superadmin, .badge-moderateur { display:inline-flex; align-items:center; padding:0.1rem 0.45rem; border-radius:20px; font-size:0.7rem; font-weight:600; vertical-align:middle; margin-left:0.3rem; }
.badge-admin, .badge-superadmin { background: #dc2626; color: #fff; }
.badge-moderateur { background: #0891b2; color: #fff; }

/* PROFIL SECTIONS */
.profil-section {
    padding: 1rem;
    margin: 0.4rem 0.6rem;
    background: #faf8fc;
    border-radius: var(--radius);
    border: 1px solid #ede9f3;
}
.profil-section:last-child { margin-bottom: 0.6rem; }
.profil-section-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
}
.profil-section-head h2 {
    font-size: 0.95rem;
    color: var(--primary);
    margin: 0;
}
.profil-section h2 {
    font-size: 0.95rem;
    color: var(--primary);
    margin-bottom: 0.5rem;
}
.profil-section h3 {
    font-size: 0.85rem;
    color: var(--primary-dark);
    margin-bottom: 0.3rem;
    text-align: center;
}
.btn-edit {
    background: none;
    border: 1px solid var(--primary);
    color: var(--primary);
    padding: 0.2rem 0.7rem;
    border-radius: 20px;
    font-size: 0.78rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}
.btn-edit:hover {
    background: var(--primary);
    color: var(--white);
}
.profil-text { font-size: 0.9rem; line-height: 1.45; white-space: pre-line; }
.profil-text-clamp { display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden; }
.profil-text-clamp.expanded { -webkit-line-clamp: unset; overflow: visible; }
.btn-lire-plus { background: none; border: none; color: var(--text); font-size: 0.9rem; font-weight: 600; cursor: pointer; padding: 0.3rem 0 0; text-decoration: underline; }
.btn-lire-plus:hover { color: var(--primary); }
.profil-empty { font-size: 0.9rem; color: var(--gray); font-style: italic; }
.profil-cols { display: flex; gap: 2rem; }
.profil-col { flex: 1; }

/* PROFIL TABS */
.profil-tabs {
    display: flex;
    border-bottom: 2px solid var(--border);
    padding: 0;
}
.profil-tab {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    padding: 0.8rem 0.4rem;
    background: none;
    border: none;
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--gray);
    cursor: pointer;
    position: relative;
    flex: 1;
    transition: color 0.2s;
}
.profil-tab svg { opacity: 0.6; }
.profil-tab:hover { color: var(--text); }
.profil-tab.active {
    color: var(--primary);
    font-weight: 600;
}
.profil-tab.active svg { opacity: 1; stroke: var(--primary); }
.profil-tab.active::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0; right: 0;
    height: 2px;
    background: var(--primary);
    border-radius: 2px 2px 0 0;
}
.tab-count {
    background: var(--primary);
    color: var(--white);
    font-size: 0.7rem;
    font-weight: 600;
    padding: 0.1rem 0.4rem;
    border-radius: 10px;
    min-width: 18px;
    text-align: center;
}
.profil-tab-content { display: none; }
.profil-tab-content.active { display: block; padding-bottom: 0.1rem; }
.tem-send-bar { text-align: center; padding: 1rem 0 0.5rem; }
@media (max-width: 768px) {
    .tem-send-bar {
        position: sticky;
        bottom: 64px;
        padding: 0.6rem 1rem;
        background: rgba(255,255,255,0.95);
        backdrop-filter: blur(6px);
        border-top: 1px solid var(--border);
        z-index: 50;
        text-align: center;
    }
    .tem-send-bar .btn { width: 100%; max-width: 360px; }
}

/* MEDIAS TAB */
.medias-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.5rem;
    padding: 0.8rem;
}
.media-card {
    position: relative;
    border-radius: var(--radius);
    overflow: hidden;
    border: 2px solid transparent;
}
.media-card img {
    width: 100%;
    aspect-ratio: 1;
    object-fit: cover;
    display: block;
    cursor: pointer;
    transition: transform 0.2s;
}
.media-card:hover img { transform: scale(1.03); }
.media-card.media-avatar { border-color: var(--primary); }
.media-actions {
    position: absolute;
    top: 0; right: 0;
    display: flex;
    gap: 0.2rem;
    padding: 0.3rem;
    opacity: 0;
    transition: opacity 0.2s;
}
.media-card:hover .media-actions { opacity: 1; }
.medias-empty {
    text-align: center;
    padding: 1rem 0.8rem;
    color: var(--gray);
}
.medias-empty svg { width: 28px; height: 28px; }
.medias-empty p { margin: 0.15rem 0 0; font-size: 0.85rem; }
.medias-upload { padding: 0.8rem; }

/* SETTINGS TAB */
.settings-actions { display: flex; flex-direction: column; gap: 0.5rem; }
.profil-section-head + .settings-toggle-row { margin-top: -0.3rem; }
.settings-toggle-row {
    display: flex; justify-content: space-between; align-items: center;
    padding: 0.2rem 0; font-size: 0.85rem;
}
.toggle-switch {
    position: relative; display: inline-block; width: 36px; height: 20px; flex-shrink: 0;
}
.toggle-switch input { opacity: 0; width: 0; height: 0; }
.toggle-slider {
    position: absolute; cursor: pointer; inset: 0;
    background: #ccc; border-radius: 20px; transition: 0.2s;
}
.toggle-slider::before {
    content: ''; position: absolute; width: 14px; height: 14px;
    left: 3px; bottom: 3px; background: #fff; border-radius: 50%; transition: 0.2s;
}
.toggle-switch input:checked + .toggle-slider { background: var(--primary); }
.toggle-switch input:checked + .toggle-slider::before { transform: translateX(16px); }
.btn-danger { background: var(--error); color: var(--white); }
.btn-danger:hover { background: #dc2626; }
.btn-warning { background: #f59e0b; color: #fff; }
.btn-warning:hover { background: #d97706; }
.radio-motif { display: flex; align-items: center; gap: 0.5rem; padding: 0.35rem 0.5rem; border-radius: var(--radius); font-size: 0.9rem; cursor: pointer; }
.radio-motif:hover { background: var(--hover); }
.radio-motif input { accent-color: #f59e0b; }
.btn-disabled { opacity: 0.5; cursor: default; pointer-events: none; }
.profil-danger { border-color: #fecaca; background: #fef2f2; }
.profil-danger h2 { color: var(--error); }

/* ABONNEMENT TAB */
.abo-features {
    list-style: none;
    text-align: left;
    max-width: 280px;
    margin: 0 auto;
}
.abo-features li {
    padding: 0.4rem 0;
    font-size: 0.9rem;
    border-bottom: 1px solid #f3f4f6;
}
.abo-features li::before {
    content: '\2713';
    color: var(--success);
    font-weight: 700;
    margin-right: 0.5rem;
}

/* PROFIL ABOUT */
.profil-about {
    background: var(--white);
    border: none;
    border-top: 1px solid var(--border);
    border-radius: 0;
    margin: 0;
    padding: 1.2rem 1.5rem;
}
.profil-about h2 { margin-bottom: 0.8rem; }
.profil-about .profil-dl dt { min-width: 200px; }

/* DL (key/value) */
.profil-dl { display: grid; grid-template-columns: auto 1fr; gap: 0.15rem 0.8rem; font-size: 0.88rem; }
.profil-dl dt { color: var(--gray); display: flex; align-items: center; gap: 0.4rem; }
.profil-dl dt svg { flex-shrink: 0; }
.profil-dl dd { margin: 0; font-weight: 600; }
.dd-with-action { display: flex; align-items: center; gap: 0.4rem; }
.btn-edit-inline { background: none; border: none; color: var(--primary); cursor: pointer; padding: 2px; border-radius: 4px; display: inline-flex; align-items: center; }
.btn-edit-inline:hover { background: var(--hover); }

/* TAGS */
.profil-tags { display: flex; flex-wrap: wrap; gap: 0.3rem; }
.tag {
    display: inline-block;
    padding: 0.2rem 0.6rem;
    background: #f3edfc;
    color: var(--primary-dark);
    border-radius: 20px;
    font-size: 0.8rem;
}
.tag-recherche { background: #fce7f3; color: #9d174d; }

/* MODAL */
.modal-overlay {
    display: none;
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,0.5);
    z-index: var(--z-modal);
    align-items: center;
    justify-content: center;
    padding: 1rem;
}
.modal-overlay.active {
    display: flex;
}
.modal {
    background: var(--white);
    border-radius: var(--radius);
    width: 100%;
    max-width: 520px;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    box-shadow: 0 8px 30px rgba(0,0,0,0.2);
    animation: modal-in 0.2s ease-out;
}
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes modal-in {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}
.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 1.2rem;
    flex-shrink: 0;
    border-bottom: 1px solid var(--border);
}
.modal-header h3 {
    font-size: 1.1rem;
    color: var(--primary);
    margin: 0;
}
.modal-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    color: var(--gray);
    cursor: pointer;
    padding: 0 0.3rem;
    line-height: 1;
}
.modal-close:hover { color: var(--text); }
.modal > form {
    display: flex;
    flex-direction: column;
    flex: 1;
    min-height: 0;
    overflow: hidden;
}
.modal-body {
    padding: 1.2rem;
    overflow-y: auto;
    flex: 1;
    min-height: 0;
}
.legal-text { font-size: 0.9rem; line-height: 1.7; color: var(--text); }
.legal-text h4 { font-size: 0.95rem; color: var(--primary); margin: 1.4rem 0 0.5rem; }
.legal-text h4:first-child { margin-top: 0; }
.legal-text p { margin: 0.5rem 0; }
.legal-text ul { margin: 0.4rem 0 0.8rem 1.2rem; padding: 0; }
.legal-text li { margin-bottom: 0.3rem; }
.legal-text .legal-update { font-size: 0.82rem; color: var(--gray); font-style: italic; margin-bottom: 1rem; }
.legal-text .legal-right { background: var(--bg); border-radius: var(--radius); padding: 0.8rem 1rem; margin-bottom: 0.6rem; }
.legal-text .legal-right h4 { margin-top: 0; }
.legal-text .legal-right p { margin: 0.3rem 0 0; }
.legal-table { width: 100%; border-collapse: collapse; margin: 0.6rem 0 1rem; font-size: 0.85rem; }
.legal-table th, .legal-table td { border: 1px solid var(--border); padding: 0.5rem 0.6rem; text-align: left; }
.legal-table th { background: var(--bg); font-weight: 600; color: var(--primary); }
.legal-text a { color: var(--primary); }
.modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 0.6rem;
    padding: 0.8rem 1.2rem;
    border-top: 1px solid var(--border);
    flex-shrink: 0;
}
.modal-footer .btn { padding: 0.5rem 1.2rem; font-size: 0.9rem; }
.modal-subtitle {
    font-weight: 600;
    font-size: 0.95rem;
    color: var(--primary-dark);
    margin-bottom: 0.6rem;
    text-align: center;
}
.modal-sep {
    border: none;
    border-top: 1px solid var(--border);
    margin: 1rem 0;
}

/* INSCRIPTION OK */
.inscription-ok {
    text-align: center;
    padding: 1rem 0;
}
.inscription-ok-icon {
    font-size: 3rem;
    margin-bottom: 0.5rem;
}
.inscription-ok h1 {
    color: var(--success);
    margin-bottom: 1rem;
}
.inscription-ok p {
    margin-bottom: 0.8rem;
    font-size: 0.95rem;
}
.dev-bypass {
    margin-top: 1.5rem;
    padding-top: 1rem;
    border-top: 2px dashed var(--border);
    text-align: center;
}
.dev-bypass p {
    margin-bottom: 0.8rem;
    font-size: 0.85rem;
    color: var(--gray);
}

/* PHOTOS PAGE */
.photos-page { max-width: 580px; }
.photos-page h1 { margin-bottom: 0.3rem; }
.photos-count { font-size: 0.85rem; color: var(--gray); margin-bottom: 1.2rem; }
.photos-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.6rem;
    margin-bottom: 1.5rem;
}
.photo-card {
    position: relative;
    border-radius: var(--radius);
    overflow: hidden;
    border: 2px solid transparent;
    transition: border-color 0.2s;
}
.photo-card img {
    width: 100%;
    aspect-ratio: 1;
    object-fit: cover;
    display: block;
}
.photo-card.photo-avatar { border-color: var(--primary); }
.photo-actions {
    position: absolute;
    top: 0; right: 0;
    display: flex;
    gap: 0.2rem;
    padding: 0.3rem;
    opacity: 0;
    transition: opacity 0.2s;
}
.photo-card:hover .photo-actions { opacity: 1; }
.photo-action-form { margin: 0; }
.photo-btn {
    width: 28px; height: 28px;
    border-radius: 50%;
    border: none;
    cursor: pointer;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255,255,255,0.9);
    color: var(--gray);
    transition: all 0.15s;
}
.photo-btn:hover { background: var(--white); color: var(--primary); }
.photo-btn-active { color: var(--primary); cursor: default; }
.photo-btn-delete:hover { color: var(--error); }
.photo-badge-avatar {
    position: absolute;
    bottom: 0.3rem; left: 0.3rem;
    background: var(--primary);
    color: var(--white);
    font-size: 0.65rem;
    font-weight: 600;
    padding: 0.1rem 0.4rem;
    border-radius: 10px;
}
.photos-empty {
    text-align: center;
    padding: 2rem 1rem;
    color: var(--gray);
    font-size: 0.95rem;
}
.photos-empty p { margin-bottom: 0.3rem; }
.photos-upload { margin-bottom: 1.2rem; }
.upload-zone {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    border: 2px dashed var(--border);
    border-radius: var(--radius);
    cursor: pointer;
    transition: all 0.2s;
    text-align: center;
}
.upload-zone:hover, .upload-zone-drag {
    border-color: var(--primary);
    background: #faf5ff;
}
.upload-icon { font-size: 2rem; color: var(--primary); font-weight: 300; line-height: 1; }
.upload-text { font-weight: 500; margin-top: 0.3rem; }
.upload-hint { font-size: 0.8rem; color: var(--gray); margin-top: 0.2rem; }
.upload-preview { text-align: center; }
.upload-preview img {
    max-width: 100%;
    max-height: 300px;
    border-radius: var(--radius);
    margin-bottom: 0.8rem;
}
.upload-preview-actions { display: flex; gap: 0.6rem; justify-content: center; }
.upload-preview-actions .btn { padding: 0.5rem 1.2rem; font-size: 0.9rem; }
.photos-back { text-align: center; margin-top: 1rem; }
.upload-preview-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0.4rem; margin-top: 0.5rem; max-height: 220px; overflow-y: auto; }
.upload-thumb { position: relative; padding-top: 100%; overflow: hidden; border-radius: 6px; background: var(--bg-darker); }
.upload-thumb img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; }
.upload-limit-msg { background: #fef3c7; border: 1px solid #fbbf24; border-radius: 6px; padding: 0.6rem 0.8rem; font-size: 0.85rem; color: #92400e; margin-bottom: 0.6rem; text-align: center; }
.upload-progress-bar-wrap { height: 6px; background: var(--bg-darker); border-radius: 3px; overflow: hidden; }
.upload-progress-bar { height: 100%; background: var(--primary); border-radius: 3px; transition: width 0.3s ease; width: 0%; }

/* PROFIL PHOTOS GRID */
.profil-photos-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0.4rem;
}
.profil-photo-link {
    display: block;
    border-radius: 6px;
    overflow: hidden;
}
.profil-photo-link img {
    width: 100%;
    aspect-ratio: 1;
    object-fit: cover;
    display: block;
    transition: transform 0.2s;
}
.profil-photo-link:hover img { transform: scale(1.05); }

/* FOOTER */
footer {
    text-align: center;
    padding: 1.5rem;
    color: var(--gray);
    font-size: 0.85rem;
}
footer p { margin: 0; }
.footer-links { margin-bottom: 0.35rem !important; }
.footer-links a { font-weight: 700; }
.footer-copy { color: var(--gray); }
footer a {
    color: var(--gray);
    text-decoration: none;
}
footer a:hover {
    color: var(--primary);
    text-decoration: underline;
}

/* AUTOCOMPLETE */
.autocomplete-wrapper {
    position: relative;
}
.suggestions-list {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--white);
    border: 1px solid var(--border);
    border-top: none;
    border-radius: 0 0 var(--radius) var(--radius);
    list-style: none;
    max-height: 220px;
    overflow-y: auto;
    z-index: var(--z-dropdown);
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}
.suggestions-list li {
    padding: 0.5rem 0.8rem;
    cursor: pointer;
    font-size: 0.9rem;
    border-bottom: 1px solid #f3f4f6;
}
.suggestions-list li:last-child { border-bottom: none; }
.suggestions-list li:hover {
    background: var(--bg);
    color: var(--primary);
}

/* AIDE */
.aide-page { max-width: 700px; overflow: hidden; }
.aide-page h1 { font-size: 1.2rem; margin: -2rem -2rem 1.2rem; padding: 1.2rem 1.5rem; color: var(--text); display: flex; align-items: center; gap: 0.5rem; border-bottom: 1px solid var(--border); }
.aide-page h1 svg { flex-shrink: 0; }
.aide-back { margin-left: auto; font-size: 0.82rem; font-weight: 400; color: var(--gray); text-decoration: none; white-space: nowrap; }
.aide-back:hover { color: var(--primary); }
.aide-nav {
    display: flex;
    gap: 0;
    border-bottom: 2px solid #f3f4f6;
    margin-bottom: 1rem;
    overflow-x: auto;
    position: sticky;
    top: 2.2rem;
    background: #fff;
    z-index: var(--z-sticky);
}
.aide-nav-link {
    padding: 0.5rem 1rem;
    font-size: 0.85rem;
    color: #6b7280;
    text-decoration: none;
    border-bottom: 2px solid transparent;
    margin-bottom: -2px;
    white-space: nowrap;
}
.aide-nav-link:hover { color: var(--primary); }
.aide-nav-link.active {
    color: var(--primary);
    border-bottom-color: var(--primary);
    font-weight: 600;
}
.aide-section h2 {
    font-size: 1.05rem;
    margin-bottom: 0.6rem;
    color: #1f2937;
}
.aide-engagement, .aide-block {
    margin-bottom: 0.6rem;
    padding-bottom: 0.6rem;
    border-bottom: 1px solid #f3f4f6;
}
.aide-engagement:last-child, .aide-block:last-child { border-bottom: none; }
.aide-engagement h2, .aide-engagement h3, .aide-block h2, .aide-block h3 {
    font-size: 0.95rem;
    color: var(--primary);
    margin-bottom: 0.2rem;
}
.aide-engagement p, .aide-block p, .aide-block li {
    font-size: 0.88rem;
    color: #4b5563;
    line-height: 1.5;
}
.aide-block ul {
    margin: 0.3rem 0;
    padding-left: 1.5rem;
}
.aide-block li { margin-bottom: 0.15rem; }
.aide-block a, .aide-faq a {
    color: var(--primary);
    text-decoration: underline;
}
.aide-block a:hover, .aide-faq a:hover {
    color: var(--hover);
}
.aide-important {
    font-weight: 600;
    font-size: 1rem;
    color: #dc2626 !important;
    text-align: center;
    margin-top: 1rem;
}
.aide-important-link {
    color: inherit !important;
    text-decoration: underline;
}
.aide-quote {
    font-style: italic;
    color: #6b7280 !important;
    border-left: 3px solid var(--primary);
    padding-left: 1rem;
}
.aide-faq {
    margin-bottom: 0.3rem;
    border: 1px solid #f3f4f6;
    border-radius: 6px;
}
.aide-faq summary {
    padding: 0.5rem 1rem;
    font-size: 0.88rem;
    font-weight: 500;
    cursor: pointer;
    color: #1f2937;
}
.aide-faq summary:hover { color: var(--primary); }
.aide-faq[open] summary { border-bottom: 1px solid #f3f4f6; }
.aide-faq p {
    padding: 0.3rem 1rem;
    font-size: 0.85rem;
    color: #4b5563;
    line-height: 1.5;
    margin: 0;
}

/* Aide — pages éclatées (breadcrumb, intro, hub, cross-links) */
.aide-breadcrumb { font-size: 0.82rem; margin: 0 0 0.3rem; }
.aide-breadcrumb a { color: var(--gray); text-decoration: none; }
.aide-breadcrumb a:hover { color: var(--primary); }
.aide-intro { font-size: 0.92rem; color: #4b5563; line-height: 1.55; margin: 0.2rem 0 1.2rem; }
.aide-hub {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.7rem;
    margin-top: 0.6rem;
}
.aide-hub-card {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    padding: 1rem;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: #faf8fc;
    text-decoration: none;
    color: var(--text);
    transition: box-shadow 0.15s, border-color 0.15s;
}
.aide-hub-card:hover { box-shadow: 0 4px 16px rgba(120,72,161,0.12); border-color: var(--primary); }
.aide-hub-card svg { color: var(--primary); }
.aide-hub-title { font-weight: 700; font-size: 0.95rem; }
.aide-hub-desc { font-size: 0.8rem; color: var(--gray); line-height: 1.4; }
.aide-cross {
    margin-top: 1.4rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border);
    font-size: 0.85rem;
    display: flex;
    flex-wrap: wrap;
    gap: 0.15rem 0.3rem;
    align-items: center;
    justify-content: center;
}
.aide-cross span { color: var(--gray); }
.aide-cross a { color: var(--primary); text-decoration: none; font-weight: 600; }
.aide-cross a:hover { text-decoration: underline; }
@media (max-width: 640px) {
    .aide-hub { grid-template-columns: 1fr; }
}

/* RESPONSIVE */
@media (max-width: 640px) {
    .hero { align-items: stretch; padding: 0.5rem; }
    .hero-overlay { padding: 1.2rem; display: flex; flex-direction: column; max-height: calc(100vh - 160px); overflow: hidden; }
    .hero-logo { width: 200px; }
    .hero-tagline { font-size: 0.9rem; margin-bottom: 1.8rem; }
    .hero-text { overflow-y: auto; flex: 1; min-height: 0; margin-bottom: 1rem; padding-right: 0.2rem; }
    .hero-text p { font-size: 0.9rem; line-height: 1.7; }
    .hero-actions { flex-direction: column; align-items: center; gap: 0.8rem; flex-shrink: 0; margin-top: 0; }
    .btn-lg { width: 100%; max-width: 300px; text-align: center; }
    .form-page { padding: 1.2rem; }
    .aide-page h1 { margin: -1.2rem -1.2rem 1rem; padding: 1rem; }
    .aide-back-full { display: none; }
    .form-row { flex-direction: column; gap: 0; }
    .couple-cols { flex-direction: column; gap: 1rem; }
    .checkbox-grid { grid-template-columns: 1fr; }
    .profil-header { flex-wrap: wrap; }
    .profil-infos-line { flex-wrap: nowrap; gap: 0.25rem; }
    .profil-age-inline { font-size: 0.82rem; white-space: nowrap; }
    .profil-sexualite { font-size: 0.8rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
    .profil-contact span { display: none; }
    .profil-contact .btn, .profil-contact .btn-coup-de-coeur { padding: 0.4rem; gap: 0; }
    .profil-cols { flex-direction: column; gap: 0.5rem; }
    .profil-section { padding: 0.7rem 0.8rem; margin: 0.3rem 0.4rem; }
    .modal-overlay { padding: 0.5rem; align-items: flex-start; overflow-y: auto; padding-bottom: 70px; }
    .modal { max-height: none; margin: 0.5rem 0; }
    .modal-body { overflow-y: visible; padding: 0.8rem; }
    .modal-header { padding: 0.7rem 1rem; }
    .modal-header h3 { font-size: 1rem; }
    .modal-footer { padding: 0.6rem 1rem; }
    .profil-about .profil-dl dt { min-width: auto; }
    .albums-grid { grid-template-columns: repeat(2, 1fr); gap: 0.7rem; }
    .album-page-header { flex-direction: column; }

    /* Header mobile */
    header nav { padding: 0.2rem 1rem; gap: 0.5rem; }
    header .logo { display: flex; margin-left: auto; }
    .avatar-menu-wrap { order: -1; }
    .avatar-dropdown { right: auto; left: 0; }
    .avatar-dropdown-mobile { display: flex !important; }
    .header-avatar-wrap { width: 40px; height: 40px; }
    .header-avatar { width: 40px; height: 40px; }
    .header-avatar-default { width: 40px; height: 40px; font-size: 0.9rem; }
    .header-avatar-online { width: 14px; height: 14px; }
    /* Barre de navigation en bas */
    header .nav-links {
        display: flex !important;
        position: fixed;
        bottom: 0;
        left: 0;
        width: 100%;
        background: var(--primary);
        justify-content: space-around;
        align-items: center;
        padding: 0.5rem 0;
        gap: 0;
        z-index: var(--z-nav);
        border-top: 1px solid rgba(255,255,255,0.15);
        box-shadow: 0 -2px 10px rgba(0,0,0,0.15);
    }
    .nav-links a {
        flex-direction: column;
        gap: 0;
        font-size: 0;
        padding: 0.3rem 0.6rem;
        color: rgba(255,255,255,0.7);
    }
    .nav-links a svg { width: 24px; height: 24px; }
    .nav-links a:hover,
    .nav-links a:active { color: #fff; }
    .nav-links a.nav-active { color: #fff; border-bottom: none; padding-bottom: 0; }
    .nav-label { display: none; }
    .nav-home { display: flex; }
    .nav-contacts { display: none !important; }

    /* Onglets profil : icônes seules */
    .profil-tabs { justify-content: space-around; padding: 0; }
    .profil-tab { padding: 0.7rem 0.8rem; gap: 0; }
    .profil-tab svg { width: 22px; height: 22px; }
    .tab-label { display: none; }

    /* Espace pour la barre du bas */
    body { padding-bottom: 60px; }
    footer { padding: 0.5rem 1rem 60px; }
}

/* Lightbox */
.lightbox {
    display: none;
    position: fixed;
    inset: 0;
    z-index: var(--z-lightbox);
    background: rgba(0, 0, 0, 0.92);
    justify-content: center;
    align-items: center;
    cursor: pointer;
}
.lightbox.active { display: flex; }
.lightbox img {
    max-width: 90vw;
    max-height: 90vh;
    border-radius: 6px;
    object-fit: contain;
    cursor: default;
}
.lightbox-close {
    position: absolute;
    top: 12px;
    right: 16px;
    background: none;
    border: none;
    color: #fff;
    font-size: 2.4rem;
    cursor: pointer;
    line-height: 1;
    opacity: 0.8;
    transition: opacity 0.2s;
    z-index: 1;
}
.lightbox-close:hover { opacity: 1; }
.lightbox-prev,
.lightbox-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255,255,255,0.15);
    border: none;
    color: #F39C12; /* TEST — était #fff */
    font-size: 1.8rem;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0.7;
    transition: opacity 0.2s, background 0.2s;
    z-index: 1;
}
.lightbox-prev { left: 12px; }
.lightbox-next { right: 12px; }
.lightbox-prev:hover,
.lightbox-next:hover { opacity: 1; background: rgba(243,156,18,0.2); } /* TEST — était rgba(255,255,255,0.25) */
.lightbox-counter {
    position: absolute;
    bottom: 16px;
    left: 50%;
    transform: translateX(-50%);
    color: rgba(255,255,255,0.8);
    font-size: 0.85rem;
    background: rgba(0,0,0,0.4);
    padding: 4px 14px;
    border-radius: 12px;
}
.media-thumb { cursor: pointer; }

/* TikTok viewer (mobile) */
.tiktok-viewer {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: var(--z-tiktok);
    background: #000;
    touch-action: none;
}
.tiktok-viewer.active { display: block; }
.tiktok-viewer-slides {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    touch-action: none;
}
.tiktok-slide {
    display: none;
    position: absolute;
    top: 0; left: 0;
    width: 100%;
    height: 100%;
    will-change: transform;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}
.tiktok-slide.active { display: flex; }
@keyframes tkSlideInRight { from { transform: translateX(100%); } to { transform: translateX(0); } }
@keyframes tkSlideInLeft  { from { transform: translateX(-100%); } to { transform: translateX(0); } }
@keyframes tkSlideOutLeft { from { transform: translateX(0); } to { transform: translateX(-100%); } }
@keyframes tkSlideOutRight{ from { transform: translateX(0); } to { transform: translateX(100%); } }
.tiktok-slide.tk-in-right  { animation: tkSlideInRight  0.28s ease forwards; }
.tiktok-slide.tk-in-left   { animation: tkSlideInLeft   0.28s ease forwards; }
.tiktok-slide.tk-out-left  { animation: tkSlideOutLeft  0.28s ease forwards; }
.tiktok-slide.tk-out-right { animation: tkSlideOutRight 0.28s ease forwards; }
.tiktok-slide-bg {
    display: none;
}
.tiktok-slide img {
    position: relative;
    z-index: 1;
    width: 100%;
    height: auto;
}
.tiktok-close {
    position: fixed;
    top: 12px;
    right: 12px;
    z-index: calc(var(--z-tiktok) + 1);
    background: rgba(0,0,0,0.3);
    border: none;
    color: rgba(255,255,255,0.5);
    font-size: 1.4rem;
    font-weight: normal;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    cursor: pointer;
    display: none;
    align-items: center;
    justify-content: center;
    line-height: 1;
}
.tiktok-viewer.active ~ .tiktok-close { display: flex; }
.tiktok-counter {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    z-index: calc(var(--z-tiktok) + 1);
    color: #fff;
    font-size: 0.9rem;
    font-weight: 600;
    background: rgba(0,0,0,0.6);
    padding: 5px 16px;
    border-radius: 14px;
    display: none;
}
.tiktok-viewer.active ~ .tiktok-counter { display: block; }

/* Interactions photos (likes + commentaires) */
.photo-interactions {
    position: absolute;
    right: 12px;
    bottom: 80px;
    z-index: 2;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
}
.photo-like-btn,
.photo-comment-btn {
    background: rgba(0,0,0,0.4);
    border: none;
    color: #fff;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
    font-size: 0.65rem;
    transition: transform 0.2s;
}
.photo-like-btn:active,
.photo-comment-btn:active { transform: scale(1.2); }
.photo-like-btn svg,
.photo-comment-btn svg { width: 22px; height: 22px; }
.photo-like-btn.liked svg { fill: #ff4757; stroke: #ff4757; }
.photo-like-count,
.photo-comment-count { font-size: 0.7rem; color: #fff; }

/* Lightbox interactions */
.lightbox-interactions {
    position: fixed;
    right: 20px;
    bottom: 60px;
    z-index: 1401;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 14px;
}
.lightbox-interactions .photo-like-btn,
.lightbox-interactions .photo-comment-btn {
    background: rgba(255,255,255,0.15);
    width: 48px;
    height: 48px;
}

/* Panneau commentaires */
.comments-panel {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    max-height: 50vh;
    background: #1a1a1a;
    border-radius: 16px 16px 0 0;
    z-index: var(--z-sheet);
    display: none;
    flex-direction: column;
    color: #fff;
    animation: slideUp 0.3s ease;
}
.comments-panel.active { display: flex; }
@keyframes slideUp {
    from { transform: translateY(100%); }
    to { transform: translateY(0); }
}
.comments-panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    border-bottom: 1px solid rgba(255,255,255,0.1);
    font-weight: 600;
    font-size: 0.95rem;
}
.comments-panel-close {
    background: none;
    border: none;
    color: rgba(255,255,255,0.6);
    font-size: 1.4rem;
    cursor: pointer;
}
.comments-list {
    flex: 1;
    overflow-y: auto;
    padding: 8px 16px;
}
.comment-item {
    display: flex;
    gap: 10px;
    padding: 8px 0;
}
.comment-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
}
.comment-avatar-default {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--primary);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.7rem;
    font-weight: 600;
    flex-shrink: 0;
}
.comment-body { flex: 1; min-width: 0; }
.comment-pseudo { font-weight: 600; font-size: 0.85rem; color: var(--primary-light, #8b5cf6); }
.comment-text { font-size: 0.85rem; color: rgba(255,255,255,0.85); margin-top: 2px; word-wrap: break-word; }
.comment-date { font-size: 0.7rem; color: rgba(255,255,255,0.4); margin-top: 2px; }
.comment-delete {
    background: none;
    border: none;
    color: rgba(255,255,255,0.3);
    cursor: pointer;
    font-size: 0.75rem;
    margin-left: 8px;
}
.comment-delete:hover { color: #ff4757; }
.comments-empty { text-align: center; color: rgba(255,255,255,0.4); padding: 20px; font-size: 0.85rem; }
.comments-input {
    display: flex;
    gap: 8px;
    padding: 10px 16px;
    border-top: 1px solid rgba(255,255,255,0.1);
}
.comments-input input {
    flex: 1;
    background: rgba(255,255,255,0.1);
    border: none;
    border-radius: 20px;
    padding: 8px 14px;
    color: #fff;
    font-size: 0.85rem;
    outline: none;
}
.comments-input input::placeholder { color: rgba(255,255,255,0.35); }
.comments-input button {
    background: var(--primary);
    border: none;
    color: #fff;
    border-radius: 50%;
    width: 36px;
    height: 36px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

/* Bouton signaler */
.photo-report-btn {
    background: rgba(0,0,0,0.4);
    border: none;
    color: #fff;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.2s;
}
.photo-report-btn:active { transform: scale(1.2); }
.photo-report-btn svg { width: 20px; height: 20px; }
.lightbox-interactions .photo-report-btn {
    background: rgba(255,255,255,0.15);
    width: 48px;
    height: 48px;
}

/* Panneau signalement */
.report-panel {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    max-height: 70vh;
    background: #1a1a1a;
    border-radius: 16px 16px 0 0;
    z-index: calc(var(--z-sheet) + 1);
    display: none;
    flex-direction: column;
    color: #fff;
    animation: slideUp 0.3s ease;
}
.report-panel.active { display: flex; }
.report-panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 16px;
    border-bottom: 1px solid rgba(255,255,255,0.1);
    font-weight: 600;
    font-size: 1rem;
}
.report-panel-close {
    background: none;
    border: none;
    color: rgba(255,255,255,0.6);
    font-size: 1.4rem;
    cursor: pointer;
}
.report-panel-body {
    padding: 12px 16px;
    overflow-y: auto;
}
.report-motif {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 0;
    border-bottom: 1px solid rgba(255,255,255,0.06);
    cursor: pointer;
    font-size: 0.9rem;
}
.report-motif:last-of-type { border-bottom: none; }
.report-motif input[type="radio"] { accent-color: #ff4757; width: 18px; height: 18px; flex-shrink: 0; }
.report-motif label { cursor: pointer; flex: 1; }
.report-comment {
    width: 100%;
    background: rgba(255,255,255,0.1);
    border: none;
    border-radius: 8px;
    padding: 8px 12px;
    color: #fff;
    font-size: 0.85rem;
    margin-top: 10px;
    resize: none;
    outline: none;
}
.report-comment::placeholder { color: rgba(255,255,255,0.35); }
.report-panel-footer {
    padding: 12px 16px;
    border-top: 1px solid rgba(255,255,255,0.1);
    display: flex;
    gap: 8px;
    justify-content: flex-end;
}
.report-cancel {
    background: rgba(255,255,255,0.1);
    border: none;
    color: #fff;
    padding: 8px 18px;
    border-radius: 20px;
    cursor: pointer;
    font-size: 0.85rem;
}
.report-submit {
    background: #ff4757;
    border: none;
    color: #fff;
    padding: 8px 18px;
    border-radius: 20px;
    cursor: pointer;
    font-size: 0.85rem;
    font-weight: 600;
}
.report-submit:disabled { opacity: 0.4; cursor: default; }

@media (min-width: 769px) {
    /* Effet verre dépoli sur le header — desktop uniquement (sur mobile, .nav-links est position:fixed et backdrop-filter casserait la barre du bas) */
    header { -webkit-backdrop-filter: saturate(160%) blur(12px); backdrop-filter: saturate(160%) blur(12px); }
    .comments-panel, .report-panel {
        max-width: 400px;
        left: 50%;
        transform: translateX(-50%);
    }
}

/* Albums */
.albums-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
}
.album-card {
    position: relative;
    border-radius: var(--radius);
    overflow: hidden;
    background: var(--white);
    border: 1px solid var(--border);
    cursor: pointer;
    transition: box-shadow 0.2s;
}
.album-card:hover { box-shadow: 0 4px 16px rgba(120,72,161,0.13); }
.album-cover {
    position: relative;
    aspect-ratio: 1;
    overflow: hidden;
    background: #f0eaf5;
    display: flex;
    align-items: center;
    justify-content: center;
}
.album-cover img { width: 100%; height: 100%; object-fit: cover; }
.album-count {
    position: absolute;
    bottom: 6px;
    right: 6px;
    background: rgba(0,0,0,0.6);
    color: #fff;
    font-size: 0.75rem;
    padding: 2px 8px;
    border-radius: 10px;
}
.album-badge-prive {
    position: absolute;
    top: 6px;
    left: 6px;
    font-size: 0.9rem;
}
.album-info {
    padding: 0.5rem 0.7rem;
    text-align: center;
    min-width: 0;
    overflow: hidden;
}
.album-name {
    display: block;
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--text);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.album-actions {
    position: absolute;
    top: 6px;
    right: 6px;
    display: flex;
    gap: 4px;
    opacity: 0;
    transition: opacity 0.2s;
}
.album-card:hover .album-actions { opacity: 1; }

/* Album page */
.album-page { max-width: 620px; margin: 0 auto; padding: 1.5rem 1rem; background: var(--white); border-radius: var(--radius); box-shadow: 0 1px 3px rgba(0,0,0,0.1); }
.album-page-header {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin-bottom: 0.8rem;
}
.album-page-titlebar { display: flex; align-items: center; gap: 0.5rem; }
.album-page-header h1 { font-size: 1.1rem; margin: 0; font-weight: 400; flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.album-page-titlebar .album-back-btn { flex-shrink: 0; display: inline-flex; align-items: center; justify-content: center; width: 34px; height: 34px; padding: 0; }
.album-back-btn svg { flex-shrink: 0; }
.album-prive-right { flex-shrink: 0; }
.album-page-meta { font-size: 0.85rem; color: var(--gray); }
.album-page-meta a { color: var(--primary); }
.album-page-desc { font-size: 0.9rem; margin-top: 0.4rem; color: var(--text); }
.badge-prive {
    background: #f3e8ff;
    color: var(--primary);
    font-size: 0.75rem;
    padding: 2px 8px;
    border-radius: 10px;
}
.btn-sm { font-size: 0.8rem; padding: 0.3rem 0.8rem; }

/* Album page actions */
.album-page-actions { display: flex; gap: 0.5rem; flex-wrap: wrap; justify-content: center; }

/* Accès albums privés */
.album-acces-section {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 0.8rem 1rem;
    margin-bottom: 1rem;
}
.album-acces-list { display: flex; flex-direction: column; gap: 0.4rem; }
.album-acces-item {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.3rem 0;
}
.album-acces-user {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    text-decoration: none;
    color: var(--text);
    font-size: 0.88rem;
    font-weight: 500;
    flex: 1;
    min-width: 0;
}
.album-acces-user:hover { color: var(--primary); }
.album-acces-avatar {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    object-fit: cover;
}
.album-acces-avatar-default {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: var(--bg-darker);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.7rem;
    font-weight: 600;
    color: var(--gray);
}
.album-acces-duree {
    font-size: 0.78rem;
    color: var(--gray);
    white-space: nowrap;
}

/* Photo picker */
.picker-grid { gap: 0.6rem; }
.picker-form { display: contents; }
.picker-thumb {
    display: block;
    width: 100%;
    aspect-ratio: 1;
    border: 2px solid transparent;
    border-radius: var(--radius);
    overflow: hidden;
    cursor: pointer;
    padding: 0;
    background: none;
    transition: border-color 0.2s, transform 0.15s;
}
.picker-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.picker-thumb:hover { border-color: var(--primary); transform: scale(1.04); }

/* ===== RECHERCHE MEMBRES ===== */
.search-page { max-width: 1200px; margin: 0 auto; }
.search-layout { display: flex; gap: 1.5rem; align-items: flex-start; }
.search-filters {
    width: 260px;
    flex-shrink: 0;
    background: var(--white);
    border-radius: var(--radius);
    box-shadow: 0 1px 3px rgba(0,0,0,0.08);
    padding: 1.2rem;
    position: sticky;
    top: 1rem;
}
.search-filters-title {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1rem;
    color: var(--primary);
    margin-bottom: 1rem;
    padding-bottom: 0.6rem;
    border-bottom: 2px solid var(--bg);
}
.filter-group { margin-bottom: 1rem; }
.filter-label {
    display: block;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--gray);
    text-transform: uppercase;
    letter-spacing: 0.03em;
    margin-bottom: 0.4rem;
}
.filter-checks { display: flex; flex-direction: column; gap: 0.15rem; }
.filter-subgroup { margin-bottom: 0.2rem; }
.filter-group-header {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    cursor: pointer;
    padding: 0.2rem 0;
    user-select: none;
}
.filter-group-header:hover .filter-sublabel { color: var(--primary-dark, var(--primary)); }
.filter-group-master { flex-shrink: 0; cursor: pointer; }
.filter-sublabel {
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--primary);
    text-transform: uppercase;
    letter-spacing: 0.03em;
    margin: 0;
}
.filter-subgroup-items {
    display: none;
    flex-direction: column;
    gap: 0.1rem;
    padding-left: 1.5rem;
    padding-top: 0.15rem;
}
.filter-subgroup-items.open { display: flex; }
.filter-check-sub { margin: 0; }
.filter-check {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.88rem;
    cursor: pointer;
}
.filter-check input[type="checkbox"],
.filter-group-master {
    width: auto;
    accent-color: var(--primary);
    cursor: pointer;
}
.filter-row { display: flex; align-items: center; gap: 0.5rem; }
.filter-input-sm { width: 70px; padding: 0.4rem 0.5rem; border: 1px solid var(--border); border-radius: var(--radius); font-size: 0.88rem; }
.filter-input-sm:focus { outline: none; border-color: var(--primary); }
.filter-sep { color: var(--gray); }
.filter-input {
    width: 100%;
    padding: 0.45rem 0.6rem;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    font-size: 0.88rem;
}
.filter-input:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 2px rgba(120,72,161,0.12); }
.filter-actions { margin-top: 1.2rem; }

.search-results { flex: 1; min-width: 0; }
.search-results-header {
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.8rem;
}
.search-results-header h1 {
    font-size: 1.1rem;
    color: var(--text);
    font-weight: 600;
}
.search-reset-link {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    font-size: 0.82rem;
    color: var(--gray);
    text-decoration: none;
    white-space: nowrap;
    flex-shrink: 0;
    transition: color 0.15s;
}
.search-reset-link:hover { color: var(--primary); }
.search-reset-link svg { flex-shrink: 0; }
.search-empty {
    text-align: center;
    padding: 3rem 1rem;
    color: var(--gray);
    background: var(--white);
    border-radius: var(--radius);
}
.search-empty svg { stroke: var(--border); margin-bottom: 0.8rem; }
.search-empty p { font-size: 0.95rem; }

.search-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
    gap: 0.8rem;
}

.profile-card {
    display: block;
    background: var(--white);
    border-radius: var(--radius);
    overflow: hidden;
    text-decoration: none;
    color: var(--text);
    box-shadow: 0 1px 3px rgba(0,0,0,0.06);
    transition: box-shadow 0.2s, transform 0.2s;
}
.profile-card:hover {
    box-shadow: 0 4px 16px rgba(120,72,161,0.15);
    transform: translateY(-2px);
}
.profile-card-photo {
    position: relative;
    width: 100%;
    aspect-ratio: 1;
    background: #f0eaf5;
    overflow: hidden;
}
.profile-card-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.profile-card-default {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    font-weight: 700;
    color: var(--white);
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    letter-spacing: 2px;
}
.profile-online {
    position: absolute;
    bottom: 8px;
    right: 8px;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: var(--success);
    border: 2px solid var(--white);
    box-shadow: 0 0 0 1px rgba(0,0,0,0.1);
}
.profile-online-profil {
    width: 16px;
    height: 16px;
    bottom: 6px;
    right: 6px;
    border-width: 3px;
}
.profile-card-info { padding: 0.45rem 0.6rem 0.5rem; text-align: center; }
.profile-card-name {
    font-weight: 600;
    font-size: 0.92rem;
    line-height: 1.2;
    margin-bottom: 0.1rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.profile-card:hover .profile-card-name { text-decoration: underline; }
.profile-card-meta {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.3rem;
    margin-bottom: 0.1rem;
    font-size: 0.78rem;
    line-height: 1.2;
    color: var(--gray);
}
.profile-card-age { font-size: 0.78rem; color: var(--gray); }
.profile-card-location {
    font-size: 0.76rem;
    line-height: 1.2;
    color: var(--gray);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.profile-card-photos {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    font-size: 0.75rem;
    color: var(--gray);
    margin-top: 0.2rem;
}
.profile-card-photos svg { stroke: var(--gray); }

/* Badges genre dans les cartes */
.badge-couple { background: #f59e0b; color: #fff; }
.badge-femme { background: #ec4899; color: #fff; }
.badge-homme { background: #3b82f6; color: #fff; }
.badge-trans { background: #8b5cf6; color: #fff; }
.badge-groupe { background: linear-gradient(90deg, #3b82f6, #ec4899, #3b82f6); color: #fff; }

/* Pagination recherche */
.search-pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.3rem;
    margin-top: 1.5rem;
    padding: 1rem 0;
}
.search-pagination a,
.search-pagination span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 36px;
    height: 36px;
    padding: 0 0.6rem;
    border-radius: var(--radius);
    font-size: 0.88rem;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.2s;
}
.search-pagination a {
    background: var(--white);
    color: var(--text);
    border: 1px solid var(--border);
}
.search-pagination a:hover {
    background: var(--primary);
    color: var(--white);
    border-color: var(--primary);
}
.search-pagination span.active {
    background: var(--primary);
    color: var(--white);
    border: 1px solid var(--primary);
}
@media (max-width: 768px) {
    .desktop-pagination { display: none !important; }
}

/* Bouton toggle filtres mobile */
.search-filters-toggle {
    display: none;
    position: fixed;
    bottom: 70px;
    right: 16px;
    z-index: var(--z-fab);
    background: var(--primary);
    color: var(--white);
    border: none;
    border-radius: 50px;
    padding: 0.7rem 1.2rem;
    font-size: 0.88rem;
    font-weight: 600;
    cursor: pointer;
    box-shadow: 0 4px 16px rgba(120,72,161,0.3);
    gap: 0.4rem;
    align-items: center;
}
.search-filters-toggle svg { flex-shrink: 0; }

@media (max-width: 768px) {
    /* Galerie fiche membre : 3 colonnes serrées, vignettes plus grandes sur mobile */
    .medias-grid { gap: 0.25rem; padding: 0.25rem; }
    .profil-section:has(.medias-grid) { padding-left: 0.25rem; padding-right: 0.25rem; margin-left: 0.3rem; margin-right: 0.3rem; }
    /* Page album : même densité que la galerie (padding latéral réduit) */
    .album-page { padding-left: 0.25rem; padding-right: 0.25rem; }
    /* Pages liste (coups de cœur, messagerie, visites, contacts) + accueil (fil) + profil + album : réduire les bandes grises latérales + haut */
    main:has(.msg-page), main:has(.fil-page), main:has(.profil-page), main:has(.album-page) { padding: 0.35rem; }
    .search-layout { flex-direction: column; }
    .search-filters {
        display: none;
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        z-index: var(--z-filters);
        border-radius: 0;
        overflow-y: auto;
        padding: 1.5rem;
        padding-bottom: 80px;
    }
    .search-filters.open { display: block; }
    .search-filters-toggle { display: flex; }
    .search-grid { grid-template-columns: repeat(2, 1fr); gap: 0.6rem; }
    .profile-card-info { padding: 0.5rem; }
    .profile-card-name { font-size: 0.85rem; }
    .search-results { align-self: stretch; }
}

/* ===== MESSAGERIE ===== */
.msg-page {
    max-width: 700px;
    margin: 0 auto;
    background: var(--white);
    border-radius: var(--radius);
    box-shadow: 0 1px 3px rgba(0,0,0,0.08);
    overflow: hidden;
}
.msg-header {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    padding: 1.2rem 1.5rem;
    border-bottom: 1px solid var(--border);
}
.msg-header h1 { font-size: 1.2rem; margin: 0; flex: 1; display: flex; align-items: center; gap: 0.5rem; }
.msg-menu-btn {
    background: none;
    border: none;
    color: var(--gray);
    cursor: pointer;
    padding: 0.3rem;
    border-radius: 50%;
    transition: background 0.2s, color 0.2s;
    flex-shrink: 0;
}
.msg-menu-btn:hover { background: var(--bg); color: var(--text); }
.msg-menu-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.5);
    z-index: var(--z-modal);
    display: none;
    align-items: center;
    justify-content: center;
}
.msg-menu-overlay.active { display: flex; }
.msg-menu-modal {
    background: var(--card-bg, var(--white));
    border-radius: 14px;
    width: 90%;
    max-width: 340px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.3);
    animation: modalSlideIn 0.2s ease;
}
.msg-menu-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.9rem 1.2rem;
    border-bottom: 1px solid var(--border);
}
.msg-menu-modal-header h3 { margin: 0; font-size: 1rem; color: var(--text); }
.msg-menu-modal-close {
    background: none;
    border: none;
    font-size: 1.4rem;
    color: var(--gray);
    cursor: pointer;
    line-height: 1;
}
.msg-menu-modal-close:hover { color: var(--text); }
.msg-menu-modal-body { padding: 0.4rem 0; }
.msg-menu-item {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    width: 100%;
    padding: 0.75rem 1.2rem;
    background: none;
    border: none;
    color: var(--text);
    font-size: 0.92rem;
    cursor: pointer;
    transition: background 0.15s;
    text-align: left;
}
.msg-menu-item:hover { background: var(--bg); }
.msg-menu-item svg { color: var(--gray); flex-shrink: 0; }
.msg-menu-separator {
    height: 1px;
    background: var(--border);
    margin: 0.3rem 0;
}
.msg-menu-privacy { padding: 0.6rem 1.2rem; }
.msg-menu-privacy-label {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    font-size: 0.92rem;
    color: var(--text);
    margin-bottom: 0.6rem;
}
.msg-menu-privacy-label svg { color: var(--gray); flex-shrink: 0; }
.msg-menu-privacy-options { display: flex; flex-direction: column; gap: 0.4rem; padding-left: 0.2rem; }
.msg-menu-radio {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.88rem;
    color: var(--text);
    cursor: pointer;
    padding: 0.3rem 0;
}
.msg-menu-radio input[type="radio"] {
    accent-color: var(--purple, var(--primary));
    width: 16px;
    height: 16px;
}
.msg-conv-check {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    cursor: pointer;
}
.msg-conv-check input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: var(--purple, var(--primary));
    cursor: pointer;
}
.msg-conv-selected { background: #f5f0fa !important; }
.msg-select-bar {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    padding: 0.7rem 1.2rem;
    border-top: 1px solid var(--border);
    background: var(--bg);
    position: sticky;
    bottom: 60px;
    z-index: 50;
    box-shadow: 0 -2px 8px rgba(0,0,0,0.06);
}
.msg-select-bar span { font-size: 0.85rem; color: var(--gray); flex: 1; }
.btn-select-all {
    font-size: 0.8rem;
    padding: 0.3rem 0.9rem;
    border: 1.5px solid var(--primary);
    color: var(--primary);
    background: transparent;
    border-radius: var(--radius);
    cursor: pointer;
    font-weight: 500;
    transition: background 0.15s, color 0.15s;
    white-space: nowrap;
}
.btn-select-all:hover { background: var(--primary); color: #fff; }
.msg-tabs { display: flex; gap: 0; border-bottom: 1px solid var(--border); }
.msg-tab { flex: 1; display: inline-flex; align-items: center; justify-content: center; gap: 0.4rem; background: none; border: none; padding: 0.55rem 0.5rem; font-size: 0.82rem; font-weight: 600; color: var(--gray); cursor: pointer; border-bottom: 2px solid transparent; margin-bottom: -1px; transition: color 0.15s, border-color 0.15s; }
.msg-tab:hover { color: var(--text); }
.msg-tab.active { color: var(--primary); border-bottom-color: var(--primary); }
.msg-tab-badge {
    background: #ef4444;
    color: #fff;
    font-size: 0.7rem;
    font-weight: 700;
    min-width: 18px;
    height: 18px;
    border-radius: 9px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0 4px;
}
.msg-tab-count {
    background: #e5e7eb;
    color: var(--gray);
    font-size: 0.7rem;
    font-weight: 600;
    min-width: 18px;
    height: 18px;
    border-radius: 9px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0 4px;
}
.msg-unread-bar {
    background: var(--primary);
    color: #fff;
    text-align: center;
    padding: 0.4rem 1rem;
    font-size: 0.85rem;
    font-weight: 600;
}
.msg-badge-total {
    background: var(--primary);
    color: var(--white);
    font-size: 0.75rem;
    font-weight: 600;
    padding: 0.15rem 0.6rem;
    border-radius: 12px;
}
.msg-empty {
    text-align: center;
    padding: 3rem 1rem;
    color: var(--gray);
}
.msg-empty svg { stroke: var(--border); margin-bottom: 0.6rem; }
.msg-list { display: flex; flex-direction: column; }
.msg-conv {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    padding: 0.9rem 1.2rem;
    text-decoration: none;
    color: var(--text);
    border-bottom: 1px solid #f3f4f6;
    transition: background 0.15s;
}
.msg-conv:last-child { border-bottom: none; }
.msg-conv:hover { background: var(--bg); }
.msg-conv-unread { background: #f5f5f5; border-left: 4px solid var(--primary); }
.msg-conv-unread:hover { background: var(--bg); }
.msg-conv-avatar {
    position: relative;
    flex-shrink: 0;
}
.msg-conv-avatar img {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    object-fit: cover;
}
.msg-conv-avatar-default {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: var(--primary);
    color: var(--white);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.95rem;
    font-weight: 700;
}
.msg-online {
    position: absolute;
    bottom: -2px;
    right: -2px;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: var(--success);
    border: 2px solid var(--white);
}
.msg-conv-avatar .badge-certifie {
    position: absolute;
    top: -2px;
    right: -2px;
}
.badge-certifie {
    display: inline-flex;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: #f59e0b;
    border: 2px solid var(--white);
    align-items: center;
    justify-content: center;
    vertical-align: middle;
    flex-shrink: 0;
}
.badge-certifie svg { width: 10px; height: 10px; stroke: #fff; fill: none; stroke-width: 3; }
.badge-certifie-profil {
    position: absolute;
    top: 4px; right: 4px; left: auto;
    width: 20px; height: 20px; border-width: 3px;
}
.badge-certifie-profil svg { width: 12px; height: 12px; }
.msg-conv-body { flex: 1; min-width: 0; }
.msg-conv-top {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    margin-bottom: 0.15rem;
}
.msg-conv-name { font-weight: 600; font-size: 0.92rem; }
.msg-conv-unread .msg-conv-name { color: var(--text); }
.msg-conv-date { font-size: 0.75rem; color: var(--gray); flex-shrink: 0; }
.msg-conv-preview {
    font-size: 0.85rem;
    color: var(--gray);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.msg-conv-you { color: var(--gray); }
.msg-conv-badge {
    background: var(--primary);
    color: var(--white);
    font-size: 0.7rem;
    font-weight: 700;
    min-width: 20px;
    height: 20px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 5px;
    flex-shrink: 0;
}

/* ===== CONVERSATION ===== */
.conv-page {
    max-width: 700px;
    margin: 0 auto;
    background: var(--white);
    border-radius: var(--radius);
    box-shadow: 0 1px 3px rgba(0,0,0,0.08);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    height: calc(100vh - 140px);
    min-height: 400px;
}
.conv-header {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.8rem 1rem;
    border-bottom: 1px solid var(--border);
    flex-shrink: 0;
}
.conv-back {
    color: var(--gray);
    text-decoration: none;
    display: flex;
    padding: 0.3rem;
    border-radius: 50%;
    transition: background 0.15s;
}
.conv-back:hover { background: var(--bg); color: var(--primary); }
.conv-recus-count {
    background: var(--bg);
    color: var(--text);
    font-size: 0.75rem;
    font-weight: 600;
    padding: 0.1rem 0.45rem;
    border-radius: 10px;
}
.conv-user {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    text-decoration: none;
    color: var(--text);
    flex: 1;
}
.conv-user:hover .conv-user-name { color: var(--primary); }
.conv-user-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
}
.conv-user-avatar-default {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--primary);
    color: var(--white);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.85rem;
    font-weight: 700;
}
.conv-user .msg-online { bottom: -2px; right: -2px; }
.conv-user .badge-certifie { position: absolute; top: -2px; right: -2px; }
.conv-user-name { font-weight: 600; font-size: 0.95rem; }
.conv-user-status { font-size: 0.75rem; color: var(--success); }
.conv-user-offline { color: var(--gray); }

.conv-messages {
    flex: 1;
    overflow-y: auto;
    padding: 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
}
.conv-start {
    text-align: center;
    color: var(--gray);
    font-size: 0.85rem;
    padding: 2rem 0 1rem;
}
.conv-date-sep {
    text-align: center;
    padding: 0.6rem 0;
}
.conv-date-sep span {
    background: #ebebeb;
    color: var(--gray);
    font-size: 0.75rem;
    font-weight: 400;
    padding: 0.2rem 0.8rem;
    border-radius: 10px;
}
.conv-msg { display: flex; max-width: 75%; }
.conv-msg-mine { align-self: flex-end; }
.conv-msg-other { align-self: flex-start; }
.conv-msg-bubble {
    padding: 0.5rem 0.8rem;
    border-radius: 16px;
    font-size: 0.9rem;
    line-height: 1.45;
    word-break: break-word;
    position: relative;
}
.conv-msg-mine .conv-msg-bubble {
    background: #f2f2f2;
    color: var(--text);
    border-bottom-right-radius: 4px;
}
.conv-msg-other .conv-msg-bubble {
    background: #fafafa;
    color: var(--text);
    border-bottom-left-radius: 4px;
}
.conv-msg-time {
    display: inline-block;
    font-size: 0.65rem;
    opacity: 0.6;
    margin-left: 0.5rem;
    vertical-align: bottom;
}
.conv-msg-error .conv-msg-bubble { opacity: 0.5; }

.conv-input {
    display: flex;
    align-items: flex-end;
    gap: 0.5rem;
    padding: 0.8rem 1rem;
    border-top: 1px solid var(--border);
    flex-shrink: 0;
}
.conv-input textarea {
    flex: 1;
    border: 1px solid var(--border);
    border-radius: 20px;
    padding: 0.55rem 1rem;
    font-size: 0.9rem;
    font-family: inherit;
    resize: none;
    outline: none;
    line-height: 1.4;
    max-height: 120px;
}
.conv-input textarea:focus { border-color: var(--primary); }
.conv-send {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--primary);
    color: var(--white);
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: background 0.15s;
}
.conv-send:hover { background: var(--primary-dark); }
.conv-emoji-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: none;
    border: 1px solid var(--border);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    color: var(--gray);
    transition: color 0.15s, border-color 0.15s;
}
.conv-emoji-btn:hover { color: var(--primary); border-color: var(--primary); }
.conv-emoji-panel {
    display: none;
    flex-wrap: wrap;
    gap: 0.15rem;
    padding: 0.5rem;
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: 0 4px 16px rgba(0,0,0,0.12);
    margin: 0 0.8rem 0.3rem;
}
.conv-emoji-panel.active { display: flex; }
.conv-emoji-panel button {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 1.4rem;
    padding: 0.2rem 0.35rem;
    border-radius: 6px;
    line-height: 1;
    transition: background 0.12s;
}
.conv-emoji-panel button:hover { background: rgba(120,72,161,0.12); }
.profil-emoji-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 0.15rem;
    padding: 0.4rem;
    background: #f9f5ff;
    border: 1px solid var(--border);
    border-top: none;
    border-radius: 0 0 var(--radius) var(--radius);
    margin-top: -1px;
}
.profil-emoji-bar button {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 1.25rem;
    padding: 0.15rem 0.3rem;
    border-radius: 4px;
    line-height: 1;
    transition: background 0.15s;
}
.profil-emoji-bar button:hover { background: rgba(120,72,161,0.15); }
.tem-pseudo-link { color: inherit; text-decoration: none; }
.tem-pseudo-link:hover { text-decoration: underline; }

/* Badge non-lu dans la nav */
.nav-msg-badge {
    position: absolute;
    top: -4px;
    right: -6px;
    background: #ef4444;
    color: #fff;
    font-size: 0.6rem;
    font-weight: 700;
    min-width: 16px;
    height: 16px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 3px;
    line-height: 1;
}

/* ===== COUPS DE COEUR ===== */
.cdc-page {
    max-width: 700px;
    margin: 0 auto;
    background: var(--white);
    border-radius: var(--radius);
    box-shadow: 0 1px 3px rgba(0,0,0,0.08);
    overflow: hidden;
}
.cdc-header {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    padding: 1.2rem 1.5rem;
    border-bottom: 1px solid var(--border);
}
.cdc-header h1 {
    font-size: 1.2rem;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}
.cdc-total {
    background: #fef2f2;
    color: #ef4444;
    font-size: 0.8rem;
    font-weight: 600;
    padding: 0.15rem 0.6rem;
    border-radius: 12px;
}
.cdc-tabs {
    display: flex;
    border-bottom: 2px solid #f3f4f6;
}
.cdc-tab {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    padding: 0.75rem 1rem;
    text-decoration: none;
    font-size: 0.92rem;
    font-weight: 500;
    color: var(--gray);
    transition: color 0.2s;
    position: relative;
}
.cdc-tab:hover { color: var(--text); }
.cdc-tab.active { color: #ef4444; font-weight: 600; }
.cdc-tab.active::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0; right: 0;
    height: 2px;
    background: #ef4444;
}
.cdc-tab-badge {
    background: #ef4444;
    color: #fff;
    font-size: 0.7rem;
    font-weight: 700;
    min-width: 18px;
    height: 18px;
    border-radius: 9px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0 4px;
}
.cdc-tab-count {
    background: #e5e7eb;
    color: var(--gray);
    font-size: 0.7rem;
    font-weight: 600;
    min-width: 18px;
    height: 18px;
    border-radius: 9px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0 4px;
}
.cdc-tab-mutual {
    background: linear-gradient(135deg, #ec4899, #f43f5e);
    color: #fff;
    font-size: 0.7rem;
    font-weight: 700;
    min-width: 18px;
    height: 18px;
    border-radius: 9px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0 4px;
}
.cdc-empty {
    text-align: center;
    padding: 3rem 1rem;
    color: var(--gray);
}
.cdc-empty svg { stroke: var(--border); margin-bottom: 0.6rem; }
.cdc-list { display: flex; flex-direction: column; }
.cdc-card {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    padding: 0.9rem 1.2rem;
    text-decoration: none;
    color: var(--text);
    border-bottom: 1px solid #f3f4f6;
    transition: background 0.15s;
}
.cdc-card:last-child { border-bottom: none; }
.cdc-card:hover { background: var(--bg); }
.cdc-card-avatar {
    position: relative;
    flex-shrink: 0;
}
.cdc-card-avatar .profile-online {
    bottom: -2px;
    right: -2px;
    width: 16px;
    height: 16px;
}
.cdc-card-avatar .badge-certifie {
    position: absolute;
    top: -2px;
    right: -2px;
}
.cdc-card-avatar img {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    object-fit: cover;
}
.cdc-avatar-default {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: var(--primary);
    color: var(--white);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.95rem;
    font-weight: 700;
}
.cdc-card-avatar { text-decoration: none; color: inherit; }
.cdc-card-info { flex: 1; min-width: 0; text-decoration: none; color: inherit; }
.cdc-card-name { font-weight: 600; font-size: 0.92rem; margin-bottom: 0.15rem; }
.cdc-card-meta {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    flex-wrap: wrap;
}
.cdc-card-age { font-size: 0.82rem; color: var(--gray); }
.cdc-card-sexualite { font-size: 0.82rem; color: var(--text); }
.cdc-card-loc { font-size: 0.82rem; color: var(--gray); }
.cdc-card-date {
    display: flex;
    align-items: center;
    gap: 0.3rem;
    font-size: 0.75rem;
    color: var(--gray);
    flex-shrink: 0;
}
.cdc-send-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border: none;
    background: none;
    cursor: pointer;
    border-radius: 50%;
    flex-shrink: 0;
    transition: transform 0.2s, background 0.15s;
    padding: 0;
}
.cdc-send-btn:hover { background: #fef2f2; }
.cdc-send-btn:active { transform: scale(0.9); }
.cdc-send-btn-sent { cursor: default; }
.cdc-send-btn-sent:hover { background: none; }
.cdc-card-mutual { background: #fdf2f8; }
.cdc-card-mutual:hover { background: var(--bg); }
.cdc-mutual-icon {
    position: absolute;
    bottom: -2px;
    right: -2px;
    background: #fff;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 1px 3px rgba(0,0,0,0.15);
}
.cdc-mutual-badge {
    font-size: 0.65rem;
    font-weight: 700;
    color: #fff;
    background: linear-gradient(135deg, #ec4899, #f43f5e);
    padding: 0.1rem 0.4rem;
    border-radius: 8px;
    margin-left: 0.3rem;
    vertical-align: middle;
}
.nav-cdc-badge { background: #ef4444 !important; }
.nav-visites-badge { background: #8b5cf6 !important; }
.notif-item {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    padding: 0.55rem 1rem;
    text-decoration: none;
    color: var(--text);
    border-bottom: 1px solid var(--border);
    transition: background 0.15s;
}
.notif-item:hover { background: var(--bg); }
.notif-unread {
    background: #f5f5f5;
    border-left: 4px solid var(--primary);
}
/* Notifications — layout unifié avec msg-conv */
.notif-action-row { display: flex; align-items: center; justify-content: space-between; gap: 0.5rem; margin-top: 0.15rem; }
.notif-action-text { font-size: 0.85rem; color: var(--gray); flex: 1; min-width: 0; }
.notif-type-icon { flex-shrink: 0; opacity: 0.5; display: flex; align-items: center; }
.notif-ville { max-width: 120px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; display: inline-block; vertical-align: bottom; }
.msg-conv-unread .notif-action-text { color: var(--text); font-weight: 500; }
.msg-conv-unread .notif-type-icon { opacity: 1; }
.nav-notif-badge { background: #f59e0b !important; }

@media (max-width: 640px) {
    .msg-page { box-shadow: none; }
    .msg-header { padding: 1rem; }
    .fil-header { padding: 1rem; box-shadow: none; }
    .msg-conv { padding: 0.5rem 0.7rem; gap: 0.6rem; }
    .msg-conv-avatar img, .msg-conv-avatar-default { width: 40px; height: 40px; }
    /* Notifications : bloc resserré sur mobile */
    .notif-item { padding: 0.45rem 0.7rem; gap: 0.6rem; }
    .notif-avatar img, .notif-avatar-default { width: 40px; height: 40px; }

    .conv-page {
        box-shadow: none;
        height: calc(100vh - 120px);
        height: calc(100dvh - 120px);
    }
    .conv-messages { padding: 0.8rem; }
    .conv-msg { max-width: 85%; }
    .conv-input { padding: 0.6rem; padding-bottom: calc(0.6rem + env(safe-area-inset-bottom, 0px)); margin-bottom: 0.5rem; }

    .cdc-page { box-shadow: none; }
    .cdc-header { padding: 1rem; }
    .cdc-card { padding: 0.7rem 1rem; }
    .cdc-card-avatar img, .cdc-avatar-default { width: 42px; height: 42px; }

    .album-actions { opacity: 1; }
    .media-actions { opacity: 1; }
    .photo-actions { opacity: 1; }
}

/* ===== MES CONTACTS ===== */
.contacts-filter-btn {
    display: flex;
    align-items: center;
    gap: 0.3rem;
    font-size: 0.85rem;
    margin-left: auto;
    flex-shrink: 0;
}
.contacts-filter-btn.contacts-filter-active {
    background: var(--purple);
    color: #fff;
    border-color: var(--purple);
}
.contacts-active-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    align-items: center;
    padding: 0.6rem 1.2rem;
    border-bottom: 1px solid var(--border);
}
.contacts-filter-tag {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: 20px;
    padding: 0.2rem 0.6rem;
    font-size: 0.8rem;
    color: var(--text);
}
.contacts-filter-tag a {
    color: var(--gray);
    text-decoration: none;
    font-weight: 700;
    font-size: 0.9rem;
    line-height: 1;
}
.contacts-filter-tag a:hover { color: #ef4444; }
.contacts-clear-all {
    font-size: 0.8rem;
    color: var(--purple);
    margin-left: 0.3rem;
}
.contacts-filter-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.5);
    z-index: var(--z-modal);
    display: none;
    align-items: center;
    justify-content: center;
}
.contacts-filter-modal-overlay.active { display: flex; }
.contacts-filter-modal {
    background: var(--white);
    border-radius: 14px;
    width: 90%;
    max-width: 380px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.3);
    animation: modalSlideIn 0.2s ease;
}
@keyframes modalSlideIn {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}
.contacts-filter-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 1.2rem;
    border-bottom: 1px solid var(--border);
}
.contacts-filter-modal-header h3 {
    margin: 0;
    font-size: 1rem;
    color: var(--text);
}
.contacts-filter-modal-close {
    background: none;
    border: none;
    font-size: 1.4rem;
    color: var(--gray);
    cursor: pointer;
    line-height: 1;
}
.contacts-filter-modal-close:hover { color: var(--text); }
.contacts-filter-modal-body {
    padding: 1rem 1.2rem;
}
.contacts-filter-modal-body .form-group {
    margin-bottom: 0.9rem;
}
.contacts-filter-modal-body .form-group:last-child { margin-bottom: 0; }
.contacts-filter-modal-body label {
    display: block;
    font-size: 0.85rem;
    color: var(--gray);
    margin-bottom: 0.3rem;
}
.contacts-filter-select {
    width: 100%;
    padding: 0.5rem 0.7rem;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: var(--bg);
    color: var(--text);
    font-size: 0.9rem;
}
.contacts-filter-modal-footer {
    display: flex;
    justify-content: space-between;
    padding: 0.8rem 1.2rem;
    border-top: 1px solid var(--border);
}
.contacts-search {
    flex: 1;
    position: relative;
}
.contacts-search svg {
    position: absolute;
    left: 0.7rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--gray);
}
.contacts-search input {
    width: 100%;
    padding: 0.5rem 0.7rem 0.5rem 2.2rem;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: var(--bg);
    color: var(--text);
    font-size: 0.9rem;
}
.contacts-checkbox {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.95rem;
    color: var(--text) !important;
    cursor: pointer;
    font-weight: 500;
}
.contacts-checkbox input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: var(--purple);
    cursor: pointer;
}
.contacts-online-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #22c55e;
    display: inline-block;
    box-shadow: 0 0 4px rgba(34, 197, 94, 0.5);
}
.contacts-clear-search {
    font-size: 0.8rem;
    color: var(--purple);
    margin-left: auto;
}
.btn-remove-contact {
    background: none;
    border: none;
    color: var(--gray);
    cursor: pointer;
    padding: 0.3rem;
    border-radius: 50%;
    transition: color 0.2s, background 0.2s;
    flex-shrink: 0;
}
.btn-remove-contact:hover {
    color: #ef4444;
    background: rgba(239, 68, 68, 0.1);
}
.btn-contact-active {
    background: var(--purple) !important;
    color: #fff !important;
    border-color: var(--purple) !important;
}

/* Album privé locked card */
.album-card-locked { pointer-events: none; }
.album-card-locked .album-cover { position: relative; overflow: hidden; }
.album-cover-blur {
    filter: blur(12px);
    transform: scale(1.1);
}
.album-cover-empty-blur {
    width: 100%;
    height: 100%;
    background: var(--bg-darker);
}
.album-lock-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0,0,0,0.35);
    border-radius: inherit;
}

/* Toast notification */
.toast-notif {
    position: fixed;
    bottom: 5rem;
    left: 50%;
    transform: translateX(-50%) translateY(1rem);
    background: #1e1e1e;
    color: #fff;
    padding: 0.7rem 1.4rem;
    border-radius: 8px;
    font-size: 0.9rem;
    z-index: var(--z-toast);
    opacity: 0;
    transition: opacity 0.3s, transform 0.3s;
    pointer-events: none;
    box-shadow: 0 4px 12px rgba(0,0,0,0.3);
}
.toast-notif.show {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}
