* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: "Courier New", monospace;
}

body {
    background: radial-gradient(circle, #081018, #000000);
    color: #00ff88;
    min-height: 100vh;
    overflow-x: hidden;
}

/* CONTENEUR */
.main-container {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    display: flex;
    align-items: center;
    gap: 40px;
    transition: all 1.2s ease;
}

/* animation après scan (desktop) */
.main-container.scanned {
    transform: translate(-55%, -50%);
}

/* ===================== PHOTO ===================== */
.face-box {
    position: relative;
    width: 280px;
    height: 380px;
    border: 2px solid #00ff88;
    overflow: hidden;
    box-shadow: 0 0 25px #00ff88;
    background: black;
    flex-shrink: 0;
}

#photo {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: none;
}

.scanner-overlay {
    position: absolute;
    width: 100%;
    height: 100%;
    background: black;
}

.scan-line {
    position: absolute;
    width: 100%;
    height: 4px;
    background: #00ff88;
    box-shadow: 0 0 20px #00ff88;
    animation: scan 2s linear infinite;
}

@keyframes scan {
    from { top: 0; }
    to { top: 100%; }
}

/* coins */
.corner {
    position: absolute;
    width: 30px;
    height: 30px;
    border: 3px solid #00ff88;
}

.top-left { top: 10px; left: 10px; border-right: none; border-bottom: none; }
.top-right { top: 10px; right: 10px; border-left: none; border-bottom: none; }
.bottom-left { bottom: 10px; left: 10px; border-right: none; border-top: none; }
.bottom-right { bottom: 10px; right: 10px; border-left: none; border-top: none; }

/* ===================== INFOS ===================== */
.info-box {
    width: 280px;
    opacity: 0;
    transition: all 1s ease;
}

.info-box.show {
    opacity: 1;
}

.info-box h2 {
    margin-bottom: 20px;
    color: red;
}

.info-line {
    opacity: 0;
    margin-bottom: 12px;
    transform: translateX(-15px);
    transition: 0.4s;
}

.info-line.show {
    opacity: 1;
    transform: translateX(0);
}

/* ===================== STATUS ===================== */
.bottom-status {
    position: fixed;
    bottom: 20px;
    width: 100%;
    text-align: center;
    pointer-events: none;
}

#status {
    font-size: 16px;
    letter-spacing: 2px;
}

#percentage {
    font-size: 32px;
    font-weight: bold;
}

/* ===================== MOBILE FIX ===================== */
@media (max-width: 768px) {

    .main-container {
        flex-direction: column;
        gap: 18px;
        width: 100%;
        padding: 0 15px;
    }

    .main-container.scanned {
        transform: translate(-50%, -50%);
    }

    .face-box {
        width: 220px;
        height: 300px;
    }

    .info-box {
        width: 100%;
        text-align: center;
    }

    #status {
        font-size: 14px;
    }

    #percentage {
        font-size: 24px;
    }

    .info-line {
        font-size: 15px;
    }

    /* 🔥 CRUCIAL : empêche overlap visuel */
    .bottom-status {
        bottom: 10px;
    }

    .info-btn {
    font-size: 16px;
    text-align: center;
}
}

body {
    background: radial-gradient(circle, #081018, #000000);
    color: #00ff88;
    min-height: 100vh;
    overflow-x: hidden;
    display: flex;
    justify-content: center;
    align-items: center;
    padding-bottom: 120px; /* 👈 IMPORTANT empêche overlap bas */
}

.info-btn {
    display: inline-block;
    margin-top: 15px;
    opacity: 0;
    transform: translateX(-15px);
    
    font-size: 22px;              /* 🔥 plus gros */
    font-weight: bold;
    color: black;

    background: #00ff88;          /* 🔥 couleur flashy */
    padding: 12px 18px;
    border-radius: 8px;

    text-decoration: none;
    letter-spacing: 1px;

    transition: 0.4s;
    box-shadow: 0 0 10px #00ff88;
}

/* apparition */
.info-btn.show {
    opacity: 1;
    transform: translateX(0);
    animation: blinkBtn 1s infinite;
}

/* hover */
.info-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 0 25px #00ff88;
}

/* 🔥 animation clignotement */
@keyframes blinkBtn {
    0% {
        opacity: 1;
        box-shadow: 0 0 10px #00ff88;
    }
    50% {
        opacity: 0.5;
        box-shadow: 0 0 25px #00ff88;
    }
    100% {
        opacity: 1;
        box-shadow: 0 0 10px #00ff88;
    }
}