/**
 * Radio Manager - Thème minimal (style Tailwind / Vercel / Linear)
 *
 * Override de app.css. Pour désactiver, retirer le <link> dans templates/header.php.
 * Pour ajuster la palette, modifier les variables :root ci-dessous.
 *
 * Inspiration : palette Tailwind "slate" + accents rouges atténués (charte Radio).
 */

/* ============================================
   1. PALETTE — override des variables globales
   ============================================ */
:root {
    /* Primary → slate (gris bleuté presque noir, type Vercel) */
    --primary:        #0f172a;  /* slate-900 */
    --primary-dark:   #020617;  /* slate-950 */
    --primary-light:  #1e293b;  /* slate-800 */
    --primary-rgb:    15, 23, 42;

    /* Accent (charte Radio) → rouge un peu atténué */
    --secondary:        #dc2626; /* red-600 (vs ex #D4302E saturé) */
    --secondary-light:  #ef4444; /* red-500 */
    --secondary-lighter:#fca5a5; /* red-300 */
    --secondary-rgb:    220, 38, 38;

    /* Statuts — tons Tailwind */
    --success:       #059669;  /* emerald-600 */
    --success-light: #d1fae5;
    --warning:       #d97706;  /* amber-600 */
    --warning-light: #fef3c7;
    --danger:        #dc2626;
    --danger-light:  #fee2e2;
    --info:          #0284c7;  /* sky-600 */
    --info-light:    #e0f2fe;

    /* Neutres — slate Tailwind */
    --gray-50:  #f8fafc;
    --gray-100: #f1f5f9;
    --gray-200: #e2e8f0;
    --gray-300: #cbd5e1;
    --gray-400: #94a3b8;
    --gray-500: #64748b;
    --gray-600: #475569;
    --gray-700: #334155;
    --gray-800: #1e293b;
    --gray-900: #0f172a;

    /* Backgrounds */
    --bg-body:           #f8fafc;
    --bg-card:           #ffffff;
    --bg-sidebar:        #0f172a;  /* slate-900 dark sidebar */
    --bg-sidebar-hover:  #1e293b;
    --bg-header:         #ffffff;

    /* Textes */
    --text-primary:   #0f172a;
    --text-secondary: #475569;
    --text-muted:     #64748b;
    --text-link:      #0f172a;

    /* Bordures & radius — plus subtils */
    --border-color:      #e2e8f0;
    --border-radius:     0.5rem;
    --border-radius-sm:  0.375rem;
    --border-radius-lg:  0.625rem;
    --border-radius-xl:  0.875rem;

    /* Ombres — quasi imperceptibles, on délimite par bordures plutôt */
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.04);
    --shadow:    0 1px 3px 0 rgb(0 0 0 / 0.06), 0 1px 2px -1px rgb(0 0 0 / 0.06);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.06), 0 2px 4px -2px rgb(0 0 0 / 0.04);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.06), 0 4px 6px -4px rgb(0 0 0 / 0.04);
    --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.08), 0 10px 10px -5px rgb(0 0 0 / 0.04);
}

/* ============================================
   2. TYPOGRAPHIE — tracking serré, font-features Inter
   ============================================ */
body {
    font-feature-settings: "cv02", "cv03", "cv04", "cv11";
    letter-spacing: -0.011em;
}

h1, h2, h3, h4, h5, h6,
.h1, .h2, .h3, .h4, .h5, .h6 {
    letter-spacing: -0.025em;  /* tracking-tight */
    color: var(--text-primary);
    font-weight: 600;
}

.text-muted {
    color: var(--text-muted) !important;
}

/* ============================================
   3. BOUTONS — padding serré, font-weight 500, focus subtil
   ============================================ */
.btn {
    padding: 0.5rem 1rem;
    font-weight: 500;
    font-size: 0.875rem;
    line-height: 1.25rem;
    border-radius: 0.5rem;
    transition: background-color 150ms ease, border-color 150ms ease, box-shadow 150ms ease;
}

.btn-sm {
    padding: 0.375rem 0.75rem;
    font-size: 0.8125rem;
}

.btn-lg {
    padding: 0.625rem 1.25rem;
    font-size: 0.9375rem;
}

.btn:focus, .btn:focus-visible {
    outline: none;
    box-shadow: 0 0 0 3px rgb(15 23 42 / 0.12);
}

/* Primary = slate-900 (presque noir, style Vercel) */
.btn-primary {
    background-color: #0f172a;
    border-color: #0f172a;
    color: #fff;
}
.btn-primary:hover {
    background-color: #1e293b;
    border-color: #1e293b;
    color: #fff;
}

/* Outline primary = bouton blanc bordé (style ghost moderne) */
.btn-outline-primary {
    background-color: #fff;
    border-color: #cbd5e1;
    color: #0f172a;
}
.btn-outline-primary:hover {
    background-color: #f8fafc;
    border-color: #94a3b8;
    color: #0f172a;
}

/* Secondary (rouge atténué — l'accent identitaire de la radio) */
.btn-secondary, .btn-danger {
    background-color: #dc2626;
    border-color: #dc2626;
    color: #fff;
}
.btn-secondary:hover, .btn-danger:hover {
    background-color: #b91c1c;
    border-color: #b91c1c;
    color: #fff;
}

