/**
 * Radio Manager - Styles Principaux
 * 
 * Charte graphique:
 * - Bleu primaire: #1E3A5F
 * - Rouge accent: #D4302E
 * - Texte: #000000
 * - Fond texte: #FFFFFF
 * 
 * @version 3.0.0
 */

/* ============================================
   CSS VARIABLES (Custom Properties)
   ============================================ */
:root {
    /* Couleurs principales */
    --primary: #1E3A5F;
    --primary-dark: #152942;
    --primary-light: #2A4D7A;
    --primary-rgb: 30, 58, 95;
    
    --secondary: #D4302E;
    --secondary-light: #E04543;
    --secondary-lighter: #E86B69;
    --secondary-rgb: 212, 48, 46;
    
    /* Couleurs de statut */
    --success: #28a745;
    --success-light: #d4edda;
    --warning: #ffc107;
    --warning-light: #fff3cd;
    --danger: #D4302E;
    --danger-light: #FDEAEA;
    --info: #17a2b8;
    --info-light: #d1ecf1;
    
    /* Neutres */
    --white: #FFFFFF;
    --gray-50: #F9FAFB;
    --gray-100: #F3F4F6;
    --gray-200: #E5E7EB;
    --gray-300: #D1D5DB;
    --gray-400: #9CA3AF;
    --gray-500: #6B7280;
    --gray-600: #4B5563;
    --gray-700: #374151;
    --gray-800: #1F2937;
    --gray-900: #111827;
    --black: #000000;
    
    /* Backgrounds */
    --bg-body: #F5F5F5;
    --bg-card: #FFFFFF;
    --bg-sidebar: #1E3A5F;
    --bg-sidebar-hover: #2A4D7A;
    --bg-header: #FFFFFF;
    
    /* Textes */
    --text-primary: #000000;
    --text-secondary: #4B5563;
    --text-muted: #6B7280;
    --text-light: #FFFFFF;
    --text-link: #1E3A5F;
    
    /* Bordures */
    --border-color: #E5E7EB;
    --border-radius: 0.5rem;
    --border-radius-sm: 0.25rem;
    --border-radius-lg: 0.75rem;
    --border-radius-xl: 1rem;
    
    /* Ombres */
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    
    /* Transitions */
    --transition-fast: 150ms ease;
    --transition: 200ms ease;
    --transition-slow: 300ms ease;
    
    /* Sidebar */
    --sidebar-width: 260px;
    --sidebar-collapsed-width: 70px;
    
    /* Header */
    --header-height: 64px;
    
    /* Z-index */
    --z-dropdown: 1000;
    --z-sticky: 1020;
    --z-fixed: 1030;
    --z-modal-backdrop: 1040;
    --z-modal: 1050;
    --z-popover: 1060;
    --z-tooltip: 1070;
}

/* ============================================
   RESET & BASE
   ============================================ */
*, *::before, *::after {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    font-size: 0.9375rem;
    line-height: 1.6;
    color: var(--text-primary);
    background-color: var(--bg-body);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* ============================================
   TYPOGRAPHY
   ============================================ */
h1, h2, h3, h4, h5, h6 {
    font-weight: 600;
    line-height: 1.3;
    margin-bottom: 0.5rem;
    color: var(--secondary);
}

h1 { font-size: 2.25rem; }
h2 { font-size: 1.875rem; }
h3 { font-size: 1.5rem; }
h4 { font-size: 1.25rem; }
h5 { font-size: 1.125rem; }
h6 { font-size: 1rem; }

.text-primary { color: var(--primary) !important; }
.text-secondary { color: var(--text-secondary) !important; }
.text-muted { color: var(--text-muted) !important; }
.text-success { color: var(--success) !important; }
.text-danger { color: var(--danger) !important; }
.text-warning { color: var(--warning) !important; }
.text-info { color: var(--info) !important; }

/* ============================================
   LINKS
   ============================================ */
a {
    color: var(--primary);
    text-decoration: none;
    transition: color var(--transition);
}

a:hover {
    color: var(--primary-dark);
    text-decoration: none;
}

/* ============================================
   BUTTONS
   ============================================ */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.625rem 1.25rem;
    font-size: 0.9375rem;
    font-weight: 500;
    line-height: 1.5;
    border-radius: var(--border-radius);
    border: 1px solid transparent;
    cursor: pointer;
    transition: all var(--transition);
    text-decoration: none;
}

