/* ============================================
    GIF - Legacy Board Design System
   ============================================ */

:root {
    --glass-bg: rgba(88, 45, 38, 0.94);
    --glass-border: rgba(255, 212, 90, 0.42);
    --glass-shadow: rgba(0, 0, 0, 0.24);
    --glass-blur: 18px;
     --glass-radius: 18px;
    --accent: #b52d2c;
    --accent-hover: #8f201f;
    --legacy-gold: #ffd45a;
    --legacy-ink: #06182d;
    --legacy-maroon: #7f2624;
    --legacy-coral: #e85d5a;
    --text-primary: #ffffff;
    --text-secondary: rgba(255, 255, 255, 0.7);
    --error: #FF453A;
    --success: #30D158;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Segoe UI', Roboto, sans-serif;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background:
        linear-gradient(135deg, rgba(255, 255, 255, 0.14), rgba(255, 247, 231, 0.10)),
        url('../../images/Image_background.png') center center / cover no-repeat;
    color: var(--text-primary);
    overflow: hidden;
}

body::selection {
    background: rgba(145, 205, 255, 0.42);
}

/* Fond lumineux */
body::before,
body::after {
    content: '';
    position: fixed;
    pointer-events: none;
    z-index: 0;
}

body::before {
    inset: 0;
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.10), rgba(255, 255, 255, 0.02) 42%, rgba(255, 247, 229, 0.08) 100%),
        radial-gradient(circle at 58% 18%, rgba(189, 231, 255, 0.18), transparent 28%),
        radial-gradient(circle at 10% 44%, rgba(171, 222, 255, 0.10), transparent 22%);
    opacity: 0.82;
}

body:has(.glass-card) {
    justify-content: flex-end;
    align-items: center;
    min-height: 100vh;
    height: 100vh;
    padding: clamp(12px, 2.2vh, 24px) clamp(72px, 10vw, 160px) clamp(12px, 2.2vh, 24px) 32px;
    overflow: auto;
    background:
        linear-gradient(135deg, rgba(255, 255, 255, 0.12), rgba(255, 246, 227, 0.12)),
        url('../../images/Image_background.png') center center / cover no-repeat;
}

body:has(.glass-card)::before {
    animation: authSkyDrift 18s ease-in-out infinite alternate;
}

body:has(.glass-card)::after {
    animation: authGlowLift 12s ease-in-out infinite alternate;
}

body::after {
    inset: auto 0 0 0;
    height: 24vh;
    background:
        linear-gradient(180deg, transparent 0%, rgba(203, 230, 249, 0.14) 48%, rgba(156, 204, 245, 0.34) 100%),
        radial-gradient(120% 85% at 50% 100%, rgba(255, 255, 255, 0.20) 0%, rgba(255, 255, 255, 0.04) 48%, transparent 70%),
        linear-gradient(180deg, transparent 0%, rgba(112, 170, 225, 0.10) 100%);
}

/* ============================================
   Composant Glass Card
   ============================================ */
.glass-card {
    background: linear-gradient(180deg, rgba(255, 252, 244, 0.97), rgba(247, 232, 209, 0.96));
    border: 3px solid rgba(179, 44, 41, 0.42);
    border-radius: 22px;
    padding: 42px;
    width: 100%;
    max-width: 560px;
    position: relative;
    overflow: hidden;
    color: #071426;
    box-shadow: 0 14px 0 rgba(116, 57, 28, 0.32), 0 28px 60px rgba(83, 41, 23, 0.28);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.auth-card {
    max-height: calc(100vh - 32px);
    overflow-y: auto;
    overscroll-behavior: contain;
    animation: authCardRise 0.8s cubic-bezier(0.22, 1, 0.36, 1);
}

.login-card {
    max-width: 470px;
    padding: 34px 38px;
}

.register-card {
    max-width: 430px;
    padding: 24px 30px;
}

.register-card h1 {
    font-size: 30px;
}

.register-card .subtitle {
    margin-bottom: 22px;
}

.register-card .form-group {
    margin-bottom: 9px;
}

.register-card .form-group input {
    padding: 9px 12px;
}

.form-group select,
.glass-card .form-group select {
    width: 100%;
    padding: 12px 14px;
    background: rgba(255, 255, 255, 0.9);
    border: 1px solid rgba(184, 201, 220, 0.9);
    border-radius: 12px;
    color: #15304d;
    font: inherit;
    outline: none;
    transition: border-color 0.25s ease, box-shadow 0.25s ease;
}

.form-group select:focus,
.glass-card .form-group select:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(181, 45, 44, 0.14);
}

.form-group-file input[type="file"],
.glass-card .form-group-file input[type="file"] {
    width: 100%;
    padding: 10px 12px;
    border: 1px dashed rgba(181, 45, 44, 0.38);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.86);
    color: #15304d;
}

.form-help {
    display: block;
    margin-top: 6px;
    color: rgba(21, 48, 77, 0.68);
    font-size: 11px;
    font-weight: 700;
}

.glass-card::after {
    content: '';
    position: absolute;
    inset: auto 24px 0;
    height: 6px;
    border-radius: 999px 999px 0 0;
    background: linear-gradient(90deg, transparent, rgba(255, 212, 90, 0.75), transparent);
    opacity: 0.9;
}

.glass-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 16px 0 rgba(116, 57, 28, 0.32), 0 34px 70px rgba(83, 41, 23, 0.32);
}

/* Reflet lumineux en haut de la carte */
.glass-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 9px;
    background: repeating-linear-gradient(90deg, #c4282c 0 52px, #ffd45a 52px 104px, #e88b4a 104px 156px);
}

/* ============================================
   Typographie
   ============================================ */
.glass-card h1 {
    font-size: 34px;
    font-weight: 700;
    text-align: center;
    margin-bottom: 8px;
    letter-spacing: -0.5px;
}

.legacy-brand {
    text-align: center;
    font-family: Georgia, 'Times New Roman', serif;
    font-size: clamp(44px, 7vw, 70px);
    line-height: 0.88;
    color: #071426;
    text-shadow: 2px 2px 0 rgba(255, 212, 90, 0.62);
    letter-spacing: 0;
    margin: -4px 0 8px;
}

.invincible-brand {
    font-family: 'Segoe UI', Roboto, Arial, sans-serif;
    font-size: clamp(42px, 6vw, 62px);
    font-weight: 900;
    line-height: 1;
    letter-spacing: 0;
    color: #08172d;
    text-shadow: 3px 3px 0 rgba(255, 212, 90, 0.7), 6px 6px 0 rgba(31, 140, 255, 0.16);
}

.legacy-brand span {
    display: inline-block;
    font-size: 0.48em;
    color: var(--legacy-gold);
    transform: translateY(-0.18em);
}

.legacy-tagline {
    margin: 0 0 28px;
    text-align: center;
    color: #9a4c1e;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.7px;
    text-transform: uppercase;
}

.glass-card .subtitle {
    text-align: center;
    color: rgba(7, 20, 38, 0.68);
    font-size: 14px;
    margin-bottom: 32px;
}

/* ============================================
   Formulaire
   ============================================ */
.form-group {
    margin-bottom: 20px;
    position: relative;
}

