@import url('https://fonts.googleapis.com/css2?family=Orbitron:wght@400;700&display=swap');

/* ===========================================================
   ?? OPTIMISATIONS GLOBALES (anti-bavures & performance)
   =========================================================== */
* {
    box-sizing: border-box;
    -webkit-font-smoothing: subpixel-antialiased; /* meilleur rendu clair */
    -moz-osx-font-smoothing: grayscale;
    text-rendering: geometricPrecision; /* précision sur les accents */
}

html, body {
    height: 100%;
    margin: 0;
    padding: 0;
    scroll-behavior: smooth;
    backface-visibility: hidden;
    transform: none !important; /* supprime translateZ(0) pour éviter les artefacts */
}

/* Glow doux sur tous les textes */
h1, h2, h3, p, a, span {
    filter: none !important;
    text-shadow: 0 0 5px rgba(0, 255, 255, 0.3), 0 0 10px rgba(0, 191, 255, 0.2);
}

/* ===========================================================
   ?? FOND ANIMÉ
   =========================================================== */
body {
    font-family: 'Orbitron', sans-serif;
    color: #fff;
    overflow-x: hidden;
    text-align: center;
    background: linear-gradient(135deg, #031030, #01081c);
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    position: relative;
}

/* Conteneur des vagues */
.wave-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    z-index: -3;
}

/* Chaque vague */
.wave {
    position: absolute;
    bottom: -100px;
    width: 200%;
    height: 350px;
    background: rgba(0, 191, 255, 0.25);
    border-radius: 43%;
    animation: waveMove 15s linear infinite;
    filter: blur(80px);
}

.wave:nth-child(2) {
    animation-duration: 22s;
    background: rgba(0, 191, 255, 0.18);
}

.wave:nth-child(3) {
    animation-duration: 30s;
    background: rgba(0, 191, 255, 0.1);
}

@keyframes waveMove {
    0% { transform: translateX(0) rotate(0deg); }
    50% { transform: translateX(-25%) rotate(180deg); }
    100% { transform: translateX(-50%) rotate(360deg); }
}

/* Particules */
#particles {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -2;
    pointer-events: none;
}

/* ===========================================================
   ?? HEADER / NAVBAR
   =========================================================== */
header {
    background: rgba(0, 0, 0, 0.4);
    padding: 15px 0;
    box-shadow: 0 0 20px #00bfff;
    position: sticky;
    top: 0;
    z-index: 100;
    backdrop-filter: blur(10px);
}

nav ul {
    list-style: none;
    display: flex;
    justify-content: center;
    gap: 40px;
    padding: 0;
    margin: 0;
}

nav a {
    color: #00bfff;
    text-decoration: none;
    font-weight: bold;
    font-size: 1.1em;
    transition: 0.3s;
}

nav a:hover {
    color: #fff;
    text-shadow: 0 0 15px #00bfff;
}

/* ===========================================================
   ?? PAGE ACCUEIL
   =========================================================== */
