/* public/css/dashboard.css */

/* Variables globales - à ajuster ou à conserver dans root.css si besoin */
:root {
    --primary-color: #3498db;
    --secondary-color: #2ecc71;
    --background-color: #f4f4f4;
    --text-color: #333;
    --font-family: 'Arial', sans-serif;
    --base-font-size: 16px;
    --heading-font-size: 2em;
    --small-font-size: 0.9em;
}

/* Corps et conteneur */
body {
    font-family: var(--font-family);
    font-size: var(--base-font-size);
    background-color: var(--background-color);
    color: var(--text-color);
    line-height: 1.6;
    padding: 20px;
    margin: 0;
}

.container {
    max-width: 960px;
    margin: 0 auto;
}

/* Menu de navigation spécifique au dashboard */
.nav {
    list-style: none;
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-top: 10px;
    padding: 0;
}

.nav li a {
    text-decoration: none;
    color: var(--primary-color);
    font-weight: bold;
    padding: 8px 12px;
    border: 1px solid var(--primary-color);
    border-radius: 4px;
    transition: background-color 0.2s;
}

.nav li a:hover {
    background-color: var(--primary-color);
    color: #fff;
}

/* Sections spécifiques au dashboard */
.welcome {
    text-align: center;
    margin-bottom: 20px;
}

.stats {
    margin: 20px 0;
    padding: 20px;
    background-color: #fafafa;
    border: 1px solid #ddd;
    border-radius: 4px;
}

/* Ligne utilisateur inactive */
.table tr.inactive td {
    opacity: 0.6;
    color: #6b7280;            /* gris texte */
    background: #f9fafb;       /* fond léger */
}

/* Optionnel : barrer légèrement le nom/prénom (si tu veux) */
.table tr.inactive td:nth-child(2),
.table tr.inactive td:nth-child(3) {
    text-decoration: line-through;
    text-decoration-thickness: 1px;
}

/* Garder les boutons lisibles même si la ligne est en opacity */
.table tr.inactive td:last-child {
    opacity: 1;
}

.table tr.inactive td:last-child .btn {
    opacity: 0.9;
    filter: grayscale(0.4);
}

/* Optionnel : au survol, on met en évidence quand même */
.table tr.inactive:hover td {
    background: #f3f4f6;
}


/* --- Layout général --- */

h2{
    margin: 0 0 18px;
    font-size: 1.6rem;
    line-height: 1.2;
}

/* --- Form --- */
form{
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 14px;
    padding: 18px;
    box-shadow: 0 10px 30px rgba(0,0,0,.06);
}

.form-group{
    display: grid;
    gap: 8px;
    margin-bottom: 14px;
}

.form-group input {
    width: auto !important;
}

label{
    font-weight: 600;
    color: #111827;
    font-size: .95rem;
}

input[type="text"],
input[type="email"],
input[type="number"],
input[type="password"],
select{
    width: 100%;
    padding: 11px 12px;
    border: 1px solid #d1d5db;
    border-radius: 10px;
    background: #fff;
    color: #111827;
    font-size: 1rem;
    outline: none;
    transition: border-color .15s ease, box-shadow .15s ease, transform .05s ease;
}

input::placeholder{
    color: #9ca3af;
}

/* Focus clair */
input:focus,
select:focus{
    border-color: #6366f1;
    box-shadow: 0 0 0 4px rgba(99,102,241,.15);
}

/* --- Bouton --- */
.btn{
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 14px;
    border-radius: 10px;
    border: 1px solid transparent;
    background: #111827;
    color: #fff;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    transition: transform .05s ease, opacity .15s ease, box-shadow .15s ease, background .15s ease;
}

.btn:hover{
    background: #0b1220;
    box-shadow: 0 10px 18px rgba(17,24,39,.18);
}

.btn:active{
    transform: translateY(1px);
    opacity: .95;
}

/* Bouton full width sur mobile */
.form-group button.btn{
    width: 100%;
    margin-top: 6px;
}

/* --- Alertes --- */
.alert{
    border-radius: 12px;
    padding: 12px 14px;
    margin: 0 0 16px;
    border: 1px solid transparent;
    font-weight: 600;
}

.alert-info{
    background: #eff6ff;
    border-color: #bfdbfe;
    color: #1d4ed8;
}

.alert-success{
    background: #ecfdf5;
    border-color: #a7f3d0;
    color: #065f46;
}

.alert-error{
    background: #fef2f2;
    border-color: #fecaca;
    color: #991b1b;
}

/* --- Responsive --- */
@media (min-width: 640px){
    form{
        padding: 22px;
    }
}

/* --- Bonus : petite aide visuelle pour select --- */
select{
    appearance: none;
    background-image:
            linear-gradient(45deg, transparent 50%, #6b7280 50%),
            linear-gradient(135deg, #6b7280 50%, transparent 50%);
    background-position:
            calc(100% - 18px) 50%,
            calc(100% - 13px) 50%;
    background-size: 6px 6px, 6px 6px;
    background-repeat: no-repeat;
    padding-right: 34px;
}



/* TABLEAU MODERNE */

/* Conteneur optionnel pour scroll horizontal si besoin */
.table-container {
    margin: 20px 0;
    overflow-x: auto;
}

/* Table globale */
.table {
    width: 100%;
    border-collapse: collapse;
    min-width: 700px; /* Optionnel, si vous voulez une largeur min */
    background-color: #fff;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

/* En-tête */
.table thead {
    background-color: #f8f9fa;
    text-transform: uppercase;
}
.table thead th {
    padding: 12px 15px;
    font-weight: 600;
    font-size: 0.9rem;
    color: #333;
    border-bottom: 1px solid #ddd;
}

/* Corps du tableau */
.table tbody tr {
    border-bottom: 1px solid #ddd;
    transition: background-color 0.2s ease;
}
.table tbody tr:hover {
    background-color: #f1f1f1;
}

.table td {
    padding: 12px 15px;
    font-size: 0.9rem;
    color: #555;
    vertical-align: middle;
    text-align: center;
}

/* Badges de statut */
.status-badge {
    display: inline-block;
    padding: 5px 10px;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 600;
    color: #fff;
    text-transform: capitalize;
    background-color: #6c757d; /* Couleur par défaut (gris) */
}

.status-progress {
    background-color: #28a745; /* Vert */
}
.status-open {
    background-color: #ffc107; /* Jaune */
    color: #000;
}
.status-onhold {
    background-color: #dc3545; /* Rouge */
}

.btn {
    display: inline-block;
    background-color: var(--primary-color);
    color: #fff;
    padding: 10px 15px;
    border-radius: 4px;
    text-decoration: none;
    margin-right: 10px;
    transition: background-color 0.2s ease;
}
.btn:hover {
    background-color: var(--secondary-color);
}

/* Styles pour les alertes */
.alert {
    padding: 15px;
    margin-bottom: 20px;
    border-radius: 4px;
    text-align: center;
    font-weight: bold;
    font-size: 1rem;
}

.alert-success {
    background-color: #d4edda;  /* Vert clair */
    color: #155724;             /* Vert foncé */
    border: 1px solid #c3e6cb;
}

.alert-error {
    background-color: #f8d7da;  /* Rouge pâle */
    color: #721c24;             /* Rouge foncé */
    border: 1px solid #f5c6cb;
}

.alert-info {
    background-color: #fff3cd;  /* Jaune clair */
    color: #856404;             /* Jaune foncé */
    border: 1px solid #ffeeba;
}