.form-group label {
    display: block;
    font-size: 13px;
    font-weight: 500;
    color: var(--text-secondary);
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.form-group input {
    width: 100%;
    padding: 14px 16px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 12px;
    color: var(--text-primary);
    font-size: 15px;
    outline: none;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.form-group input::placeholder {
    color: rgba(255, 255, 255, 0.35);
}

.form-group input:focus {
    border-color: var(--accent);
    background: rgba(255, 255, 255, 0.12);
    box-shadow: 0 0 0 3px rgba(181, 45, 44, 0.18);
}

.glass-card .form-group label {
    color: rgba(7, 20, 38, 0.74);
    font-weight: 800;
}

.glass-card .form-group input {
    background: rgba(255, 255, 255, 0.88);
    border: 2px solid rgba(7, 20, 38, 0.22);
    color: #071426;
    box-shadow: inset 0 2px 0 rgba(7, 20, 38, 0.05);
}

.glass-card .form-group input::placeholder {
    color: rgba(7, 20, 38, 0.42);
}

.glass-card .form-group input:focus {
    background: #ffffff;
    border-color: #b52d2c;
    box-shadow: 0 0 0 4px rgba(181, 45, 44, 0.16), inset 0 2px 0 rgba(7, 20, 38, 0.04);
}

/* ============================================
   Boutons
   ============================================ */
.btn {
    width: 100%;
    padding: 14px;
    border: none;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.btn-primary {
    background: linear-gradient(135deg, #c4282c, #8f201f);
    color: #fff;
    box-shadow: 0 4px 16px rgba(181, 45, 44, 0.3);
}

.btn-primary:hover {
    background: linear-gradient(135deg, #8f201f, #6f1717);
    transform: translateY(-1px);
    box-shadow: 0 6px 24px rgba(181, 45, 44, 0.36);
}

.btn-primary:active {
    transform: translateY(0);
}

/* ============================================
   Messages d'erreur / succès
   ============================================ */
.alert {
    padding: 12px 16px;
    border-radius: 12px;
    font-size: 14px;
    margin-bottom: 20px;
    backdrop-filter: blur(10px);
}

.alert-error {
    background: rgba(255, 69, 58, 0.15);
    border: 1px solid rgba(255, 69, 58, 0.3);
    color: var(--error);
}

.alert-success {
    background: rgba(48, 209, 88, 0.15);
    border: 1px solid rgba(48, 209, 88, 0.3);
    color: var(--success);
}

/* ============================================
   Liens
   ============================================ */
.form-footer {
    text-align: center;
    margin-top: 24px;
    font-size: 14px;
    color: var(--text-secondary);
}

.form-footer a {
    color: var(--accent);
    text-decoration: none;
    font-weight: 500;
    transition: opacity 0.2s;
}

.form-footer a:hover {
    opacity: 0.8;
    text-decoration: underline;
}

.glass-card .form-footer {
    color: rgba(7, 20, 38, 0.68);
}

.glass-card .form-footer a {
    color: #8f201f;
    font-weight: 800;
}

.login-help-action {
    display: flex;
    justify-content: center;
    margin-top: 14px;
}

.login-help-action .btn-help {
    padding: 9px 22px;
    font-size: 13px;
}

/* ============================================
   Page d'accueil
   ============================================ */
.home-page {
    width: 100%;
    max-width: 1440px;
    min-height: 100vh;
    padding: clamp(10px, 1.4vh, 16px) 20px clamp(12px, 1.6vh, 20px);
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
}

.home-navbar {
    display: grid;
    grid-template-columns: minmax(260px, 1fr) minmax(260px, auto);
    align-items: center;
    gap: 16px;
    flex: 0 0 auto;
    margin-bottom: clamp(14px, 1.8vh, 20px);
    min-height: 58px;
    padding: 14px 18px;
    background: linear-gradient(135deg, rgba(235, 249, 255, 0.98), rgba(204, 229, 247, 0.92));
    border: 1px solid rgba(143, 196, 227, 0.34);
    border-radius: 28px;
    box-shadow: 0 16px 42px rgba(24, 68, 104, 0.12);
    backdrop-filter: blur(20px) saturate(140%);
    -webkit-backdrop-filter: blur(20px) saturate(140%);
    position: relative;
    overflow: visible;
}

.home-navbar::before {
    content: '';
    position: absolute;
    inset: 1px;
    border-radius: inherit;
    pointer-events: none;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.45), rgba(173, 216, 255, 0.22), transparent 70%);
}

.navbar-identity {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
    justify-self: start;
}

.navbar-profile-row {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
}

.navbar-avatar {
    width: 54px;
    height: 54px;
    border-radius: 50%;
    overflow: hidden;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    background: linear-gradient(135deg, #fff4c9, #f6c0a1 55%, #a7ddff 100%);
    border: 2px solid rgba(255, 255, 255, 0.78);
    box-shadow: 0 10px 22px rgba(40, 95, 137, 0.18), 0 0 0 4px rgba(255, 255, 255, 0.3);
    color: #7d2b22;
    font-size: 18px;
    font-weight: 900;
    letter-spacing: 0.04em;
}

.navbar-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.navbar-avatar-image {
    background: #ffffff;
}

.current-rank {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 7px 12px;
    margin: 0;
    min-width: 150px;
    background: rgba(219, 236, 247, 0.88);
    border: 1px solid rgba(119, 176, 208, 0.28);
    border-radius: 999px;
    box-shadow: 0 8px 18px rgba(128, 168, 196, 0.18);
    justify-self: center;
}

.header-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
    flex-wrap: wrap;
    justify-self: end;
}

.home-navbar .btn-nav,
.home-navbar .btn-logout,
.home-navbar .navbar-search-toggle,
.home-navbar .btn-copy-site {
    min-height: 32px;
    padding: 7px 12px;
    font-size: 12px;
}

.home-navbar .navbar-search-toggle span {
    display: inline-block;
    margin-left: 4px;
}

.navbar-brand {
    font-family: Georgia, 'Times New Roman', serif;
    font-size: 22px;
    font-weight: 800;
    color: #104a7a;
    white-space: nowrap;
}

.navbar-welcome {
    color: rgba(32, 65, 95, 0.88);
    font-size: 13px;
    font-weight: 700;
}

.navbar-script {
    color: rgba(53, 101, 139, 0.84);
    font-family: Georgia, 'Times New Roman', serif;
    font-size: 18px;
    font-style: italic;
    font-weight: 700;
    letter-spacing: 0.3px;
    line-height: 1.05;
    transform: none;
}

/* ============================================
   Nouvelle ère - accueil chaleureux
   ============================================ */
.home-page {
    position: relative;
    z-index: 1;
    width: min(1120px, calc(100% - 28px));
    margin: 20px auto;
    padding: 18px;
    color: #4c211e;
}

.home-page::before,
.home-page::after {
    position: fixed;
    z-index: -1;
    pointer-events: none;
    color: rgba(226, 91, 88, 0.22);
    font-family: Georgia, serif;
    white-space: pre;
}

.home-page::before {
    content: '♥     ♡          ♥\A          ♡       ♥          ✦';
    top: 8%;
    right: 5%;
    font-size: clamp(26px, 4vw, 54px);
    line-height: 2.5;
    transform: rotate(12deg);
}

.home-page::after {
    content: '✿       ♥          ❀\A     ♡          ✿';
    bottom: 4%;
    left: 3%;
    font-size: clamp(24px, 3vw, 42px);
    line-height: 2.4;
    color: rgba(242, 153, 77, 0.25);
    transform: rotate(-10deg);
}

.home-navbar,
.home-status-panel,
.levels-section {
    background: rgba(241, 249, 255, 0.94);
    border: 2px solid rgba(148, 191, 221, 0.32);
    box-shadow: 0 16px 34px rgba(42, 93, 130, 0.12);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
}

.home-navbar {
    border-radius: 26px;
}

.home-status-panel {
    background: linear-gradient(135deg, #f5f9ff 0%, #dfeffb 42%, #eef7ff 100%);
    border-radius: 30px;
    display: grid;
    grid-template-columns: minmax(260px, 1.1fr) minmax(280px, 1fr);
    gap: 18px;
    align-items: stretch;
    padding: clamp(20px, 2.4vh, 28px);
    position: relative;
    overflow: hidden;
}

.home-status-panel::before,
.home-status-panel::after {
    content: '';
    position: absolute;
    pointer-events: none;
}

.home-status-panel::before {
    inset: 0;
    background:
        radial-gradient(circle at 18% 28%, rgba(255, 215, 102, 0.28), transparent 20%),
        radial-gradient(circle at 82% 24%, rgba(113, 197, 255, 0.22), transparent 22%),
        linear-gradient(120deg, rgba(255, 255, 255, 0.24), transparent 42%, rgba(255, 255, 255, 0.18) 58%, transparent 72%);
    opacity: 0.95;
    animation: heroGlowSweep 12s ease-in-out infinite;
}

.home-status-panel::after {
    top: 18px;
    right: 18px;
    width: 118px;
    height: 118px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.75) 0%, rgba(255, 214, 100, 0.22) 42%, transparent 72%);
    filter: blur(0.4px);
    opacity: 0.85;
    animation: heroOrbFloat 8s ease-in-out infinite;
}

.status-copy {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
    gap: 10px;
    position: relative;
    z-index: 1;
}

.status-copy::after {
    content: '';
    width: 120px;
    height: 3px;
    border-radius: 999px;
    background: linear-gradient(90deg, rgba(181, 45, 44, 0.92), rgba(255, 212, 90, 0.94), rgba(112, 188, 255, 0.9));
    box-shadow: 0 0 18px rgba(255, 212, 90, 0.24);
    animation: heroLinePulse 4.2s ease-in-out infinite;
}

.timer-payment-row {
    display: grid;
    gap: 18px;
}

.home-footer {
    margin-top: 28px;
    padding: 32px 30px 28px;
    background: linear-gradient(135deg, rgba(235, 246, 255, 0.98), rgba(214, 235, 251, 0.96));
    border: 1px solid rgba(148, 194, 228, 0.30);
    border-radius: 34px;
    box-shadow: 0 24px 64px rgba(47, 92, 132, 0.14);
}

.footer-panel {
    display: grid;
    grid-template-columns: minmax(260px, 1fr) minmax(280px, 1.6fr);
    gap: 18px;
    align-items: center;
}

.footer-eyebrow {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 8px 14px;
    border-radius: 999px;
    background: rgba(255, 212, 90, 0.24);
    color: #9c3a28;
    font-size: 12px;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 0.15em;
}

.footer-panel h2 {
    margin: 18px 0 10px;
    font-size: clamp(24px, 2.6vw, 34px);
    color: #6d2c24;
    line-height: 1.1;
}

.footer-panel p {
    max-width: 540px;
    color: rgba(69, 31, 24, 0.82);
    font-size: 15px;
    line-height: 1.7;
}

.footer-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 18px;
    justify-items: center;
}

.footer-card {
    min-height: 220px;
    overflow: hidden;
    border-radius: 26px;
    border: 1px solid rgba(255, 255, 255, 0.65);
    background: rgba(255, 255, 255, 0.72);
    box-shadow: 0 14px 32px rgba(0, 0, 0, 0.12);
    transform: translateZ(0);
    transition: transform 0.35s ease, box-shadow 0.35s ease;
}

.footer-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 22px 42px rgba(0, 0, 0, 0.18);
}

