/* ============================================
   SLATECRAFT - THÈME SPATIAL
   Design cosmique immersif pour serveur Minecraft
   ============================================ */

/* Variables de couleurs cosmiques */
:root {
    /* Palette spatiale principale */
    --space-void: #0a0e27;
    --space-deep: #151b3d;
    --space-nebula-purple: #8b5cf6;
    --space-nebula-blue: #3b82f6;
    --space-nebula-cyan: #06b6d4;
    --space-nebula-pink: #ec4899;
    --space-star-white: #f8fafc;
    --space-star-glow: #60a5fa;
    
    /* Couleurs fonctionnelles */
    --primary-glow: #3b82f6;
    --secondary-glow: #8b5cf6;
    --accent-cyan: #06b6d4;
    --text-primary: #f1f5f9;
    --text-secondary: #cbd5e1;
    --text-dim: #94a3b8;
}

/* Reset et base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* Fond spatial avec étoiles */
body {
    background: linear-gradient(135deg, var(--space-void) 0%, var(--space-deep) 100%);
    color: var(--text-primary);
    font-family: 'Orbitron', 'Rajdhani', 'Exo 2', sans-serif;
    position: relative;
    overflow-x: hidden;
    min-height: 100vh;
}

/* Couche d'étoiles statiques (fond) */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: 
        radial-gradient(2px 2px at 20% 30%, white, transparent),
        radial-gradient(2px 2px at 60% 70%, white, transparent),
        radial-gradient(1px 1px at 50% 50%, white, transparent),
        radial-gradient(1px 1px at 80% 10%, white, transparent),
        radial-gradient(2px 2px at 90% 60%, white, transparent),
        radial-gradient(1px 1px at 33% 80%, white, transparent),
        radial-gradient(1px 1px at 15% 55%, white, transparent);
    background-size: 200% 200%, 250% 250%, 300% 300%, 350% 350%, 400% 400%, 280% 280%, 320% 320%;
    background-position: 0% 0%, 50% 50%, 30% 70%, 60% 20%, 80% 80%, 10% 40%, 70% 90%;
    opacity: 0.6;
    z-index: -1;
    pointer-events: none;
}

/* Effet nébuleuse en arrière-plan */
body::after {
    content: '';
    position: fixed;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: 
        radial-gradient(ellipse at 20% 30%, rgba(139, 92, 246, 0.15) 0%, transparent 50%),
        radial-gradient(ellipse at 80% 70%, rgba(59, 130, 246, 0.12) 0%, transparent 50%),
        radial-gradient(ellipse at 50% 50%, rgba(6, 182, 212, 0.08) 0%, transparent 60%);
    z-index: -1;
    animation: nebula-drift 30s ease-in-out infinite;
    pointer-events: none;
}

@keyframes nebula-drift {
    0%, 100% { transform: translate(0, 0) rotate(0deg); }
    33% { transform: translate(3%, 2%) rotate(2deg); }
    66% { transform: translate(-2%, 3%) rotate(-1deg); }
}

/* Navigation principale */
.navbar,
nav {
    background: rgba(10, 14, 39, 0.8);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(59, 130, 246, 0.3);
    box-shadow: 0 4px 30px rgba(59, 130, 246, 0.1);
    position: relative;
}

.navbar::before {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, 
        transparent 0%, 
        var(--space-nebula-cyan) 20%, 
        var(--space-nebula-blue) 50%, 
        var(--space-nebula-purple) 80%, 
        transparent 100%);
    animation: scan-line 3s linear infinite;
}

@keyframes scan-line {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

/* Logo avec effet lumineux */
.navbar-brand img,
.logo {
    filter: drop-shadow(0 0 10px rgba(59, 130, 246, 0.5));
    transition: all 0.4s ease;
}

.navbar-brand:hover img,
.logo:hover {
    filter: drop-shadow(0 0 20px rgba(59, 130, 246, 0.8)) drop-shadow(0 0 30px rgba(139, 92, 246, 0.4));
    transform: scale(1.05);
}

/* Liens de navigation */
.nav-link,
.navbar a,
nav a {
    color: var(--text-secondary) !important;
    font-weight: 600;
    letter-spacing: 1px;
    text-transform: uppercase;
    font-size: 0.9rem;
    position: relative;
    padding: 0.5rem 1rem !important;
    transition: all 0.3s ease;
}

.nav-link::after,
.navbar a::after,
nav a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--space-nebula-cyan), var(--space-nebula-purple));
    transform: translateX(-50%);
    transition: width 0.3s ease;
}