.btn-outline-secondary, .btn-outline-danger {
    background-color: #fff;
    border-color: #fecaca;
    color: #b91c1c;
}
.btn-outline-secondary:hover, .btn-outline-danger:hover {
    background-color: #fef2f2;
    border-color: #fca5a5;
    color: #991b1b;
}

.btn-light {
    background-color: #f1f5f9;
    border-color: #e2e8f0;
    color: #0f172a;
}
.btn-light:hover {
    background-color: #e2e8f0;
    border-color: #cbd5e1;
    color: #0f172a;
}

/* ============================================
   4. CARDS — borders 1px, ombre invisible par défaut
   ============================================ */
.card {
    background-color: #fff;
    border: 1px solid #e2e8f0;
    box-shadow: none;
    border-radius: 0.75rem;
    transition: border-color 150ms ease, box-shadow 150ms ease;
}

.card:hover {
    transform: none !important;
    border-color: #cbd5e1;
    box-shadow: 0 1px 2px 0 rgb(0 0 0 / 0.04);
}

.card-header {
    background-color: transparent;
    border-bottom: 1px solid #e2e8f0;
    padding: 0.875rem 1.25rem;
    font-weight: 600;
    color: #0f172a;
}

.card-body {
    padding: 1.25rem;
}

.card-footer {
    background-color: #f8fafc;
    border-top: 1px solid #e2e8f0;
    padding: 0.875rem 1.25rem;
}

/* ============================================
   5. FORMULAIRES — inputs épurés, focus ring slate
   ============================================ */
.form-control, .form-select {
    border: 1px solid #e2e8f0;
    border-radius: 0.5rem;
    padding: 0.5rem 0.75rem;
    font-size: 0.875rem;
    background-color: #fff;
    color: #0f172a;
    transition: border-color 150ms ease, box-shadow 150ms ease;
}

.form-control:focus, .form-select:focus {
    border-color: #94a3b8;
    box-shadow: 0 0 0 3px rgb(15 23 42 / 0.08);
    outline: none;
}

.form-control::placeholder {
    color: #94a3b8;
}

.form-label {
    font-size: 0.8125rem;
    font-weight: 500;
    color: #334155;
    margin-bottom: 0.375rem;
}

.form-text {
    font-size: 0.8125rem;
    color: #64748b;
}

.form-check-input {
    border-color: #cbd5e1;
}
.form-check-input:checked {
    background-color: #0f172a;
    border-color: #0f172a;
}
.form-check-input:focus {
    border-color: #94a3b8;
    box-shadow: 0 0 0 3px rgb(15 23 42 / 0.08);
}

/* ============================================
   6. TABLES — borders fines, header gris clair
   ============================================ */
.table {
    --bs-table-bg: transparent;
    --bs-table-border-color: #e2e8f0;
    font-size: 0.875rem;
    color: #334155;
}

.table > :not(caption) > * > * {
    border-bottom-color: #e2e8f0;
    padding: 0.6875rem 0.875rem;
}

.table > thead {
    background-color: #f8fafc;
    color: #475569;
}

.table > thead th {
    text-transform: uppercase;
    font-size: 0.6875rem;
    letter-spacing: 0.05em;
    font-weight: 600;
    border-bottom: 1px solid #e2e8f0;
}

.table-hover > tbody > tr:hover > * {
    background-color: #f8fafc;
}

/* ============================================
   7. BADGES — pills avec bg léger + texte foncé
   ============================================ */
.badge {
    font-weight: 500;
    padding: 0.25rem 0.625rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    letter-spacing: 0;
}

.badge.bg-primary,
.badge.text-bg-primary {
    background-color: #f1f5f9 !important;
    color: #0f172a !important;
}
.badge.bg-success,
.badge.text-bg-success {
    background-color: #d1fae5 !important;
    color: #047857 !important;
}
.badge.bg-warning,
.badge.text-bg-warning {
    background-color: #fef3c7 !important;
    color: #b45309 !important;
}
.badge.bg-danger,
.badge.text-bg-danger {
    background-color: #fee2e2 !important;
    color: #b91c1c !important;
}
.badge.bg-info,
.badge.text-bg-info {
    background-color: #e0f2fe !important;
    color: #0369a1 !important;
}
.badge.bg-secondary,
.badge.text-bg-secondary {
    background-color: #f1f5f9 !important;
    color: #475569 !important;
}

/* ============================================
   8. SIDEBAR — slate-900 dark, links arrondis,
      profil dropup ancré en bas (mt-auto via flex)
   ============================================ */
.sidebar {
    background-color: #0f172a;
    border-right: 1px solid #1e293b;
    display: flex;
    flex-direction: column;
}

.sidebar-nav {
    flex: 1 1 auto;
    overflow-y: auto;
    overflow-x: hidden;
    min-height: 0;
}

.sidebar-header {
    border-bottom-color: rgb(255 255 255 / 0.06) !important;
}

.sidebar-section {
    color: #64748b;
    font-size: 0.6875rem;
    letter-spacing: 0.08em;
    font-weight: 600;
    padding: 0.5rem 1.25rem 0.25rem;
}

