/* CSS spécifique à l’espace employeur */

/* Reset simple */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    overflow-y: scroll;
}

body {
    font-family: Arial, sans-serif;
    background: #f5f5f5;
    color: #111827;
}

/* Layout général */
.app {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* NAVBAR */
.navbar {
    height: 60px;
    display: flex;
    align-items: center;
    padding: 0 18px;
    background: #0f172a;
    color: #e5e7eb;
    box-shadow: 0 12px 30px rgba(15, 23, 42, 0.6);
}

.navbar-left {
    display: flex;
    align-items: center;
    gap: 10px;
}

.logo {
    width: 32px;
    height: 32px;
    border-radius: 12px;
    background: linear-gradient(135deg, #4f46e5, #a855f7);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 16px;
    color: #ffffff;
}

.brand {
    display: flex;
    flex-direction: column;
}

.brand-title {
    font-size: 15px;
    font-weight: 600;
}

.brand-sub {
    font-size: 12px;
    color: #9ca3af;
}

.navbar-right {
    margin-left: auto;
    display: flex;
    align-items: center;
    gap: 10px;
}

/* Boutons navbar + génériques */
button {
    font-family: inherit;
    border: none;
    cursor: pointer;
    background: none;
}

.nav-btn,
.btn-primary,
.btn-secondary {
    border-radius: 999px;
    padding: 8px 16px;
    font-size: 14px;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    transition:
        background 0.15s ease,
        color 0.15s ease,
        border-color 0.15s ease,
        box-shadow 0.15s ease,
        transform 0.1s ease;
}

/* Bouton navbar par défaut */
.nav-btn {
    background: transparent;
    color: #e5e7eb;
    border: 1px solid rgba(148, 163, 184, 0.4);
}

.nav-btn:hover {
    background: rgba(148, 163, 184, 0.2);
}

/* Bouton déconnexion (navbar) */
.nav-logout-employeur {
    background: #ef4444;
    border-color: #ef4444;
}

.nav-logout-employeur:hover {
    background: #b91c1c;
}

/* Bouton primaire générique */
.btn-primary {
    background: #4f46e5;
    color: #ffffff;
    box-shadow: 0 8px 18px rgba(79, 70, 229, 0.35);
}

.btn-primary:hover {
    background: #4338ca;
    transform: translateY(-1px);
    box-shadow: 0 10px 24px rgba(79, 70, 229, 0.45);
}

/* Bouton secondaire générique */
.btn-secondary {
    background: #e5e7eb;
    color: #111827;
}

.btn-secondary:hover {
    background: #d1d5db;
}

.btn-small {
    padding: 6px 12px;
    font-size: 13px;
    border-radius: 999px;
}

/* États utilitaires */
.hidden {
    display: none !important;
}

.active {
    /* utilisé pour les panels / onglets, géré plus bas si besoin */
}

/* CONTENU PRINCIPAL : pleine largeur, plus centré */
.main {
    margin: 30px 0 40px;   /* plus de margin auto au centre */
    max-width: none;       /* on enlève la limite 1100px */
    padding: 0;            /* pas de padding qui décale à droite */
    flex: 1;
}

.section {
    margin-top: 24px;
    margin-bottom: 32px;
}

.section h1 {
    font-size: 28px;
    margin-bottom: 8px;
}

.section p {
    font-size: 16px;
    line-height: 1.5;
    color: #4b5563;
}

/* Texte intro */
.intro {
    font-size: 16px;
    color: #4b5563;
    margin-bottom: 20px;
    max-width: 700px;
}

/* CARTES */
.card {
    background: #ffffff;
    border-radius: 12px;
    padding: 20px 24px;
    box-shadow: 0 10px 25px rgba(15, 23, 42, 0.08);
    margin-bottom: 24px;
}

.card-auth {
    max-width: 420px;
    margin-top: 24px;
}

/* FORMULAIRE CONNEXION EMPLOYEUR */
.auth-body {
    padding: 8px 4px;
}

.auth-form {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.form-group label {
    font-size: 14px;
    font-weight: 600;
    color: #374151;
}

.auth-form input[type="email"],
.auth-form input[type="password"] {
    border: 1px solid #d1d5db;
    border-radius: 8px;
    padding: 10px 12px;
    font: inherit;
    transition:
        border-color 0.15s ease,
        box-shadow 0.15s ease;
}

.auth-form input[type="email"]:focus,
.auth-form input[type="password"]:focus {
    outline: none;
    border-color: #4f46e5;
    box-shadow: 0 0 0 1px rgba(79, 70, 229, 0.35);
}

.form-message {
    font-size: 13px;
    margin-top: 4px;
    min-height: 16px;
    color: #6b7280;
}

.form-message.error {
    color: #b91c1c;
}

.form-message.success {
    color: #15803d;
}

/* LAYOUT : onglets à gauche, contenu à droite */
.espace-layout {
    display: flex;
    align-items: flex-start;   /* la colonne de gauche ne prend pas la hauteur de la carte */
    gap: 24px;
    margin-top: 24px;
    padding-left: 10px; /* 👈 Décale toute la zone de 20px depuis le bord */
}

/* ONGLET = COLONNE FIXE À GAUCHE */
.espace-sidebar {
    flex: 0 0 220px;           /* largeur FIXE 220px, ne bouge pas */
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-left: 1px; /* 👈 juste les onglets */
}

/* CONTENU = COLONNE À DROITE QUI S'ADAPTE */
.espace-content {
    flex: 1;                   /* prend tout le reste de la place */
    min-width: 0;
}

/* Boutons d’onglets */
.espace-tab-btn {
    width: 100%;
    text-align: left;
    padding: 10px 14px;
    border-radius: 10px;
    background: #0b1120;
    color: #e5e7eb;
    font-size: 14px;
    font-weight: 500;
    border: 1px solid rgba(148, 163, 184, 0.25);
}

.espace-tab-btn:hover {
    background: #111827;
}

.espace-tab-btn.active {
    background: #eef2ff;
    color: #4f46e5;
    box-shadow: 0 0 0 1px rgba(79, 70, 229, 0.55);
    border-color: transparent;
}



.espace-card {
    margin-bottom: 0;
    border: 1px solid #e5e7eb;
    width: 98%;
}

.espace-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 12px;
}

.espace-header h2 {
    font-size: 20px;
}

/* PANELS EMPLOYEUR (docs, tous les docs, etc.) */
.emp-panel {
    display: none;
}

.emp-panel.active {
    display: block;
}

/* TABLEAUX DE FICHIERS */
.files-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 8px;
    font-size: 14px;
}

.files-table thead {
    background: #f3f4f6;
}

.files-table th,
.files-table td {
    padding: 10px 12px;
    text-align: left;
    border-bottom: 1px solid #e5e7eb;
}

.files-table th {
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: #6b7280;
}

.files-table tbody tr:hover {
    background: #f9fafb;
}

/* Lignes vides / messages de liste */
.files-empty,
#emp-files-empty,
#emp-all-files-empty {
    font-size: 14px;
    color: #6b7280;
    padding: 8px 0 4px;
}