.nav-link:hover,
.navbar a:hover,
nav a:hover {
    color: var(--text-primary) !important;
    text-shadow: 0 0 10px rgba(59, 130, 246, 0.5);
}

.nav-link:hover::after,
.navbar a:hover::after,
nav a:hover::after {
    width: 80%;
}

/* Boutons principaux */
.btn,
button,
.button {
    background: linear-gradient(135deg, var(--space-nebula-blue), var(--space-nebula-purple));
    color: white;
    border: none;
    padding: 0.75rem 2rem;
    font-weight: 700;
    letter-spacing: 1px;
    text-transform: uppercase;
    border-radius: 8px;
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(59, 130, 246, 0.3);
}

.btn::before,
button::before,
.button::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    transition: left 0.5s ease;
}

.btn:hover,
button:hover,
.button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 25px rgba(59, 130, 246, 0.5), 0 0 40px rgba(139, 92, 246, 0.3);
}

.btn:hover::before,
button:hover::before,
.button:hover::before {
    left: 100%;
}

/* Bouton de connexion/inscription avec effet spécial */
.btn-primary {
    background: linear-gradient(135deg, var(--space-nebula-cyan), var(--space-nebula-blue));
    box-shadow: 0 0 20px rgba(6, 182, 212, 0.4);
}

.btn-primary:hover {
    box-shadow: 0 0 30px rgba(6, 182, 212, 0.6), 0 0 50px rgba(59, 130, 246, 0.3);
}

/* Section héro */
.hero,
.jumbotron,
.header-section {
    background: transparent;
    padding: 5rem 2rem;
    position: relative;
    text-align: center;
}

.hero h1,
.jumbotron h1,
h1 {
    font-size: 3.5rem;
    font-weight: 900;
    background: linear-gradient(135deg, var(--space-star-white), var(--space-nebula-cyan), var(--space-nebula-purple));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-transform: uppercase;
    letter-spacing: 3px;
    margin-bottom: 1.5rem;
    animation: title-glow 3s ease-in-out infinite alternate;
}

@keyframes title-glow {
    0% { filter: drop-shadow(0 0 10px rgba(59, 130, 246, 0.3)); }
    100% { filter: drop-shadow(0 0 25px rgba(139, 92, 246, 0.6)); }
}

.hero p,
.jumbotron p {
    font-size: 1.2rem;
    color: var(--text-secondary);
    max-width: 700px;
    margin: 0 auto 2rem;
    line-height: 1.8;
}

/* Adresse IP du serveur */
.server-ip,
.ip-address {
    background: rgba(15, 23, 42, 0.6);
    border: 2px solid var(--space-nebula-cyan);
    padding: 1rem 2rem;
    border-radius: 12px;
    font-family: 'Courier New', monospace;
    font-size: 1.5rem;
    color: var(--space-nebula-cyan);
    display: inline-block;
    margin: 2rem auto;
    box-shadow: 0 0 30px rgba(6, 182, 212, 0.3), inset 0 0 20px rgba(6, 182, 212, 0.1);
    animation: ip-pulse 2s ease-in-out infinite;
}

@keyframes ip-pulse {
    0%, 100% { box-shadow: 0 0 30px rgba(6, 182, 212, 0.3), inset 0 0 20px rgba(6, 182, 212, 0.1); }
    50% { box-shadow: 0 0 50px rgba(6, 182, 212, 0.5), inset 0 0 30px rgba(6, 182, 212, 0.2); }
}

/* Cartes et sections de contenu */
/* CORRECTION : Texte coupé dans les cartes */