@media (max-width: 900px) {
    .home-status-panel {
        grid-template-columns: 1fr;
        padding: 20px 18px;
    }

    .footer-panel {
        grid-template-columns: 1fr;
    }

    .footer-gallery {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 640px) {
    .home-navbar {
        padding: 16px 14px;
    }

    .navbar-identity {
        align-items: flex-start;
    }

    .current-rank {
        justify-content: flex-start;
        width: 100%;
    }

    .header-actions {
        justify-content: center;
    }

    .footer-gallery {
        grid-template-columns: 1fr;
    }
}

.footer-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.levels-section::after {
    content: '♥  ✿  ♡  ❀  ♥';
    position: absolute;
    right: 22px;
    bottom: 12px;
    color: rgba(213, 86, 72, 0.18);
    font-size: 25px;
    letter-spacing: 12px;
    pointer-events: none;
}

.new-user-timer,
.home-payment-panel {
    background: #f4fbff;
    border: 2px solid rgba(149, 204, 239, 0.28);
    box-shadow: 0 10px 22px rgba(65, 121, 159, 0.10);
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
}

.people-search {
    margin: 14px 0 20px;
    padding: 16px 18px;
    border: 2px solid rgba(142, 198, 233, 0.28);
    border-radius: 18px;
    background: linear-gradient(135deg, #eff9ff, #dcf1ff);
}

.people-search label {
    display: block;
    margin-bottom: 8px;
    color: #136a99;
    font-size: 12px;
    font-weight: 900;
    letter-spacing: .08em;
    text-transform: uppercase;
}

.people-search-row {
    display: flex;
    align-items: center;
    gap: 10px;
}

.people-search-row input {
    min-height: 44px;
    flex: 1;
    padding: 10px 14px;
    border: 2px solid rgba(142, 59, 50, 0.2);
    border-radius: 12px;
    background: #fffdf8;
    color: #4c211e;
    font: inherit;
    outline: none;
}

.people-search-row input:focus {
    border-color: #e06d58;
    box-shadow: 0 0 0 4px rgba(224, 109, 88, 0.14);
}

.legend-migration {
    display: grid;
    grid-template-columns: minmax(220px, 1fr) minmax(220px, 1fr) auto;
    align-items: end;
    gap: 10px;
    max-width: 920px;
    margin: 0 auto 16px;
    padding: 14px 16px;
    border: 2px solid rgba(226, 152, 48, 0.3);
    border-radius: 16px;
    background: linear-gradient(135deg, #fff9dc, #ffe8ca);
}

.legend-migration label {
    grid-column: 1 / -1;
    color: #80531a;
    font-size: 12px;
    font-weight: 900;
    letter-spacing: .06em;
    text-transform: uppercase;
}

.legend-migration select {
    min-height: 42px;
    padding: 9px 12px;
    border: 2px solid rgba(128, 83, 26, 0.2);
    border-radius: 10px;
    background: #fffdf5;
    color: #51371b;
    font: inherit;
    font-weight: 700;
}

.legend-migration-button {
    min-height: 42px;
    padding: 9px 16px;
    border: 0;
    border-radius: 10px;
    background: linear-gradient(135deg, #e9a52d, #d47335);
    color: #fff;
    cursor: pointer;
    font-weight: 900;
}

.legend-migration-button:hover {
    filter: brightness(1.06);
    transform: translateY(-1px);
}

@media (max-width: 680px) {
    .people-search-row {
        align-items: stretch;
        flex-direction: column;
    }

    .people-search-row .btn-nav {
        text-align: center;
    }

    .legend-migration {
        grid-template-columns: 1fr;
    }
}

.home-navbar::before {
    content: '';
    position: absolute;
    inset: 1px;
    border-radius: inherit;
    pointer-events: none;
    background: linear-gradient(90deg, rgba(255, 255, 255, 0.34), transparent 44%, rgba(255, 212, 90, 0.12));
}

.navbar-identity,
.current-rank,
.header-actions,
.copy-feedback {
    position: relative;
    z-index: 1;
}

.navbar-identity {
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 0;
    flex: 1 1 240px;
}

.current-rank {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    flex: 0 1 240px;
    padding: 12px 18px;
    margin: 0;
    min-width: 180px;
    background: rgba(255, 255, 255, 0.62);
    border: 1px solid rgba(234, 122, 54, 0.16);
    border-radius: 999px;
    box-shadow: 0 10px 20px rgba(255, 223, 194, 0.28);
}

.header-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
    flex: 1 1 320px;
    flex-wrap: wrap;
}

.navbar-brand {
    font-family: Georgia, 'Times New Roman', serif;
    font-size: 23px;
    font-weight: 800;
    color: #5f1f1d;
    white-space: nowrap;
}

.navbar-welcome {
    color: rgba(7, 20, 38, 0.72);
    font-size: 14px;
    font-weight: 700;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.navbar-script {
    color: rgba(127, 38, 36, 0.44);
    font-family: Georgia, 'Times New Roman', serif;
    font-size: clamp(20px, 1.9vw, 28px);
    font-style: italic;
    font-weight: 900;
    letter-spacing: 0.4px;
    line-height: 1;
    white-space: nowrap;
    transform: translateY(2px) skewX(-8deg);
}

.current-rank {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin: 0;
    font-size: 13px;
    color: rgba(7, 20, 38, 0.58);
    white-space: nowrap;
}

.rank-label {
    font-weight: 700;
}

.rank-badge {
    display: inline-block;
    padding: 6px 14px;
    background: rgba(255, 255, 255, 0.54);
    border: 1px solid var(--rank-color);
    border-radius: 999px;
    color: var(--rank-color);
    font-weight: 800;
    font-size: 13px;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.7);
}

.home-header {
    text-align: center;
    margin-bottom: 22px;
    padding: 24px;
    border-radius: 28px;
    background: linear-gradient(135deg, rgba(255, 252, 244, 0.52), rgba(116, 53, 39, 0.22));
    border: 1px solid rgba(255, 255, 255, 0.42);
    box-shadow: 0 22px 60px rgba(83, 41, 23, 0.16), inset 0 1px 0 rgba(255, 255, 255, 0.62);
    backdrop-filter: blur(22px) saturate(150%);
    -webkit-backdrop-filter: blur(22px) saturate(150%);
}

.home-header h1 {
    color: #351b19;
    font-size: 30px;
    font-weight: 800;
    margin-bottom: 8px;
}

.home-header .current-rank {
    display: block;
    margin-bottom: 14px;
    color: rgba(7, 20, 38, 0.68);
    font-size: 14px;
    font-weight: 700;
    white-space: normal;
}

.home-header .header-actions {
    justify-content: center;
}

.level-overview {
    margin-bottom: 18px;
    padding: 18px 22px;
    text-align: left;
}

.level-overview-main {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    margin-bottom: 14px;
}

.level-overview h1 {
    margin-bottom: 4px;
    font-size: clamp(26px, 3vw, 42px);
    line-height: 1.05;
}

.level-overview .current-rank {
    margin-bottom: 0;
    text-align: left;
}

.level-overview .header-actions {
    flex: 0 0 auto;
    justify-content: flex-end;
}

.level-overview-groups {
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 10px;
}

.level-overview .group-list-item {
    min-height: 46px;
    padding: 9px 14px;
}

.group-picker {
    display: grid;
    grid-template-columns: minmax(180px, 0.75fr) minmax(260px, 1fr);
    gap: 8px 12px;
    align-items: end;
}

.group-picker label {
    color: rgba(7, 20, 38, 0.64);
    font-size: 11px;
    font-weight: 900;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

.group-search-input,
.group-select {
    width: 100%;
    min-height: 46px;
    padding: 10px 14px;
    border: 1px solid rgba(127, 38, 36, 0.18);
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.46);
    color: #351b19;
    font: inherit;
    font-weight: 800;
    outline: none;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.56);
}

.group-search-input:focus,
.group-select:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 4px rgba(181, 45, 44, 0.12), inset 0 1px 0 rgba(255, 255, 255, 0.62);
}

.level-overview-empty {
    margin: 8px 0 0;
    text-align: left;
}

.home-status-panel {
    display: grid;
    grid-template-columns: minmax(240px, 0.9fr) minmax(360px, 1.4fr);
    align-items: center;
    gap: 24px;
    margin-bottom: 22px;
    padding: 22px;
    border-radius: 28px;
    background: linear-gradient(135deg, rgba(255, 252, 244, 0.54), rgba(116, 53, 39, 0.2));
    border: 1px solid rgba(255, 255, 255, 0.42);
    box-shadow: 0 22px 60px rgba(83, 41, 23, 0.16), inset 0 1px 0 rgba(255, 255, 255, 0.62);
    backdrop-filter: blur(24px) saturate(155%);
    -webkit-backdrop-filter: blur(24px) saturate(155%);
}

.status-copy {
    color: #321918;
}

.status-eyebrow {
    display: inline-block;
    margin-bottom: 8px;
    color: #a0312e;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.9px;
    text-transform: uppercase;
}

.status-copy h1 {
    max-width: 360px;
    font-size: 34px;
    line-height: 1.05;
    font-weight: 800;
    text-wrap: balance;
    text-shadow: 0 1px 0 rgba(255, 255, 255, 0.78);
}

.new-user-timer {
    margin: 18px auto 6px;
    max-width: 380px;
    padding: 14px 16px;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.28);
    border: 1px solid rgba(255, 255, 255, 0.44);
    box-shadow: 0 12px 28px rgba(83, 41, 23, 0.14), inset 0 1px 0 rgba(255, 255, 255, 0.44);
    text-align: center;
    backdrop-filter: blur(14px) saturate(140%);
    -webkit-backdrop-filter: blur(14px) saturate(140%);
    position: relative;
    z-index: 1;
    animation: softCardFloat 5.8s ease-in-out infinite;
}

.timer-label {
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.9px;
    color: #7f2624;
}

.timer-value {
    margin-top: 4px;
    font-size: 28px;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
    letter-spacing: 1px;
    color: #5f1f1d;
    text-shadow: 0 1px 0 rgba(255, 255, 255, 0.72);
    animation: timerGlow 3.2s ease-in-out infinite;
}

.timer-sub {
    margin-top: 2px;
    font-size: 12px;
    color: rgba(7, 20, 38, 0.62);
}

.new-user-timer.timer-ended {
    background: rgba(255, 69, 58, 0.2);
    border-color: rgba(255, 69, 58, 0.45);
}

.timer-payment-row {
    display: flex;
    align-items: flex-start;
    justify-content: center;
    gap: 16px;
    margin: 0;
    flex-wrap: wrap;
}

.timer-payment-row .new-user-timer {
    margin: 0;
    flex: 1 1 300px;
}

.home-payment-panel {
    flex: 1 1 300px;
    max-width: 380px;
    padding: 14px 16px;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.24);
    border: 1px solid rgba(255, 255, 255, 0.42);
    box-shadow: 0 12px 28px rgba(83, 41, 23, 0.14), inset 0 1px 0 rgba(255, 255, 255, 0.44);
    backdrop-filter: blur(14px) saturate(140%);
    -webkit-backdrop-filter: blur(14px) saturate(140%);
    position: relative;
    z-index: 1;
    animation: softCardFloat 6.6s ease-in-out infinite 0.5s;
}

.home-payment-title {
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.9px;
    color: #7f2624;
    margin-bottom: 10px;
}

.home-payment-methods {
    margin-bottom: 10px;
}

.home-payment-methods .payment-chip {
    background: rgba(255, 255, 255, 0.42);
    border-color: rgba(127, 38, 36, 0.18);
    color: rgba(7, 20, 38, 0.72);
    animation: chipBlink 6s ease-in-out infinite;
}

.home-payment-methods .payment-chip:nth-child(2) {
    animation-delay: 0.7s;
}

.home-payment-methods .payment-chip:nth-child(3) {
    animation-delay: 1.4s;
}

.home-payment-methods .payment-chip:nth-child(4) {
    animation-delay: 2.1s;
}

.home-payment-methods .payment-chip:nth-child(5) {
    animation-delay: 2.8s;
}

.home-payment-note,
.home-payment-success,
.home-payment-error,
.home-payment-pending {
    margin: 8px 0 0;
    font-size: 12px;
    font-weight: 700;
}

.home-payment-success {
    color: var(--success);
}

.home-payment-error {
    color: var(--error);
}

.home-payment-pending {
    color: #a76000;
}

.home-pay-details {
    margin-top: 8px;
}

.home-pay-details summary {
    list-style: none;
    cursor: pointer;
}

.home-pay-details summary::-webkit-details-marker {
    display: none;
}

.home-pay-summary,
.home-pay-link,
.home-pay-submit,
.home-stripe-button {
    width: 100%;
    text-align: center;
    cursor: pointer;
}

.home-pay-form {
    margin-top: 10px;
    text-align: left;
}

.home-pay-form .form-group {
    margin-bottom: 10px;
}

.home-stripe-form {
    margin-top: 10px;
}

.payment-page {
    max-width: 1180px;
}

.payment-header {
    margin-bottom: 24px;
}

.payment-section h2 {
    margin-bottom: 18px;
}

.payment-choice-grid {
    display: grid;
    grid-template-columns: repeat(5, minmax(110px, 1fr));
    gap: 10px;
    margin-bottom: 22px;
}

.payment-choice {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 54px;
    padding: 12px;
    text-decoration: none;
    color: rgba(255, 255, 255, 0.9);
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: 14px;
    transition: all 0.2s ease;
}

.payment-choice:hover,
.payment-choice-active {
    transform: translateY(-1px);
    color: #fff;
    border-color: rgba(181, 45, 44, 0.65);
    background: rgba(181, 45, 44, 0.2);
}

.payment-choice-visa.payment-choice-active {
    border-color: rgba(43, 114, 255, 0.8);
    background: linear-gradient(135deg, rgba(20, 55, 150, 0.55), rgba(34, 112, 255, 0.22));
}

.payment-choice-mastercard.payment-choice-active {
    border-color: rgba(255, 157, 46, 0.8);
    background: linear-gradient(135deg, rgba(225, 44, 55, 0.35), rgba(255, 157, 46, 0.22));
}

