/* ============================================================
   u.css — Styles STATIQUES de la page publique (u.php)
   Les valeurs dynamiques du thème (tailles, couleurs, polices,
   $btnCss, $galRadius…) restent dans le <style> inline de u.php
   et sont chargées APRÈS ce fichier (elles gagnent à égalité).
   ============================================================ */

html {
    background-color: #050505;
    height: 100%;
    overflow: hidden; /* Empêche le scroll du navigateur lui-même */
    overscroll-behavior: none; /* Désactive le rebond élastique de Safari */
}
* { box-sizing: border-box; }
body {
    margin: 0 auto; padding: 0; font-family: 'Inter', sans-serif; min-height: 100dvh; /* Prend toute la hauteur de l'écran */
    display: flex;           /* Active le mode Flexbox */
    flex-direction: column;  /* Aligne les éléments en colonne */
    justify-content: center; /* CENTRE VERTICALEMENT */
    align-items: center;     /* CENTRE HORIZONTALEMENT */
    overflow: hidden;
}
body::before {
    content: "";
    position: fixed; /* Reste fixe derrière */
    /* On le fait dépasser un peu pour éviter les bords blancs dûs au flou */
    top: -20px; left: -20px; right: -20px; bottom: -20px;
    z-index: -1; /* On le place DERRIÈRE tout le reste */

    /* MAGIE ICI : Il hérite automatiquement du background du <body> */
    background: inherit;

    /* LES EFFETS */
    filter: blur(30px) brightness(0.7); /* Flou intense + assombrissement pour le contraste */
    transform: scale(1.05); /* Léger zoom pour cacher les imperfections des bords */
    pointer-events: none; /* Pour qu'il ne gêne pas les clics */
}

.profile-wrapper { width: 100%; padding: 40px 20px; display: flex; flex-direction: column; align-items: center; flex: 1; }

/* Header Profil Classique (tailles/couleurs dynamiques inline dans u.php) */
.profile-img {
    object-fit: cover;
    border: 0px solid rgba(255,255,255,0.2);
    box-shadow: 0 8px 24px rgba(0,0,0,0.2);
    flex-shrink: 0;
}
h1 {
    font-weight: 700;
    text-shadow: 0 2px 4px rgba(0,0,0,0.3);
}
.bio {
    line-height: 1.5;
    opacity: 0.9;
    white-space: pre-wrap;
    text-align: center;
}

/* Social Icons */
.social-icons { display: flex; justify-content: center; gap: 5px; margin-bottom: 32px; flex-wrap: wrap; }
.social-icons a { display: flex; align-items: center; justify-content: center; width: 42px; height: 42px; border-radius: 50%; font-size: 24px; transition: 0.2s; text-decoration: none; }
.social-icons a:hover { transform: translateY(-3px); }

.items-container {
    width: 100%;
    display: flex;
    flex-direction: column;
    margin-bottom: 40px;
}

/* --- LIEN STYLE CARD (Image) --- */
.link-card-rich {
    /* Hérite du fond, bordure, ombre et arrondi du bouton ($btnCss inline) */
    height: auto !important;
    display: flex;
    flex-direction: column;
    text-decoration: none;
    overflow: hidden;
    transition: 0.2s;
    padding: 0; /* Important pour que l'image touche les bords */
}

.link-card-rich:hover {
    transform: scale(1.02);
}

.card-media {
    width: 100%;
    height: 280px;
    position: relative;
}

.card-media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* L'icône "Comme avant" : Badge circulaire en haut à gauche */
.card-icon-overlay {
    position: absolute;
    top: 15px;
    left: 15px;
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(10px);
    width: 42px;
    height: 42px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    border: 1px solid rgba(255,255,255,0.2);
    color: #fff;
    font-size: 18px;
    z-index: 10;
}

.card-info {
    /* height dynamique inline dans u.php */
    display: flex;           /* Active le mode Flexbox */
    flex-direction: column;  /* Empile le contenu verticalement */
    justify-content: center; /* Centre Verticalement (Axe principal) */
    align-items: center;     /* Centre Horizontalement (Axe secondaire) */
}

.card-title {
    color: inherit; /* Utilise la couleur de texte du bouton */
}

/* --- LIEN STYLE BOUTON --- */
.link-btn { display: flex; align-items: center; justify-content: center; text-decoration: none; font-weight: 600; transition: 0.2s; position: relative; overflow: hidden; padding: 0 20px; width: 100%; }
.link-btn:hover { transform: scale(1.02); opacity: 0.95; }
.link-btn i { position: absolute; left: 20px; top: 50%; transform: translateY(-50%); font-size: 1.2em; }

/* --- WIDGET TEXTE (Style Simple comme la Bio) --- */
.widget-text {
    background: none !important;
    backdrop-filter: none !important;
    border: none !important;
    box-shadow: none !important;

    font-size: 1.1em;
    font-weight: bold;
    padding: 5px;
    margin: 1px; /* On remonte un peu l'élément suivant */

    text-align: center;
    width: 100%;
    min-height: 0 !important;
}

