/* --- SYSTÈME DE DESIGN PREMIUM --- */
:root {
    --bg-color: #050505;
    --surface-color: #121212;
    --surface-hover: #1a1a1a;
    --accent-color: #ffffff;
    --text-primary: #f5f5f5;
    --text-secondary: #888888;
    --border-color: #222222;
    --success: #10b981;
    --failure: #ef4444;
    --pause: #6366f1;
    --transition: all 0.4s cubic-bezier(0.23, 1, 0.32, 1);
    --modal-overlay: rgba(0, 0, 0, 0.7);
    --font-heading: "Outfit", sans-serif;
    --font-body: "Inter", sans-serif;
    --feed-glow: rgba(16, 185, 129, 0.18);
    --feed-warm-glow: rgba(245, 158, 11, 0.12);
    --feed-card-bg: rgba(18, 18, 18, 0.82);
    --feed-card-border: rgba(255, 255, 255, 0.08);
    --feed-card-shadow: 0 24px 70px rgba(0, 0, 0, 0.32);
    --feed-muted-surface: rgba(255, 255, 255, 0.055);
}

/* Mode clair */
html.light-mode {
    --bg-color: #ffffff;
    --surface-color: #f5f5f5;
    --surface-hover: #efefef;
    --accent-color: #000000;
    --text-primary: #1a1a1a;
    --text-secondary: #666666;
    --border-color: #dddddd;
    --modal-overlay: rgba(0, 0, 0, 0.5);
    --feed-glow: rgba(16, 185, 129, 0.14);
    --feed-warm-glow: rgba(245, 158, 11, 0.16);
    --feed-card-bg: rgba(255, 255, 255, 0.88);
    --feed-card-border: rgba(15, 23, 42, 0.1);
    --feed-card-shadow: 0 24px 70px rgba(15, 23, 42, 0.12);
    --feed-muted-surface: rgba(15, 23, 42, 0.055);
}

/* Hide feedback button */
#feedback-toggle {
    display: none !important;
}

/* Hide add update button in immersive mode */
body.immersive-mode-active .btn-add,
body.immersive-mode-active [data-action="add-update"] {
    display: none !important;
}

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

body {
    font-family: "Inter", sans-serif;
    background-color: var(--bg-color);
    color: var(--text-primary);
    line-height: 1.5;
    overflow-x: hidden;
    width: 100%;
    position: relative;
    -webkit-text-size-adjust: 100%; /* Empêche le redimensionnement du texte sur mobile */
}

/* Empêche le zoom automatique sur les champs de saisie mobile (iOS) */
input,
select,
textarea {
    font-size: 16px !important;
}

.container {
    width: 100%;
    padding-left: clamp(1rem, 5vw, 2.5rem);
    padding-right: clamp(1rem, 5vw, 2.5rem);
    margin-left: auto;
    margin-right: auto;
    box-sizing: border-box;
}

/* --- XERA Carousel (multi-images) --- */
.xera-carousel {
    position: relative;
    width: 100%;
    border-radius: 12px;
    overflow: hidden;
}

.xera-carousel-track {
    display: flex;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}

.xera-carousel-track::-webkit-scrollbar {
    display: none;
}

.xera-carousel-slide {
    flex: 0 0 100%;
    scroll-snap-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
}

.xera-carousel-slide img {
    width: 100%;
    height: auto;
    display: block;
    object-fit: cover;
}

.xera-carousel--immersive .xera-carousel-slide img {
    max-height: 70vh;
    object-fit: contain;
    background: rgba(0, 0, 0, 0.15);
}

.xera-carousel-dots {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 10px;
    display: flex;
    justify-content: center;
    gap: 6px;
    pointer-events: auto;
}

.xera-dot {
    width: 6px;
    height: 6px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.35);
    border: 1px solid rgba(255, 255, 255, 0.35);
    cursor: pointer;
}

.xera-dot.active {
    background: rgba(255, 255, 255, 0.95);
    border-color: rgba(255, 255, 255, 0.95);
}

.xera-carousel-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 36px;
    height: 36px;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.35);
    background: rgba(0, 0, 0, 0.42);
    color: #fff;
    font-size: 1.35rem;
    line-height: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 6;
    backdrop-filter: blur(4px);
}

.xera-carousel-arrow--prev {
    left: 10px;
}

.xera-carousel-arrow--next {
    right: 10px;
}

.xera-carousel-arrow:disabled {
    opacity: 0.32;
    cursor: default;
}

.xera-carousel-counter {
    position: absolute;
    top: 10px;
    right: 10px;
    z-index: 6;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.24);
    background: rgba(0, 0, 0, 0.55);
    color: #fff;
    font-size: 0.74rem;
    font-weight: 600;
    padding: 4px 9px;
    line-height: 1.1;
    letter-spacing: 0.01em;
    backdrop-filter: blur(4px);
    pointer-events: none;
}

.xera-carousel--immersive .xera-carousel-dots {
    bottom: 16px;
    z-index: 6;
}

.xera-carousel--immersive .xera-carousel-arrow {
    display: inline-flex;
    visibility: visible;
    opacity: 1;
    pointer-events: auto;
    z-index: 12;
}

@media (hover: none) and (pointer: coarse) {
    .xera-carousel-arrow {
        display: none;
    }

    /* Garder les flèches actives dans le feed immersif sur mobile */
    .xera-carousel--immersive .xera-carousel-arrow {
        display: inline-flex;
        width: 38px;
        height: 38px;
    }

    .xera-carousel--immersive .xera-carousel-arrow--prev {
        left: 8px;
    }

    .xera-carousel--immersive .xera-carousel-arrow--next {
        right: 8px;
    }
}

@media (max-width: 900px) {
    .xera-carousel--immersive .xera-carousel-counter {
        top: 8px;
        right: 8px;
        font-size: 0.7rem;
        padding: 3px 8px;
    }
}

/* --- UTILS --- */
.loading-spinner {
    display: inline-block;
    width: 1rem;
    height: 1rem;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top: 2px solid var(--accent-color);
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }
    100% {
        transform: rotate(360deg);
    }
}

.xera-upload-progress {
    width: min(260px, 100%);
    height: 8px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.12);
    overflow: hidden;
    margin: 0.75rem auto 0;
}

.xera-upload-progress-bar {
    height: 100%;
    width: 0%;
    border-radius: 999px;
    background: var(--accent-color);
    transform: translateX(0);
    transition: width 120ms linear;
}

.xera-upload-progress-bar.is-indeterminate {
    width: 40%;
    animation: xeraUploadIndeterminate 1.1s ease-in-out infinite;
}

@keyframes xeraUploadIndeterminate {
    0% {
        transform: translateX(-140%);
    }
    100% {
        transform: translateX(260%);
    }
}

.xera-upload-progress-label {
    margin-top: 0.35rem;
    font-size: 0.75rem;
    color: var(--text-secondary);
}

.media-preview-shell {
    position: relative;
    display: inline-block;
    max-width: 100%;
}

.media-remove-btn {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 26px;
    height: 26px;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0.35);
    background: rgba(0, 0, 0, 0.55);
    color: #fff;
    font-size: 0.95rem;
    font-weight: 700;
    line-height: 24px;
    text-align: center;
    cursor: pointer;
    z-index: 2;
}

.media-remove-btn:hover {
    background: rgba(0, 0, 0, 0.75);
}

.click-loading {
    animation: clickPulse 0.9s ease-in-out infinite;
    filter: brightness(1);
    position: relative;
    pointer-events: none;
}

.click-loading-indicator::after {
    content: "";
    position: absolute;
    top: 50%;
    right: -1.1rem;
    width: 0.65rem;
    height: 0.65rem;
    margin-top: -0.325rem;
    border: 2px solid rgba(255, 255, 255, 0.25);
    border-top-color: currentColor;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    opacity: 0.9;
}

@keyframes clickPulse {
    0% {
        opacity: 1;
        filter: brightness(1);
    }
    50% {
        opacity: 0.7;
        filter: brightness(1.2);
    }
    100% {
        opacity: 1;
        filter: brightness(1);
    }
}

.btn-loading {
    position: relative;
    pointer-events: none;
    opacity: 0.8;
}

.btn-loading .btn-text {
    opacity: 0.5;
}

.btn-loading .loading-spinner {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    border-color: rgba(255, 255, 255, 0.3);
    border-top-color: currentColor;
}

/* --- ANNONCES OFFICIELLES --- */
.announcements {
    display: none;
    gap: 1rem;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    margin-top: 1.5rem;
}

.announcement-card {
    background: var(--surface-color);
    border: 1px solid var(--border-color);
    border-radius: 14px;
    padding: 1rem;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.announcement-card.pinned {
    border-color: rgba(255, 255, 255, 0.35);
    box-shadow: 0 14px 36px rgba(255, 255, 255, 0.06);
}

.announcement-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.5rem;
}

.announcement-title {
    font-weight: 700;
    font-size: 0.95rem;
}

.announcement-pin {
    font-size: 0.7rem;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: var(--text-secondary);
    border: 1px solid rgba(255, 255, 255, 0.15);
    padding: 0.2rem 0.45rem;
    border-radius: 999px;
}

.announcement-body {
    color: var(--text-secondary);
    font-size: 0.9rem;
    line-height: 1.5;
}

.announcement-author {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    margin-bottom: 0.6rem;
}

.announcement-avatar {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    object-fit: cover;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.announcement-author-meta {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.announcement-author-name {
    font-size: 0.85rem;
    font-weight: 700;
}

.announcement-meta {
    margin-top: 0.75rem;
    font-size: 0.75rem;
    color: var(--text-secondary);
}

.announcement-actions {
    display: flex;
    gap: 0.6rem;
    margin-top: 0.75rem;
    flex-wrap: wrap;
}

/* --- NAVIGATION --- */
nav {
    position: fixed;
    top: 0;
    width: 100%;
    padding: 1.2rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 1000;
    background: rgba(5, 5, 5, 0.8);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border-color);
}

.logo {
    font-weight: 800;
    font-size: 1.4rem;
    letter-spacing: -1.5px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
    color: var(--text-primary);
    transition: var(--transition);
}

.logo:hover {
    transform: scale(1.05);
}

.logo-img {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.logo-img img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

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

.nav-actions {
    display: flex;
    align-items: center;
    gap: 0.6rem;
}

.nav-links a {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: 500;
    transition: var(--transition);
    cursor: pointer;
}

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

.nav-discover-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.nav-discover-icon {
    width: 20px;
    height: 20px;
}

.nav-verify-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 0.55rem 0.9rem;
    border-radius: 999px;
    background: linear-gradient(
        120deg,
        rgba(14, 165, 233, 0.16),
        rgba(79, 70, 229, 0.18)
    );
    color: var(--text-primary);
    font-weight: 700;
    font-size: 0.85rem;
    border: 1px solid rgba(14, 165, 233, 0.35);
    box-shadow: 0 6px 20px rgba(14, 165, 233, 0.18);
    transition:
        transform 0.15s ease,
        box-shadow 0.15s ease;
}

.nav-verify-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 8px 24px rgba(14, 165, 233, 0.24);
    text-decoration: none;
}

.nav-verify-btn:active {
    transform: translateY(0);
}

.nav-verify-icon {
    width: 18px;
    height: 18px;
    filter: drop-shadow(0 0 4px rgba(14, 165, 233, 0.5));
}

.nav-monetization-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 0.55rem 0.9rem;
    border-radius: 999px;
    background: linear-gradient(
        120deg,
        rgba(16, 185, 129, 0.16),
        rgba(14, 165, 233, 0.18)
    );
    color: var(--text-primary);
    font-weight: 700;
    font-size: 0.85rem;
    border: 1px solid rgba(16, 185, 129, 0.34);
    box-shadow: 0 6px 20px rgba(16, 185, 129, 0.16);
    transition:
        transform 0.15s ease,
        box-shadow 0.15s ease;
}

.nav-monetization-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 8px 24px rgba(16, 185, 129, 0.24);
    text-decoration: none;
}

.nav-monetization-btn:active {
    transform: translateY(0);
}

.nav-monetization-btn i {
    font-size: 0.95rem;
}

.lang-select {
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    padding: 0.4rem 0.75rem;
    border-radius: 10px;
    font-size: 0.85rem;
    cursor: pointer;
}

.network-status-banner {
    position: fixed;
    left: 50%;
    top: 72px;
    transform: translateX(-50%);
    background: rgba(239, 68, 68, 0.95);
    color: #fff;
    padding: 0.45rem 1rem;
    border-radius: 999px;
    font-size: 0.8rem;
    font-weight: 600;
    display: none;
    align-items: center;
    gap: 0.5rem;
    z-index: 1500;
    box-shadow: 0 12px 30px rgba(239, 68, 68, 0.35);
}

.network-status-banner.is-visible {
    display: inline-flex;
}

@media (max-width: 900px) {
    body.has-mobile-nav {
        padding-bottom: 96px;
    }

    body.has-mobile-nav {
        display: flex;
        flex-direction: column;
    }

    body.has-mobile-nav nav {
        justify-content: center;
    }

    body.has-mobile-nav nav .logo {
        position: absolute;
        left: 1.2rem;
    }

    body.has-mobile-nav nav .nav-links a {
        display: none;
    }

    body.has-mobile-nav nav .nav-links a.nav-discover-btn {
        display: inline-flex;
    }

    body.has-mobile-nav nav .nav-links a.nav-monetization-btn {
        display: inline-flex;
        width: 40px;
        height: 40px;
        padding: 0;
        justify-content: center;
        gap: 0;
    }

    body.has-mobile-nav
        nav
        .nav-links
        a.nav-monetization-btn
        .nav-monetization-label {
        display: none;
    }

    body.has-mobile-nav nav .nav-links {
        justify-content: center;
        width: 100%;
        gap: 0.6rem;
    }

    body.has-mobile-nav .network-status-banner {
        top: 64px;
    }
}

/* --- HERO ABOVE THE FOLD --- */
.hero {
    position: relative;
    padding: 140px 0 80px;
    overflow: hidden;
    background:
        radial-gradient(
            circle at 20% 20%,
            rgba(255, 255, 255, 0.08),
            transparent 35%
        ),
        radial-gradient(
            circle at 80% 10%,
            rgba(255, 255, 255, 0.05),
            transparent 40%
        ),
        linear-gradient(
            135deg,
            rgba(255, 255, 255, 0.03),
            rgba(255, 255, 255, 0)
        );
}

.hero[data-state="hidden"] {
    display: none;
}

.hero[data-state="loading"] {
    min-height: 520px;
}

.hero-loading {
    position: absolute;
    inset: 24px;
    border-radius: 18px;
    background: linear-gradient(
        135deg,
        rgba(255, 255, 255, 0.06),
        rgba(255, 255, 255, 0.015)
    );
    border: 1px solid var(--border-color);
    display: none;
    overflow: hidden;
    z-index: 2;
}

.hero[data-state="loading"] .hero-loading {
    display: block;
}

.hero[data-state="loading"] .hero-grid {
    opacity: 0;
    pointer-events: none;
}

.hero-skel {
    height: 14px;
    border-radius: 999px;
    background: linear-gradient(
        90deg,
        rgba(255, 255, 255, 0.08),
        rgba(255, 255, 255, 0.16),
        rgba(255, 255, 255, 0.08)
    );
    background-size: 180% 100%;
    animation: heroShimmer 1.2s ease-in-out infinite;
    margin-bottom: 10px;
}

.hero-skel-eyebrow {
    width: 26%;
    height: 12px;
    margin-top: 14px;
}
.hero-skel-title {
    width: 60%;
    height: 26px;
}
.hero-skel-lede {
    width: 72%;
    height: 14px;
}
.hero-skel-bullets {
    width: 78%;
    height: 16px;
}
.hero-skel-cta {
    width: 32%;
    height: 40px;
    border-radius: 12px;
    margin-top: 12px;
}

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

.hero::after {
    content: "";
    position: absolute;
    inset: 0;
    background: radial-gradient(
        ellipse at 70% 70%,
        rgba(255, 255, 255, 0.04),
        transparent 45%
    );
    pointer-events: none;
}

.hero-scroll-cue {
    position: absolute;
    left: 50%;
    bottom: 18px;
    transform: translate(-50%, 0);
    width: 44px;
    height: 44px;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.25);
    background: rgba(0, 0, 0, 0.46);
    color: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 4;
    box-shadow: 0 10px 26px rgba(0, 0, 0, 0.35);
    backdrop-filter: blur(4px);
    transition:
        opacity 0.2s ease,
        background 0.2s ease,
        border-color 0.2s ease;
    animation: heroScrollCueBounce 1.55s ease-in-out infinite;
}

.hero-scroll-cue svg {
    width: 20px;
    height: 20px;
    stroke: currentColor;
    stroke-width: 2.4;
    fill: none;
}

.hero-scroll-cue:hover {
    background: rgba(0, 0, 0, 0.65);
    border-color: rgba(255, 255, 255, 0.45);
}

.hero-scroll-cue.is-hidden,
.hero[data-state="loading"] .hero-scroll-cue,
.hero[data-state="hidden"] .hero-scroll-cue {
    opacity: 0;
    pointer-events: none;
}

@keyframes heroScrollCueBounce {
    0%,
    100% {
        transform: translate(-50%, -2px);
    }
    50% {
        transform: translate(-50%, 8px);
    }
}

.hero-grid {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 2.5rem;
    align-items: center;
}

.hero-copy {
    max-width: 620px;
}

.hero-eyebrow {
    letter-spacing: 0.12em;
    text-transform: uppercase;
    font-weight: 700;
    color: var(--text-secondary);
    margin-bottom: 0.75rem;
    font-size: 0.85rem;
}

.hero-title {
    font-family: var(--font-heading);
    font-size: clamp(2.4rem, 3vw + 1rem, 3.4rem);
    margin-bottom: 1rem;
    line-height: 1.05;
}

.hero-lede {
    color: var(--text-secondary);
    font-size: 1.05rem;
    margin-bottom: 1.25rem;
    max-width: 540px;
}

.hero-bullets {
    list-style: none;
    display: grid;
    gap: 0.5rem;
    margin: 0 0 1.5rem 0;
    padding: 0;
}

.hero-bullets li {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    color: var(--text-primary);
    font-weight: 600;
}

.hero-bullets li::before {
    content: \"•\";
    color: var(--accent-color);
    font-size: 1.4rem;
    line-height: 1;
}

.hero-actions {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
    align-items: center;
}

.hero .btn-large {
    width: auto;
    padding: 0.9rem 1.5rem;
    margin-top: 0;
    font-size: 1rem;
}

.hero-secondary {
    border: 1px solid var(--border-color);
}

.hero-meta {
    margin-top: 0.75rem;
    color: var(--text-secondary);
    font-size: 0.95rem;
}

.hero-media {
    position: relative;
}

.hero-video-shell {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-color);
    border-radius: 18px;
    padding: 1.25rem;
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.35);
    position: relative;
    overflow: hidden;
}

.hero-video-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.45rem 0.7rem;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.08);
    color: var(--text-primary);
    font-size: 0.8rem;
    letter-spacing: 0.01em;
}

.hero-video-frame {
    margin-top: 1rem;
    background: linear-gradient(
        160deg,
        rgba(255, 255, 255, 0.06),
        rgba(255, 255, 255, 0.02)
    );
    border: 1px solid var(--border-color);
    border-radius: 14px;
    padding: 0.75rem;
    position: relative;
}

.hero-video-player {
    width: 100%;
    border-radius: 12px;
    display: block;
    background: #000;
    cursor: pointer;
}

.hero-unmute {
    position: absolute;
    bottom: 12px;
    right: 12px;
    padding: 0.5rem 0.75rem;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.25);
    background: rgba(0, 0, 0, 0.6);
    color: #fff;
    cursor: pointer;
    font-weight: 600;
    font-size: 0.85rem;
    backdrop-filter: blur(6px);
    transition: var(--transition);
}

.hero-unmute:hover {
    background: rgba(0, 0, 0, 0.8);
}

.hero-footnote {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-top: 0.75rem;
}

@media (max-width: 900px) {
    .hero {
        padding: 110px 0 44px;
        background: linear-gradient(
            135deg,
            rgba(255, 255, 255, 0.04),
            rgba(255, 255, 255, 0.01)
        );
    }
    .hero-grid {
        grid-template-columns: 1fr;
        gap: 1.25rem;
    }
    .hero-copy {
        order: 1;
    }
    .hero-media {
        display: none;
    }
    #hero-watch-btn {
        display: none;
    }
    .hero-actions {
        flex-direction: column;
        align-items: stretch;
        gap: 0.6rem;
    }
    .hero .btn-large {
        width: 100%;
        justify-content: center;
    }
    .hero-secondary {
        display: none;
    }
    .hero-title {
        font-size: clamp(2.1rem, 4vw + 1rem, 2.6rem);
    }
    .hero-lede {
        font-size: 0.98rem;
        margin-bottom: 1rem;
    }
    .hero-scroll-cue {
        width: 40px;
        height: 40px;
        bottom: 10px;
    }
}

/* --- PAGES --- */
.page {
    display: none;
    min-height: 100vh;
    padding-top: 100px;
    animation: pageEnter 0.6s ease;
}

.page.active {
    display: block;
}

@keyframes pageEnter {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.5rem 5rem;
}

/* --- GRILLE DISCOVER (TRAJECTOIRES) --- */
.discover-header {
    text-align: left;
    margin-bottom: 3rem;
}

.discover-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
}

@media (min-width: 1024px) {
    .discover-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

.user-card {
    background: var(--surface-color);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 1rem 1.1rem;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
}

.user-card.verified-card {
    box-shadow:
        0 0 0 2px rgba(14, 165, 233, 0.28),
        0 10px 30px rgba(0, 0, 0, 0.25);
}

.mood-actions {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    margin: 0.35rem 0 0.5rem;
}

.mood-btn {
    border: 1px solid var(--border-color);
    background: transparent;
    color: var(--text-secondary);
    border-radius: 10px;
    padding: 0.35rem 0.75rem;
    font-size: 0.8rem;
    cursor: pointer;
    transition: all 0.15s ease;
}
.mood-btn:hover {
    background: rgba(255, 255, 255, 0.06);
    color: var(--text-primary);
}

.card-meta {
    display: flex;
    gap: 8px;
    margin: 0.35rem 0 0.5rem;
    align-items: center;
    flex-wrap: wrap;
}

.pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 10px;
    border-radius: 999px;
    font-size: 0.8rem;
    font-weight: 600;
    background: rgba(239, 68, 68, 0.12);
    color: #ef4444;
}

.pill svg {
    width: 16px;
    height: 16px;
}

.pill.verified {
    background: rgba(14, 165, 233, 0.14);
    color: #0ea5e9;
}

.user-card:hover {
    border-color: #444;
    transform: scale(1.02);
    background: var(--surface-hover);
}

.card-top {
    display: flex;
    align-items: center;
    gap: 12px;
}

/* Media preview in discover cards */
.card-media-wrap {
    width: 100%;
    overflow: hidden;
    border-radius: 12px;
    position: relative;
    order: -1; /* Place media at the top */
    background: #000;
}

.card-media {
    width: 100%;
    height: 150px;
    object-fit: cover;
    display: block;
    transition: var(--transition);
    background: #000;
}

.card-media-wrap .xera-carousel-slide img.card-media {
    width: 100%;
    height: 150px;
    object-fit: cover;
}

.card-media-wrap .xera-carousel-arrow {
    width: 30px;
    height: 30px;
    font-size: 1.1rem;
    background: rgba(0, 0, 0, 0.52);
}

.card-media-wrap .xera-carousel-arrow--prev {
    left: 8px;
}

.card-media-wrap .xera-carousel-arrow--next {
    right: 8px;
}

/* Layout adaptations for cards with media */
.user-card.has-media {
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
}

.user-card.has-media .card-content {
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
    flex: 1;
}

/* Text-only posts */
.user-card.text-card {
    gap: 0.75rem;
}
.card-text {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 0.9rem 1rem;
}
.card-text-body {
    margin: 0;
    color: var(--text-primary);
    font-size: 0.95rem;
    line-height: 1.35;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 5;
    -webkit-box-orient: vertical;
}

/* Video-specific adaptations */
.user-card.has-media.video .card-media {
    height: 200px; /* Videos get more height */
    object-fit: contain;
    background: #000;
}

.video-fallback {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 0.5rem;
    background: linear-gradient(135deg, #0b0b0b 0%, #111 100%);
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.85rem;
    letter-spacing: 0.02em;
    z-index: 1;
    pointer-events: none;
}

.card-media-wrap.is-ready .video-fallback,
.immersive-video-wrap.is-ready .video-fallback {
    opacity: 0;
}

.card-media-wrap.has-error .video-fallback,
.immersive-video-wrap.has-error .video-fallback {
    opacity: 1;
}

/* Image-specific adaptations */
.user-card.has-media.image .card-media {
    height: 180px; /* Images get medium height */
}

.user-card.has-media.image
    .card-media-wrap
    .xera-carousel-slide
    img.card-media {
    height: 180px;
}

.card-media-count {
    position: absolute;
    left: 10px;
    bottom: 10px;
    z-index: 6;
    background: rgba(0, 0, 0, 0.58);
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.24);
    border-radius: 999px;
    padding: 3px 8px;
    font-size: 0.72rem;
    font-weight: 600;
    line-height: 1;
    pointer-events: none;
    backdrop-filter: blur(4px);
}

/* Live/Stream adaptations */
.user-card.has-media.live .card-media-wrap {
    background: linear-gradient(135deg, #ef4444, #dc2626);
    position: relative;
}

.user-card.has-media.live .card-media-wrap::after {
    content: "🔴 LIVE";
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
    background: rgba(239, 68, 68, 0.9);
    color: white;
    padding: 0.25rem 0.5rem;
    border-radius: 12px;
    font-size: 0.7rem;
    font-weight: 600;
    backdrop-filter: blur(4px);
}

@media (max-width: 700px) {
    /* reduced height for mobile discover cards */
    .card-media {
        height: 34vh;
        border-radius: 14px;
    }
    .user-card {
        padding: 0.7rem;
        border-radius: 12px;
    }

    /* Mobile: compact vertical "status-like" cards for content */
    .discover-grid {
        gap: 0.6rem;
        grid-template-columns: repeat(2, minmax(140px, 1fr));
    }
    .user-card.has-media {
        padding: 0.5rem;
        border-radius: 10px;
        width: 100%;
        min-width: 0;
    }
    .user-card.has-media .card-content {
        gap: 0.5rem;
    }
    .user-card.has-media .card-media-wrap {
        border-radius: 10px;
    }
    .user-card.has-media .card-media {
        height: auto;
        aspect-ratio: 4 / 3;
        object-fit: cover;
    }
    .user-card.has-media .card-media-wrap .xera-carousel-slide img.card-media {
        height: auto;
        aspect-ratio: 4 / 3;
        object-fit: cover;
    }
    .user-card.has-media.video .card-media {
        height: auto;
        aspect-ratio: 4 / 3;
        object-fit: cover;
    }
    .card-status {
        padding: 0.62rem;
        font-size: 0.8rem;
        line-height: 1.22;
    }
    .card-status .status-title {
        display: -webkit-box;
        white-space: normal;
        -webkit-line-clamp: 2;
        -webkit-box-orient: vertical;
    }
    .card-text {
        padding: 0.65rem 0.72rem;
    }
    .card-text-body {
        font-size: 0.86rem;
        -webkit-line-clamp: 3;
    }
    .card-user-bottom {
        margin-top: 0.35rem !important;
        padding-top: 0.4rem !important;
        gap: 0.45rem !important;
    }
    .card-media-count {
        font-size: 0.68rem;
        bottom: 8px;
        left: 8px;
    }
}

/* subtle overlay to indicate autoplay muted */
.card-media-wrap::after {
    content: "";
    position: absolute;
    pointer-events: none;
}

.card-avatar {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    object-fit: cover;
    background: #222;
    cursor: pointer;
}

.arc-collab-avatars {
    display: flex;
    align-items: center;
    gap: 0;
}

.arc-collab-avatars button {
    background: transparent;
    border: none;
    padding: 0;
    cursor: pointer;
    line-height: 0;
}

.arc-collab-avatars img {
    border-radius: 999px;
    border: 2px solid var(--bg-secondary);
    object-fit: cover;
    background: #222;
}

.arc-collab-avatars button + button {
    margin-left: -8px;
}

.arc-collab-avatars--card {
    margin-left: 0.25rem;
}

.arc-collab-avatars--immersive {
    margin-left: 0.5rem;
}

.arc-collab-avatars--corner {
    position: absolute;
    top: 10px;
    left: 10px;
    z-index: 4;
    background: rgba(0, 0, 0, 0.45);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 999px;
    padding: 3px 6px;
    backdrop-filter: blur(4px);
}

.arc-collab-avatars--corner button + button {
    margin-left: -6px;
}

.arc-collab-avatars--card-corner {
    top: 10px;
    left: 10px;
}

.arc-collab-avatars--immersive-corner {
    top: 14px;
    left: 14px;
}

.arc-collab-more {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-left: 4px;
    min-width: 20px;
    height: 20px;
    border-radius: 999px;
    font-size: 0.7rem;
    font-weight: 700;
    color: #fff;
    background: rgba(255, 255, 255, 0.16);
    border: 1px solid rgba(255, 255, 255, 0.22);
}

.profile-link {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0;
    margin: 0;
    border: none;
    background: transparent;
    color: inherit;
    cursor: pointer;
    text-align: left;
    position: relative;
    min-width: 0;
    max-width: 100%;
}

.profile-link-text {
    min-width: 0;
    max-width: 100%;
}

.immersive-profile-link {
    gap: 0.6rem;
}

.card-meta h3 {
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    transition: var(--transition);
    color: var(--text-primary);
}

.card-meta h3:hover {
    color: var(--accent-color);
    text-decoration: underline;
}

.discover-user-name {
    display: block;
    min-width: 0;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    transition:
        transform 0.2s ease,
        color 0.2s ease,
        text-shadow 0.2s ease;
}

.discover-user-name:hover {
    color: var(--accent-color);
    transform: translateY(-1px);
    text-shadow: 0 4px 14px rgba(0, 0, 0, 0.35);
}

.discover-user-name .username-with-badge {
    display: flex;
    align-items: center;
    gap: 6px;
    max-width: 100%;
    min-width: 0;
}

.discover-user-name .username-label {
    flex: 1 1 auto;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.discover-user-name .username-badge,
.discover-user-name .verification-badge {
    flex-shrink: 0;
}

.card-meta span {
    font-size: 0.75rem;
    color: var(--text-secondary);
    display: block;
}

.card-status {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-color);
    padding: 0.8rem;
    border-radius: 10px;
    font-size: 0.85rem;
    display: flex;
    align-items: flex-start;
    gap: 0.3rem;
    min-width: 0;
    min-height: 52px;
}

.card-status .status-title {
    flex: 1 1 auto;
    display: -webkit-box;
    min-width: 0;
    overflow: hidden;
    white-space: normal;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    line-height: 1.35;
    word-break: break-word;
}

.status-day {
    font-weight: 700;
    color: var(--accent-color);
    margin-right: 0;
    flex-shrink: 0;
}

/* --- FEED EDITORIAL PREMIUM --- */
#discover {
    position: relative;
    isolation: isolate;
    overflow: hidden;
}