.sidebar-link {
    color: #cbd5e1;
    border-radius: 0.5rem;
    margin: 0.125rem 0.625rem;
    padding: 0.4375rem 0.75rem;
    font-weight: 500;
    font-size: 0.875rem;
}

.sidebar-link:hover {
    background-color: rgb(255 255 255 / 0.06);
    color: #f8fafc;
}

.sidebar-link.active {
    background-color: rgb(255 255 255 / 0.1);
    color: #fff;
}

/* --- Accordéons (Production / Outils / etc.) --- */
.sidebar-accordion-toggle {
    color: #cbd5e1;
    font-weight: 500;
    font-size: 0.875rem;
    border-radius: 0.5rem;
    margin: 0.125rem 0.625rem;
    padding: 0.4375rem 0.75rem;
    width: calc(100% - 1.25rem);
}

.sidebar-accordion-toggle:hover {
    background-color: rgb(255 255 255 / 0.06);
    color: #f8fafc;
}

.sidebar-accordion-toggle.active {
    color: #f8fafc;
}

.sidebar-submenu {
    background-color: rgb(0 0 0 / 0.2);
    padding: 0.25rem 0;
    margin: 0.125rem 0;
}

.sidebar-sublink {
    color: #94a3b8;
    border-radius: 0.375rem;
    margin: 0.0625rem 1rem 0.0625rem 1.75rem;
    padding: 0.3125rem 0.625rem;
    font-size: 0.8125rem;
}

.sidebar-sublink:hover {
    background-color: rgb(255 255 255 / 0.06);
    color: #f8fafc;
}

.sidebar-sublink.active {
    background-color: rgb(255 255 255 / 0.1);
    color: #fff;
}

.sidebar-sublink i {
    color: inherit;
    opacity: 0.85;
}

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

/* --- Profil utilisateur en bas de la sidebar (dropup) --- */
.sidebar-profile {
    flex-shrink: 0;
    padding: 0.625rem 0.75rem 0.875rem;
    border-top: 1px solid rgb(255 255 255 / 0.06);
    background-color: #0f172a;
}

.sidebar-profile .dropdown {
    width: 100%;
}

.sidebar-profile-toggle {
    display: flex;
    align-items: center;
    gap: 0.625rem;
    width: 100%;
    background: transparent;
    border: 1px solid transparent;
    color: #cbd5e1;
    padding: 0.5rem 0.625rem;
    border-radius: 0.5rem;
    transition: background-color 150ms ease, color 150ms ease, border-color 150ms ease;
    cursor: pointer;
    text-align: left;
}

.sidebar-profile-toggle:hover,
.sidebar-profile-toggle[aria-expanded="true"] {
    background-color: rgb(255 255 255 / 0.06);
    color: #f8fafc;
    border-color: rgb(255 255 255 / 0.08);
}

/* Bootstrap ajoute son propre chevron via ::after — on le neutralise */
.sidebar-profile-toggle::after {
    display: none !important;
}

.sidebar-profile-avatar {
    width: 32px;
    height: 32px;
    border-radius: 9999px;
    background-color: #1e293b;
    color: #f8fafc;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 0.75rem;
    flex-shrink: 0;
    letter-spacing: 0;
}

.sidebar-profile-meta {
    display: flex;
    flex-direction: column;
    line-height: 1.15;
    min-width: 0;
    flex: 1 1 auto;
}

.sidebar-profile-name {
    font-size: 0.8125rem;
    font-weight: 500;
    color: #f8fafc;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.sidebar-profile-role {
    font-size: 0.6875rem;
    color: #64748b;
    margin-top: 1px;
}

.sidebar-profile-chevron {
    color: #64748b;
    font-size: 0.75rem;
    transition: transform 200ms ease;
    flex-shrink: 0;
}

.sidebar-profile-toggle[aria-expanded="true"] .sidebar-profile-chevron {
    transform: rotate(180deg);
}

/* Menu dropup : largeur sidebar - padding, ombre vers le haut */
.sidebar-profile-menu {
    width: calc(var(--sidebar-width, 260px) - 1.5rem) !important;
    min-width: 220px;
    margin-bottom: 0.5rem !important;
    padding: 0.375rem;
    background-color: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 0.625rem;
    box-shadow:
        0 -10px 25px -5px rgb(0 0 0 / 0.20),
        0 -4px 10px -3px rgb(0 0 0 / 0.10);
}

.sidebar-profile-menu .dropdown-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.4375rem 0.625rem;
    border-radius: 0.375rem;
    font-size: 0.875rem;
    color: #334155;
}

.sidebar-profile-menu .dropdown-item i {
    color: #64748b;
    width: 1rem;
    text-align: center;
}

.sidebar-profile-menu .dropdown-item:hover {
    background-color: #f8fafc;
    color: #0f172a;
}

.sidebar-profile-menu .dropdown-item:hover i {
    color: #0f172a;
}

.sidebar-profile-menu .dropdown-item.active {
    background-color: #f1f5f9;
    color: #0f172a;
    font-weight: 500;
}

.sidebar-profile-menu .dropdown-item.text-danger {
    color: #b91c1c !important;
}

.sidebar-profile-menu .dropdown-item.text-danger:hover {
    background-color: #fef2f2;
    color: #991b1b !important;
}

.sidebar-profile-menu .dropdown-item.text-danger i {
    color: #dc2626;
}