.payment-choice-crypto.payment-choice-active {
    border-color: rgba(247, 147, 26, 0.8);
    background: linear-gradient(135deg, rgba(247, 147, 26, 0.34), rgba(255, 214, 10, 0.16));
}

.payment-choice-paypal.payment-choice-active {
    border-color: rgba(0, 112, 186, 0.8);
    background: linear-gradient(135deg, rgba(0, 48, 135, 0.48), rgba(0, 156, 222, 0.2));
}

.payment-form-card {
    max-width: 640px;
    margin: 0 auto;
    padding: 22px;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.07);
    border: 1px solid rgba(255, 255, 255, 0.16);
}

.payment-form-card h3 {
    text-align: center;
    font-size: 22px;
    margin-bottom: 10px;
}

.card-payment-brand {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin: 0 auto 14px;
    padding: 12px 16px;
    width: fit-content;
    min-width: 190px;
    border-radius: 14px;
    border: 1px solid rgba(255, 255, 255, 0.18);
    background: rgba(255, 255, 255, 0.08);
    color: #fff;
    font-weight: 700;
}

.card-brand-mark {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 54px;
    height: 32px;
    padding: 0 10px;
    border-radius: 8px;
    font-size: 14px;
    letter-spacing: 0.6px;
}

.card-payment-brand-visa {
    background: linear-gradient(135deg, rgba(20, 55, 150, 0.78), rgba(34, 112, 255, 0.28));
    border-color: rgba(43, 114, 255, 0.6);
}

.card-payment-brand-visa .card-brand-mark {
    background: #ffffff;
    color: #1a47a8;
}

.card-payment-brand-mastercard {
    background: linear-gradient(135deg, rgba(225, 44, 55, 0.54), rgba(255, 157, 46, 0.34));
    border-color: rgba(255, 157, 46, 0.65);
}

.card-payment-brand-mastercard .card-brand-mark {
    background: linear-gradient(90deg, #eb001b 0 50%, #f79e1b 50% 100%);
    color: #fff;
}

.card-payment-brand-stripe {
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.6), rgba(139, 92, 246, 0.28));
    border-color: rgba(139, 92, 246, 0.65);
}

.card-payment-brand-stripe .card-brand-mark {
    background: #635bff;
    color: #fff;
}

.card-payment-brand-crypto {
    background: linear-gradient(135deg, rgba(247, 147, 26, 0.52), rgba(255, 214, 10, 0.18));
    border-color: rgba(247, 147, 26, 0.65);
}

.card-payment-brand-crypto .card-brand-mark {
    background: #f7931a;
    color: #101018;
}

.card-payment-brand-paypal {
    background: linear-gradient(135deg, rgba(0, 48, 135, 0.68), rgba(0, 156, 222, 0.26));
    border-color: rgba(0, 156, 222, 0.65);
}

.card-payment-brand-paypal .card-brand-mark {
    background: #ffffff;
    color: #003087;
}

.btn-crypto {
    border-color: rgba(247, 147, 26, 0.65);
    color: #ffd66b;
    background: rgba(247, 147, 26, 0.16);
}

.btn-crypto:hover {
    background: rgba(247, 147, 26, 0.24);
}

.btn-paypal {
    border-color: rgba(0, 156, 222, 0.65);
    color: #9bdcff;
    background: rgba(0, 112, 186, 0.2);
}

.btn-paypal:hover {
    background: rgba(0, 112, 186, 0.3);
}

.payment-mode-form {
    margin-top: 14px;
}

.payment-submit {
    width: 100%;
    text-align: center;
    cursor: pointer;
}

.payment-submit:disabled,
.btn-nav:disabled {
    opacity: 0.45;
    cursor: not-allowed;
    transform: none;
}

.payment-warning {
    color: #ffd60a;
}

/* ============================================
   Section Niveaux
   ============================================ */
.levels-section {
    background: linear-gradient(145deg, rgba(255, 252, 244, 0.6), rgba(255, 248, 236, 0.34) 52%, rgba(255, 255, 255, 0.22));
    border: 1px solid rgba(255, 255, 255, 0.42);
    border-radius: 30px;
    flex: 1 1 auto;
    min-height: 0;
    padding: clamp(16px, 2.2vh, 26px) 30px clamp(18px, 2.4vh, 28px);
    box-shadow: 0 24px 70px rgba(83, 41, 23, 0.2), inset 0 1px 0 rgba(255, 255, 255, 0.58);
    backdrop-filter: blur(22px) saturate(150%);
    -webkit-backdrop-filter: blur(22px) saturate(150%);
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.levels-section::before {
    content: '';
    position: absolute;
    inset: -20% 18% auto;
    height: 180px;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.28), transparent 68%);
    pointer-events: none;
}

.levels-section h2 {
    text-align: center;
    font-size: 22px;
    font-weight: 700;
    margin-bottom: clamp(12px, 1.8vh, 20px);
    color: #351b19;
    text-shadow: 0 1px 0 rgba(255, 255, 255, 0.46);
}

.levels-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(180px, 1fr));
    gap: 16px;
    position: relative;
    z-index: 1;
    flex: 1 1 auto;
    min-height: 0;
    justify-items: stretch;
}

.level-card {
    min-height: 0;
    background:
        radial-gradient(circle at 8% 50%, rgba(7, 19, 38, 0.8) 0 18px, transparent 19px),
        radial-gradient(circle at 92% 50%, rgba(7, 19, 38, 0.8) 0 18px, transparent 19px),
        linear-gradient(135deg, color-mix(in srgb, var(--level-color) 22%, rgba(255, 255, 255, 0.8)), rgba(255, 255, 255, 0.84));
    border: 1px solid color-mix(in srgb, var(--level-color) 58%, rgba(255, 255, 255, 0.42));
    border-radius: 22px;
    padding: clamp(12px, 1.6vh, 18px) 16px;
    text-align: center;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    color: #1e2740;
    box-shadow: 0 14px 32px rgba(0, 0, 0, 0.22), inset 0 1px 0 rgba(255, 255, 255, 0.7);
}

.level-card::before {
    content: '';
    position: absolute;
    inset: 10px 24px;
    border-radius: 18px;
    border: 1px dashed color-mix(in srgb, var(--level-color) 68%, rgba(9, 18, 34, 0.25));
    opacity: 0.5;
    pointer-events: none;
}

.level-card::after {
    content: '';
    position: absolute;
    inset: auto 24px 12px;
    height: 4px;
    border-radius: 999px;
    background: linear-gradient(90deg, transparent, var(--level-color), transparent);
    opacity: 0.65;
}

.level-card:hover {
    transform: translateY(-5px) rotate(-0.4deg);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3), 0 0 28px color-mix(in srgb, var(--level-color) 30%, transparent);
}

.level-card .level-number {
    font-size: 13px;
    color: rgba(30, 39, 64, 0.62);
    margin-bottom: 6px;
    font-weight: 800;
    letter-spacing: 0.8px;
}

.level-card .level-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    margin-bottom: 6px;
    border-radius: 50%;
    background: radial-gradient(circle at 35% 30%, #fff, color-mix(in srgb, var(--level-color) 68%, #ffffff));
    color: #1b2440;
    font-size: 24px;
    filter: drop-shadow(0 8px 14px rgba(0, 0, 0, 0.24));
}

.level-card .level-name {
    font-size: 22px;
    font-weight: 500;
    font-family: Georgia, 'Times New Roman', serif;
    color: var(--level-color);
    text-shadow: 0 1px 0 rgba(255, 255, 255, 0.65);
}

.level-card .level-subtitle {
    margin-top: 2px;
    color: rgba(30, 39, 64, 0.58);
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.8px;
    text-transform: uppercase;
}