.hero {
    margin-top: 80px;
    animation: fadeIn 1.5s ease;
    position: relative;
    z-index: 10;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-20px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Logo animé */
.logo {
    width: 220px;
    margin-bottom: 20px;
    position: relative;
    animation: logoGlow 3s ease-in-out infinite;
}

@keyframes logoGlow {
    0% {
        filter: drop-shadow(0 0 10px #00bfff) drop-shadow(0 0 20px #00bfff);
        transform: scale(1);
    }
    50% {
        filter: drop-shadow(0 0 25px #00ffff) drop-shadow(0 0 50px #00bfff);
        transform: scale(1.03);
    }
    100% {
        filter: drop-shadow(0 0 10px #00bfff) drop-shadow(0 0 20px #00bfff);
        transform: scale(1);
    }
}

.highlight {
    color: #00bfff;
    text-shadow: 0 0 20px #00bfff;
}

/* ===========================================================
   ?? BOUTONS GÉNÉRAUX
   =========================================================== */
.links {
    margin-top: 30px;
}

.join-discord {
    margin-top: 40px;
    margin-bottom: 20px;
}

.btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    margin: 10px;
    padding: 12px 30px;
    background: rgba(0, 191, 255, 0.2);
    border: 2px solid #00bfff;
    border-radius: 50px;
    color: #fff;
    font-weight: bold;
    text-decoration: none;
    font-size: 1.05em;
    transition: 0.3s;
}

.btn img {
    width: 28px;
    height: 28px;
    object-fit: contain;
    filter: drop-shadow(0 0 6px #00bfff);
    transition: 0.3s;
    background: transparent;
}

.btn:hover {
    background: #00bfff;
    color: #000;
    box-shadow: 0 0 25px #00bfff;
    transform: scale(1.05);
}

.btn:hover img {
    transform: scale(1.1);
    filter: drop-shadow(0 0 10px #00bfff);
}

/* Bouton Discord principal */
.big-discord {
    font-size: 1.3em;
    padding: 18px 50px;
    border: 3px solid #5865F2;
    background: rgba(88, 101, 242, 0.25);
    border-radius: 60px;
    animation: pulseDiscord 2s infinite;
    box-shadow: 0 0 30px rgba(88, 101, 242, 0.5);
}

.big-discord:hover {
    background: #5865F2;
    color: #fff;
    box-shadow: 0 0 40px #5865F2, 0 0 80px #5865F2;
    transform: scale(1.08);
}

@keyframes pulseDiscord {
    0% { box-shadow: 0 0 15px rgba(88, 101, 242, 0.5); }
    50% { box-shadow: 0 0 40px rgba(88, 101, 242, 0.9); }
    100% { box-shadow: 0 0 15px rgba(88, 101, 242, 0.5); }
}

/* ===========================================================
   ?? PAGES RÈGLEMENT
   =========================================================== */
.main-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.rules {
    flex-grow: 1;
    margin: 80px auto 60px auto;
    padding: 30px;
    max-width: 1200px;
    width: 90%;
    text-align: center;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 15px;
    box-shadow: 0 0 25px #00bfff;
    backdrop-filter: blur(6px);
    line-height: 1.6;
    font-size: 1.05em;
    position: relative;
    z-index: 10;
    animation: rulesGlow 3s ease-in-out infinite;
}

@keyframes rulesGlow {
    0% { box-shadow: 0 0 20px #00bfff; }
    50% { box-shadow: 0 0 40px #00ffff; }
    100% { box-shadow: 0 0 20px #00bfff; }
}

/* ===========================================================
   ??? GALERIE PHOTO
   =========================================================== */
.gallery {
    padding: 80px 20px;
    text-align: center;
    color: #fff;
}

.gallery-container {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
    justify-items: center;
    margin-top: 40px;
}

.photo-card {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 0 25px #00bfff55;
    transition: 0.3s;
    width: 380px;
    height: 260px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    position: relative;
}

.photo-card:hover {
    transform: scale(1.05);
    box-shadow: 0 0 40px #00bfff99;
}

.photo-card img {
    width: 100%;
    height: 210px;
    object-fit: cover;
    border-bottom: 2px solid #00bfff44;
}

.photo-info {
    background: rgba(0, 191, 255, 0.1);
    padding: 10px 0;
    font-size: 0.9em;
    color: #a9cfff;
    text-align: center;
}

.photo-info .auteur {
    color: #00ffff;
    font-weight: bold;
}

/* Zone upload */
.upload {
    padding: 60px 20px;
    text-align: center;
    color: white;
}

.upload form {
    display: flex;
    flex-direction: column;
    gap: 15px;
    max-width: 400px;
    margin: 0 auto;
}

.upload input,
.upload button {
    padding: 12px;
    border-radius: 8px;
    border: none;
    font-size: 1em;
}

.upload button {
    background: #00bfff;
    color: #000;
    font-weight: bold;
    cursor: pointer;
    transition: 0.3s;
}

.upload button:hover {
    background: #00ffff;
    transform: scale(1.05);
}

.success { color: lime; margin-top: 15px; }
.error { color: red; margin-top: 15px; }

/* ===========================================================
   ? FOOTER
   =========================================================== */
footer {
    margin-top: auto;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.6), rgba(0, 191, 255, 0.05));
    padding: 20px 0;
    box-shadow: 0 -5px 15px #00bfff;
    font-size: 0.9em;
    color: #a9cfff;
    position: relative;
    z-index: 10;
}
