/* =========================================================
   RESULTAT DU SCAN - NOTIFICATION CENTRALE
   ========================================================= */

#scan-btn{
    position: fixed;
    bottom: 0;
    width: 100%;
    background: #202a3a;
    border-top: 1px solid #303c50;
    padding: 12px;
}
#start-camera{
    width: 100%;
}

.scan-refresh-loader {
    position: fixed;
    top: 20px;
    left: 50%;
    z-index: 9999;
    display: none;
    transform: translateX(-50%);
}

.scan-refresh-loader.show {
    display: block;
}

#scan-result.scan-result-hide {
    opacity: 0;
    transform: translate(-50%, -50%) scale(.95);
}

#scan-result {
    position: fixed;
    top: 50%;
    left: 50%;
    width: min(700px, calc(100vw - 40px));
    transform: translate(-50%, -50%);
    z-index: 9999;
    pointer-events: none;
    transition: opacity .3s ease, transform .3s ease;
}


.scan-result {
    display: flex;
    align-items: center;

    gap: 2rem;

    padding: 2.5rem 3rem;

    border: 2px solid transparent;
    border-radius: 1.25rem;

    box-shadow:
            0 25px 80px rgba(0, 0, 0, .45);

    animation: scanResultAppear .25s ease-out;
}


/* =========================================================
   ICONE
   ========================================================= */

.scan-result-icon {
    width: 100px;
    height: 100px;

    flex-shrink: 0;

    display: flex;
    align-items: center;
    justify-content: center;

    border-radius: 50%;

    font-size: 3.5rem;
    font-weight: 700;

    color: #fff;
}


/* =========================================================
   CONTENU
   ========================================================= */

.scan-result-content {
    flex: 1;
    min-width: 0;
}


.scan-result-status {
    margin-bottom: .5rem;

    font-size: 1.8rem;
    font-weight: 800;

    letter-spacing: .03em;
}


.scan-result-message {
    color: #fff;

    font-size: 1.15rem;
}


.scan-result-details {
    margin-top: 1.25rem;
    padding-top: 1.25rem;

    border-top: 1px solid rgba(255, 255, 255, .15);

    font-size: .95rem;
    line-height: 1.8;
}

.scan-result-details strong {
    font-weight: 700;
}


/* =========================================================
   SUCCES
   ========================================================= */

.scan-result.success {
    background: #166534;
    border-color: #4ade80;

    color: #dcfce7;
}

.scan-result.success .scan-result-icon {
    background: #22c55e;

    box-shadow:
            0 0 0 10px rgba(74, 222, 128, .18);
}

.scan-result.success .scan-result-status {
    color: #86efac;
}


/* =========================================================
   WARNING
   ========================================================= */

.scan-result.warning {
    background: #92400e;
    border-color: #fbbf24;

    color: #fef3c7;
}

.scan-result.warning .scan-result-icon {
    background: #f59e0b;

    box-shadow:
            0 0 0 10px rgba(251, 191, 36, .18);
}

.scan-result.warning .scan-result-status {
    color: #fde68a;
}


/* =========================================================
   ERREUR
   ========================================================= */

.scan-result.error {
    background: #991b1b;
    border-color: #f87171;

    color: #fee2e2;
}

.scan-result.error .scan-result-icon {
    background: #ef4444;

    box-shadow:
            0 0 0 10px rgba(248, 113, 113, .18);
}

.scan-result.error .scan-result-status {
    color: #fecaca;
}


/* =========================================================
   ANIMATION
   ========================================================= */

@keyframes scanResultAppear {

    from {
        opacity: 0;
        transform: scale(.9);
    }

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

}


/* =========================================================
   MOBILE
   ========================================================= */

@media (max-width: 767.98px) {

    .scan-result {
        flex-direction: column;

        gap: 1.25rem;

        padding: 2rem;

        text-align: center;
    }

    .scan-result-icon {
        width: 80px;
        height: 80px;

        font-size: 2.5rem;
    }

    .scan-result-status {
        font-size: 1.4rem;
    }

    .scan-result-details {
        text-align: left;
    }

}

.admin-scan-page {
    min-height: calc(100vh - 140px);
    padding: 40px;
    background: #182231;
    color: #e5e7eb;
}

.admin-scan-header {
    max-width: 1200px;
    margin: 0 auto 30px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.admin-scan-logo {
    margin-bottom: 15px;
}

.admin-scan-logo span {
    display: inline-flex;
    width: 48px;
    height: 48px;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    background: #6366f1;
    color: #fff;
    font-weight: 700;
}

.admin-scan-header h1 {
    margin: 0;
    font-size: 2rem;
}

.admin-scan-header p {
    margin: 5px 0 0;
    color: #8f9bad;
}

.admin-scan-stats {
    max-width: 1200px;
    margin: 0 auto 30px;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

.admin-scan-stat {
    display: flex;
    align-items: center;
    gap: 18px;
    padding: 22px;
    background: #202a3a;
    border: 1px solid #303c4f;
    border-radius: 14px;
}

.admin-scan-stat-icon {
    width: 52px;
    height: 52px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    background: #293548;
    font-size: 24px;
}

.admin-scan-stat-label {
    color: #8f9bad;
    font-size: .9rem;
}

.admin-scan-stat-value {
    margin-top: 3px;
    font-size: 2rem;
    font-weight: 700;
    color: #fff;
}

.admin-scan-reader {
    max-width: 700px;
    margin: 0 auto;
    padding: 35px;
    text-align: center;
    background: #202a3a;
    border: 1px solid #303c4f;
    border-radius: 18px;
}

.admin-scan-reader-header {
    margin-bottom: 25px;
}

.admin-scan-reader-header h2 {
    margin-bottom: 8px;
}

.admin-scan-reader-header p {
    margin: 0;
    color: #8f9bad;
}

.admin-scan-camera {
    max-width: 500px;
    margin: 25px auto 0;
}


@media (max-width: 767px) {
    .admin-scan-page {
        padding: 20px;
    }

    .admin-scan-header {
        align-items: center;
        flex-direction: column;
        gap: 20px;

    }

    .admin-scan-stats {
        grid-template-columns: 1fr;
    }

    .admin-scan-reader {
        padding: 25px 15px;
    }
}