.btn:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(var(--primary-rgb), 0.25);
}

/* Primary Button */
.btn-primary {
    background-color: var(--primary);
    border-color: var(--primary);
    color: var(--white);
}

.btn-primary:hover, .btn-primary:focus {
    background-color: var(--primary-dark);
    border-color: var(--primary-dark);
    color: var(--white);
}

/* Secondary Button (Dark) */
.btn-secondary {
    background-color: var(--secondary);
    border-color: var(--secondary);
    color: var(--white);
}

.btn-secondary:hover, .btn-secondary:focus {
    background-color: var(--secondary-light);
    border-color: var(--secondary-light);
    color: var(--white);
}

/* Outline Buttons */
.btn-outline-primary {
    background-color: transparent;
    border-color: var(--primary);
    color: var(--primary);
}

.btn-outline-primary:hover, .btn-outline-primary:focus {
    background-color: var(--primary);
    border-color: var(--primary);
    color: var(--white);
}

.btn-outline-secondary {
    background-color: transparent;
    border-color: var(--secondary);
    color: var(--secondary);
}

.btn-outline-secondary:hover, .btn-outline-secondary:focus {
    background-color: var(--secondary);
    border-color: var(--secondary);
    color: var(--white);
}

/* Danger Buttons (rouge du logo) */
.btn-danger {
    background-color: var(--danger);
    border-color: var(--danger);
    color: var(--white);
}

.btn-danger:hover, .btn-danger:focus {
    background-color: var(--primary-dark);
    border-color: var(--primary-dark);
    color: var(--white);
}

.btn-outline-danger {
    background-color: transparent;
    border-color: var(--danger);
    color: var(--danger);
}

.btn-outline-danger:hover, .btn-outline-danger:focus {
    background-color: var(--danger);
    border-color: var(--danger);
    color: var(--white);
}

/* Light Button */
.btn-light {
    background-color: var(--gray-100);
    border-color: var(--gray-200);
    color: var(--text-primary);
}

.btn-light:hover, .btn-light:focus {
    background-color: var(--gray-200);
    border-color: var(--gray-300);
    color: var(--text-primary);
}

/* Button Sizes */
.btn-sm {
    padding: 0.375rem 0.75rem;
    font-size: 0.875rem;
}

.btn-lg {
    padding: 0.875rem 1.75rem;
    font-size: 1.0625rem;
}

.btn-icon {
    width: 2.5rem;
    height: 2.5rem;
    padding: 0;
}

.btn-icon.btn-sm {
    width: 2rem;
    height: 2rem;
}

/* ============================================
   CARDS
   ============================================ */
.card {
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow-sm);
    transition: box-shadow var(--transition);
}

.card:hover {
    box-shadow: var(--shadow);
}

.card-header {
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid var(--border-color);
    background-color: transparent;
}

.card-header h5, .card-header h4 {
    margin-bottom: 0;
}

.card-body {
    padding: 1.5rem;
}

.card-footer {
    padding: 1rem 1.5rem;
    border-top: 1px solid var(--border-color);
    background-color: var(--gray-50);
}

/* Card accent (bordure rouge à gauche) */
.card-accent {
    border-left: 4px solid var(--primary);
}

/* ============================================
   FORMS
   ============================================ */
.form-label {
    font-weight: 500;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
}

.form-control {
    display: block;
    width: 100%;
    padding: 0.625rem 1rem;
    font-size: 0.9375rem;
    line-height: 1.5;
    color: var(--text-primary);
    background-color: var(--white);
    border: 1px solid var(--gray-300);
    border-radius: var(--border-radius);
    transition: border-color var(--transition), box-shadow var(--transition);
}

.form-control:focus {
    border-color: var(--primary);
    outline: none;
    box-shadow: 0 0 0 3px rgba(var(--primary-rgb), 0.15);
}