/* On nettoie aussi le container pour éviter le carré noir transparent */
.widget-block {
    width: 100%;
    border-radius: 0;
    overflow: hidden;
    background: transparent !important; /* Fond invisible */
}
.responsive-iframe-container { position: relative; width: 100%; padding-bottom: 56.25%; height: 0; background: #000; }
.responsive-iframe-container iframe { position: absolute; top: 0; left: 0; width: 100%; height: 100%; border: 0; }

/* --- GALERIE PHOTO / VIDÉO (swipe horizontal) --- */
.gallery-block { width: 100%; }
.gallery-title-overlay {
    position: absolute;
    top: 0; left: 0; right: 0;
    padding: 14px 70px 30px 16px;
    background: linear-gradient(to bottom, rgba(0,0,0,0.55), rgba(0,0,0,0.25) 55%, transparent);
    font-size: 14px;
    font-weight: 700;
    color: #fff;
    text-shadow: 0 1px 4px rgba(0,0,0,0.5);
    pointer-events: none;
    z-index: 2;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.gallery-wrap { position: relative; }
.gallery-track {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    -ms-overflow-style: none;
}
.gallery-track::-webkit-scrollbar { display: none; }
.gallery-slide {
    position: relative;
    flex: 0 0 100%;
    aspect-ratio: 1 / 1;
    scroll-snap-align: center;
    scroll-snap-stop: always;
    overflow: hidden;
    background: rgba(0,0,0,0.35);
    box-shadow: 0 6px 24px rgba(0,0,0,0.25);
}
.gallery-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    user-select: none;
    -webkit-user-drag: none;
}
/* Photos : image entière (contain) sur fond flou de la même image */
.gallery-bg {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    filter: blur(28px) brightness(0.55);
    transform: scale(1.25);
}
.gallery-photo-slide img.gallery-photo {
    position: relative;
    z-index: 1;
    object-fit: contain;
    cursor: zoom-in;
}
/* Lightbox plein écran */
.gallery-lightbox {
    position: fixed;
    inset: 0;
    z-index: 99999;
    background: rgba(0,0,0,0.93);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    display: none;
    align-items: center;
    justify-content: center;
}
.gallery-lightbox.open { display: flex; }
.glb-img {
    max-width: 94vw;
    max-height: 86vh;
    object-fit: contain;
    border-radius: 10px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.6);
    user-select: none;
    -webkit-user-drag: none;
    animation: glbIn 0.22s ease;
}
@keyframes glbIn { from { opacity: 0; transform: scale(0.96); } to { opacity: 1; transform: scale(1); } }
.glb-close, .glb-prev, .glb-next {
    position: fixed;
    width: 42px; height: 42px;
    border-radius: 50%;
    border: none;
    cursor: pointer;
    background: rgba(255,255,255,0.1);
    color: #fff;
    font-size: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
    z-index: 2;
}
.glb-close:hover, .glb-prev:hover, .glb-next:hover { background: rgba(255,255,255,0.25); }
.glb-close { top: 18px; right: 18px; }
.glb-prev { left: 14px; top: 50%; transform: translateY(-50%); }
.glb-next { right: 14px; top: 50%; transform: translateY(-50%); }
.glb-count {
    position: fixed;
    bottom: 22px;
    left: 50%;
    transform: translateX(-50%);
    color: #fff;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 1px;
    background: rgba(255,255,255,0.1);
    padding: 5px 14px;
    border-radius: 999px;
}
.gallery-lightbox .glb-prev, .gallery-lightbox .glb-next { display: none; }
.gallery-lightbox.has-nav .glb-prev, .gallery-lightbox.has-nav .glb-next { display: flex; }
.gallery-slide iframe {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border: 0;
    background: #000;
}
.gallery-play {
    position: absolute;
    top: 50%; left: 50%;
    transform: translate(-50%, -50%);
    width: 58px; height: 58px;
    border-radius: 50%;
    border: none;
    cursor: pointer;
    background: rgba(0,0,0,0.55);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    color: #fff;
    font-size: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.2s, background 0.2s;
}
.gallery-play i { margin-left: 3px; }
.gallery-play:hover { transform: translate(-50%, -50%) scale(1.08); background: rgba(0,0,0,0.75); }
.gallery-video::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.35), transparent 40%);
    pointer-events: none;
}
.gallery-video.is-playing::after { display: none; }
.gallery-counter {
    position: absolute;
    top: 10px; right: 10px;
    padding: 3px 10px;
    border-radius: 999px;
    background: rgba(0,0,0,0.5);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.5px;
    pointer-events: none;
}
.gallery-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 36px; height: 36px;
    border-radius: 50%;
    border: none;
    cursor: pointer;
    background: rgba(0,0,0,0.45);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    color: #fff;
    font-size: 13px;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0.9;
    transition: opacity 0.25s, background 0.2s;
    z-index: 2;
}
.gallery-prev { left: 10px; }
.gallery-next { right: 10px; }
.gallery-arrow:hover { background: rgba(0,0,0,0.7); }
.gallery-arrow.is-off { opacity: 0; pointer-events: none; }
@media (max-width: 768px) {
    .gallery-arrow { width: 32px; height: 32px; font-size: 12px; }
}
.gallery-dots {
    display: flex;
    justify-content: center;
    gap: 6px;
    margin-top: 10px;
}
.gallery-dots span {
    width: 6px; height: 6px;
    border-radius: 999px;
    opacity: 0.3;
    transition: all 0.25s ease;
}
.gallery-dots span.active {
    width: 18px;
    opacity: 0.95;
}