.level-card .level-amount {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 74px;
    margin-top: 7px;
    padding: 5px 12px;
    border: 1px solid color-mix(in srgb, var(--level-color) 70%, rgba(9, 18, 34, 0.24));
    border-radius: 999px;
    background: rgba(9, 18, 34, 0.72);
    color: #ffffff;
    font-size: 13px;
    font-weight: 800;
    line-height: 1;
    text-shadow: 0 0 12px color-mix(in srgb, var(--level-color) 70%, transparent);
    box-shadow: 0 0 18px color-mix(in srgb, var(--level-color) 44%, transparent), inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

/* Niveau actuel */
.level-current {
    border-color: var(--level-color);
    box-shadow: 0 0 30px color-mix(in srgb, var(--level-color) 46%, transparent),
                0 18px 38px rgba(0, 0, 0, 0.28),
                inset 0 0 24px rgba(255, 255, 255, 0.24);
    transform: scale(1.02);
}

.level-current .level-indicator {
    font-size: 12px;
    color: #0057d9;
    font-weight: 700;
    margin-top: 10px;
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

@keyframes authSkyDrift {
    0% {
        transform: translate3d(0, 0, 0) scale(1);
        opacity: 0.9;
    }
    100% {
        transform: translate3d(1.5%, -2%, 0) scale(1.06);
        opacity: 1;
    }
}

@keyframes authGlowLift {
    0% {
        transform: translateY(0);
        opacity: 0.78;
    }
    100% {
        transform: translateY(-18px);
        opacity: 0.95;
    }
}

@keyframes authCardRise {
    0% {
        opacity: 0;
        transform: translateY(28px) scale(0.985);
    }
    100% {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@keyframes heroGlowSweep {
    0%, 100% {
        transform: translateX(-2%) translateY(0);
        opacity: 0.88;
    }
    50% {
        transform: translateX(2%) translateY(-1.5%);
        opacity: 1;
    }
}

@keyframes heroOrbFloat {
    0%, 100% {
        transform: translate3d(0, 0, 0) scale(1);
    }
    50% {
        transform: translate3d(-8px, 10px, 0) scale(1.08);
    }
}

@keyframes heroLinePulse {
    0%, 100% {
        transform: scaleX(1);
        opacity: 0.82;
    }
    50% {
        transform: scaleX(1.08);
        opacity: 1;
    }
}

@keyframes softCardFloat {
    0%, 100% {
        transform: translateY(0);
        box-shadow: 0 10px 22px rgba(65, 121, 159, 0.10);
    }
    50% {
        transform: translateY(-4px);
        box-shadow: 0 18px 32px rgba(65, 121, 159, 0.14);
    }
}

@keyframes timerGlow {
    0%, 100% {
        color: #5f1f1d;
        text-shadow: 0 1px 0 rgba(255, 255, 255, 0.72);
    }
    50% {
        color: #8f201f;
        text-shadow: 0 1px 0 rgba(255, 255, 255, 0.88), 0 0 18px rgba(255, 212, 90, 0.22);
    }
}

@keyframes chipBlink {
    0%, 100% {
        transform: translateY(0);
        background: rgba(255, 255, 255, 0.42);
    }
    14% {
        transform: translateY(-1px);
        background: rgba(255, 244, 207, 0.92);
    }
    28% {
        transform: translateY(0);
        background: rgba(255, 255, 255, 0.42);
    }
}

@media (prefers-reduced-motion: reduce) {
    body:has(.glass-card)::before,
    body:has(.glass-card)::after,
    .auth-card,
    .home-status-panel::before,
    .home-status-panel::after,
    .status-copy::after,
    .new-user-timer,
    .timer-value,
    .home-payment-panel,
    .home-payment-methods .payment-chip {
        animation: none !important;
    }
}

/* Niveaux complétés */
.level-completed {
    opacity: 0.8;
}

.level-completed .level-check {
    font-size: 12px;
    color: #128a38;
    margin-top: 8px;
}

/* Niveaux verrouillés */
.level-locked {
    opacity: 0.45;
}

.level-locked .level-lock {
    font-size: 12px;
    color: rgba(30, 39, 64, 0.66);
    margin-top: 8px;
}

/* Level cards as links */
a.level-card {
    text-decoration: none;
    color: inherit;
}

div.level-card {
    cursor: default;
}

/* ============================================
   Pyramide Diamant (4-2-1-2-4)
   ============================================ */
.pyramid-section {
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.9), rgba(245, 243, 235, 0.84));
    backdrop-filter: blur(var(--glass-blur)) saturate(180%);
    -webkit-backdrop-filter: blur(var(--glass-blur)) saturate(180%);
    border: 1px solid rgba(255, 255, 255, 0.62);
    border-radius: 28px;
    padding: 24px 28px;
    margin-bottom: 18px;
    position: relative;
    overflow: hidden;
    box-shadow: 0 18px 46px rgba(0, 0, 0, 0.28);
}

.pyramid-section::before {
    content: '';
    position: absolute;
    left: 50%;
    top: 53%;
    width: min(38vw, 340px);
    aspect-ratio: 1;
    transform: translate(-50%, -50%) rotate(-9deg);
    background:
        radial-gradient(circle at 50% 50%, rgba(255, 255, 255, 0.75) 0 10%, transparent 11%),
        conic-gradient(from 20deg, rgba(232, 93, 90, 0.92), rgba(134, 78, 216, 0.85), rgba(255, 212, 90, 0.82), rgba(232, 93, 90, 0.92));
    clip-path: polygon(50% 0%, 58% 34%, 100% 17%, 67% 48%, 96% 78%, 58% 63%, 50% 100%, 41% 64%, 4% 82%, 33% 50%, 2% 18%, 42% 34%);
    opacity: 0.62;
    filter: blur(0.2px) saturate(1.1);
    pointer-events: none;
}

.pyramid-section h2 {
    text-align: center;
    font-size: 24px;
    margin-bottom: 14px;
    color: #0b1a33;
    position: relative;
    z-index: 1;
}

.pyramid-section .group-info,
.pyramid-section .group-count {
    color: rgba(11, 26, 51, 0.66);
    position: relative;
    z-index: 1;
}

.pyramid-section .payment-chip {
    background: rgba(7, 19, 38, 0.72);
    border-color: rgba(7, 19, 38, 0.18);
}

.pyramid-section .contribution-pay-panel {
    background: rgba(255, 255, 255, 0.72);
    border-color: rgba(7, 19, 38, 0.12);
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.12);
}

.group-count {
    color: var(--text-secondary);
    font-weight: 400;
    font-size: 14px;
}

.pyramid-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 9px;
    min-height: 330px;
    justify-content: center;
    position: relative;
    z-index: 1;
}

.transmission-board {
    display: grid;
    grid-template-columns: minmax(96px, 1fr) minmax(118px, 1fr) minmax(108px, 0.9fr) minmax(112px, 0.9fr) minmax(108px, 0.9fr) minmax(118px, 1fr) minmax(96px, 1fr);
    align-items: center;
    gap: clamp(10px, 1.6vw, 22px);
    min-height: 320px;
    position: relative;
    z-index: 1;
}

.transmission-board::before,
.transmission-board::after {
    content: '';
    position: absolute;
    top: 50%;
    width: 31%;
    height: 2px;
    background: linear-gradient(90deg, transparent, rgba(53, 27, 25, 0.44), transparent);
    pointer-events: none;
}

.transmission-board::before {
    left: 19%;
    transform: translateY(-50%) rotate(35deg);
}

.transmission-board::after {
    right: 19%;
    transform: translateY(-50%) rotate(-35deg);
}

.transmission-column {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 10px;
    min-width: 0;
    position: relative;
    z-index: 1;
}

.transmission-left_donors,
.transmission-right_donors {
    gap: 12px;
}

.transmission-role {
    padding: 4px 10px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.46);
    border: 1px solid rgba(127, 38, 36, 0.12);
    color: rgba(7, 20, 38, 0.58);
    font-size: 10px;
    font-weight: 900;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

.transmission-node {
    display: flex;
    align-items: center;
    justify-content: center;
    width: clamp(82px, 7.2vw, 116px);
    min-height: 54px;
    padding: 10px 12px;
    border-radius: 18px;
    border: 1px solid rgba(255, 255, 255, 0.5);
    background: linear-gradient(145deg, rgba(255, 255, 255, 0.78), rgba(255, 248, 236, 0.52));
    box-shadow: 0 14px 28px rgba(83, 41, 23, 0.16), inset 0 1px 0 rgba(255, 255, 255, 0.72);
    position: relative;
    color: #351b19;
    font-family: inherit;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.transmission-node:hover {
    transform: translateY(-2px);
    box-shadow: 0 18px 34px rgba(83, 41, 23, 0.2), inset 0 1px 0 rgba(255, 255, 255, 0.78);
}

.transmission-guide {
    border-color: rgba(35, 112, 202, 0.34);
    background: linear-gradient(145deg, rgba(152, 199, 247, 0.76), rgba(236, 246, 255, 0.72));
}

.transmission-receiver {
    min-height: 74px;
    border-color: rgba(255, 212, 90, 0.72);
    background: linear-gradient(145deg, rgba(255, 240, 160, 0.82), rgba(255, 255, 255, 0.66));
    box-shadow: 0 0 0 5px rgba(255, 212, 90, 0.12), 0 18px 38px rgba(83, 41, 23, 0.2);
}

.transmission-donor {
    min-height: 48px;
    border-color: rgba(181, 45, 44, 0.36);
    background: linear-gradient(145deg, rgba(255, 204, 202, 0.84), rgba(255, 246, 240, 0.68));
}

.transmission-builder {
    min-height: 60px;
    border-color: rgba(83, 91, 104, 0.24);
    background: linear-gradient(145deg, rgba(218, 222, 228, 0.86), rgba(248, 249, 250, 0.72));
}

.transmission-node .pyramid-name {
    max-width: 100%;
    padding: 0;
    background: transparent;
    color: #351b19;
    font-size: 12px;
    font-weight: 900;
    text-align: center;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.receiver-flag {
    position: absolute;
    top: -12px;
    left: 50%;
    transform: translateX(-50%);
    padding: 4px 9px;
    border-radius: 999px;
    border: 1px solid rgba(255, 212, 90, 0.72);
    background: rgba(255, 252, 232, 0.94);
    color: #7f5a00;
    font-size: 9px;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 0.4px;
    box-shadow: 0 8px 16px rgba(83, 41, 23, 0.16);
}

.transmission-empty {
    opacity: 0.42;
    border-style: dashed;
    cursor: default;
}

.receiver-actions {
    display: flex;
    flex-direction: column;
    gap: 6px;
    width: 100%;
    align-items: center;
}

.receiver-actions[hidden] {
    display: none;
}

.receiver-actions form {
    width: 100%;
}

.receiver-confirm,
.receiver-reject {
    width: 100%;
    min-width: 92px;
    padding: 7px 10px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 900;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.receiver-confirm {
    border: 1px solid rgba(48, 209, 88, 0.38);
    background: rgba(48, 209, 88, 0.16);
    color: #176b31;
}

.receiver-reject {
    border: 1px solid rgba(181, 45, 44, 0.32);
    background: rgba(181, 45, 44, 0.12);
    color: #7f2624;
}

.receiver-confirm:hover,
.receiver-reject:hover {
    transform: translateY(-1px);
    box-shadow: 0 10px 18px rgba(83, 41, 23, 0.14);
}

.receiver-confirm:disabled {
    opacity: 0.42;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.member-modal {
    position: fixed;
    inset: 0;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 24px;
    background: rgba(7, 20, 38, 0.36);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    z-index: 50;
}

.member-modal-open {
    display: flex;
}

.member-modal-card {
    width: min(420px, 100%);
    padding: 24px;
    border-radius: 24px;
    background: linear-gradient(145deg, rgba(255, 252, 244, 0.96), rgba(255, 248, 236, 0.88));
    border: 1px solid rgba(255, 255, 255, 0.62);
    box-shadow: 0 28px 70px rgba(7, 20, 38, 0.28);
    color: #351b19;
    position: relative;
}

.member-modal-close {
    position: absolute;
    top: 12px;
    right: 14px;
    width: 34px;
    height: 34px;
    border: 1px solid rgba(127, 38, 36, 0.16);
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.58);
    color: #7f2624;
    font-size: 24px;
    line-height: 1;
    cursor: pointer;
}

.member-modal-card h2 {
    margin: 0 44px 18px 0;
    font-size: 24px;
}

.member-modal-details {
    display: grid;
    gap: 10px;
}

.member-modal-details div {
    display: grid;
    grid-template-columns: 120px 1fr;
    gap: 12px;
    align-items: baseline;
    padding: 10px 0;
    border-bottom: 1px solid rgba(127, 38, 36, 0.1);
}

.member-modal-details dt {
    color: rgba(7, 20, 38, 0.56);
    font-size: 12px;
    font-weight: 900;
    text-transform: uppercase;
}

.member-modal-details dd {
    margin: 0;
    color: #351b19;
    font-weight: 800;
    overflow-wrap: anywhere;
}

.member-modal-actions {
    flex-direction: row;
    margin-top: 18px;
    padding-top: 16px;
    border-top: 1px solid rgba(127, 38, 36, 0.12);
}

.pyramid-row {
    display: flex;
    justify-content: center;
    gap: 9px;
}

.pyramid-cell {
    width: 84px;
    height: 84px;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    background: radial-gradient(circle at 40% 35%, rgba(255, 255, 255, 0.98), rgba(225, 226, 222, 0.96));
    border: 2px solid rgba(12, 24, 45, 0.16);
    border-radius: 50%;
    transition: all 0.3s ease;
    position: relative;
    box-shadow: inset 0 0 0 8px rgba(12, 24, 45, 0.05), 0 12px 22px rgba(0, 0, 0, 0.18);
}

.pyramid-cell::after {
    content: '';
    position: absolute;
    inset: 15px;
    border-radius: inherit;
    background: rgba(7, 19, 38, 0.82);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.18);
}

.pyramid-cell .pyramid-name {
    position: relative;
    z-index: 1;
    max-width: 72px;
    padding: 5px 8px;
    background: rgba(7, 19, 38, 0.92);
    border-radius: 4px;
    color: #ffffff;
    font-size: 10px;
    font-weight: 800;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Utilisateur actuel mis en valeur */
.pyramid-me {
    border-color: var(--accent);
    box-shadow: 0 0 18px rgba(181, 45, 44, 0.38), 0 12px 22px rgba(0, 0, 0, 0.18);
}

.pyramid-me .pyramid-name {
    color: var(--accent);
    font-weight: 700;
}

.pyramid-next {
    border-color: rgba(255, 215, 0, 0.7);
    box-shadow: 0 0 22px rgba(255, 215, 0, 0.45), 0 12px 22px rgba(0, 0, 0, 0.18);
}

.pyramid-next .pyramid-name {
    color: #8f6b00;
    font-weight: 700;
}

.transmission-node.pyramid-next .pyramid-name {
    color: #6f4e00;
}

.pyramid-paid {
    border-color: rgba(48, 209, 88, 0.75);
    background: linear-gradient(145deg, rgba(186, 246, 202, 0.86), rgba(244, 255, 247, 0.72));
}

.pyramid-paid-badge {
    position: absolute;
    top: 6px;
    right: 8px;
    color: #30d158;
    font-size: 14px;
    text-shadow: 0 0 8px rgba(48, 209, 88, 0.45);
}

.pyramid-overdue {
    border-color: rgba(255, 69, 58, 0.75);
    background: linear-gradient(145deg, rgba(255, 189, 185, 0.88), rgba(255, 245, 240, 0.72));
}

.pyramid-overdue-badge {
    position: absolute;
    top: 6px;
    right: 8px;
    color: #ff453a;
    font-size: 14px;
    text-shadow: 0 0 8px rgba(255, 69, 58, 0.45);
}

.status-dot {
    font-size: 14px;
    line-height: 1;
}

.status-dot-red {
    color: #ff453a;
    text-shadow: 0 0 8px rgba(255, 69, 58, 0.45);
}

/* Emplacement vide */
.pyramid-empty {
    opacity: 0.3;
    border-style: dashed;
}

.pyramid-empty::after {
    background: rgba(7, 19, 38, 0.18);
}

/* Rangée du milieu (le 1er arrivé / le gagnant) */
.pyramid-row-1 .pyramid-cell:not(.pyramid-empty) {
    border-color: rgba(255, 215, 0, 0.4);
    box-shadow: 0 0 24px rgba(255, 215, 0, 0.35), 0 16px 28px rgba(0, 0, 0, 0.22);
}

.pyramid-row-1 .pyramid-cell:not(.pyramid-empty) .pyramid-name {
    color: #ffd700;
    font-weight: 700;
    font-size: 13px;
}

/* ============================================
   Responsive - Home
   ============================================ */
@media (max-width: 600px) {
    body:has(.glass-card) {
        justify-content: center;
        padding: 12px;
        background-position: center, center, 24% center, center;
    }

    .levels-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .home-page {
        padding: 20px 12px;
    }

    .transmission-board {
        grid-template-columns: repeat(7, minmax(78px, 1fr));
        gap: 8px;
        min-height: 280px;
        overflow-x: auto;
        padding-bottom: 6px;
    }

    .transmission-board::before,
    .transmission-board::after {
        display: none;
    }

    .transmission-node {
        width: 78px;
        min-height: 48px;
        padding: 8px 9px;
        border-radius: 14px;
    }

    .transmission-node .pyramid-name {
        font-size: 10px;
    }

    .transmission-role {
        font-size: 9px;
        padding: 3px 7px;
    }

    .pyramid-cell {
        width: 70px;
        height: 70px;
        padding: 0;
    }

    .pyramid-cell::after {
        inset: 13px;
    }

    .pyramid-cell .pyramid-name {
        max-width: 64px;
        padding: 4px 6px;
        font-size: 10px;
    }
}

/* Bouton déconnexion */
.btn-logout {
    display: inline-block;
    padding: 9px 18px;
    width: auto;
    text-decoration: none;
    background: rgba(127, 38, 36, 0.88);
    border: 1px solid rgba(127, 38, 36, 0.34);
    color: #fffaf0;
    border-radius: 999px;
    font-size: 13px;
    font-weight: 800;
    transition: all 0.3s ease;
    box-shadow: 0 8px 18px rgba(127, 38, 36, 0.18);
}

.btn-logout:hover {
    background: rgba(95, 31, 29, 0.94);
    transform: translateY(-1px);
}

/* Override body overflow pour la page home */
body:has(.home-page),
body:has(.admin-page) {
    overflow: auto;
    align-items: flex-start;
}

/* ============================================
   Header Actions
   ============================================ */
.header-actions {
    display: flex;
    gap: 12px;
    justify-content: flex-end;
    margin-top: 0;
    flex-wrap: wrap;
}

body:has(.home-page) {
    background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.18), rgba(255, 248, 232, 0.12)),
        url('../../images/Image_background.png') center center / cover no-repeat;
}

body:has(.admin-page) {
    background:
        linear-gradient(135deg, rgba(11, 30, 50, 0.72), rgba(25, 56, 86, 0.56)),
        url('../../images/Image_background.png') center center / cover no-repeat;
}

body:has(.home-page)::before {
    inset: 0;
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.12), rgba(255, 255, 255, 0.04) 34%, transparent 70%),
        radial-gradient(circle at 18% 22%, rgba(255, 243, 196, 0.18), transparent 20%),
        radial-gradient(circle at 82% 18%, rgba(201, 233, 255, 0.18), transparent 22%);
    opacity: 1;
    animation: none;
}