.form-control::placeholder {
    color: var(--text-muted);
}

.form-control:disabled, .form-control[readonly] {
    background-color: var(--gray-100);
    cursor: not-allowed;
}

.form-control.is-invalid {
    border-color: var(--danger);
}

.form-control.is-valid {
    border-color: var(--success);
}

.invalid-feedback {
    display: none;
    color: var(--danger);
    font-size: 0.875rem;
    margin-top: 0.25rem;
}

.is-invalid ~ .invalid-feedback {
    display: block;
}

/* Form Select */
.form-select {
    display: block;
    width: 100%;
    padding: 0.625rem 2.5rem 0.625rem 1rem;
    font-size: 0.9375rem;
    color: var(--text-primary);
    background-color: var(--white);
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%23374151' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M2 5l6 6 6-6'/%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 0.75rem center;
    background-size: 16px 12px;
    border: 1px solid var(--gray-300);
    border-radius: var(--border-radius);
    appearance: none;
    cursor: pointer;
    transition: border-color var(--transition), box-shadow var(--transition);
}

.form-select:focus {
    border-color: var(--primary);
    outline: none;
    box-shadow: 0 0 0 3px rgba(var(--primary-rgb), 0.15);
}

/* Checkbox & Radio */
.form-check-input {
    width: 1.125rem;
    height: 1.125rem;
    margin-top: 0.125rem;
    margin-right: 0.5rem;
    background-color: var(--white);
    border: 1px solid var(--gray-400);
    transition: all var(--transition);
    cursor: pointer;
}

.form-check-input:checked {
    background-color: var(--primary);
    border-color: var(--primary);
}

.form-check-input:focus {
    box-shadow: 0 0 0 3px rgba(var(--primary-rgb), 0.15);
}

/* ============================================
   BADGES
   ============================================ */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 0.35rem 0.65rem;
    font-size: 0.75rem;
    font-weight: 600;
    line-height: 1;
    border-radius: var(--border-radius-sm);
}

.badge-primary {
    background-color: rgba(var(--primary-rgb), 0.1);
    color: var(--primary);
}

.badge-secondary {
    background-color: var(--gray-200);
    color: var(--gray-700);
}

.badge-success {
    background-color: var(--success-light);
    color: var(--success);
}

.badge-danger {
    background-color: var(--danger-light);
    color: var(--danger);
}

.badge-warning {
    background-color: var(--warning-light);
    color: #856404;
}

.badge-info {
    background-color: var(--info-light);
    color: var(--info);
}

/* Label badges (fond léger avec texte coloré) */
.bg-label-primary {
    background-color: rgba(var(--primary-rgb), 0.15) !important;
    color: var(--primary) !important;
}

.bg-label-secondary {
    background-color: var(--gray-200) !important;
    color: var(--gray-700) !important;
}

.bg-label-success {
    background-color: rgba(40, 199, 111, 0.15) !important;
    color: #28c76f !important;
}

.bg-label-danger {
    background-color: rgba(234, 84, 85, 0.15) !important;
    color: #ea5455 !important;
}

.bg-label-warning {
    background-color: rgba(255, 159, 67, 0.15) !important;
    color: #ff9f43 !important;
}

.bg-label-info {
    background-color: rgba(0, 207, 232, 0.15) !important;
    color: #00cfe8 !important;
}

/* ============================================
   TABLE ACTION BUTTONS (Modern & Uniform)
   ============================================ */
.table-actions {
    display: flex;
    align-items: center;
    gap: 0.35rem;
}

.btn-table-action {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    padding: 0;
    border: 1px solid var(--gray-300);
    border-radius: 6px;
    background: var(--white);
    color: var(--gray-600);
    font-size: 0.875rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-table-action:hover {
    background: var(--gray-100);
    border-color: var(--gray-400);
    color: var(--gray-800);
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0,0,0,0.08);
}

.btn-table-action:active {
    transform: translateY(0);
}

.btn-table-action.disabled,
.btn-table-action:disabled {
    opacity: 0.4;
    cursor: not-allowed;
    pointer-events: none;
}

