/*****
 * Fichier : admin-style.css
 * Description : Styles pour l'interface d'administration (Login, MFA, Gestion JSON)
 * Auteur : Forme Carrée
 * Dernière modification : 2025-03-11
 *****/

/* ======= Styles Généraux ======= */
body {
    font-family: Arial, sans-serif;
    background-color: #f4f4f4;
    text-align: center;
    padding: 20px;
}

h2 {
    color: #333;
}

/* ======= Conteneur principal ======= */

.container {
    background-color: white;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    display: inline-block;
    text-align: center;
    width: 350px;
}


/* ======= Styles pour la Page de redirection ======= */


.selection-container {
    background-color: white;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    display: inline-block;
    text-align: center;
    width: 400px;
    margin-top: 20px;
}

/* Boutons de sélection */
.selection-buttons {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-top: 10px;
}

.selection-button {
    display: inline-block;
    background-color: #28a745;
    color: white;
    padding: 15px;
    border-radius: 5px;
    text-decoration: none;
    font-weight: bold;
    text-align: center;
	border-radius: 9999px;
}

.selection-button:hover {
    background-color: #218838;
}

.selection-button.disabled {
    background-color: #ccc;
    cursor: not-allowed;
}



/* ======= Styles pour la Page de Connexion (Login) ======= */
form {
    display: inline-block;
    background-color: white;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    text-align: left;
    width: 300px;
}

label {
    display: block;
    margin-top: 10px;
    font-weight: bold;
}

input {
    width: 100%;
    padding: 8px;
    margin-top: 5px;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 14px;
	box-sizing: border-box;
}

select {
    width: 100%;
    padding: 8px;
    margin-top: 5px;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 14px;
	box-sizing: border-box;
}



button {
    background-color: #d9d4b7;
    color: black;
    border: none;
    padding: 10px;
    width: 100%;
    margin-top: 15px;
    cursor: pointer;
    font-size: 16px;
    border-radius: 5px;
	box-sizing: border-box;
	border-radius: 9999px;
}

button:hover {
    background-color: #c0b78c;
}

p {
    margin-top: 10px;
    font-size: 14px;
    color: red;
}



/* ======= Formulaire MFA ======= */
.mfa-container {
    background-color: white;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    display: inline-block;
    text-align: center;
    width: 350px;
    margin-top: 20px;
}

.mfa-container label {
    font-weight: bold;
    display: block;
    margin-bottom: 5px;
}

.mfa-container input {
    width: 100%;
    padding: 8px;
    margin-top: 5px;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 14px;
    text-align: center;
}

.mfa-container button {
    background-color: #28a745;
    color: white;
    border: none;
    padding: 10px;
    width: 100%;
    margin-top: 15px;
    cursor: pointer;
    font-size: 16px;
    border-radius: 5px;
}

.mfa-container button:hover {
    background-color: #218838;
}


/* ======= QR Code pour MFA ======= */
.qr-container {
    margin-top: 20px;
}

.qr-container img {
    border: 1px solid #ccc;
    padding: 10px;
    border-radius: 10px;
    background-color: #fff;
}

/* ======= Clé secrète MFA ======= */
.secret-key {
    font-size: 18px;
    font-weight: bold;
    background-color: #d9d4b7;
    padding: 10px;
    border-radius: 5px;
    display: inline-block;
    margin-top: 10px;
    word-break: break-all;
}

/* ======= Bouton Retour et Déconnexion ======= */
.return-link, .logout-button {
    display: inline-block;
    margin-top: 15px;
    padding: 10px 15px;
    background-color: #d9d4b7;
    color: black;
    text-decoration: none;
    border-radius: 5px;
    font-weight: bold;
}

.return-link:hover, .logout-button:hover {
    background-color: #c0b78c;
}

/* ======= Zone de gestion JSON ======= */
textarea {
    width: 100%;
    height: 300px;
    padding: 10px;
    font-size: 14px;
    border: 1px solid #ccc;
    border-radius: 5px;
    resize: none;
	box-sizing: border-box;
}

/* ======= Style du bouton Déconnexion ======= */

/* Conteneur du bouton de déconnexion */
.logout-container {
    text-align: center;
    margin-bottom: 20px;
}


.logout-button {
    background-color: #ff4d4d;
    color: white;
	border-radius: 9999px;
	
}

.logout-button:hover {
    background-color: #cc0000;
}

/* ======= Apercu couverture point-of-origin ======= */
.coverage-preview {
    max-width: 1100px;
    margin: 28px auto 0;
    background-color: #fff;
    border-radius: 12px;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.08);
    padding: 20px;
    text-align: left;
}

.coverage-map-shell {
    display: grid;
    gap: 16px;
}

.coverage-map-stage {
    position: relative;
    width: 100%;
    aspect-ratio: 4 / 3;
    overflow: hidden;
    border-radius: 10px;
    background: linear-gradient(180deg, #faf8ef 0%, #f4f0dc 100%);
    border: 1px solid rgba(0, 0, 0, 0.08);
}

.coverage-map-toolbar {
    position: absolute;
    top: 12px;
    right: 12px;
    z-index: 2;
    display: flex;
    gap: 8px;
}

.coverage-map-control {
    width: auto;
    min-width: 48px;
    margin-top: 0;
    padding: 8px 12px;
    font-size: 14px;
}

.coverage-map-canvas {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1;
}

.coverage-map-meta {
    display: grid;
    gap: 10px;
}

.coverage-map-note,
.coverage-map-selected,
.coverage-map-outside {
    margin: 0;
    font-size: 14px;
    color: #333;
}

.coverage-map-selected strong {
    color: #111;
}

.coverage-map-outside {
    color: #8b5e00;
}

.coverage-map-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.coverage-legend-item {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 10px;
    border-radius: 9999px;
    background: #f1f1f1;
    font-size: 13px;
    color: #222;
}

.coverage-legend-item.is-selected {
    background: #e6dcc3;
    font-weight: bold;
}

.coverage-legend-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    flex: 0 0 10px;
}

/* ======= Commandes payables ======= */
.admin-commandes-table-wrap {
    width: 100%;
    overflow-x: auto;
    overflow-y: hidden;
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-radius: 10px;
    background: #fff;
    box-sizing: border-box;
}

.admin-commandes-table {
    width: max-content;
    min-width: 100%;
    border-collapse: collapse;
}

.admin-commandes-table th,
.admin-commandes-table td {
    padding: 12px 14px;
    text-align: left;
    border-bottom: 1px solid rgba(0, 0, 0, 0.08);
    white-space: nowrap;
    font-size: 14px;
}

.admin-commandes-table th {
    position: sticky;
    top: 0;
    background: #f6f2df;
    color: #222;
    z-index: 1;
}

.admin-commandes-table tbody tr:nth-child(even) {
    background: rgba(0, 0, 0, 0.02);
}

.admin-commandes-table tbody tr:last-child td {
    border-bottom: none;
}
