/* ==========================================================================
   1. VARIABLES DE THÈME & POLICES
   ========================================================================== */
:root {
    --win-blue: #000080;
    --win-yellow: #FFFF00;
    --win-light-blue: #BDD5FB;
    --win-green: #008000;
    --win-white: #FFFFFF;
    --win-light-grey: #E0E0E0;
    --max-menu-width: 500px;
    --bg-light-blue: #cbdffa;  /* Le fond de l'application */
    --app-navy: #00007d;       /* Le bleu nuit du header/footer */
    --app-yellow: #ffff00;     /* Le jaune du texte */
    --shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

/* Reset de base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: Arial, sans-serif;
}

body, html {
    height: 100%;
    background-color: var(--bg-light-blue);
}

/* Structure de la page SPA (distribue Header, Content, Footer) */
/* 1. Le Header devient le chef d'orchestre avec Flexbox */
.app-header {
    background-color: var(--app-navy);
    color: var(--app-yellow);
    padding: 12px 15px;
    display: flex;
    align-items: center;       /* Centre VERTICALEMENT tout ce qui est dedans */
    justify-content: center;   /* Centre le titre au milieu */
    position: relative;
    min-height: 50px;          /* Donne une hauteur minimale propre au bandeau */
}

/* 2. Le titre reste indépendant */
.header-title {
    font-size: 1.3rem;
    font-weight: bold;
    margin: 0;
}

/* 3. Le bouton retour respire enfin */
.btn-back {
    position: absolute;
    left: 15px;
    /* On enlève les top: 50% et transform qui provoquaient l'étirement */
    
    background-color: white;
    color: var(--app-navy);
    border: 1px solid var(--app-navy);
    border-radius: 6px;
    
    /* On gère la taille proprement avec le padding interne */
    padding: 6px 12px; 
    
    /* Flexbox INTERNE au bouton pour aligner l'icône et le texte sur la même ligne */
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px; /* Espace parfait de 6px entre la flèche et le mot "Retour" */
    
    font-weight: bold;
    font-size: 0.9rem;
    cursor: pointer;
    line-height: 1; /* Empêche le texte de sauter ou de se décaler */
}

/* Espacement et alignement de l'icône */
.btn-back-icon {
    font-size: 0.9rem;
}

/* Effet tactile au clic */
.btn-back:active {
    background-color: #e6e6e6;
}

.app-page {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    width: 100%;
}

.btn-list {
	background-color: var(--win-blue); 
	margin: 0 !important; 
	width: 36px !important; 
	height: 36px !important; 
	border: 0px solid white;
	border-radius: 8px;
	display: inline-flex !important; 
	align-items: center !important; 
	justify-content: center !important;
	cursor: pointer;
	box-shadow: 3px 3px #DCDCDC;
}

/* Zone de contenu principale (Main) */
.app-content {
    flex: 1; /* Force le contenu à occuper tout l'espace disponible */
    padding: 20px;
    overflow-y: auto; /* Permet le défilement vertical si le tableau est long */
}

/* Alignement centré spécifique à la page d'accueil */
.content-centered {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
}

.main-logo {
    margin: 20px 0;
}

/* Menu de navigation (Look de l'image 1) */
.menu-list {
    width: 100%;
    max-width: 500px; /* Évite que le menu soit trop large sur PC */
    background: white;
    border-radius: 8px;
    box-shadow: var(--shadow);
    overflow: hidden;
}

.menu-item {
    display: flex;
    align-items: center;
    padding: 15px 20px;
    border-bottom: 1px solid #eee;
    cursor: pointer;
    transition: background 0.2s;
}

.menu-item:last-child {
    border-bottom: none;
}

.menu-item:active {
    background-color: #f5f5f5;
}

.menu-icon {
    font-size: 1.2rem;
    margin-right: 15px;
}

.menu-text {
    flex: 1;
    color: var(--app-navy);
    font-weight: bold;
	font-size: 1.3rem;
}

.menu-arrow {
    color: var(--app-navy);
    font-weight: bold;
}

/* Pied de page (Footer) */
.app-footer {
    background-color: var(--app-navy);
    color: var(--app-yellow);
    text-align: center;
    padding: 10px;
    font-size: 0.85rem;
    font-weight: bold;
}

table {
    border: 1px solid var(--win-blue);
    border-collapse: collapse;
}

.logo-container, .menu-container {
    width: 100%;
    max-width: var(--max-menu-width);
}

.logo-container {
    text-align: left;
    margin-bottom: 10px;
}

.my-custom-icon {
    width: 32px !important;  
    height: 32px !important; 
    margin-right: 12px !important;
    position: static !important;
    display: block !important;
    padding: 0 !important;
}

/* Texte Écrans infos */
.about-title { color: var(--win-blue) !important; font-weight: bold !important; display: block; }
.about-subtitle { color: var(--win-blue) !important; font-size: 0.85em !important; display: block; }

/* ==========================================================================
   6. GRILLES COMPACTES (TABULATOR)
   ========================================================================== */
.tabulator .tabulator-header .tabulator-col {
    background-color: var(--win-blue) !important;
    color: var(--win-white) !important;    
    font-weight: 500;
}

.tabulator .tabulator-tableholder .tabulator-cell {
    background-color: white !important;
    color: var(--win-blue) !important;
    font-weight: 500;
}

.tabulator .tabulator-row.tabulator-selected,
.tabulator .tabulator-row.tabulator-selected .tabulator-cell,
.tabulator .tabulator-row.tabulator-selected:hover,
.tabulator .tabulator-row.tabulator-selected:hover .tabulator-cell {
    background-color: var(--win-light-grey) !important;
    color: var(--win-blue) !important;
    font-weight: bold; 
}

.tabulator-row {
    min-height: auto !important;
}

.tabulator-row .tabulator-cell {
    padding: 6px 4px !important;
    line-height: 1.3 !important;
}

/* Style de base du Dialog */
.custom-modal {
    border: none;
    border-radius: 8px;
    padding: 0;
    width: 90%;
    max-width: 450px; /* Équivalent à votre boxWidth: '40%' sur PC */
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: white;
}

/* Le pseudo-élément ::backdrop gère le fond grisé derrière le popup de manière native ! */
.custom-modal::backdrop {
    background-color: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(2px); /* Optionnel : floute légèrement l'arrière-plan */
}

/* En-tête du popup */
.modal-header {
    padding: 15px 20px;
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.1rem;
    border-bottom: 1px solid #eee;
}

.modal-header i {
    font-size: 1.3rem;
}

/* Corps du texte */
.modal-body {
    padding: 20px;
    color: #333;
    font-size: 1rem;
    line-height: 1.4;
}

/* Pied de page et Bouton */
.modal-footer {
    padding: 10px 20px;
    text-align: right;
    border-top: 1px solid #eee;
}

.btn-modal {
    padding: 8px 20px;
    border: none;
    border-radius: 4px;
    font-weight: bold;
    cursor: pointer;
    color: white;
}

/* --- Variantes de Thèmes (Couleurs) --- */

/* Thème Vert (Success / Info) */
.modal-green .modal-header { color: #2ecc71; }
.modal-green .btn-modal { background-color: #2ecc71; }
.modal-green .btn-modal:active { background-color: #27ae60; }

/* Thème Orange (Warning) */
.modal-orange .modal-header { color: #f39c12; }
.modal-orange .btn-modal { background-color: #f39c12; }
.modal-orange .btn-modal:active { background-color: #d35400; }

/* Thème Rouge (Error) */
.modal-red .modal-header { color: #e74c3c; }
.modal-red .btn-modal { background-color: #e74c3c; }
.modal-red .btn-modal:active { background-color: #c0392b; }

/* Style par défaut de votre bouton */
#btn-input-delete {
    background-color: #e74c3c; /* Rouge par exemple */
    color: white;
    opacity: 1;
    cursor: pointer;
}

/* Le CSS détecte TOUT SEUL si le bouton a l'attribut disabled="true" */
#btn-input-delete:disabled {
    background-color: #ccc;    /* Grisé */
    opacity: 0.5;              /* Semi-transparent */
    cursor: not-allowed;       /* Curseur "interdit" au survol sur PC */
}

/* Conteneur global d'un groupe (pour espacer Logiciel et Support) */
.info-group {
    width: 100%;
    max-width: 500px;
    margin-bottom: 20px; /* Crée l'espace entre les deux blocs */
}

/* L'en-tête grisé (Le fameux Divider de JQM) */
.list-header {
    background-color: #f0f0f0; /* Fond gris clair */
    color: #000080;            /* Texte vert (ou var(--app-navy) selon votre choix) */
    font-weight: bold;
    font-size: 0.85rem;
    padding: 10px 15px;
    border-top-left-radius: 8px;  /* Arrondit le haut du bloc */
    border-top-right-radius: 8px;
    border-bottom: 2px solid #000080; /* Ligne de séparation sous le titre */
    letter-spacing: 0.5px;
}

/* La carte blanche contenant les lignes */
.info-card {
    background: white;
    border-bottom-left-radius: 8px; /* Arrondit uniquement le bas */
    border-bottom-right-radius: 8px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

/* Une ligne d'information */
.info-item {
    display: flex;
    align-items: center;
    padding: 12px 15px;
    border-bottom: 1px solid #eee; /* Ligne fine de séparation entre les éléments */
}

/* On enlève la bordure sur le tout dernier élément du bloc */
.info-item:last-child {
    border-bottom: none;
}

/* Styles internes pour le texte */
.info-icon {
    font-size: 1.3rem;
    margin-right: 15px;
    display: flex;
    align-items: center;
}

.info-text h4 {
    color: #00007d; /* Votre bleu nuit */
    font-size: 0.95rem;
    font-weight: bold;
    margin-bottom: 3px;
}

.info-text p {
    color: #000080;
    font-size: 0.85rem;
    margin: 0;
}