/* Le "faux téléphone" */
#tt {
    width: 100%;
    max-width: 520px;
    height: 95vh;

    position: relative; /* Référence pour le haut et le bas */
    border-radius: 40px;
    border: 2px solid #1a1a1a;
    box-shadow: 0 40px 100px rgba(0,0,0,0.8);

    /* C'est ici le secret : on utilise Flexbox */
    display: flex;
    flex-direction: column;
    overflow: hidden; /* Coupe tout ce qui dépasse, pas de scrollbar ici */

    background-size: cover !important;
    background-position: center !important;
    background-attachment: scroll !important;
}

/* Cacher la barre de défilement pour le look App */
#tt::-webkit-scrollbar { display: none; }
#tt { -ms-overflow-style: none; scrollbar-width: none; }

/* LE QR CODE (Fixé en bas à droite de l'écran) */
.qr-badge {
    position: fixed;
    bottom: 30px;
    right: 30px;
    background: rgba(255, 255, 255, 0.05);
    padding: 12px;
    border-radius: 18px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    text-align: center;
    z-index: 1000;
}

.qr-badge img { width: 120px; height: 120px; border-radius: 8px; background: linear-gradient(to bottom right, #0470FA, #00cccc); padding: 4px; margin-bottom: 5px; }
.qr-badge p { font-size: 1em; color: black; margin: 0; font-weight: bold; opacity: 0.7; }

/* RESPONSIVE : On enlève le look téléphone sur les vrais mobiles */
@media (max-width: 768px) {
    body { background-color: transparent; }
    #tt {
        max-width: 100%;
        height: 100dvh;
        margin: 0;
        border: none;
        border-radius: 0;
    }
    .qr-badge { display: none; }
}

/* Ajustements du contenu interne */
.profile-wrapper {
    flex: 1; /* Prend toute la hauteur disponible */
    overflow-y: auto; /* Active le scroll UNIQUEMENT ici */
    width: 100%;
    padding: 40px 20px 100px 20px; /* Padding bas large pour ne pas cacher le contenu sous la bulle */

    display: flex;
    flex-direction: column;
    align-items: center;

    /* Cache la barre de scroll moche */
    scrollbar-width: none;
    -ms-overflow-style: none;
}
.profile-wrapper::-webkit-scrollbar { display: none; }

/* --- BOUTON FLOTTANT (partage) --- */
.bio-floating-btn {
    position: absolute;
    top: 10px; right: 20px;
    width: 40px; height: 40px;
    border-radius: 50%;
    background: rgba(10, 10, 10, 0.6);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: white;
    font-size: 18px;
    cursor: pointer;
    z-index: 10002;
    display: flex; align-items: center; justify-content: center;
    transition: transform 0.2s, background 0.2s;
    box-shadow: 0 4px 20px rgba(0,0,0,0.3);
}
.bio-floating-btn:hover {
    transform: scale(1.1);
    background: rgba(255, 255, 255, 0.15);
    border-color: rgba(99, 102, 241, 0.5);
}

/* --- OVERLAY (FOND) --- */
.bio-modal-overlay {
    position: absolute; inset: 0; /* Prend tout le téléphone */
    z-index: 20000;
    display: flex; align-items: center; justify-content: center;
    opacity: 0; pointer-events: none; visibility: hidden;
    transition: opacity 0.3s ease;
}
.bio-modal-overlay.is-open {
    opacity: 1; pointer-events: auto; visibility: visible;
}

.bio-modal-backdrop {
    position: absolute; inset: 0;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(8px); /* Le flou derrière */
}

/* --- LA CARTE STYLE LOGIN --- */
.bio-card {
    position: relative;
    width: 90%; max-width: 340px;
    background: rgba(10, 10, 10, 0.9); /* Fond très sombre */
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 32px; /* Arrondi 2rem */
    padding: 30px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(20px);
    transform: scale(0.95);
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    text-align: center;
    color: white;
}
.bio-modal-overlay.is-open .bio-card {
    transform: scale(1);
}

/* --- ÉLÉMENTS INTERNES --- */
.bio-close-btn {
    position: absolute; top: 20px; right: 20px;
    background: transparent; border: none;
    color: #9ca3af; font-size: 20px; cursor: pointer;
    transition: color 0.2s;
}
.bio-close-btn:hover { color: white; }

.bio-avatar {
    width: 64px; height: 64px;
    border-radius: 50%;
    border: 2px solid rgba(255, 255, 255, 0.1);
    object-fit: cover;
    margin: 0 auto 12px auto;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

.bio-card-header h3 {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 24px; font-weight: 700;
    margin: 0 0 24px 0;
    letter-spacing: -0.025em;
}
.accent-text { color: #00D2FF; }

/* QR Code */
.bio-qr-container { display: flex; justify-content: center; margin-bottom: 24px; }
/* QR Code Box - Avec le fond bleu dégradé */
.bio-qr-box {
    padding: 12px;
    background: linear-gradient(to bottom right, #0470FA, #00cccc);
    border-radius: 16px;
    box-shadow: 0 0 20px rgba(255, 255, 255, 0.05);
}
.bio-qr-box img { width: 130px; height: 130px; display: block; }

/* Input Group */
.bio-input-group { text-align: left; margin-bottom: 24px; }
.bio-input-group label {
    display: block; font-size: 11px; font-weight: 700;
    color: #9ca3af; text-transform: uppercase;
    margin-bottom: 6px; padding-left: 4px;
    letter-spacing: 0.05em;
}
.bio-input-wrapper {
    position: relative;
    display: flex; align-items: center;
}
.bio-input-wrapper input {
    width: 100%;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    padding: 14px 40px 14px 40px; /* Espace pour les icônes */
    color: white; font-size: 14px; font-family: monospace;
    outline: none; transition: all 0.2s;
}
.bio-input-wrapper input:focus {
    border-color: rgba(99, 102, 241, 0.5);
    box-shadow: 0 0 0 1px rgba(99, 102, 241, 0.5);
}
.input-icon {
    position: absolute; left: 14px;
    color: #6b7280; font-size: 14px;
    pointer-events: none;
}
.bio-copy-icon-btn {
    position: absolute; right: 10px;
    background: transparent; border: none;
    color: #9ca3af; cursor: pointer; padding: 5px;
    font-size: 16px; transition: color 0.2s;
}
.bio-copy-icon-btn:hover { color: white; }

/* Bouton Gradient */
.bio-action-btn {
    width: 100%;
    padding: 14px;
    border-radius: 12px;
    border: none;
    background: linear-gradient(to right, #4f46e5, #9333ea); /* Indigo to Purple */
    color: white; font-weight: 700; font-size: 14px;
    cursor: pointer;
    display: flex; align-items: center; justify-content: center; gap: 8px;
    transition: transform 0.2s, box-shadow 0.2s;
}
.bio-action-btn:hover {
    transform: scale(1.02);
    box-shadow: 0 0 20px rgba(99, 102, 241, 0.4);
}

/* Badge vérifié */
.verified-badge {
    width: 22px;
    height: 22px;
    object-fit: contain;
    flex-shrink: 0;

    /* L'OMBRE QUI SUIT LA FORME */
    filter: drop-shadow(0 0 5px rgba(0, 149, 246, 0.6));

    transition: transform 0.3s ease, filter 0.3s ease;
}

.verified-badge-nav {
    /* Taille un peu plus petite que dans le profil pour la nav */
    width: 18px;
    height: 18px;
    object-fit: contain;
    flex-shrink: 0;

    /* Ombre qui suit la forme de la rosette */
    filter: drop-shadow(0 0 3px rgba(0, 149, 246, 0.5));
}

.verified-badge:hover {
    transform: scale(1.1);
    filter: drop-shadow(0 0 8px rgba(0, 149, 246, 0.9));
}

/* ============================================================
   Bottom sheet promo — style index.php
   ============================================================ */
.bio-promo-overlay[hidden] { display: none; }
.bio-promo-overlay {
    position: fixed;
    inset: 0;
    z-index: 10030;
    background: rgba(0, 0, 0, 0.65);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    display: flex;
    align-items: flex-end;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.25s ease;
}
.bio-promo-overlay.open { opacity: 1; }
.bio-promo-sheet {
    position: relative;
    width: 100%;
    max-width: 520px;
    max-height: min(90vh, 90dvh);
    overflow-y: auto;
    overscroll-behavior: contain;
    background: #050505;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-bottom: none;
    border-radius: 26px 26px 0 0;
    box-shadow: 0 -24px 80px rgba(0, 0, 0, 0.7);
    transform: translateY(100%);
    transition: transform 0.32s cubic-bezier(0.32, 0.72, 0, 1);
    color: #fff;
    font-family: 'Inter', sans-serif;
}
.bio-promo-overlay.open .bio-promo-sheet { transform: translateY(0); }

/* Fonds façon index.php */
.bio-promo-bg-mesh {
    position: absolute;
    inset: 0;
    pointer-events: none;
    background:
        radial-gradient(at 0% 0%, hsla(253, 16%, 7%, 1) 0, transparent 50%),
        radial-gradient(at 50% 0%, hsla(225, 39%, 30%, 1) 0, transparent 50%),
        radial-gradient(at 100% 0%, hsla(339, 49%, 30%, 1) 0, transparent 50%);
    opacity: 0.4;
}
.bio-promo-bg-grid {
    position: absolute;
    inset: 0;
    pointer-events: none;
    background-size: 50px 50px;
    background-image:
        linear-gradient(to right, rgba(255, 255, 255, 0.05) 1px, transparent 1px),
        linear-gradient(to bottom, rgba(255, 255, 255, 0.05) 1px, transparent 1px);
    mask-image: radial-gradient(circle at center, black 40%, transparent 100%);
    -webkit-mask-image: radial-gradient(circle at center, black 40%, transparent 100%);
}

.bio-promo-grab {
    position: relative;
    z-index: 1;
    width: 42px;
    height: 5px;
    border-radius: 99px;
    background: rgba(255, 255, 255, 0.18);
    margin: 12px auto 0;
}
.bio-promo-close {
    position: absolute;
    top: 16px;
    right: 16px;
    z-index: 2;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0.12);
    background: rgba(255, 255, 255, 0.06);
    color: rgba(255, 255, 255, 0.7);
    font-size: 15px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.15s, color 0.15s;
}
.bio-promo-close:hover { background: rgba(255, 255, 255, 0.14); color: #fff; }

.bio-promo-content {
    position: relative;
    z-index: 1;
    padding: 22px 26px max(30px, env(safe-area-inset-bottom));
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
}

.bio-promo-logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: 6px;
}
.bio-promo-logo-icon {
    width: 2rem;
    height: 2rem;
    border-radius: 0.5rem;
    background: linear-gradient(135deg, #6366f1, #a855f7);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}
.bio-promo-logo-icon img { width: 100%; height: 100%; object-fit: cover; border-radius: 0.5rem; }
.bio-promo-logo-text {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 1.35rem;
    font-weight: 700;
    letter-spacing: -0.02em;
}
.bio-promo-accent { color: #6366f1; }

.bio-promo-title {
    font-family: 'Space Grotesk', sans-serif;
    font-size: clamp(1.7rem, 6vw, 2.3rem);
    font-weight: 700;
    line-height: 1.12;
    letter-spacing: -0.02em;
    margin: 0;
}
.bio-promo-gradient {
    background: linear-gradient(to right, #fff, #a855f7, #6366f1);
    background-size: 200% auto;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: bioPromoGradientMove 8s linear infinite;
}
@supports not (-webkit-background-clip: text) {
    .bio-promo-gradient { color: #a855f7; background: none; }
}
@keyframes bioPromoGradientMove {
    0% { background-position: 0% 50%; }
    100% { background-position: 200% 50%; }
}

.bio-promo-desc {
    color: #9ca3af;
    font-size: 0.95rem;
    line-height: 1.6;
    max-width: 24rem;
    margin: 0;
}

.bio-promo-chips {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
}
.bio-promo-chip {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 6px 13px;
    border-radius: 9999px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(12px);
    font-size: 0.78rem;
    font-weight: 500;
    color: #d1d5db;
}

.bio-promo-form {
    position: relative;
    width: 100%;
    max-width: 26rem;
    display: flex;
    align-items: center;
    margin-top: 4px;
}
.bio-promo-form-glow {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 102%;
    height: 110%;
    background: linear-gradient(to right, #6366f1, #a855f7);
    border-radius: 9999px;
    filter: blur(15px);
    opacity: 0.3;
    z-index: 0;
    transition: opacity 0.5s ease;
    pointer-events: none;
}
.bio-promo-form:hover .bio-promo-form-glow,
.bio-promo-form:focus-within .bio-promo-form-glow { opacity: 0.75; }
.bio-promo-form-input {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    background: rgba(17, 24, 39, 0.8);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 9999px;
    padding: 0.25rem 0.25rem 0.25rem 1.25rem;
    min-height: 3.25rem;
    width: 100%;
    transition: all 0.3s ease;
}
.bio-promo-form-input:focus-within {
    background: #111827;
    border-color: rgba(99, 102, 241, 0.5);
}
.bio-promo-prefix {
    color: #9ca3af;
    font-size: 0.95rem;
    font-weight: 600;
    flex-shrink: 0;
}
.bio-promo-form-input input {
    flex: 1;
    min-width: 0;
    background: transparent;
    border: none;
    outline: none;
    color: #fff;
    font-size: 0.95rem;
    font-family: inherit;
    padding: 0.5rem 0.25rem;
}
.bio-promo-form-input input::placeholder { color: rgba(255, 255, 255, 0.3); }
.bio-promo-submit {
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 0.65rem 1.2rem;
    border: none;
    border-radius: 9999px;
    background: linear-gradient(to right, #6366f1, #a855f7);
    color: #fff;
    font-size: 0.875rem;
    font-weight: 700;
    font-family: inherit;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
}
.bio-promo-submit:hover { transform: scale(1.04); box-shadow: 0 0 18px rgba(99, 102, 241, 0.45); }
.bio-promo-submit:active { transform: scale(0.96); }

.bio-promo-social {
    font-size: 0.82rem;
    color: #9ca3af;
}
.bio-promo-highlight { color: #fff; font-weight: 700; }

.bio-promo-cta {
    display: block;
    width: 100%;
    max-width: 26rem;
    padding: 0.85rem 1.25rem;
    border-radius: 9999px;
    background: #fff;
    color: #000;
    font-size: 0.95rem;
    font-weight: 700;
    text-decoration: none;
    text-align: center;
    box-shadow: 0 0 10px rgba(255, 255, 255, 0.1);
    transition: all 0.3s ease;
}
.bio-promo-cta:hover {
    background: #e5e5e5;
    transform: scale(1.03);
    box-shadow: 0 0 20px rgba(255, 255, 255, 0.3);
}
.bio-promo-login {
    font-size: 0.82rem;
    color: #9ca3af;
    text-decoration: none;
    margin-bottom: 4px;
}
.bio-promo-login span { color: #6366f1; font-weight: 600; }
.bio-promo-login:hover span { text-decoration: underline; }

/* Desktop : la sheet reste ancrée en bas mais avec coins flottants */
@media (min-width: 641px) {
    .bio-promo-overlay { padding: 0 20px; }
    .bio-promo-sheet {
        border-radius: 26px 26px 0 0;
        max-height: min(86vh, 86dvh);
    }
}

/* ============================================================
   Footer principal (couleurs dynamiques inline dans u.php)
   ============================================================ */
.custom-footer {
    text-align: center;
    padding: 20px 20px 2px 20px;
    font-family: Arial, sans-serif;
}

/* Lien autour des avatars et du titre */
.footer-cta-link {
    text-decoration: none;
    color: inherit; /* Hérite de la couleur dynamique */
    display: inline-block;
    transition: opacity 0.2s;
}

.footer-cta-link:hover {
    opacity: 0.8;
}

/* Container pour les images superposées */
.footer-avatar-container {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 10px;
}

.avatar-user, .avatar-logo {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    /* bordure dynamique inline dans u.php */
    object-fit: cover;
}

.avatar-logo {
    margin-left: -15px;
    z-index: 1;
}

.footer-title {
    font-size: 22px;
    font-weight: bold;
    margin-bottom: 20px;
    letter-spacing: -0.5px;
}

/* Liens légaux (couleur dynamique inline dans u.php) */
.footer-legal {
    font-size: 13px;
}

.footer-legal a {
    color: inherit;
    text-decoration: none;
    margin: 0 5px;
}

.footer-legal a:hover {
    text-decoration: underline;
}

/* Bulle Flottante */
.bio-footer {
    position: absolute;
    bottom: 25px;
    left: 50%;
    z-index: 9999;

    background: rgba(10, 10, 10, 0.6);
    backdrop-filter: blur(10px);
    padding: 10px 22px;
    border-radius: 50px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);

    /* 1. On définit l'état de base complet */
    transform: translateX(-50%) scale(1) rotate(0deg);

    /* 2. On transitionne 'transform' globalement */
    transition: transform 0.3s ease, background 0.3s ease;

    /* 3. On force l'accélération matérielle pour éviter les bugs graphiques */
    backface-visibility: hidden;
    -webkit-font-smoothing: subpixel-antialiased;

    animation: attention-shake 3s infinite;
}

.bio-footer:hover {
    /* Au survol : On garde le centrage (-50%), on grossit (1.1), pas de rotation */
    transform: translateX(-50%) scale(1.1) rotate(0deg);
    background: #fff;
    animation: none; /* On stoppe l'animation proprement */
}

/* L'animation doit inclure le translateX(-50%) à chaque étape
   pour ne pas perdre le centrage pendant qu'elle bouge */
@keyframes attention-shake {
    0%, 80%, 100% { transform: translateX(-50%) rotate(0deg); }
    82%           { transform: translateX(-50%) rotate(3deg); }
    84%           { transform: translateX(-50%) rotate(-3deg); }
    86%           { transform: translateX(-50%) rotate(3deg); }
    88%           { transform: translateX(-50%) rotate(-3deg); }
    90%           { transform: translateX(-50%) rotate(1deg); }
    92%           { transform: translateX(-50%) rotate(-1deg); }
}

.bio-link {
    text-decoration: none;
    color: #fff;
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 700;
    font-size: 14px;
}

/* Barre collante : la règle de base (.sticky-header-style) reste inline
   dans u.php car elle injecte $btnCss avec un ordre de déclarations sensible. */
.sticky-header-style.is-visible {
    opacity: 1;
    visibility: visible;
}

.sticky-container {
    margin-left: 16px;
    display: flex;
    align-items: center;
    gap: 12px;
}

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

.sticky-name {
    font-weight: 700;
    font-size: 16px;
    color: inherit; /* Utilise la couleur du texte du bouton */
}

/* ============================================================
   Bloc collecte email (couleur du message dynamique inline)
   ============================================================ */
.email-collect-block {
    width: 100%;
    padding: 16px;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    margin: 4px 0;
    display: flex;
    flex-direction: column;
    gap: 12px;
}
.email-collect-message {
    font-size: 15px;
    line-height: 1.4;
    margin: 0;
    text-align: center;
}
.email-collect-form {
    display: flex;
    flex-direction: column;
    gap: 10px;
    width: 100%;
    margin: 0;
}
.email-collect-input {
    width: 100%;
    padding: 12px 14px;
    border-radius: 12px;
    background: rgba(0, 0, 0, 0.25);
    border: 1px solid rgba(255, 255, 255, 0.12);
    color: #fff;
    font-size: 15px;
    outline: none;
    box-sizing: border-box;
    transition: border-color 0.2s;
    font-family: inherit;
}
.email-collect-input:focus {
    border-color: rgba(255, 255, 255, 0.35);
}
.email-collect-input::placeholder {
    color: rgba(255, 255, 255, 0.35);
}
.email-collect-btn {
    width: 100%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 14px;
    transition: transform 0.15s, opacity 0.2s;
    font-family: inherit;
}
.email-collect-btn:hover { transform: translateY(-1px); }
.email-collect-btn:disabled { opacity: 0.6; cursor: not-allowed; transform: none; }
.email-collect-feedback {
    font-size: 13px;
    text-align: center;
    min-height: 18px;
    color: rgba(255, 255, 255, 0.75);
}
.email-collect-feedback.success { color: #4ade80; }
.email-collect-feedback.error   { color: #f87171; }

/* ===== BLOC FORMULAIRE ===== */
.bio-form-block { width: 100%; }
.bio-form-open {
    width: 100%;
    cursor: pointer;
    font-family: inherit;
    display: flex;
    align-items: center;
    gap: 12px;
    height: auto !important;
    min-height: 54px;
    padding: 10px 18px !important;
}
.bio-form-open-texts {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    text-align: center;
}
.bio-form-open-title {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
}
.bio-form-open-sub {
    font-size: 11px;
    font-weight: 500;
    opacity: 0.75;
    letter-spacing: 0.01em;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
}
.bio-form-overlay[hidden] { display: none; }
.bio-form-overlay {
    position: fixed;
    inset: 0;
    z-index: 10010;
    background: rgba(0, 0, 0, 0.65);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    opacity: 0;
    transition: opacity 0.22s ease;
}
.bio-form-overlay.open { opacity: 1; }
.bio-form-sheet {
    width: 100%;
    max-width: 440px;
    max-height: min(88vh, 88dvh);
    overflow-y: auto;
    overscroll-behavior: contain;
    background: #15161d;
    border: 1px solid rgba(255, 255, 255, 0.10);
    border-radius: 24px;
    padding: 20px 20px 24px;
    color: #fff;
    box-shadow: 0 24px 80px rgba(0, 0, 0, 0.6);
    transform: translateY(14px) scale(0.97);
    transition: transform 0.22s ease;
}
.bio-form-overlay.open .bio-form-sheet { transform: translateY(0) scale(1); }
@media (max-width: 640px) {
    .bio-form-overlay { padding: 0; align-items: flex-end; }
    .bio-form-sheet {
        max-width: 100%;
        max-height: min(92vh, 92dvh);
        border-radius: 22px 22px 0 0;
        border-bottom: none;
        padding-bottom: max(24px, env(safe-area-inset-bottom));
        transform: translateY(100%);
    }
    .bio-form-overlay.open .bio-form-sheet { transform: translateY(0); }
}
.bio-form-confirm[hidden] { display: none; }
.bio-form-confirm {
    position: fixed;
    inset: 0;
    z-index: 10020;
    background: rgba(0, 0, 0, 0.55);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
}
.bio-form-confirm-box {
    background: #1b1c24;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 20px;
    padding: 24px 20px 18px;
    max-width: 300px;
    width: 100%;
    text-align: center;
    box-shadow: 0 18px 60px rgba(0, 0, 0, 0.6);
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.bio-form-confirm-icon {
    font-size: 26px;
    color: rgba(255, 255, 255, 0.5);
    margin-bottom: 2px;
}
.bio-form-confirm-box p {
    margin: 0 0 12px;
    font-size: 14px;
    line-height: 1.5;
    color: #fff;
}
.bio-form-confirm-stay {
    width: 100%;
    padding: 12px;
    border-radius: 12px;
    border: none;
    background: #fff;
    color: #000;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    font-family: inherit;
    transition: opacity 0.15s;
}
.bio-form-confirm-stay:hover { opacity: 0.85; }
.bio-form-confirm-quit {
    width: 100%;
    padding: 11px;
    border-radius: 12px;
    border: none;
    background: transparent;
    color: rgba(255, 255, 255, 0.55);
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    font-family: inherit;
    transition: color 0.15s, background 0.15s;
}
.bio-form-confirm-quit:hover { color: #f87171; background: rgba(248, 113, 113, 0.08); }
.bio-form-sheet-head {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 4px;
}
.bio-form-sheet-titles { flex: 1; min-width: 0; }
.bio-form-close {
    flex-shrink: 0;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0.12);
    background: rgba(255, 255, 255, 0.06);
    color: rgba(255, 255, 255, 0.7);
    font-size: 15px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.15s, color 0.15s;
}
.bio-form-close:hover { background: rgba(255, 255, 255, 0.14); color: #fff; }
.bio-form-title {
    font-size: 18px;
    font-weight: 700;
    margin: 4px 0 4px;
}
.bio-form-desc {
    font-size: 13px;
    opacity: 0.75;
    margin: 0 0 6px;
    line-height: 1.45;
}
.bio-form {
    display: flex;
    flex-direction: column;
    gap: 14px;
    margin: 10px 0 0;
}
.bio-form-field { display: flex; flex-direction: column; gap: 6px; }
.bio-form-label { font-size: 13px; font-weight: 600; opacity: 0.9; }
.bio-form-req { color: #f87171; }
.bio-form-input {
    width: 100%;
    padding: 12px 14px;
    border-radius: 12px;
    background: rgba(0, 0, 0, 0.25);
    border: 1px solid rgba(255, 255, 255, 0.12);
    color: #fff;
    font-size: 15px;
    outline: none;
    box-sizing: border-box;
    transition: border-color 0.2s;
    font-family: inherit;
    -webkit-appearance: none;
    appearance: none;
}
.bio-form-input:focus { border-color: rgba(255, 255, 255, 0.35); }
.bio-form-input::placeholder { color: rgba(255, 255, 255, 0.35); }
.bio-form-textarea { resize: vertical; min-height: 84px; }
.bio-form-select {
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23ffffff' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 12px center;
    background-size: 14px;
    padding-right: 36px;
    cursor: pointer;
}
.bio-form-select option { background: #1a1a1a; color: #fff; }
input.bio-form-input[type="date"], input.bio-form-input[type="time"] { color-scheme: dark; }
.bio-form-opts { display: flex; flex-direction: column; gap: 8px; }
.bio-form-opt {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 11px 14px;
    border-radius: 12px;
    background: rgba(0, 0, 0, 0.25);
    border: 1px solid rgba(255, 255, 255, 0.12);
    font-size: 14px;
    cursor: pointer;
    transition: border-color 0.15s, background 0.15s;
}
.bio-form-opt:has(input:checked) {
    border-color: rgba(255, 255, 255, 0.55);
    background: rgba(255, 255, 255, 0.10);
}
.bio-form-opt input {
    /* accent-color dynamique inline dans u.php */
    width: 16px;
    height: 16px;
    margin: 0;
    flex-shrink: 0;
}
.bio-form-pills { display: flex; gap: 8px; }
.bio-form-pill { flex: 1; cursor: pointer; }
.bio-form-pill input { position: absolute; opacity: 0; pointer-events: none; }
.bio-form-pill span {
    display: block;
    text-align: center;
    padding: 11px 0;
    border-radius: 12px;
    background: rgba(0, 0, 0, 0.25);
    border: 1px solid rgba(255, 255, 255, 0.12);
    font-size: 14px;
    font-weight: 600;
    transition: border-color 0.15s, background 0.15s;
}
.bio-form-pill input:checked + span {
    border-color: rgba(255, 255, 255, 0.55);
    background: rgba(255, 255, 255, 0.12);
}
.bio-form-stars { display: flex; gap: 6px; }
.bio-form-star {
    background: none;
    border: none;
    padding: 4px;
    cursor: pointer;
    font-size: 24px;
    color: rgba(255, 255, 255, 0.35);
    transition: transform 0.1s, color 0.15s;
}
.bio-form-star:active { transform: scale(1.2); }
.bio-form-star.active { color: #facc15; }
.bio-form-btn {
    width: 100%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 14px;
    transition: transform 0.15s, opacity 0.2s;
    font-family: inherit;
}
.bio-form-btn:hover { transform: translateY(-1px); }
.bio-form-btn:disabled { opacity: 0.6; cursor: not-allowed; transform: none; }
.bio-form-feedback {
    font-size: 13px;
    text-align: center;
    min-height: 0;
    color: rgba(255, 255, 255, 0.75);
}
.bio-form-feedback.error { color: #f87171; min-height: 18px; }
.bio-form-done { text-align: center; padding: 14px 6px 6px; }
.bio-form-done-check {
    width: 48px;
    height: 48px;
    margin: 0 auto 12px;
    border-radius: 50%;
    background: rgba(74, 222, 128, 0.15);
    border: 1px solid rgba(74, 222, 128, 0.4);
    color: #4ade80;
    font-size: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
}
.bio-form-done-msg { font-size: 14px; line-height: 1.5; margin: 0 0 14px; }
.bio-form-done-link { text-decoration: none; display: flex; align-items: center; justify-content: center; }

/* ===== PRODUCT CARD PRO ($btnCss dynamique inline dans u.php) ===== */
.product-card-pro {
    height: auto !important;
    display: flex;
    flex-direction: column;
    text-decoration: none;
    overflow: hidden;
    width: 100%;
    padding: 0 !important;
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}
.product-card-pro:hover {
    transform: translateY(-3px) scale(1.01);
    opacity: 0.95;
}
.pcp-media {
    position: relative;
    width: 100%;
    height: 220px;
    overflow: hidden;
    flex-shrink: 0;
}
.pcp-media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}
.product-card-pro:hover .pcp-media img {
    transform: scale(1.06);
}
.pcp-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.65) 0%, transparent 55%);
    pointer-events: none;
}
.pcp-badge {
    position: absolute;
    top: 12px;
    right: 12px;
    background: linear-gradient(135deg, #f59e0b, #ef4444);
    color: #fff;
    font-weight: 800;
    font-size: 11px;
    padding: 4px 10px;
    border-radius: 20px;
    letter-spacing: 0.04em;
    box-shadow: 0 2px 8px rgba(0,0,0,0.35);
}
.pcp-body {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 14px 16px;
}
.pcp-info {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 12px;
}
.pcp-name {
    font-weight: 700;
    font-size: 15px;
    line-height: 1.35;
    display: block;
}
.pcp-desc {
    font-size: 12px;
    opacity: 0.55;
    margin: 4px 0 0;
    line-height: 1.4;
}
.pcp-prices {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 2px;
    flex-shrink: 0;
}
.pcp-price-old {
    font-size: 11px;
    opacity: 0.4;
    text-decoration: line-through;
    font-weight: 500;
}
.pcp-price-final {
    font-weight: 800;
    font-size: 16px;
}
.pcp-price-final.is-discounted {
    opacity: 0.95;
}
.pcp-cta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 9px 14px;
    border-radius: 8px;
    background: rgba(0,0,0,0.18);
    border: 1px solid rgba(255,255,255,0.08);
    font-size: 13px;
    font-weight: 600;
    color: inherit;
    transition: background 0.2s;
}
.product-card-pro:hover .pcp-cta {
    background: rgba(0,0,0,0.28);
}
.pcp-cta i {
    font-size: 12px;
    opacity: 0.6;
    transition: transform 0.2s, opacity 0.2s;
}
.product-card-pro:hover .pcp-cta i {
    transform: translateX(4px);
    opacity: 1;
}