/* Play button special states */
.btn-table-action.playing {
    background: var(--primary);
    border-color: var(--primary);
    color: white;
}

.btn-table-action.playing:hover {
    background: var(--primary-dark);
    border-color: var(--primary-dark);
    color: white;
}

/* Download buttons group */
.download-actions {
    display: flex;
    gap: 0.25rem;
}

.btn-table-action.btn-download-voice {
    color: var(--primary);
    border-color: rgba(var(--primary-rgb), 0.3);
}

.btn-table-action.btn-download-voice:hover {
    background: rgba(var(--primary-rgb), 0.1);
    border-color: var(--primary);
}

.btn-table-action.btn-download-mix {
    color: var(--success);
    border-color: rgba(40, 199, 111, 0.3);
}

.btn-table-action.btn-download-mix:hover {
    background: rgba(40, 199, 111, 0.1);
    border-color: var(--success);
}

/* Delete button */
.btn-table-action.btn-delete-item {
    color: var(--gray-500);
    border-color: var(--gray-300);
}

.btn-table-action.btn-delete-item:hover {
    background: rgba(234, 84, 85, 0.1);
    border-color: #ea5455;
    color: #ea5455;
}

/* ============================================
   ALERTS
   ============================================ */
.alert {
    padding: 1rem 1.25rem;
    border-radius: var(--border-radius);
    margin-bottom: 1rem;
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
}

.alert-success {
    background-color: var(--success-light);
    border: 1px solid #c3e6cb;
    color: #155724;
}

.alert-danger {
    background-color: var(--danger-light);
    border: 1px solid #f5c6cb;
    color: #721c24;
}

.alert-warning {
    background-color: var(--warning-light);
    border: 1px solid #ffeeba;
    color: #856404;
}

.alert-info {
    background-color: var(--info-light);
    border: 1px solid #bee5eb;
    color: #0c5460;
}

/* ============================================
   TABLES
   ============================================ */
.table {
    width: 100%;
    margin-bottom: 1rem;
    color: var(--text-primary);
    border-collapse: collapse;
}

.table th,
.table td {
    padding: 0.875rem 1rem;
    vertical-align: middle;
    border-bottom: 1px solid var(--border-color);
}

.table thead th {
    font-weight: 600;
    color: var(--text-secondary);
    text-transform: uppercase;
    font-size: 0.75rem;
    letter-spacing: 0.05em;
    background-color: var(--gray-50);
    border-bottom: 2px solid var(--border-color);
}

.table tbody tr:hover {
    background-color: var(--gray-50);
}

.table-striped tbody tr:nth-of-type(odd) {
    background-color: var(--gray-50);
}

/* ============================================
   SIDEBAR
   ============================================ */
.sidebar {
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    width: var(--sidebar-width);
    background-color: var(--bg-sidebar);
    color: var(--white);
    z-index: var(--z-fixed);
    transition: width var(--transition-slow);
    overflow-x: hidden;
    overflow-y: auto;
}

.sidebar-header {
    padding: 1.25rem 1rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    margin: 0.5rem 0.75rem 0;
}

.sidebar-header a {
    flex: 1;
    display: flex;
    justify-content: center;
}

.sidebar-close {
    background: none;
    border: none;
    color: #fff;
    font-size: 1.5rem;
    padding: 0.25rem 0.5rem;
    cursor: pointer;
    opacity: 0.7;
    transition: opacity 0.2s;
    margin-left: 0.5rem;
}

.sidebar-close:hover {
    opacity: 1;
}

.sidebar-logo {
    max-height: 40px;
    width: 100%;
    object-fit: contain;
}

.sidebar-nav {
    padding: 0.5rem 0;
}

.sidebar-section {
    padding: 0.4rem 1.25rem;
    font-size: 0.65rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--gray-500);
    margin-top: 0.75rem;
}

.sidebar-section:first-child {
    margin-top: 0;
}

.sidebar-link {
    display: flex;
    align-items: center;
    padding: 0.5rem 1.25rem;
    color: var(--gray-400);
    text-decoration: none;
    transition: all var(--transition);
    gap: 0.6rem;
    font-size: 0.9rem;
}