body:has(.home-page)::after {
    display: none;
}

body:has(.admin-page)::before {
    inset: 0;
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.06), transparent 52%),
        radial-gradient(circle at 72% 22%, rgba(113, 199, 255, 0.18), transparent 18%);
    opacity: 1;
    animation: adminBackgroundShift 20s ease-in-out infinite alternate;
}

body:has(.admin-page)::after {
    inset: auto 0 0 0;
    height: 22vh;
    background: linear-gradient(180deg, transparent 0%, rgba(8, 23, 38, 0.06) 38%, rgba(232, 243, 252, 0.32) 100%);
}

.btn-nav {
    display: inline-block;
    padding: 9px 18px;
    text-decoration: none;
    background: rgba(255, 255, 255, 0.44);
    border: 1px solid rgba(181, 45, 44, 0.24);
    color: #7f2624;
    border-radius: 999px;
    font-size: 13px;
    font-weight: 800;
    transition: all 0.3s ease;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.68);
}

.btn-nav:hover {
    background: rgba(255, 255, 255, 0.62);
    transform: translateY(-1px);
}

.btn-help {
    background: #8f201f;
    color: #fff6ef;
}

.copy-feedback {
    position: absolute;
    right: 24px;
    bottom: -20px;
    padding: 7px 12px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.82);
    color: #7f2624;
    font-size: 12px;
    font-weight: 800;
    opacity: 0;
    transform: translateY(6px);
    transition: opacity 0.2s ease, transform 0.2s ease;
    box-shadow: 0 10px 24px rgba(31, 81, 120, 0.14);
}

.copy-feedback-visible {
    opacity: 1;
    transform: translateY(0);
}

.help-page {
    max-width: 1180px;
    margin-bottom: 28px;
}

.home-page .current-rank {
    margin-left: 0;
    width: auto;
}

.home-page .home-navbar {
    grid-template-columns: minmax(220px, auto) 1fr;
    align-items: center;
    min-height: 58px;
    padding: 14px 22px;
    gap: 18px;
    background: linear-gradient(145deg, rgba(255, 255, 255, 0.82), rgba(244, 249, 255, 0.74));
    border: 1px solid rgba(166, 201, 229, 0.34);
    box-shadow: 0 16px 34px rgba(37, 88, 126, 0.12);
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
}

.home-page .navbar-profile-row {
    gap: 14px;
}

.home-page .navbar-avatar {
    width: 56px;
    height: 56px;
    font-size: 20px;
}

.home-page .home-navbar::before {
    display: none;
}

.home-page .navbar-identity {
    gap: 0;
}

.home-page .home-navbar .btn-nav,
.home-page .home-navbar .btn-logout,
.home-page .home-navbar .navbar-search-toggle,
.home-page .home-navbar .btn-copy-site {
    min-height: 32px;
    padding: 7px 12px;
    font-size: 12px;
}

.home-page .navbar-brand {
    font-size: 23px;
}

.home-page .navbar-welcome {
    display: none;
}

.home-page .navbar-script {
    display: none;
}

.home-page .home-navbar .current-rank {
    display: none;
}

.home-page::before,
.home-page::after {
    display: none;
}

.admin-page {
    overflow: hidden;
}
.admin-page::before,
.admin-page::after {
    content: '';
    position: fixed;
    z-index: -1;
    pointer-events: none;
}
.admin-page::before {
    right: 0;
    bottom: 0;
    width: 100%;
    height: 100%;
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.06), transparent 52%),
        radial-gradient(circle at 72% 22%, rgba(113, 199, 255, 0.18), transparent 18%);
    opacity: 1;
    animation: adminBackgroundShift 20s ease-in-out infinite alternate;
}
.admin-page::after {
    display: none;
}

.status-lead {
    margin-top: 8px;
    max-width: 430px;
    color: rgba(83, 33, 29, 0.78);
    font-size: clamp(18px, 2vw, 28px);
    font-weight: 700;
    line-height: 1.08;
}

.hero-rank {
    margin-top: 10px;
    display: inline-flex;
    align-items: center;
    justify-content: flex-start;
    gap: 8px;
    flex: 0 0 auto;
    width: auto;
    min-width: 0;
    max-width: 100%;
    padding: 6px 10px;
    border-radius: 14px;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.78), rgba(235, 246, 255, 0.68));
    border: 1px solid rgba(158, 197, 225, 0.56);
    box-shadow: 0 8px 18px rgba(36, 92, 128, 0.10);
    backdrop-filter: blur(2px);
    -webkit-backdrop-filter: blur(2px);
    transition: transform 0.22s ease, box-shadow 0.22s ease;
}

.hero-rank:hover {
    transform: translateY(-1px);
    box-shadow: 0 10px 22px rgba(36, 92, 128, 0.14);
}

.hero-rank .rank-label {
    font-size: 12px;
    font-weight: 800;
    color: rgba(7, 20, 38, 0.72);
}

.hero-rank .rank-badge {
    padding: 5px 12px;
    font-size: 12px;
    font-weight: 800;
    background: rgba(255, 255, 255, 0.88);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.92);
}
.admin-header {
    background: linear-gradient(145deg, rgba(245, 251, 255, 0.84), rgba(192, 220, 244, 0.34) 52%, rgba(255, 255, 255, 0.18));
    border-color: rgba(161, 210, 245, 0.28);
    box-shadow: 0 24px 58px rgba(8, 23, 38, 0.22);
}

