body {
    background: linear-gradient(135deg,#0d1b2a,#1b263b);
    font-family: "Nunito", sans-serif;
    color: #fff;
}

.main{
    display: flex;
    flex-direction: column;
    gap: 80px;
    padding: 30px;
    align-items: center;
}

h1{
    text-align: center;
    text-shadow: 2px 2px 5px rgba(0,0,0,0.5);
    font-size: 2.4em;
}


.part {
    width: 90%;
    max-width: 1000px;
    background: rgba(255,255,255,0.08);
    padding: 20px;
    border-radius: 18px;
    border: 2px solid #203047;
    box-shadow: 0 4px 15px rgba(0,0,0,0.4);
    transition: 0.2s;
}

.conteneur {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 40px;
}


.image-conteneur {
    position: relative;
    width: 180px;
    height: 150px;
    background: #243b55;
    border-radius: 14px;
    padding: 10px;
    transition: 0.25s;
    box-shadow: 0 4px 10px rgba(0,0,0,0.3);
    border: 2px solid transparent;
}

.image-conteneur img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    filter: brightness(0.9);
    transition: transform 0.2s ease, filter 0.3s;
}

.image-conteneur:hover {
    cursor: pointer;
    transform: translateY(-5px);
    border-color: #3b82f6;
    box-shadow: 0 8px 20px rgba(0,0,0,0.5);
}

.image-conteneur[data-title]:hover::after {
    content: attr(data-title);
    position: absolute;
    top: 101%;
    left: 50%;
    transform: translateX(-50%);
    background: #0009;
    color: #fff;
    padding: 8px 12px;
    border-radius: 8px;
    font-size: 14px;
    white-space: nowrap;
    border: 1px solid #3b82f6;
    animation: fadeIn 0.3s ease;
    pointer-events: none;
    z-index: 200;
}


.selected {
    border: 3px solid #3b82f6;
    box-shadow: 0 0 18px #3b82f6;
    transform: scale(1.05);
}


#impact {
    background: #16213e;
    border: 2px solid #0f3460;
    width: 90%;
    max-width: 500px;
    padding: 25px;
    border-radius: 15px;
    text-align: justify;
    font-size: 1.3em;
    box-shadow: 0px 4px 20px rgba(0,0,0,0.5);
    margin-bottom: 40px;
    transition: 0.3s ease;
}

#impact.updated {
    animation: pulse 0.5s;
}

.popup {
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: rgba(0,0,0,0.65);
    backdrop-filter: blur(5px);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 3;
}

.popup-conteneur {
    background: #1b263b;
    padding: 25px 40px;
    border-radius: 15px;
    border: 2px solid #00eaff;
    text-align: center;
    width: 90%;
    max-width: 450px;
    box-shadow: 0 0 25px #00eaff;
    animation: scaleIn 0.4s ease;
}

.popup-conteneur button {
    margin-top: 15px;
    padding: 10px 20px;
    background: #00eaff;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    font-size: 1.1em;
    transition: 0.3s;
}

.popup-conteneur button:hover {
    background: #0094c9;
    transform: scale(1.08);
}

#accueil {
    padding: 12px 30px;
    background: #3b82f6;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 1.1em;
    cursor: pointer;
    font-weight: bold;
    text-transform: uppercase;
    transition: 0.3s ease, box-shadow 0.3s ease, transform 0.3s ease;
}

#accueil:hover {
    background: #3b82f6;
    color: #0d1b2a;
    transform: translateY(-5px) scale(1.05);
}


@keyframes fadeIn {
    from { opacity: 0; transform: translate(-50%, -10px); }
    to { opacity: 1; transform: translate(-50%, 0px); }
}

@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

@keyframes scaleIn {
    from { transform: scale(0.6); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}
