﻿



/* La page de connexion possede son propre theme (URL /Login vs /Login/Dark) et n'a pas de
   MudThemeProvider. color-scheme est fixe ici pour que les controles natifs (case a cocher,
   champs, barre de defilement) restent clairs meme si app.css a pose data-theme="dark" sur
   <html> a partir d'un cookie Theme perime. !important sur l'image de fond pour la meme
   raison : html.dark-mode body (app.css) a une specificite superieure a body. */
body {
    margin: 0;
    color-scheme: light;
    background-image: url("/images/bg3.jpg") !important;
    background-color: #faf9fe;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    background-attachment: fixed;
    min-height: 100vh;
    font-family: 'Nunito', sans-serif;
    font-weight: 400;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding-top: 0px;
    color: #4C5257;
}

    .card {
        position: relative;
        width: 400px;
        background-color: white;
        border-radius: 8px;
        box-shadow: 0px 8px 25px rgba(0, 0, 0, 0.1);
        overflow: hidden;
    }

    .card img {
        width: 100%;
        height: 125px;
        object-fit: cover;
    }

    .card-header {
        margin-top: 8px;
        padding: 8px;
        display: flex;
        flex-direction: column;
        justify-content: center;
        height: 100px;
    }

    .card-header h5 {
        padding: 8px;
        font-size: 1rem;
        font-weight: normal;
        text-align: center;
    }

        .card-header small {
            margin-top: 4px;
            color: #4C5257;
        }

    .card-content {
        padding: 24px;
    }

    .bg-pattern {
        background-image: url("/images/bg-pattern-2.png");
        background-size: cover;
    }

    .logo-container {
        display: flex;
        justify-content: center; 
        align-items: center; 
        margin-top: 48px;
    }

    .logo-container img {
        width: 140px;
        height: 140px;
        object-fit: contain;
    }

    .form-group {
        margin-bottom: 16px;
        position: relative;
    }

input[type="text"],
input[type="password"] {
    width: 100%;
    padding: 8px 36px 8px 12px;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 1rem;
    background-color: #fff;
    color: #4C5257;
}

    .checkbox-group {
        display: flex;
        align-items: center;
        margin-top: 12px;
    }

        .checkbox-group input {
            margin-right: 8px;
        }

    button {
        width: 100%;
        padding: 10px 12px;
        background-color: #02a74c; /* Default green */
        color: white;
        border: none;
        border-radius: 4px;
        font-size: 1rem;
        cursor: pointer;
        margin-top: 24px;
        /* Add these for layout */
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 8px; /* space between spinner and text */
        /* Add a smooth transition for the hover effect */
        transition: background-color 0.3s ease;
    }

    button:hover {
        background-color: #018136; /* Darker green on hover */
    }

    .spinner-border {
        width: 1rem;
        height: 1rem;
        border: 2px solid #fff;
        border-top: 2px solid transparent;
        border-radius: 50%;
        animation: spin 0.8s linear infinite;
    }

    .show {
        display: inline-block;
    }

    @keyframes spin {
        0% {
            transform: rotate(0deg);
        }

        100% {
            transform: rotate(360deg);
        }
    }

    .password-toggle-icon {
        position: absolute;
        right: 10px;
        top: 10px;
        cursor: pointer;
    }

    .footer {
        margin-top: 24px;
        text-align: center;
        font-size: 0.9rem;
        color: #555;
    }

    .error {
        font-size: 10pt;
        color: red;
        margin-bottom: 0.9rem;
    }

    .message {
        text-align: center;
        margin-top: 12px;
        font-size: 0.9rem;
    }

    .message.info {
        color: #02a74c;
        font-size: 0.9rem;
    }

    .message.error {
        font-size: 0.9rem;
        color: red;
    }

    .message.success {
        color: green;
        font-size: 0.9rem;
    }

    .suggestions-list {
        position: absolute;
        top: 100%; /* Position it right below the input */
        left: 0;
        right: 0;
        background-color: white;
        border: 1px solid #ccc;
        border-top: none;
        border-radius: 0 0 4px 4px;
        box-shadow: 0px 4px 8px rgba(0, 0, 0, 0.1);
        z-index: 1000; /* Ensure it appears above other elements */
        max-height: 200px;
        overflow-y: auto;
    }

.suggestion-item {
    padding: 10px 12px;
    cursor: pointer;
    font-size: 1rem;
    color: #4C5257;
}

    .suggestion-item:hover {
        background-color: #f0f0f0;
    }

    .suggestion-item strong {
        font-weight: 600; /* Make the domain part bold */
    }
    .suggestion-item.suggestion-active {
        background-color: #e9ecef; /* A light grey for highlighting */
        color: #495057;
    }

    /* ===========================
       Theme Toggle Button
       =========================== */
    .theme-toggle-container {
        position: absolute;
        top: 16px;
        right: 16px;
        z-index: 10;
    }

    .theme-toggle-btn {
        display: flex;
        align-items: center;
        justify-content: center;
        width: 40px;
        height: 40px;
        border-radius: 50%;
        background-color: rgba(128, 128, 128, 0.2);
        cursor: pointer;
        transition: background-color 0.3s ease;
        border: 1px solid transparent;
    }

    .theme-toggle-btn:hover {
        background-color: rgba(128, 128, 128, 0.4);
        border-color: #444;
    }

    .theme-toggle-btn svg {
        width: 20px;
        height: 20px;
        stroke: #919191; /* subtle gray icon color */
    }
/* ===========================
   Connexion par carte d'accès + code PIN (option Carte_Acces_PIN)
   =========================== */
.separateur { display: flex; align-items: center; gap: 12px; margin: 20px 0 4px; color: #999; font-size: .85rem; }
.separateur::before, .separateur::after { content: ""; flex: 1; height: 1px; background: #ddd; }
button.carte-toggle { background: transparent; color: #02a74c; border: 1px solid #02a74c; margin-top: 12px; }
button.carte-toggle:hover { background: #e8f7ee; }
.carte-form { display: none; margin-top: 16px; }
.carte-form.ouvert { display: block; }
.carte-form .pin-label { font-size: .85rem; color: #4C5257; margin: 12px 0 8px; text-align: center; }
input.pwd-mask { -webkit-text-security: disc; }
.pin-boxes { display: flex; gap: 12px; justify-content: center; }
.pin-boxes input.pin-box {
    width: 52px; height: 60px; padding: 0; box-sizing: border-box;
    border: 2px solid #ccc; border-radius: 12px; text-align: center;
    font-size: 1.75rem; font-weight: 600; background: #fff; color: #4C5257;
    -webkit-text-security: disc; caret-color: #02a74c; transition: border-color .15s, box-shadow .15s;
}
.pin-boxes input.pin-box:focus { outline: none; border-color: #02a74c; box-shadow: 0 0 0 3px rgba(2, 167, 76, .18); }

/* Second facteur : six cases plus étroites, lien secondaire, zone du code de récupération */
.pin-boxes.six { gap: 8px; }
.pin-boxes.six input.pin-box { width: 44px; height: 54px; font-size: 1.5rem; }
a.lien { display: block; text-align: center; margin-top: 14px; font-size: .9rem; color: #02a74c; cursor: pointer; text-decoration: underline; }
.zone-recup { display: none; margin-top: 12px; }
.zone-recup.ouvert { display: block; }