/* Quand sidebar est repliée (mode collapsed) : toggle réduit à l'avatar */
.sidebar-collapsed .sidebar-profile {
    padding: 0.625rem 0.5rem 0.875rem;
}

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

.sidebar-collapsed .sidebar-profile-meta,
.sidebar-collapsed .sidebar-profile-chevron {
    display: none;
}

.sidebar-collapsed .sidebar-profile-menu {
    width: 220px !important;
}

/* ============================================
   9. ALERTS — bordures + bg léger
   ============================================ */
.alert {
    border: 1px solid;
    border-radius: 0.625rem;
    padding: 0.75rem 1rem;
    font-size: 0.875rem;
}

.alert-success {
    background-color: #f0fdf4;
    border-color: #bbf7d0;
    color: #166534;
}
.alert-warning {
    background-color: #fffbeb;
    border-color: #fde68a;
    color: #92400e;
}
.alert-danger {
    background-color: #fef2f2;
    border-color: #fecaca;
    color: #991b1b;
}
.alert-info {
    background-color: #eff6ff;
    border-color: #bfdbfe;
    color: #1e40af;
}

/* ============================================
   10. MODALES — shadow profond, bordures fines
   ============================================ */
.modal-content {
    border: 1px solid #e2e8f0;
    border-radius: 0.875rem;
    box-shadow: 0 25px 50px -12px rgb(0 0 0 / 0.18);
}

.modal-header {
    border-bottom: 1px solid #e2e8f0;
    padding: 1.125rem 1.5rem;
}

.modal-body {
    padding: 1.5rem;
}

.modal-footer {
    border-top: 1px solid #e2e8f0;
    padding: 1rem 1.5rem;
    background-color: #f8fafc;
}

/* ============================================
   11. DROPDOWNS — style Tailwind menu
   ============================================ */
.dropdown-menu {
    border: 1px solid #e2e8f0;
    border-radius: 0.625rem;
    box-shadow: 0 10px 15px -3px rgb(0 0 0 / 0.08), 0 4px 6px -4px rgb(0 0 0 / 0.05);
    padding: 0.375rem;
}

.dropdown-item {
    border-radius: 0.375rem;
    padding: 0.4375rem 0.625rem;
    font-size: 0.875rem;
    color: #334155;
}

.dropdown-item:hover, .dropdown-item:focus {
    background-color: #f8fafc;
    color: #0f172a;
}

.dropdown-item.active, .dropdown-item:active {
    background-color: #0f172a;
    color: #fff;
}

.dropdown-divider {
    border-top-color: #e2e8f0;
    margin: 0.375rem 0;
}

/* ============================================
   12. NAVS / TABS / PAGINATION — accents discrets
   ============================================ */
.nav-tabs {
    border-bottom: 1px solid #e2e8f0;
}

.nav-tabs .nav-link {
    color: #64748b;
    border: none;
    border-bottom: 2px solid transparent;
    padding: 0.625rem 1rem;
    font-weight: 500;
    font-size: 0.875rem;
}

.nav-tabs .nav-link:hover {
    color: #0f172a;
    border-bottom-color: #cbd5e1;
}

.nav-tabs .nav-link.active {
    color: #0f172a;
    background-color: transparent;
    border-bottom-color: #0f172a;
}

.page-link {
    color: #334155;
    border-color: #e2e8f0;
}
.page-link:hover {
    background-color: #f8fafc;
    border-color: #cbd5e1;
    color: #0f172a;
}
.page-item.active .page-link {
    background-color: #0f172a;
    border-color: #0f172a;
}

/* ============================================
   13. PROGRESS / SPINNERS — couleur slate
   ============================================ */
.progress {
    background-color: #f1f5f9;
    border-radius: 9999px;
    height: 0.5rem;
}
.progress-bar {
    background-color: #0f172a;
}

/* ============================================
   14. LIENS — soulignement subtil
   ============================================ */
a:not(.btn):not(.nav-link):not(.dropdown-item):not(.sidebar-link):not(.sidebar-sublink):not(.page-link) {
    color: #0f172a;
    text-decoration-color: #cbd5e1;
    text-underline-offset: 2px;
}

a:not(.btn):not(.nav-link):not(.dropdown-item):not(.sidebar-link):not(.sidebar-sublink):not(.page-link):hover {
    text-decoration-color: #0f172a;
}

/* ============================================
   15. DASHBOARD — composants spécifiques (sortis du PHP inline)
   ============================================ */

/* --- Service cards (vue sans abonnement) --- */
.service-card {
    transition: border-color 150ms ease, box-shadow 150ms ease;
    border-radius: 0.875rem !important;
    overflow: hidden;
    background-color: #fff;
    border: 1px solid #e2e8f0 !important;
}
.service-card-active:hover {
    border-color: #cbd5e1 !important;
    box-shadow: 0 4px 12px -2px rgb(0 0 0 / 0.06) !important;
}
.service-card-soon {
    background-color: #f8fafc;
    opacity: 1;
    cursor: default;
}
.service-card-soon .service-icon {
    background-color: #e2e8f0 !important;
    background: #e2e8f0 !important;
    color: #94a3b8 !important;
}

