/* --- CONFIGURATION GÉNÉRALE --- */
/* Jetons d’interaction alignés sur UI/UX Pro Max (elevation-consistent, state-clarity, 
   focus-states, touch-target-size, duration 150–300ms, transform/opacity pour le mouvement) */

:root {
    --color-primary: #2c3e50;
    --motion-duration: 220ms;
    --motion-duration-instant: 105ms;
    --motion-ease-out: cubic-bezier(0.33, 1, 0.68, 1);
    --motion-snap: cubic-bezier(0.34, 1.4, 0.64, 1);
    --focus-ring-width: 3px;
    --focus-ring-offset: 2px;
    --focus-ring-color: rgba(44, 62, 80, 0.45);
    --float-perspective: 1400px;
    /* Mobile-first : léger survol — resserre l’espace tout en gardant du 3D */
    --float-y: -7px;
    --float-z: 18px;
    --float-y-hover: -11px;
    --float-z-hover: 26px;
    --float-ground-pad: 14px;
    --tilt-x: 0deg;
    --tilt-y: 0deg;
}

@media (min-width: 520px) {
    :root {
        --float-y: -11px;
        --float-z: 26px;
        --float-y-hover: -17px;
        --float-z-hover: 38px;
        --float-ground-pad: 22px;
    }
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Poppins', sans-serif;
}

body {
    background:
        radial-gradient(120% 90% at 85% 10%, rgba(255, 255, 255, 0.52) 0%, transparent 48%),
        radial-gradient(90% 70% at 15% 90%, rgba(195, 207, 226, 0.65) 0%, transparent 55%),
        linear-gradient(148deg, #eef2f7 0%, #dae4f0 42%, #c9d6e8 100%);
    color: #2c3e50;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    min-height: 100dvh;
    padding: max(14px, env(safe-area-inset-top)) max(14px, env(safe-area-inset-right))
        max(14px, env(safe-area-inset-bottom)) max(14px, env(safe-area-inset-left));
    -webkit-font-smoothing: antialiased;
}

/* --- OVERLAY D'ENTRÉE --- */
.overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(15px);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    transition: opacity 0.5s ease;
}

