* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #0f0f23 0%, #1a1a2e 50%, #16213e 100%);
    color: #e2e8f0;
    min-height: 100vh;
    display: grid;
    grid-template-areas:
        "header header"
        "nav main"
        "footer footer";
    grid-template-rows: 80px 1fr 120px;
    grid-template-columns: 250px 1fr;
    overflow-x: hidden;
}

/* Header sombre moderne avec logo */
.header,
header {
    grid-area: header;
    background: rgba(15, 15, 35, 0.95);
    backdrop-filter: blur(15px);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 30px;
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.5);
    border-bottom: 2px solid transparent;
    position: relative;
}

header::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, #00ff88, #00cc66, #004d1a, #00ff88);
    background-size: 200% 100%;
    animation: gradientFlow 4s ease-in-out infinite;
}

@keyframes gradientFlow {

    0%,
    100% {
        background-position: 0% 50%;
    }

    50% {
        background-position: 100% 50%;
    }
}

/* Logo N2MF */
.logo-container {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.logo {
    background: linear-gradient(135deg, rgba(0, 255, 136, 0.2) 0%, rgba(0, 204, 102, 0.3) 70%, rgba(0, 255, 136, 0.4) 100%);
    border: 2px solid rgba(0, 255, 136, 0.4);
    border-radius: 12px;
    padding: 8px 16px;
    font-size: 1.5rem;
    font-weight: 700;
    color: #00ff88;
    letter-spacing: 2px;
    text-shadow: 0 2px 10px rgba(0, 255, 136, 0.6);
    box-shadow:
        0 4px 15px rgba(0, 255, 136, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
    position: relative;
    overflow: hidden;
}

.logo::before {
    content: '';
    position: absolute;
    bottom: 0;
    right: 0;
    width: 30px;
    height: 30px;
    background: linear-gradient(45deg, transparent 50%, rgba(0, 255, 136, 0.1) 50%);
    border-radius: 50% 0 0 0;
}

.devise {
    font-size: 0.75rem;
    color: #cbd5e0;
    margin-top: 4px;
    font-style: italic;
    font-weight: 300;
    letter-spacing: 1px;
}

header h1 {
    font-size: 2rem;
    font-weight: 600;
    color: #f7fafc;
    letter-spacing: 1.5px;
    text-shadow: 0 2px 10px rgba(0, 255, 136, 0.4);
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
}

/* Login button */
.login-btn {
    background: linear-gradient(135deg, rgba(0, 255, 136, 0.2) 0%, rgba(0, 204, 102, 0.3) 100%);
    border: 2px solid rgba(0, 255, 136, 0.4);
    border-radius: 8px;
    padding: 8px 16px;
    font-size: 0.9rem;
    font-weight: 600;
    color: #00ff88;
    text-decoration: none;
    transition: all 0.3s ease;
    box-shadow: 0 2px 10px rgba(0, 255, 136, 0.2);
    cursor: pointer;
}

.login-btn:hover {
    background: linear-gradient(135deg, rgba(0, 255, 136, 0.3) 0%, rgba(0, 204, 102, 0.4) 100%);
    transform: translateY(-2px);
    box-shadow: 0 4px 20px rgba(0, 255, 136, 0.3);
}

/* Container - garde ta structure flexbox */
.container {
    display: contents;
    /* Permet au grid de fonctionner avec ta structure */
}

/* Navigation sombre élégante */
nav {
    grid-area: nav;
    background: rgba(26, 26, 46, 0.9);
    backdrop-filter: blur(15px);
    padding: 2rem 0;
    box-shadow: 4px 0 30px rgba(0, 0, 0, 0.3);
    border-right: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    flex-direction: column;
    gap: 15px;
    padding: 30px 15px;
}

nav a {
    color: #cbd5e0;
    text-decoration: none;
    padding: 15px 20px;
    border-radius: 12px;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    font-weight: 500;
    font-size: 1rem;
    overflow: hidden;
    border: 1px solid transparent;
}

nav a::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(0, 255, 136, 0.1), transparent);
    transition: left 0.6s ease;
}

nav a::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 3px;
    height: 0;
    background: linear-gradient(180deg, #00ff88, #00cc66);
    transition: height 0.4s ease;
    border-radius: 0 2px 2px 0;
}

nav a:hover {
    background: rgba(0, 255, 136, 0.1);
    color: #00ff88;
    transform: translateX(8px) scale(1.02);
    box-shadow: 0 8px 25px rgba(0, 255, 136, 0.2);
    border-color: rgba(0, 255, 136, 0.3);
}

nav a:hover::before {
    left: 100%;
}

nav a:hover::after {
    height: 100%;
}

/* Main content - fond blanc */
main {
    grid-area: main;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #ffffff;
    padding: 50px;
}

#affichage {
    background: rgba(26, 26, 46, 0.95);
    backdrop-filter: blur(20px);
    padding: 50px 40px;
    border-radius: 20px;
    box-shadow:
        0 20px 60px rgba(0, 0, 0, 0.4),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
    text-align: center;
    max-width: 600px;
    width: 100%;
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