.card,
.section,
.content-box {
    background: rgba(15, 23, 42, 0.5);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(59, 130, 246, 0.2);
    border-radius: 16px;
    padding: 2rem;
    margin: 1.5rem 0;
    box-shadow: 0 8px 32px rgba(10, 14, 39, 0.5);
    transition: all 0.4s ease;
    position: relative;
    overflow: visible !important;  /* CHANGÉ : permet au texte de ne pas être coupé */
}

.card::before,
.section::before,
.content-box::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--space-nebula-cyan), var(--space-nebula-purple), transparent);
    opacity: 0;
    transition: opacity 0.4s ease;
    border-radius: 16px 16px 0 0;  /* AJOUTÉ : arrondir les coins pour rester dans la carte */
    z-index: 1;  /* AJOUTÉ : s'assurer que la ligne reste au-dessus */
}

.card:hover,
.section:hover,
.content-box:hover {
    transform: translateY(-5px);
    border-color: rgba(59, 130, 246, 0.5);
    box-shadow: 0 12px 48px rgba(59, 130, 246, 0.3);
    overflow: visible !important;  /* AJOUTÉ : même au hover */
}

.card:hover::before,
.section:hover::before,
.content-box:hover::before {
    opacity: 1;
}

/* S'assurer que le texte ne wrap pas bizarrement */
.card h1,
.card h2,
.card h3,
.card h4,
.card h5,
.card h6 {
    word-wrap: break-word;
    overflow-wrap: break-word;
    hyphens: auto;
}

/* Titres de sections */
h2, h3, h4, h5 {
    color: var(--text-primary);
    font-weight: 800;
    letter-spacing: 2px;
    text-transform: uppercase;
    margin-bottom: 1rem;
    position: relative;
    display: inline-block;
}

h2::after {
    content: '';
    position: absolute;
    bottom: -8px;
    left: 0;
    width: 60px;
    height: 3px;
    background: linear-gradient(90deg, var(--space-nebula-cyan), var(--space-nebula-purple));
    border-radius: 3px;
}

/* Texte */
p {
    color: var(--text-secondary);
    line-height: 1.8;
    margin-bottom: 1rem;
}

/* Footer */
footer {
    /* On passe l'opacité de 0.9 à 0.2 pour voir les étoiles à travers */
    background: rgba(10, 14, 39, 0.2) !important; 
    
    /* On ajoute un effet de verre flouté pour que le texte reste lisible par-dessus les étoiles */
    backdrop-filter: blur(10px); 
    -webkit-backdrop-filter: blur(10px); /* Pour Safari */
    
    border-top: 1px solid rgba(59, 130, 246, 0.3);
    padding: 3rem 2rem 2rem;
    margin-top: 5rem;
    position: relative;
    z-index: 1; /* S'assure que le footer est bien au-dessus du canvas des étoiles */
}

footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--space-nebula-cyan), var(--space-nebula-purple), transparent);
}

footer h5 {
    color: var(--space-nebula-cyan);
    font-size: 1rem;
    margin-bottom: 1rem;
}

footer a {
    color: var(--text-secondary);
    text-decoration: none;
    transition: all 0.3s ease;
    display: block;
    margin: 0.5rem 0;
}

footer a:hover {
    color: var(--space-nebula-cyan);
    text-shadow: 0 0 10px rgba(6, 182, 212, 0.5);
    transform: translateX(5px);
}

/* Tableaux */
table {
    width: 100%;
    border-collapse: collapse;
    margin: 2rem 0;
}

thead {
    background: rgba(59, 130, 246, 0.1);
    border-bottom: 2px solid var(--space-nebula-blue);
}

th {
    padding: 1rem;
    color: var(--text-primary);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
}

td {
    padding: 1rem;
    color: var(--text-secondary);
    border-bottom: 1px solid rgba(59, 130, 246, 0.1);
}

tr:hover {
    background: rgba(59, 130, 246, 0.05);
}