.overlay-content {
    text-align: center;
    background: linear-gradient(175deg, #ffffff 0%, #f6f8fc 100%);
    padding: clamp(28px, 6vw, 40px);
    border-radius: clamp(22px, 5vw, 30px);
    max-width: 380px;
    width: 92%;
    border: 1px solid rgba(255, 255, 255, 0.85);
    box-shadow:
        0 2px 0 rgba(255, 255, 255, 0.75) inset,
        0 28px 56px rgba(44, 62, 80, 0.12),
        0 10px 22px rgba(44, 62, 80, 0.06);
    perspective: var(--float-perspective);
    perspective-origin: 50% 38%;
}

.emoji-header { font-size: 40px; margin-bottom: 10px; }

.btn-accept {
    background: linear-gradient(180deg, #34495e 0%, #2c3e50 55%, #243342 100%);
    color: white;
    border: none;
    padding: 18px;
    font-size: 15px;
    font-weight: 600;
    border-radius: 50px;
    cursor: pointer;
    width: 100%;
    margin-top: 0;
    min-height: 48px;
    touch-action: manipulation;
    transition:
        transform var(--motion-duration) var(--motion-ease-out),
        box-shadow var(--motion-duration) ease,
        filter var(--motion-duration) ease,
        opacity var(--motion-duration) ease;
}

.btn-accept:focus {
    outline: none;
}

.btn-accept:focus-visible {
    outline: var(--focus-ring-width) solid var(--focus-ring-color);
    outline-offset: var(--focus-ring-offset);
}

.btn-accept.btn-3d {
    isolation: isolate;
    border: 1px solid rgba(255, 255, 255, 0.14);
    box-shadow:
        inset 0 2px 4px rgba(255, 255, 255, 0.28),
        inset 0 -4px 10px rgba(0, 0, 0, 0.35),
        0 4px 0 #243342,
        0 8px 0 #1a2633,
        0 18px 36px rgba(44, 62, 80, 0.34),
        0 42px 76px rgba(195, 207, 226, 0.52);
    filter: drop-shadow(0 28px 32px rgba(44, 62, 80, 0.22))
        drop-shadow(0 10px 16px rgba(195, 207, 226, 0.35));
}

.link-float-root--cta {
    width: 100%;
    margin-top: 25px;
}

@media (hover: hover) and (pointer: fine) {
    .link-float-root--cta:hover .btn-accept.btn-3d {
        box-shadow:
            inset 0 3px 5px rgba(255, 255, 255, 0.32),
            inset 0 -4px 11px rgba(0, 0, 0, 0.32),
            0 5px 0 #253545,
            0 11px 0 #1b2835,
            0 26px 48px rgba(44, 62, 80, 0.38),
            0 54px 96px rgba(195, 207, 226, 0.68);
        filter: drop-shadow(0 42px 48px rgba(44, 62, 80, 0.26))
            drop-shadow(0 14px 22px rgba(195, 207, 226, 0.42));
    }
}

.btn-accept.float-surface:active {
    box-shadow:
        inset 0 2px 6px rgba(0, 0, 0, 0.45),
        inset 0 1px 2px rgba(255, 255, 255, 0.12),
        0 2px 0 #1f2f3f,
        0 12px 28px rgba(44, 62, 80, 0.36);
    filter: drop-shadow(0 14px 20px rgba(44, 62, 80, 0.25));
}

/* --- CONTENEUR PRINCIPAL --- */
.container {
    flex-direction: column;
    align-items: center;
    width: 100%;
    max-width: 420px;
    display: flex;
    opacity: 0;
    transition: opacity 0.8s ease;
    overflow: visible;
    perspective: var(--float-perspective);
    perspective-origin: 50% 38%;
}

/* --- En-tête profil : pseudo et bio centrés sur l’axe de la photo --- */
.profile-header {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
    text-align: center;
}

/* --- LE CADRE CARRÉ (Taille 190px) --- */
.photo-frame {
    width: 190px; 
    height: 190px;
    margin: 0 auto 25px auto;
    background: white;
    padding: 5px;
    border-radius: 30px; 
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.12);
    display: flex;
    justify-content: center;
    align-items: center;
}

.profile-pic {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 20px; 
}

.username {
    font-size: clamp(24px, 6.5vw, 30px);
    font-weight: 600;
    color: #141820;
    margin-bottom: 6px;
    letter-spacing: -0.02em;
    text-align: center;
    width: 100%;
    max-width: 280px;
}

.bio {
    color: #6d7c82;
    font-size: clamp(13px, 3.6vw, 15px);
    margin-bottom: 18px;
    letter-spacing: 0.02em;
    text-align: center;
    width: 100%;
    max-width: 320px;
}

/* --- NOUVEAU : SECTION "À PROPOS" (POUR LE BOT TIKTOK) --- */
.about-section {
    background: linear-gradient(165deg, rgba(255, 255, 255, 0.82) 0%, rgba(248, 250, 253, 0.72) 100%);
    padding: clamp(16px, 4vw, 22px);
    border-radius: clamp(16px, 4vw, 22px);
    margin-bottom: clamp(18px, 5vw, 26px);
    text-align: center;
    border: 1px solid rgba(255, 255, 255, 0.65);
    box-shadow:
        0 1px 0 rgba(255, 255, 255, 0.9) inset,
        0 14px 36px rgba(44, 62, 80, 0.07);
}

.about-section h3 {
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: #2c3e50;
    margin-bottom: 8px;
    font-weight: 600;
}

.about-section p {
    font-size: 13px;
    line-height: 1.6;
    color: #555;
}

/* --- Lévitation 3D : compact sur mobile, espace réduit entre les boutons --- */
.links-container {
    display: flex;
    flex-direction: column;
    gap: 0;
    width: 100%;
    overflow: visible;
    padding-bottom: 4px;
}

.link-float-root {
    position: relative;
    z-index: 1;
    transform-style: preserve-3d;
    padding-bottom: var(--float-ground-pad);
    margin-bottom: 0;
}

.link-float-root:hover {
    z-index: 4;
}

.link-float-root:last-child {
    margin-bottom: 0;
}

/* Halo doux + ombre de contact au sol (reste « collée » au site, la carte bouge au-dessus) */
.link-float-root::before {
    content: '';
    position: absolute;
    left: 4%;
    right: 4%;
    bottom: 6px;
    height: clamp(28px, 9vw, 44px);
    border-radius: 50%;
    background: radial-gradient(
        ellipse 70% 58% at 50% 50%,
        rgba(195, 207, 226, 0.72) 0%,
        rgba(195, 207, 226, 0.25) 58%,
        transparent 74%
    );
    filter: blur(24px);
    transform: scaleY(0.44);
    opacity: 0.88;
    z-index: 0;
    pointer-events: none;
    transition: opacity 0.45s cubic-bezier(0.23, 1, 0.32, 1),
        transform 0.45s cubic-bezier(0.23, 1, 0.32, 1);
}

.link-float-root::after {
    content: '';
    position: absolute;
    left: 9%;
    right: 9%;
    bottom: 2px;
    height: clamp(26px, 8vw, 38px);
    border-radius: 50%;
    background: radial-gradient(
        ellipse 74% 78% at 50% 50%,
        rgba(44, 62, 80, 0.44) 0%,
        rgba(44, 62, 80, 0.14) 50%,
        transparent 71%
    );
    filter: blur(12px);
    transform: scaleY(0.34);
    opacity: 0.93;
    z-index: 0;
    pointer-events: none;
    transition: opacity 0.45s cubic-bezier(0.23, 1, 0.32, 1),
        transform 0.45s cubic-bezier(0.23, 1, 0.32, 1),
        filter 0.45s ease;
}

.link-float-root:hover::before {
    opacity: 0.62;
    transform: scaleY(0.38) scaleX(0.94);
}

.link-float-root:hover::after {
    opacity: 0.48;
    transform: scaleY(0.26) scaleX(0.84);
    filter: blur(22px);
}

.link-float-root:has(.float-surface:active)::before {
    opacity: 0.78;
    transform: scaleY(0.48) scaleX(0.96);
}

.link-float-root:has(.float-surface:active)::after {
    opacity: 0.72;
    transform: scaleY(0.36) scaleX(0.92);
    filter: blur(14px);
}

.link-float-root--accent::after {
    background: radial-gradient(
        ellipse 74% 78% at 50% 50%,
        rgba(44, 62, 80, 0.38) 0%,
        rgba(90, 122, 152, 0.18) 52%,
        transparent 72%
    );
}

.float-surface {
    --tilt-x: 0deg;
    --tilt-y: 0deg;
    position: relative;
    z-index: 2;
    transform-style: preserve-3d;
    backface-visibility: hidden;
    transform:
        translateY(var(--float-y))
        translateZ(var(--float-z))
        rotateX(var(--tilt-x))
        rotateY(var(--tilt-y));
    transition: transform 0.38s var(--motion-ease-out);
}

/* Éclat tactile au clic (sans surcharge sur reduced-motion, désactivé plus bas) */
.float-surface::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: inherit;
    pointer-events: none;
    z-index: 4;
    opacity: 0;
    background: radial-gradient(
        circle at 50% 38%,
        rgba(255, 255, 255, 0.72) 0%,
        rgba(255, 255, 255, 0.18) 42%,
        transparent 68%
    );
    mix-blend-mode: soft-light;
}