@keyframes globalBackgroundPulse {
    0% {
        transform: scale(1) translate3d(0, 0, 0);
        opacity: 0.92;
    }
    100% {
        transform: scale(1.04) translate3d(1%, -1%, 0);
        opacity: 1;
    }
}
@keyframes homeFigureFloat {
    0%, 100% {
        transform: translateY(0) rotate(0deg);
    }
    50% {
        transform: translateY(-10px) rotate(-1deg);
    }
}
@keyframes homePatternDrift {
    0% {
        transform: translate3d(0, 0, 0) rotate(0deg);
    }
    100% {
        transform: translate3d(-8px, 10px, 0) rotate(6deg);
    }
}
@keyframes adminBackgroundShift {
    0% {
        transform: translate3d(0, 0, 0) scale(1);
    }
    100% {
        transform: translate3d(-1.5%, 1%, 0) scale(1.03);
    }
}
@keyframes adminFigureHover {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-12px);
    }
}

.resource-avatar {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 48px;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: radial-gradient(circle at 35% 25%, rgba(255, 214, 10, 0.72), rgba(181, 45, 44, 0.62));
    color: #ffffff;
    font-size: 22px;
    font-weight: 800;
    box-shadow: 0 0 18px rgba(255, 196, 0, 0.28);
}

.resource-info h3 {
    margin: 0 0 4px;
    color: #ffffff;
    font-size: 18px;
}

.resource-role {
    margin: 0 0 12px;
    color: #ffd60a;
    font-size: 13px;
    font-weight: 700;
}

.resource-lines {
    display: grid;
    gap: 7px;
    color: var(--text-secondary);
    font-size: 13px;
}

.resource-lines a {
    color: #a8d8ea;
    text-decoration: none;
    overflow-wrap: anywhere;
}

.resource-lines a:hover {
    text-decoration: underline;
}

@media (max-width: 720px) {
    .resource-grid {
        grid-template-columns: 1fr;
    }

    .resource-card {
        min-height: auto;
    }
}

/* ============================================
   Section Groupe (Home)
   ============================================ */
.group-section {
    background: linear-gradient(145deg, rgba(255, 252, 244, 0.62), rgba(255, 248, 236, 0.36) 52%, rgba(255, 255, 255, 0.22));
    border: 1px solid rgba(255, 255, 255, 0.42);
    border-radius: 28px;
    padding: 24px 28px;
    margin-bottom: 20px;
    box-shadow: 0 20px 56px rgba(83, 41, 23, 0.16), inset 0 1px 0 rgba(255, 255, 255, 0.58);
    backdrop-filter: blur(22px) saturate(150%);
    -webkit-backdrop-filter: blur(22px) saturate(150%);
}

.group-section h2 {
    text-align: center;
    font-size: 20px;
    margin-bottom: 12px;
    color: #351b19;
}

.group-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 10px;
}

.group-list-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 8px;
    padding: 10px 12px;
    border: 1px solid rgba(127, 38, 36, 0.18);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.34);
    color: #351b19;
    text-decoration: none;
    transition: all 0.2s ease;
}

.group-list-item:hover {
    transform: translateY(-1px);
    background: rgba(255, 255, 255, 0.54);
}

.group-list-item-active {
    border-color: var(--accent);
    background: rgba(181, 45, 44, 0.12);
}

.group-info {
    text-align: center;
    color: rgba(7, 20, 38, 0.66);
    margin-bottom: 20px;
}

.group-members {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.contribution-pay-panel {
    background: rgba(255, 255, 255, 0.07);
    border: 1px solid rgba(255, 255, 255, 0.14);
}

.contribution-pay-form {
    max-width: 560px;
    margin: 0 auto;
}

.stripe-checkout-form {
    max-width: 560px;
    margin: 10px auto 0;
    text-align: center;
}

.btn-stripe {
    border-color: rgba(99, 102, 241, 0.7);
    color: #d9deff;
    background: rgba(99, 102, 241, 0.2);
}

.btn-stripe:hover {
    background: rgba(99, 102, 241, 0.3);
}

.payment-methods-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: center;
    margin-bottom: 12px;
}

.payment-chip {
    padding: 6px 10px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.18);
    font-size: 12px;
    color: rgba(255, 255, 255, 0.92);
}

.contribution-pay-form select,
.contribution-pay-form input[type="text"] {
    width: 100%;
    padding: 12px 14px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.16);
    color: var(--text-primary);
    border-radius: 10px;
}

.contribution-pay-form select {
    appearance: none;
    background-image: linear-gradient(45deg, transparent 50%, rgba(255, 255, 255, 0.86) 50%),
        linear-gradient(135deg, rgba(255, 255, 255, 0.86) 50%, transparent 50%);
    background-position: calc(100% - 18px) 50%, calc(100% - 12px) 50%;
    background-size: 6px 6px, 6px 6px;
    background-repeat: no-repeat;
    color-scheme: dark;
}

.contribution-pay-form select option {
    background: #4e2a24;
    color: #ffffff;
}

.contribution-pay-form select option:checked,
.contribution-pay-form select option:hover {
    background: #8f201f;
    color: #ffffff;
}

.contribution-pay-form select:focus,
.contribution-pay-form input[type="text"]:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 2px rgba(181, 45, 44, 0.2);
}

.group-member {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 16px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.group-member.member-me {
    background: rgba(181, 45, 44, 0.18);
    border-color: rgba(181, 45, 44, 0.35);
}

.member-rank {
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    font-size: 12px;
    font-weight: 700;
}

.member-name {
    font-weight: 500;
}

/* ============================================
   Admin Page
   ============================================ */
.admin-page {
    width: 100%;
    max-width: 1320px;
    padding: 40px 20px;
    position: relative;
    z-index: 1;
}

.admin-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: linear-gradient(145deg, rgba(255, 252, 244, 0.62), rgba(255, 248, 236, 0.36) 52%, rgba(255, 255, 255, 0.22));
    border: 1px solid rgba(255, 255, 255, 0.42);
    border-radius: 28px;
    padding: 28px 40px;
    margin-bottom: 24px;
}

.admin-title h1 {
    font-size: 24px;
    margin-bottom: 4px;
    color: #351b19;
}

.admin-title p {
    color: rgba(7, 20, 38, 0.66);
    font-size: 14px;
}

.admin-nav {
    display: flex;
    gap: 12px;
}

/* Stats */
.admin-stats {
    background: linear-gradient(145deg, rgba(255, 252, 244, 0.62), rgba(255, 248, 236, 0.36) 52%, rgba(255, 255, 255, 0.22));
    border: 1px solid rgba(255, 255, 255, 0.42);
    border-radius: 28px;
    padding: 28px 40px;
    margin-bottom: 24px;
}

.admin-stats h2 {
    font-size: 18px;
    margin-bottom: 16px;
    color: #351b19;
}

.stats-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.history-filters {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
    gap: 12px;
}

.history-filters select,
.history-filters input[type="date"] {
    width: 100%;
    padding: 10px 12px;
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.15);
    background: rgba(255, 255, 255, 0.08);
    color: var(--text-primary);
}

.stat-card {
    flex: 1;
    min-width: 80px;
    text-align: center;
    padding: 16px 12px;
    background: rgba(255, 255, 255, 0.34);
    border: 1px solid rgba(127, 38, 36, 0.14);
    border-radius: 12px;
    text-decoration: none;
    color: #351b19;
    transition: all 0.3s ease;
}

.stat-card:hover {
    background: rgba(255, 255, 255, 0.54);
    transform: translateY(-2px);
}

.stat-card.stat-active {
    border-color: var(--accent);
    background: rgba(181, 45, 44, 0.22);
}

.stat-count {
    display: block;
    font-size: 24px;
    font-weight: 700;
}

.stat-label {
    display: block;
    font-size: 11px;
    color: rgba(7, 20, 38, 0.62);
    margin-top: 4px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Table utilisateurs */
.admin-users {
    background: linear-gradient(145deg, rgba(255, 252, 244, 0.62), rgba(255, 248, 236, 0.36) 52%, rgba(255, 255, 255, 0.22));
    border: 1px solid rgba(255, 255, 255, 0.42);
    border-radius: 28px;
    padding: 28px 40px;
}

.admin-users h2 {
    font-size: 18px;
    margin-bottom: 16px;
    color: #351b19;
}

.user-count {
    color: rgba(7, 20, 38, 0.62);
    font-weight: 400;
    font-size: 14px;
}

.users-table-wrapper {
    overflow-x: auto;
}

.users-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 15px;
}

.users-table th,
.users-table td {
    padding: 14px 14px;
    text-align: left;
    border-bottom: 1px solid rgba(127, 38, 36, 0.1);
    color: rgba(7, 20, 38, 0.78);
}

.users-table th {
    color: rgba(7, 20, 38, 0.56);
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 600;
}

.users-table tbody tr:hover {
    background: rgba(255, 255, 255, 0.34);
}

.row-excluded {
    opacity: 0.5;
}

.user-name {
    font-weight: 600;
}

.level-tag {
    padding: 4px 10px;
    border-radius: 8px;
    font-size: 12px;
    font-weight: 600;
    background: rgba(255, 255, 255, 0.44);
}

