/* ─── Wiki Licks — design system glass ─── */

:root {
    --font: "Inter", "Segoe UI", system-ui, sans-serif;
    --radius: 20px;
    --radius-lg: 28px;
    --female: #ff5b9a;
    --male: #5b8cff;
    --admin: #f0b429;
    --accent: #7c5cbf;
}

/* Thème femme (lavande) */
body.theme-female {
    --page-bg: radial-gradient(circle at 20% 0%, #f3edf9 0%, #ebe4f5 45%, #ddd0ef 100%);
    --text: #1a1523;
    --muted: #6b6280;
    --surface: rgba(255, 255, 255, 0.55);
    --border: rgba(255, 255, 255, 0.72);
    --border-input: rgba(26, 21, 35, 0.1);
    --header-bg: rgba(235, 228, 245, 0.78);
    --shadow: 0 24px 50px rgba(88, 62, 124, 0.14);
    --input-bg: rgba(255, 255, 255, 0.72);
    --stars: #7c5cbf;
    --ghost-bg: rgba(255, 255, 255, 0.38);
}

/* Thème homme (bleu clair) */
body.theme-male {
    --page-bg: radial-gradient(circle at 80% 0%, #edf2fc 0%, #e4ecf9 45%, #d6e3f7 100%);
    --text: #111827;
    --muted: #6b7280;
    --surface: rgba(255, 255, 255, 0.58);
    --border: rgba(255, 255, 255, 0.75);
    --border-input: rgba(17, 24, 39, 0.1);
    --header-bg: rgba(228, 236, 249, 0.78);
    --shadow: 0 24px 50px rgba(61, 111, 217, 0.12);
    --input-bg: rgba(255, 255, 255, 0.75);
    --stars: #3d6fd9;
    --ghost-bg: rgba(255, 255, 255, 0.42);
}

/* Thème admin (neutre) */
body.theme-admin {
    --page-bg: radial-gradient(circle at 50% 0%, #f5f5f4 0%, #ececec 50%, #e2e2e2 100%);
    --text: #171717;
    --muted: #737373;
    --surface: rgba(255, 255, 255, 0.72);
    --border: rgba(255, 255, 255, 0.85);
    --border-input: rgba(0, 0, 0, 0.1);
    --header-bg: rgba(245, 245, 244, 0.85);
    --shadow: 0 20px 45px rgba(0, 0, 0, 0.08);
    --input-bg: rgba(255, 255, 255, 0.88);
    --stars: #d97706;
    --ghost-bg: rgba(255, 255, 255, 0.5);
    --accent: #d97706;
}

/* Pages publiques (404, etc.) */
body.theme-public {
    --page-bg: #f3f4f6;
    --text: #0a0a0a;
    --muted: #6b7280;
    --surface: rgba(255, 255, 255, 0.85);
    --border: rgba(0, 0, 0, 0.08);
    --border-input: rgba(0, 0, 0, 0.1);
    --header-bg: rgba(243, 244, 246, 0.9);
    --shadow: 0 20px 50px rgba(0, 0, 0, 0.06);
    --input-bg: #fff;
    --stars: #0a0a0a;
    --ghost-bg: rgba(255, 255, 255, 0.6);
}

* { box-sizing: border-box; }

body {
    margin: 0;
    min-height: 100vh;
    font-family: var(--font);
    color: var(--text);
    background: var(--page-bg);
    background-attachment: fixed;
}

a { color: inherit; }

.container { width: min(1100px, 92%); margin: 0 auto; }

.main-full {
    width: min(1200px, 94%);
    margin: 0 auto;
    padding: 1.5rem 0 3rem;
}

main { padding: 2rem 0 4rem; }

/* Header */

.site-header {
    padding: 1rem 0;
    border-bottom: 1px solid var(--border);
    backdrop-filter: blur(16px);
    position: sticky;
    top: 0;
    background: var(--header-bg);
    z-index: 10;
}

.nav {
    display: flex;
    gap: 1rem;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
}

.nav-links {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    align-items: center;
}

.logo {
    font-weight: 800;
    letter-spacing: -0.03em;
    text-decoration: none;
    color: var(--text);
}

.nav-links a {
    text-decoration: none;
    font-size: 0.92rem;
    font-weight: 500;
    color: var(--muted);
    transition: color 0.2s ease;
}

.nav-links a:hover { color: var(--text); }

/* Surfaces glass */

.card,
.glass-panel {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    box-shadow: var(--shadow);
    backdrop-filter: blur(18px);
}

.glass-panel h1,
.glass-panel h2,
.card h1,
.card h2 {
    letter-spacing: -0.03em;
}

.grid-2 {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.25rem;
}

/* Hero (home espaces) */

.hero {
    text-align: center;
    padding: 3rem 1rem 2rem;
    max-width: 640px;
    margin: 0 auto;
}

.hero h1 {
    font-size: clamp(1.75rem, 4.5vw, 2.5rem);
    font-weight: 800;
    line-height: 1.08;
    letter-spacing: -0.04em;
    margin-bottom: 0.75rem;
}

.hero p { color: var(--muted); font-size: 1.05rem; }

.hero .btn { margin: 0.25rem; }

.hero-panel {
    max-width: 560px;
    margin: 2rem auto;
    text-align: center;
}

.hero-panel h1 {
    font-size: clamp(1.75rem, 4.5vw, 2.35rem);
    font-weight: 800;
    line-height: 1.08;
    letter-spacing: -0.04em;
    margin: 0 0 0.75rem;
}

.tag {
    display: inline-block;
    padding: 0.3rem 0.7rem;
    border-radius: 999px;
    font-size: 0.78rem;
    font-weight: 600;
    background: rgba(255, 255, 255, 0.45);
    border: 1px solid var(--border-input);
    color: var(--muted);
}

/* Boutons */

.btn {
    display: inline-block;
    border: none;
    border-radius: 999px;
    padding: 0.75rem 1.25rem;
    font-weight: 600;
    font-size: 0.92rem;
    cursor: pointer;
    text-decoration: none;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.btn:hover { transform: translateY(-1px); }

.btn-primary { background: var(--accent); color: #fff; }

.btn-male {
    background: var(--male);
    color: #fff;
    box-shadow: 0 8px 20px rgba(91, 140, 255, 0.3);
}

.btn-female {
    background: var(--female);
    color: #fff;
    box-shadow: 0 8px 20px rgba(255, 91, 154, 0.3);
}

.btn-ghost {
    background: var(--ghost-bg);
    border: 1px solid var(--border-input);
    color: var(--text);
}

.btn-block { display: block; width: 100%; text-align: center; }

/* Formulaires */

.form-group { margin-bottom: 1rem; }

label {
    display: block;
    margin-bottom: 0.35rem;
    color: var(--muted);
    font-size: 0.88rem;
    font-weight: 500;
}

input, select, textarea {
    width: 100%;
    padding: 0.7rem 0.9rem;
    border-radius: 14px;
    border: 1px solid var(--border-input);
    background: var(--input-bg);
    color: var(--text);
    font-family: inherit;
    font-size: 0.95rem;
}

textarea { min-height: 110px; resize: vertical; }

input:focus, select:focus, textarea:focus {
    outline: 2px solid rgba(124, 92, 191, 0.25);
    outline-offset: 1px;
}

/* Alertes */

.alert {
    padding: 0.85rem 1rem;
    border-radius: 14px;
    margin-bottom: 1rem;
    font-size: 0.9rem;
}

.alert-success {
    background: rgba(46, 204, 113, 0.12);
    border: 1px solid rgba(46, 204, 113, 0.3);
}

.alert-error {
    background: rgba(255, 91, 91, 0.1);
    border: 1px solid rgba(255, 91, 91, 0.28);
}

/* Tableaux */

.table-wrap {
    overflow-x: auto;
    border-radius: 16px;
}

.table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
}

.table th, .table td {
    padding: 0.75rem;
    border-bottom: 1px solid var(--border-input);
    text-align: left;
    vertical-align: top;
}

.table th {
    font-weight: 600;
    color: var(--muted);
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.profile-photo {
    width: 120px;
    height: 120px;
    object-fit: cover;
    border-radius: 20px;
    border: 1px solid var(--border-input);
}

/* Stats / notes */

.stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 0.75rem;
}

.stat {
    background: rgba(255, 255, 255, 0.45);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 0.85rem;
    backdrop-filter: blur(8px);
}

.stat strong { display: block; font-size: 1.15rem; }

.stat-overall {
    grid-column: 1 / -1;
    background: rgba(255, 255, 255, 0.62);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 0.85rem 1rem;
}

.rating-overall-stars { font-size: 1.25rem; }

.rating-overall-value,
.rating-user-overall strong { color: var(--text); }

.rating-overall-stars,
.licker-rating-stars { color: var(--stars); }

.muted { color: var(--muted); }

.footer {
    border-top: 1px solid var(--border);
    padding: 1.5rem 0 2rem;
    color: var(--muted);
    font-size: 0.9rem;
}

.rating-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 0.75rem;
}

/* Admin */

.admin-layout {
    display: grid;
    grid-template-columns: 220px 1fr;
    gap: 1.25rem;
}

.admin-nav a {
    display: block;
    padding: 0.6rem 0.85rem;
    border-radius: 12px;
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--muted);
    transition: background 0.2s ease, color 0.2s ease;
}

.admin-nav a:hover,
.admin-nav a.active {
    background: rgba(240, 180, 41, 0.15);
    color: var(--text);
}

@media (max-width: 800px) {
    .admin-layout { grid-template-columns: 1fr; }
}

/* Inscription / auth */

.signup-card { max-width: 440px; margin: 0 auto; }

.signup-form { margin-top: 1.25rem; }

.signup-footer {
    margin-top: 1.25rem;
    text-align: center;
    font-size: 0.9rem;
    color: var(--muted);
}

.signup-footer a { font-weight: 500; }

.steps {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.85rem;
    color: var(--muted);
    margin: 0 0 1rem;
}

.step {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.6rem;
    height: 1.6rem;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.5);
    border: 1px solid var(--border-input);
    font-weight: 700;
    font-size: 0.8rem;
}

.step.active { background: var(--accent); color: #fff; border-color: transparent; }

.step.done { background: #2ecc71; color: #fff; border-color: transparent; }

.step-arrow { opacity: 0.5; }

/* ─── Listings profils ─── */

.lickers-page,
.browse-page {
    padding: 0.5rem 0 2rem;
}

.lickers-page-header,
.browse-page-header {
    margin-bottom: 2rem;
}

.lickers-page-header h1,
.browse-page-header h1 {
    font-size: clamp(1.5rem, 3.5vw, 2rem);
    font-weight: 800;
    letter-spacing: -0.04em;
    margin: 0 0 0.5rem;
    text-align: center;
}

.browse-page-header p {
    text-align: center;
    margin: 0 0 1.25rem;
}

.filters-glass,
.lickers-filters-glass {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 0.85rem;
    padding: 1rem 1.15rem;
    border-radius: 22px;
    background: var(--surface);
    border: 1px solid var(--border);
    backdrop-filter: blur(18px);
    box-shadow: var(--shadow);
}

.lickers-filter-submit { align-self: end; }

.lickers-empty,
.browse-empty {
    text-align: center;
    padding: 3rem 1rem;
}

.lickers-mosaic,
.profiles-mosaic {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 1.75rem;
    padding: 0.5rem 0;
}

.profile-detail-page,
.licker-detail-page {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

/* ─── Cartes profil glassmorphism ─── */

.profile-glass-card {
    position: relative;
    display: block;
    text-decoration: none;
    color: #fff;
    min-height: 380px;
    perspective: 900px;
}

.profile-glass-card-stack {
    position: absolute;
    inset: 10px 14px -6px;
    border-radius: 28px;
    background: rgba(255, 255, 255, 0.35);
    border: 1px solid rgba(255, 255, 255, 0.45);
    transform: rotate(4deg) scale(0.96);
    z-index: 0;
}

.profile-glass-card-stack::after {
    content: "";
    position: absolute;
    inset: 8px 10px -10px;
    border-radius: 26px;
    background: rgba(255, 255, 255, 0.22);
    border: 1px solid rgba(255, 255, 255, 0.35);
    transform: rotate(-5deg);
}

.profile-glass-card-face {
    position: relative;
    z-index: 1;
    height: 100%;
    min-height: 380px;
    border-radius: 28px;
    overflow: hidden;
    box-shadow: var(--shadow);
    border: 1px solid rgba(255, 255, 255, 0.35);
    transition: transform 0.28s ease, box-shadow 0.28s ease;
}

.profile-glass-card:hover .profile-glass-card-face {
    transform: translateY(-6px);
    box-shadow: 0 32px 60px rgba(0, 0, 0, 0.18);
}

.profile-glass-card-static {
    pointer-events: none;
    max-width: 340px;
    margin: 0 auto;
}

.profile-glass-card-static .profile-glass-card-face {
    min-height: 420px;
}

.profile-glass-card-photo {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.profile-glass-card-photo.is-placeholder {
    object-fit: cover;
    background: linear-gradient(160deg, #3d2550 0%, #241a2b 100%);
    padding: 0;
}

.profile-glass-card-shade {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(12, 8, 20, 0.82) 0%, rgba(12, 8, 20, 0.2) 42%, transparent 68%);
    pointer-events: none;
}

.profile-glass-float {
    position: absolute;
    z-index: 2;
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    padding: 0.45rem 0.65rem;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.28);
    border: 1px solid rgba(255, 255, 255, 0.45);
    backdrop-filter: blur(14px);
    font-size: 0.78rem;
    font-weight: 700;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.12);
}

.profile-glass-float-heart {
    left: 0.85rem;
    top: 42%;
    transform: rotate(-6deg);
}

.profile-glass-float-reviews {
    right: 0.85rem;
    top: 0.85rem;
    border-radius: 999px;
    padding: 0.5rem 0.7rem;
    max-width: 55%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.profile-glass-card-copy {
    position: absolute;
    left: 1rem;
    right: 1rem;
    bottom: 4.5rem;
    z-index: 2;
}

.profile-glass-card-meta {
    display: block;
    font-size: 0.78rem;
    font-weight: 500;
    opacity: 0.88;
    margin-bottom: 0.25rem;
}

.profile-glass-card-name {
    margin: 0;
    font-size: 1.65rem;
    font-weight: 800;
    line-height: 1.05;
    letter-spacing: -0.03em;
}

.profile-glass-card-age {
    font-weight: 500;
    opacity: 0.92;
}

.profile-glass-score-pill {
    position: absolute;
    left: 0.75rem;
    right: 0.75rem;
    bottom: 0.75rem;
    z-index: 2;
    display: flex;
    align-items: center;
    gap: 0.55rem;
    padding: 0.65rem 0.85rem;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.32);
    border: 1px solid rgba(255, 255, 255, 0.5);
    backdrop-filter: blur(16px);
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.15);
}

.profile-glass-score-pill-muted {
    justify-content: center;
}

.profile-glass-score-pill-muted .profile-glass-score-value {
    font-size: 0.78rem;
    font-weight: 600;
    opacity: 0.95;
}

.profile-glass-score-icon {
    display: grid;
    place-items: center;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.45);
    font-size: 0.82rem;
    flex-shrink: 0;
}

.profile-glass-waveform {
    display: flex;
    align-items: flex-end;
    gap: 3px;
    flex: 1;
    height: 26px;
}

.profile-glass-waveform span {
    flex: 1;
    max-width: 8px;
    height: var(--h, 40%);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.92);
    min-height: 4px;
}

.profile-glass-score-value {
    font-size: 0.82rem;
    font-weight: 700;
    white-space: nowrap;
    flex-shrink: 0;
}

.profile-glass-hero { margin-bottom: 0.5rem; }

.profile-glass-bio {
    max-width: 340px;
    margin: 1rem auto 0;
    text-align: center;
    font-size: 0.92rem;
    line-height: 1.55;
    color: var(--muted);
}

/* Responsive */

@media (max-width: 600px) {
    .lickers-mosaic,
    .profiles-mosaic {
        grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
        gap: 1.25rem;
    }

    .profile-glass-card,
    .profile-glass-card-face {
        min-height: 340px;
    }

    .profile-glass-card-name {
        font-size: 1.4rem;
    }
}

@media (max-width: 520px) {
    .lickers-mosaic,
    .profiles-mosaic {
        grid-template-columns: 1fr;
        max-width: 320px;
        margin: 0 auto;
    }
}

@media (prefers-reduced-motion: reduce) {
    .profile-glass-card-face,
    .btn {
        transition: none;
    }

    .landing-carousel-track {
        animation: none;
    }
}