#discover::before {
    content: "";
    position: absolute;
    inset: 0 0 auto;
    height: 620px;
    z-index: -1;
    pointer-events: none;
    background:
        radial-gradient(circle at 14% 8%, var(--feed-glow) 0, transparent 32%),
        radial-gradient(
            circle at 82% 16%,
            var(--feed-warm-glow) 0,
            transparent 30%
        ),
        linear-gradient(180deg, rgba(255, 255, 255, 0.035), transparent 70%);
}

#discover .container {
    max-width: 1380px;
}

.discover-editorial-header {
    position: relative;
    display: grid;
    grid-template-columns: minmax(0, 0.85fr) minmax(620px, 0.95fr);
    gap: clamp(0.85rem, 2vw, 1.4rem);
    align-items: center;
    width: 100%;
    max-width: 100%;
    margin-bottom: clamp(1rem, 2.4vw, 1.85rem);
    padding: clamp(0.85rem, 1.8vw, 1.35rem);
    border: 1px solid var(--feed-card-border);
    border-radius: 26px;
    background:
        linear-gradient(135deg, rgba(255, 255, 255, 0.08), transparent 42%),
        rgba(255, 255, 255, 0.025);
    box-shadow: var(--feed-card-shadow);
    overflow: visible;
}

.discover-editorial-header::after {
    content: "";
    position: absolute;
    right: clamp(0.8rem, 3vw, 2.4rem);
    top: -48px;
    width: 150px;
    height: 150px;
    border-radius: 999px;
    background: radial-gradient(
        circle,
        rgba(255, 255, 255, 0.12),
        transparent 66%
    );
    filter: blur(3px);
    pointer-events: none;
}

.discover-editorial-copy,
.discover-editorial-tools {
    position: relative;
    z-index: 1;
}

.discover-editorial-copy {
    display: grid;
    gap: 0.38rem;
    align-content: center;
}

.discover-kicker {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    margin: 0;
    color: var(--text-secondary);
    font-size: 0.68rem;
    font-weight: 800;
    letter-spacing: 0.16em;
    text-transform: uppercase;
}

.discover-kicker::before {
    content: "";
    width: 7px;
    height: 7px;
    border-radius: 999px;
    background: #10b981;
    box-shadow: 0 0 22px rgba(16, 185, 129, 0.95);
}

.discover-heading-row {
    display: flex;
    align-items: center;
    gap: 0.62rem;
    flex-wrap: wrap;
}

.discover-heading-row h2 {
    margin: 0;
    font-family: var(--font-heading);
    font-size: clamp(2rem, 4.35vw, 4.35rem);
    line-height: 0.92;
    letter-spacing: 0;
}

.discover-live-pulse {
    display: inline-flex;
    align-items: center;
    gap: 0.36rem;
    padding: 0.32rem 0.58rem;
    border: 1px solid rgba(239, 68, 68, 0.28);
    border-radius: 999px;
    background: rgba(239, 68, 68, 0.1);
    color: #fecaca;
    font-size: 0.68rem;
    font-weight: 800;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.discover-live-pulse::before {
    content: "";
    width: 6px;
    height: 6px;
    border-radius: 999px;
    background: #ef4444;
    box-shadow: 0 0 16px rgba(239, 68, 68, 0.9);
}

.discover-subtitle {
    max-width: 420px;
    margin: 0;
    color: var(--text-secondary);
    font-size: clamp(0.84rem, 1vw, 0.94rem);
    line-height: 1.35;
    opacity: 0.78;
}

.discover-editorial-tools {
    display: grid;
    grid-template-columns: minmax(390px, max-content) minmax(220px, 1fr);
    align-items: center;
    gap: 0.68rem;
    min-width: 0;
}

.discover-editorial-header .announcements {
    grid-column: 1 / -1;
    margin-top: 0;
}

.discover-filter {
    display: inline-flex;
    justify-self: stretch;
    gap: 0.24rem;
    min-width: 0;
    padding: 0.22rem;
    border: 1px solid var(--feed-card-border);
    border-radius: 999px;
    background: rgba(0, 0, 0, 0.22);
    backdrop-filter: blur(18px);
    overflow-x: auto;
    scrollbar-width: none;
    width: 100%;
}

.discover-filter::-webkit-scrollbar {
    display: none;
}

.discover-filter .filter-btn {
    border: 0;
    border-radius: 999px;
    background: transparent;
    color: var(--text-secondary);
    cursor: pointer;
    flex: 1;
    flex-shrink: 0;
    min-height: 32px;
    font-size: 0.7rem;
    font-weight: 850;
    letter-spacing: 0.08em;
    padding: 0.38rem 0.72rem;
    text-transform: uppercase;
    transition:
        background 0.22s ease,
        color 0.22s ease,
        transform 0.22s ease;
}

@media (min-width: 1024px) {
    .discover-filter .filter-btn {
        flex: 0 0 auto;
    }
}

.discover-filter .filter-btn:hover {
    color: var(--text-primary);
    transform: translateY(-1px);
}

.discover-filter .filter-btn.active {
    background: var(--accent-color);
    color: var(--bg-color);
    box-shadow: 0 8px 20px rgba(255, 255, 255, 0.11);
}

.discover-search-shell {
    margin-top: 0;
    max-width: none;
    min-width: 0;
    width: 100%;
}

.discover-search-shell .search-input-wrapper {
    border: 1px solid var(--feed-card-border);
    border-radius: 16px;
    background: rgba(0, 0, 0, 0.24);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06);
    backdrop-filter: blur(18px);
}

.discover-search-shell .search-input {
    min-height: 38px;
    min-width: 0;
    padding: 0.42rem 2.2rem;
    border: 0;
    background: transparent;
    font-size: 0.84rem;
}

.discover-search-shell .search-input:focus {
    border: 0;
    background: transparent;
    box-shadow: none;
}

.discover-search-shell .search-icon {
    left: 0.78rem;
    width: 15px;
    height: 15px;
}

#discover .discover-grid {
    --feed-gap: 22px;
    --feed-grid-max: 1288px;
    display: grid;
    grid-template-columns: repeat(12, minmax(0, 1fr));
    align-items: stretch;
    gap: var(--feed-gap);
    width: min(100%, var(--feed-grid-max));
    margin-inline: auto;
}

#discover .discover-grid > .user-card {
    grid-column: span 3;
    min-width: 0;
}

#discover .discover-grid > .empty-state,
#discover .discover-grid > .loading-state-container {
    grid-column: 1 / -1;
    max-width: 100%;
}

#discover .discover-grid > .discover-skeleton-grid,
#discover .discover-grid > .discover-section-divider {
    grid-column: 1 / -1;
}

#discover .discover-grid > .user-card.discover-row-size-4 {
    grid-column: span 3;
}

#discover .discover-grid > .user-card.discover-row-size-3,
#discover .discover-grid > .user-card.discover-row-size-2,
#discover .discover-grid > .user-card.discover-row-size-1 {
    grid-column: span 4;
}

#discover .discover-grid > .user-card.discover-row-size-2.discover-row-start {
    grid-column: 3 / span 4;
}

#discover .discover-grid > .user-card.discover-row-size-1.discover-row-start {
    grid-column: 5 / span 4;
}

.user-card.editorial-card {
    position: relative;
    isolation: isolate;
    gap: 0;
    min-height: 430px;
    padding: 0;
    overflow: hidden;
    border: 1px solid var(--feed-card-border);
    border-radius: 26px;
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.08), transparent 44%),
        var(--feed-card-bg);
    box-shadow: 0 16px 46px rgba(0, 0, 0, 0.18);
    transform-origin: center;
}

.discover-skeleton-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: var(--feed-gap, 22px);
    width: 100%;
}

.discover-skeleton-card {
    min-height: 410px;
    overflow: hidden;
    border: 1px solid var(--feed-card-border);
    border-radius: 24px;
    background: var(--feed-card-bg);
    box-shadow: 0 16px 46px rgba(0, 0, 0, 0.12);
}

.discover-skeleton-media,
.discover-skeleton-line,
.discover-skeleton-avatar {
    position: relative;
    overflow: hidden;
    background: rgba(255, 255, 255, 0.075);
}

.discover-skeleton-media::after,
.discover-skeleton-line::after,
.discover-skeleton-avatar::after {
    content: "";
    position: absolute;
    inset: 0;
    transform: translateX(-100%);
    background: linear-gradient(
        90deg,
        transparent,
        rgba(255, 255, 255, 0.14),
        transparent
    );
    animation: discoverSkeletonSweep 1.35s ease-in-out infinite;
}

.discover-skeleton-media {
    height: clamp(180px, 15vw, 230px);
    border-radius: 24px 24px 18px 18px;
}

.discover-skeleton-body {
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
    padding: 1rem;
}

.discover-skeleton-line {
    width: 82%;
    height: 12px;
    border-radius: 999px;
}

.discover-skeleton-line--title {
    width: 94%;
    height: 18px;
}

.discover-skeleton-line--small {
    width: 54%;
}

.discover-skeleton-meta {
    display: flex;
    align-items: center;
    gap: 0.7rem;
    margin-top: 0.4rem;
}

.discover-skeleton-avatar {
    width: 34px;
    height: 34px;
    flex-shrink: 0;
    border-radius: 12px;
}

@keyframes discoverSkeletonSweep {
    100% {
        transform: translateX(100%);
    }
}

.discover-section-divider {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.35rem 0.15rem 0;
    color: var(--text-primary);
}

.discover-section-divider span {
    font-family: var(--font-heading);
    font-size: 1.05rem;
    font-weight: 800;
}

.discover-section-divider small {
    min-width: 0;
    overflow: hidden;
    color: var(--text-secondary);
    font-size: 0.78rem;
    font-weight: 650;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.user-card.editorial-card::before {
    content: "";
    position: absolute;
    inset: -1px;
    z-index: 0;
    border-radius: inherit;
    background:
        radial-gradient(
            circle at 22% 8%,
            rgba(255, 255, 255, 0.14),
            transparent 32%
        ),
        radial-gradient(
            circle at 88% 0,
            color-mix(in srgb, var(--state-color, #10b981) 22%, transparent),
            transparent 34%
        );
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.28s ease;
}

.user-card.editorial-card:hover {
    border-color: rgba(255, 255, 255, 0.2);
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.095), transparent 44%),
        var(--feed-card-bg);
    box-shadow: var(--feed-card-shadow);
    transform: translateY(-6px);
}

.user-card.editorial-card:hover::before {
    opacity: 1;
}

.discover-card-actions {
    position: absolute;
    top: 0.72rem;
    left: 0.72rem;
    z-index: 8;
}

.discover-card-action-trigger {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 999px;
    background: rgba(0, 0, 0, 0.42);
    color: rgba(255, 255, 255, 0.86);
    cursor: pointer;
    font-size: 0.72rem;
    font-weight: 900;
    letter-spacing: -0.12em;
    opacity: 0;
    transform: translateY(-3px);
    transition:
        opacity 0.18s ease,
        transform 0.18s ease,
        background 0.18s ease;
    backdrop-filter: blur(12px);
}

.user-card.editorial-card:hover .discover-card-action-trigger,
.user-card.editorial-card:focus-within .discover-card-action-trigger {
    opacity: 1;
    transform: translateY(0);
}

.discover-card-action-trigger:hover {
    background: rgba(0, 0, 0, 0.62);
}

.discover-card-action-menu {
    position: absolute;
    top: calc(100% + 0.42rem);
    left: 0;
    display: none;
    min-width: 150px;
    padding: 0.35rem;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 14px;
    background: rgba(12, 12, 12, 0.94);
    box-shadow: 0 18px 42px rgba(0, 0, 0, 0.35);
    backdrop-filter: blur(18px);
}

.discover-card-actions:hover .discover-card-action-menu,
.discover-card-actions:focus-within .discover-card-action-menu {
    display: grid;
}

.discover-card-action-menu button {
    width: 100%;
    border: 0;
    border-radius: 10px;
    background: transparent;
    color: rgba(255, 255, 255, 0.88);
    cursor: pointer;
    padding: 0.55rem 0.65rem;
    text-align: left;
    font-size: 0.78rem;
    font-weight: 700;
}

.discover-card-action-menu button:hover {
    background: rgba(255, 255, 255, 0.08);
}

.user-card.editorial-card .card-media-wrap {
    position: relative;
    border-radius: 24px 24px 18px 18px;
    background:
        radial-gradient(
            circle at 24% 18%,
            rgba(255, 255, 255, 0.08),
            transparent 36%
        ),
        #050505;
}

.discover-video-progress {
    position: absolute;
    right: 0.72rem;
    bottom: 0.72rem;
    left: 0.72rem;
    z-index: 6;
    height: 3px;
    overflow: hidden;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.18);
}

.discover-video-progress span {
    display: block;
    width: var(--video-progress, 0%);
    height: 100%;
    border-radius: inherit;
    background: #ef4444;
    transition: width 0.18s linear;
}

.user-card.editorial-card .card-media-wrap::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 2;
    pointer-events: none;
    background:
        linear-gradient(180deg, transparent 45%, rgba(0, 0, 0, 0.66)),
        linear-gradient(135deg, rgba(0, 0, 0, 0.18), transparent 42%);
}

.user-card.editorial-card .card-media {
    height: clamp(180px, 15vw, 230px);
    filter: saturate(1.04) contrast(1.03);
    transform: scale(1.001);
    transition:
        transform 0.5s cubic-bezier(0.23, 1, 0.32, 1),
        filter 0.5s ease;
}

.user-card.editorial-card:hover .card-media {
    filter: saturate(1.12) contrast(1.06);
    transform: scale(1.04);
}

.user-card.editorial-card.has-media.video .card-media {
    height: clamp(180px, 15vw, 230px);
    object-fit: cover;
}

.user-card.editorial-card .card-content {
    position: relative;
    z-index: 3;
    display: flex;
    flex: 1;
    flex-direction: column;
    gap: 0.78rem;
    padding: 1rem;
}

.user-card.editorial-card.has-media .card-content {
    margin-top: 0;
    padding-top: 14px;
}

.user-card.editorial-card.text-card .card-content {
    padding: 1.12rem;
}

.card-status--editorial {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 0.48rem;
    min-height: 0;
    padding: 0.84rem 0.9rem;
    border-color: color-mix(
        in srgb,
        var(--state-color, #10b981) 24%,
        transparent
    );
    border-radius: 18px;
    background:
        linear-gradient(
            135deg,
            color-mix(in srgb, var(--state-color, #10b981) 15%, transparent),
            rgba(0, 0, 0, 0.28)
        ),
        rgba(10, 10, 10, 0.55);
    color: var(--text-primary);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(18px);
}

.status-meta-row {
    display: flex;
    align-items: center;
    gap: 0.45rem;
    min-width: 0;
}

.status-pill,
.card-status--editorial .status-day {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 22px;
    border-radius: 999px;
    font-size: 0.66rem;
    font-weight: 850;
    letter-spacing: 0.08em;
    line-height: 1;
    text-transform: uppercase;
}

.status-pill {
    padding: 0.28rem 0.5rem;
    background: color-mix(
        in srgb,
        var(--state-color, #10b981) 18%,
        transparent
    );
    color: var(--state-color, #10b981);
}

.card-status--editorial .status-day {
    padding: 0.25rem 0.46rem;
    background: rgba(255, 255, 255, 0.08);
    color: var(--text-primary);
}

.card-status--editorial .status-title {
    color: var(--text-primary);
    font-family: var(--font-heading);
    font-size: clamp(0.98rem, 1.2vw, 1.2rem);
    font-weight: 780;
    letter-spacing: -0.02em;
    line-height: 1.08;
    -webkit-line-clamp: 2;
}

.card-arc-info {
    display: flex;
    align-items: center;
    gap: 0.38rem;
    max-width: 100%;
    color: var(--text-secondary);
    font-size: 0.74rem;
    font-weight: 700;
}

.card-arc-info span {
    min-width: 0;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.card-text {
    border-color: var(--feed-card-border);
    background: var(--feed-muted-surface);
}

.card-description,
.card-user-title {
    min-width: 0;
    overflow: hidden;
    color: var(--text-secondary);
    text-overflow: ellipsis;
    white-space: nowrap;
}

.card-description {
    font-size: 0.86rem;
    line-height: 1.35;
}

.card-action-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.55rem;
    margin-top: 0.1rem;
}

.card-badge-row {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    min-width: 0;
    flex-wrap: wrap;
}

.user-card.editorial-card .courage-btn {
    flex-shrink: 0;
    margin-top: 0;
    min-height: 34px;
    border-radius: 999px;
    border-color: var(--feed-card-border);
    background: rgba(255, 255, 255, 0.075);
    color: var(--text-primary);
}

.user-card.editorial-card .courage-btn:hover {
    background: rgba(255, 255, 255, 0.13);
    transform: translateY(-1px);
}

.user-card.editorial-card .card-user-bottom {
    display: flex;
    align-items: center;
    gap: 0.72rem !important;
    min-width: 0;
    margin-top: auto !important;
    padding-top: 0.72rem !important;
    border-top: 1px solid rgba(255, 255, 255, 0.075);
}

.user-card.editorial-card .card-user-bottom .profile-link {
    flex: 1 1 auto;
}

.user-card.editorial-card .card-user-bottom .card-avatar {
    width: 34px;
    height: 34px;
    border-radius: 12px;
}

.user-card.editorial-card .card-user-bottom .discover-user-name {
    margin: 0;
    font-size: 0.9rem;
}

.card-user-title {
    font-size: 0.72rem;
}

.user-card.editorial-card .card-stats-overlay {
    z-index: 5;
}

.user-card.editorial-card .stat-pill {
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 999px;
    background: rgba(0, 0, 0, 0.54);
}

.user-card.editorial-card.live .card-media-wrap::after {
    content: "LIVE";
    position: absolute;
    top: 0.72rem;
    left: 0.72rem;
    right: auto;
    z-index: 6;
    padding: 0.34rem 0.58rem;
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 999px;
    background: rgba(239, 68, 68, 0.94);
    color: #fff;
    font-size: 0.68rem;
    font-weight: 900;
    letter-spacing: 0.1em;
    animation: feedLivePulse 1.8s ease-in-out infinite;
    backdrop-filter: blur(10px);
}

@keyframes feedLivePulse {
    0%,
    100% {
        box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.32);
    }
    50% {
        box-shadow: 0 0 0 8px rgba(239, 68, 68, 0);
    }
}

html.light-mode .discover-live-pulse {
    color: #991b1b;
}

html.light-mode .discover-filter,
html.light-mode .discover-search-shell .search-input-wrapper {
    background: rgba(255, 255, 255, 0.72);
}

html.light-mode .card-status--editorial {
    background:
        linear-gradient(
            135deg,
            color-mix(in srgb, var(--state-color, #10b981) 12%, transparent),
            rgba(255, 255, 255, 0.72)
        ),
        rgba(255, 255, 255, 0.84);
}

@media (max-width: 1439px) {
    #discover .discover-grid {
        --feed-grid-max: 1012px;
    }

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

    .discover-editorial-tools {
        grid-template-columns: minmax(390px, max-content) minmax(260px, 1fr);
    }

    .discover-skeleton-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (max-width: 1023px) {
    .discover-editorial-header {
        grid-template-columns: 1fr;
        align-items: start;
        gap: 0.9rem;
        border-radius: 24px;
    }

    .discover-editorial-tools,
    .discover-filter {
        justify-self: stretch;
    }

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

    .discover-filter {
        width: 100%;
    }

    #discover .discover-grid {
        --feed-grid-max: 744px;
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .discover-skeleton-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    #discover .discover-grid > .user-card,
    #discover .discover-grid > .user-card.discover-row-size-4,
    #discover .discover-grid > .user-card.discover-row-size-3,
    #discover .discover-grid > .user-card.discover-row-size-2,
    #discover .discover-grid > .user-card.discover-row-size-1,
    #discover
        .discover-grid
        > .user-card.discover-row-size-2.discover-row-start,
    #discover
        .discover-grid
        > .user-card.discover-row-size-1.discover-row-start {
        grid-column: span 1;
    }
}

@media (max-width: 700px) {
    .discover-editorial-header {
        gap: 0.68rem;
        margin-bottom: 0.82rem;
        padding: 0.72rem;
        border-radius: 20px;
    }

    .discover-editorial-copy {
        gap: 0.28rem;
    }

    .discover-kicker {
        font-size: 0.62rem;
        letter-spacing: 0.14em;
    }

    .discover-heading-row h2 {
        font-size: clamp(1.9rem, 9.4vw, 2.65rem);
        line-height: 0.96;
    }

    .discover-live-pulse {
        padding: 0.28rem 0.5rem;
        font-size: 0.61rem;
    }

    .discover-subtitle {
        max-width: 100%;
        font-size: 0.78rem;
        line-height: 1.28;
    }

    .discover-editorial-tools {
        grid-template-columns: 1fr;
        gap: 0.48rem;
    }

    .discover-filter {
        width: 100%;
    }

    .discover-filter .filter-btn {
        min-height: 30px;
        padding: 0.32rem 0.58rem;
        font-size: 0.66rem;
    }

    .discover-search-shell .search-input {
        min-height: 36px;
        padding-block: 0.34rem;
        font-size: 0.8rem;
    }

    #discover .discover-grid {
        --feed-gap: 20px;
        --feed-grid-max: 520px;
        grid-template-columns: 1fr;
    }

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

    .discover-section-divider {
        align-items: flex-start;
        flex-direction: column;
        gap: 0.2rem;
        padding-inline: 0.2rem;
    }

    .discover-card-action-trigger {
        opacity: 1;
        transform: none;
    }

    #discover .discover-grid > .user-card,
    #discover .discover-grid > .user-card.discover-row-size-4,
    #discover .discover-grid > .user-card.discover-row-size-3,
    #discover .discover-grid > .user-card.discover-row-size-2,
    #discover .discover-grid > .user-card.discover-row-size-1,
    #discover
        .discover-grid
        > .user-card.discover-row-size-2.discover-row-start,
    #discover
        .discover-grid
        > .user-card.discover-row-size-1.discover-row-start {
        grid-column: span 1;
    }

    .user-card.editorial-card {
        min-height: 0;
        border-radius: 18px;
    }

    .user-card.editorial-card .card-media-wrap {
        border-radius: 17px 17px 13px 13px;
    }

    .user-card.editorial-card .card-media,
    .user-card.editorial-card.has-media.video .card-media,
    .user-card.editorial-card
        .card-media-wrap
        .xera-carousel-slide
        img.card-media {
        height: auto;
        aspect-ratio: 4 / 3;
        object-fit: cover;
    }

    .user-card.editorial-card.has-media .card-content {
        margin-top: 0;
        padding-top: 12px;
    }

    .user-card.editorial-card .card-content {
        gap: 0.58rem;
        padding: 0.68rem;
    }

    .card-status--editorial {
        gap: 0.36rem;
        padding: 0.64rem;
        border-radius: 14px;
    }

    .card-status--editorial .status-title {
        font-size: 0.92rem;
        letter-spacing: -0.02em;
    }

    .status-pill,
    .card-status--editorial .status-day {
        min-height: 19px;
        font-size: 0.58rem;
        letter-spacing: 0.06em;
    }

    .user-card.editorial-card .card-user-bottom {
        gap: 0.48rem !important;
        padding-top: 0.54rem !important;
    }

    .user-card.editorial-card .card-user-bottom .card-avatar {
        width: 28px;
        height: 28px;
        border-radius: 9px;
    }

    .user-card.editorial-card .card-user-bottom .discover-user-name {
        font-size: 0.78rem;
    }

    .card-user-title,
    .card-arc-info,
    .card-description {
        font-size: 0.66rem;
    }

    .user-card.editorial-card .courage-btn {
        min-height: 30px;
        padding: 4px 8px;
    }
}

@media (max-width: 520px) {
    #discover .discover-grid {
        --feed-grid-max: 100%;
    }

    .discover-search-shell {
        padding: 0;
    }

    .discover-filter {
        width: 100%;
    }

    .discover-filter .filter-btn {
        flex: 1;
    }
}

/* --- MODE IMMERSIF (TYPE TIKTOK / PROGRESSION) --- */
#immersive-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #000;
    z-index: 2000;
    display: none;
    overflow-y: scroll;
    scroll-snap-type: y mandatory;
    scroll-behavior: smooth;
    overscroll-behavior: contain;
}

.immersive-nav-arrows {
    position: fixed;
    right: 28px;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    flex-direction: column;
    gap: 12px;
    z-index: 1001;
    pointer-events: none;
}

.immersive-arrow {
    width: 46px;
    height: 46px;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.18);
    color: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition:
        transform 0.15s ease,
        background 0.15s ease,
        border-color 0.15s ease,
        opacity 0.15s ease;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.25);
    pointer-events: auto;
}

.immersive-arrow:hover {
    background: rgba(255, 255, 255, 0.16);
    border-color: rgba(255, 255, 255, 0.3);
    transform: translateY(-2px);
}

.immersive-arrow:active {
    transform: translateY(0);
}

.immersive-arrow:disabled {
    opacity: 0.35;
    cursor: default;
    transform: none;
    box-shadow: none;
}

.immersive-arrow svg {
    width: 22px;
    height: 22px;
    stroke: currentColor;
    stroke-width: 2;
    fill: none;
}

@media (max-width: 960px) {
    .immersive-nav-arrows {
        display: none;
    }
}

@media (max-width: 600px) {
    .immersive-post {
        padding: 0;
    }
    .post-content-wrap {
        width: 100% !important;
        height: 100% !important;
        max-width: 100% !important;
        max-height: 100% !important;
        border-radius: 0 !important;
        border: none !important;
        aspect-ratio: auto !important;
    }
    .post-info {
        padding: 4rem 1.2rem calc(1.2rem + env(safe-area-inset-bottom)) !important;
    }
    .close-immersive {
        top: calc(10px + env(safe-area-inset-top));
        right: 15px;
        background: rgba(0, 0, 0, 0.3);
        backdrop-filter: blur(4px);
    }
    .post-content-wrap > img,
    .post-content-wrap > video,
    .post-content-wrap .immersive-video {
        object-fit: cover !important;
    }
}

#immersive-overlay::-webkit-scrollbar {
    width: 0;
    height: 0;
}

#immersive-overlay.immersive-clean-mode .post-info {
    pointer-events: auto;
}

#immersive-overlay.immersive-clean-mode
    .immersive-post:not(.is-ui-visible)
    .post-info
    h2,
#immersive-overlay.immersive-clean-mode
    .immersive-post:not(.is-ui-visible)
    .post-info
    > p,
#immersive-overlay.immersive-clean-mode
    .immersive-post:not(.is-ui-visible)
    .post-stats
    .stat-pill {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
    transition:
        opacity 0.18s ease,
        transform 0.18s ease;
}

.immersive-post {
    height: 100vh;
    width: 100%;
    scroll-snap-align: start;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    padding: 2vh 0;
}

.post-content-wrap {
    width: min(92vw, 56vh);
    max-width: 560px;
    height: auto;
    max-height: 92vh;
    aspect-ratio: 9 / 16;
    background: #000;
    border-radius: 16px;
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.08);
    display: flex;
    align-items: center;
    justify-content: center;
}

.post-content-wrap > img,
.post-content-wrap > video,
.post-content-wrap .immersive-video {
    width: 100%;
    height: 100%;
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    display: block;
}

