@font-face {
    font-family: 'SD Glitch 2';
    src: url('./fonts/SD-Glitch-2.ttf.ttf') format('truetype');
    font-weight: normal;
    font-style: normal;
}

/* ----------------------- BASE ----------------------- */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}
body {
    font-family: 'Arial', sans-serif;
    background: linear-gradient(135deg, #1a1a2e, #16213e);
    color: #ffffff;
    min-height: 100vh;
    overflow-x: hidden;
}

/* ----------------------- NAVBAR ----------------------- */
.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 2rem;
    position: fixed;
    width: 100%;
    z-index: 1000;
    transition: background-color 0.3s;
}
.navbar.scrolled {
    background-color: rgba(23, 23, 38, 0.9);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
}
.logo img {
    height: 6rem;
    width: auto;
    border-radius: 50%;
    transition: transform 0.3s;
}
.logo img:hover {
    transform: scale(1.1);
}
.nav-links {
    display: flex;
    gap: 1.5rem;
    list-style: none;
}
.nav-links li a {
    text-decoration: none;
    color: white;
    padding: 1rem 2rem;
    border-radius: 25px;
    transition: color 0.3s, background-color 0.3s;
}
.nav-links li a:hover {
    color: #ffff00;
    background-color: rgba(217, 217, 217, 0.1);
}
.login .login-btn {
    text-decoration: none;
    color: white;
    padding: 1rem 2.5rem;
    border-radius: 25px;
    transition: background-color 0.3s;
}
.login .login-btn:hover {
    background-color: #555764;
}
.menu-toggle {
    display: none;
    flex-direction: column;
    cursor: pointer;
}
.menu-toggle .bar {
    height: 3px;
    width: 25px;
    background-color: white;
    margin: 4px 0;
    transition: 0.3s;
}
.menu-toggle.active .bar:nth-child(1) {
    transform: rotate(-45deg) translate(-5px, 6px);
}
.menu-toggle.active .bar:nth-child(2) {
    opacity: 0;
}
.menu-toggle.active .bar:nth-child(3) {
    transform: rotate(45deg) translate(-5px, -6px);
}
.nav-links.active {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background-color: rgba(23, 23, 38, 0.95);
    padding: 1rem 0;
}