.sidebar-link:hover {
    color: var(--white);
    background-color: var(--bg-sidebar-hover);
}

.sidebar-link.active {
    color: var(--white);
    background-color: var(--primary);
}

.sidebar-link i {
    font-size: 1.1rem;
    width: 1.25rem;
    text-align: center;
}

.sidebar-link span {
    flex: 1;
}

/* Sidebar collapsed state */
.sidebar-collapsed .sidebar {
    width: var(--sidebar-collapsed-width);
}

.sidebar-collapsed .sidebar-header {
    padding: 1rem 0.5rem;
    margin: 0.5rem 0.25rem 0;
}

/* Logo complet visible par défaut, icône cachée */
.sidebar-logo-full {
    display: block;
}
.sidebar-logo-icon {
    display: none;
    max-width: 40px;
    max-height: 40px;
    margin: 0 auto;
}

/* En mode collapsed: cacher logo complet, montrer icône */
.sidebar-collapsed .sidebar-logo-full {
    display: none;
}
.sidebar-collapsed .sidebar-logo-icon {
    display: block;
}

.sidebar-collapsed .sidebar-link {
    padding: 0.5rem;
    justify-content: center;
}

.sidebar-collapsed .sidebar-link i {
    margin: 0;
}

.sidebar-collapsed .sidebar-link span,
.sidebar-collapsed .sidebar-section {
    display: none;
}

.sidebar-collapsed .main-content {
    margin-left: var(--sidebar-collapsed-width);
}

/* ============================================
   HEADER / NAVBAR
   ============================================ */
.main-header {
    position: fixed;
    top: 0;
    left: var(--sidebar-width);
    right: 0;
    height: var(--header-height);
    background-color: var(--bg-header);
    border-bottom: 1px solid var(--border-color);
    z-index: var(--z-sticky);
    display: flex;
    align-items: center;
    padding: 0 1.5rem;
    transition: left var(--transition-slow);
}

.sidebar-collapsed .main-header {
    left: var(--sidebar-collapsed-width);
}

.header-left {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.header-right {
    margin-left: auto;
    display: flex;
    align-items: center;
    gap: 1rem;
}

.sidebar-toggle {
    background: none;
    border: none;
    font-size: 1.25rem;
    color: var(--text-secondary);
    cursor: pointer;
    padding: 0.5rem;
    border-radius: var(--border-radius);
    transition: all var(--transition);
}

.sidebar-toggle:hover {
    background-color: var(--gray-100);
    color: var(--text-primary);
}

/* User dropdown */
.user-dropdown {
    position: relative;
}

.user-dropdown-toggle {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.5rem;
    background: none;
    border: none;
    cursor: pointer;
    border-radius: var(--border-radius);
    transition: background-color var(--transition);
}

.user-dropdown-toggle:hover {
    background-color: var(--gray-100);
}

.user-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background-color: var(--primary);
    color: var(--white);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 0.875rem;
}

.user-info {
    text-align: left;
}

.user-name {
    font-weight: 500;
    color: var(--text-primary);
    font-size: 0.875rem;
}

.user-role {
    font-size: 0.75rem;
    color: var(--text-muted);
}

/* ============================================
   MAIN CONTENT
   ============================================ */
.main-content {
    margin-left: var(--sidebar-width);
    padding-top: var(--header-height);
    min-height: 100vh;
    transition: margin-left var(--transition-slow);
}

.content-wrapper {
    padding: 1.5rem;
}

/* Page header */
.page-header {
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 1rem;
}

.page-title {
    margin: 0;
    font-size: 1.5rem;
    font-weight: 600;
}

.page-breadcrumb {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
    color: var(--text-muted);
}

.page-breadcrumb a {
    color: var(--text-secondary);
}

.page-breadcrumb a:hover {
    color: var(--primary);
}

/* ============================================
   STATS CARDS
   ============================================ */
.stat-card {
    background: var(--white);
    border-radius: var(--border-radius-lg);
    padding: 1.5rem;
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    border: 1px solid var(--border-color);
    transition: all var(--transition);
}