.immersive-video-wrap {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.immersive-video {
    object-fit: contain;
    background: #000;
}

.video-buffering-spinner {
    position: absolute;
    inset: 0;
    display: none;
    align-items: center;
    justify-content: center;
    background: radial-gradient(
        circle,
        rgba(0, 0, 0, 0.35),
        rgba(0, 0, 0, 0.55)
    );
    z-index: 5;
    pointer-events: none;
}

.video-buffering-spinner .spinner-ring {
    width: 48px;
    height: 48px;
    border: 4px solid rgba(255, 255, 255, 0.2);
    border-top-color: #fff;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

.immersive-image-wrap {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #000;
}

.immersive-image {
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    object-fit: contain;
    display: block;
}

.immersive-text-card {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #111 0%, #050505 100%);
    padding: 1.8rem;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-primary);
    text-align: center;
    overflow-y: auto;
}
.immersive-text-card p {
    margin: 0;
    font-size: 1.05rem;
    line-height: 1.45;
    white-space: pre-wrap;
}

.immersive-placeholder {
    width: min(92vw, 56vh);
    max-width: 560px;
    aspect-ratio: 9 / 16;
    height: auto;
    background: linear-gradient(135deg, #1a1a1a 0%, #0a0a0a 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #333;
    font-size: 0.9rem;
}

.post-info {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    padding: 2.5rem 2rem calc(2rem + env(safe-area-inset-bottom));
    background: linear-gradient(
        transparent,
        rgba(0, 0, 0, 0.65),
        rgba(0, 0, 0, 0.8)
    );
}

.immersive-post .post-info h2 {
    font-size: 1rem;
    font-weight: 900;
    line-height: 1.2;
    margin: 0.6rem 0 0.35rem 0;
    padding: 0;
}

.immersive-post .post-info p {
    font-size: 0.8rem;
    line-height: 1.3;
    margin: 0.2rem 0 0.4rem;
}

.step-indicator {
    background: var(--accent-color);
    color: #000;
    padding: 4px 12px;
    border-radius: 4px;
    font-weight: 800;
    font-size: 0.7rem;
    text-transform: uppercase;
    margin-bottom: 10px;
    display: inline-block;
}

.state-tag {
    font-size: 0.8rem;
    color: var(--text-secondary);
    margin-left: 10px;
}

.immersive-meta-row {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.time-ago-label {
    color: #c0c0c0;
    font-size: 0.78rem;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-weight: 500;
}

.time-ago-label::before {
    content: "•";
    color: #c0c0c0;
    font-size: 0.8rem;
}

.immersive-post-user {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    margin-top: 0.8rem;
    color: #fff;
    font-weight: 600;
    transition:
        opacity 0.2s ease,
        transform 0.2s ease;
}

.immersive-post-user:hover {
    opacity: 0.9;
    transform: translateY(-1px);
}

.immersive-post-user-avatar {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    object-fit: cover;
    border: 1px solid rgba(255, 255, 255, 0.4);
}

.immersive-post-user-name {
    font-size: 0.9rem;
}

.immersive-post-user-name:hover {
    color: var(--accent-color);
}

.btn-follow-immersive.inline {
    padding: 4px 8px;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.btn-follow-immersive.inline:hover {
    background: rgba(255, 255, 255, 0.16);
}

/* --- PAGE PROFIL (TIMELINE) --- */
.profile-container {
    max-width: 1000px;
    margin: 0 auto;
    padding-left: clamp(0.75rem, 4vw, 2.5rem);
    padding-right: clamp(0.75rem, 4vw, 2.5rem);
    width: 100%;
    transition: var(--transition);
}

/* Thème Dynamique & Arrière-plan */
.profile-container[style*="--profile-accent"] {
    position: relative;
    min-height: 100vh;
    background: linear-gradient(
        180deg,
        rgba(var(--profile-accent-rgb), 0.08) 0%,
        rgba(var(--profile-accent-2-rgb), 0.03) 300px,
        var(--bg-color) 600px,
        var(--bg-color) 100%
    ) !important;
}

.profile-panel-glass {
    backdrop-filter: blur(12px) saturate(1.2);
    -webkit-backdrop-filter: blur(12px) saturate(1.2);
}

.profile-panel-solid {
    background-color: var(--surface-color);
}

.profile-panel-minimal {
    background: transparent;
    border: none;
    box-shadow: none;
}

.profile-hero {
    text-align: center;
    margin-bottom: clamp(2.5rem, 8vw, 4rem);
    position: relative;
}

.profile-role-badge {
    margin: 0.25rem auto 0.55rem;
    display: inline-flex;
    align-items: center;
    gap: 0.42rem;
    border-radius: 999px;
    padding: 0.32rem 0.75rem;
    font-size: 0.78rem;
    font-weight: 700;
    border: 1px solid var(--border-color);
    background: rgba(255, 255, 255, 0.05);
}

.profile-role-badge img {
    width: 14px;
    height: 14px;
    display: block;
}

.profile-role-badge--recruiter {
    border-color: rgba(37, 99, 235, 0.45);
    color: #93c5fd;
    background: rgba(37, 99, 235, 0.16);
}

.profile-role-badge--investor {
    border-color: rgba(245, 158, 11, 0.42);
    color: #fcd34d;
    background: rgba(245, 158, 11, 0.14);
}

.profile-verify-block {
    margin: 0;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    display: flex;
    align-items: center;
    justify-content: center;
}

.profile-verify-block .verify-copy {
    display: none;
}

.profile-verify-cta {
    position: relative;
    isolation: isolate;
    overflow: hidden;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    min-height: 40px;
    border: none;
    border-radius: 14px;
    padding: 0.58rem 0.88rem;
    background:
        linear-gradient(135deg, rgba(255, 255, 255, 0.24), transparent 34%),
        linear-gradient(135deg, #10b981 0%, #0ea5e9 46%, #6366f1 100%);
    color: #fff;
    font-weight: 850;
    font-size: 0.82rem;
    letter-spacing: 0;
    cursor: pointer;
    box-shadow:
        0 14px 30px rgba(14, 165, 233, 0.22),
        0 7px 18px rgba(16, 185, 129, 0.15),
        inset 0 1px 0 rgba(255, 255, 255, 0.38),
        inset 0 -10px 22px rgba(4, 8, 18, 0.22);
    transition:
        transform 0.18s cubic-bezier(0.22, 1, 0.36, 1),
        box-shadow 0.18s ease,
        filter 0.18s ease;
}

.profile-verify-cta::before {
    content: "";
    position: absolute;
    inset: -2px;
    z-index: 0;
    background: linear-gradient(
        110deg,
        transparent 0%,
        rgba(255, 255, 255, 0.34) 42%,
        transparent 60%
    );
    transform: translateX(-115%);
    transition: transform 0.55s cubic-bezier(0.22, 1, 0.36, 1);
}

.profile-verify-cta::after {
    content: "";
    position: absolute;
    inset: 1px;
    z-index: 0;
    border-radius: inherit;
    border: 1px solid rgba(255, 255, 255, 0.24);
    pointer-events: none;
}

.profile-verify-cta span,
.profile-verify-cta img {
    position: relative;
    z-index: 1;
}

.profile-verify-cta img {
    width: 18px;
    height: 18px;
    filter: drop-shadow(0 2px 5px rgba(0, 0, 0, 0.22));
}
.profile-verify-cta:hover {
    filter: saturate(1.08) brightness(1.04);
    transform: translateY(-2px);
    box-shadow:
        0 18px 38px rgba(14, 165, 233, 0.3),
        0 10px 24px rgba(16, 185, 129, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.44),
        inset 0 -10px 22px rgba(4, 8, 18, 0.18);
}
.profile-verify-cta:hover::before {
    transform: translateX(115%);
}
.profile-verify-cta:active {
    transform: translateY(0) scale(0.99);
}

.profile-banner {
    width: 100%;
    height: clamp(160px, 30vh, 320px);
    border-radius: clamp(12px, 3vw, 20px);
    margin-bottom: clamp(-50px, -6vw, -70px);
    object-fit: cover;
    border: 1px solid var(--border-color);
    transition: var(--transition);
}

.profile-avatar-wrapper {
    position: relative;
    z-index: 10;
    display: inline-block;
    margin-bottom: clamp(1.5rem, 5vw, 2.5rem);
}

.profile-avatar-img {
    width: clamp(90px, 15vw, 130px);
    height: clamp(90px, 15vw, 130px);
    border-radius: clamp(18px, 4vw, 28px);
    border: clamp(3px, 0.8vw, 5px) solid var(--bg-color);
    object-fit: cover;
    background: var(--surface-hover);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
}

.timeline {
    position: relative;
    padding-left: clamp(25px, 6vw, 45px);
    width: 100%;
}

.timeline::before {
    content: "";
    position: absolute;
    left: clamp(10px, 2vw, 18px);
    top: 0;
    bottom: 0;
    width: 1px;
    background: var(--border-color);
}

.timeline-item {
    position: relative;
    margin-bottom: clamp(2.5rem, 8vw, 4.5rem);
    width: 100%;
}

.timeline-dot {
    position: absolute;
    left: clamp(-20px, -4.5vw, -36px);
    top: 8px;
    width: clamp(10px, 1.5vw, 16px);
    height: clamp(10px, 1.5vw, 16px);
    border-radius: 50%;
    background: var(--surface-color);
    border: 2px solid var(--border-color);
    z-index: 2;
}

.item-success .timeline-dot {
    border-color: var(--success);
    background: var(--success);
}
.item-failure .timeline-dot {
    border-color: var(--failure);
    background: var(--failure);
}
.item-empty .timeline-dot {
    border-color: #333;
    background: transparent;
}

.timeline-date {
    font-size: 0.68rem;
    font-weight: 700;
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
    text-transform: uppercase;
}

.timeline-date span {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    text-transform: none;
    font-weight: 600;
    font-size: 0.62rem;
    padding: 2px 8px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.06);
    color: rgba(255, 255, 255, 0.65);
}

.timeline-card {
    background: var(--surface-color);
    border: 1px solid var(--border-color);
    border-radius: clamp(10px, 2vw, 16px);
    padding: clamp(1rem, 4vw, 1.75rem);
    min-width: 0;
    width: 100%;
    overflow-wrap: break-word;
}

.timeline-card h4 {
    margin-bottom: 0.35rem;
    font-size: clamp(0.9rem, 2.5vw, 1.1rem);
}
.timeline-card p {
    color: var(--text-secondary);
    font-size: clamp(0.8rem, 2vw, 0.95rem);
}

/* Limiter les débordements des titres et descriptions longues */
.timeline-card h4,
.timeline-item-latest .timeline-card h4 {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    word-break: break-word;
    overflow-wrap: anywhere;
}

.timeline-card p,
.timeline-item-latest .timeline-card p {
    display: -webkit-box;
    -webkit-line-clamp: 5;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    word-break: break-word;
    overflow-wrap: anywhere;
    line-height: 1.5;
}

.timeline-media {
    margin-top: 1rem;
    width: 100%;
    overflow: hidden;
    border-radius: 10px;
}

.timeline-media video,
.timeline-media img {
    width: 100%;
    max-width: 100%;
    height: auto;
    max-height: clamp(300px, 60vh, 550px);
    object-fit: cover;
    border-radius: inherit;
    background: #000;
    display: block;
}

/* Profil: vidéos en format vertical dans les cartes */
.profile-open .timeline-media video {
    aspect-ratio: 9 / 16;
    object-fit: cover;
    max-height: 420px;
}

.arc-view .timeline-card {
    padding: 1rem;
}

.arc-view .timeline-card h4 {
    font-size: 0.85rem;
    margin-bottom: 0.35rem;
}

.arc-view .timeline-card p {
    font-size: 0.78rem;
}

.arc-view .timeline-date {
    font-size: 0.6rem;
}

.arc-view .timeline-media video,
.arc-view .timeline-media img {
    max-height: 180px;
}

.empty-indicator {
    font-style: italic;
    color: #444;
    font-size: 0.9rem;
}

/* --- TIMELINE COLLAPSIBLE --- */
.timeline-latest {
    position: relative;
}

.timeline-item-latest {
    display: flex;
    gap: 1.5rem;
    align-items: flex-start;
    padding: 1.5rem;
    background: var(--surface-color);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    margin-bottom: 1.5rem;
}

.timeline-item-latest .timeline-dot-badge {
    flex-shrink: 0;
}

.timeline-item-latest .timeline-date {
    font-size: 0.7rem;
    margin-bottom: 0.3rem;
}

.timeline-item-latest .timeline-card {
    background: transparent;
    border: none;
    padding: 0;
    padding-left: 1rem;
}

.timeline-item-latest .timeline-card h4 {
    margin-bottom: 0.3rem;
    font-size: 1rem;
}

.timeline-item-latest .timeline-card p {
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.profile-content-shell {
    padding-left: 0;
}

.profile-content-shell::before {
    display: none;
}

.profile-content-overview,
.profile-project-focus {
    display: flex;
    flex-direction: column;
    gap: 1.35rem;
}

.profile-content-heading,
.profile-arc-focus-header,
.profile-update-group-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
}

.profile-content-heading h3,
.profile-arc-focus-header h3,
.profile-update-group-head h3 {
    margin: 0;
    font-size: 1.05rem;
}

.profile-content-heading p,
.profile-arc-focus-header p,
.profile-update-group-head p {
    margin: 0.35rem 0 0;
    color: var(--text-secondary);
    font-size: 0.88rem;
    line-height: 1.45;
}

.profile-content-summary {
    display: flex;
    gap: 0.55rem;
    flex-wrap: wrap;
}

.profile-content-summary span,
.profile-update-link-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 40px;
    padding: 0.55rem 0.9rem;
    border-radius: 999px;
    border: 1px solid var(--border-color);
    background: rgba(255, 255, 255, 0.04);
    color: var(--text-primary);
    font-size: 0.82rem;
    font-weight: 700;
}

.profile-update-link-btn {
    cursor: pointer;
    transition:
        transform 0.15s ease,
        background 0.15s ease;
}

.profile-update-link-btn:hover {
    transform: translateY(-1px);
    background: rgba(255, 255, 255, 0.08);
}

.profile-section-kicker {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.74rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--text-secondary);
}

.profile-featured-update .timeline-item-latest {
    display: block;
    margin-bottom: 0;
    padding: 0;
    background: transparent;
    border: none;
}

.profile-featured-header {
    margin-bottom: 0.7rem;
}

.profile-update-groups {
    display: flex;
    flex-direction: column;
    gap: 1.1rem;
}

.profile-update-group {
    padding: 1rem 1.05rem;
    border-radius: 18px;
    border: 1px solid var(--border-color);
    background: linear-gradient(
        180deg,
        rgba(255, 255, 255, 0.045),
        rgba(255, 255, 255, 0.02)
    );
}

.profile-update-group-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1rem;
    margin-top: 1rem;
}

.profile-update-group-footer {
    margin-top: 0.9rem;
    display: flex;
    justify-content: flex-end;
}

.profile-update-card {
    padding: 1rem 1.05rem;
    border-radius: 18px;
    background: linear-gradient(
        180deg,
        rgba(255, 255, 255, 0.035),
        rgba(255, 255, 255, 0.02)
    );
    display: flex;
    flex-direction: column;
    gap: 0.95rem;
}

.profile-update-card--featured {
    padding: 1.2rem 1.25rem;
    border-radius: 22px;
    background:
        radial-gradient(
            circle at top right,
            rgba(14, 165, 233, 0.16),
            transparent 28%
        ),
        radial-gradient(
            circle at bottom left,
            rgba(16, 185, 129, 0.14),
            transparent 28%
        ),
        linear-gradient(
            180deg,
            rgba(255, 255, 255, 0.05),
            rgba(255, 255, 255, 0.025)
        );
}

.profile-update-card--compact {
    min-height: 100%;
}

.profile-update-card--compact .timeline-media video,
.profile-update-card--compact .timeline-media img {
    max-height: 210px;
}

.profile-update-card h4 {
    margin: 0;
    font-size: 1rem;
    line-height: 1.3;
    display: block;
    overflow: visible;
    text-overflow: initial;
    -webkit-line-clamp: unset;
    -webkit-box-orient: initial;
}

.profile-update-card p {
    margin: 0;
    color: var(--text-secondary);
    line-height: 1.55;
    font-size: 0.92rem;
    display: block;
    overflow: visible;
    text-overflow: initial;
    -webkit-line-clamp: unset;
    -webkit-box-orient: initial;
}

.profile-update-top,
.profile-update-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.profile-update-badges,
.profile-update-stats,
.profile-update-actions,
.profile-update-context,
.profile-arc-focus-metrics {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.profile-update-state,
.profile-update-pill,
.profile-update-stat-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    min-height: 32px;
    padding: 0.35rem 0.7rem;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(255, 255, 255, 0.05);
    font-size: 0.76rem;
    font-weight: 700;
}

.profile-update-state {
    color: var(--profile-update-accent, #10b981);
    border-color: rgba(255, 255, 255, 0.1);
    background: rgba(255, 255, 255, 0.06);
    box-shadow: inset 0 0 0 1px var(--profile-update-accent, #10b981);
}

.profile-update-meta {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
    color: var(--text-secondary);
    font-size: 0.78rem;
    font-weight: 600;
}

.profile-update-meta span {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
}

.profile-update-main {
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
}

.profile-update-author {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    color: var(--text-secondary);
    font-size: 0.82rem;
}

.profile-update-author-label {
    opacity: 0.75;
}

.profile-update-media {
    position: relative;
}

.profile-update-media-count {
    position: absolute;
    top: 10px;
    right: 10px;
    display: inline-flex;
    align-items: center;
    padding: 0.3rem 0.55rem;
    border-radius: 999px;
    background: rgba(0, 0, 0, 0.65);
    color: #fff;
    font-size: 0.72rem;
    font-weight: 700;
}

.profile-update-media-link a {
    color: var(--accent-color);
    font-weight: 700;
    text-decoration: none;
}

.profile-update-stats {
    color: var(--text-secondary);
    font-size: 0.8rem;
    font-weight: 600;
}

.profile-update-actions .profile-encourage-btn.courage-btn {
    min-height: 40px;
    padding: 0.55rem 0.9rem;
    margin-top: 0;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: transparent;
    color: var(--text-primary);
    box-shadow: none;
    font-size: 0.85rem;
    line-height: 1;
}

.profile-update-actions .profile-encourage-btn.courage-btn:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.14);
    transform: translateY(-1px);
}

.profile-update-actions .profile-encourage-btn.courage-btn img {
    flex-shrink: 0;
}

.profile-update-actions .profile-encourage-btn.courage-btn.encouraged {
    background: rgba(16, 185, 129, 0.12);
    border-color: rgba(16, 185, 129, 0.26);
    color: #d1fae5;
}

.profile-update-actions .profile-encourage-btn.courage-btn.encouraged:hover {
    background: rgba(16, 185, 129, 0.16);
    border-color: rgba(16, 185, 129, 0.34);
}

.profile-encourage-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 24px;
    height: 24px;
    padding: 0 0.35rem;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.06);
    color: inherit;
    font-size: 0.75rem;
    font-weight: 800;
}

.profile-update-management {
    display: flex;
    gap: 0.55rem;
    flex-wrap: wrap;
    margin-top: -0.15rem;
}

.profile-update-management .btn-action {
    min-height: 34px;
    padding: 0.42rem 0.75rem;
    border-radius: 12px;
    border: 1px solid var(--border-color);
    background: rgba(255, 255, 255, 0.03);
    color: var(--text-primary);
    font-size: 0.78rem;
    font-weight: 700;
    cursor: pointer;
}

.profile-update-management .btn-action-warn {
    border-color: rgba(245, 158, 11, 0.35);
    color: #f59e0b;
}

.profile-update-management .btn-action-danger {
    border-color: rgba(239, 68, 68, 0.32);
    color: #ef4444;
}

.profile-update-reply-block {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.profile-reply-panel[hidden] {
    display: none !important;
}

.profile-reply-panel {
    padding: 0.85rem;
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(255, 255, 255, 0.03);
}

.profile-project-focus {
    padding: 1.1rem;
    border-radius: 22px;
    border: 1px solid var(--border-color);
    background: linear-gradient(
        180deg,
        rgba(255, 255, 255, 0.04),
        rgba(255, 255, 255, 0.02)
    );
    overflow: hidden;
}

.profile-arc-focus-metrics {
    margin-top: 0.15rem;
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0.85rem;
    align-items: stretch;
}

.profile-arc-focus-metric {
    min-width: 0;
    padding: 0.8rem 0.9rem;
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(255, 255, 255, 0.04);
}

.profile-arc-focus-metric span {
    display: block;
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--text-secondary);
    margin-bottom: 0.35rem;
}

.profile-arc-focus-metric strong {
    display: block;
    font-size: 1rem;
    color: var(--text-primary);
}

.profile-project-updates {
    display: flex;
    flex-direction: column;
    gap: 1.15rem;
    margin-top: 1rem;
}

.profile-project-update {
    position: relative;
    margin-bottom: 0;
    display: block;
    padding-left: 4.25rem;
    min-width: 0;
}

.profile-project-update::before {
    content: "";
    position: absolute;
    left: 1.1rem;
    top: 0;
    bottom: -1.15rem;
    width: 1px;
    background: linear-gradient(
        180deg,
        rgba(255, 255, 255, 0.12),
        rgba(255, 255, 255, 0.03)
    );
}

.profile-project-updates > .profile-project-update:last-child::before {
    bottom: 1.25rem;
}

.profile-project-update-dot {
    position: absolute;
    left: 0;
    top: 1.05rem;
    margin-top: 0;
    z-index: 1;
}

.profile-project-update-body {
    min-width: 0;
    width: 100%;
}

.profile-project-update .timeline-card {
    width: 100%;
    max-width: none;
}

.profile-update-card--project {
    width: 100%;
    min-width: 0;
    box-sizing: border-box;
    padding: 1.15rem 1.2rem;
    border-radius: 22px;
    background:
        radial-gradient(
            circle at top right,
            rgba(14, 165, 233, 0.09),
            transparent 30%
        ),
        linear-gradient(
            180deg,
            rgba(255, 255, 255, 0.05),
            rgba(255, 255, 255, 0.025)
        );
}

.profile-update-card--project .profile-update-top,
.profile-update-card--project .profile-update-footer {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: start;
}

.profile-update-card--project .profile-update-badges,
.profile-update-card--project .profile-update-stats {
    min-width: 0;
}

.profile-update-card--project .profile-update-meta,
.profile-update-card--project .profile-update-actions {
    justify-self: end;
}

.profile-update-card--project .profile-update-main,
.profile-update-card--project h4,
.profile-update-card--project p,
.profile-update-card--project .profile-update-author,
.profile-update-card--project .profile-update-context {
    min-width: 0;
}

.profile-update-card--project h4,
.profile-update-card--project p {
    overflow-wrap: anywhere;
    word-break: break-word;
}

.profile-content-empty {
    padding: 1.5rem;
    border-radius: 18px;
    border: 1px dashed var(--border-color);
    text-align: center;
    color: var(--text-secondary);
}

.profile-content-empty h3 {
    margin: 0 0 0.35rem;
    color: var(--text-primary);
}

.profile-update-context .context-tag {
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(255, 255, 255, 0.04);
    color: var(--text-secondary);
}

.profile-update-context button.context-tag {
    font: inherit;
}

/* Mobile tuning for profile timeline */
@media (max-width: 600px) {
    .profile-container {
        padding-left: 1rem;
        padding-right: 1rem;
    }

    .timeline {
        padding-left: 24px;
    }

    .timeline::before {
        left: 10px;
    }

    .timeline-dot {
        left: -22px;
        width: 12px;
        height: 12px;
    }

    .timeline-item {
        margin-bottom: 2.25rem;
    }

    .timeline-date {
        font-size: 0.62rem;
        margin-bottom: 0.35rem;
    }

    .timeline-date span {
        font-size: 0.58rem;
        padding: 1px 6px;
    }

    .timeline-card {
        padding: 0.9rem;
        border-radius: 10px;
        max-width: 92%;
        margin-right: auto;
    }

    .timeline-card h4 {
        font-size: 0.88rem;
    }

    .timeline-card p {
        font-size: 0.78rem;
    }

    .timeline-media video,
    .timeline-media img {
        max-height: 180px;
    }

    .profile-open .timeline-media video {
        max-height: 320px;
    }

    .arc-view .timeline-media video,
    .arc-view .timeline-media img {
        max-height: 140px;
    }

    .timeline-item-latest {
        max-width: 92%;
        margin-right: auto;
        padding: 1.1rem;
    }

    .profile-content-heading,
    .profile-arc-focus-header,
    .profile-update-group-head,
    .profile-update-top,
    .profile-update-footer {
        flex-direction: column;
        align-items: flex-start;
    }

    .profile-update-group-grid {
        grid-template-columns: 1fr;
    }

    .profile-arc-focus-metrics {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .profile-project-update {
        padding-left: 0;
    }

    .profile-project-update::before,
    .profile-project-update-dot {
        display: none;
    }

    .profile-update-card,
    .profile-update-card--featured,
    .profile-update-group,
    .profile-project-focus {
        padding: 0.95rem;
        border-radius: 16px;
    }

    .profile-content-summary {
        width: 100%;
    }

    .profile-update-card--project .profile-update-top,
    .profile-update-card--project .profile-update-footer {
        grid-template-columns: 1fr;
    }

    .profile-update-card--project .profile-update-meta,
    .profile-update-card--project .profile-update-actions {
        justify-self: start;
    }
}

/* Extra-small screens (folded devices) */
@media (max-width: 360px) {
    .profile-container {
        padding-left: 0.75rem;
        padding-right: 0.75rem;
    }

    .timeline {
        padding-left: 20px;
    }

    .timeline::before {
        left: 8px;
    }

    .timeline-dot {
        left: -19px;
        width: 10px;
        height: 10px;
    }

    .timeline-item {
        margin-bottom: 1.8rem;
    }

    .timeline-card {
        padding: 0.75rem;
        max-width: 90%;
        margin-right: auto;
    }

    .timeline-card h4 {
        font-size: 0.82rem;
    }

    .timeline-card p {
        font-size: 0.74rem;
    }

    .timeline-date {
        font-size: 0.58rem;
    }

    .timeline-date span {
        font-size: 0.54rem;
        padding: 1px 5px;
    }

    .timeline-media video,
    .timeline-media img {
        max-height: 150px;
    }

    .arc-view .timeline-media video,
    .arc-view .timeline-media img {
        max-height: 120px;
    }

    .timeline-item-latest {
        max-width: 90%;
        margin-right: auto;
        padding: 0.95rem;
    }
}

/* --- PROFILE GLAM PROGRESS LAYER --- */
.profile-container {
    max-width: min(1120px, calc(100vw - 24px));
}

.profile-hero--glam {
    position: relative;
    isolation: isolate;
    overflow: hidden;
    margin-bottom: 1.25rem;
    padding: clamp(0.9rem, 2vw, 1.35rem);
    border: 1px solid rgba(255, 255, 255, 0.09);
    border-radius: 30px;
    background:
        radial-gradient(
            circle at 12% 8%,
            rgba(var(--profile-accent-rgb, 16, 185, 129), 0.16),
            transparent 34%
        ),
        radial-gradient(
            circle at 86% 10%,
            rgba(var(--profile-accent-2-rgb, 245, 158, 11), 0.12),
            transparent 30%
        ),
        linear-gradient(
            135deg,
            rgba(255, 255, 255, 0.075),
            rgba(255, 255, 255, 0.022)
        );
    box-shadow: 0 24px 70px rgba(0, 0, 0, 0.34);
    text-align: left;
}

.profile-hero-glow {
    position: absolute;
    inset: auto -18% -42% 42%;
    height: 210px;
    border-radius: 999px;
    background: radial-gradient(
        circle,
        rgba(255, 255, 255, 0.1),
        transparent 68%
    );
    pointer-events: none;
    z-index: -1;
}

.profile-banner-frame {
    height: clamp(140px, 18vw, 230px);
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.09);
    border-radius: 24px;
    background:
        linear-gradient(135deg, rgba(255, 255, 255, 0.09), transparent 44%),
        rgba(255, 255, 255, 0.035);
}

.profile-banner-frame--empty {
    background:
        radial-gradient(
            circle at 16% 20%,
            rgba(var(--profile-accent-rgb, 16, 185, 129), 0.18),
            transparent 34%
        ),
        radial-gradient(
            circle at 82% 10%,
            rgba(var(--profile-accent-2-rgb, 245, 158, 11), 0.13),
            transparent 32%
        ),
        linear-gradient(
            135deg,
            rgba(255, 255, 255, 0.07),
            rgba(255, 255, 255, 0.018)
        );
}

.profile-hero--glam .profile-banner {
    display: block;
    width: 100%;
    height: 100%;
    margin: 0;
    border: 0;
    border-radius: inherit;
    object-fit: cover;
}

.profile-hero-grid {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: minmax(0, 1.22fr) minmax(310px, 0.78fr);
    gap: clamp(1rem, 2.2vw, 1.6rem);
    align-items: stretch;
    margin-top: clamp(0.95rem, 2vw, 1.25rem);
}

