/* ==========================================================================
   1. VARIABLES PAR DÉFAUT (Noyau Blindé 2026)
   ========================================================================== */
:root {
    /* Couleurs de secours (Fallback) */
    --primary-color: #4361ee;
    --primary-hover: #3a56d4;
    --bg-color: #f8f9fa;
    --card-bg: #ffffff;
    --text-main: #2b2d42;
    --text-muted: #8d99ae;
    --border-color: #edf2f4;
    --radius: 12px;
    --shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
    
    /* Variable de fond dynamique (Injectée via PHP dans le style inline du body) */
    --bg-image: none;

    /* États système */
    --success-color: #2ec4b6;
    --error-color: #e71d36;
    --warning-color: #ff9f1c;
}

/* ==========================================================================
   2. RESET & BASE
   ========================================================================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, system-ui, sans-serif;
    line-height: 1.5;
    color: var(--text-main);
    min-height: 100vh;
    
    /* Logique de fond : Priorité à l'image, fallback sur la couleur du thème */
    background-color: var(--bg-color);
    background-image: var(--bg-image);
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    background-repeat: no-repeat;
    
    transition: background 0.4s ease, color 0.4s ease;
}

/* ==========================================================================
   3. LAYOUT & CONTAINER
   ========================================================================== */
.container {
    max-width: 550px; /* Largeur idéale pour le format "Link-in-bio" mobile */
    margin: 0 auto;
    padding: 40px 20px;
}

/* ==========================================================================
   4. COMPOSANT : LA CARTE IZ
   ========================================================================== */
.card {
    background: var(--card-bg);
    padding: 2.5rem 1.5rem;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    border: 1px solid var(--border-color);
    text-align: center;
    position: relative;
    
    /* Support Glassmorphism (Thèmes 06-15) */
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.profile-avatar {
    width: 110px;
    height: 110px;
    border-radius: 50%;
    object-fit: cover;
    margin: 0 auto 1.2rem;
    display: block;
    border: 3px solid var(--primary-color);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    transition: transform 0.3s ease;
}

.profile-avatar:hover {
    transform: scale(1.05);
}

.description {
    font-size: 1rem;
    color: var(--text-main); /* On utilise le texte principal pour la bio */
    opacity: 0.9;
    margin-bottom: 2rem;
    word-wrap: break-word;
}

/* ==========================================================================
   5. LES BOUTONS DE LIENS
   ========================================================================== */
.links-list {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.btn-link {
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    width: 100%;
    padding: 16px 20px;
    background-color: var(--primary-color);
    color: var(--card-bg); /* Contraste automatique avec le fond de carte */
    text-decoration: none;
    border-radius: var(--radius);
    font-weight: 600;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    border: none;
    cursor: pointer;
    font-size: 1rem;
}

.btn-link:hover {
    transform: translateY(-3px);
    filter: brightness(110%);
    box-shadow: 0 8px 20px rgba(0,0,0,0.15);
}

.btn-link:active {
    transform: translateY(-1px);
}

.btn-link .icon {
    position: absolute;
    left: 20px;
    font-size: 1.3rem;
}

/* Titres de sections (inter-liens) */
.section-header {
    text-align: center;
    margin: 25px 0 10px 0;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    font-weight: 800;
    color: var(--text-main);
    opacity: 0.6;
}

/* ==========================================================================
   6. MODAL NSFW (+18)
   ========================================================================== */
.modal-nsfw {
    display: none;
    position: fixed;
    z-index: 10000;
    left: 0; top: 0; width: 100%; height: 100%;
    background: rgba(0,0,0,0.95);
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(5px);
}

.modal-content {
    background: var(--card-bg);
    padding: 35px;
    border-radius: var(--radius);
    max-width: 400px;
    width: 90%;
    text-align: center;
    box-shadow: 0 20px 50px rgba(0,0,0,0.5);
}

/* ==========================================================================
   7. SERVICES SOCIAUX (Couleurs Officielles)
   ========================================================================== */
/* On force le texte en blanc pour les boutons de réseaux sociaux */
.service-youtube, .service-instagram, .service-onlyfans, .service-tiktok, .service-facebook, .service-messenger, .service-twitch {
    color: #ffffff !important;
}

.service-youtube { background-color: #ff0000 !important; }
.service-instagram { background: linear-gradient(45deg, #f09433, #e6683c, #dc2743, #cc2366, #bc1888) !important; }
.service-onlyfans { background-color: #008af3 !important; }
.service-tiktok { background-color: #000000 !important; border: 1px solid rgba(255,255,255,0.2) !important; }
.service-facebook { background-color: #1877f2 !important; }
.service-twitch { background-color: #9146ff !important; }
.service-snapchat { background-color: #fffc00 !important; color: #000 !important; }

/* ==========================================================================
   8. ALERTES & ETATS
   ========================================================================== */
.alert {
    padding: 15px;
    border-radius: var(--radius);
    margin-bottom: 20px;
    font-weight: 600;
    text-align: center;
}
.alert-success { background: var(--success-color); color: white; }
.alert-error { background: var(--error-color); color: white; }