/* ========================================================= */
/* BASE DE LA PAGE (REVEAL & ANIMATIONS GLOBALES)            */
/* ========================================================= */
.hero-section { padding: 60px 20px; max-width: 1200px; margin: 0 auto; overflow: hidden; }
.text-center { text-align: center; margin-bottom: 60px; }

/* 1. ANIMATION D'ENTRÉE CINÉMATIQUE (Titre) */
.hero-text.reveal h1 {
    opacity: 0; transform: translateY(-50px) scale(0.9) rotateX(-20deg);
    transition: all 1s cubic-bezier(0.22, 1, 0.36, 1); transition-delay: 0.1s;
}
.hero-text.reveal.visible h1 { opacity: 1; transform: translateY(0) scale(1) rotateX(0); }

/* 2. ANIMATION D'ENTRÉE CINÉMATIQUE (Texte description) */
.hero-text.reveal p {
    opacity: 0; transform: translateY(30px);
    transition: all 1s cubic-bezier(0.22, 1, 0.36, 1); transition-delay: 0.3s;
}
.hero-text.reveal.visible p { opacity: 1; transform: translateY(0); }

.hero-text h1 { font-size: 3.5rem; color: var(--text-main); margin-bottom: 15px; font-weight: 800; letter-spacing: -1.5px; line-height: 1.1; perspective: 1000px; }

/* 3. TITRE "OR LIQUIDE" ANIMÉ */
.hero-text h1 span { 
    background: linear-gradient(90deg, #ff7e5f, #feb47b, #fff, #feb47b, #ff7e5f);
    background-size: 200% auto;
    -webkit-background-clip: text; 
    -webkit-text-fill-color: transparent; 
    animation: liquidGold 3s linear infinite;
}

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

.hero-text p { font-size: 1.15rem; color: var(--text-muted); max-width: 650px; margin: 0 auto; line-height: 1.7; font-weight: 400; }

/* PERSPECTIVE POUR LES EFFETS 3D DES CARTES */
.roles-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 30px; perspective: 2000px; }


/* ========================================================= */
/* DESIGN & EFFETS DES CARTES (DESKTOP/GLOBAL)               */
/* ========================================================= */
.role-card {
    display: flex; flex-direction: column; padding: 35px;
    text-decoration: none; color: var(--text-main);
    cursor: pointer; position: relative; overflow: hidden;
    
    /* Animation d'entrée des cartes (Staggered) */
    opacity: 0; transform: translateY(100px) rotateX(30deg) scale(0.8);
    transition: 
        transform 0.6s cubic-bezier(0.22, 1, 0.36, 1), 
        box-shadow 0.6s ease, 
        border-color 0.6s ease,
        opacity 0.6s ease;
    
    /* On force une bordure de base transparente pour l'animation */
    border: 1px solid transparent; 
    
    /* Empêche le surlignage moche sur mobile */
    -webkit-tap-highlight-color: transparent; 
}

/* Application de la visibilité par global.js */
.role-card.reveal.visible { opacity: 1; transform: translateY(0) rotateX(0) scale(1); }

