/* =========================================================
   UTILITAIRES GÉNÉRAUX
========================================================= */
body {
    background-color: #f0f2f5; /* Un gris plus doux et moderne */
    font-family: 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    color: #334155;
}

/* Cartes plus "aériennes" */
.page-card {
    padding: 2.5rem;
    border-radius: 12px; /* Coins plus arrondis */
    border: none;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.03), 0 4px 10px rgba(0, 0, 0, 0.02);
    background: #fff;
    margin-top: 2rem;
}

/* Marges */
.margin-top-2 { margin-top: 2rem; }
.margin-bottom-1 { margin-bottom: 1rem; }
.margin-bottom-2 { margin-bottom: 2rem; }

/* Texte */
.text-small { font-size: 0.875rem; }
.text-muted { color: #666; }

/* Icônes */
i.fas { color: #f8f9fa; }

/* =========================================================
   TOASTS
========================================================= */

.toast-container {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.toast {
    min-width: 250px;
    padding: 15px 20px;
    border-radius: 8px;
    color: #fff;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    animation: slideIn 0.3s ease-out;
}

.toast.success { background-color: #2ecc71; }
.toast.error   { background-color: #e74c3c; }
.toast.warning { background-color: #f1c40f; }

.close-btn {
    background: none;
    border: none;
    color: #fff;
    font-size: 20px;
    cursor: pointer;
    margin-left: 15px;
    opacity: 0.7;
}
.close-btn:hover { opacity: 1; }

@keyframes slideIn {
    from { transform: translateX(100%); opacity: 0; }
    to   { transform: translateX(0);   opacity: 1; }
}

/* =========================================================
   COMPOSANTS UI
========================================================= */

.lead {
    font-size: 1.25rem;
    font-weight: 300;
}

.callout { border-radius: 4px; }
.callout h3 { color: #1779ba; }

.callout.success {
    background-color: #ecfdf5;
    border: 1px solid #d1fae5;
    color: #065f46;
    border-radius: 12px;
}

/* =========================================================
   TOP BAR / MENU UTILISATEUR
========================================================= */

.top-bar {
    border-bottom: 1px solid #e6e6e6;
    box-shadow: 0 2px 8px rgba(0,0,0,0.04);
    padding: 0.75rem 1rem;
}

.top-bar a {
    font-weight: 500;
}

.top-bar a:hover {
    color: #1779ba;
}

.top-bar .user-info {
    padding: 0.5rem 1rem;
    display: flex;
    align-items: center;
}

.top-bar .user-details {
    display: flex;
    flex-direction: column;
    line-height: 1.2;
}

.top-bar .user-name {
    font-weight: bold;
    color: #1779ba;
}

.top-bar .user-role {
    font-size: 0.8rem;
    color: #666;
    text-transform: capitalize;
}

.top-bar .menu, .top-bar-right .menu > li {
    display: flex;
    align-items: center;
}

.top-bar .menu .button { 
    margin: 0 0.3rem; 
}

.top-bar .menu a.button {
     padding: 0.4rem 0.8rem; 
}

.top-bar .menu a.button i { 
    margin-right: 0.3rem; 
}

.top-bar-left .menu img {
    height: 40px;
    margin-right: 15px;
}

.top-bar .menu a:not(.button) {
    color: #475569;
    padding: 0.7rem 1rem;
    border-radius: 4px;
}

.top-bar .menu a:not(.button):hover {
    background-color: #f1f5f9;
    color: #2563eb;
}

/* =========================================================
   STATISTIQUES (UNIFIÉ)
========================================================= */

.stat-box {
    padding: 10px 5px;
    margin-bottom: 10px;
}

.stat-box.soft {
    background: #f9f9f9;
    border-radius: 5px;
}

.stat-value {
    display: block;
    font-size: 1.5rem;
    font-weight: bold;
    color: #1779ba;
}

.stat-value.large { font-size: 2rem; }

.stat-label {
    display: block;
    font-size: 0.8rem;
    color: #666;
}

.stat-label.large { font-size: 0.9rem; }

/* Cartes statistiques */
.stat-card {
    background: #fff;
    border-left: 4px solid #1779ba;
    padding: 15px;
    border-radius: 5px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    text-align: center;
}
.stat-card.stat-new        { border-left-color: #3adb76; }
.stat-card.stat-progress   { border-left-color: #ffae00; }
.stat-card.stat-completed  { border-left-color: #767676; }

/* =========================================================
   LISTES & ITEMS
========================================================= */

.ticket-row:hover,
.ticket-item:hover,
.user-checkbox:hover {
    background-color: #f5f5f5;
}

.ticket-item,
.document-item,
.agent-item,
.assigned-user-item {
    padding: 10px 0;
    border-bottom: 1px solid #e6e6e6;
}

.ticket-item:last-child,
.document-item:last-child,
.agent-item:last-child,
.assigned-user-item:last-child {
    border-bottom: none;
}

/* =========================================================
   COULEURS / SERVICES
========================================================= */

.color-preview-container { margin-top: 1.875rem; }

.color-preview {
    background: #f9f9f9;
    padding: 1rem;
    border-radius: 3px;
    min-height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 1.1rem;
    transition: border-left-color 0.3s ease;
}

/* =========================================================
   BOUTONS ET ÉLÉMENTS D'ACTION
========================================================= */
.button {
    border-radius: 6px;
    font-weight: 600;
    transition: all 0.2s ease;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.button:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

/* Couleur primaire plus vibrante que le bleu Foundation standard */
.button.primary, .button { background-color: #2563eb; }
.button.success { background-color: #10b981; }
.button.alert   { background-color: #ef4444; }
.button.secondary { background-color: #64748b; }

.button, input[type="text"], input[type="email"], input[type="password"] {
    border-radius: 3px;
}

/* Boutons icônes */
.button-label {
    cursor: pointer;
    border: none;
    padding: 0.25rem 0.5rem;
    font-size: 0.875rem;
    transition: all 0.2s ease-in-out;
}
.button-label:hover {
    opacity: 0.8;
    transform: scale(1.05);
}
.button-label i { font-size: 0.75rem; }

/* =========================================================
   TABLEAUX (Utilisateurs)
========================================================= */
table thead {
    background: #f8fafc;
    border-bottom: 2px solid #e2e8f0;
}

table thead th {
    color: #64748b;
    text-transform: uppercase;
    font-size: 0.75rem;
    letter-spacing: 0.05em;
    padding: 1rem;
}

table tbody tr {
    border-bottom: 1px solid #f1f5f9;
    transition: background 0.1s ease;
}

/* Status Labels */
.label {
    border-radius: 20px; /* Style "pill" */
    padding: 0.3rem 0.8rem;
    font-weight: bold;
    font-size: 0.7rem;
}

/* =========================================================
   PASSWORD 
========================================================= */

/* Styles pour les critères validés/non validés */
div.criteria-met {
    color: #3adb76 !important;
    font-weight: bold !important;
}

div.criteria-not-met {
    color: #cc4b37 !important;
    font-weight: bold !important;
}

/* Indicateurs visuels */
div.criteria-met::before {
    content: "✓" !important;
    margin-right: 5px !important;
}

div.criteria-not-met::before {
    content: "✗" !important;
    margin-right: 5px !important;
}

/* Animation pour le changement d'état */
.password-criteria li {
    transition: color 0.3s ease;
    margin-bottom: 0.25rem;
}

/* Style pour l'indicateur de force */
.strength-meter {
    height: 4px !important;
    background: #e6e6e6 !important;
    margin-top: 0.5rem !important;
    border-radius: 2px !important;
    overflow: hidden !important;
}

.strength-meter div {
    height: 100%;
    border-radius: 2px;
    transition: width 0.3s ease, background-color 0.3s ease;
}
#strength-bar {
    height: 100% !important;
    transition: width 0.3s ease, background-color 0.3s ease !important;
}