.profile-identity-panel,
.profile-signal-panel {
    min-width: 0;
    border: 1px solid rgba(255, 255, 255, 0.085);
    background: rgba(5, 5, 5, 0.56);
    backdrop-filter: blur(18px);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

.profile-identity-panel {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    gap: clamp(0.9rem, 2vw, 1.25rem);
    align-items: end;
    padding: clamp(0.85rem, 2vw, 1.25rem);
    border-radius: 24px;
}

.profile-hero--glam .profile-avatar-wrapper {
    margin: 0;
}

.profile-hero--glam .profile-avatar-img {
    width: clamp(86px, 10vw, 118px);
    height: clamp(86px, 10vw, 118px);
    border: 1px solid rgba(255, 255, 255, 0.22);
    border-radius: 26px;
    box-shadow:
        0 18px 36px rgba(0, 0, 0, 0.36),
        0 0 0 6px rgba(255, 255, 255, 0.045);
}

.profile-name-block {
    min-width: 0;
}

.profile-name-block h2 {
    margin: 0.1rem 0 0.35rem;
    font-family: var(--font-heading);
    font-size: clamp(2rem, 4.8vw, 4.2rem);
    line-height: 0.94;
    letter-spacing: 0;
}

.profile-name-block .profile-role-badge {
    margin: 0 0 0.45rem;
}

.profile-title,
.profile-bio {
    margin: 0;
    color: var(--text-secondary);
}

.profile-title {
    font-size: 0.92rem;
}

.profile-bio {
    max-width: 620px;
    margin-top: 0.45rem;
    line-height: 1.5;
    font-size: 0.93rem;
}

.profile-hero--glam .badge-container,
.profile-hero--glam .profile-social-badges,
.profile-hero--glam .profile-support-cta {
    margin-top: 0.72rem;
}

.profile-signal-panel {
    display: flex;
    flex-direction: column;
    gap: clamp(0.48rem, 1vw, 0.62rem);
    padding: clamp(0.78rem, 1.6vw, 0.95rem);
    border-radius: 22px;
}

.profile-signal-panel .profile-signal-metrics,
.profile-signal-panel .profile-progress-snapshot {
    margin: 0;
}

.profile-signal-panel .profile-signal-metrics {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0.42rem;
}

.profile-signal-panel .follower-stat,
.profile-signal-panel .profile-progress-snapshot .snapshot-item {
    border-color: rgba(255, 255, 255, 0.08);
    background: rgba(255, 255, 255, 0.045);
    border-radius: 16px;
}

.profile-signal-panel .follower-stat {
    min-height: 56px;
    justify-content: center;
    padding: 0.42rem 0.38rem;
}

.profile-signal-panel .follower-stat-count {
    font-size: clamp(1rem, 1.5vw, 1.22rem);
}

.profile-signal-panel .follower-stat-label {
    font-size: 0.58rem;
    line-height: 1.15;
    text-align: center;
}

.profile-signal-panel .profile-progress-snapshot {
    padding: 0.34rem;
    max-width: none;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.3rem;
}

.profile-signal-panel .profile-progress-snapshot .snapshot-item {
    padding: 0.34rem 0.38rem;
}

.profile-signal-panel .profile-progress-snapshot .snapshot-label {
    font-size: 0.62rem;
    line-height: 1.25;
}

.profile-signal-panel .profile-progress-snapshot .snapshot-value {
    font-size: 0.84rem;
}

.profile-signal-panel .profile-actions {
    justify-content: flex-start !important;
    flex-wrap: wrap;
    gap: 0.42rem !important;
    margin-top: 0 !important;
}

.profile-signal-panel .profile-verify-block {
    margin-top: 0.06rem;
}

.profile-signal-panel .profile-actions .btn-add {
    width: 38px;
    height: 38px;
    border-radius: 12px;
}

.profile-signal-panel .profile-actions .btn-share-profile {
    min-width: 38px;
    min-height: 38px;
    padding: 0.32rem 0.48rem;
}

.profile-signal-panel .profile-actions .profile-arc-btn {
    min-height: 38px;
    padding: 0.42rem 0.72rem !important;
    font-size: 0.78rem !important;
}

.profile-signal-panel .profile-actions .settings-badge {
    min-height: 38px;
    padding: 0.36rem 0.68rem;
    font-size: 0.78rem;
}

.profile-panel-solid .profile-identity-panel,
.profile-panel-solid .profile-signal-panel {
    background: rgba(10, 10, 10, 0.92);
    backdrop-filter: none;
}

.profile-panel-minimal .profile-identity-panel,
.profile-panel-minimal .profile-signal-panel {
    background: transparent;
    box-shadow: none;
}

.profile-banner-contain .profile-banner {
    object-fit: contain;
    background: rgba(0, 0, 0, 0.32);
}

.profile-banner-soft .profile-banner {
    filter: saturate(0.92) contrast(0.94);
    opacity: 0.82;
}

.profile-layout-showcase .profile-banner-frame {
    height: clamp(190px, 24vw, 300px);
}

.profile-layout-showcase .profile-hero-grid {
    grid-template-columns: 1fr;
}

.profile-layout-showcase .profile-signal-panel {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
}

.profile-layout-showcase .profile-signal-panel .profile-signal-metrics {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.profile-layout-showcase .profile-signal-panel .profile-progress-snapshot {
    display: none;
}

.profile-layout-compact .profile-banner-frame {
    height: clamp(110px, 14vw, 170px);
}

.profile-layout-compact .profile-hero-grid {
    grid-template-columns: minmax(0, 1.45fr) minmax(300px, 0.55fr);
}

.profile-layout-compact .profile-name-block h2 {
    font-size: clamp(1.8rem, 3.6vw, 3.1rem);
}

.profile-layout-compact .profile-hero--glam .profile-avatar-img,
.profile-layout-compact .profile-avatar-img {
    width: clamp(76px, 8vw, 96px);
    height: clamp(76px, 8vw, 96px);
}

.profile-theme-mono .profile-hero-glow {
    opacity: 0.45;
}

.profile-privacy-locked {
    min-height: 520px;
}

.profile-privacy-card {
    margin-top: clamp(0.95rem, 2vw, 1.25rem);
    min-height: 230px;
    display: flex;
    align-items: center;
    gap: 1.25rem;
    padding: clamp(1rem, 2.2vw, 1.5rem);
    border: 1px solid rgba(255, 255, 255, 0.085);
    border-radius: 24px;
    background: rgba(5, 5, 5, 0.62);
    backdrop-filter: blur(18px);
}

.profile-privacy-card .profile-avatar-img {
    width: 96px;
    height: 96px;
}

.profile-privacy-copy h2 {
    margin: 0.12rem 0 0.35rem;
    font-family: var(--font-heading);
    font-size: clamp(2rem, 5vw, 4rem);
    line-height: 0.95;
}

.profile-privacy-copy p,
.profile-privacy-muted p {
    margin: 0;
    color: var(--text-secondary);
}

.profile-privacy-follow {
    margin-top: 0.9rem;
    padding: 0.62rem 0.9rem;
    border-radius: 12px;
}

.profile-privacy-muted {
    margin: 1rem 0 1.55rem;
    padding: clamp(1rem, 2vw, 1.35rem);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 22px;
    background:
        radial-gradient(
            circle at 0 0,
            rgba(var(--profile-accent-rgb, 16, 185, 129), 0.08),
            transparent 34%
        ),
        rgba(255, 255, 255, 0.025);
}

.profile-progress-board {
    margin: 1rem 0 1.55rem;
    padding: clamp(0.95rem, 2vw, 1.25rem);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 24px;
    background:
        radial-gradient(
            circle at 0 0,
            rgba(16, 185, 129, 0.1),
            transparent 28%
        ),
        linear-gradient(
            180deg,
            rgba(255, 255, 255, 0.042),
            rgba(255, 255, 255, 0.018)
        );
}

.profile-progress-board-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
    margin-bottom: 1rem;
}

.profile-progress-board-head h3 {
    margin: 0.18rem 0 0;
    font-size: clamp(1.2rem, 2.2vw, 1.75rem);
}

.profile-progress-board-head p {
    margin: 0.28rem 0 0;
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.profile-progress-board-stats {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.profile-progress-board-stats span {
    display: inline-flex;
    min-height: 34px;
    align-items: center;
    padding: 0.4rem 0.68rem;
    border: 1px solid rgba(255, 255, 255, 0.09);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.045);
    color: var(--text-primary);
    font-size: 0.78rem;
    font-weight: 750;
}

.profile-progress-board-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0.8rem;
}

.profile-progress-project {
    min-width: 0;
    min-height: 168px;
    padding: 0.88rem;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 18px;
    background: linear-gradient(
        145deg,
        rgba(255, 255, 255, 0.055),
        rgba(255, 255, 255, 0.018)
    );
    color: var(--text-primary);
    cursor: pointer;
    text-align: left;
    display: flex;
    flex-direction: column;
    gap: 0.52rem;
    transition:
        transform 0.18s ease,
        border-color 0.18s ease,
        background 0.18s ease;
}

.profile-progress-project:hover,
.profile-progress-project.is-active {
    transform: translateY(-2px);
    border-color: rgba(var(--profile-accent-rgb, 16, 185, 129), 0.42);
    background:
        radial-gradient(
            circle at 20% 0,
            rgba(var(--profile-accent-rgb, 16, 185, 129), 0.14),
            transparent 42%
        ),
        rgba(255, 255, 255, 0.045);
}

.profile-progress-project-status {
    align-self: flex-start;
    padding: 0.26rem 0.52rem;
    border-radius: 999px;
    background: rgba(16, 185, 129, 0.12);
    color: var(--profile-accent, #a7f3d0);
    font-size: 0.66rem;
    font-weight: 850;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.profile-progress-project strong,
.profile-progress-project-goal {
    display: -webkit-box;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    overflow-wrap: anywhere;
}

.profile-progress-project strong {
    -webkit-line-clamp: 2;
    line-height: 1.18;
}

.profile-progress-project-goal {
    -webkit-line-clamp: 2;
    color: var(--text-secondary);
    font-size: 0.8rem;
    line-height: 1.35;
}

.profile-progress-track {
    height: 6px;
    margin-top: auto;
    overflow: hidden;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.08);
}

.profile-progress-track span {
    display: block;
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(
        90deg,
        var(--profile-accent, #10b981),
        var(--profile-accent-2, #f59e0b)
    );
}

.profile-progress-project-meta {
    display: flex;
    justify-content: space-between;
    gap: 0.55rem;
    color: var(--text-secondary);
    font-size: 0.72rem;
    font-weight: 700;
}

.profile-progress-project-meta span {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.profile-container > .arcs-section {
    margin: 1.35rem 0;
}

.profile-container .arcs-scroller {
    scrollbar-width: thin;
    scroll-snap-type: x proximity;
}

.profile-container .arcs-scroller .arc-card {
    scroll-snap-align: start;
    border-radius: 18px !important;
    background: linear-gradient(
        145deg,
        rgba(255, 255, 255, 0.055),
        rgba(255, 255, 255, 0.018)
    ) !important;
}

.profile-update-card {
    position: relative;
    border-color: rgba(255, 255, 255, 0.085);
    box-shadow: 0 14px 36px rgba(0, 0, 0, 0.18);
}

.profile-update-card::before {
    content: "";
    position: absolute;
    inset: 0 auto 0 0;
    width: 3px;
    border-radius: inherit;
    background: linear-gradient(
        180deg,
        rgba(16, 185, 129, 0.7),
        rgba(245, 158, 11, 0.5)
    );
    opacity: 0.72;
}

.profile-update-card--compact::before {
    opacity: 0.44;
}

.profile-update-group,
.profile-project-focus,
.weekly-progress-card,
.profile-analytics-section,
.influence-section {
    border-radius: 22px;
}

html.light-mode .profile-hero--glam,
html.light-mode .profile-progress-board {
    border-color: rgba(15, 23, 42, 0.1);
    background:
        radial-gradient(
            circle at 12% 8%,
            rgba(16, 185, 129, 0.11),
            transparent 34%
        ),
        radial-gradient(
            circle at 86% 10%,
            rgba(245, 158, 11, 0.1),
            transparent 30%
        ),
        rgba(255, 255, 255, 0.8);
}

html.light-mode .profile-identity-panel,
html.light-mode .profile-signal-panel {
    background: rgba(255, 255, 255, 0.72);
    border-color: rgba(15, 23, 42, 0.1);
}

@media (max-width: 980px) {
    .profile-hero-grid {
        grid-template-columns: 1fr;
        align-items: stretch;
    }

    .profile-progress-board-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 600px) {
    .profile-container {
        max-width: 100%;
        padding-left: 0.75rem;
        padding-right: 0.75rem;
    }

    .profile-hero--glam {
        padding: 0.65rem;
        border-radius: 22px;
        margin-bottom: 0.9rem;
    }

    .profile-banner-frame {
        height: 122px;
        border-radius: 18px;
    }

    .profile-hero-grid {
        gap: 0.72rem;
        margin-top: 0.72rem;
    }

    .profile-identity-panel {
        grid-template-columns: 1fr;
        gap: 0.62rem;
        padding: 0.78rem;
        border-radius: 18px;
        text-align: center;
    }

    .profile-hero--glam .profile-avatar-wrapper {
        margin: 0 auto;
    }

    .profile-hero--glam .profile-avatar-img {
        width: 82px;
        height: 82px;
        border-radius: 20px;
    }

    .profile-name-block h2 {
        font-size: clamp(1.8rem, 11vw, 2.6rem);
    }

    .profile-hero--glam .badge-container,
    .profile-hero--glam .profile-social-badges,
    .profile-hero--glam .profile-support-cta {
        justify-content: center;
    }

    .profile-signal-panel {
        padding: 0.78rem;
        border-radius: 18px;
    }

    .profile-signal-panel .profile-signal-metrics {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 0.5rem;
    }

    .profile-layout-showcase .profile-signal-panel {
        display: flex;
    }

    .profile-layout-showcase .profile-signal-panel .profile-signal-metrics {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .profile-signal-panel .profile-progress-snapshot {
        grid-template-columns: 1fr;
    }

    .profile-signal-panel .profile-actions {
        justify-content: center !important;
    }

    .profile-progress-board {
        padding: 0.78rem;
        border-radius: 18px;
    }

    .profile-progress-board-grid {
        grid-template-columns: 1fr;
    }

    .profile-progress-project {
        min-height: 142px;
    }

    .profile-update-card,
    .profile-update-card--featured,
    .profile-update-card--project,
    .timeline-card {
        max-width: 100%;
    }

    .profile-update-group-grid,
    .profile-arc-focus-metrics {
        grid-template-columns: 1fr;
    }
}

.btn-toggle-timeline {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.25rem;
    background: var(--surface-color);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    border-radius: 8px;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    font-family: var(--font-body);
    font-size: 0.9rem;
}

.btn-toggle-timeline:hover {
    background: var(--border-color);
    transform: translateY(-2px);
}

.btn-toggle-timeline svg {
    width: 18px;
    height: 18px;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.btn-toggle-timeline.expanded svg {
    transform: rotate(180deg);
}

.timeline-full {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    margin-top: 1.5rem;
    padding: 1.5rem;
    padding-left: 3.5rem;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    max-height: 600px;
    overflow-y: auto;
    animation: slideDown 0.3s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

.timeline-full.hidden {
    display: none;
    animation: slideUp 0.3s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

@keyframes slideDown {
    from {
        opacity: 0;
        max-height: 0;
        overflow: hidden;
    }
    to {
        opacity: 1;
        max-height: 600px;
    }
}

@keyframes slideUp {
    from {
        opacity: 1;
        max-height: 600px;
    }
    to {
        opacity: 0;
        max-height: 0;
        overflow: hidden;
    }
}

/* --- BOUTONS --- */
.btn {
    padding: 0.7rem 1.4rem;
    border-radius: 6px;
    font-weight: 600;
    cursor: pointer;
    border: none;
    font-size: 0.85rem;
    transition: var(--transition);
}

/* Premium button system */
.btn {
    padding: 0.65rem 1rem;
    border-radius: 12px;
    font-weight: 700;
    cursor: pointer;
    border: none;
    font-size: 0.95rem;
    transition:
        transform 0.14s cubic-bezier(0.22, 1, 0.36, 1),
        box-shadow 0.14s;
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    box-shadow: 0 6px 18px rgba(2, 6, 23, 0.6);
}

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

.btn-primary {
    background: linear-gradient(135deg, #ffffff 0%, #e6e6e6 100%);
    color: #000;
    padding: 0.6rem 1rem;
    border-radius: 14px;
}

.btn-secondary {
    background: linear-gradient(
        135deg,
        rgba(255, 255, 255, 0.03),
        rgba(255, 255, 255, 0.01)
    );
    color: var(--text-primary);
    border: 1px solid rgba(255, 255, 255, 0.04);
}

.btn-ghost {
    background: transparent;
    color: var(--text-primary);
    border: 1px dashed rgba(255, 255, 255, 0.03);
}

.btn:active {
    transform: translateY(0);
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.4);
}

.btn-share-profile {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--border-color);
    padding: 0.35rem 0.55rem;
    border-radius: 10px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.35rem;
    box-shadow: none;
}

.btn-share-profile img {
    width: 18px;
    height: 18px;
}

/* Modales génériques pour création et formulaires */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: var(--modal-overlay);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 4000;
}
.modal-overlay.active {
    display: flex;
}
.modal-panel {
    background: var(--surface-color);
    border: 1px solid var(--border-color);
    padding: 1rem 1.25rem;
    border-radius: 12px;
    width: 90%;
    max-width: 520px;
}
.modal-panel h3 {
    margin-bottom: 0.75rem;
}
.form-panel input,
.form-panel textarea {
    width: 100%;
    padding: 0.5rem;
    margin-top: 0.25rem;
    border-radius: 8px;
    border: 1px solid var(--border-color);
    background: transparent;
    color: var(--text-primary);
}
.form-panel label {
    display: block;
    margin-bottom: 0.5rem;
    color: var(--text-secondary);
    font-size: 0.9rem;
}
.form-panel .create-options {
    display: flex;
    gap: 0.5rem;
    flex-direction: column;
}
.form-panel .create-options button {
    padding: 0.6rem 0.9rem;
    border-radius: 8px;
    border: 1px solid var(--border-color);
    background: var(--surface-hover);
    cursor: pointer;
}

.close-immersive {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 3000;
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

/* --- BADGES SYSTÈME --- */
.badge-container {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 0.5rem;
}

.badge {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 0.4rem 0.8rem;
    border-radius: 8px;
    font-size: 0.7rem;
    font-weight: 600;
    color: var(--text-secondary);
    transition: var(--transition);
    white-space: nowrap;
}

.username-with-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    max-width: 100%;
    min-width: 0;
    vertical-align: middle;
}

.username-label {
    display: inline-block;
    min-width: 0;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.username-badge {
    width: 18px;
    height: 18px;
    display: inline-block;
}

.verification-badge {
    width: 22px;
    height: 22px;
    display: inline-block;
}

.verification-section {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin-bottom: 2rem;
}

.verification-status {
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.verification-status.verified {
    color: var(--success);
    font-weight: 600;
}

.verification-status.pending {
    color: #f59e0b;
    font-weight: 600;
}

.verification-status.disabled {
    color: var(--text-secondary);
}

.messages-mount {
    margin-top: 1rem;
}

.messages-nav-button .notification-icon {
    width: 18px;
    height: 18px;
    object-fit: contain;
}

.messages-page {
    display: grid;
    grid-template-columns: minmax(260px, 330px) minmax(0, 1fr);
    min-height: calc(100vh - 150px);
    background: var(--surface-color);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    overflow: hidden;
}

.threads-panel {
    border-right: 1px solid var(--border-color);
    padding: 1rem;
    overflow-y: auto;
    background: rgba(255, 255, 255, 0.01);
}

.messages-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    margin-bottom: 0.9rem;
}

.messages-head h3 {
    margin: 0;
    font-size: 1rem;
}

.messages-refresh-btn {
    padding: 0.35rem 0.62rem;
    border-radius: 8px;
    border: 1px solid var(--border-color);
    background: transparent;
    color: var(--text-secondary);
    cursor: pointer;
}

.threads-list {
    display: flex;
    flex-direction: column;
    gap: 0.45rem;
}

.thread-item {
    width: 100%;
    display: flex;
    gap: 0.75rem;
    align-items: center;
    padding: 0.65rem 0.75rem;
    border: 1px solid transparent;
    background: transparent;
    color: var(--text-primary);
    border-radius: 10px;
    cursor: pointer;
    transition: var(--transition);
}

.thread-item:hover,
.thread-item.active {
    background: var(--surface-hover);
    border-color: var(--border-color);
}

.thread-avatar {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
}

.thread-meta {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
    text-align: left;
    min-width: 0;
    flex: 1;
}

.thread-name-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0.5rem;
}

.thread-name {
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    min-width: 0;
}

.thread-user-link,
.thread-user-label {
    display: inline-flex;
    align-items: center;
    max-width: 100%;
    min-width: 0;
    color: inherit;
    text-decoration: none;
}

.thread-user-link {
    cursor: pointer;
}

.thread-user-link:hover .username-label {
    text-decoration: underline;
}

.thread-name .username-with-badge,
.thread-name .dm-user-inline {
    max-width: 100%;
    min-width: 0;
}

.thread-name .username-label {
    max-width: 100%;
}

.thread-time {
    color: var(--text-secondary);
    font-size: 0.75rem;
    flex-shrink: 0;
}

.thread-snippet {
    color: var(--text-secondary);
    font-size: 0.85rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.thread-unread {
    margin-left: auto;
    background: #ef4444;
    color: #fff;
    border-radius: 999px;
    padding: 0.15rem 0.55rem;
    font-size: 0.75rem;
    font-weight: 700;
    min-width: 28px;
    text-align: center;
}

.chat-panel {
    display: grid;
    grid-template-rows: auto 1fr auto;
    min-height: calc(100vh - 150px);
    background: rgba(255, 255, 255, 0.01);
}

.chat-panel.empty .chat-input-row {
    opacity: 0.6;
}

.chat-header {
    padding: 1rem;
    border-bottom: 1px solid var(--border-color);
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 0.65rem;
}

.chat-header-meta {
    display: flex;
    flex-direction: column;
    min-width: 0;
    flex: 1;
}

#chat-header-name {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.chat-user-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    max-width: 100%;
    min-width: 0;
    color: inherit;
    text-decoration: none;
}

.chat-user-link:hover .username-label {
    text-decoration: underline;
}

.dm-user-inline {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    max-width: 100%;
    min-width: 0;
}

.dm-role-badge {
    width: 16px;
    height: 16px;
    display: inline-block;
    flex-shrink: 0;
}

#chat-header-sub {
    font-size: 0.8rem;
    color: var(--text-secondary);
    line-height: 1.35;
}

.chat-header-actions {
    margin-left: auto;
    display: inline-flex;
    align-items: center;
    justify-content: flex-end;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.chat-header-action {
    border: 1px solid var(--border-color);
    background: transparent;
    color: var(--text-secondary);
    border-radius: 999px;
    padding: 0.45rem 0.8rem;
    font-size: 0.78rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
}

.chat-header-action:hover {
    color: var(--text-primary);
    border-color: rgba(255, 255, 255, 0.2);
}

.chat-header-action:disabled {
    opacity: 0.55;
    cursor: not-allowed;
}

.chat-header-action-danger {
    color: #fca5a5;
    border-color: rgba(239, 68, 68, 0.25);
}

.chat-header-action-danger:hover {
    color: #fecaca;
    border-color: rgba(239, 68, 68, 0.45);
}

.messages-back-btn {
    display: none;
    border: 1px solid var(--border-color);
    background: transparent;
    color: var(--text-primary);
    width: 30px;
    height: 30px;
    border-radius: 8px;
    cursor: pointer;
}

.chat-messages {
    padding: 1rem;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.loading-state {
    color: var(--text-secondary);
    text-align: center;
    padding: 1rem;
}

.chat-bubble {
    max-width: 72%;
    padding: 0.65rem 0.8rem;
    border-radius: 12px;
    border: 1px solid var(--border-color);
    background: var(--surface-hover);
    align-self: flex-start;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.chat-bubble.mine {
    background: rgba(14, 165, 233, 0.14);
    border-color: rgba(14, 165, 233, 0.35);
    align-self: flex-end;
}

.chat-body {
    white-space: pre-wrap;
    word-break: break-word;
}

.chat-media-link {
    display: block;
    text-decoration: none;
}

.chat-media-wrap,
.chat-media-link {
    width: min(100%, 320px);
    max-width: 100%;
}

.chat-media {
    display: block;
    width: 100%;
    max-width: 100%;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(255, 255, 255, 0.04);
}

.chat-media-image {
    max-height: 320px;
    object-fit: cover;
}

.chat-media-video {
    max-height: 360px;
}

.chat-media-label {
    font-size: 0.78rem;
    color: var(--text-secondary);
}

.chat-sender-row {
    margin-bottom: 0.25rem;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-secondary);
}

.chat-time {
    font-size: 0.75rem;
    color: var(--text-secondary);
    margin-top: 0.25rem;
    text-align: right;
}

.chat-input-row {
    padding: 0.85rem 1rem;
    border-top: 1px solid var(--border-color);
}

.chat-composer {
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
    width: 100%;
}

.chat-compose-controls {
    display: flex;
    align-items: flex-end;
    gap: 0.6rem;
}

.chat-attach-btn {
    width: 42px;
    height: 42px;
    flex-shrink: 0;
    border-radius: 12px;
    border: 1px solid var(--border-color);
    background: transparent;
    color: var(--text-primary);
    cursor: pointer;
    font-size: 1.35rem;
    line-height: 1;
}

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

.chat-input-row .form-input.chat-input-textarea {
    flex: 1;
    resize: none;
    min-height: 44px;
    max-height: 160px;
    line-height: 1.4;
    padding-top: 0.7rem;
    padding-bottom: 0.7rem;
}

.chat-compose-hint {
    font-size: 0.78rem;
    color: var(--text-secondary);
}

/* Stabilize chat layout to reduce layout shifts */
.chat-header {
    min-height: 64px;
}

.chat-input-row {
    min-height: 72px;
    padding-bottom: calc(env(safe-area-inset-bottom, 0px) + 0.6rem);
}

.chat-media,
.chat-attachment-thumb {
    aspect-ratio: 16/9;
    min-height: 80px;
    object-fit: cover;
}

/* Floating back button for mobile: hidden by default, shown when .show is added */
.floating-back-btn {
    position: fixed;
    left: 12px;
    bottom: 84px;
    z-index: 9999;
    width: 46px;
    height: 46px;
    border-radius: 50%;
    display: none;
    align-items: center;
    justify-content: center;
    background: var(--bg-color);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.12);
    cursor: pointer;
    font-size: 1.05rem;
}

.floating-back-btn.show {
    display: inline-flex;
}

.chat-attachment-preview[hidden] {
    display: none !important;
}

.chat-attachment-card {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.7rem 0.8rem;
    border-radius: 14px;
    border: 1px solid var(--border-color);
    background: rgba(255, 255, 255, 0.03);
}

.chat-attachment-card.is-uploading {
    border-color: rgba(14, 165, 233, 0.35);
    background: rgba(14, 165, 233, 0.08);
}

.chat-attachment-visual {
    width: 68px;
    height: 68px;
    border-radius: 12px;
    overflow: hidden;
    flex-shrink: 0;
    background: rgba(255, 255, 255, 0.05);
}

.chat-attachment-thumb {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.chat-attachment-meta {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    min-width: 0;
    flex: 1;
}

.chat-attachment-title {
    font-weight: 600;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.chat-attachment-subtitle {
    font-size: 0.8rem;
    color: var(--text-secondary);
}

.chat-attachment-remove {
    width: 32px;
    height: 32px;
    border-radius: 999px;
    border: 1px solid var(--border-color);
    background: transparent;
    color: var(--text-secondary);
    cursor: pointer;
    flex-shrink: 0;
    font-size: 1.15rem;
    line-height: 1;
}

.chat-attachment-remove:disabled {
    opacity: 0.45;
    cursor: not-allowed;
}

.chat-upload-progress {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    margin-top: 0.2rem;
}

.chat-upload-progress-bar {
    height: 6px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.08);
    overflow: hidden;
    flex: 1;
}

.chat-upload-progress-fill {
    height: 100%;
    border-radius: inherit;
    background: var(--accent-color);
    transition: width 0.2s ease;
}

.chat-upload-progress-label {
    font-size: 0.75rem;
    color: var(--text-secondary);
    min-width: 42px;
    text-align: right;
}

@media (max-width: 960px) {
    .messages-page {
        grid-template-columns: 1fr;
        min-height: calc(100vh - 180px);
    }

    .threads-panel {
        border-right: none;
        border-bottom: 1px solid var(--border-color);
        max-height: calc(100vh - 280px);
    }

    .chat-panel {
        display: none;
        min-height: calc(100vh - 280px);
    }

    .messages-page.mobile-thread-open .threads-panel {
        display: none;
    }

    .messages-page.mobile-thread-open .chat-panel {
        display: grid;
    }

    /* hide the inline header back button on mobile — we use the floating button below the top menu */
    .messages-page.mobile-thread-open .messages-back-btn {
        display: none !important;
        align-items: center;
        justify-content: center;
    }

    .chat-bubble {
        max-width: 88%;
    }

    .chat-compose-controls {
        align-items: stretch;
    }

    .chat-attach-btn,
    .chat-input-row .btn-verify {
        align-self: flex-end;
    }

    .chat-header {
        align-items: flex-start;
    }

    .chat-header-actions {
        width: 100%;
        margin-left: 0;
        justify-content: flex-start;
        padding-left: 2.05rem;
    }
    /* Hide the helper hint on mobile to free vertical space */
    .chat-compose-hint {
        display: none;
    }
    /* Move floating back button to top-left on mobile (safe-area aware) */
    .floating-back-btn {
        left: 12px;
        top: calc(env(safe-area-inset-top, 12px) + 12px);
        bottom: auto;
    }
}

.btn-verify {
    background: var(--accent-color);
    color: var(--bg-color);
    border: none;
    padding: 0.6rem 1rem;
    border-radius: 10px;
    font-weight: 600;
    cursor: pointer;
    align-self: flex-start;
}

.settings-counter-chip {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 1.75rem;
    height: 1.75rem;
    padding: 0 0.55rem;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.08);
    color: var(--text-secondary);
    font-size: 0.78rem;
    font-weight: 700;
    margin-left: 0.65rem;
}

.blocked-users-list {
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
}

.blocked-users-empty {
    border: 1px dashed var(--border-color);
    border-radius: 14px;
    padding: 1rem;
    color: var(--text-secondary);
    text-align: center;
    background: rgba(255, 255, 255, 0.02);
}

.blocked-user-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.95rem 1rem;
    border: 1px solid var(--border-color);
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.03);
}

.blocked-user-main {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    min-width: 0;
    flex: 1;
}

.blocked-user-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
}

.blocked-user-meta {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.blocked-user-name {
    min-width: 0;
    font-weight: 700;
    color: var(--text-primary);
}

.blocked-user-name .username-with-badge,
.blocked-user-name .username-label {
    min-width: 0;
    max-width: 100%;
}

.blocked-user-subtitle {
    color: var(--text-secondary);
    font-size: 0.82rem;
}

.blocked-user-action {
    flex: 0 0 auto;
    min-width: 120px;
    padding: 0.8rem 1rem;
}

@media (max-width: 768px) {
    .blocked-user-item {
        flex-direction: column;
        align-items: stretch;
    }

    .blocked-user-action {
        width: 100%;
        min-width: 0;
    }
}

.account-type-toggle {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
}

.account-type-btn {
    border: 1px solid var(--border-color);
    background: transparent;
    color: var(--text-secondary);
    padding: 0.5rem 0.9rem;
    border-radius: 10px;
    cursor: pointer;
    font-weight: 600;
}

.account-type-btn.active {
    color: var(--text-primary);
    border-color: var(--accent-color);
    background: rgba(255, 255, 255, 0.08);
}

.verification-admin-block {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-top: 1rem;
}

.verification-requests {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.verification-request-item {
    display: grid;
    grid-template-columns: auto auto 1fr auto auto;
    gap: 0.75rem;
    align-items: center;
    padding: 0.75rem;
    border: 1px solid var(--border-color);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.03);
}

.verification-request-item img {
    width: 32px;
    height: 32px;
    border-radius: 10px;
    object-fit: cover;
}

.verification-request-name {
    font-weight: 600;
}

.verification-request-type {
    font-size: 0.8rem;
    color: var(--text-secondary);
}

.verification-request-id {
    font-size: 0.75rem;
    color: var(--text-secondary);
    word-break: break-all;
}

.verification-actions {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.verification-manual {
    margin-top: 1.5rem;
}

.verification-input-row {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
    margin-top: 0.5rem;
}

.verification-empty {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.admin-badge {
    display: inline-flex;
    align-items: center;
    padding: 0.25rem 0.6rem;
    border-radius: 999px;
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.03em;
    color: #000;
    background: #facc15;
    text-transform: uppercase;
}

/* Style spécifique pour le bouton Réglages rendu comme un badge */
.settings-badge {
    cursor: pointer;
    background: var(--surface-color);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    padding: 0.45rem 0.9rem;
    font-size: 0.85rem;
}

.settings-badge .badge-icon {
    width: 18px;
    height: 18px;
}

/* Style spécifique pour le bouton Live */
.live-badge {
    cursor: pointer;
    background: linear-gradient(135deg, #ef4444, #dc2626);
    border: 1px solid #dc2626;
    color: white;
    padding: 0.45rem 0.9rem;
    font-size: 0.85rem;
    animation: pulse 2s infinite;
}

.live-badge:hover {
    background: linear-gradient(135deg, #dc2626, #b91c1c);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.3);
}

.live-badge .badge-icon {
    width: 18px;
    height: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
}

@keyframes pulse {
    0%,
    100% {
        box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.4);
    }
    50% {
        box-shadow: 0 0 0 8px rgba(239, 68, 68, 0);
    }
}

/* ========================================
   LIVE STREAMING MODAL
   ======================================== */

.live-modal-content {
    max-width: 1200px;
    width: 95vw;
    max-height: 90vh;
    overflow-y: auto;
}

.live-controls {
    display: grid;
    grid-template-columns: 1fr 400px;
    gap: 2rem;
    margin-top: 1rem;
}

.stream-preview {
    position: relative;
    background: #000;
    border-radius: 12px;
    overflow: hidden;
    aspect-ratio: 16/9;
    min-height: 300px;
}

#live-preview {
    width: 100%;
    height: 100%;
    object-fit: cover;
    background: #1a1a2e;
}

.stream-status {
    position: absolute;
    top: 1rem;
    left: 1rem;
    background: rgba(0, 0, 0, 0.8);
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-weight: 600;
}

.status-indicator.live {
    color: #ef4444;
    animation: pulse 2s infinite;
}

.status-indicator.offline {
    color: #9ca3af;
}

.control-panel {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.source-controls h3,
.layout-controls h3 {
    margin: 0 0 0.75rem 0;
    color: var(--text-primary);
    font-size: 1rem;
}

.source-buttons {
    display: flex;
    gap: 0.75rem;
}

.source-btn {
    flex: 1;
    padding: 0.75rem 1rem;
    border: 2px solid var(--border-color);
    background: var(--surface-color);
    color: var(--text-primary);
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.source-btn:hover {
    border-color: var(--accent-color);
    background: var(--accent-color);
    color: white;
}

.source-btn.active {
    border-color: #10b981;
    background: #10b981;
    color: white;
}

.layout-options {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.layout-btn {
    padding: 0.5rem 0.75rem;
    border: 1px solid var(--border-color);
    background: var(--surface-color);
    color: var(--text-primary);
    border-radius: 6px;
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.layout-btn:hover {
    border-color: var(--accent-color);
    background: var(--accent-color);
    color: white;
}

.layout-btn.active {
    border-color: var(--accent-color);
    background: var(--accent-color);
    color: white;
}

.size-controls {
    background: var(--surface-color);
    padding: 1rem;
    border-radius: 8px;
    border: 1px solid var(--border-color);
}

.size-control {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.size-control:last-child {
    margin-bottom: 0;
}

.size-control label {
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-primary);
}

.size-control input[type="range"] {
    width: 100%;
    height: 6px;
    border-radius: 3px;
    background: var(--border-color);
    outline: none;
    -webkit-appearance: none;
}

.size-control input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: var(--accent-color);
    cursor: pointer;
}

.size-control input[type="range"]::-moz-range-thumb {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: var(--accent-color);
    cursor: pointer;
    border: none;
}

.size-control select {
    padding: 0.5rem;
    border: 1px solid var(--border-color);
    background: var(--surface-color);
    color: var(--text-primary);
    border-radius: 6px;
}

#camera-size-value {
    font-weight: 600;
    color: var(--accent-color);
}

.stream-actions {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.btn-start-stream,
.btn-stop-stream {
    padding: 1rem;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-start-stream {
    background: linear-gradient(135deg, #10b981, #059669);
    color: white;
}

.btn-start-stream:hover:not(:disabled) {
    background: linear-gradient(135deg, #059669, #047857);
    transform: translateY(-1px);
}

.btn-start-stream:disabled {
    background: var(--border-color);
    color: var(--text-secondary);
    cursor: not-allowed;
}

.btn-stop-stream {
    background: linear-gradient(135deg, #ef4444, #dc2626);
    color: white;
}

.btn-stop-stream:hover {
    background: linear-gradient(135deg, #dc2626, #b91c1c);
    transform: translateY(-1px);
}

.stream-info {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.info-item {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.info-item label {
    font-weight: 500;
    color: var(--text-primary);
    font-size: 0.9rem;
}

.info-item input,
.info-item textarea {
    padding: 0.75rem;
    border: 1px solid var(--border-color);
    background: var(--surface-color);
    color: var(--text-primary);
    border-radius: 6px;
    font-size: 0.9rem;
}

.info-item textarea {
    resize: vertical;
    min-height: 80px;
}

/* Responsive */
@media (max-width: 768px) {
    .live-controls {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .live-modal-content {
        width: 95vw;
        max-height: 95vh;
    }

    .source-buttons {
        flex-direction: column;
    }

    .layout-options {
        flex-wrap: wrap;
    }

    .stream-preview {
        min-height: 200px;
    }
}

/* Bouton + (ajouter) sur le profil */
.btn-add {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 12px;
    background: var(--accent-color);
    color: #000;
    border: none;
    cursor: pointer;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.3);
    transition:
        transform 0.12s ease,
        box-shadow 0.12s ease;
}

.btn-add {
    width: 48px;
    height: 48px;
    border-radius: 14px;
    background: linear-gradient(135deg, #fff 0%, #f2f2f2 100%);
    box-shadow:
        0 10px 30px rgba(2, 6, 23, 0.55),
        inset 0 -6px 14px rgba(0, 0, 0, 0.06);
    border: 1px solid rgba(0, 0, 0, 0.06);
    padding: 0.35rem;
}

.btn-add img {
    filter: none;
    display: block;
}

.btn-add:hover {
    transform: translateY(-4px) scale(1.02);
}

#floating-create-container {
    position: fixed;
    right: 1.2rem;
    bottom: 1.2rem;
    z-index: 2600;
    display: flex;
    justify-content: flex-end;
}

#floating-create-container .btn-add {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    padding: 0.75rem;
    box-shadow:
        0 18px 38px rgba(2, 6, 23, 0.6),
        inset 0 -6px 14px rgba(0, 0, 0, 0.08);
    background: linear-gradient(135deg, var(--accent-color) 0%, #fff 75%);
    color: #000;
    display: inline-flex;
    flex-direction: column;
    gap: 0.25rem;
    font-weight: 700;
    letter-spacing: 0.01em;
}

#floating-create-container .btn-add img {
    width: 22px;
    height: 22px;
}

@media (max-width: 700px) {
    #floating-create-container {
        right: 1rem;
        bottom: 1rem;
    }
    #floating-create-container .btn-add {
        width: 52px;
        height: 52px;
        border-radius: 50%;
    }
    #floating-create-container .btn-add img {
        width: 20px;
        height: 20px;
    }
}

/* Inputs / textarea premium */
input[type="text"],
input[type="url"],
input[type="file"],
textarea,
.form-input {
    width: 100%;
    padding: 0.65rem 0.9rem;
    border-radius: 12px;
    background: linear-gradient(
        180deg,
        rgba(255, 255, 255, 0.02),
        rgba(255, 255, 255, 0.01)
    );
    border: 1px solid rgba(255, 255, 255, 0.04);
    color: var(--text-primary);
    font-size: 0.95rem;
    transition:
        box-shadow 0.14s,
        border-color 0.14s,
        transform 0.14s;
}

input[type="text"]:focus,
input[type="url"]:focus,
textarea:focus,
.form-input:focus {
    outline: none;
    border-color: rgba(255, 255, 255, 0.14);
    box-shadow: 0 8px 24px rgba(2, 6, 23, 0.45);
    transform: translateY(-2px);
}

.form-input[disabled] {
    opacity: 0.6;
}

/* file input cosmetic */
.custom-file-upload {
    display: inline-block;
    padding: 0.5rem 0.75rem;
    border-radius: 9px;
    border: 1px solid rgba(255, 255, 255, 0.04);
    background: var(--surface-hover);
    cursor: pointer;
}

/* Section projets sur le profil */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(1, 1fr);
    gap: 1rem;
    margin-top: 1.25rem;
}

@media (min-width: 700px) {
    .projects-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

.project-card {
    background: var(--surface-color);
    border: 1px solid var(--border-color);
    padding: 0.75rem;
    border-radius: 12px;
    display: flex;
    gap: 0.75rem;
    align-items: flex-start;
}

.project-cover {
    width: 84px;
    height: 64px;
    object-fit: cover;
    border-radius: 8px;
    background: #111;
    flex-shrink: 0;
}

.project-meta h4 {
    margin: 0 0 0.25rem 0;
    font-size: 0.95rem;
}
.project-meta p {
    margin: 0;
    color: var(--text-secondary);
    font-size: 0.85rem;
}

.project-doc {
    margin-top: 0.6rem;
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 10px;
    padding: 0.35rem 0.5rem;
    background: rgba(0, 0, 0, 0.25);
}

.project-doc summary {
    cursor: pointer;
    font-size: 0.85rem;
    color: #fff;
    font-weight: 700;
    list-style: none;
}

.project-doc summary::-webkit-details-marker {
    display: none;
}

.project-doc-body {
    margin-top: 0.6rem;
    display: grid;
    gap: 0.5rem;
}

.project-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
}

.project-tag {
    font-size: 0.72rem;
    color: rgba(255, 255, 255, 0.9);
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.08);
    padding: 0.2rem 0.5rem;
    border-radius: 999px;
}

.project-tag strong {
    font-weight: 700;
    margin-right: 0.2rem;
}

.project-links {
    display: flex;
    gap: 0.4rem;
    flex-wrap: wrap;
}

.project-link {
    font-size: 0.75rem;
    color: #fff;
    text-decoration: none;
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 8px;
    padding: 0.25rem 0.5rem;
    background: rgba(255, 255, 255, 0.04);
}

.project-link:hover {
    background: rgba(255, 255, 255, 0.1);
}

.project-doc-section h5 {
    margin: 0;
    font-size: 0.78rem;
    color: #fff;
}

.project-doc-section p {
    margin: 0.15rem 0 0;
    color: var(--text-secondary);
    font-size: 0.78rem;
    line-height: 1.35;
}

.project-contents {
    margin-top: 0.75rem;
    padding-top: 0.75rem;
    border-top: 1px solid rgba(255, 255, 255, 0.03);
    display: none;
    gap: 0.5rem;
}

.project-contents.open {
    display: block;
}

.post-card {
    background: var(--surface-color);
    border: 1px solid var(--border-color);
    padding: 0.75rem;
    border-radius: 12px;
    margin-top: 0.75rem;
}

.badge:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.2);
    color: var(--text-primary);
}

.badge-icon {
    width: 14px;
    height: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.badge-icon svg {
    width: 100%;
    height: 100%;
    stroke: currentColor;
    fill: none;
    stroke-width: 2;
}

.badge-filled svg {
    fill: currentColor;
    stroke: none;
}

.badge-success {
    color: var(--success);
}
.badge-failure {
    color: var(--failure);
}
.badge-pause {
    color: var(--pause);
}

.timeline-dot-badge {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--surface-color);
    border: 2px solid var(--border-color);
    position: absolute;
    left: -33px;
    top: 0;
    z-index: 2;
}

.timeline-dot-badge svg {
    width: 12px;
    height: 12px;
    stroke: currentColor;
    fill: none;
    stroke-width: 2;
}

.timeline-dot-badge.filled svg {
    fill: currentColor;
    stroke: none;
}

.item-success .timeline-dot-badge {
    border-color: var(--success);
    background: rgba(16, 185, 129, 0.1);
    color: var(--success);
}

.item-failure .timeline-dot-badge {
    border-color: var(--failure);
    background: rgba(239, 68, 68, 0.1);
    color: var(--failure);
}

.item-pause .timeline-dot-badge {
    border-color: var(--pause);
    background: rgba(99, 102, 241, 0.1);
    color: var(--pause);
}

.item-empty .timeline-dot-badge {
    border-color: #333;
    background: transparent;
    color: #333;
}

.badges-immersive {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

/* --- PROFIL - ICÔNES SOCIALES --- */
.profile-social-links {
    display: flex;
    gap: 1rem;
    margin-top: 1.5rem;
    justify-content: center;
}

.profile-social-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    opacity: 0.6;
    transition: var(--transition);
    color: var(--text-primary);
}

.profile-social-icon:hover {
    opacity: 1;
}

.profile-social-icon img,
.profile-social-icon svg {
    width: 100%;
    height: 100%;
    stroke: currentColor;
    fill: currentColor;
}

/* --- BADGES RÉSEAUX SOCIAUX --- */
.profile-social-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-top: 1.5rem;
    justify-content: center;
}

.social-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.6rem 1rem;
    background: var(--surface-color);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    text-decoration: none;
    transition: var(--transition);
    color: var(--text-primary);
    font-size: 0.85rem;
    font-weight: 500;
}

.social-badge:hover {
    background: var(--surface-hover);
    border-color: var(--text-secondary);
    transform: translateY(-2px);
}

.social-badge-icon {
    width: 18px;
    height: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* --- INTERFACE RÉGLAGES (MODALE PREMIUM) --- */
#settings-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    z-index: 2500;
    display: none;
    overflow-y: auto;
    padding: 2rem 1.5rem;
    padding-top: 5rem;
}

#settings-modal.active {
    display: flex;
    align-items: flex-start; /* allow scrolling to the very top */
    justify-content: center;
    animation: none;
}

.settings-container {
    max-width: 700px;
    margin: 0 auto;
    padding: 3rem 1.5rem;
}

/* Limiter la hauteur de la boîte et activer le scroll interne */
.settings-container {
    max-height: calc(100vh - 4rem);
    overflow-y: auto;
}

.admin-page {
    max-width: 900px;
    margin: 7rem auto 3rem;
    max-height: none;
    overflow: visible;
    padding: 2.5rem 1.5rem;
}

@keyframes fadeInSettings {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.settings-header {
    margin-bottom: 3rem;
    border-bottom: 1px solid #1a1a1a;
    padding-bottom: 2rem;
}

.settings-header h2 {
    font-family: var(--font-heading);
    font-size: 2.2rem;
    font-weight: 800;
    letter-spacing: -0.04em;
    margin-bottom: 0.75rem;
    background: linear-gradient(180deg, #fff 0%, #888 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.settings-header p {
    color: #666;
    font-size: 1rem;
    font-weight: 400;
}

.settings-section {
    background: #0c0c0c;
    border: 1px solid #1a1a1a;
    border-radius: 20px;
    padding: 2.5rem;
    margin-bottom: 2.5rem;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

.settings-section h3 {
    font-family: var(--font-heading);
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 1.75rem;
    color: #f5f5f5;
    letter-spacing: -0.02em;
}

.settings-section p {
    color: #444;
    font-size: 0.85rem;
    margin-bottom: 2rem;
    font-weight: 400;
}

.settings-shell {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.settings-form-layout {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.settings-form-layout > .settings-section,
.settings-form-layout > .settings-collapsible {
    margin-bottom: 0;
}

.settings-preferences-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 1rem;
    align-items: end;
}

.settings-duo-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1rem;
}

.settings-theme-control {
    width: 100%;
}

.profile-customization-preview {
    min-height: 190px;
    margin-bottom: 1.35rem;
    padding: 0.8rem;
    border: 1px solid rgba(255, 255, 255, 0.09);
    border-radius: 22px;
    background:
        radial-gradient(
            circle at 14% 10%,
            rgba(var(--profile-accent-rgb, 16, 185, 129), 0.2),
            transparent 34%
        ),
        radial-gradient(
            circle at 86% 8%,
            rgba(var(--profile-accent-2-rgb, 245, 158, 11), 0.16),
            transparent 32%
        ),
        rgba(255, 255, 255, 0.035);
}

.profile-customization-preview-banner {
    height: 78px;
    border-radius: 16px;
    background: linear-gradient(
        135deg,
        var(--profile-accent, #10b981),
        rgba(0, 0, 0, 0.72),
        var(--profile-accent-2, #f59e0b)
    );
}

.profile-customization-preview.profile-banner-contain
    .profile-customization-preview-banner {
    background:
        linear-gradient(135deg, rgba(0, 0, 0, 0.45), rgba(0, 0, 0, 0.2)),
        linear-gradient(
            135deg,
            var(--profile-accent, #10b981),
            var(--profile-accent-2, #f59e0b)
        );
    background-size:
        62% 70%,
        100% 100%;
    background-repeat: no-repeat;
    background-position: center;
}

.profile-customization-preview.profile-banner-soft
    .profile-customization-preview-banner {
    opacity: 0.76;
    filter: saturate(0.9);
}

.profile-customization-preview-grid {
    display: grid;
    grid-template-columns: 1.35fr 0.65fr;
    gap: 0.75rem;
    margin-top: 0.75rem;
}

.profile-customization-preview.profile-layout-showcase
    .profile-customization-preview-grid {
    grid-template-columns: 1fr;
}

.profile-customization-preview.profile-layout-compact
    .profile-customization-preview-banner {
    height: 54px;
}

.profile-customization-preview-card {
    min-height: 72px;
    padding: 0.75rem;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 16px;
    background: rgba(5, 5, 5, 0.58);
}

.profile-customization-preview.profile-panel-solid
    .profile-customization-preview-card {
    background: rgba(5, 5, 5, 0.92);
}

.profile-customization-preview.profile-panel-minimal
    .profile-customization-preview-card {
    background: transparent;
    box-shadow: none;
}

.profile-customization-preview-card strong {
    display: block;
    margin-top: 0.28rem;
    font-family: var(--font-heading);
    font-size: 1.35rem;
    line-height: 1;
}

.profile-customization-preview-card.is-signal {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.45rem;
}

.profile-customization-preview-card.is-signal span {
    border-radius: 10px;
    background: linear-gradient(
        135deg,
        rgba(var(--profile-accent-rgb, 16, 185, 129), 0.2),
        rgba(255, 255, 255, 0.055)
    );
}

.profile-choice-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 0.7rem;
}

.theme-choice-grid {
    grid-template-columns: repeat(auto-fit, minmax(118px, 1fr));
}

.profile-choice-card {
    position: relative;
    min-height: 72px;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.85rem;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.025);
    cursor: pointer;
    transition:
        border-color 0.18s ease,
        background 0.18s ease,
        transform 0.18s ease;
}

.profile-choice-card:hover {
    transform: translateY(-1px);
    border-color: rgba(255, 255, 255, 0.18);
}

.profile-choice-card input,
.segmented-option input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.profile-choice-card:has(input:checked) {
    border-color: rgba(255, 255, 255, 0.28);
    background:
        radial-gradient(
            circle at 0 0,
            rgba(var(--profile-accent-rgb, 16, 185, 129), 0.14),
            transparent 34%
        ),
        rgba(255, 255, 255, 0.055);
}

.profile-choice-card strong,
.profile-choice-card small {
    display: block;
}

.profile-choice-card small {
    margin-top: 0.18rem;
    color: var(--text-secondary);
    font-size: 0.76rem;
    line-height: 1.25;
}

.theme-swatch {
    width: 30px;
    height: 30px;
    border-radius: 10px;
    background: linear-gradient(135deg, var(--swatch-a), var(--swatch-b));
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.35);
    flex: 0 0 auto;
}

.profile-color-input {
    width: 100%;
    min-height: 48px;
    padding: 0.25rem;
    border: 1px solid #222;
    border-radius: 12px;
    background: #050505;
    cursor: pointer;
}

.settings-segmented-control {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.35rem;
    padding: 0.3rem;
    border: 1px solid #222;
    border-radius: 13px;
    background: #050505;
}

.segmented-option {
    position: relative;
    cursor: pointer;
}

.segmented-option span {
    min-height: 38px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    color: var(--text-secondary);
    font-size: 0.78rem;
    font-weight: 750;
}

.segmented-option input:checked + span {
    background: rgba(255, 255, 255, 0.12);
    color: var(--text-primary);
}

.privacy-toggle-list {
    display: grid;
    gap: 0.65rem;
}

.privacy-toggle-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.95rem 1rem;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.025);
    cursor: pointer;
}

.privacy-toggle-row strong,
.privacy-toggle-row small {
    display: block;
}

.privacy-toggle-row small {
    margin-top: 0.22rem;
    color: var(--text-secondary);
    font-size: 0.78rem;
    line-height: 1.3;
}

.settings-danger-zone {
    border-color: #3d1a1a;
    background: #120b0b;
}

.settings-danger-zone h3 {
    color: #fca5a5;
    margin-bottom: 0.8rem;
}

.settings-danger-zone p {
    color: #b4b4b4;
    margin-bottom: 1rem;
}

.btn-signout-settings {
    width: 100%;
    padding: 0.9rem 1rem;
    background: #dc2626;
    color: #fff;
    border: 1px solid #b91c1c;
    border-radius: 10px;
    cursor: pointer;
    font-weight: 700;
    transition: all 0.2s ease;
}

.btn-signout-settings:hover {
    background: #b91c1c;
    border-color: #991b1b;
}

.delete-account-box {
    margin-top: 1.25rem;
    padding-top: 1.25rem;
    border-top: 1px solid #3d1a1a;
}

.delete-account-box h4 {
    margin: 0 0 0.55rem 0;
    font-size: 0.95rem;
    color: #fecaca;
}

.delete-account-box p {
    margin: 0 0 0.75rem 0;
    color: #c7c7c7;
    font-size: 0.82rem;
}

.delete-account-reasons {
    display: grid;
    gap: 0.5rem;
    margin-bottom: 0.75rem;
}

.delete-account-reason-item {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    font-size: 0.86rem;
    color: #e5e5e5;
}

.delete-account-reason-item input {
    accent-color: #ef4444;
}

.delete-account-other-wrap {
    margin-bottom: 0.75rem;
}

.delete-account-other-wrap label {
    display: block;
    font-size: 0.75rem;
    font-weight: 600;
    color: #fca5a5;
    margin-bottom: 0.35rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.btn-delete-account {
    width: 100%;
    padding: 0.82rem 1rem;
    background: transparent;
    color: #fda4af;
    border: 1px solid #7f1d1d;
    border-radius: 10px;
    cursor: pointer;
    font-weight: 700;
    transition: all 0.2s ease;
}

.btn-delete-account:hover {
    background: rgba(239, 68, 68, 0.12);
    color: #fecdd3;
}

.btn-delete-account:disabled {
    opacity: 0.65;
    cursor: not-allowed;
}

.settings-collapsible {
    border: 1px solid #1a1a1a;
    border-radius: 16px;
    background: #0c0c0c;
    overflow: hidden;
    margin-bottom: 1.25rem;
}

.settings-collapsible > summary {
    cursor: pointer;
    padding: 1.1rem 1.25rem;
    font-family: var(--font-heading);
    font-size: 1rem;
    font-weight: 700;
    color: #f5f5f5;
    display: flex;
    align-items: center;
    justify-content: space-between;
    list-style: none;
    outline: none;
}

.settings-collapsible > summary::-webkit-details-marker {
    display: none;
}

.settings-collapsible > summary::after {
    content: "▾";
    font-size: 0.9rem;
    color: #777;
    transition: transform 0.2s ease;
}

.settings-collapsible[open] > summary::after {
    transform: rotate(180deg);
}

.settings-collapsible-body {
    padding: 0 1.25rem 1.25rem;
}

.settings-section.settings-collapsible {
    padding: 0;
}

.settings-section.settings-collapsible > summary {
    padding: 2.25rem 2.5rem 1.25rem;
    font-size: 1.25rem;
}

.settings-section.settings-collapsible > summary::after {
    font-size: 1rem;
}

.settings-section.settings-collapsible .settings-collapsible-body {
    padding: 0 2.5rem 2.5rem;
}

/* --- SYSTÈME D'ACCORDÉON POUR PARAMÈTRES --- */
.accordion-section {
    background: #0c0c0c;
    border: 1px solid #1a1a1a;
    border-radius: 16px;
    margin-bottom: 1rem;
    overflow: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.accordion-section:hover {
    border-color: #2a2a2a;
}

.accordion-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.25rem 1.5rem;
    cursor: pointer;
    background: transparent;
    border: none;
    width: 100%;
    text-align: left;
    color: #f5f5f5;
    transition: background 0.2s ease;
}

.accordion-header:hover {
    background: rgba(255, 255, 255, 0.03);
}

.accordion-title {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.accordion-icon {
    width: 42px;
    height: 42px;
    border-radius: 12px;
    background: linear-gradient(
        135deg,
        rgba(255, 255, 255, 0.08),
        rgba(255, 255, 255, 0.03)
    );
    border: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    padding: 10px;
}

.accordion-icon svg,
.accordion-icon img {
    width: 20px;
    height: 20px;
    stroke: #fff;
    stroke-width: 2;
    fill: none;
    object-fit: contain;
}

.accordion-title span {
    font-family: var(--font-heading);
    font-size: 1.1rem;
    font-weight: 700;
    letter-spacing: -0.02em;
}

.accordion-arrow {
    width: 28px;
    height: 28px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition:
        transform 0.3s cubic-bezier(0.4, 0, 0.2, 1),
        background 0.2s ease;
    flex-shrink: 0;
}

.accordion-arrow svg {
    width: 16px;
    height: 16px;
    stroke: #777;
    stroke-width: 2.5;
    fill: none;
}

.accordion-section.active .accordion-arrow {
    transform: rotate(180deg);
    background: rgba(255, 255, 255, 0.08);
}

.accordion-section.active .accordion-arrow svg {
    stroke: #fff;
}

.accordion-content {
    max-height: 0;
    overflow: hidden;
    transition:
        max-height 0.4s cubic-bezier(0.4, 0, 0.2, 1),
        opacity 0.3s ease;
    opacity: 0;
}

.accordion-section.active .accordion-content {
    max-height: 2000px;
    opacity: 1;
}

.accordion-body {
    padding: 0 1.5rem 1.5rem;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    margin-top: 0;
    padding-top: 1.5rem;
}

/* Form groups within accordion */
.accordion-body .form-group {
    margin-bottom: 1.5rem;
}

.accordion-body .form-group:last-child {
    margin-bottom: 0;
}

/* Section description */
.section-desc {
    color: #666;
    font-size: 0.85rem;
    margin-bottom: 1rem;
}

/* --- FORMULAIRES AMÉLIORÉS --- */
.form-group {
    margin-bottom: 1.75rem;
}

.form-group label {
    display: block;
    font-family: var(--font-heading);
    font-size: 0.75rem;
    font-weight: 600;
    color: #555;
    margin-bottom: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

.form-input {
    width: 100%;
    background: #050505;
    border: 1px solid #222;
    border-radius: 10px;
    padding: 0.9rem 1.1rem;
    color: #fff;
    font-family: var(--font-body);
    font-size: 0.95rem;
    transition: all 0.3s ease;
}

.form-input:focus {
    border-color: #444;
    background: #080808;
    outline: none;
    box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.03);
}

/* Force a readable desktop/native rendering for selects (avoid white text on white bg). */
select.form-input,
#settings-modal select,
#create-modal select,
.modal-panel select,
#live-modal select,
.lang-select {
    background-color: #080808;
    color: #f5f5f5;
    border: 1px solid #222;
    color-scheme: dark;
}

select.form-input option,
#settings-modal select option,
#create-modal select option,
.modal-panel select option,
#live-modal select option,
.lang-select option {
    background-color: #111111;
    color: #f5f5f5;
}

.form-hint {
    font-size: 0.8rem;
    color: #444;
    margin-top: 0.6rem;
    font-weight: 400;
}

/* Fonctionnalités Premium */
.premium-features-section {
    background: linear-gradient(135deg, #1a1a2e 0%, #0f0f1a 100%);
    border: 1px solid rgba(255, 215, 0, 0.2);
    border-radius: 16px;
    padding: 1.5rem;
    margin-top: 1rem;
}

.premium-features-section h3 {
    color: #ffd700 !important;
    margin-bottom: 0.5rem;
}

.premium-feature-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    margin-bottom: 0.75rem;
    transition: all 0.2s ease;
}

.premium-feature-item:hover {
    background: rgba(255, 255, 255, 0.06);
    border-color: rgba(255, 215, 0, 0.3);
}

.premium-feature-locked {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem;
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    margin-bottom: 0.75rem;
    opacity: 0.7;
}

.premium-feature-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex: 1;
}

.premium-feature-icon {
    font-size: 1.5rem;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 215, 0, 0.1);
    border-radius: 10px;
}

.premium-feature-info h4 {
    font-size: 0.95rem;
    font-weight: 600;
    color: #fff;
    margin: 0 0 0.25rem 0;
}

.premium-feature-info p {
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.6);
    margin: 0;
}

.premium-badge {
    padding: 0.25rem 0.6rem;
    border-radius: 20px;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.premium-badge.medium {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
}

.premium-badge.pro {
    background: linear-gradient(135deg, #ffd700 0%, #ff8c00 100%);
    color: #000;
}

.premium-upgrade-btn {
    padding: 0.5rem 1rem;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    border-radius: 8px;
    font-size: 0.8rem;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.2s ease;
}

.premium-upgrade-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

/* Toggle Switch */
.toggle-switch {
    position: relative;
    display: inline-block;
    width: 48px;
    height: 26px;
    flex-shrink: 0;
}

.toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.toggle-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #333;
    transition: 0.3s;
    border-radius: 26px;
}

.toggle-slider:before {
    position: absolute;
    content: "";
    height: 20px;
    width: 20px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: 0.3s;
    border-radius: 50%;
}

.toggle-switch input:checked + .toggle-slider {
    background: linear-gradient(135deg, #ffd700 0%, #ff8c00 100%);
}

.toggle-switch input:checked + .toggle-slider:before {
    transform: translateX(22px);
}

.upload-zone {
    display: flex;
    align-items: center;
    gap: 2rem;
    margin-bottom: 2rem;
}

.preview-avatar-circle {
    width: 110px;
    height: 110px;
    border-radius: 28px;
    object-fit: cover;
    background: #1a1a1a;
    border: 2px solid #222;
    transition: transform 0.3s ease;
    cursor: pointer;
}

.preview-avatar-circle:hover {
    transform: scale(1.05);
}

.preview-banner-rect {
    width: 100%;
    height: 160px;
    border-radius: 14px;
    object-fit: cover;
    background: #1a1a1a;
    border: 1px solid #222;
    margin-bottom: 1.25rem;
    cursor: pointer;
}

input[type="file"] {
    display: none;
}

.custom-file-upload {
    display: inline-block;
    padding: 0.7rem 1.4rem;
    cursor: pointer;
    background: #151515;
    border: 1px solid #222;
    border-radius: 8px;
    font-family: var(--font-heading);
    font-size: 0.85rem;
    font-weight: 600;
    color: #ccc;
    transition: all 0.2s ease;
}

.custom-file-upload:hover {
    background: #1a1a1a;
    color: #fff;
    border-color: #333;
}

.social-link-item {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 1.25rem;
    background: #080808;
    padding: 0.4rem 0.6rem;
    border-radius: 12px;
    border: 1px solid #1a1a1a;
    transition: border-color 0.3s ease;
}

.social-link-item:focus-within {
    border-color: #333;
}

.social-link-item img {
    width: 22px;
    height: 22px;
    opacity: 0.5;
    margin-left: 0.5rem;
}

.social-link-item .form-input {
    border: none;
    padding: 0.6rem;
    background: transparent;
}

.consent-label {
    font-size: 0.75rem;
    color: #333;
    margin-top: 1.5rem;
    text-align: center;
    font-style: italic;
}

.actions-bar {
    display: flex;
    gap: 1.25rem;
    margin-top: 3rem;
    padding-top: 2.5rem;
    border-top: 1px solid #1a1a1a;
}

.btn-save {
    font-family: var(--font-heading);
    background: #fff;
    color: #000;
    border: none;
    padding: 1rem 2.5rem;
    border-radius: 12px;
    font-weight: 700;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    flex: 1;
}

.btn-save:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 20px rgba(255, 255, 255, 0.1);
}

.btn-cancel {
    font-family: var(--font-heading);
    background: transparent;
    color: #666;
    border: 1px solid #1a1a1a;
    padding: 1rem 2.5rem;
    border-radius: 12px;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    flex: 1;
}

.btn-cancel:hover {
    border-color: #333;
    color: #fff;
}

/* Follow & Stats */
.follow-section {
    display: flex;
    gap: 1rem;
    margin-top: 1.5rem;
}

.follower-stat {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.25rem;
    padding: 0.75rem 1rem;
    background: #080808;
    border-radius: 8px;
    border: 1px solid #1a1a1a;
    flex: 1;
}

.follower-stat-count {
    font-size: 1.5rem;
    font-weight: 800;
    color: #fff;
}

.follower-stat-label {
    font-size: 0.75rem;
    color: #555;
    font-weight: 600;
    text-transform: uppercase;
}

.btn-follow {
    background: #fff;
    color: #000;
    padding: 0.8rem 1.5rem;
    border-radius: 8px;
    border: none;
    font-weight: 600;
    cursor: pointer;
    font-size: 0.9rem;
    transition: all 0.3s ease;
    width: 100%;
    font-family: var(--font-heading);
}

.btn-follow:hover {
    opacity: 0.9;
}

.btn-follow.unfollow {
    background: transparent;
    color: #fff;
    border: 1px solid #1a1a1a;
}

.btn-follow.unfollow:hover {
    border-color: #333;
}

.btn-theme-toggle {
    width: 100%;
    background: #151515;
    color: #fff;
    border: 1px solid #222;
    padding: 0.9rem 1.1rem;
    border-radius: 10px;
    font-family: var(--font-body);
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-theme-toggle:hover {
    background: #1a1a1a;
    border-color: #333;
}

html.light-mode .btn-theme-toggle {
    background: #e5e5e5;
    color: #000;
    border-color: #ccc;
}

html.light-mode .btn-theme-toggle:hover {
    background: #ddd;
    border-color: #bbb;
}

.btn-settings-profile {
    position: fixed;
    top: 2rem;
    right: 2rem;
    padding: 0.6rem 1.2rem;
    background: #fff;
    color: #000;
    border: none;
    border-radius: 8px;
    font-family: var(--font-heading);
    font-weight: 600;
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.6rem;
    z-index: 100;
    visibility: visible;
    opacity: 1;
}

.btn-settings-profile:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(255, 255, 255, 0.1);
}

.btn-settings-profile svg {
    width: 16px;
    height: 16px;
    stroke-width: 2.5;
}

.profile-hero {
    position: static;
}

/* Lorsque la page profil est affichée, abaisser le bouton Réglages de 5cm */
.profile-open .btn-settings-profile {
    top: calc(2rem + 5cm);
}

/* --- MOBILE FULLSCREEN POUR PARAMÈTRES --- */
@media (max-width: 768px) {
    #settings-modal {
        padding: 0;
        padding-top: env(safe-area-inset-top);
        padding-bottom: env(safe-area-inset-bottom);
        align-items: flex-end;
        border-radius: 0;
    }

    #settings-modal.active {
        align-items: flex-end;
    }

    .settings-container {
        width: 100%;
        max-width: 100%;
        height: 100%;
        max-height: 100%;
        padding: 1.5rem;
        padding-top: 1rem;
        border-radius: 24px 24px 0 0;
        animation: slideUpMobile 0.4s cubic-bezier(0.16, 1, 0.3, 1);
        overflow-y: scroll;
        -webkit-overflow-scrolling: touch;
    }

    @keyframes slideUpMobile {
        from {
            opacity: 0;
            transform: translateY(100%);
        }
        to {
            opacity: 1;
            transform: translateY(0);
        }
    }

    /* Hide scrollbar but keep functionality */
    .settings-container::-webkit-scrollbar {
        display: none;
    }

    .settings-header {
        margin-bottom: 1.5rem;
        padding-bottom: 1rem;
        border-bottom: 1px solid #1a1a1a;
        position: sticky;
        top: 0;
        background: #050505;
        z-index: 10;
        margin: -1.5rem -1.5rem 1.5rem;
        padding: 1rem 1.5rem;
    }

    .settings-header h2 {
        font-size: 1.5rem;
    }

    .settings-header p {
        font-size: 0.9rem;
    }

    .settings-section {
        padding: 1.25rem;
        border-radius: 14px;
        margin-bottom: 1rem;
    }

    .settings-duo-grid,
    .profile-customization-preview-grid {
        grid-template-columns: 1fr;
    }

    .profile-choice-grid,
    .theme-choice-grid {
        grid-template-columns: 1fr;
    }

    .privacy-toggle-row {
        align-items: flex-start;
    }

    /* Accordion mobile styles */
    .accordion-header {
        padding: 1rem 1.25rem;
    }

    .accordion-icon {
        width: 36px;
        height: 36px;
        border-radius: 10px;
        padding: 8px;
    }

    .accordion-icon svg,
    .accordion-icon img {
        width: 18px;
        height: 18px;
    }

    .accordion-title span {
        font-size: 1rem;
    }

    .accordion-body {
        padding: 0 1.25rem 1.25rem;
        padding-top: 1.25rem;
    }

    /* Form inputs full width on mobile */
    .form-group {
        margin-bottom: 1.25rem;
    }

    .form-group label {
        font-size: 0.7rem;
    }

    .form-input {
        padding: 0.8rem 1rem;
        font-size: 1rem;
    }

    .actions-bar {
        flex-direction: column;
        gap: 0.75rem;
        margin-top: 2rem;
        padding-top: 1.5rem;
    }

    .btn-save,
    .btn-cancel {
        width: 100%;
        padding: 1rem;
        font-size: 1rem;
    }

    .upload-zone {
        flex-direction: column;
        gap: 1rem;
    }

    .create-chip-list {
        gap: 0.45rem;
    }

    .preview-avatar-circle {
        width: 80px;
        height: 80px;
        border-radius: 20px;
    }

    .preview-banner-rect {
        height: 120px;
    }

    .btn-settings-profile {
        top: 0.75rem;
        right: 0.75rem;
        padding: 0.5rem 0.75rem;
    }

    .btn-settings-profile svg {
        width: 14px;
        height: 14px;
    }

    .upload-zone {
        flex-direction: column;
        gap: 1rem;
    }

    .btn-settings-profile {
        top: 1rem;
        right: 1rem;
        padding: 0.5rem 0.75rem;
        font-size: 0.75rem;
    }

    .btn-settings-profile svg {
        width: 14px;
        height: 14px;
    }

    .actions-bar {
        flex-direction: column;
    }

    .profile-actions {
        flex-wrap: wrap;
        justify-content: center;
        gap: 8px;
    }

    .profile-actions .btn-add {
        order: 1;
    }

    .profile-actions .settings-badge {
        order: 2;
    }

    .profile-actions .profile-arc-btn {
        order: 3;
        flex: 1 1 100%;
        justify-content: center;
    }

    nav .logo {
        display: none !important;
    }
}

/* --- INTERFACE CRÉATION (MODALE) --- */
#create-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    z-index: 2500;
    display: none;
    overflow-y: auto;
    padding: 2rem 1.5rem;
    padding-top: 5rem;
}

#create-modal.active {
    display: flex;
    align-items: flex-start;
    justify-content: center;
}

.create-container {
    max-width: 700px;
    width: 100%;
    margin: 0 auto;
    padding: 3rem 1.5rem;
    animation: fadeInSettings 0.6s cubic-bezier(0.16, 1, 0.3, 1);
    max-height: calc(100vh - 4rem);
    overflow-y: auto;
    position: relative;
}

.create-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    width: 38px;
    height: 38px;
    border-radius: 12px;
    border: 1px solid var(--border-color);
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-primary);
    font-size: 1rem;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition:
        transform 0.15s ease,
        background 0.15s ease;
}

.create-close:hover {
    transform: scale(1.05);
    background: rgba(255, 255, 255, 0.1);
}

.mode-switch {
    display: flex;
    gap: 0.5rem;
    margin-top: 0.25rem;
}
.mode-switch button {
    padding: 0.5rem 0.9rem;
    border-radius: 10px;
    border: 1px solid var(--border-color);
    background: rgba(255, 255, 255, 0.04);
    color: var(--text-primary);
    cursor: pointer;
    font-weight: 700;
    transition: all 0.12s ease;
}
.mode-switch button.active {
    border-color: var(--accent-color);
    background: rgba(255, 255, 255, 0.1);
}
.mode-switch button:hover {
    transform: translateY(-1px);
}

.create-chip {
    padding: 0.5rem 0.8rem;
    border-radius: 999px;
    border: 1px solid var(--border-color);
    background: rgba(255, 255, 255, 0.04);
    color: var(--text-primary);
    cursor: pointer;
    transition: all 0.12s ease;
    font-weight: 600;
    font-size: 0.88rem;
}

.create-chip.active {
    border-color: var(--accent-color);
    background: rgba(255, 255, 255, 0.1);
}

.create-smart-panel {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin: -0.25rem 0 1rem;
    padding: 0.9rem 1rem;
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 14px;
    background: linear-gradient(
        180deg,
        rgba(255, 255, 255, 0.045),
        rgba(255, 255, 255, 0.02)
    );
}

.create-smart-summary {
    font-size: 0.88rem;
    color: var(--text-primary);
    font-weight: 600;
}

.create-smart-row {
    display: flex;
    flex-direction: column;
    gap: 0.45rem;
}

.create-smart-label {
    font-size: 0.76rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--text-secondary);
    font-weight: 700;
}

.create-chip-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

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

.type-quick {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    margin-top: 0.6rem;
}
.type-quick button {
    padding: 0.45rem 0.75rem;
    border-radius: 10px;
    border: 1px solid var(--border-color);
    background: rgba(255, 255, 255, 0.04);
    color: var(--text-primary);
    cursor: pointer;
    transition: all 0.12s ease;
    font-weight: 600;
    font-size: 0.9rem;
}
.type-quick button.active {
    border-color: var(--accent-color);
    background: rgba(255, 255, 255, 0.08);
    color: #fff;
}
.type-quick button:hover {
    transform: translateY(-1px);
}

.announcement-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.2rem 0.55rem;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.08);
    color: var(--text-primary);
    font-weight: 700;
    font-size: 0.8rem;
    border: 1px solid var(--border-color);
}