/* BORDURES NÉON PULSANTES (Base) */
.role-card::before {
    content:''; position: absolute; inset: 0; border-radius: 20px; padding: 2px; /* Largeur de la bordure */
    background: linear-gradient(135deg, var(--card-color-1, #ccc), var(--card-color-2, #999));
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor; mask-composite: exclude;
    opacity: 0.5; transition: opacity 0.4s ease, filter 0.4s ease;
}

/* Définition des couleurs spécifiques pour les néons */
.role-card:nth-child(1) { --card-color-1: #00b09b; --card-color-2: #96c93d; } /* Vert : Support */
.role-card:nth-child(2) { --card-color-1: #1cb5e0; --card-color-2: #000851; } /* Bleu : Modérateur */
.role-card:nth-child(3) { --card-color-1: #8E2DE2; --card-color-2: #4A00E0; } /* Mauve : Super Modérateur */
.role-card:nth-child(4) { --card-color-1: #ff416c; --card-color-2: #ff4b2b; } /* Rouge : Administrateur */


/* Lueur interne (Glow) */
.card-glow {
    position: absolute; top: -50%; left: -50%; width: 200%; height: 200%;
    background: radial-gradient(circle, rgba(255,255,255,0.5) 0%, transparent 70%);
    opacity: 0; transition: opacity 0.5s ease; pointer-events: none;
}

/* EFFETS AU SURVOL (Desktop uniquement, écrasé sur mobile) */
@media (min-width: 993px) {
    .role-card:hover { transform: translateY(-15px) rotateX(5deg) rotateY(5deg); box-shadow: 0 20px 40px rgba(0,0,0,0.1); border-color: rgba(255,255,255,0.9); }
    .role-card:hover::before { opacity: 1; filter: drop-shadow(0 0 5px var(--card-color-1)); } /* Néon s'allume */
    .role-card:hover .card-glow { opacity: 1; }
    .role-card:hover .icon-wrapper { transform: scale(1.1) rotate(-5deg); }
    .role-card:hover .card-footer { letter-spacing: 1px; }
}

/* Icônes wrappers */
.icon-wrapper {
    width: 65px; height: 65px; border-radius: 18px; display: flex; align-items: center; justify-content: center;
    font-size: 26px; margin-bottom: 25px; color: white; transition: transform 0.4s ease;
    box-shadow: 0 10px 20px rgba(0,0,0,0.1);
}

.support-icon { background: linear-gradient(135deg, #00b09b, #96c93d); }
.mod-icon { background: linear-gradient(135deg, #1cb5e0, #000851); }
.smod-icon { background: linear-gradient(135deg, #8E2DE2, #4A00E0); }
.admin-icon { background: linear-gradient(135deg, #ff416c, #ff4b2b); }

.role-card h2 { font-size: 1.6rem; margin-bottom: 12px; font-weight: 700; color: var(--text-main); }
.role-card p { font-size: 0.95rem; color: var(--text-muted); flex-grow: 1; margin-bottom: 25px; line-height: 1.6; }
.card-footer { font-size: 0.9rem; font-weight: 600; color: var(--orange-primary); display: flex; justify-content: space-between; align-items: center; }


/* ========================================================= */
/* Cache la bulle sur desktop — elle sera affichée en mobile via media query */
#scroll-hint { display: none; }

/* ========================================================= */
/* MODE MAGNIFIQUE EXTRÊME : MOBILE (TOUCH)                  */
/* ========================================================= */
@media (max-width: 768px) {
    .hero-text h1 { font-size: 2.5rem; letter-spacing: -1px; }
    .hero-text p { font-size: 1.05rem; }
    .roles-grid { gap: 20px; padding: 10px; }
    .role-card { padding: 30px; border-radius: 25px; }

    /* 1. ANIMATION CONTINUE : Les bordures néon palpitent doucement */
    .role-card::before {
        opacity: 0.6;
        animation: mobileNeonPulse 3s ease-in-out infinite alternate;
    }
    
    /* 2. ANIMATION CONTINUE : L'icône flotte doucement */
    .icon-wrapper {
        animation: mobileFloatIcon 4s ease-in-out infinite;
    }
    
    /* Décalage des animations pour le naturel */
    .role-card:nth-child(2) .icon-wrapper, .role-card:nth-child(2)::before { animation-delay: -0.7s; }
    .role-card:nth-child(3) .icon-wrapper, .role-card:nth-child(3)::before { animation-delay: -1.4s; }
    .role-card:nth-child(4) .icon-wrapper, .role-card:nth-child(4)::before { animation-delay: -2.1s; }


    /* ===================================================== */
    /* 3. EFFET EXTRÊME AU TOUCHER (:active)                 */
    /* ===================================================== */
    .role-card:active {
        /* Effet 3D : S'enfonce et pivote légèrement */
        transform: scale(0.95) translateY(5px) rotateX(10deg) !important;
        
        /* Ombre devient une lueur colorée (Néon Glow) */
        box-shadow: 0 15px 50px rgba(var(--card-color-rgb, 255,126,95), 0.5) !important;
        
        /* La bordure néon devient hyper brillante */
        transition: all 0.1s ease !important; /* Réponse instantanée */
    }
    
    /* RGB pour les ombres portées au toucher */
    .role-card:nth-child(1):active { --card-color-rgb: 0, 176, 155; } /* Vert */
    .role-card:nth-child(2):active { --card-color-rgb: 28, 181, 224; } /* Bleu */
    .role-card:nth-child(3):active { --card-color-rgb: 142, 45, 226; } /* Mauve */
    .role-card:nth-child(4):active { --card-color-rgb: 255, 65, 108; } /* Rouge */

    /* ---- Bulle d'indice de scroll ---- */
    #scroll-hint {
        display: flex;
        position: fixed;
        bottom: 80px;
        right: 20px;
        align-items: center;
        gap: 8px;
        padding: 10px 20px;
        border-radius: 50px;
        background: rgba(255, 255, 255, 0.88);
        backdrop-filter: blur(16px);
        -webkit-backdrop-filter: blur(16px);
        border: 2px solid var(--hint-color, #1cb5e0);
        box-shadow: 0 6px 28px rgba(0, 0, 0, 0.14);
        font-size: 0.85rem;
        font-weight: 700;
        color: var(--hint-color, #1cb5e0);
        z-index: 500;
        pointer-events: none;
        white-space: nowrap;
        opacity: 0;
        transition: opacity 0.45s ease, transform 0.45s ease;
    }

    #scroll-hint.show {
        opacity: 1;
        animation: hintFloat 2.2s ease-in-out infinite;
    }

    #scroll-hint.hide {
        opacity: 0 !important;
        transform: translateY(18px) !important;
        animation: none !important;
    }

    #scroll-hint .hint-arrow {
        animation: hintArrow 1.2s ease-in-out infinite;
    }

    @keyframes hintArrow {
        0%, 100% { transform: translateY(0); }
        50%       { transform: translateY(5px); }
    }

    @keyframes hintFloat {
        0%, 100% { transform: translateY(0); }
        50%       { transform: translateY(-5px); }
    }

    .role-card:active::before {
        opacity: 1 !important;
        filter: drop-shadow(0 0 15px var(--card-color-1)) brightness(1.5) !important;
        animation: none !important; /* Arrête la pulsation lente */
    }

    /* Lueur interne explose au toucher */
    .role-card:active .card-glow {
        opacity: 1 !important;
        transform: scale(1.5) !important;
        transition: all 0.1s ease !important;
    }
    
    /* L'icône grossit */
    .role-card:active .icon-wrapper {
        transform: scale(1.1) rotate(-5deg) !important;
        transition: all 0.1s ease !important;
        animation: none !important;
    }


    /* KEYFRAMES MOBILE */
    @keyframes mobileFloatIcon {
        0%, 100% { transform: translateY(0) rotate(0); }
        50% { transform: translateY(-10px) rotate(3deg); }
    }

    @keyframes mobileNeonPulse {
        0% { opacity: 0.4; filter: drop-shadow(0 0 2px var(--card-color-1)); }
        100% { opacity: 0.8; filter: drop-shadow(0 0 8px var(--card-color-1)); }
    }
}