.stat-card:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}

.stat-icon {
    width: 48px;
    height: 48px;
    border-radius: var(--border-radius);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
}

.stat-icon.primary {
    background-color: rgba(var(--primary-rgb), 0.1);
    color: var(--primary);
}

.stat-icon.success {
    background-color: var(--success-light);
    color: var(--success);
}

.stat-icon.warning {
    background-color: var(--warning-light);
    color: #856404;
}

.stat-icon.info {
    background-color: var(--info-light);
    color: var(--info);
}

.stat-content {
    flex: 1;
}

.stat-value {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--secondary);
    line-height: 1.2;
}

.stat-label {
    font-size: 0.875rem;
    color: var(--text-secondary);
    margin-top: 0.25rem;
}

.stat-trend {
    font-size: 0.8125rem;
    margin-top: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.stat-trend.up {
    color: var(--success);
}

.stat-trend.down {
    color: var(--danger);
}

/* ============================================
   CREDITS BAR
   ============================================ */
.credits-bar {
    background: linear-gradient(135deg, var(--secondary) 0%, var(--secondary-light) 100%);
    color: var(--white);
    padding: 1rem 1.5rem;
    border-radius: var(--border-radius-lg);
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1.5rem;
}

.credits-info {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.credits-icon {
    width: 48px;
    height: 48px;
    background-color: var(--primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
}

.credits-value {
    font-size: 2rem;
    font-weight: 700;
}

.credits-label {
    font-size: 0.875rem;
    opacity: 0.8;
}

.credits-actions .btn {
    background-color: var(--primary);
    border-color: var(--primary);
}

.credits-actions .btn:hover {
    background-color: var(--primary-light);
    border-color: var(--primary-light);
}

/* ============================================
   PRODUCTION CARDS
   ============================================ */
.production-card {
    background: var(--white);
    border-radius: var(--border-radius-lg);
    border: 1px solid var(--border-color);
    overflow: hidden;
    transition: all var(--transition);
}

.production-card:hover {
    box-shadow: var(--shadow-lg);
    transform: translateY(-4px);
}

.production-card-header {
    padding: 1.5rem;
    display: flex;
    align-items: center;
    gap: 1rem;
}

.production-card-icon {
    width: 56px;
    height: 56px;
    border-radius: var(--border-radius);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.75rem;
}

.production-card-icon.spot { 
    background-color: #FEE2E2; 
    color: #DC2626; 
}

.production-card-icon.jingle { 
    background-color: #E0E7FF; 
    color: #4F46E5; 
}

.production-card-icon.voicetrack { 
    background-color: #D1FAE5; 
    color: #059669; 
}

.production-card-icon.chronique { 
    background-color: #FEF3C7; 
    color: #D97706; 
}

.production-card-title {
    font-size: 1.125rem;
    font-weight: 600;
    margin: 0;
}

.production-card-desc {
    font-size: 0.875rem;
    color: var(--text-secondary);
    margin: 0;
}

.production-card-body {
    padding: 0 1.5rem 1.5rem;
}

.production-card-footer {
    padding: 1rem 1.5rem;
    background-color: var(--gray-50);
    border-top: 1px solid var(--border-color);
}

/* ============================================
   AUDIO PLAYER
   ============================================ */
.audio-player {
    background: var(--gray-100);
    border-radius: var(--border-radius);
    padding: 1rem;
    display: flex;
    align-items: center;
    gap: 1rem;
}

.audio-player-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: var(--primary);
    color: var(--white);
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    transition: all var(--transition);
}

.audio-player-btn:hover {
    background-color: var(--primary-dark);
    transform: scale(1.1);
}

.audio-progress {
    flex: 1;
    height: 6px;
    background-color: var(--gray-300);
    border-radius: 3px;
    overflow: hidden;
    cursor: pointer;
}

.audio-progress-bar {
    height: 100%;
    background-color: var(--primary);
    width: 0%;
    transition: width 0.1s linear;
}

.audio-time {
    font-size: 0.8125rem;
    color: var(--text-secondary);
    min-width: 80px;
    text-align: right;
}

/* ============================================
   VOICE SELECTOR
   ============================================ */
.voice-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 14px;
}
@media (max-width: 768px) {
    .voice-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}
@media (max-width: 576px) {
    .voice-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

.voice-card {
    background: var(--white);
    border: 2px solid transparent;
    border-radius: var(--border-radius-lg);
    padding: 0;
    text-align: center;
    cursor: pointer;
    transition: all var(--transition);
}

.voice-card:hover {
    transform: translateY(-2px);
}

.voice-card.selected {
    border-color: var(--primary);
}

.voice-avatar {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    margin: 0 auto 0.75rem;
    object-fit: cover;
    background-color: var(--gray-200);
}

.voice-name {
    font-weight: 600;
    font-size: 0.9375rem;
    margin-bottom: 0.25rem;
}

.voice-meta {
    font-size: 0.8125rem;
    color: var(--text-secondary);
}

/* ============================================
   MODALS
   ============================================ */
.modal-backdrop {
    background-color: rgba(0, 0, 0, 0.5);
}

.modal-content {
    border: none;
    border-radius: var(--border-radius-xl);
    box-shadow: var(--shadow-xl);
}

.modal-header {
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid var(--border-color);
}

.modal-title {
    font-size: 1.25rem;
    font-weight: 600;
}

.modal-body {
    padding: 1.5rem;
}

.modal-footer {
    padding: 1rem 1.5rem;
    border-top: 1px solid var(--border-color);
    background-color: var(--gray-50);
}

/* ============================================
   LOADING STATES
   ============================================ */
.spinner {
    width: 24px;
    height: 24px;
    border: 3px solid var(--gray-300);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

.spinner-lg {
    width: 48px;
    height: 48px;
    border-width: 4px;
}

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

.loading-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(255, 255, 255, 0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 100;
}

/* ============================================
   UTILITIES
   ============================================ */
.gap-1 { gap: 0.25rem !important; }
.gap-2 { gap: 0.5rem !important; }
.gap-3 { gap: 1rem !important; }
.gap-4 { gap: 1.5rem !important; }

.rounded-full { border-radius: 9999px !important; }

.truncate {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.line-clamp-2 {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* ============================================
   RESPONSIVE
   ============================================ */

/* Overlay pour mobile */
.sidebar-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 999;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.sidebar-overlay.show {
    opacity: 1;
    visibility: visible;
}

@media (max-width: 991.98px) {
    .sidebar {
        transform: translateX(-100%);
        transition: transform 0.3s ease;
        z-index: 1000;
    }
    
    .sidebar.show {
        transform: translateX(0);
    }
    
    .main-content {
        margin-left: 0;
    }
    
    .main-header {
        left: 0;
    }
    
    /* Bouton toggle toujours visible sur mobile */
    .sidebar-toggle {
        display: flex !important;
    }
}

@media (max-width: 767.98px) {
    .page-header {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .credits-bar {
        flex-direction: column;
        text-align: center;
        gap: 1rem;
    }
    
    .stat-card {
        flex-direction: column;
        text-align: center;
    }
}

/* ============================================
   AUTH PAGES (Login, Register)
   ============================================ */
.auth-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #1E3A5F 0%, #2A4D7A 100%);
    padding: 2rem;
}

.auth-card {
    background: var(--white);
    border-radius: var(--border-radius-xl);
    box-shadow: var(--shadow-xl);
    width: 100%;
    max-width: 420px;
    padding: 2.5rem;
}

.auth-logo {
    text-align: center;
    margin-bottom: 2rem;
}

.auth-logo img {
    max-height: 50px;
    width: auto;
}

.auth-title {
    text-align: center;
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.auth-subtitle {
    text-align: center;
    color: var(--text-secondary);
    margin-bottom: 2rem;
}

.auth-divider {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin: 1.5rem 0;
    color: var(--text-muted);
    font-size: 0.875rem;
}

.auth-divider::before,
.auth-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background-color: var(--border-color);
}

.auth-footer {
    text-align: center;
    margin-top: 1.5rem;
    font-size: 0.875rem;
    color: var(--text-secondary);
}

.auth-footer a {
    color: var(--primary);
    font-weight: 500;
}

/* ============================================
   LANGUAGE SELECTOR
   ============================================ */
.lang-selector {
    margin-right: 0.5rem;
}

.lang-selector .dropdown-toggle {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.375rem 0.75rem;
    font-size: 0.875rem;
    border-radius: 0.5rem;
    background: white;
    border: 1px solid #dee2e6;
    color: #495057;
    transition: all 0.2s ease;
}

.lang-selector .dropdown-toggle:hover {
    border-color: var(--primary);
    color: var(--primary);
    background: #fff5f5;
}

.lang-selector .dropdown-menu {
    min-width: 160px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    border: 1px solid #e5e7eb;
    border-radius: 0.5rem;
}

.lang-selector .dropdown-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    transition: all 0.15s ease;
}

.lang-selector .dropdown-item:hover {
    background: #f8f9fa;
}

.lang-selector .dropdown-item.active {
    background-color: var(--primary);
    color: white;
}

.lang-flags {
    display: flex;
    gap: 0.25rem;
}

.lang-flag {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    font-size: 1.25rem;
    text-decoration: none;
    border-radius: 0.25rem;
    opacity: 0.6;
    transition: all 0.2s ease;
}

.lang-flag:hover,
.lang-flag.active {
    opacity: 1;
    background-color: rgba(0, 0, 0, 0.05);
}

/* ============================================
   SIDEBAR ACCORDÉONS (Menu Client & Admin)
   ============================================ */

.sidebar-accordion {
    margin-bottom: 0.125rem;
}

.sidebar-accordion-toggle {
    display: flex;
    align-items: center;
    width: 100%;
    padding: 0.5rem 1.25rem;
    background: transparent;
    border: none;
    color: var(--gray-400);
    font-size: 0.9rem;
    font-weight: 500;
    text-align: left;
    cursor: pointer;
    transition: all 0.2s ease;
    gap: 0.6rem;
}

.sidebar-accordion-toggle:hover {
    background: var(--bg-sidebar-hover);
    color: var(--white);
}

.sidebar-accordion-toggle.active {
    color: var(--white);
}

.sidebar-accordion-toggle i:first-child {
    width: 1.25rem;
    font-size: 1.1rem;
    text-align: center;
}

.sidebar-accordion-toggle span {
    flex: 1;
}

.sidebar-accordion-toggle .accordion-arrow {
    font-size: 0.75rem;
    transition: transform 0.3s ease;
    margin-left: auto;
}

.sidebar-accordion-toggle[aria-expanded="true"] .accordion-arrow,
.sidebar-accordion-toggle:not(.collapsed) .accordion-arrow {
    transform: rotate(180deg);
}

/* Sidebar collapsed - hide arrow */
.sidebar-collapsed .sidebar-accordion-toggle .accordion-arrow {
    display: none;
}

.sidebar-submenu {
    padding: 0.25rem 0 0.5rem 0;
    background: rgba(0, 0, 0, 0.15);
}

.sidebar-sublink {
    display: flex;
    align-items: center;
    padding: 0.4rem 1.25rem 0.4rem 2.5rem;
    color: var(--gray-400);
    font-size: 0.85rem;
    text-decoration: none;
    transition: all 0.2s ease;
    gap: 0.5rem;
}

.sidebar-sublink:hover {
    background: var(--bg-sidebar-hover);
    color: var(--white);
}

.sidebar-sublink.active {
    background: var(--secondary);
    color: var(--white);
    font-weight: 500;
}

.sidebar-sublink i {
    width: 1rem;
    font-size: 0.9rem;
    opacity: 0.8;
    text-align: center;
}

.sidebar-sublink.active i {
    opacity: 1;
}

/* Sidebar collapsed - hide submenus */
.sidebar-collapsed .sidebar-submenu {
    display: none;
}

.sidebar-collapsed .sidebar-accordion-toggle span {
    display: none;
}

/* Collapse animation */
.sidebar-accordion .collapse {
    transition: height 0.3s ease;
}