.reply-btn {
    margin-top: 0.4rem;
    padding: 0.45rem 0.9rem;
    border-radius: 12px;
    border: 1px solid var(--border-color);
    background: rgba(255, 255, 255, 0.04);
    color: var(--text-primary);
    cursor: pointer;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.12s ease;
}
.reply-btn:hover {
    transform: translateY(-1px);
}

.reply-btn.is-open {
    border-color: rgba(32, 201, 151, 0.38);
    background: rgba(32, 201, 151, 0.1);
}

.reply-count {
    background: rgba(0, 0, 0, 0.25);
    padding: 0.15rem 0.45rem;
    border-radius: 999px;
    font-size: 0.8rem;
}
.reply-btn-immersive {
    align-self: flex-start;
}

.immersive-reply-block {
    margin-top: 0.75rem;
}

.immersive-reply-block .profile-reply-panel {
    width: min(100%, 560px);
}

.card-user-bottom {
    display: flex;
    align-items: center;
    gap: 0.65rem !important;
    margin-top: 0.5rem !important;
    padding-top: 0.5rem !important;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    min-width: 0;
}

.card-user-bottom .profile-link {
    flex: 1 1 auto;
    min-width: 0;
}

.card-user-bottom .profile-link-text {
    min-width: 0;
}

.card-user-bottom > :not(.profile-link) {
    flex-shrink: 0;
}

