body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #f4f7f6;
    margin: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    color: #333;
}

.container {
    background: white;
    padding: 2rem;
    border-radius: 15px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.1);
    width: 100%;
    max-width: 450px;
    text-align: center;
}

.logo {
    max-width: 200px;
    margin-bottom: 1.5rem;
}

h2 {
    color: #1a237e; /* Bleu nuit KMS */
    margin-bottom: 1.5rem;
}

.form-group {
    text-align: left;
    margin-bottom: 1.2rem;
}

label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: #555;
}

input, select {
    width: 100%;
    padding: 12px;
    border: 2px solid #ddd;
    border-radius: 8px;
    box-sizing: border-box;
    font-size: 1rem;
    transition: border-color 0.3s;
}

input:focus, select:focus {
    border-color: #fdd835; /* Jaune KMS */
    outline: none;
}

.btn-submit {
    background-color: #1a237e;
    color: white;
    padding: 14px 20px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    width: 100%;
    font-size: 1.1rem;
    font-weight: bold;
    transition: background 0.3s;
    margin-top: 1rem;
}

.btn-submit:hover {
    background-color: #0d1642;
}

.alert {
    padding: 10px;
    background-color: #fff8e1;
    color: #6d4c00;
    border-radius: 8px;
    margin-bottom: 1rem;
    font-size: 0.9rem;
    border: 1px solid #ffe082;
}

.alert-success {
    background-color: #e8f5e9;
    color: #2e7d32;
    border: 1px solid #c8e6c9;
}

.alert-error {
    background-color: #ffebee;
    color: #c62828;
    border: 1px solid #ffcdd2;
}


/* Style pour l'admin */
.admin-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 2rem;
    background: white;
}
.admin-table th, .admin-table td {
    border: 1px solid #ddd;
    padding: 12px;
    text-align: left;
}
.admin-table th {
    background-color: #1a237e;
    color: white;
}
.admin-container {
    max-width: 90%;
    background: white;
    padding: 2rem;
    border-radius: 15px;
}
    /* Responsive helpers (desktop) */
    .table-responsive {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        width: 100%;
    }

    .admin-page {
        align-items: flex-start;
        padding: 1.5rem 0.75rem;
    }

    .admin-page .admin-container {
        max-width: 100%;
        width: 95%;
        padding: 1.5rem;
    }

    @media (max-width: 768px) {
        body {
            padding: 0.5rem;
            align-items: flex-start;
        }

        .container {
            padding: 1.25rem;
            border-radius: 10px;
        }

        .admin-container {
            width: 100%;
            padding: 0.75rem;
            border-radius: 10px;
        }

        .admin-table th,
        .admin-table td {
            padding: 8px;
            font-size: 0.8rem;
        }

        .table-responsive {
            overflow: visible;
        }

        .admin-table,
        .admin-table thead,
        .admin-table tbody,
        .admin-table tr,
        .admin-table th,
        .admin-table td {
            display: block;
            width: 100%;
        }

        .admin-table thead {
            position: absolute;
            width: 1px;
            height: 1px;
            padding: 0;
            margin: -1px;
            overflow: hidden;
            clip: rect(0, 0, 0, 0);
            white-space: nowrap;
            border: 0;
        }

        .admin-table tbody tr {
            margin-bottom: 0.85rem;
            border: 1px solid #dfe3f0;
            border-radius: 10px;
            background: #ffffff;
            box-shadow: 0 6px 18px rgba(0, 0, 0, 0.06);
            overflow: hidden;
        }

        .admin-table td {
            display: grid;
            grid-template-columns: minmax(5.5rem, 35%) 1fr;
            gap: 0.5rem;
            padding: 0.65rem 0.75rem;
            font-size: 0.875rem;
            border: 0;
            border-bottom: 1px solid #edf1f8;
            overflow-wrap: anywhere;
            word-break: break-word;
        }

        .admin-table td:last-child {
            border-bottom: 0;
        }

        .admin-table td::before {
            content: attr(data-label);
            font-weight: 700;
            color: #1a237e;
            overflow-wrap: anywhere;
        }

        .logo {
            max-width: 140px;
        }

        input, select, .btn-submit {
            font-size: 1rem;
            padding: 12px;
        }
    }

    @media (max-width: 480px) {
        .admin-table {
            font-size: 0.85rem;
        }

        .admin-table th,
        .admin-table td {
            padding: 6px;
            font-size: 0.75rem;
        }
    }

/* Toasts */
.toast-stack {
    position: fixed;
    top: 1rem;
    right: 1rem;
    z-index: 1080;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    width: min(92vw, 400px);
    pointer-events: none;
}

@media (max-width: 600px) {
    .toast-stack {
        left: 1rem;
        right: 1rem;
        top: 0.75rem;
        width: auto;
    }
}

.toast {
    --toast-color: #1a237e;
    display: grid;
    grid-template-columns: auto 1fr auto;
    column-gap: 0.75rem;
    align-items: center;
    margin: 0;
    padding: 0.875rem 1rem;
    border-radius: 8px;
    border: 1px solid #d8e0f0;
    border-left: 4px solid var(--toast-color);
    background: #ffffff;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.14);
    color: #222;
    opacity: 1;
    transform: translateX(0);
    pointer-events: auto;
    animation: toast-slide-in 0.26s ease-out forwards;
}

.toast-success { --toast-color: #2e7d32; }
.toast-info { --toast-color: #0d6efd; }
.toast-warning { --toast-color: #d9800a; }

.toast-icon {
    width: 1.6rem;
    height: 1.6rem;
    border-radius: 50%;
    display: grid;
    place-items: center;
    color: #fff;
    background: var(--toast-color);
    font-weight: 700;
    font-size: 1.1rem;
    line-height: 1;
    flex-shrink: 0;
}

.toast-message {
    margin: 0;
    font-size: 0.95rem;
    line-height: 1.35;
    word-break: break-word;
}

.toast-close {
    border: none;
    background: transparent;
    color: #777;
    font-size: 1.4rem;
    line-height: 1;
    cursor: pointer;
    padding: 0.125rem;
    width: 2rem;
    height: 2rem;
    border-radius: 4px;
}

.toast-close:hover {
    background: #f2f4fa;
    color: #333;
}

.toast-close:focus {
    outline: 2px solid var(--toast-color);
    outline-offset: 2px;
}

.toast--hidden {
    opacity: 0;
    transform: translateX(calc(100% + 1rem));
}

@keyframes toast-slide-in {
    from {
        opacity: 0;
        transform: translateX(calc(100% + 1rem));
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@media (prefers-reduced-motion: reduce) {
    .toast,
    .toast--hidden {
        animation: none;
        transition: none;
        transform: none;
    }

    .toast--hidden {
        opacity: 0;
    }
}