/* Formulaires */
input,
textarea,
select {
    background: rgba(15, 23, 42, 0.6);
    border: 1px solid rgba(59, 130, 246, 0.3);
    color: var(--text-primary);
    padding: 0.75rem 1rem;
    border-radius: 8px;
    width: 100%;
    font-family: inherit;
    transition: all 0.3s ease;
}

input:focus,
textarea:focus,
select:focus {
    outline: none;
    border-color: var(--space-nebula-cyan);
    box-shadow: 0 0 20px rgba(6, 182, 212, 0.3);
}

/* Labels */
label {
    color: var(--text-primary);
    font-weight: 600;
    margin-bottom: 0.5rem;
    display: block;
    letter-spacing: 1px;
}

/* Liens */
a {
    color: var(--space-nebula-cyan);
    text-decoration: none;
    transition: all 0.3s ease;
}

a:hover {
    color: var(--space-nebula-blue);
    text-shadow: 0 0 10px rgba(59, 130, 246, 0.5);
}

/* Badges et tags */
.badge,
.tag {
    background: linear-gradient(135deg, var(--space-nebula-blue), var(--space-nebula-purple));
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 700;
    display: inline-block;
    margin: 0.25rem;
    box-shadow: 0 2px 10px rgba(59, 130, 246, 0.3);
}

/* Alertes */
.alert {
    padding: 1rem 1.5rem;
    border-radius: 12px;
    margin: 1rem 0;
    border-left: 4px solid;
}

.alert-info {
    background: rgba(59, 130, 246, 0.1);
    border-color: var(--space-nebula-blue);
    color: var(--text-primary);
}

.alert-success {
    background: rgba(6, 182, 212, 0.1);
    border-color: var(--space-nebula-cyan);
    color: var(--text-primary);
}

.alert-warning {
    background: rgba(139, 92, 246, 0.1);
    border-color: var(--space-nebula-purple);
    color: var(--text-primary);
}

/* Animations de chargement */
@keyframes pulse-glow {
    0%, 100% { opacity: 0.6; }
    50% { opacity: 1; }
}

.loading {
    animation: pulse-glow 2s ease-in-out infinite;
}

/* Scrollbar personnalisée */
::-webkit-scrollbar {
    width: 12px;
}

::-webkit-scrollbar-track {
    background: var(--space-void);
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, var(--space-nebula-blue), var(--space-nebula-purple));
    border-radius: 6px;
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, var(--space-nebula-cyan), var(--space-nebula-blue));
}

/* Responsive */
@media (max-width: 768px) {
    .hero h1,
    .jumbotron h1,
    h1 {
        font-size: 2rem;
    }
    
    .hero p,
    .jumbotron p {
        font-size: 1rem;
    }
    
    .server-ip,
    .ip-address {
        font-size: 1.2rem;
    }
}

/* Effet de particules pour éléments interactifs */
@keyframes float-particle {
    0%, 100% { transform: translateY(0) translateX(0); opacity: 0.3; }
    50% { transform: translateY(-20px) translateX(10px); opacity: 0.7; }
}

/* Animation d'apparition pour les éléments */
@keyframes fade-in-up {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in {
    animation: fade-in-up 0.8s ease-out forwards;
}
/* Forcer le bouton PLAY en bleu - plus fort que les autres règles */
#play-button,
a[href*="play.slatecraft.fr"],
a[href*="PLAY.SLATECRAFT.FR"],
button.play,
.btn-play,
.btn[href*="play."],
.play-btn,
.orange-button,                /* au cas où */
.btn[style*="background"][style*="f97316"],   /* si inline orange */
.btn-primary:not(.btn-secondary) {             /* souvent le cas */
    background: linear-gradient(135deg, #2563eb, #60a5fa) !important;
    border-color: #3b82f6 !important;
    color: white !important;
    box-shadow: 0 0 25px rgba(59, 130, 246, 0.5) !important;
}

#play-button:hover,
a[href*="play.slatecraft.fr"]:hover,
.btn-primary:hover {
    background: linear-gradient(135deg, #1d4ed8, #3b82f6) !important;
    box-shadow: 0 0 40px rgba(59, 130, 246, 0.7) !important;
    transform: translateY(-2px) !important;
}