.reply-inline {
    margin-top: 0.75rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.reply-panel-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    color: var(--text-primary);
    font-size: 0.92rem;
}

.reply-close-btn {
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.04);
    color: var(--text-secondary);
    cursor: pointer;
    font-size: 0.78rem;
    font-weight: 700;
    padding: 0.3rem 0.7rem;
}

.reply-close-btn:hover {
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.08);
}

.reply-input {
    width: 100%;
    min-height: 60px;
    border-radius: 10px;
    border: 1px solid var(--border-color);
    background: rgba(255, 255, 255, 0.03);
    color: var(--text-primary);
    padding: 0.6rem 0.8rem;
    resize: vertical;
}
.reply-actions {
    display: flex;
    justify-content: flex-end;
}
.reply-list {
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
    margin-top: 0.25rem;
}
.reply-item {
    display: flex;
    gap: 0.6rem;
    align-items: flex-start;
}
.reply-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    object-fit: cover;
    background: #222;
}
.reply-body {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    padding: 0.5rem 0.75rem;
    flex: 1;
}
.reply-meta {
    display: flex;
    gap: 0.5rem;
    align-items: baseline;
    font-size: 0.8rem;
    color: var(--text-secondary);
    margin-bottom: 0.2rem;
}
.reply-name {
    color: var(--text-primary);
    font-weight: 700;
}
.reply-time {
    font-size: 0.75rem;
}
.reply-body p {
    margin: 0;
    font-size: 0.95rem;
    line-height: 1.3;
}
.reply-empty {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

/* === TAGS DE CONTEXTE POUR TIMELINE === */
.context-tag {
    display: inline-flex;
    align-items: center;
    padding: 0.25rem 0.5rem;
    border-radius: 8px;
    font-size: 0.75rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
}

.context-tag:hover {
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.context-tag.arc-tag {
    cursor: pointer;
}

.context-tag.arc-tag:hover {
    opacity: 0.8;
}

.timeline-context {
    margin-top: 0.5rem;
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    min-width: 0;
}

/* === TOAST NOTIFICATIONS === */
#toast-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 10000;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.toast {
    background: var(--surface-color);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 16px 20px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    display: flex;
    align-items: center;
    gap: 12px;
    max-width: 350px;
    transform: translateX(100%);
    opacity: 0;
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.toast.show {
    transform: translateX(0);
    opacity: 1;
}

.toast.success {
    border-left: 4px solid var(--success);
}

.toast.error {
    border-left: 4px solid var(--failure);
}

.toast.info {
    border-left: 4px solid var(--pause);
}

.toast-icon {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
}

.toast-content {
    flex: 1;
}

.toast-title {
    font-weight: 600;
    font-size: 14px;
    margin-bottom: 2px;
}

.toast-message {
    font-size: 13px;
    color: var(--text-secondary);
    line-height: 1.4;
}

.toast-close {
    background: none;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    padding: 4px;
    border-radius: 4px;
    transition: color 0.2s ease;
}

.toast-close:hover {
    color: var(--text-primary);
}

.publish-feedback-card {
    position: fixed;
    left: 50%;
    bottom: 22px;
    width: min(460px, calc(100vw - 24px));
    transform: translate(-50%, 18px) scale(0.96);
    opacity: 0;
    pointer-events: none;
    z-index: 10020;
    padding: 1rem 1rem 0.95rem;
    border-radius: 22px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background:
        radial-gradient(
            circle at top left,
            rgba(16, 185, 129, 0.2),
            transparent 42%
        ),
        linear-gradient(180deg, rgba(19, 24, 33, 0.98), rgba(10, 14, 20, 0.98));
    box-shadow: 0 22px 60px rgba(0, 0, 0, 0.42);
    overflow: hidden;
    transition:
        opacity 0.24s ease,
        transform 0.24s cubic-bezier(0.22, 1, 0.36, 1);
}

.publish-feedback-card.is-visible {
    opacity: 1;
    pointer-events: auto;
    transform: translate(-50%, 0) scale(1);
}

.publish-feedback-glow {
    position: absolute;
    inset: -30% auto auto -10%;
    width: 160px;
    height: 160px;
    background: radial-gradient(
        circle,
        rgba(16, 185, 129, 0.28),
        transparent 68%
    );
    pointer-events: none;
}

.publish-feedback-sparks {
    position: absolute;
    inset: 0;
    pointer-events: none;
}

.publish-feedback-sparks span {
    position: absolute;
    top: 14px;
    width: 7px;
    height: 7px;
    border-radius: 999px;
    background: linear-gradient(135deg, #f8fafc, #86efac);
    opacity: 0;
    animation: publishSpark 1.4s ease-out forwards;
}

.publish-feedback-sparks span:nth-child(1) {
    left: 22px;
    animation-delay: 0.02s;
}

.publish-feedback-sparks span:nth-child(2) {
    left: 72px;
    top: 18px;
    animation-delay: 0.12s;
}

.publish-feedback-sparks span:nth-child(3) {
    right: 68px;
    top: 20px;
    animation-delay: 0.18s;
}

.publish-feedback-sparks span:nth-child(4) {
    right: 24px;
    animation-delay: 0.26s;
}

.publish-feedback-close {
    position: absolute;
    top: 10px;
    right: 10px;
    border: none;
    background: rgba(255, 255, 255, 0.06);
    color: var(--text-secondary);
    width: 30px;
    height: 30px;
    border-radius: 999px;
    cursor: pointer;
}

.publish-feedback-close:hover {
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.12);
}

.publish-feedback-eyebrow {
    position: relative;
    margin: 0 0 0.4rem;
    font-size: 0.72rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    font-weight: 700;
    color: #86efac;
}

.publish-feedback-title {
    position: relative;
    margin: 0;
    font-size: 1.2rem;
    line-height: 1.2;
    color: #f8fafc;
}

.publish-feedback-message {
    position: relative;
    margin: 0.55rem 0 0;
    color: rgba(226, 232, 240, 0.88);
    line-height: 1.5;
}

.publish-feedback-chips {
    position: relative;
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem;
    margin-top: 0.8rem;
}

.publish-feedback-chip {
    display: inline-flex;
    align-items: center;
    padding: 0.35rem 0.7rem;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.08);
    color: rgba(248, 250, 252, 0.9);
    font-size: 0.78rem;
    font-weight: 600;
}

.publish-feedback-actions {
    position: relative;
    display: flex;
    gap: 0.65rem;
    margin-top: 0.95rem;
}

.publish-feedback-btn {
    flex: 1;
    min-height: 44px;
    border-radius: 14px;
    border: 1px solid transparent;
    font-weight: 700;
    cursor: pointer;
    transition:
        transform 0.18s ease,
        border-color 0.18s ease,
        background 0.18s ease;
}

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

.publish-feedback-btn-primary {
    background: linear-gradient(135deg, #10b981, #34d399);
    color: #052e27;
}

.publish-feedback-btn-secondary {
    background: rgba(255, 255, 255, 0.06);
    border-color: rgba(255, 255, 255, 0.08);
    color: #f8fafc;
}

.timeline-card-just-published {
    animation: timelinePublishPulse 1.8s ease;
    border-color: rgba(16, 185, 129, 0.9);
    box-shadow:
        0 0 0 1px rgba(16, 185, 129, 0.28),
        0 18px 40px rgba(16, 185, 129, 0.16);
}

@keyframes publishSpark {
    0% {
        opacity: 0;
        transform: translateY(10px) scale(0.4);
    }
    25% {
        opacity: 1;
    }
    100% {
        opacity: 0;
        transform: translateY(-34px) scale(1);
    }
}

@keyframes timelinePublishPulse {
    0% {
        transform: translateY(8px) scale(0.985);
        box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.34);
    }
    40% {
        transform: translateY(0) scale(1.01);
        box-shadow: 0 0 0 12px rgba(16, 185, 129, 0);
    }
    100% {
        transform: translateY(0) scale(1);
        box-shadow:
            0 0 0 1px rgba(16, 185, 129, 0.28),
            0 18px 40px rgba(16, 185, 129, 0.16);
    }
}

@media (max-width: 640px) {
    .publish-feedback-card {
        bottom: 14px;
        width: calc(100vw - 16px);
        padding: 0.9rem 0.9rem 0.85rem;
        border-radius: 18px;
    }

    .publish-feedback-actions {
        flex-direction: column;
    }
}

.background-publish-banner {
    position: fixed;
    top: 14px;
    left: 50%;
    width: min(560px, calc(100vw - 24px));
    transform: translate(-50%, -18px);
    opacity: 0;
    pointer-events: none;
    z-index: 10030;
    transition:
        transform 0.24s cubic-bezier(0.22, 1, 0.36, 1),
        opacity 0.24s ease;
}

.background-publish-banner.is-visible {
    transform: translate(-50%, 0);
    opacity: 1;
    pointer-events: auto;
}

.background-publish-banner__inner {
    display: flex;
    align-items: center;
    gap: 0.9rem;
    padding: 0.9rem 1rem;
    border-radius: 18px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(9, 12, 18, 0.92);
    backdrop-filter: blur(14px);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.35);
}

.background-publish-banner__icon {
    position: relative;
    flex: 0 0 18px;
    width: 18px;
    height: 18px;
    border-radius: 999px;
}

.background-publish-banner[data-state="loading"]
    .background-publish-banner__icon {
    border: 2px solid rgba(52, 211, 153, 0.25);
    border-top-color: #34d399;
    animation: spin 0.9s linear infinite;
}

.background-publish-banner[data-state="success"]
    .background-publish-banner__icon {
    background: rgba(16, 185, 129, 0.16);
}

.background-publish-banner[data-state="success"]
    .background-publish-banner__icon::before {
    content: "";
    position: absolute;
    left: 5px;
    top: 2px;
    width: 5px;
    height: 9px;
    border-right: 2px solid #34d399;
    border-bottom: 2px solid #34d399;
    transform: rotate(45deg);
}

.background-publish-banner[data-state="error"]
    .background-publish-banner__icon {
    background: rgba(239, 68, 68, 0.14);
}

.background-publish-banner[data-state="error"]
    .background-publish-banner__icon::before,
.background-publish-banner[data-state="error"]
    .background-publish-banner__icon::after {
    content: "";
    position: absolute;
    left: 8px;
    top: 3px;
    width: 2px;
    height: 12px;
    background: #f87171;
    border-radius: 999px;
}

.background-publish-banner[data-state="error"]
    .background-publish-banner__icon::before {
    transform: rotate(45deg);
}

.background-publish-banner[data-state="error"]
    .background-publish-banner__icon::after {
    transform: rotate(-45deg);
}

.background-publish-banner__content {
    display: flex;
    flex-direction: column;
    min-width: 0;
    gap: 0.15rem;
}

.background-publish-banner__title {
    color: #f8fafc;
    font-size: 0.94rem;
    line-height: 1.2;
}

.background-publish-banner__message {
    color: rgba(226, 232, 240, 0.76);
    font-size: 0.83rem;
    line-height: 1.4;
}

.background-publish-banner__close {
    margin-left: auto;
    border: none;
    width: 30px;
    height: 30px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.06);
    color: var(--text-secondary);
    cursor: pointer;
}

.background-publish-banner__close:hover {
    background: rgba(255, 255, 255, 0.12);
    color: var(--text-primary);
}

@media (max-width: 640px) {
    .background-publish-banner {
        top: 10px;
        width: calc(100vw - 16px);
    }

    .background-publish-banner__inner {
        padding: 0.85rem 0.9rem;
        border-radius: 16px;
    }
}

/* === AMÉLIORATIONS BOUTONS === */
.btn {
    position: relative;
    overflow: hidden;
    transition: all 0.3s cubic-bezier(0.23, 1, 0.32, 1);
}

.btn::before {
    content: "";
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(255, 255, 255, 0.1),
        transparent
    );
    transition: left 0.6s ease;
}

.btn:hover::before {
    left: 100%;
}

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    pointer-events: none;
}

.btn:active {
    transform: scale(0.98);
}

/* === AMÉLIORATIONS CARDS === */
.discover-card {
    transition: all 0.4s cubic-bezier(0.23, 1, 0.32, 1);
}

.discover-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.discover-card:active {
    transform: translateY(-4px);
}

/* === ÉTATS VIDES === */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: var(--text-secondary);
}

.empty-state-icon {
    width: 64px;
    height: 64px;
    margin: 0 auto 20px;
    opacity: 0.5;
}

.empty-state h3 {
    font-size: 18px;
    margin-bottom: 8px;
    color: var(--text-primary);
}

.empty-state p {
    font-size: 14px;
    line-height: 1.5;
}

/* === SKELETON LOADING === */
.skeleton {
    background: linear-gradient(
        90deg,
        var(--surface-color) 25%,
        var(--surface-hover) 50%,
        var(--surface-color) 75%
    );
    background-size: 200% 100%;
    animation: loading 1.5s infinite;
    border-radius: 8px;
}

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

.skeleton-text {
    height: 1em;
    margin: 0.5em 0;
}

.skeleton-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
}

.skeleton-card {
    height: 200px;
    border-radius: 12px;
}

/* Skeleton variants */
.skeleton-banner {
    width: 100%;
    height: 260px;
    border-radius: 16px;
}

.skeleton-avatar-lg {
    width: 140px;
    height: 140px;
    border-radius: 30px;
    border: 4px solid var(--bg-color);
}

.skeleton-pill {
    width: 150px;
    height: 42px;
    border-radius: 12px;
}

.skeleton-pill-short {
    width: 100px;
}

.skeleton-chip {
    width: 70%;
    height: 22px;
    border-radius: 999px;
}

.skeleton-dot {
    width: 14px;
    height: 14px;
    border-radius: 50%;
}

.skeleton-card-sm {
    width: 100%;
    height: 120px;
    border-radius: 12px;
}

.skeleton-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1.25rem;
    width: 100%;
    grid-column: 1 / -1;
}