.service-icon {
    width: 56px;
    height: 56px;
    border-radius: 0.875rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    color: #fff;
    background-color: #0f172a;
}
.service-icon-accent {
    background-color: var(--secondary, #dc2626);
}

/* --- Bandeau "Radio en attente d'installation" — minimaliste --- */
.radio-pending-card {
    background-color: #fff;
    border: 1px solid #e2e8f0 !important;
    border-radius: 0.875rem;
    overflow: hidden;
}
.radio-pending-card-icon {
    width: 48px;
    height: 48px;
    background-color: #f1f5f9;
    border-radius: 0.75rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    color: #0f172a;
}
.radio-pending-steps {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    font-size: 0.8125rem;
}
.radio-step {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    color: #94a3b8;
}
.radio-step.completed { color: #059669; font-weight: 500; }
.radio-step.active    { color: #0f172a; font-weight: 600; }
.radio-step.pending   { color: #cbd5e1; }

/* --- Pages Auth (login / register / forgot / reset / verify) ---
   Background raccord avec le sidebar (slate-900), logo blanc XL au-dessus
   de la card pour bien identifier la marque. */
.auth-page {
    flex-direction: column !important;
    background: #0f172a !important; /* slate-900 = raccord sidebar */
    background-image: radial-gradient(
        ellipse at top,
        rgba(30, 41, 59, 0.85) 0%,
        #0f172a 60%
    ) !important;
}
.auth-logo-outer {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.5rem;
    text-decoration: none;
    transition: opacity 0.2s;
}
.auth-logo-outer:hover { opacity: 0.85; }
.auth-logo-outer img {
    max-height: 64px;
    width: auto;
    max-width: 80%;
    filter: drop-shadow(0 4px 14px rgba(0, 0, 0, 0.35));
}
/* Card blanche conservée mais accord visuel avec le fond sombre */
.auth-page .auth-card {
    border: 1px solid rgba(255, 255, 255, 0.06);
    box-shadow: 0 20px 48px -16px rgba(0, 0, 0, 0.55),
                0 8px 16px -4px rgba(0, 0, 0, 0.25);
}
/* Variante "wide" pour le formulaire d'inscription (plus de champs sur 2 col) */
.auth-page .auth-card--wide {
    max-width: 720px;
}
/* Si l'ancien .auth-logo est encore présent dans une page (fallback),
   on l'aplatit pour éviter le double logo */
.auth-card .auth-logo { display: none; }

/* Section "Je suis une entreprise" — apparition animée */
.company-fields {
    margin-top: 0.75rem;
    padding: 1rem 1.1rem;
    background: #f8fafc;
    border: 1px dashed #cbd5e1;
    border-radius: 0.6rem;
    animation: company-reveal 0.25s ease-out;
}
@keyframes company-reveal {
    from { opacity: 0; transform: translateY(-4px); }
    to   { opacity: 1; transform: translateY(0); }
}
.form-switch .form-check-input {
    cursor: pointer;
    width: 2.5em;
    height: 1.3em;
}
.form-switch .form-check-input:checked {
    background-color: #2563eb;
    border-color: #2563eb;
}

/* --- Page Équipe (sous-utilisateurs) --- */
.team-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: linear-gradient(135deg, #2563eb, #7c3aed);
    color: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    font-weight: 700;
    flex-shrink: 0;
}

/* Checkbox de permission (case + icône + label) */
.team-perm-check {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.6rem 0.75rem;
    border: 1px solid #e2e8f0;
    border-radius: 0.5rem;
    cursor: pointer;
    transition: all 0.15s;
    user-select: none;
    margin: 0;
    background: #fff;
}
.team-perm-check:hover {
    border-color: #cbd5e1;
    background: #f8fafc;
}
.team-perm-check input[type="checkbox"] {
    margin: 0;
    width: 16px;
    height: 16px;
    flex-shrink: 0;
    accent-color: #2563eb;
    cursor: pointer;
}
.team-perm-check input[type="checkbox"]:checked + .team-perm-icon {
    background: #2563eb;
    color: #fff;
}
.team-perm-check:has(input:checked) {
    border-color: #2563eb;
    background: #eff6ff;
}
.team-perm-icon {
    width: 28px;
    height: 28px;
    border-radius: 0.4rem;
    background: #f1f5f9;
    color: #64748b;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.85rem;
    flex-shrink: 0;
    transition: all 0.15s;
}
.team-perm-label {
    font-size: 0.85rem;
    font-weight: 500;
    color: #334155;
}

/* --- Cards KPI dashboard (offre, pic auditeurs, stockage, support) --- */
.dashboard-kpi-row { margin-top: 0.25rem; }
.kpi-card {
    border: 1px solid #e2e8f0;
    background: #fff;
    border-radius: 0.875rem;
    transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
    color: #0f172a;
    overflow: hidden;
    position: relative;
}
.kpi-card .card-body {
    padding: 1.1rem 1.25rem;
    min-height: 175px;
}
a.kpi-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px -8px rgba(15, 23, 42, 0.18);
    border-color: #cbd5e1;
}
.kpi-card-head {
    display: flex;
    align-items: center;
    gap: 0.55rem;
}
.kpi-card-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    border-radius: 0.5rem;
    background: #eff6ff;
    color: #2563eb;
    font-size: 1.05rem;
    flex-shrink: 0;
}
.kpi-card-title {
    font-size: 0.78rem;
    font-weight: 600;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}
.kpi-card-value {
    font-size: 1.7rem;
    font-weight: 700;
    color: #0f172a;
    line-height: 1.15;
    letter-spacing: -0.01em;
    word-break: break-word;
}
.kpi-card-value--small { font-size: 1.05rem; line-height: 1.3; }
.kpi-card-unit {
    font-size: 0.78rem;
    font-weight: 500;
    color: #94a3b8;
    margin-left: 0.3rem;
    letter-spacing: normal;
}
.kpi-card-meta { line-height: 1.4; }

/* Variantes par card */
.kpi-card--plan    .kpi-card-icon { background: #eff6ff; color: #2563eb; }
.kpi-card--peak    .kpi-card-icon { background: #f5f3ff; color: #7c3aed; }
.kpi-card--storage .kpi-card-icon { background: #fff7ed; color: #ea580c; }
.kpi-card--support .kpi-card-icon--whatsapp {
    background: #dcfce7;
    color: #25d366;
    font-size: 1.2rem;
}
.kpi-card--support:hover { border-color: #25d366; }
.kpi-card--support .kpi-card-value { color: #166534; }

/* --- Liste pays (Géolocalisation) --- */
.countries-list { max-height: 380px; overflow-y: auto; }
.countries-list--compact { max-height: 240px; }
.countries-list-inner { padding: 0.4rem 0; }
.country-row {
    display: grid;
    grid-template-columns: 28px 1fr 90px 56px;
    align-items: center;
    gap: 0.65rem;
    padding: 0.5rem 1rem;
    border-bottom: 1px solid #f1f5f9;
    font-size: 0.85rem;
}
.country-row:last-child { border-bottom: 0; }
.country-row:hover { background: #f8fafc; }
.country-flag { font-size: 1.15rem; line-height: 1; }
.country-name {
    color: #0f172a;
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.country-bar {
    height: 6px;
    background: #f1f5f9;
    border-radius: 3px;
    position: relative;
    overflow: hidden;
}
.country-bar-fill {
    display: block;
    height: 100%;
    background: linear-gradient(90deg, #2563eb, #7c3aed);
    border-radius: 3px;
    transition: width 0.3s ease;
}
.country-count {
    text-align: right;
    color: #475569;
    font-weight: 600;
    font-variant-numeric: tabular-nums;
}

/* --- Programmations à venir (carte dashboard) --- */
.upcoming-slots {
    max-height: 320px;
    overflow-y: auto;
}
.upcoming-slot {
    display: flex;
    align-items: stretch;
    gap: 0.65rem;
    padding: 0.7rem 1rem;
    border-bottom: 1px solid #f1f5f9;
    transition: background 0.15s;
}
.upcoming-slot:last-child { border-bottom: 0; }
.upcoming-slot:hover { background: #f8fafc; }

/* Slot en cours : fond mis en avant + bordure colorée + dot pulsé */
.upcoming-slot--current {
    background: linear-gradient(90deg, rgba(16, 185, 129, 0.10), rgba(16, 185, 129, 0.02) 70%, transparent);
    border-left: 3px solid #10b981;
    padding-left: calc(1rem - 3px);
}
.upcoming-slot--current:hover { background: linear-gradient(90deg, rgba(16, 185, 129, 0.14), rgba(16, 185, 129, 0.04) 70%, transparent); }
.upcoming-slot--current .upcoming-slot-day {
    color: #047857;
    text-transform: uppercase;
    font-size: 0.7rem;
    letter-spacing: 0.06em;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
}
.upcoming-slot-live-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #10b981;
    box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.6);
    animation: upcoming-live-pulse 1.6s infinite;
    display: inline-block;
}
@keyframes upcoming-live-pulse {
    0%   { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.55); }
    70%  { box-shadow: 0 0 0 6px rgba(16, 185, 129, 0); }
    100% { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0); }
}

.upcoming-slot-bar {
    width: 3px;
    border-radius: 2px;
    flex-shrink: 0;
}
.upcoming-slot-info {
    flex: 1;
    min-width: 0;
    line-height: 1.25;
}
.upcoming-slot-when {
    display: flex;
    align-items: baseline;
    gap: 0.5rem;
    margin-bottom: 2px;
}
.upcoming-slot-day {
    font-weight: 600;
    color: #0f172a;
    font-size: 0.85rem;
}
.upcoming-slot-time {
    font-size: 0.75rem;
    color: #64748b;
    font-variant-numeric: tabular-nums;
}
.upcoming-slot-name {
    font-size: 0.78rem;
    color: #475569;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* --- Sélecteur période sur "Statistiques d'écoute" --- */
.listener-stats-range {
    width: auto;
    min-width: 120px;
    padding-right: 2.5rem !important; /* place pour le chevron Bootstrap */
}

/* --- Stats auditeurs intégrées dans antenne-card (côté droit) --- */
.antenne-card-grid--with-stats {
    grid-template-columns: auto auto 1fr minmax(280px, auto) !important;
}
@media (max-width: 991.98px) {
    .antenne-card-grid--with-stats {
        grid-template-columns: auto 1fr !important;
    }
    .antenne-card-grid--with-stats > :nth-child(3),
    .antenne-card-grid--with-stats > :nth-child(4) {
        grid-column: 1 / -1 !important;
    }
}
.antenne-stats {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    align-items: flex-end;
    min-width: 0;
}
.antenne-stats-row {
    display: flex;
    gap: 1.25rem;
    align-items: flex-start;
}
.antenne-stat {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    line-height: 1.1;
}
.antenne-stat-value {
    font-size: 1.5rem;
    font-weight: 700;
    color: #f8fafc;
    letter-spacing: -0.01em;
}
.antenne-stat-label {
    font-size: 0.7rem;
    color: rgba(248, 250, 252, 0.65);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-weight: 600;
    margin-top: 2px;
}
.antenne-stat-label--muted {
    text-transform: none;
    letter-spacing: 0;
    font-weight: 400;
    color: rgba(248, 250, 252, 0.5);
}
.antenne-stats-supports {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
    justify-content: flex-end;
    max-width: 100%;
}
.antenne-support-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.25rem 0.6rem;
    background: rgba(248, 250, 252, 0.08);
    border: 1px solid rgba(248, 250, 252, 0.14);
    border-radius: 999px;
    font-size: 0.72rem;
    color: #e2e8f0;
    white-space: nowrap;
    line-height: 1;
}
.antenne-support-pill i {
    font-size: 0.85rem;
    color: #94a3b8;
    line-height: 1;
}
.antenne-support-pill strong {
    color: #fff;
    font-weight: 700;
}
.antenne-support-label {
    color: rgba(248, 250, 252, 0.85);
}

/* --- Bloc "Antenne en direct" --- */
.antenne-card {
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
    color: #f8fafc;
    border-radius: 0.875rem;
    padding: 1.25rem 1.5rem;
    border: 1px solid #1e293b;
    position: relative;
    overflow: hidden;
}
.antenne-card-grid {
    display: grid;
    grid-template-columns: 64px auto 1fr auto;
    gap: 1.25rem;
    align-items: center;
}
@media (max-width: 768px) {
    .antenne-card-grid {
        grid-template-columns: 64px 1fr;
        gap: 0.875rem;
    }
    .antenne-card-grid > :nth-child(3),
    .antenne-card-grid > :nth-child(4) { grid-column: 1 / -1; }
}

/* Pochette du bloc Antenne en direct */
.antenne-cover {
    width: 64px;
    height: 64px;
    border-radius: 0.625rem;
    background-color: rgb(255 255 255 / 0.06);
    background-size: cover;
    background-position: center;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #475569;
    font-size: 1.5rem;
    overflow: hidden;
    border: 1px solid rgb(255 255 255 / 0.08);
    flex-shrink: 0;
    transition: background-image 200ms ease;
}
.antenne-cover.has-cover { color: transparent; border-color: transparent; }
.antenne-status-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.4375rem;
    padding: 0.3125rem 0.6875rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 500;
    background-color: rgb(255 255 255 / 0.08);
    border: 1px solid rgb(255 255 255 / 0.1);
    color: #cbd5e1;
}
.antenne-status-pill .status-dot {
    width: 7px;
    height: 7px;
    border-radius: 9999px;
    background-color: #64748b;
    flex-shrink: 0;
}
.antenne-status-pill.online {
    background-color: rgb(16 185 129 / 0.12);
    border-color: rgb(16 185 129 / 0.3);
    color: #6ee7b7;
}
.antenne-status-pill.online .status-dot {
    background-color: #10b981;
    box-shadow: 0 0 0 3px rgb(16 185 129 / 0.2);
    animation: pulseDot 2s ease-in-out infinite;
}
.antenne-status-pill.offline {
    background-color: rgb(220 38 38 / 0.12);
    border-color: rgb(220 38 38 / 0.3);
    color: #fca5a5;
}
.antenne-status-pill.offline .status-dot { background-color: #dc2626; }
@keyframes pulseDot {
    0%, 100% { opacity: 1; }
    50%      { opacity: 0.5; }
}

.antenne-now {
    min-width: 0;
}
.antenne-now-label {
    font-size: 0.6875rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #64748b;
    margin-bottom: 0.25rem;
    font-weight: 500;
}
.antenne-now-title {
    font-size: 1rem;
    font-weight: 600;
    color: #f8fafc;
    margin: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    letter-spacing: -0.01em;
}
.antenne-now-artist {
    font-size: 0.8125rem;
    color: #94a3b8;
    margin-top: 0.125rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.antenne-metric {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    line-height: 1.1;
}
.antenne-metric-value {
    font-size: 1.5rem;
    font-weight: 600;
    color: #f8fafc;
    letter-spacing: -0.025em;
    font-variant-numeric: tabular-nums;
}
.antenne-metric-label {
    font-size: 0.6875rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #64748b;
    font-weight: 500;
    margin-top: 0.25rem;
}

.antenne-actions {
    display: flex;
    gap: 0.375rem;
    flex-wrap: wrap;
}
.antenne-actions .btn {
    background-color: rgb(255 255 255 / 0.08);
    border-color: rgb(255 255 255 / 0.12);
    color: #f8fafc;
    font-size: 0.8125rem;
    padding: 0.375rem 0.75rem;
}
.antenne-actions .btn:hover {
    background-color: rgb(255 255 255 / 0.14);
    border-color: rgb(255 255 255 / 0.2);
    color: #fff;
}

/* --- Stats-cards productions compactées en une ligne --- */
.production-stats-row {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 0.75rem;
}
@media (max-width: 991px) {
    .production-stats-row {
        grid-template-columns: repeat(3, 1fr);
    }
}
@media (max-width: 575px) {
    .production-stats-row {
        grid-template-columns: repeat(2, 1fr);
    }
}
.production-stats-row .stat-card {
    padding: 0.75rem 0.875rem;
    background-color: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 0.625rem;
    display: flex;
    align-items: center;
    gap: 0.625rem;
    transition: border-color 150ms ease;
}
.production-stats-row .stat-card:hover {
    border-color: #cbd5e1;
}
.production-stats-row .stat-icon {
    width: 32px;
    height: 32px;
    border-radius: 0.5rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    flex-shrink: 0;
}
.production-stats-row .stat-icon.primary  { background-color: #f1f5f9; color: #0f172a; }
.production-stats-row .stat-icon.info     { background-color: #e0f2fe; color: #0369a1; }
.production-stats-row .stat-icon.success  { background-color: #d1fae5; color: #047857; }
.production-stats-row .stat-icon.warning  { background-color: #fef3c7; color: #b45309; }
.production-stats-row .stat-icon.podcast  { background-color: #ede9fe; color: #6d28d9; }

.production-stats-row .stat-content {
    line-height: 1.15;
    min-width: 0;
}
.production-stats-row .stat-value {
    font-size: 1.0625rem;
    font-weight: 600;
    color: #0f172a;
    font-variant-numeric: tabular-nums;
    letter-spacing: -0.02em;
}
.production-stats-row .stat-label {
    font-size: 0.6875rem;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* --- Production-card icon "podcast" (manquait dans app.css) --- */
.production-card-icon.podcast {
    background-color: #ede9fe;  /* violet-100 */
    color: #6d28d9;             /* violet-700 */
}

/* --- Sidebar player : pochette + artiste --- */
.sidebar-player-cover {
    width: 36px;
    height: 36px;
    border-radius: 0.375rem;
    background-color: #1e293b;
    background-size: cover;
    background-position: center;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #64748b;
    font-size: 1rem;
    flex-shrink: 0;
    margin-right: 0.5rem;
    overflow: hidden;
    transition: background-image 200ms ease;
}
.sidebar-player-cover.has-cover { color: transparent; }
.sidebar-player-info { min-width: 0; flex: 1 1 auto; }
.sidebar-player-title {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.sidebar-player-artist {
    font-size: 0.75rem;
    color: #94a3b8;
    line-height: 1.1;
    margin-top: 1px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.sidebar-player-artist:empty { display: none; }

/* --- Contrôles Liquidsoap dans /admin/radios/{id} --- */
.liquidsoap-controls {
    display: inline-flex;
    flex-wrap: wrap;
    gap: 0.375rem;
}
.liquidsoap-controls .btn {
    padding: 0.3125rem 0.625rem;
    font-size: 0.8125rem;
    font-weight: 500;
    line-height: 1.2;
}
.liquidsoap-controls .btn i {
    font-size: 0.875rem;
}

/* --- Stat-cards productions cliquables : flèche au hover --- */
.production-stats-row a.stat-card {
    color: inherit;
    cursor: pointer;
    position: relative;
    overflow: hidden;
}
.production-stats-row a.stat-card:hover {
    border-color: #94a3b8;
    background-color: #f8fafc;
}
.stat-card-arrow {
    position: absolute;
    right: 0.625rem;
    top: 50%;
    transform: translate(8px, -50%);
    color: #94a3b8;
    font-size: 0.875rem;
    opacity: 0;
    transition: opacity 150ms ease, transform 200ms ease;
    pointer-events: none;
}
.production-stats-row a.stat-card:hover .stat-card-arrow {
    opacity: 1;
    transform: translate(0, -50%);
}

/* --- Bloc graphique stats d'écoute --- */
.listener-stats-card .card-body {
    padding: 1.25rem 1.25rem 1rem;
}
.listener-totals {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.75rem;
    margin-bottom: 1rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid #f1f5f9;
}
@media (max-width: 575px) {
    .listener-totals { grid-template-columns: 1fr; gap: 0.375rem; padding-bottom: 0.5rem; }
}
.listener-total {
    display: flex;
    flex-direction: column;
    line-height: 1.1;
}
.listener-total-label {
    font-size: 0.6875rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: #64748b;
    font-weight: 500;
    margin-bottom: 0.25rem;
}
.listener-total-value {
    font-size: 1.375rem;
    font-weight: 600;
    color: #0f172a;
    letter-spacing: -0.025em;
    font-variant-numeric: tabular-nums;
}

.listener-chart-wrapper {
    position: relative;
    min-height: 220px;
}
.listener-empty-state {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    color: #94a3b8;
    background-color: rgb(248 250 252 / 0.85);
    backdrop-filter: blur(2px);
    border-radius: 0.5rem;
    font-size: 0.8125rem;
    pointer-events: none;
}
.listener-empty-state i {
    font-size: 1.5rem;
    color: #cbd5e1;
}
