/* ==========================================================================
   LAYOUT UNIFIÉ & SIDEBAR FIXE - DESIGN SYSTEM DIRECTION
   ========================================================================== */
body.dir-layout { display: flex; height: 100vh; width: 100vw; margin: 0; overflow: hidden; background-color: #f8fafc; font-family: system-ui, -apple-system, sans-serif; }

/* Sidebar fixe */
.dir-sidebar { width: 260px; background: #0f172a; color: #f8fafc; display: flex; flex-direction: column; padding: 1.5rem; flex-shrink: 0; box-sizing: border-box; height: 100vh; position: sticky; top: 0; }
.sidebar-header { display: flex; align-items: center; gap: 0.85rem; padding-bottom: 1.5rem; border-bottom: 1px solid rgba(255, 255, 255, 0.1); margin-bottom: 1.5rem; }
.sidebar-logo { height: 42px; width: auto; max-width: 48px; object-fit: contain; }
.sidebar-title h2 { font-size: 1.05rem; font-weight: 700; margin: 0; color: #ffffff; }
.sidebar-title span { font-size: 0.75rem; color: #38bdf8; font-weight: 600; }
.sidebar-nav { display: flex; flex-direction: column; gap: 0.5rem; }
.nav-link { color: #cbd5e1; text-decoration: none; padding: 0.75rem 1rem; border-radius: 6px; font-weight: 600; font-size: 0.9rem; display: flex; align-items: center; gap: 8px; transition: all 0.2s ease; }
.nav-link:hover { background: rgba(255, 255, 255, 0.08); color: #ffffff; }
.nav-link.active { background: #1e293b; color: #ffffff; border-left: 4px solid #38bdf8; }

/* Zone de contenu principale */
.dir-main { flex: 1; height: 100vh; overflow-y: auto; padding: 2.5rem; box-sizing: border-box; }

/* Typographie & Cartes */
.card-box { background: white; border-radius: 8px; border: 1px solid #e2e8f0; overflow: hidden; box-shadow: 0 4px 6px -1px rgba(0,0,0,0.05); }
.tabs { display: flex; gap: 1rem; border-bottom: 2px solid #e2e8f0; margin-bottom: 1.5rem; }
.tab-btn { padding: 0.75rem 1.5rem; background: none; border: none; font-size: 1rem; font-weight: 600; color: #64748b; cursor: pointer; border-bottom: 3px solid transparent; margin-bottom: -2px; transition: 0.2s; }
.tab-btn.active { color: #0284c7; border-bottom-color: #0284c7; }
.tab-pane { display: none; animation: fadeIn 0.3s ease; }
.tab-pane.active { display: block; }

/* Tableaux & Badges */
.data-table { width: 100%; border-collapse: collapse; }
.data-table th { background: #f8fafc; text-align: left; border-bottom: 1px solid #e2e8f0; font-size: 0.85rem; color: #64748b; padding: 1rem; }
.data-table td { padding: 1rem; border-bottom: 1px solid #f1f5f9; font-size: 0.9rem; }
.badge-active { background: #dcfce7; color: #166534; padding: 4px 8px; border-radius: 12px; font-size: 0.75rem; font-weight: 700; }
.badge-inactive { background: #fee2e2; color: #991b1b; padding: 4px 8px; border-radius: 12px; font-size: 0.75rem; font-weight: 700; }
.badge-pole { background: #e0f2fe; color: #0369a1; padding: 4px 8px; border-radius: 6px; font-size: 0.8rem; font-weight: 600; }

/* Boutons & Formulaires */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem; padding: 0.75rem 1.5rem; font-size: 0.95rem; font-weight: 700; border-radius: 8px; cursor: pointer; border: none; text-decoration: none; transition: all 0.2s; }
.btn-primary { background: #0284c7; color: #ffffff; }
.btn-primary:hover { background: #0369a1; }
.btn-outline { background: #ffffff; color: #475569; border: 1px solid #cbd5e1; }
.btn-outline:hover { background: #f1f5f9; color: #0f172a; }
.btn-sm { padding: 4px 10px; font-size: 0.8rem; border-radius: 6px; }

.form-group { display: flex; flex-direction: column; gap: 0.5rem; margin-bottom: 1rem; }
.form-group label { font-size: 0.9rem; font-weight: 600; color: #334155; }
.input-form { width: 100%; padding: 0.75rem 1rem; font-size: 0.95rem; border: 1px solid #cbd5e1; border-radius: 8px; background: #ffffff; color: #0f172a; box-sizing: border-box; outline: none; }
.input-form:focus { border-color: #0284c7; box-shadow: 0 0 0 3px rgba(2, 132, 199, 0.15); }
.input-form[readonly] { background: #f1f5f9; color: #64748b; cursor: not-allowed; }

/* Modales */
.modal-overlay { position: fixed; top: 0; left: 0; right: 0; bottom: 0; background: rgba(15, 23, 42, 0.6); display: none; justify-content: center; align-items: center; z-index: 1000; }
.modal { background: white; width: 100%; max-width: 500px; border-radius: 12px; padding: 2rem; box-shadow: 0 20px 25px -5px rgba(0,0,0,0.1); max-height: 90vh; overflow-y: auto; }
.modal-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 1.5rem; border-bottom: 1px solid #e2e8f0; padding-bottom: 0.5rem; }
.close-btn { background: none; border: none; font-size: 1.5rem; cursor: pointer; color: #64748b; }

.alert { padding: 1rem; border-radius: 8px; margin-bottom: 1.5rem; font-weight: 600; }
.alert-error { background: #fee2e2; color: #991b1b; border: 1px solid #f87171; }

@keyframes fadeIn { from { opacity: 0; transform: translateY(5px); } to { opacity: 1; transform: translateY(0); } }