/* Profile skeleton layout */
.profile-skeleton {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.profile-skeleton-header {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1.5rem;
    flex-wrap: wrap;
    margin-top: -80px;
}

.profile-skeleton-meta {
    flex: 1;
    min-width: 240px;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.profile-skeleton-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-top: 0.25rem;
}

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

.profile-skeleton-timeline {
    position: relative;
    padding-left: 36px;
    margin-top: 0.5rem;
}

.profile-skeleton-timeline::before {
    content: "";
    position: absolute;
    left: 11px;
    top: 0;
    bottom: 0;
    width: 1px;
    background: var(--border-color);
}

.profile-skeleton-item {
    position: relative;
    margin-bottom: 26px;
}

.profile-skeleton-card {
    background: var(--surface-color);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 1.25rem;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

@media (max-width: 768px) {
    .skeleton-banner {
        height: 200px;
    }
    .profile-skeleton-header {
        margin-top: -60px;
    }
}

/* --- PROFILE LOADING --- */
.profile-loading {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    padding: 2rem;
    color: var(--text-secondary);
    font-size: 0.95rem;
}

.profile-loading .loading-spinner {
    width: 0.9rem;
    height: 0.9rem;
    border-width: 2px;
}

/* === ANIMATIONS MICRO === */
@keyframes bounceIn {
    0% {
        transform: scale(0.3);
        opacity: 0;
    }
    50% {
        transform: scale(1.05);
    }
    100% {
        transform: scale(1);
        opacity: 1;
    }
}

.animate-bounce-in {
    animation: bounceIn 0.6s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

@keyframes slideInUp {
    from {
        transform: translateY(30px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.animate-slide-up {
    animation: slideInUp 0.4s ease-out;
}

/* === ÉTAT DE CHARGEMENT GLOBAL === */
.app-loading {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--bg-color);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

.app-loading .loading-spinner {
    width: 40px;
    height: 40px;
    border-width: 4px;
}

/* --- COMMUNITY PROFILE ENHANCEMENTS --- */
.profile-container.is-community .profile-banner {
    height: 250px;
    border-radius: 24px;
    object-fit: cover;
}

@media (min-width: 768px) {
    .profile-container.is-community .profile-banner {
        height: 350px;
    }
}

.profile-container.is-community .profile-avatar-img {
    border-radius: 20px;
    box-shadow: 0 0 0 4px var(--bg-color);
}

.profile-container.is-community .btn-community-join {
    transition: all 0.2s ease;
}

.profile-container.is-community .btn-community-join:hover {
    transform: scale(1.05);
    opacity: 0.9;
}

/* === FEEDBACK WIDGET === */
.feedback-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.45);
    backdrop-filter: blur(4px);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s ease;
    z-index: 1100;
}

.feedback-backdrop.is-open {
    opacity: 1;
    pointer-events: auto;
}

.feedback-modal {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.96);
    min-width: 320px;
    max-width: 420px;
    width: 90%;
    background: var(--surface-color, #0c0c0c);
    color: var(--text-primary, #f8f8f8);
    border: 1px solid var(--border-color, rgba(255, 255, 255, 0.08));
    border-radius: 16px;
    padding: 1.25rem 1.4rem 1.15rem;
    box-shadow: 0 30px 90px rgba(0, 0, 0, 0.4);
    opacity: 0;
    pointer-events: none;
    transition:
        opacity 0.25s ease,
        transform 0.25s ease;
    z-index: 1101;
}

.feedback-modal.is-open {
    opacity: 1;
    pointer-events: auto;
    transform: translate(-50%, -50%) scale(1);
}

.feedback-header h3 {
    margin: 0.1rem 0 0.3rem;
    font-size: 1.35rem;
}

.feedback-header .feedback-eyebrow {
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-size: 0.75rem;
    color: var(--text-secondary, #b3b3b3);
    margin: 0;
}

.feedback-header .feedback-sub {
    margin: 0;
    color: var(--text-secondary, #b3b3b3);
    font-size: 0.95rem;
}

.feedback-form {
    margin-top: 0.9rem;
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
}

.feedback-emoji-row {
    display: flex;
    justify-content: space-between;
    gap: 0.45rem;
}

.feedback-emoji {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 52px;
    height: 52px;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(255, 255, 255, 0.03);
    cursor: pointer;
    transition:
        transform 0.15s ease,
        border-color 0.2s ease,
        box-shadow 0.2s ease;
    font-size: 1.35rem;
}

.feedback-emoji input {
    display: none;
}

.feedback-emoji:hover {
    transform: translateY(-2px);
    border-color: rgba(255, 255, 255, 0.2);
}

.feedback-emoji input:checked + span,
.feedback-emoji input:focus-visible + span {
    outline: none;
}

.feedback-emoji input:checked ~ span {
    transform: scale(1.08);
    filter: drop-shadow(0 4px 12px rgba(0, 0, 0, 0.25));
}

.feedback-label {
    font-size: 0.95rem;
    color: var(--text-secondary, #b3b3b3);
}

.feedback-form textarea {
    width: 100%;
    border-radius: 12px;
    border: 1px solid var(--border-color, rgba(255, 255, 255, 0.1));
    background: rgba(255, 255, 255, 0.03);
    color: var(--text-primary, #f8f8f8);
    padding: 0.75rem 0.9rem;
    resize: vertical;
    min-height: 110px;
    font-family: inherit;
}

.feedback-form textarea:focus {
    outline: 2px solid var(--accent-color, #6ee7ff);
    outline-offset: 2px;
}

.feedback-actions {
    display: flex;
    gap: 0.6rem;
    justify-content: flex-end;
}

.feedback-toggle {
    position: fixed;
    right: -6px;
    top: 35%;
    transform: rotate(-90deg);
    transform-origin: center;
    background: rgba(255, 255, 255, 0.08);
    color: var(--text-primary, #f8f8f8);
    border: 1px solid rgba(255, 255, 255, 0.12);
    padding: 0.55rem 0.8rem;
    border-radius: 12px 12px 0 0;
    display: none;
    align-items: center;
    gap: 0.4rem;
    cursor: pointer;
    letter-spacing: 0.04em;
    font-weight: 600;
    backdrop-filter: blur(6px);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.25);
    z-index: 1102;
}

.feedback-toggle .dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--accent-color, #6ee7ff);
    display: inline-block;
}

.feedback-toggle.is-visible {
    display: inline-flex;
}

.feedback-toggle.is-hidden {
    display: none !important;
}

@media (max-width: 640px) {
    .feedback-modal {
        top: 48%;
        padding: 1.1rem 1rem 1rem;
    }
    .feedback-emoji {
        width: 46px;
        height: 46px;
    }
    .feedback-actions {
        flex-direction: column-reverse;
        align-items: stretch;
    }
    .feedback-toggle {
        top: auto;
        bottom: 24%;
    }
}

/* Influence & Reach */
.influence-section {
    margin: 1.6rem 0;
}

.influence-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 0.8rem;
}

.influence-card {
    background: var(--surface-color);
    border: 1px solid var(--border-color);
    border-radius: 14px;
    padding: 0.85rem 0.95rem;
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
    min-height: 140px;
}

.influence-card h4 {
    margin: 0;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.95rem;
}

.influence-card .stat-block {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.5rem;
}

.influence-card .stat-value {
    font-size: 1.15rem;
    font-weight: 700;
}

.influence-card .stat-label {
    color: var(--text-secondary);
    font-size: 0.8rem;
}

.influence-card .connect-btn {
    margin-top: auto;
    padding: 0.45rem 0.75rem;
    border-radius: 9px;
    border: 1px dashed var(--border-color);
    background: rgba(255, 255, 255, 0.03);
    color: var(--text-primary);
    cursor: pointer;
    font-size: 0.8rem;
}

.influence-card.connected {
    border-color: rgba(255, 255, 255, 0.2);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.influence-card .sp-avatar {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    object-fit: cover;
    border: 1px solid rgba(255, 255, 255, 0.15);
    display: none;
}

@media (max-width: 600px) {
    .influence-grid {
        grid-template-columns: repeat(auto-fit, minmax(70px, 1fr));
        gap: 0.4rem;
    }

    .influence-card {
        padding: 0.5rem;
        border-radius: 10px;
        min-height: 110px;
        gap: 0.35rem;
    }

    .influence-card h4 {
        font-size: 0.75rem;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .influence-card .stat-block {
        grid-template-columns: 1fr;
        gap: 0.3rem;
    }

    .influence-card .stat-value {
        font-size: 0.95rem;
    }

    .influence-card .stat-label {
        font-size: 0.65rem;
        letter-spacing: 0.01em;
    }

    .influence-card .connect-btn {
        padding: 0.35rem 0.4rem;
        border-radius: 8px;
        font-size: 0.65rem;
    }

    .influence-card .sp-avatar {
        width: 30px;
        height: 30px;
    }
}

/* Skeletons pour le feed immersif */
.immersive-skeleton-container {
    padding: 1.5rem 0;
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}
.immersive-post.skeleton {
    position: relative;
    overflow: hidden;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.06);
    min-height: 420px;
}
.skeleton-block {
    width: 100%;
    height: 68vh;
    max-height: 520px;
    background: linear-gradient(90deg, #1e1e1e 25%, #2a2a2a 50%, #1e1e1e 75%);
    background-size: 400% 100%;
    animation: shimmer 1.2s infinite;
}
.skeleton-meta {
    padding: 1rem 1.25rem 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 0.45rem;
}
.skeleton-line {
    height: 12px;
    border-radius: 8px;
    background: linear-gradient(90deg, #2a2a2a 25%, #323232 50%, #2a2a2a 75%);
    background-size: 400% 100%;
    animation: shimmer 1.2s infinite;
}
.skeleton-line.short {
    width: 30%;
}
.skeleton-line:nth-child(2) {
    width: 70%;
}
.skeleton-line:nth-child(3) {
    width: 55%;
}

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

/* --- UX polish: mobile bottom nav + profile snapshot + richer desktop cards --- */
.hero-mobile-demo-card {
    display: none;
}

.profile-progress-snapshot {
    margin: 0.9rem auto 0;
    padding: 0.7rem;
    border: 1px solid var(--border-color);
    border-radius: 12px;
    max-width: 720px;
    background: rgba(255, 255, 255, 0.02);
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.45rem;
}

.profile-progress-snapshot .snapshot-item {
    padding: 0.55rem;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.profile-progress-snapshot .snapshot-label {
    color: var(--text-secondary);
    font-size: 0.72rem;
}

.profile-progress-snapshot .snapshot-value {
    font-weight: 700;
    font-size: 0.98rem;
}

@media (min-width: 1200px) {
    .discover-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 1.75rem;
    }

    .user-card {
        padding: 1.15rem;
        gap: 0.95rem;
    }

    .card-media,
    .card-media-wrap .xera-carousel-slide img.card-media {
        height: 180px;
    }
}

.mood-btn {
    border-radius: 999px;
    padding: 0.42rem 0.82rem;
    font-weight: 600;
}

@media (max-width: 900px) {
    .hero-mobile-demo-card {
        display: block;
        margin-top: 0.75rem;
        border: 1px solid var(--border-color);
        border-radius: 12px;
        padding: 0.8rem;
        background: rgba(255, 255, 255, 0.02);
    }

    .hero-mobile-demo-card p {
        color: var(--text-secondary);
        font-size: 0.86rem;
        margin: 0.3rem 0 0.65rem;
    }

    .profile-progress-snapshot {
        grid-template-columns: 1fr;
        max-width: 100%;
    }
}

/* --- Réglages reimaginés: workspace de configuration --- */
#settings-modal {
    background:
        linear-gradient(135deg, rgba(2, 6, 23, 0.78), rgba(5, 5, 5, 0.84)),
        rgba(0, 0, 0, 0.76);
    padding: clamp(1rem, 3vw, 2rem);
    padding-top: clamp(1rem, 3vw, 2rem);
    z-index: 3200;
}

#settings-modal.active {
    align-items: center;
}

#settings-modal .settings-container {
    width: min(1120px, 100%);
    max-width: 1120px;
    max-height: calc(100vh - clamp(2rem, 6vw, 4rem));
    padding: 0;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 18px;
    background:
        linear-gradient(180deg, rgba(17, 24, 39, 0.95), rgba(5, 5, 5, 0.98)),
        var(--bg-color);
    box-shadow: 0 34px 90px rgba(0, 0, 0, 0.48);
    overflow: auto;
}

.settings-shell-redesign {
    gap: 0;
    min-height: min(760px, calc(100vh - 3rem));
}

#settings-modal .settings-header {
    position: relative;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 1.35rem;
    margin: 0;
    padding: clamp(1.25rem, 3vw, 2rem);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    background:
        linear-gradient(135deg, rgba(16, 185, 129, 0.13), transparent 42%),
        linear-gradient(90deg, rgba(245, 158, 11, 0.08), transparent 58%);
}

.settings-header-main {
    min-width: 0;
}

.settings-kicker {
    margin-bottom: 0.45rem;
    color: #a7f3d0;
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.settings-title-row {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
}

#settings-modal .settings-header h2 {
    margin: 0;
    color: #fff;
    background: none;
    -webkit-text-fill-color: currentColor;
    letter-spacing: 0;
    font-size: clamp(1.65rem, 3vw, 2.55rem);
    line-height: 1.02;
}

#settings-modal .settings-header p {
    max-width: 680px;
    margin: 0.7rem 0 0;
    color: rgba(245, 245, 245, 0.68);
    font-size: 0.96rem;
}

.settings-close-btn {
    width: 42px;
    height: 42px;
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.06);
    color: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition:
        background 0.2s ease,
        border-color 0.2s ease,
        transform 0.2s ease;
}

.settings-close-btn:hover {
    transform: translateY(-1px);
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.28);
}

.settings-close-btn svg {
    width: 20px;
    height: 20px;
}

.settings-status-strip {
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.7rem;
}

.settings-status-card {
    min-width: 0;
    padding: 0.82rem 0.9rem;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.055);
}

.settings-status-card span,
.settings-upload-copy span {
    display: block;
    margin-bottom: 0.24rem;
    color: rgba(255, 255, 255, 0.5);
    font-size: 0.68rem;
    font-weight: 800;
    letter-spacing: 0.09em;
    text-transform: uppercase;
}

.settings-status-card strong {
    display: block;
    min-width: 0;
    overflow: hidden;
    color: #fff;
    font-size: 0.95rem;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.settings-form-layout {
    gap: 0;
}

.settings-workbench {
    display: grid;
    grid-template-columns: 292px minmax(0, 1fr);
    min-height: 560px;
}

.settings-mobile-section-picker {
    display: none;
}

.settings-mobile-list-header,
.settings-mobile-panel-topbar {
    display: none;
}

.settings-navigation {
    position: sticky;
    top: 0;
    align-self: start;
    display: grid;
    gap: 0.45rem;
    max-height: min(560px, calc(100vh - 285px));
    overflow-y: auto;
    padding: 1rem;
    border-right: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(255, 255, 255, 0.025);
}

.settings-navigation::-webkit-scrollbar {
    width: 6px;
}

.settings-navigation::-webkit-scrollbar-thumb {
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.16);
}

.settings-nav-item {
    width: 100%;
    min-height: 58px;
    display: grid;
    grid-template-columns: 38px minmax(0, 1fr);
    gap: 0.7rem;
    align-items: center;
    padding: 0.62rem 0.68rem;
    border: 1px solid transparent;
    border-radius: 8px;
    background: transparent;
    color: rgba(255, 255, 255, 0.68);
    text-align: left;
    cursor: pointer;
    transition:
        background 0.18s ease,
        border-color 0.18s ease,
        color 0.18s ease;
}

.settings-nav-item:hover {
    background: rgba(255, 255, 255, 0.06);
    border-color: rgba(255, 255, 255, 0.08);
    color: #fff;
}

.settings-nav-item.active {
    background: #f8fafc;
    color: #050505;
}

.settings-nav-danger.active {
    background: #fee2e2;
    color: #7f1d1d;
}

.settings-nav-glyph {
    width: 34px;
    height: 34px;
    border-radius: 8px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.08);
    color: inherit;
    font-size: 0.72rem;
    font-weight: 800;
}

.settings-nav-item.active .settings-nav-glyph {
    background: rgba(16, 185, 129, 0.13);
    color: #065f46;
}

.settings-nav-danger.active .settings-nav-glyph {
    background: rgba(239, 68, 68, 0.13);
    color: #991b1b;
}

.settings-nav-item strong,
.settings-nav-item small {
    display: block;
    min-width: 0;
}

.settings-nav-item strong {
    font-size: 0.88rem;
    line-height: 1.1;
}

.settings-nav-item small {
    margin-top: 0.18rem;
    overflow: hidden;
    opacity: 0.72;
    font-size: 0.73rem;
    line-height: 1.25;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.settings-panel-stack {
    min-width: 0;
    padding: clamp(1rem, 2vw, 1.35rem);
}

.settings-panel {
    display: none;
    min-height: 520px;
    margin: 0;
    padding: 0;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    background:
        linear-gradient(
            180deg,
            rgba(255, 255, 255, 0.055),
            rgba(255, 255, 255, 0.025)
        ),
        rgba(5, 5, 5, 0.55);
    box-shadow: none;
}

.settings-panel.active {
    display: block;
    animation: settingsPanelIn 0.22s ease both;
}

@keyframes settingsPanelIn {
    from {
        opacity: 0;
        transform: translateY(6px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.settings-panel .accordion-header {
    min-height: 74px;
    padding: 1.1rem 1.25rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    cursor: default;
}

.settings-panel .accordion-header:hover {
    background: transparent;
}

.settings-panel .accordion-title {
    min-width: 0;
}

.settings-panel .accordion-title span {
    color: #fff;
    font-size: 1.18rem;
    letter-spacing: 0;
}

.settings-panel .accordion-arrow {
    display: none;
}

.settings-panel .accordion-content,
.settings-panel.active .accordion-content {
    max-height: none;
    overflow: visible;
    opacity: 1;
}

.settings-panel .accordion-body {
    padding: clamp(1rem, 2.4vw, 1.5rem);
    border-top: 0;
}

#settings-modal .form-group label {
    color: rgba(255, 255, 255, 0.58);
    letter-spacing: 0.08em;
}

#settings-modal .form-hint,
#settings-modal .section-desc {
    color: rgba(255, 255, 255, 0.48);
}

#settings-modal .form-input,
#settings-modal .lang-select,
#settings-modal select {
    border-color: rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    background-color: rgba(255, 255, 255, 0.055);
    color: #fff;
}

#settings-modal .form-input:focus,
#settings-modal .lang-select:focus {
    border-color: rgba(16, 185, 129, 0.55);
    background: rgba(255, 255, 255, 0.08);
    box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.12);
}

.settings-preferences-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    align-items: stretch;
}

.settings-preferences-grid .form-group {
    height: 100%;
    margin-bottom: 0;
    padding: 1rem;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.035);
}

.settings-toggle-card {
    display: flex !important;
    align-items: flex-start;
    gap: 0.75rem;
    margin: 0;
    padding: 0.85rem 0.9rem;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.035);
    color: #fff !important;
    cursor: pointer;
    font-family: var(--font-body) !important;
    font-size: 0.88rem !important;
    letter-spacing: 0 !important;
    text-transform: none !important;
}

.settings-toggle-card input {
    margin-top: 0.2rem;
}

.settings-theme-control,
.btn-theme-toggle {
    min-height: 48px;
    border-radius: 8px;
    background: #f8fafc;
    color: #050505;
    border-color: transparent;
    font-weight: 750;
}

.settings-theme-control:hover,
.btn-theme-toggle:hover {
    background: #e5e7eb;
    border-color: transparent;
}

.settings-media-grid {
    display: grid;
    grid-template-columns: minmax(210px, 0.8fr) minmax(0, 1.2fr);
    gap: 1rem;
    margin-bottom: 1.3rem;
}

.settings-upload-card {
    min-width: 0;
    display: grid;
    gap: 0.9rem;
    align-content: space-between;
    min-height: 210px;
    padding: 1rem;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.04);
    cursor: pointer;
    transition:
        border-color 0.18s ease,
        background 0.18s ease,
        transform 0.18s ease;
}

.settings-upload-card:hover {
    transform: translateY(-1px);
    border-color: rgba(16, 185, 129, 0.36);
    background: rgba(255, 255, 255, 0.065);
}

.settings-upload-copy strong,
.settings-upload-copy small {
    display: block;
}

.settings-upload-copy strong {
    color: #fff;
    font-size: 1rem;
}

.settings-upload-copy small {
    margin-top: 0.22rem;
    color: rgba(255, 255, 255, 0.5);
    font-size: 0.8rem;
}

.settings-avatar-preview-wrap,
.settings-banner-preview-wrap {
    position: relative;
    min-width: 0;
}

.settings-avatar-preview-wrap {
    width: max-content;
}

.preview-avatar-circle {
    width: 96px;
    height: 96px;
    border: 2px solid rgba(255, 255, 255, 0.16);
    border-radius: 50%;
    background: #111827;
}

.preview-avatar-circle:hover {
    transform: none;
}

.preview-banner-rect {
    width: 100%;
    height: auto;
    aspect-ratio: 16 / 5;
    margin: 0;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 8px;
    background: #111827;
}

.settings-upload-action {
    position: absolute;
    right: 0.55rem;
    bottom: 0.55rem;
    min-width: 34px;
    height: 34px;
    padding: 0 0.7rem;
    border-radius: 8px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #f8fafc;
    color: #050505;
    box-shadow: 0 8px 22px rgba(0, 0, 0, 0.28);
    font-size: 0.78rem;
    font-weight: 800;
}

.settings-upload-action svg {
    width: 17px;
    height: 17px;
}

.profile-customization-preview,
.profile-choice-card,
.settings-segmented-control,
.privacy-toggle-row,
.blocked-user-item,
.blocked-users-empty,
.social-link-item {
    border-radius: 8px;
}

.profile-customization-preview {
    border-color: rgba(255, 255, 255, 0.1);
    background:
        linear-gradient(
            135deg,
            rgba(var(--profile-accent-rgb, 16, 185, 129), 0.16),
            transparent 36%
        ),
        linear-gradient(
            90deg,
            transparent,
            rgba(var(--profile-accent-2-rgb, 245, 158, 11), 0.1)
        ),
        rgba(255, 255, 255, 0.035);
}

.profile-customization-preview-banner,
.profile-customization-preview-card,
.theme-swatch,
.settings-segmented-control,
.segmented-option span,
.profile-color-input {
    border-radius: 8px;
}

.profile-choice-card {
    min-height: 76px;
    border-color: rgba(255, 255, 255, 0.09);
    background: rgba(255, 255, 255, 0.035);
}

.profile-choice-card:has(input:checked) {
    border-color: rgba(16, 185, 129, 0.46);
    background: rgba(16, 185, 129, 0.1);
}

.settings-segmented-control {
    border-color: rgba(255, 255, 255, 0.09);
    background: rgba(255, 255, 255, 0.035);
}

.segmented-option input:checked + span {
    background: #f8fafc;
    color: #050505;
}

.privacy-toggle-row,
.blocked-user-item,
.social-link-item {
    border-color: rgba(255, 255, 255, 0.09);
    background: rgba(255, 255, 255, 0.035);
}

.settings-panel[data-settings-section="socials"] .accordion-body > .form-group {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.65rem;
}

.settings-panel[data-settings-section="socials"] .social-link-item {
    margin-bottom: 0;
}

.social-link-item img {
    margin-left: 0;
    opacity: 0.68;
}

.toggle-slider {
    background-color: rgba(255, 255, 255, 0.18);
}

.toggle-switch input:checked + .toggle-slider {
    background: #10b981;
}

.account-type-toggle {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.65rem;
}

.account-type-btn {
    min-height: 48px;
    border-radius: 8px;
    border-color: rgba(255, 255, 255, 0.1);
    background: rgba(255, 255, 255, 0.04);
}

.account-type-btn.active {
    background: #f8fafc;
    border-color: transparent;
    color: #050505;
}

.verification-section {
    margin-bottom: 0;
}

.verification-status {
    padding: 0.9rem 1rem;
    border: 1px solid rgba(255, 255, 255, 0.09);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.04);
}

#settings-modal .btn-verify {
    min-height: 42px;
    border-radius: 8px;
    background: #10b981;
    color: #02130d;
    font-weight: 800;
}

.settings-danger-zone {
    border-color: rgba(239, 68, 68, 0.25);
    background:
        linear-gradient(
            180deg,
            rgba(127, 29, 29, 0.18),
            rgba(69, 10, 10, 0.12)
        ),
        rgba(5, 5, 5, 0.6);
}

.settings-danger-title {
    color: #fecaca !important;
}

.settings-danger-alert {
    margin-bottom: 1rem !important;
    color: #fecaca !important;
    font-weight: 800;
}

.delete-account-box {
    margin-top: 0;
    padding-top: 0;
    border-top: 0;
}

.btn-delete-account,
.btn-signout-settings {
    width: 100%;
    min-height: 48px;
    margin-top: 1rem;
    border-radius: 8px;
}

.btn-delete-account {
    background: #dc2626;
    border-color: #b91c1c;
    color: #fff;
}

.btn-delete-account:hover {
    background: #b91c1c;
    color: #fff;
}

#settings-modal .actions-bar {
    position: sticky;
    bottom: 0;
    z-index: 4;
    margin: 0;
    padding: 1rem clamp(1rem, 2vw, 1.35rem);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(5, 5, 5, 0.88);
    backdrop-filter: blur(14px);
}

#settings-modal .btn-save,
#settings-modal .btn-cancel {
    border-radius: 8px;
}

#settings-modal .btn-save:hover {
    transform: translateY(-1px);
}

.settings-shell-redesign > .settings-section {
    margin: 1rem;
    border-radius: 10px;
}

#settings-modal.active ~ #floating-create-container {
    display: none !important;
}

html.light-mode #settings-modal {
    background: rgba(15, 23, 42, 0.38);
}

html.light-mode #settings-modal .settings-container {
    border-color: rgba(15, 23, 42, 0.12);
    background:
        linear-gradient(
            180deg,
            rgba(248, 250, 252, 0.98),
            rgba(255, 255, 255, 0.98)
        ),
        #fff;
    box-shadow: 0 34px 90px rgba(15, 23, 42, 0.18);
}

html.light-mode #settings-modal .settings-header {
    border-bottom-color: rgba(15, 23, 42, 0.1);
    background:
        linear-gradient(135deg, rgba(16, 185, 129, 0.12), transparent 42%),
        linear-gradient(90deg, rgba(245, 158, 11, 0.11), transparent 58%);
}

html.light-mode #settings-modal .settings-header h2,
html.light-mode .settings-status-card strong,
html.light-mode .settings-upload-copy strong,
html.light-mode .settings-panel .accordion-title span {
    color: #0f172a;
}

html.light-mode #settings-modal .settings-header p,
html.light-mode .settings-status-card span,
html.light-mode .settings-upload-copy small,
html.light-mode #settings-modal .form-hint,
html.light-mode #settings-modal .section-desc {
    color: rgba(15, 23, 42, 0.58);
}

html.light-mode .settings-kicker {
    color: #047857;
}

html.light-mode .settings-close-btn,
html.light-mode .settings-status-card,
html.light-mode .settings-navigation,
html.light-mode .settings-panel,
html.light-mode .settings-preferences-grid .form-group,
html.light-mode .settings-upload-card,
html.light-mode .settings-toggle-card,
html.light-mode .profile-choice-card,
html.light-mode .privacy-toggle-row,
html.light-mode .blocked-user-item,
html.light-mode .social-link-item,
html.light-mode .verification-status {
    border-color: rgba(15, 23, 42, 0.1);
    background: rgba(15, 23, 42, 0.035);
    color: #0f172a;
}

html.light-mode .settings-nav-item {
    color: rgba(15, 23, 42, 0.68);
}

html.light-mode .settings-nav-item:hover {
    background: rgba(15, 23, 42, 0.055);
    color: #0f172a;
}

html.light-mode .settings-nav-item.active,
html.light-mode .account-type-btn.active,
html.light-mode .segmented-option input:checked + span,
html.light-mode .settings-theme-control,
html.light-mode .btn-theme-toggle {
    background: #0f172a;
    color: #fff;
}

html.light-mode #settings-modal .form-input,
html.light-mode #settings-modal .lang-select,
html.light-mode #settings-modal select {
    border-color: rgba(15, 23, 42, 0.12);
    background-color: rgba(15, 23, 42, 0.04);
    color: #0f172a;
}

html.light-mode #settings-modal .actions-bar {
    border-top-color: rgba(15, 23, 42, 0.1);
    background: rgba(255, 255, 255, 0.9);
}

@media (max-width: 980px) {
    #settings-modal {
        padding: 0;
    }

    #settings-modal.active {
        align-items: stretch;
    }

    #settings-modal .settings-container {
        width: 100%;
        max-width: 100%;
        height: 100%;
        max-height: 100%;
        border-radius: 0;
    }

    #settings-modal .settings-header {
        position: sticky;
        top: 0;
        z-index: 8;
        margin: 0;
        padding: 1rem;
        background:
            linear-gradient(135deg, rgba(16, 185, 129, 0.16), transparent 42%),
            rgba(5, 5, 5, 0.96);
    }

    .settings-status-strip {
        display: flex;
        grid-template-columns: none;
        overflow-x: auto;
        padding-bottom: 0.1rem;
        scrollbar-width: none;
    }

    .settings-status-strip::-webkit-scrollbar {
        display: none;
    }

    .settings-status-card {
        flex: 0 0 min(235px, 76vw);
    }

    .settings-workbench {
        display: block;
        min-height: 0;
    }

    .settings-navigation {
        position: static;
        z-index: 7;
        display: flex;
        gap: 0.55rem;
        overflow-x: auto;
        overflow-y: hidden;
        padding: 0.75rem 1rem;
        border-right: 0;
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
        scrollbar-width: none;
    }

    .settings-navigation::-webkit-scrollbar {
        display: none;
    }

    .settings-nav-item {
        min-width: 168px;
    }

    .settings-panel-stack {
        padding: 1rem;
    }

    .settings-panel {
        min-height: 0;
    }

    .settings-preferences-grid,
    .settings-media-grid,
    .settings-duo-grid,
    .profile-customization-preview-grid,
    .account-type-toggle,
    .settings-panel[data-settings-section="socials"]
        .accordion-body
        > .form-group {
        grid-template-columns: 1fr;
    }

    .settings-upload-card {
        min-height: 0;
    }

    .preview-banner-rect {
        aspect-ratio: 16 / 7;
    }

    #settings-modal .actions-bar {
        flex-direction: column-reverse;
        gap: 0.75rem;
    }

    html.light-mode #settings-modal .settings-header {
        background:
            linear-gradient(135deg, rgba(16, 185, 129, 0.12), transparent 42%),
            rgba(255, 255, 255, 0.96);
    }
}

