/* ===================================================================
   INTERFACE.CSS - ASTRA-FLOW
   Styles globaux partagés par toutes les pages
   =================================================================== */

/* ===================================================================
   BASE
   =================================================================== */

body {
    margin: 0;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #1a1a2e;
    color: #eee;
}

/* ===================================================================
   HEADER
   =================================================================== */

header {
    background: #16213e;
    border-bottom: 2px solid #0f3460;
}

.header-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 30px;
    max-width: 1300px;
    margin: 0 auto;
    box-sizing: border-box;
}

.brand {
    font-size: 1.2rem;
}

.brand strong {
    color: #4ecca3;
}

.user-info {
    font-size: 0.9rem;
}

.client-name {
    color: #4ecca3;
    font-weight: bold;
    margin-right: 15px;
}

.logout-btn {
    color: #e94560;
    text-decoration: none;
    font-weight: bold;
    border: 1px solid #e94560;
    padding: 5px 12px;
    border-radius: 4px;
    transition: 0.3s;
}

.logout-btn:hover {
    background: #e94560;
    color: white;
}

/* ===================================================================
   NAVIGATION
   =================================================================== */

.main-nav {
    display: flex;
    gap: 5px;
}

.nav-link {
    color: #eee;
    text-decoration: none;
    padding: 7px 14px;
    border-radius: 6px;
    font-size: 0.9rem;
    transition: 0.2s;
    border: 1px solid transparent;
}

.nav-link:hover,
.nav-link.active {
    background: #0f3460;
    border-color: #4ecca3;
    color: #4ecca3;
}

.nav-admin {
    color: #f0a500;
}

.nav-admin:hover,
.nav-admin.active {
    border-color: #f0a500;
    color: #f0a500;
    background: #0f3460;
}

/* ===================================================================
   MAIN CONTENT
   =================================================================== */

main {
    padding: 30px;
    max-width: 1300px;
    margin: 0 auto;
}

/* ===================================================================
   CARDS
   =================================================================== */

.card {
    background: #16213e;
    border-radius: 10px;
    padding: 20px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
    margin-bottom: 25px;
}

.card h3 {
    margin-top: 0;
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.1rem;
    border-bottom: 1px solid #0f3460;
    padding-bottom: 10px;
}

/* ===================================================================
   TABLES
   =================================================================== */

.data-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 10px;
    font-size: 0.9rem;
}

.data-table th {
    text-align: left;
    color: #4ecca3;
    padding: 12px 8px;
    border-bottom: 2px solid #0f3460;
}

.data-table td {
    padding: 12px 8px;
    border-bottom: 1px solid #1a1a2e;
}

.td-meta {
    color: #888;
    font-size: 0.8rem;
    white-space: nowrap;
}

.th-check,
.td-check {
    width: 36px;
    text-align: center;
}

.status-badge {
    padding: 3px 8px;
    border-radius: 4px;
    font-size: 0.75rem;
    background: #0f3460;
}