.float-surface.surface-flash::before {
    animation: tap-shine 0.62s var(--motion-snap) forwards;
}

@keyframes tap-shine {
    0% {
        opacity: 0;
        transform: scale(0.88);
    }
    28% {
        opacity: 1;
    }
    100% {
        opacity: 0;
        transform: scale(1.07);
    }
}

@media (hover: hover) and (pointer: fine) {
    .link-float-root:hover .float-surface {
        transform:
            translateY(var(--float-y-hover))
            translateZ(var(--float-z-hover))
            rotateX(var(--tilt-x))
            rotateY(var(--tilt-y));
    }
}

/* Téléphone / grosses zones : pas de « hover fantôme », le clic fait le travail */
@media (hover: none), (pointer: coarse) {
    .link-float-root:hover .float-surface {
        transform:
            translateY(var(--float-y))
            translateZ(var(--float-z))
            rotateX(var(--tilt-x))
            rotateY(var(--tilt-y));
    }
}

.float-surface:active {
    transform:
        translateY(-9px)
        translateZ(15px)
        rotateX(var(--tilt-x))
        rotateY(var(--tilt-y))
        scale(0.986);
    transition-duration: var(--motion-duration-instant);
}

@media (hover: none), (pointer: coarse) {
    .float-surface:active {
        transform:
            translateY(-11px)
            translateZ(24px)
            rotateX(var(--tilt-x))
            rotateY(var(--tilt-y))
            scale(0.982);
        transition-duration: var(--motion-duration-instant);
    }
}