@media (max-width: 768px) {
    #settings-modal {
        background: rgba(0, 0, 0, 0.92);
    }

    #settings-modal .settings-container {
        height: 100dvh;
        max-height: 100dvh;
        overflow: hidden;
    }

    .settings-shell-redesign {
        height: 100dvh;
        min-height: 0;
        display: flex;
        flex-direction: column;
    }

    #settings-modal .settings-header {
        position: relative;
        flex: 0 0 auto;
        display: grid;
        grid-template-columns: minmax(0, 1fr) 40px;
        align-items: center;
        gap: 0.75rem;
        min-height: 64px;
        padding: calc(env(safe-area-inset-top, 0px) + 0.75rem) 1rem 0.75rem;
    }

    .settings-kicker,
    #settings-modal .settings-header p,
    #settings-modal .settings-status-strip {
        display: none;
    }

    #settings-modal .settings-header h2 {
        font-size: 1.45rem;
        line-height: 1;
    }

    .settings-title-row {
        gap: 0.45rem;
    }

    .settings-close-btn {
        width: 40px;
        height: 40px;
        border-radius: 10px;
    }

    .settings-form-layout {
        flex: 1 1 auto;
        min-height: 0;
        display: flex;
        flex-direction: column;
    }

    .settings-workbench {
        flex: 1 1 auto;
        min-height: 0;
        display: flex;
        flex-direction: column;
        overflow: hidden;
    }

    .settings-mobile-section-picker {
        display: none;
    }

    .settings-mobile-list-header {
        flex: 0 0 auto;
        display: grid;
        gap: 0.2rem;
        padding: 0.9rem 1rem 0.6rem;
        border-bottom: 1px solid rgba(255, 255, 255, 0.08);
        background: rgba(15, 23, 42, 0.88);
    }

    .settings-mobile-list-header span {
        color: rgba(255, 255, 255, 0.55);
        font-size: 0.68rem;
        font-weight: 800;
        letter-spacing: 0.1em;
        text-transform: uppercase;
    }

    .settings-mobile-list-header strong {
        color: #fff;
        font-size: 1.02rem;
        line-height: 1.2;
    }

    .settings-navigation {
        flex: 1 1 auto;
        align-self: stretch;
        width: 100%;
        min-height: 0;
        max-height: none;
        display: grid;
        align-content: start;
        gap: 0.65rem;
        overflow-y: auto;
        overflow-x: hidden;
        padding: 0.85rem 1rem 1rem;
        border-right: 0;
        border-bottom: 0;
        background: rgba(15, 23, 42, 0.88);
        -webkit-overflow-scrolling: touch;
    }

    .settings-nav-item {
        min-width: 0;
        min-height: 68px;
        grid-template-columns: 40px minmax(0, 1fr) 16px;
        gap: 0.8rem;
        padding: 0.82rem 0.85rem;
        border-color: rgba(255, 255, 255, 0.09);
        background: rgba(255, 255, 255, 0.045);
        color: rgba(255, 255, 255, 0.86);
    }

    .settings-nav-item::after {
        content: "";
        width: 8px;
        height: 8px;
        border-top: 2px solid currentColor;
        border-right: 2px solid currentColor;
        opacity: 0.55;
        transform: rotate(45deg);
    }

    .settings-nav-item.active {
        border-color: rgba(16, 185, 129, 0.42);
        background: rgba(16, 185, 129, 0.1);
        color: #fff;
    }

    .settings-nav-danger.active {
        border-color: rgba(248, 113, 113, 0.48);
        background: rgba(127, 29, 29, 0.22);
        color: #fecaca;
    }

    .settings-nav-glyph {
        width: 38px;
        height: 38px;
    }

    .settings-nav-item.active .settings-nav-glyph {
        background: #10b981;
        color: #02130d;
    }

    .settings-nav-danger.active .settings-nav-glyph {
        background: #fecaca;
        color: #7f1d1d;
    }

    .settings-nav-item small {
        white-space: normal;
    }

    .settings-panel-stack {
        flex: 1 1 auto;
        min-height: 0;
        display: none;
        overflow-y: auto;
        padding: 0;
        overscroll-behavior: contain;
        touch-action: pan-y;
        -webkit-overflow-scrolling: touch;
    }

    .settings-workbench.settings-mobile-section-open
        .settings-mobile-list-header,
    .settings-workbench.settings-mobile-section-open .settings-navigation {
        display: none;
    }

    .settings-workbench.settings-mobile-section-open .settings-panel-stack {
        display: block;
        height: 100%;
        background: rgba(5, 5, 5, 0.72);
    }

    .settings-workbench.settings-mobile-section-open
        .settings-mobile-panel-topbar {
        position: sticky;
        top: 0;
        z-index: 6;
        flex: 0 0 auto;
        display: grid;
        grid-template-columns: 42px minmax(0, 1fr);
        align-items: center;
        gap: 0.65rem;
        min-height: 58px;
        padding: 0.55rem 1rem;
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
        background: rgba(5, 5, 5, 0.94);
        backdrop-filter: blur(14px);
    }

    .settings-mobile-back-btn {
        width: 40px;
        height: 40px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        border: 1px solid rgba(255, 255, 255, 0.14);
        border-radius: 10px;
        background: rgba(255, 255, 255, 0.07);
        color: #fff;
        cursor: pointer;
    }

    .settings-mobile-back-btn svg {
        width: 22px;
        height: 22px;
    }

    .settings-mobile-panel-title {
        min-width: 0;
        overflow: hidden;
        color: #fff;
        font-size: 1.05rem;
        line-height: 1.18;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .settings-panel {
        min-height: 0;
        width: 100%;
        border: 0;
        border-radius: 0;
        background: transparent;
    }

    .settings-panel.active {
        padding-bottom: 0.5rem;
    }

    .settings-panel .accordion-header {
        display: none;
    }

    .settings-panel .accordion-body {
        padding: 1rem;
    }

    .settings-preferences-grid .form-group,
    .settings-upload-card,
    .profile-choice-card,
    .privacy-toggle-row,
    .blocked-user-item,
    .social-link-item {
        padding: 0.85rem;
    }

    .settings-preferences-grid {
        gap: 0.75rem;
    }

    .settings-media-grid {
        gap: 0.75rem;
        margin-bottom: 1rem;
    }

    .settings-upload-card {
        min-height: auto;
    }

    .preview-avatar-circle {
        width: 84px;
        height: 84px;
    }

    .preview-banner-rect {
        aspect-ratio: 16 / 8;
    }

    .profile-choice-card,
    .privacy-toggle-row {
        min-height: 0;
    }

    .privacy-toggle-row {
        align-items: center;
    }

    .account-type-toggle {
        grid-template-columns: 1fr;
    }

    #settings-modal .actions-bar {
        position: relative;
        flex: 0 0 auto;
        display: grid;
        grid-template-columns: minmax(0, 0.86fr) minmax(0, 1.14fr);
        gap: 0.75rem;
        padding: 0.75rem 1rem calc(0.75rem + env(safe-area-inset-bottom, 0px));
    }

    #settings-modal .btn-save,
    #settings-modal .btn-cancel {
        min-height: 46px;
        width: 100%;
        padding: 0.75rem 0.9rem;
        font-size: 0.95rem;
    }

    html.light-mode .settings-mobile-list-header,
    html.light-mode .settings-navigation {
        border-color: rgba(15, 23, 42, 0.1);
        background: rgba(255, 255, 255, 0.94);
    }

    html.light-mode .settings-mobile-list-header span {
        color: rgba(15, 23, 42, 0.56);
    }

    html.light-mode .settings-mobile-list-header strong,
    html.light-mode .settings-mobile-panel-title {
        color: #0f172a;
    }

    html.light-mode .settings-nav-item {
        border-color: rgba(15, 23, 42, 0.1);
        background: rgba(15, 23, 42, 0.035);
        color: rgba(15, 23, 42, 0.84);
    }

    html.light-mode .settings-nav-item.active {
        border-color: rgba(16, 185, 129, 0.38);
        background: rgba(16, 185, 129, 0.1);
        color: #064e3b;
    }

    html.light-mode
        .settings-workbench.settings-mobile-section-open
        .settings-panel-stack {
        background: rgba(248, 250, 252, 0.98);
    }

    html.light-mode
        .settings-workbench.settings-mobile-section-open
        .settings-mobile-panel-topbar {
        border-bottom-color: rgba(15, 23, 42, 0.1);
        background: rgba(255, 255, 255, 0.94);
    }

    html.light-mode .settings-mobile-back-btn {
        border-color: rgba(15, 23, 42, 0.12);
        background: rgba(15, 23, 42, 0.05);
        color: #0f172a;
    }
}

/* ========================================
   SYSTÈME D'AFFICHAGE DES MÉTADONNÉES - FEED IMMERSIF
   ======================================== */

/* Description avec troncature à 2 lignes */
.immersive-description {
    color: #e0e0e0;
    font-size: 0.85rem;
    line-height: 1.4;
    margin: 0.6rem 0 1rem;
    word-wrap: break-word;
    word-break: break-word;
    overflow-wrap: break-word;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    max-height: 2.8em;
    white-space: pre-wrap;
}

/* Bouton "Afficher plus" - CACHÉ */
.show-more-btn {
    display: none;
}

/* Wrapper pour description et bouton */
.immersive-description-wrapper {
    position: relative;
}

.immersive-description-wrapper .immersive-description {
    margin-bottom: 0.8rem;
    cursor: pointer;
    transition: opacity 0.15s ease;
}

.immersive-description-wrapper .immersive-description:hover {
    opacity: 0.9;
}

/* État expandé */
.immersive-description.expanded {
    display: block;
    -webkit-line-clamp: unset;
    max-height: none;
}

/* Expansion inline de la description */
.immersive-description-expanded {
    color: #e0e0e0;
    font-size: 0.85rem;
    line-height: 1.4;
    margin: 0.6rem 0 1rem;
    word-wrap: break-word;
    word-break: break-word;
    overflow-wrap: break-word;
    white-space: pre-wrap;
    display: block;
    max-height: none;
}

/* Amélioration du modal de détails */
.content-details-modal {
    background: var(--surface-color);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
    max-width: 500px;
    width: 90%;
    max-height: 85vh;
    overflow-y: auto;
    position: relative;
    animation: slideUp 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.modal-close-btn {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #fff;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    font-size: 1.2rem;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
}

.modal-close-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.3);
}

.modal-header {
    padding: 1.5rem 1.5rem 1rem;
    border-bottom: 1px solid var(--border-color);
}

.modal-header h2 {
    font-size: 1.3rem;
    font-weight: 700;
    margin: 0 0 0.8rem;
    line-height: 1.3;
    color: var(--text-primary);
}

.modal-user {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    margin: 0;
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.modal-user-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    object-fit: cover;
    border: 1px solid var(--border-color);
}

.modal-date {
    margin-left: auto;
    font-size: 0.85rem;
}

.modal-body {
    padding: 1.5rem;
    border-bottom: 1px solid var(--border-color);
}

.full-description {
    margin: 0;
    font-size: 0.95rem;
    line-height: 1.6;
    color: var(--text-primary);
    white-space: pre-wrap;
    word-wrap: break-word;
    word-break: break-word;
}

.full-description em {
    color: var(--text-secondary);
    font-style: italic;
}

.modal-stats {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    padding: 1rem 1.5rem;
    border-bottom: 1px solid var(--border-color);
}

.stat-item {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.stat-label {
    font-size: 0.8rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    font-weight: 600;
    letter-spacing: 0.5px;
}

.stat-value {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--text-primary);
}

.modal-actions {
    display: flex;
    gap: 0.8rem;
    padding: 1.5rem;
}

.modal-btn {
    flex: 1;
    padding: 0.8rem;
    border: 1px solid var(--border-color);
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-primary);
    border-radius: 6px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.modal-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: var(--border-color);
}

.modal-btn.primary {
    background: linear-gradient(135deg, #10b981, #059669);
    border-color: #10b981;
    color: #fff;
}

.modal-btn.primary:hover {
    background: linear-gradient(135deg, #059669, #047857);
    border-color: #059669;
}

.content-details-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    padding: 1rem;
}

/* Responsive pour mobile */
@media (max-width: 480px) {
    .content-details-modal {
        max-height: 90vh;
        width: 100%;
        border-radius: 12px 12px 0 0;
    }

    .modal-header {
        padding: 1.2rem 1.2rem 0.8rem;
    }

    .modal-header h2 {
        font-size: 1.1rem;
    }

    .modal-body {
        padding: 1.2rem;
    }

    .full-description {
        font-size: 0.9rem;
    }

    .modal-stats {
        gap: 0.8rem;
        padding: 0.8rem 1.2rem;
    }

    .modal-actions {
        flex-direction: column;
        padding: 1.2rem;
        gap: 0.6rem;
    }

    .immersive-description {
        font-size: 0.8rem;
    }

    .show-more-btn {
        padding: 0.35rem 0.7rem;
        font-size: 0.7rem;
    }
}

/* --- TRAJECTORY GUARD / ÉTAT DE TRAJECTOIRE --- */
.trajectory-guard {
    background: linear-gradient(
        135deg,
        rgba(15, 23, 42, 0.3) 0%,
        rgba(30, 41, 59, 0.2) 100%
    );
    border: 1px solid rgba(71, 85, 105, 0.3);
    border-radius: 8px;
    padding: 1rem;
    margin: 1rem 0;
    font-family: var(--font-body);
    transition: var(--transition);
}

.trajectory-guard.guard-low {
    border-color: rgba(239, 68, 68, 0.25);
    background: linear-gradient(
        135deg,
        rgba(127, 29, 29, 0.15) 0%,
        rgba(153, 27, 27, 0.08) 100%
    );
}

.trajectory-guard.guard-solid {
    border-color: rgba(34, 197, 94, 0.25);
    background: linear-gradient(
        135deg,
        rgba(20, 83, 45, 0.15) 0%,
        rgba(22, 101, 52, 0.08) 100%
    );
}

.guard-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 0.75rem;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.guard-title {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.guard-icon {
    font-size: 1.1rem;
    line-height: 1;
}

.guard-title strong {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-primary);
    letter-spacing: 0.5px;
}

.guard-momentum {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.8rem;
    color: var(--text-secondary);
}

.momentum-label {
    opacity: 0.7;
}

.momentum-value {
    font-weight: 600;
    color: var(--text-primary);
}

.guard-body {
    margin-bottom: 0.75rem;
}

.guard-message p {
    font-size: 0.85rem;
    line-height: 1.5;
    color: var(--text-secondary);
    margin: 0;
}

.guard-message strong {
    color: var(--text-primary);
    font-weight: 600;
}

.guard-footer {
    display: flex;
    justify-content: flex-start;
}

.btn-guard-action {
    padding: 0.5rem 1rem;
    font-size: 0.8rem;
    font-weight: 600;
    border: 1px solid rgba(71, 85, 105, 0.4);
    background: rgba(71, 85, 105, 0.15);
    color: var(--text-primary);
    border-radius: 6px;
    cursor: pointer;
    transition: var(--transition);
    letter-spacing: 0.3px;
}

.btn-guard-action:hover {
    background: rgba(71, 85, 105, 0.25);
    border-color: rgba(71, 85, 105, 0.5);
}

.trajectory-guard.guard-low .btn-guard-action {
    border-color: rgba(239, 68, 68, 0.35);
    background: rgba(239, 68, 68, 0.12);
}

.trajectory-guard.guard-low .btn-guard-action:hover {
    background: rgba(239, 68, 68, 0.2);
    border-color: rgba(239, 68, 68, 0.5);
}

.trajectory-guard.guard-solid .btn-guard-action {
    border-color: rgba(34, 197, 94, 0.35);
    background: rgba(34, 197, 94, 0.12);
}

.trajectory-guard.guard-solid .btn-guard-action:hover {
    background: rgba(34, 197, 94, 0.2);
    border-color: rgba(34, 197, 94, 0.5);
}

@media (max-width: 480px) {
    .trajectory-guard {
        padding: 0.8rem;
        margin: 0.8rem 0;
    }

    .guard-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .guard-momentum {
        align-self: flex-start;
    }

    .guard-message p {
        font-size: 0.8rem;
    }

    .btn-guard-action {
        font-size: 0.75rem;
        padding: 0.45rem 0.9rem;
        width: 100%;
    }
}

/* --- VIRAL GROWTH WIDGETS --- */

/* Reach Stats: Affiche l'influence de manière subtile */
.reach-stats-widget {
    display: flex;
    gap: 1.5rem;
    padding: 1rem;
    background: rgba(71, 85, 105, 0.08);
    border-radius: 8px;
    margin: 1rem 0;
    border: 1px solid rgba(71, 85, 105, 0.15);
}

.reach-stat-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.3rem;
    flex: 1;
}

.reach-icon {
    font-size: 1.3rem;
}

.reach-value {
    font-weight: 700;
    font-size: 1.1rem;
    color: var(--text-primary);
}

.reach-label {
    font-size: 0.7rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Friends on XERA: Social Proof Widget */
.friends-on-xera-widget {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    padding: 0.8rem 1rem;
    background: rgba(34, 197, 94, 0.08);
    border-radius: 8px;
    margin: 0.8rem 0;
    border: 1px solid rgba(34, 197, 94, 0.15);
}

.friends-label {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-primary);
    white-space: nowrap;
}

.friends-avatars {
    display: flex;
    align-items: center;
    gap: -8px;
}

.friend-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: 2px solid var(--bg-color);
    cursor: pointer;
    transition:
        transform 0.2s,
        box-shadow 0.2s;
    margin-left: -8px;
}

.friend-avatar:first-child {
    margin-left: 0;
}

.friend-avatar:hover {
    transform: scale(1.15);
    box-shadow: 0 4px 12px rgba(34, 197, 94, 0.3);
}

.friends-more {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: rgba(71, 85, 105, 0.3);
    font-size: 0.75rem;
    font-weight: 700;
    margin-left: 4px;
    color: var(--text-primary);
}

/* Toast Notification: Friend Joined */
.friend-joined-toast {
    position: fixed;
    bottom: 2rem;
    right: 1.5rem;
    background: linear-gradient(
        135deg,
        rgba(34, 197, 94, 0.95) 0%,
        rgba(22, 101, 52, 0.95) 100%
    );
    border: 1px solid rgba(34, 197, 94, 0.4);
    border-radius: 8px;
    padding: 1rem 1.2rem;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
    animation: slideInUp 0.3s ease-out;
    z-index: 5000;
}

.friend-joined-content {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    color: white;
}

.toast-icon {
    font-size: 1.2rem;
}

.toast-text {
    flex: 1;
}

.toast-text strong {
    display: block;
    font-weight: 700;
    font-size: 0.9rem;
}

.toast-action {
    padding: 0.4rem 0.8rem;
    background: rgba(255, 255, 255, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 4px;
    color: white;
    cursor: pointer;
    font-size: 0.8rem;
    font-weight: 600;
    white-space: nowrap;
    transition: all 0.2s;
}

.toast-action:hover {
    background: rgba(255, 255, 255, 0.3);
}

@keyframes slideInUp {
    from {
        transform: translateY(100px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* Contributor Badges - Glamour Trophy Style */
.contributor-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.45rem 0.85rem;
    border-radius: 22px;
    font-size: 0.75rem;
    font-weight: 800;
    letter-spacing: 0.4px;
    white-space: nowrap;
    position: relative;
    backdrop-filter: blur(10px);
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    transform: translateY(0);
    cursor: default;
}

.contributor-badge:hover {
    transform: translateY(-2px);
}

.badge-trophy-icon {
    display: inline-block;
    font-size: 0.9rem;
}

/* Emerging Badge - Blue Star (Flip 180°) */
.badge-creator-emerging {
    background: linear-gradient(
        135deg,
        rgba(59, 130, 246, 0.3) 0%,
        rgba(96, 165, 250, 0.2) 50%,
        rgba(59, 130, 246, 0.15) 100%
    );
    border: 1.5px solid rgba(96, 165, 250, 0.4);
    color: #60a5fa;
    box-shadow:
        0 0 10px rgba(59, 130, 246, 0.25),
        0 0 20px rgba(59, 130, 246, 0.1) inset,
        0 3px 12px rgba(0, 0, 0, 0.15);
    animation: emergingGlow 2.4s ease-in-out infinite;
}

.badge-creator-emerging .badge-trophy-icon {
    animation: starFlip 3s ease-in-out infinite;
}

.badge-creator-emerging .badge-text {
    text-shadow: 0 0 3px rgba(96, 165, 250, 0.3);
}

/* Bronze Badge - Bronze Medal */
.badge-creator-bronze {
    background: linear-gradient(
        135deg,
        rgba(184, 134, 11, 0.3) 0%,
        rgba(205, 127, 50, 0.2) 50%,
        rgba(184, 134, 11, 0.15) 100%
    );
    border: 1.5px solid rgba(205, 127, 50, 0.45);
    color: #cd7f32;
    box-shadow:
        0 0 10px rgba(205, 127, 50, 0.3),
        0 0 20px rgba(205, 127, 50, 0.12) inset,
        0 3px 12px rgba(0, 0, 0, 0.15);
    animation: bronzeGlow 2.3s ease-in-out infinite;
}

.badge-creator-bronze .badge-text {
    text-shadow: 0 0 3px rgba(205, 127, 50, 0.3);
}

/* Established Badge - Silver Trophy (Bounce original) */
.badge-creator-established {
    background: linear-gradient(
        135deg,
        rgba(192, 192, 192, 0.3) 0%,
        rgba(211, 211, 211, 0.2) 50%,
        rgba(192, 192, 192, 0.15) 100%
    );
    border: 1.5px solid rgba(211, 211, 211, 0.5);
    color: #e5e7eb;
    box-shadow:
        0 0 12px rgba(211, 211, 211, 0.3),
        0 0 25px rgba(211, 211, 211, 0.12) inset,
        0 3px 12px rgba(0, 0, 0, 0.15);
    animation: establishedGlow 2.2s ease-in-out infinite;
}

.badge-creator-established .badge-trophy-icon {
    animation: trophyBounce 0.6s ease-in-out infinite;
}

.badge-creator-established .badge-text {
    text-shadow: 0 0 3px rgba(211, 211, 211, 0.3);
}

/* Elite Badge - Gold Trophy (Nouvelle animation) */
.badge-creator-elite {
    background: linear-gradient(
        135deg,
        rgba(245, 158, 11, 0.32) 0%,
        rgba(251, 191, 36, 0.22) 50%,
        rgba(245, 158, 11, 0.18) 100%
    );
    border: 2px solid rgba(251, 191, 36, 0.5);
    color: #fbbf24;
    box-shadow:
        0 0 15px rgba(245, 158, 11, 0.3),
        0 0 30px rgba(245, 158, 11, 0.15) inset,
        0 3px 12px rgba(0, 0, 0, 0.15);
    animation: eliteGlow 2s ease-in-out infinite;
}

.badge-creator-elite .badge-trophy-icon {
    animation: trophyRotate 2.8s ease-in-out infinite;
}

.badge-creator-elite .badge-text {
    text-shadow: 0 0 3px rgba(251, 191, 36, 0.3);
}

/* Legend Badge - Glowing Star */
.badge-creator-legend {
    background: linear-gradient(
        135deg,
        rgba(168, 85, 247, 0.32) 0%,
        rgba(196, 130, 255, 0.22) 50%,
        rgba(168, 85, 247, 0.18) 100%
    );
    border: 2px solid rgba(196, 130, 255, 0.5);
    color: #c482ff;
    box-shadow:
        0 0 18px rgba(168, 85, 247, 0.35),
        0 0 35px rgba(168, 85, 247, 0.15) inset,
        0 3px 12px rgba(0, 0, 0, 0.15);
    animation: legendGlow 2.1s ease-in-out infinite;
}

.badge-creator-legend .badge-trophy-icon {
    animation: starShimmer 1.8s ease-in-out infinite;
}

.badge-creator-legend .badge-text {
    text-shadow: 0 0 3px rgba(196, 130, 255, 0.3);
}

/* Supreme Badge - Crown */
.badge-creator-supreme {
    background: linear-gradient(
        135deg,
        rgba(236, 72, 153, 0.32) 0%,
        rgba(244, 114, 182, 0.22) 50%,
        rgba(236, 72, 153, 0.18) 100%
    );
    border: 2px solid rgba(244, 114, 182, 0.5);
    color: #f472b6;
    box-shadow:
        0 0 20px rgba(236, 72, 153, 0.35),
        0 0 40px rgba(236, 72, 153, 0.15) inset,
        0 3px 12px rgba(0, 0, 0, 0.15);
    animation: supremeGlow 2.2s ease-in-out infinite;
}

.badge-creator-supreme .badge-trophy-icon {
    animation: crownSpin 3s ease-in-out infinite;
}

.badge-creator-supreme .badge-text {
    text-shadow: 0 0 3px rgba(244, 114, 182, 0.3);
}

/* Immortal Badge - Diamond */
.badge-creator-immortal {
    background: linear-gradient(
        135deg,
        rgba(34, 211, 238, 0.32) 0%,
        rgba(129, 230, 247, 0.22) 50%,
        rgba(34, 211, 238, 0.18) 100%
    );
    border: 2px solid rgba(129, 230, 247, 0.6);
    color: #81e6f7;
    box-shadow:
        0 0 25px rgba(34, 211, 238, 0.4),
        0 0 50px rgba(34, 211, 238, 0.18) inset,
        0 3px 12px rgba(0, 0, 0, 0.15);
    animation: immortalGlow 1.8s ease-in-out infinite;
}

.badge-creator-immortal .badge-trophy-icon {
    animation: diamondSparkle 1.2s ease-in-out infinite;
}

.badge-creator-immortal .badge-text {
    text-shadow: 0 0 3px rgba(129, 230, 247, 0.3);
}

/* Animations */

/* Star flip 180° */
@keyframes starFlip {
    0% {
        transform: rotateY(0deg);
    }
    50% {
        transform: rotateY(180deg);
    }
    100% {
        transform: rotateY(360deg);
    }
}

/* Trophy bounce (original) */
@keyframes trophyBounce {
    0%,
    100% {
        transform: translateY(0) rotate(0deg);
    }
    25% {
        transform: translateY(-2px) rotate(-1.5deg);
    }
    75% {
        transform: translateY(-2px) rotate(1.5deg);
    }
}

/* Trophy rotate (elite) */
@keyframes trophyRotate {
    0% {
        transform: rotateZ(0deg);
    }
    50% {
        transform: rotateZ(8deg);
    }
    100% {
        transform: rotateZ(0deg);
    }
}

/* Star shimmer (legend) */
@keyframes starShimmer {
    0%,
    100% {
        transform: scale(1) rotate(0deg);
    }
    50% {
        transform: scale(1.15) rotate(10deg);
    }
}

/* Crown spin (supreme) */
@keyframes crownSpin {
    0% {
        transform: rotate(0deg);
    }
    50% {
        transform: rotate(3deg);
    }
    100% {
        transform: rotate(0deg);
    }
}

/* Diamond sparkle (immortal) */
@keyframes diamondSparkle {
    0%,
    100% {
        transform: scale(1) rotate(0deg);
        filter: brightness(1);
    }
    25% {
        transform: scale(1.15) rotate(-15deg);
        filter: brightness(1.3);
    }
    50% {
        transform: scale(1) rotate(0deg);
        filter: brightness(1);
    }
    75% {
        transform: scale(1.15) rotate(15deg);
        filter: brightness(1.3);
    }
}

/* Glow animations */

@keyframes emergingGlow {
    0%,
    100% {
        box-shadow:
            0 0 10px rgba(59, 130, 246, 0.25),
            0 0 20px rgba(59, 130, 246, 0.1) inset,
            0 3px 12px rgba(0, 0, 0, 0.15);
    }
    50% {
        box-shadow:
            0 0 15px rgba(59, 130, 246, 0.35),
            0 0 28px rgba(59, 130, 246, 0.14) inset,
            0 3px 12px rgba(0, 0, 0, 0.15);
    }
}

@keyframes bronzeGlow {
    0%,
    100% {
        box-shadow:
            0 0 10px rgba(205, 127, 50, 0.3),
            0 0 20px rgba(205, 127, 50, 0.12) inset,
            0 3px 12px rgba(0, 0, 0, 0.15);
    }
    50% {
        box-shadow:
            0 0 15px rgba(205, 127, 50, 0.4),
            0 0 28px rgba(205, 127, 50, 0.15) inset,
            0 3px 12px rgba(0, 0, 0, 0.15);
    }
}

@keyframes establishedGlow {
    0%,
    100% {
        box-shadow:
            0 0 12px rgba(211, 211, 211, 0.3),
            0 0 25px rgba(211, 211, 211, 0.12) inset,
            0 3px 12px rgba(0, 0, 0, 0.15);
    }
    50% {
        box-shadow:
            0 0 18px rgba(211, 211, 211, 0.4),
            0 0 35px rgba(211, 211, 211, 0.15) inset,
            0 3px 12px rgba(0, 0, 0, 0.15);
    }
}

@keyframes eliteGlow {
    0%,
    100% {
        box-shadow:
            0 0 15px rgba(245, 158, 11, 0.3),
            0 0 30px rgba(245, 158, 11, 0.15) inset,
            0 3px 12px rgba(0, 0, 0, 0.15);
    }
    50% {
        box-shadow:
            0 0 22px rgba(245, 158, 11, 0.4),
            0 0 40px rgba(245, 158, 11, 0.18) inset,
            0 3px 12px rgba(0, 0, 0, 0.15);
    }
}

@keyframes legendGlow {
    0%,
    100% {
        box-shadow:
            0 0 18px rgba(168, 85, 247, 0.35),
            0 0 35px rgba(168, 85, 247, 0.15) inset,
            0 3px 12px rgba(0, 0, 0, 0.15);
    }
    50% {
        box-shadow:
            0 0 26px rgba(168, 85, 247, 0.45),
            0 0 45px rgba(168, 85, 247, 0.2) inset,
            0 3px 12px rgba(0, 0, 0, 0.15);
    }
}

@keyframes supremeGlow {
    0%,
    100% {
        box-shadow:
            0 0 20px rgba(236, 72, 153, 0.35),
            0 0 40px rgba(236, 72, 153, 0.15) inset,
            0 3px 12px rgba(0, 0, 0, 0.15);
    }
    50% {
        box-shadow:
            0 0 28px rgba(236, 72, 153, 0.45),
            0 0 50px rgba(236, 72, 153, 0.2) inset,
            0 3px 12px rgba(0, 0, 0, 0.15);
    }
}

@keyframes immortalGlow {
    0%,
    100% {
        box-shadow:
            0 0 25px rgba(34, 211, 238, 0.4),
            0 0 50px rgba(34, 211, 238, 0.18) inset,
            0 3px 12px rgba(0, 0, 0, 0.15);
    }
    50% {
        box-shadow:
            0 0 35px rgba(34, 211, 238, 0.5),
            0 0 60px rgba(34, 211, 238, 0.25) inset,
            0 3px 12px rgba(0, 0, 0, 0.15);
    }
}

/* Share Button */
.btn-share-elegant {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.55rem 1.1rem;
    background: linear-gradient(
        135deg,
        rgba(99, 102, 241, 0.08) 0%,
        rgba(139, 92, 246, 0.05) 100%
    );
    border: 1.5px solid rgba(99, 102, 241, 0.2);
    border-radius: 8px;
    color: var(--text-primary);
    cursor: pointer;
    font-size: 0.87rem;
    font-weight: 650;
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    position: relative;
    overflow: hidden;
}

.btn-share-elegant::before {
    content: "";
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        90deg,
        transparent 0%,
        rgba(255, 255, 255, 0.1) 50%,
        transparent 100%
    );
    transition: left 0.5s ease;
}

.btn-share-elegant:hover::before {
    left: 100%;
}

.btn-share-elegant:hover {
    background: linear-gradient(
        135deg,
        rgba(99, 102, 241, 0.15) 0%,
        rgba(139, 92, 246, 0.1) 100%
    );
    border-color: rgba(99, 102, 241, 0.35);
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(99, 102, 241, 0.15);
}

.btn-share-elegant:active {
    transform: translateY(0);
    box-shadow: 0 2px 8px rgba(99, 102, 241, 0.1);
}

.btn-share-elegant svg {
    width: 18px;
    height: 18px;
    transition: transform 0.3s ease;
}

.btn-share-elegant:hover svg {
    transform: rotate(15deg) scale(1.05);
}

.share-counter {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 20px;
    height: 20px;
    padding: 0 0.35rem;
    background: linear-gradient(
        135deg,
        rgba(34, 197, 94, 0.3) 0%,
        rgba(74, 222, 128, 0.2) 100%
    );
    border: 1px solid rgba(34, 197, 94, 0.4);
    border-radius: 10px;
    font-size: 0.7rem;
    font-weight: 700;
    color: #4ade80;
    box-shadow: 0 2px 6px rgba(34, 197, 94, 0.15);
    animation: shareCounterPulse 0.6s ease-out;
}

@keyframes shareCounterPulse {
    0% {
        transform: scale(1.3) rotateZ(-8deg);
        opacity: 0.8;
    }
    50% {
        transform: scale(1.05) rotateZ(2deg);
    }
    100% {
        transform: scale(1) rotateZ(0deg);
        opacity: 1;
    }
}

@media (max-width: 480px) {
    .reach-stats-widget {
        gap: 1rem;
        padding: 0.8rem;
    }

    .reach-value {
        font-size: 1rem;
    }

    .reach-label {
        font-size: 0.65rem;
    }

    .friend-joined-toast {
        bottom: 1rem;
        right: 1rem;
        left: 1rem;
        width: auto;
    }

    .friends-on-xera-widget {
        flex-direction: column;
        align-items: flex-start;
    }

    .friends-label {
        width: 100%;
    }
}

/* Viral Growth Section in Profile */
.viral-growth-section {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    padding: 1rem;
    margin: 1rem 0;
}

.btn-share-profile {
    width: 100%;
    justify-content: center;
}

.btn-share-post-immersive {
    font-size: 0.8rem;
    padding: 0.4rem 0.8rem;
}