.empty-msg  { color: #888; font-style: italic; font-size: 0.9rem; }
.error-msg  { color: #e94560; font-size: 0.85rem; }
.empty-cell { text-align: center; padding: 20px; color: #888; font-style: italic; }

/* ===================================================================
   ALERTES
   =================================================================== */

.alert {
    padding: 12px 16px;
    border-radius: 6px;
    margin-bottom: 20px;
    font-size: 0.9rem;
}

.alert-success { background: #1a3a2a; border: 1px solid #4ecca3; color: #4ecca3; }
.alert-error   { background: #3a1a1a; border: 1px solid #e94560; color: #e94560; }
.alert-warning { background: #3a2e1a; border: 1px solid #f0a500; color: #f0a500; }
.alert-info    { background: #1a2a3a; border: 1px solid #4ecca3; color: #4ecca3; }

/* ===================================================================
   BADGES
   =================================================================== */

.badge-success {
    background: #1a3a2a;
    border: 1px solid #4ecca3;
    color: #4ecca3;
    padding: 3px 8px;
    border-radius: 4px;
    font-size: 0.75rem;
}

.badge-error {
    background: #e94560;
    color: white;
    padding: 3px 8px;
    border-radius: 4px;
    font-size: 0.75rem;
}

.badge-warning {
    background: #f0a500;
    color: #1a1a2e;
    padding: 3px 8px;
    border-radius: 4px;
    font-size: 0.75rem;
}

/* ===================================================================
   BOUTONS GLOBAUX
   =================================================================== */

.submit-btn {
    margin-top: 15px;
    width: 100%;
    padding: 12px;
    background: #4ecca3;
    color: #1a1a2e;
    border: none;
    border-radius: 6px;
    font-weight: bold;
    cursor: pointer;
    font-size: 0.95rem;
    transition: 0.2s;
}

.submit-btn:hover { background: #3db892; }

.btn-primary {
    padding: 8px 16px;
    background: #0f3460;
    color: #4ecca3;
    border: 1px solid #4ecca3;
    border-radius: 6px;
    font-size: 0.85rem;
    cursor: pointer;
    transition: 0.2s;
    text-decoration: none;
    display: inline-block;
}

.btn-primary:hover { background: #4ecca3; color: #1a1a2e; }

.btn-success {
    padding: 8px 16px;
    background: transparent;
    color: #4ecca3;
    border: 1px solid #4ecca3;
    border-radius: 6px;
    font-size: 0.85rem;
    cursor: pointer;
    transition: 0.2s;
}

.btn-success:hover { background: #4ecca3; color: #1a1a2e; }

.btn-danger {
    padding: 8px 16px;
    background: transparent;
    color: #e94560;
    border: 1px solid #e94560;
    border-radius: 6px;
    font-size: 0.85rem;
    cursor: pointer;
    transition: 0.2s;
}

.btn-danger:hover { background: #e94560; color: white; }

.btn-warning {
    padding: 8px 16px;
    background: transparent;
    color: #f0a500;
    border: 1px solid #f0a500;
    border-radius: 6px;
    font-size: 0.85rem;
    cursor: pointer;
    transition: 0.2s;
}

.btn-warning:hover { background: #f0a500; color: #1a1a2e; }

.btn-sm {
    padding: 5px 12px;
    font-size: 0.8rem;
}

/* ===================================================================
   LOGOS
   =================================================================== */

.brand-logo {
    height: 40px;
    width: auto;
    vertical-align: middle;
    margin-right: 8px;
}

.login-logo {
    height: 80px;
    width: auto;
    display: block;
    margin: 0 auto 0.5rem auto;
}

/* ===================================================================
   REFRESH INDICATOR
   =================================================================== */

.refresh-indicator {
    font-size: 0.8rem;
    opacity: 0.5;
    margin-left: 8px;
    display: inline-block;
    transition: opacity 0.3s;
}

.refresh-indicator.spinning {
    opacity: 1;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to   { transform: rotate(360deg); }
}

/* ===================================================================
   LOGIN PAGE
   =================================================================== */

.login-page {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100vh;
}

.login-card {
    background: #16213e;
    padding: 2rem;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
    width: 100%;
    max-width: 350px;
    border: 1px solid #0f3460;
}

.login-card h2 {
    text-align: center;
    color: #4ecca3;
    margin-bottom: 1.5rem;
    border-bottom: none;
    padding-bottom: 0;
}

.login-card input {
    width: 100%;
    padding: 12px;
    background: #0f3460;
    border: 1px solid #1a1a2e;
    border-radius: 6px;
    color: white;
    box-sizing: border-box;
    margin-bottom: 1rem;
}

.login-card button {
    width: 100%;
    padding: 12px;
    background: #4ecca3;
    color: #1a1a2e;
    border: none;
    border-radius: 6px;
    font-weight: bold;
    cursor: pointer;
}

.login-card button:hover { background: #3db892; }

.error {
    background: #e94560;
    color: white;
    padding: 10px;
    border-radius: 4px;
    font-size: 0.8rem;
    margin-bottom: 1rem;
    line-height: 1.4;
}