/* Boutons d’action dans les tableaux */
.files-table td button {
    margin-right: 4px;
    margin-bottom: 4px;
}

/* POPUP CONFIRMATION GLOBALE */
.confirm-overlay {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.45);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 50;
}

.confirm-box {
    background: #ffffff;
    padding: 20px 24px;
    border-radius: 14px;
    box-shadow: 0 18px 45px rgba(15, 23, 42, 0.35);
    max-width: 360px;
    width: 100%;
}

.confirm-box p {
    margin-bottom: 16px;
    font-size: 15px;
    color: #111827;
}

.confirm-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}

/* TAGS DE STATUT (si utilisés côté HTML/JS plus tard) */
.statut-tag {
    display: inline-flex;
    align-items: center;
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 600;
}

.statut-en_attente {
    background: #fef3c7;
    color: #92400e;
}

.statut-en_cours {
    background: #e0f2fe;
    color: #075985;
}

.statut-valide {
    background: #dcfce7;
    color: #166534;
}

.statut-refuse {
    background: #fee2e2;
    color: #b91c1c;
}

.statut-archive {
    background: #e5e7eb;
    color: #374151;
}

/* ===================== */
/* Carte "Documents à traiter" */
/* ===================== */

#emp-panel-docs .espace-card > p {
    font-size: 14px;
    color: #6b7280;
    margin-bottom: 12px;
}

#emp-panel-docs .espace-card {
    border: 1px solid #e5e7eb;
}

/* Message vide centré */
#emp-files-empty {
    text-align: center;
    font-style: italic;
    padding: 10px 0 4px;
}

/* ===================== */
/* Boutons d’action : En cours / Valider / Refuser / Archiver */
/* ===================== */

.btn-status-en_cours {
    background: #e0f2fe;
    color: #075985;
}

.btn-status-en_cours:hover {
    background: #bae6fd;
}

.btn-status-valide {
    background: #dcfce7;
    color: #166534;
}

.btn-status-valide:hover {
    background: #bbf7d0;
}

.btn-status-refuse {
    background: #fee2e2;
    color: #b91c1c;
}

.btn-status-refuse:hover {
    background: #fecaca;
}

.btn-status-archive {
    background: #e5e7eb;
    color: #374151;
}

.btn-status-archive:hover {
    background: #d1d5db;
}

/* RESPONSIVE */
@media (max-width: 900px) {
    .main {
        margin-top: 16px;
    }

    .espace-layout {
        flex-direction: column;
    }

    .espace-sidebar {
        width: 100%;
        max-width: 100%;
        flex-direction: row;
        overflow-x: auto;
        padding-bottom: 4px;
    }

    .espace-tab-btn {
        white-space: nowrap;
    }
}

.btn-view-doc {
    background: #e0f2fe;
    color: #075985;
}

.btn-view-doc:hover {
    background: #bae6fd;
}

.btn-download-doc {
    background: #fef3c7;
    color: #92400e;
}

.btn-download-doc:hover {
    background: #fde68a;
}