#affichage::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #00ff88, #00cc66, #004d1a, #00ff88);
    background-size: 300% 100%;
    animation: shimmerDark 3s ease-in-out infinite;
}

@keyframes shimmerDark {
    0% {
        background-position: -300% 0;
    }

    100% {
        background-position: 300% 0;
    }
}

#affichage p {
    font-size: 2.2rem;
    font-weight: 300;
    color: #f7fafc;
    margin: 0;
    line-height: 1.4;
    text-shadow: 0 2px 10px rgba(0, 255, 136, 0.3);
}

#affichage:hover {
    transform: translateY(-5px);
    box-shadow:
        0 30px 80px rgba(0, 0, 0, 0.6),
        0 0 40px rgba(0, 255, 136, 0.15),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

/* Footer restructuré */
footer {
    grid-area: footer;
    background: rgba(15, 15, 35, 0.95);
    backdrop-filter: blur(15px);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    padding: 10px 20px 5px 20px;
    box-shadow: 0 -4px 30px rgba(0, 0, 0, 0.5);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-title {
    color: #00ff88;
    font-weight: 700;
    font-size: 1rem;
    margin-bottom: 8px;
    letter-spacing: 1px;
}

.team-info {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 15px;
    width: 100%;
    max-width: 800px;
    margin-bottom: 5px;
}

.member {
    text-align: center;
    padding: 6px;
    background: rgba(26, 26, 46, 0.6);
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.member-name {
    color: #f7fafc;
    font-weight: 600;
    font-size: 0.9rem;
    margin-bottom: 3px;
}

.member-matricule {
    color: #00ff88;
    font-size: 0.75rem;
    font-weight: 500;
    margin-bottom: 3px;
}

.member-role {
    color: #cbd5e0;
    font-size: 0.7rem;
    margin-bottom: 3px;
}

.member-facebook {
    color: #9ca3af;
    font-size: 0.65rem;
}

.copyright {
    color: #9ca3af;
    font-size: 0.8rem;
    font-weight: 400;
}

/* Animations d'entrée conservées */
header {
    animation: slideInDown 0.8s ease-out;
}

nav {
    animation: slideInLeft 0.8s ease-out 0.2s both;
}

main {
    animation: fadeInScale 1s ease-out 0.4s both;
}

footer {
    animation: slideInUp 0.8s ease-out 0.6s both;
}

@keyframes slideInDown {
    from {
        transform: translateY(-100%);
        opacity: 0;
    }

    to {
        transform: translateY(0);
        opacity: 1;
    }
}

@keyframes slideInLeft {
    from {
        transform: translateX(-100%);
        opacity: 0;
    }

    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes slideInUp {
    from {
        transform: translateY(100%);
        opacity: 0;
    }

    to {
        transform: translateY(0);
        opacity: 1;
    }
}

@keyframes fadeInScale {
    from {
        opacity: 0;
        transform: scale(0.9);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* Responsive design pour mobile */
@media (max-width: 768px) {
    body {
        grid-template-areas:
            "header"
            "nav"
            "main"
            "footer";
        grid-template-columns: 1fr;
        grid-template-rows: 80px auto 1fr 140px;
    }

    header {
        flex-direction: row;
        justify-content: space-between;
        padding: 10px 20px;
        gap: 0;
    }

    .logo {
        font-size: 1.2rem;
        padding: 6px 12px;
    }

    .devise {
        font-size: 0.65rem;
    }

    header h1 {
        font-size: 1.5rem;
        position: static;
        transform: none;
    }

    .login-btn {
        font-size: 0.8rem;
        padding: 6px 12px;
    }

    nav {
        flex-direction: row;
        overflow-x: auto;
        padding: 15px;
        gap: 10px;
    }

    nav a {
        flex-shrink: 0;
        min-width: 100px;
        text-align: center;
        transform: none;
    }

    nav a:hover {
        transform: scale(1.05);
    }

    main {
        padding: 30px 20px;
    }

    #affichage {
        padding: 30px 25px;
    }

    #affichage p {
        font-size: 1.8rem;
    }

    .team-info {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }

    .member {
        padding: 6px;
    }

    .member-name {
        font-size: 0.8rem;
    }

    .member-matricule {
        font-size: 0.7rem;
    }

    .member-role {
        font-size: 0.65rem;
    }

    .member-facebook {
        font-size: 0.6rem;
    }
}

/* Effets de particules subtiles - vert tech */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image:
        radial-gradient(2px 2px at 20px 30px, rgba(0, 255, 136, 0.2), transparent),
        radial-gradient(2px 2px at 40px 70px, rgba(0, 204, 102, 0.2), transparent),
        radial-gradient(1px 1px at 90px 40px, rgba(0, 77, 26, 0.3), transparent);
    background-repeat: repeat;
    background-size: 100px 100px;
    animation: sparkle 10s ease-in-out infinite;
    pointer-events: none;
    z-index: -1;
}

@keyframes sparkle {

    0%,
    100% {
        opacity: 0.3;
    }

    50% {
        opacity: 0.1;
    }
}