.level-1 { color: #a8d8ea; }
.level-2 { color: #60c0e0; }
.level-3 { color: #cd7f32; }
.level-4 { color: #c0c0c0; }
.level-5 { color: #ffd700; }
.level-6 { color: #ff6b35; }

.no-group {
    color: rgba(7, 20, 38, 0.58);
}

.status-active {
    color: var(--success);
    font-weight: 500;
}

.status-pending {
    color: #ffd60a;
    font-weight: 500;
}

.status-excluded {
    color: var(--error);
    font-weight: 500;
}

.empty-row {
    text-align: center;
    color: var(--text-secondary);
    padding: 32px !important;
}

/* Actions */
.actions-cell {
    display: flex;
    gap: 6px;
}

.btn-action {
    width: 32px;
    height: 32px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.15);
    background: rgba(255, 255, 255, 0.06);
    cursor: pointer;
    font-size: 14px;
    text-decoration: none;
    transition: all 0.2s;
}

.btn-action:hover {
    background: rgba(255, 255, 255, 0.12);
    transform: scale(1.1);
}

.btn-info { color: var(--accent); }
.btn-exclude { color: var(--error); border-color: rgba(255, 69, 58, 0.3); }
.btn-reinstate { color: var(--success); border-color: rgba(48, 209, 88, 0.3); }

.btn-danger {
    background: rgba(255, 69, 58, 0.8);
    color: #fff;
    border: none;
    padding: 12px 24px;
    border-radius: 12px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
}

.btn-danger:hover {
    background: rgba(255, 69, 58, 1);
}

/* ============================================
   User Detail
   ============================================ */
.user-detail-card {
    background: var(--glass-bg);
    backdrop-filter: blur(var(--glass-blur)) saturate(180%);
    -webkit-backdrop-filter: blur(var(--glass-blur)) saturate(180%);
    border: 1px solid var(--glass-border);
    border-radius: var(--glass-radius);
    padding: 32px;
    margin-bottom: 24px;
}

.detail-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
    margin-bottom: 24px;
}

.detail-item {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.detail-label {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-secondary);
}

.detail-value {
    font-size: 15px;
    font-weight: 500;
}

.detail-actions {
    text-align: center;
    padding-top: 16px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

/* Group Members (admin detail) */
.group-members-section {
    background: var(--glass-bg);
    backdrop-filter: blur(var(--glass-blur)) saturate(180%);
    -webkit-backdrop-filter: blur(var(--glass-blur)) saturate(180%);
    border: 1px solid var(--glass-border);
    border-radius: var(--glass-radius);
    padding: 32px;
}

.group-members-section h2 {
    font-size: 18px;
    margin-bottom: 16px;
}

.members-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.member-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 16px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 10px;
}

.member-item.member-current {
    background: rgba(181, 45, 44, 0.18);
    border: 1px solid rgba(181, 45, 44, 0.35);
}

.member-pos {
    font-weight: 700;
    color: var(--text-secondary);
    min-width: 30px;
}

.member-date {
    margin-left: auto;
    font-size: 12px;
    color: var(--text-secondary);
}

/* ============================================
   Responsive Admin
   ============================================ */
@media (max-width: 768px) {
    .admin-header {
        flex-direction: column;
        gap: 16px;
        text-align: center;
    }

    .detail-grid {
        grid-template-columns: 1fr;
    }

    .stats-grid {
        display: grid;
        grid-template-columns: repeat(3, 1fr);
    }
}

/* ============================================
   Responsive
   ============================================ */
@media (max-width: 980px) {
    .home-navbar {
        grid-template-columns: 1fr;
        justify-items: stretch;
        gap: 12px;
    }

    .navbar-identity,
    .current-rank,
    .header-actions {
        justify-content: center;
    }

    .navbar-identity {
        flex-wrap: wrap;
    }

    .navbar-script {
        flex-basis: 100%;
        text-align: center;
        font-size: 24px;
    }

    .home-status-panel {
        grid-template-columns: 1fr;
    }

    .status-copy {
        align-items: center;
        text-align: center;
    }

    .status-copy h1 {
        max-width: none;
        font-size: 30px;
    }

    .levels-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 480px) {
    .home-page {
        padding: 18px 12px 36px;
    }

    .home-navbar,
    .home-status-panel,
    .levels-section {
        border-radius: 22px;
        padding: 16px;
    }

    .navbar-identity {
        flex-direction: column;
        align-items: center;
        gap: 4px;
    }

    .navbar-script {
        font-size: 20px;
    }

    .header-actions {
        gap: 8px;
    }

    .btn-nav,
    .btn-logout {
        padding: 8px 12px;
        font-size: 12px;
    }

    .levels-grid {
        grid-template-columns: 1fr;
    }

    .glass-card {
        margin: 0;
        padding: 24px 20px;
    }

    .auth-card {
        max-height: calc(100vh - 24px);
    }
}

/* ============================================
   Nouvelle ère - surfaces plates et recherche
   ============================================ */
.home-page .home-navbar,
.home-page .home-status-panel,
.home-page .levels-section,
.home-page .pyramid-section {
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
}

.home-page .pyramid-section {
    background: #eff8ff;
    border: 2px solid rgba(153, 199, 232, 0.26);
    box-shadow: 0 16px 34px rgba(67, 104, 142, 0.12);
}

.home-page .pyramid-section::before {
    opacity: 0.14;
}

.home-page .level-card {
    background:
        linear-gradient(135deg, color-mix(in srgb, var(--level-color) 24%, #eef7ff), #f7fbff 72%);
    border: 2px solid color-mix(in srgb, var(--level-color) 58%, #c6e1f4);
    box-shadow: 0 12px 24px rgba(67, 104, 142, 0.12);
}

.home-page .level-card:hover {
    box-shadow: 0 16px 30px rgba(67, 104, 142, 0.16);
}

.home-page .level-card::before {
    border-color: color-mix(in srgb, var(--level-color) 58%, #c6e1f4);
}

.home-page .level-card .level-amount {
    background: color-mix(in srgb, var(--level-color) 64%, #598abf);
    border-color: color-mix(in srgb, var(--level-color) 76%, #598abf);
    box-shadow: none;
}

.home-page .navbar-search-toggle {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    border-color: rgba(96, 153, 204, 0.34);
    background: #ebf5ff;
    color: #174973;
}

.navbar-search-panel {
    position: absolute;
    top: calc(100% + 10px);
    right: 14px;
    z-index: 20;
    width: min(620px, calc(100vw - 42px));
    padding: 16px;
    border: 2px solid rgba(143, 193, 225, 0.30);
    border-radius: 18px;
    background: #eef8ff;
    box-shadow: 0 18px 38px rgba(67, 104, 142, 0.16);
}

.navbar-search-panel[hidden] {
    display: none;
}

.navbar-search-form label {
    display: block;
    margin-bottom: 8px;
    color: #1e5c8f;
    font-size: 12px;
    font-weight: 900;
    letter-spacing: .06em;
    text-transform: uppercase;
}

.navbar-search-row {
    display: flex;
    gap: 8px;
}

.navbar-search-row input {
    min-width: 0;
    min-height: 42px;
    flex: 1;
    padding: 9px 12px;
    border: 2px solid rgba(95, 146, 204, 0.2);
    border-radius: 10px;
    background: #f7fbff;
    color: #154563;
    font: inherit;
    outline: none;
}

.navbar-search-row input:focus {
    border-color: #5f99d0;
    box-shadow: 0 0 0 4px rgba(95, 146, 204, 0.12);
}

.people-results {
    display: grid;
    gap: 7px;
    max-height: 310px;
    margin-top: 12px;
    overflow-y: auto;
}

.people-result {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 10px 12px;
    border: 1px solid rgba(113, 166, 210, 0.18);
    border-radius: 12px;
    background: #f7fbff;
    color: #1d4f78;
    text-decoration: none;
}

.people-result:hover {
    background: #ebf5ff;
    border-color: rgba(95, 146, 204, 0.42);
}

.people-result-main,
.people-result-meta {
    display: grid;
    gap: 3px;
}

.people-result-main small,
.people-result-meta {
    color: rgba(76, 33, 30, 0.64);
    font-size: 11px;
}

.people-result-meta {
    text-align: right;
}

.people-results-empty {
    margin: 8px 0 0;
    color: #8e3b32;
    font-weight: 700;
}

/* Paiement : contraste lisible sur le fond Nouvelle ère */
.payment-page .payment-section,
.payment-page .payment-form-card {
    background: #fff8ed;
    border-color: rgba(142, 59, 50, 0.2);
    color: #4c211e;
}

.payment-page .payment-choice {
    color: #6d3932;
    background: #fffdf8;
    border-color: rgba(142, 59, 50, 0.18);
    font-weight: 800;
}

.payment-page .payment-choice:hover,
.payment-page .payment-choice-active {
    color: #7d241f;
    background: #ffe6dc;
    border-color: #df7866;
}

.payment-page .payment-choice-visa.payment-choice-active {
    color: #173e86;
    background: #e7efff;
}

.payment-page .payment-choice-mastercard.payment-choice-active {
    color: #8c2f25;
    background: #ffe9dc;
}

.payment-page .payment-choice-paypal.payment-choice-active {
    color: #003087;
    background: #e2f3ff;
}

.payment-page .payment-form-card h3,
.payment-page .payment-form-card .group-info,
.payment-page .payment-form-card label,
.payment-page .payment-form-card .bitcoin-description {
    color: #4c211e;
}

.payment-page .payment-form-card .form-group input,
.payment-page .payment-form-card .form-group select {
    background: #fffdf8;
    border: 2px solid rgba(142, 59, 50, 0.2);
    color: #4c211e;
}

.payment-page .payment-form-card .form-group input::placeholder {
    color: rgba(76, 33, 30, 0.52);
}

.payment-page .payment-submit:disabled {
    color: #8f6d63;
    background: #f1dfd5;
    border-color: #dfc2b5;
    opacity: 1;
}

.payment-page .payment-warning {
    color: #8a5a14;
    font-weight: 800;
}

.payment-page .card-payment-brand {
    color: #4c211e;
}

.payment-page .btn-crypto {
    color: #5e3512;
    background: #ffd889;
    border-color: #e9a52d;
    font-weight: 900;
}

.payment-page .btn-crypto:hover {
    color: #4b270d;
    background: #ffc966;
}

.people-search-row .btn-nav,
.navbar-search-row .legend-migration-button {
    white-space: nowrap;
}

.bitcoin-wallet-box {
    display: grid;
    gap: 6px;
    margin: 16px 0;
    padding: 14px 16px;
    border: 2px solid rgba(224, 147, 37, 0.34);
    border-radius: 14px;
    background: linear-gradient(135deg, #fff7d8, #ffe6c4);
    color: #5b351a;
    overflow-wrap: anywhere;
}

.bitcoin-wallet-label {
    color: #96621d;
    font-size: 11px;
    font-weight: 900;
    letter-spacing: .06em;
    text-transform: uppercase;
}

.bitcoin-wallet-box strong {
    font-family: Consolas, 'Courier New', monospace;
    font-size: 13px;
    line-height: 1.5;
}

.bitcoin-qr-card {
    display: grid;
    justify-items: center;
    gap: 10px;
    margin: 18px auto;
    padding: 16px;
    max-width: 330px;
    border: 2px solid rgba(224, 147, 37, 0.28);
    border-radius: 16px;
    background: #fffdf8;
    text-align: center;
}

.bitcoin-qr-card img {
    display: block;
    width: 260px;
    height: 260px;
    max-width: 100%;
    border: 8px solid #ffffff;
    border-radius: 10px;
    box-shadow: 0 8px 18px rgba(91, 53, 26, 0.16);
}

.bitcoin-qr-card p {
    margin: 0;
    color: #6d3932;
    font-size: 13px;
    line-height: 1.45;
}

.bitcoin-copy-button {
    color: #5e3512;
    background: #ffe2a5;
    border-color: #e9b14d;
}

.bitcoin-copy-feedback {
    min-height: 18px;
    color: #287044;
    font-size: 12px;
    font-weight: 800;
}

@media (max-width: 680px) {
    .navbar-search-panel {
        right: 8px;
        left: 8px;
        width: auto;
    }

    .navbar-search-row,
    .people-result {
        align-items: stretch;
        flex-direction: column;
    }

    .people-result-meta {
        text-align: left;
    }
}
