@font-face {
    font-family: "LEDCalculator";
    src: url("/medias/fonts/LEDCalculator.ttf") format("truetype");
}

:root{
    --neon: #00ff99;
    --accent: #00eaff;
    --bg: #021733;
    --panel: rgba(0,0,0,0.95);
}

/* ================== RESET & GLOBAL ================== */
* { box-sizing: border-box; }

body {
    font-family: "LEDCalculator", "Share Tech Mono", Arial, sans-serif;
    margin: 0;
    padding: 0;
    color: #fff;
    background-color: var(--bg);
    background-image:
        repeating-linear-gradient(0deg, rgba(0,255,255,0.06) 0, rgba(0,255,255,0.06) 1px, transparent 1px, transparent 25px),
        repeating-linear-gradient(90deg, rgba(0,255,255,0.06) 0, rgba(0,255,255,0.06) 1px, transparent 1px, transparent 25px);
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

main {
    flex: 1;
    padding: 12px; /* réduit padding global pour plus de largeur */
}

h1 {
    border-bottom: 1px solid var(--accent);
    padding-bottom: 6px;
    margin: 8px auto;
    width: 98%;
    text-shadow: 0 0 4px var(--accent);
    font-size: 2rem;
}

h2 {
    border-bottom: 1px solid var(--accent);
    padding-bottom: 6px;
    margin: 8px auto;
    width: 98%;
    text-shadow: 0 0 4px var(--accent);
    font-size: 1.3rem;
    position: relative;  /* pour s'assurer que le z-index fonctionne */
    z-index: 10;
}

/* ================== UTILS ================== */
a { color: var(--neon); }
button { font-family: inherit; }

/* ================== PANNEAU ================== */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 12px;
    margin-top: 12px;
    margin-bottom: 10px;
}

/* ================== LINKS RAPIDES ================== */
.icon-links {
    margin-top: 10px;
    margin-bottom: 20px;
    display: flex;          
    flex-wrap: nowrap;      
    gap: 12px;              
    justify-content: center; 
    align-items: center;    
}

.icon-links a {
    display: flex;          
    align-items: center;
    gap: 4px;               
    font-size: 1.2rem;      /* réduit la taille (avant 1.8rem) */
    color:  rgba(0, 255, 255, 0.8);;     
    text-decoration: none;  
    white-space: nowrap;    
}

.icon-links a span {
    display: inline-block;
}

.icon-links a:hover {
    color: var(--neon); /* passe à la couleur néon verte */
    text-shadow: 
        0 0 5px var(--neon),
        0 0 10px var(--neon),
        0 0 20px var(--neon),
        0 0 30px var(--accent); /* ajoute un effet cyan supplémentaire */
    transform: scale(1.1); /* léger agrandissement pour le dynamisme */
    transition: all 0.2s ease-in-out;
}


/* ================== GLITCH ================== */
@keyframes glitch {
    0%   { clip: rect(10px, 9999px, 85px, 0); transform: translate(0px, 0px); }
    20%  { clip: rect(15px, 9999px, 70px, 0); transform: translate(-1px, 1px); }
    40%  { clip: rect(5px, 9999px, 90px, 0); transform: translate(1px, -1px); }
    60%  { clip: rect(20px, 9999px, 60px, 0); transform: translate(-1px, 2px); }
    80%  { clip: rect(0px, 9999px, 80px, 0); transform: translate(1px, -2px); }
    100% { clip: rect(10px, 9999px, 85px, 0); transform: translate(0px, 0px); }
}

/* ================== RESPONSIVE MOBILE ================== */
@media (max-width: 768px) {
    main {
        padding: 8px;
    }

    h1 {
        font-size: 1.6rem;
        width: 96%;
    }

    h2 {
        font-size: 1.2rem;
        width: 96%;
    }

    .container-max, .category {
        width: 96%;
        max-width: 100%;
    }

    .carousel-item {
        min-width: 160px;
        margin: 0 4px;
    }

    .stats-grid {
        grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
        gap: 8px;
    }

    /* Liens rapides passent sur plusieurs lignes sur mobile */
    .icon-links {
        flex-wrap: wrap;       /* autorise le passage à la ligne */
        gap: 8px;
        justify-content: center;
    }

    .icon-links a {
        font-size: 1.2rem;     /* réduit légèrement la taille */
    }
}