/* ----------------------- HERO ----------------------- */
.hero {
    text-align: center;
    padding: 12rem 2rem 8rem;
    position: relative;
    overflow: hidden;
}
.wave-container {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 150px;
    z-index: 1;
}
.wave {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 2000px;
    height: 100px;
    background: url('data:image/svg+xml,%3Csvg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1440 320"%3E%3Cpath fill="%23ffff00" fill-opacity="0.2" d="M0,128L48,138.7C96,149,192,171,288,186.7C384,203,480,213,576,202.7C672,192,768,160,864,149.3C960,139,1056,149,1152,149.3C1248,149,1344,139,1392,133.3L1440,128V320H1392C1344,320,1248,320,1152,320C1056,320,960,320,864,320C768,320,672,320,576,320C480,320,384,320,288,320C192,320,96,320,48,320H0Z"%3E%3C/path%3E%3C/svg%3E');
    animation: wave 7s infinite linear;
}
.wave:nth-child(2) {
    animation: wave 7s infinite -2s linear;
    opacity: 0.5;
}
.wave:nth-child(3) {
    animation: wave 7s infinite -4s linear;
    opacity: 0.3;
}
@keyframes wave {
    0% { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}
.glitch-text {
    font-family: 'SD Glitch 2', 'Impact', sans-serif;
    font-size: 9rem;
    color: #fff;
    text-shadow: 0 0 10px #ffff00, 0 0 60px #ffff00;
    position: relative;
    z-index: 2;
}
.glitch-text::before {
    content: "CTF Flag'Malo 2025";
    position: absolute;
    top: 0;
    left: 0;
    color: #ff00ff;
    animation: glitch 2s linear infinite;
}
@keyframes glitch {
    2%, 64% { transform: translate(2px, 0) skew(0deg); }
    4%, 60% { transform: translate(-2px, 0) skew(0deg); }
    62% { transform: translate(0, 0) skew(5deg); }
}
.date {
    margin-top: 3rem;
}
.edition {
    font-size: 3rem;
    color: #fff;
    text-shadow: 0 0 10px #ffff00;
}
.cta-container {
    margin: 6rem 0;
    display: flex;
    gap: 2rem;
    justify-content: center;
}
.cta-button {
    text-decoration: none;
    color: white;
    background: linear-gradient(45deg, #ff00ff, #00ffff);
    padding: 1.5rem 3rem;
    border-radius: 40px;
    font-size: 2rem;
    transition: transform 0.3s, box-shadow 0.3s;
}
.cta-button:hover {
    transform: scale(1.1);
    box-shadow: 0 0 20px #00ffff;
}
.secondary {
    background: linear-gradient(45deg, #555764, #888);
}
.secondary:hover {
    box-shadow: 0 0 20px #888;
}
.countdown {
    font-size: 2rem;
    margin-top: 2rem;
    color: #ffff00;
    text-shadow: 0 0 10px #ffff00;
}

/* ----------------------- RESUME ----------------------- */
.section-resume {
    background: linear-gradient(135deg, #fdf500, #ffeb3b);
    padding: 5rem 2rem;
    color: #111;
    position: relative;
    clip-path: polygon(0 6vw, 100% 0, 100% calc(100% - 6vw), 0 100%);
}
.section-title {
    text-align: center;
    font-size: 4rem;
    margin-bottom: 3rem;
    position: relative;
}
.section-title::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 50px;
    height: 5px;
    background: #0677d2;
}
.resume-grid {
    max-width: 1800px;
    margin: 0 auto 4rem;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 4rem;
}
.resume-box {
    background: rgba(217, 217, 217, 0.4);
    padding: 2rem;
    border-radius: 1rem;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
    transition: transform 0.3s;
}
.resume-box:hover {
    transform: translateY(-10px);
}
.resume-box h3 {
    font-size: 2.2rem;
    margin-bottom: 1rem;
}
.resume-box p {
    font-size: 1.5rem;
}
.highlight-blue {
    color: #0677d2;
    font-weight: bold;
}
.format-box {
    background: rgba(217, 217, 217, 0.4);
    border-radius: 1rem;
    padding: 2rem;
    max-width: 1500px;
    margin: 0 auto;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
    font-size: 1.5rem;
}

/* ----------------------- LORE ----------------------- */
.section-lore {
    padding: 5rem 2rem;
    background: #16213e;
    position: relative;
    overflow: hidden;
}
.lore-partie p {
    max-width: 800px;
    margin: 1rem auto;
    font-size: 1.6rem;
    text-align: justify;
    position: relative;
    z-index: 2;
}
.lore-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: url('data:image/svg+xml,%3Csvg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1440 320"%3E%3Cpath fill="%231a1a2e" fill-opacity="0.5" d="M0,160L48,149.3C96,139,192,117,288,106.7C384,96,480,96,576,106.7C672,117,768,139,864,138.7C960,139,1056,117,1152,106.7C1248,96,1344,96,1392,96L1440,96V320H1392C1344,320,1248,320,1152,320C1056,320,960,320,864,320C768,320,672,320,576,320C480,320,384,320,288,320C192,320,96,320,48,320H0Z"%3E%3C/path%3E%3C/svg%3E');
    animation: waveLore 10s infinite linear;
    opacity: 0.3;
    z-index: 1;
}
@keyframes waveLore {
    0% { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}

/* ----------------------- INFOS ----------------------- */
.section-infos {
    background: linear-gradient(135deg, #fdf500, #ffeb3b);
    padding: 5rem 2rem;
    clip-path: polygon(0 6vw, 100% 0, 100% calc(100% - 6vw), 0 100%);
}
.infos-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    max-width: 1200px;
    margin: 0 auto;
}
.info-box {
    background: rgba(217, 217, 217, 0.4);
    padding: 2rem;
    border-radius: 1rem;
    text-align: center;
    transition: transform 0.3s;
}
.info-box:hover {
    transform: scale(1.05);
}
.info-box h3 {
    font-size: 2rem;
    margin-bottom: 1rem;
}

/* ----------------------- INSCRIPTION ----------------------- */
.section-inscription {
    padding: 5rem 2rem;
    background: #1a1a2e;
    text-align: center;
}
.inscription-form {
    max-width: 600px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}
.inscription-form label {
    text-align: left;
    font-size: 1.2rem;
    color: #ddd;
}
.inscription-form input, .inscription-form select {
    padding: 1rem;
    border: none;
    border-radius: 8px;
    background-color: rgba(217, 217, 217, 0.1);
    color: white;
    transition: background-color 0.3s;
}
.inscription-form input:focus, .inscription-form select:focus {
    background-color: rgba(217, 217, 217, 0.2);
    outline: none;
}
.error {
    color: #ff4444;
    font-size: 0.9rem;
    display: block;
}
.success-message {
    background: #00ff00;
    color: #fff;
    padding: 1rem;
    border-radius: 8px;
    margin-top: 1rem;
}

/* ----------------------- FOOTER ----------------------- */
.site-footer {
    padding: 4rem 2rem 2rem;
    background: #16213e;
}
.footer-content {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: flex-start;
    gap: 2rem;
    max-width: 1200px;
    margin: 0 auto;
}
.footer-logo img {
    width: 200px;
}
.footer-center {
    text-align: center;
    flex: 1;
}
.footer-title {
    font-size: 4rem;
    color: #fff;
    text-shadow: 0 0 10px #ffff00;
}
.footer-icons a {
    margin: 0 0.5rem;
    color: white;
    font-size: 1.5rem;
    transition: transform 0.3s;
}
.footer-icons a:hover {
    transform: scale(1.3);
}
.footer-contact {
    text-align: right;
    line-height: 1.5;
    font-size: 1.2rem;
}
.footer-line {
    margin: 2rem auto;
    border: none;
    border-top: 3px solid rgba(255, 255, 255, 0.2);
    max-width: 1200px;
}
.footer-small-line {
    margin: 1rem auto 2rem;
    border: none;
    border-top: 2px solid #555;
    max-width: 30%;
}
.footer-bottom {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 1rem;
}

/* ----------------------- ANIMATIONS & RESPONSIVE ----------------------- */
.hidden {
    opacity: 0;
    transform: translateY(50px);
    transition: opacity 1s ease, transform 1s ease;
}
.show {
    opacity: 1;
    transform: translateY(0);
}
.tempoHero:nth-child(2) { transition-delay: 0.4s; }
.tempoHero:nth-child(3) { transition-delay: 0.7s; }
.tempoHero:nth-child(4) { transition-delay: 1s; }
.lightbug {
    color: #fff;
    text-shadow: 0 0 10px #ffff00;
}
.lightbug.bug {
    color: #1a1a2e;
    text-shadow: none;
}

@media (max-width: 1200px) {
    .glitch-text { font-size: 6rem; }
    .edition { font-size: 2.5rem; }
    .section-title { font-size: 3rem; }
    .resume-box h3 { font-size: 2rem; }
    .resume-box p { font-size: 1.3rem; }
}

@media (max-width: 768px) {
    .navbar { flex-wrap: wrap; }
    .menu-toggle { display: flex; }
    .nav-links { display: none; }
    .hero { padding: 8rem 1rem 4rem; }
    .glitch-text { font-size: 4rem; }
    .edition { font-size: 2rem; }
    .cta-button { font-size: 1.5rem; padding: 1rem 2rem; }
    .resume-grid { grid-template-columns: 1fr; }
    .footer-content { flex-direction: column; text-align: center; }
    .footer-contact { text-align: center; }
}

@media (max-width: 480px) {
    .glitch-text { font-size: 3rem; }
    .section-title { font-size: 2.5rem; }
    .cta-container { flex-direction: column; }
}