.link-label {
    flex: 1;
    min-width: 0;
    font-weight: 600;
    font-size: clamp(14px, 3.9vw, 16px);
    letter-spacing: 0.02em;
    text-align: left;
    color: #1f2d38;
}

.link-meta {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

.link-arrow {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: rgba(44, 62, 80, 0.06);
    color: var(--color-primary);
    transition:
        transform var(--motion-duration) var(--motion-ease-out),
        background var(--motion-duration) ease,
        color var(--motion-duration) ease;
}

.link-float-root:hover .link-arrow,
.link-float-root:focus-within .link-arrow {
    transform: translateX(4px);
    background: rgba(44, 62, 80, 0.12);
}

@media (hover: none), (pointer: coarse) {
    .link-float-root:hover .link-arrow,
    .link-float-root:focus-within .link-arrow {
        transform: none;
    }

    .float-surface:active .link-arrow {
        transform: translateX(5px);
        background: rgba(44, 62, 80, 0.18);
    }
}

.main-link .link-label {
    background: linear-gradient(120deg, #1a2530 0%, #2c3e50 55%, #3d566d 100%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

@supports not (background-clip: text) {
    .main-link .link-label {
        color: #2c3e50;
        background: none;
    }
}

.link-btn {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    color: #333;
    text-decoration: none;
    padding: clamp(16px, 4.2vw, 22px) clamp(18px, 5vw, 26px);
    border-radius: clamp(18px, 4.5vw, 22px);
    font-weight: 500;
    min-height: 48px;
    cursor: pointer;
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
    transition:
        box-shadow var(--motion-duration) ease,
        border-color calc(var(--motion-duration) - 40ms) ease,
        filter var(--motion-duration) ease;
}

.link-btn:focus {
    outline: none;
}

.link-btn:focus-visible {
    outline: var(--focus-ring-width) solid var(--focus-ring-color);
    outline-offset: var(--focus-ring-offset);
}

.link-btn.btn-3d {
    isolation: isolate;
    background: linear-gradient(
        165deg,
        #ffffff 0%,
        #f2f6fa 38%,
        #dce6ef 100%
    );
    border: 1px solid rgba(255, 255, 255, 0.98);
    box-shadow:
        inset 0 2px 5px rgba(255, 255, 255, 1),
        inset 0 -5px 14px rgba(44, 62, 80, 0.09),
        0 3px 0 rgba(215, 224, 236, 1),
        0 8px 0 rgba(175, 190, 208, 0.92),
        0 12px 22px rgba(44, 62, 80, 0.1),
        0 26px 50px rgba(195, 207, 226, 0.85),
        0 46px 78px rgba(149, 165, 166, 0.28),
        0 64px 100px rgba(189, 195, 199, 0.2);
    filter: drop-shadow(0 32px 36px rgba(44, 62, 80, 0.14))
        drop-shadow(0 12px 20px rgba(195, 207, 226, 0.45));
}

@media (hover: hover) and (pointer: fine) {
    .link-float-root:hover .link-btn.btn-3d {
        border-color: rgba(255, 255, 255, 1);
        box-shadow:
            inset 0 3px 6px rgba(255, 255, 255, 1),
            inset 0 -6px 16px rgba(44, 62, 80, 0.11),
            0 5px 0 rgba(205, 215, 228, 1),
            0 12px 0 rgba(165, 182, 202, 0.88),
            0 18px 28px rgba(44, 62, 80, 0.11),
            0 34px 58px rgba(195, 207, 226, 0.95),
            0 54px 88px rgba(149, 165, 166, 0.32),
            0 74px 112px rgba(189, 195, 199, 0.24);
        filter: drop-shadow(0 48px 56px rgba(44, 62, 80, 0.18))
            drop-shadow(0 18px 28px rgba(195, 207, 226, 0.52));
    }
}

@media (hover: none), (pointer: coarse) {
    .link-btn.float-surface:active {
        border-color: rgba(255, 255, 255, 1);
        box-shadow:
            inset 0 3px 8px rgba(44, 62, 80, 0.12),
            inset 0 1px 3px rgba(255, 255, 255, 0.95),
            0 4px 0 rgba(205, 215, 228, 1),
            0 10px 0 rgba(155, 172, 192, 0.85),
            0 22px 46px rgba(195, 207, 226, 0.95),
            0 38px 70px rgba(44, 62, 80, 0.12);
        filter: drop-shadow(0 36px 44px rgba(44, 62, 80, 0.16))
            drop-shadow(0 14px 22px rgba(195, 207, 226, 0.48));
    }
}

@media (pointer: fine) {
    .link-btn.float-surface:active {
        box-shadow:
            inset 0 4px 10px rgba(44, 62, 80, 0.14),
            inset 0 1px 3px rgba(255, 255, 255, 0.92),
            0 2px 0 rgba(205, 218, 232, 0.95),
            0 22px 44px rgba(195, 207, 226, 0.7);
        filter: drop-shadow(0 18px 26px rgba(44, 62, 80, 0.16));
    }
}

.link-btn.main-link.btn-3d {
    background: linear-gradient(
        165deg,
        #ffffff 0%,
        #eef3f8 40%,
        #dbe6f0 100%
    );
    box-shadow:
        inset 0 2px 5px rgba(255, 255, 255, 1),
        inset 0 -5px 14px rgba(44, 62, 80, 0.11),
        0 0 0 1px rgba(44, 62, 80, 0.07),
        0 3px 0 rgba(200, 212, 226, 1),
        0 8px 0 rgba(130, 155, 178, 0.52),
        0 12px 22px rgba(44, 62, 80, 0.12),
        0 26px 50px rgba(195, 207, 226, 0.9),
        0 46px 78px rgba(44, 62, 80, 0.14),
        0 64px 100px rgba(189, 195, 199, 0.22);
}

@media (hover: hover) and (pointer: fine) {
    .link-float-root--accent:hover .link-btn.main-link.btn-3d {
        box-shadow:
            inset 0 3px 6px rgba(255, 255, 255, 1),
            inset 0 -6px 16px rgba(44, 62, 80, 0.13),
            0 0 0 1px rgba(44, 62, 80, 0.09),
            0 5px 0 rgba(208, 218, 230, 1),
            0 12px 0 rgba(110, 142, 172, 0.48),
            0 18px 28px rgba(44, 62, 80, 0.13),
            0 34px 58px rgba(195, 207, 226, 0.98),
            0 54px 88px rgba(44, 62, 80, 0.17),
            0 74px 112px rgba(189, 195, 199, 0.26);
    }
}

@media (prefers-reduced-motion: reduce) {
    .float-surface,
    .link-float-root:hover .float-surface {
        transform: translateY(-6px) translateZ(0) rotateX(0deg) rotateY(0deg);
    }

    .float-surface:active {
        transform: translateY(-5px) translateZ(0) scale(0.995);
    }

    .float-surface.surface-flash::before {
        animation: none !important;
    }

    .link-float-root::before,
    .link-float-root::after {
        transition: none;
    }
}

/* --- BADGES --- */
.badge {
    font-size: clamp(9px, 2.6vw, 11px);
    font-weight: 700;
    padding: 7px 14px;
    border-radius: 50px;
    color: white;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.badge-green {
    background: linear-gradient(145deg, #3bff9a 0%, #00e676 48%, #00c853 100%);
    box-shadow:
        0 1px 0 rgba(255, 255, 255, 0.35) inset,
        0 4px 14px rgba(0, 230, 118, 0.35);
}

.badge-silver {
    background: linear-gradient(145deg, #d5dde3 0%, #bdc3c7 55%, #a4adb5 100%);
    color: #2c3e50;
    box-shadow: 0 1px 0 rgba(255, 255, 255, 0.45) inset;
}

/* --- NOUVEAU : FOOTER "PRO" POUR LE BOT --- */
.footer { 
    margin-top: 40px; 
    font-size: 11px; 
    color: #95a5a6; 
    text-align: center;
    line-height: 1.8;
}

.legal-links {
    margin-top: 8px;
}

.legal-links a {
    color: #7f8c8d;
    text-decoration: none;
    margin: 0 4px;
    transition: 0.2s;
}

.legal-links a:hover {
    color: #2c3e50;
    text-decoration: underline;
}