/* assets/css/panel.css */

/* Variables de thème */
:root {
    color-scheme: light;

    --panel-body-bg: #f4f5fb;
    --panel-body-bg-gradient: radial-gradient(circle at top left, #e0e7ff 0, #f9fafb 40%, #f4f4f5 100%);
    --panel-body-color: #0f172a;

    --panel-surface-bg: rgba(255, 255, 255, 0.96);
    --panel-surface-alt-bg: rgba(255, 255, 255, 0.9);

    --panel-border-subtle: rgba(15, 23, 42, 0.06);
    --panel-border-strong: rgba(15, 23, 42, 0.12);

    --panel-shadow-soft: 0 22px 60px rgba(15, 23, 42, 0.10);
    --panel-shadow-subtle: 0 12px 30px rgba(15, 23, 42, 0.06);

    --panel-radius-lg: 1.25rem;
    --panel-radius-pill: 999px;

    --panel-primary: #4f46e5;
    --panel-primary-soft: rgba(79, 70, 229, 0.12);
    --panel-primary-strong: #3730a3;

    --panel-accent: #ec4899;
    --panel-accent-soft: rgba(236, 72, 153, 0.14);

    --panel-success: #22c55e;
    --panel-warning: #fbbf24;
    --panel-danger: #f97373;
    --panel-muted: #6b7280;

    --panel-topbar-height: 64px;
    --panel-menu-height: 58px;
    --panel-backdrop-blur: 18px;
}

body.theme-dark {
    color-scheme: dark;

    --panel-body-bg: #020617;
    --panel-body-bg-gradient: radial-gradient(circle at top, #1f2937 0, #020617 45%, #000000 100%);
    --panel-body-color: #e5e7eb;

    --panel-surface-bg: rgba(15, 23, 42, 0.96);
    --panel-surface-alt-bg: rgba(15, 23, 42, 0.92);

    --panel-border-subtle: rgba(148, 163, 184, 0.25);
    --panel-border-strong: rgba(148, 163, 184, 0.4);

    --panel-shadow-soft: 0 22px 60px rgba(15, 23, 42, 0.85);
    --panel-shadow-subtle: 0 12px 30px rgba(15, 23, 42, 0.65);

    --panel-primary: #a855f7;
    --panel-primary-soft: rgba(168, 85, 247, 0.20);
    --panel-primary-strong: #7c3aed;

    --panel-accent: #22c55e;
    --panel-accent-soft: rgba(34, 197, 94, 0.20);

    --panel-success: #22c55e;
    --panel-warning: #eab308;
    --panel-danger: #fb7185;
    --panel-muted: #9ca3af;
}

/* Reset & base */
*,
*::before,
*::after {
    box-sizing: border-box;
}

html, body {
    height: 100%;
}

body {
    margin: 0;
    font-family: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: var(--panel-body-bg-gradient);
    color: var(--panel-body-color);
    text-rendering: optimizeLegibility;
    -webkit-font-smoothing: antialiased;
    padding-top: calc(var(--panel-topbar-height) + var(--panel-menu-height) + 16px);
}

/* Effet halo global */
.page-shell {
    min-height: 100vh;
    position: relative;
    isolation: isolate;
}

.page-shell::before {
    content: "";
    position: fixed;
    inset: 0;
    pointer-events: none;
    background:
        radial-gradient(circle at 0% 0%, rgba(79, 70, 229, 0.22), transparent 55%),
        radial-gradient(circle at 100% 0%, rgba(236, 72, 153, 0.18), transparent 55%);
    opacity: 0.9;
    z-index: -2;
}

.page-shell::after {
    content: "";
    position: fixed;
    inset: 0;
    pointer-events: none;
    background:
        radial-gradient(circle at 30% 120%, rgba(45, 212, 191, 0.18), transparent 55%);
    opacity: 0.7;
    z-index: -3;
}

a {
    text-decoration: none;
}

/* Topbar & menu */
.navbar-panel.topbar {
    height: var(--panel-topbar-height);
    backdrop-filter: blur(var(--panel-backdrop-blur));
    -webkit-backdrop-filter: blur(var(--panel-backdrop-blur));
    border-bottom: 1px solid var(--panel-border-subtle);
    background-color: rgba(15, 23, 42, 0.92);
    box-shadow: 0 18px 45px rgba(15, 23, 42, 0.40);
    z-index: 1050;
}

body:not(.theme-dark) .navbar-panel.topbar {
    background-color: rgba(255, 255, 255, 0.96);
    box-shadow: 0 18px 45px rgba(15, 23, 42, 0.14);
}

.navbar-panel.topbar .navbar-brand {
    padding-top: 0;
    padding-bottom: 0;
}

/* Logo & marque */
.brand-logo-wrap {
    width: 34px;
    height: 34px;
    border-radius: 16px;
    background: radial-gradient(circle at 0 0, rgba(79, 70, 229, 0.9), rgba(236, 72, 153, 0.9));
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 12px 30px rgba(79, 70, 229, 0.45);
}

.brand-logo-wrap-sm {
    width: 32px;
    height: 32px;
    border-radius: 14px;
}

.brand-logo {
    max-width: 22px;
    max-height: 22px;
    display: block;
}

.brand-text .brand-title {
    font-size: 0.9rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.brand-text .brand-subtitle {
    font-size: 0.75rem;
    color: var(--panel-muted);
}

/* Recherche topbar */
.topbar-search {
    max-width: 520px;
}

.search-input-group {
    background: var(--panel-surface-alt-bg);
    border-radius: 999px;
    border: 1px solid var(--panel-border-subtle);
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.08);
}

.search-input-group .input-group-text {
    background: transparent;
    border-radius: 999px 0 0 999px;
    color: var(--panel-muted);
    border-right: 0;
}

.search-input-group .form-control {
    background: transparent;
    border-radius: 0 999px 999px 0;
    box-shadow: none !important;
    border-left: 0;
    font-size: 0.85rem;
}

.search-input-group .form-control::placeholder {
    color: #9ca3af;
}

.search-kbd {
    border-radius: 999px;
    background: linear-gradient(135deg, rgba(148, 163, 184, 0.18), rgba(148, 163, 184, 0.04));
    border: 0;
    font-size: 0.7rem;
    gap: 4px;
}

.search-kbd-key {
    padding: 2px 6px;
    border-radius: 6px;
    background: rgba(148, 163, 184, 0.16);
    border: 1px solid rgba(148, 163, 184, 0.45);
}

/* Boutons fantômes */
.btn-ghost {
    border-radius: 999px;
    border: 1px solid transparent;
    background: transparent;
    color: inherit;
    padding-inline: 0.6rem;
    padding-block: 0.4rem;
    font-size: 0.85rem;
    transition: background-color 0.16s ease, border-color 0.16s ease, transform 0.1s ease, box-shadow 0.1s ease;
}

.btn-ghost:hover {
    background: rgba(148, 163, 184, 0.08);
    border-color: rgba(148, 163, 184, 0.35);
    box-shadow: 0 10px 20px rgba(15, 23, 42, 0.15);
    transform: translateY(-1px);
}

.icon-btn {
    width: 32px;
    height: 32px;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
}

/* Avatar & user */
.btn-user {
    border-radius: 999px;
    padding: 4px 8px;
    background: linear-gradient(135deg, rgba(79, 70, 229, 0.15), rgba(236, 72, 153, 0.08));
    border: 1px solid rgba(79, 70, 229, 0.45);
    box-shadow: 0 12px 25px rgba(79, 70, 229, 0.35);
    color: #f9fafb;
}

body:not(.theme-dark) .btn-user {
    background: linear-gradient(135deg, rgba(79, 70, 229, 0.14), rgba(236, 72, 153, 0.05));
    color: #111827;
}

.btn-user:hover {
    transform: translateY(-1px);
    box-shadow: 0 16px 35px rgba(79, 70, 229, 0.4);
}

.avatar {
    width: 32px;
    height: 32px;
    border-radius: 999px;
    overflow: hidden;
    border: 2px solid rgba(248, 250, 252, 0.9);
    box-shadow: 0 0 0 2px rgba(79, 70, 229, 0.5);
}

.avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.user-name {
    font-size: 0.78rem;
    font-weight: 600;
}

.user-role {
    font-size: 0.7rem;
    color: rgba(148, 163, 184, 0.9);
}

/* Badge notifications */
.badge-notif {
    position: absolute;
    top: -2px;
    right: -1px;
    min-width: 16px;
    height: 16px;
    padding: 0 4px;
    border-radius: 999px;
    background: linear-gradient(135deg, #ec4899, #f97316);
    color: #fefce8;
    font-size: 0.65rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 10px 24px rgba(248, 113, 113, 0.6);
}

/* Dropdown notifications */
.dropdown-menu-notifications {
    width: min(360px, 92vw);
    border-radius: 1rem;
    border: 1px solid var(--panel-border-subtle);
    padding: 0.75rem 0;
}

.dropdown-menu-notifications .dropdown-header {
    padding-inline: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid var(--panel-border-subtle);
    font-size: 0.8rem;
}

.notif-list {
    max-height: 320px;
    overflow-y: auto;
    padding: 0.25rem 0.5rem 0.5rem;
}

.notif-item {
    display: flex;
    gap: 0.75rem;
    padding: 0.5rem 0.5rem;
    margin: 0.15rem 0;
    border-radius: 0.75rem;
    transition: background-color 0.16s ease, transform 0.08s ease;
}

.notif-item:hover {
    background: rgba(148, 163, 184, 0.08);
    transform: translateY(-1px);
}

.notif-icon {
    width: 32px;
    height: 32px;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
}

.notif-icon-success {
    background: rgba(34, 197, 94, 0.12);
    color: #16a34a;
}

.notif-icon-warning {
    background: rgba(250, 204, 21, 0.14);
    color: #eab308;
}

.notif-icon-accent {
    background: rgba(236, 72, 153, 0.16);
    color: #ec4899;
}

.notif-content {
    flex: 1;
    min-width: 0;
}

.notif-title {
    font-size: 0.78rem;
    font-weight: 600;
}

.notif-text {
    font-size: 0.74rem;
}

.notif-meta {
    font-size: 0.7rem;
    color: var(--panel-muted);
}

.dropdown-footer {
    padding: 0.5rem 1rem 0;
    border-top: 1px solid var(--panel-border-subtle);
}

/* Menu principal */
.navbar-panel-menu {
    position: fixed;
    top: var(--panel-topbar-height);
    left: 0;
    right: 0;
    z-index: 1040;
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    background: linear-gradient(to right, rgba(15, 23, 42, 0.96), rgba(15, 23, 42, 0.9));
    border-bottom: 1px solid rgba(15, 23, 42, 0.65);
}

body:not(.theme-dark) .navbar-panel-menu {
    background: linear-gradient(to right, rgba(255, 255, 255, 0.98), rgba(249, 250, 251, 0.98));
    border-bottom: 1px solid rgba(148, 163, 184, 0.25);
}

.main-menu .nav-link {
    position: relative;
    font-size: 0.86rem;
    font-weight: 500;
    padding-inline: 0.9rem;
    padding-block: 0.45rem;
    border-radius: 999px;
    color: #e5e7eb;
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    transition: background-color 0.15s ease, color 0.15s ease, transform 0.08s ease, box-shadow 0.08s ease;
}

body:not(.theme-dark) .main-menu .nav-link {
    color: #111827;
}

.main-menu .nav-link i {
    font-size: 0.95em;
}

.main-menu .nav-link:hover {
    background: rgba(148, 163, 184, 0.25);
    box-shadow: 0 12px 28px rgba(15, 23, 42, 0.3);
    transform: translateY(-1px);
}

body:not(.theme-dark) .main-menu .nav-link:hover {
    background: rgba(79, 70, 229, 0.08);
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.12);
}

.main-menu .nav-link.active {
    background: linear-gradient(135deg, var(--panel-primary), var(--panel-accent));
    color: #f9fafb;
    box-shadow: 0 16px 40px rgba(79, 70, 229, 0.55);
}

.main-menu .nav-link.active::after {
    content: "";
    position: absolute;
    inset-inline: 18%;
    bottom: -6px;
    height: 2px;
    border-radius: 999px;
    background: linear-gradient(to right, var(--panel-primary), var(--panel-accent));
}

/* Status dot */
.status-dot {
    width: 8px;
    height: 8px;
    border-radius: 999px;
    display: inline-block;
}

.status-dot-success {
    background: #22c55e;
    box-shadow: 0 0 0 4px rgba(34, 197, 94, 0.38);
}

/* Conteneur principal & panel box */
.main-wrapper {
    padding-inline: 0.75rem;
    padding-bottom: 2rem;
}

.main-container {
    animation: fade-in-up 0.4s ease-out;
}

.panel-box {
    max-width: 1400px;
    border-radius: calc(var(--panel-radius-lg) + 0.25rem);
    background: radial-gradient(circle at top left, rgba(248, 250, 252, 0.96), rgba(255, 255, 255, 0.96));
    background-color: var(--panel-surface-bg);
    border: 1px solid var(--panel-border-subtle);
    box-shadow: var(--panel-shadow-soft);
    padding: 1.5rem 1.5rem 1.75rem;
    position: relative;
    overflow: hidden;
}

body.theme-dark .panel-box {
    background: radial-gradient(circle at top, rgba(15, 23, 42, 0.98), rgba(2, 6, 23, 0.98));
}

/* Halo interne */
.panel-box::before {
    content: "";
    position: absolute;
    inset: -40%;
    background:
        radial-gradient(circle at 15% 0, rgba(79, 70, 229, 0.15), transparent 55%),
        radial-gradient(circle at 90% 0, rgba(236, 72, 153, 0.10), transparent 55%);
    opacity: 0.45;
    pointer-events: none;
    mix-blend-mode: soft-light;
}

/* Titre de page */
.panel-box-header {
    position: relative;
    z-index: 1;
}

.page-title {
    font-size: clamp(1.5rem, 2.4vw, 1.9rem);
    font-weight: 600;
    letter-spacing: -0.02em;
}

.page-subtitle {
    font-size: 0.86rem;
    color: var(--panel-muted);
}

/* Badges */
.badge-soft-primary {
    background: var(--panel-primary-soft);
    color: var(--panel-primary-strong);
}

.badge-soft-neutral {
    background: rgba(148, 163, 184, 0.16);
    color: #374151;
}

.badge-soft-warning {
    background: rgba(251, 191, 36, 0.18);
    color: #92400e;
}

/* Breadcrumb modernisé */
.breadcrumb-elevated {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.5rem 0.85rem;
    border-radius: 999px;
    background: rgba(148, 163, 184, 0.08);
    border: 1px solid rgba(148, 163, 184, 0.22);
    box-shadow: 0 10px 22px rgba(15, 23, 42, 0.12);
    font-size: 0.78rem;
}

.breadcrumb-elevated .breadcrumb-item + .breadcrumb-item::before {
    content: "›";
    color: var(--panel-muted);
}

.breadcrumb-elevated .breadcrumb-item a {
    color: inherit;
}

.breadcrumb-elevated .breadcrumb-item.active {
    color: var(--panel-primary);
    font-weight: 500;
}

.breadcrumb-current-dot {
    display: inline-block;
    width: 7px;
    height: 7px;
    border-radius: 999px;
    background: linear-gradient(135deg, var(--panel-primary), var(--panel-accent));
    margin-right: 4px;
}

/* Cartes & stats */
.card {
    border-radius: 1rem;
    border: 1px solid var(--panel-border-subtle);
    background-color: var(--panel-surface-bg);
}

.card-soft {
    background: radial-gradient(circle at top left, rgba(248, 250, 252, 0.95), rgba(255, 255, 255, 0.98));
    border: 1px solid var(--panel-border-subtle);
    box-shadow: var(--panel-shadow-subtle);
}

body.theme-dark .card-soft {
    background: radial-gradient(circle at top left, rgba(15, 23, 42, 0.96), rgba(15, 23, 42, 0.98));
}

/* Cartes stats */
.card-stat {
    position: relative;
    overflow: hidden;
    border-radius: 1.1rem;
    border: 1px solid rgba(148, 163, 184, 0.22);
    background: radial-gradient(circle at top left, rgba(79, 70, 229, 0.08), rgba(248, 250, 252, 0.98));
}

body.theme-dark .card-stat {
    background: radial-gradient(circle at top left, rgba(79, 70, 229, 0.26), rgba(15, 23, 42, 0.98));
}

.card-stat::before {
    content: "";
    position: absolute;
    inset-inline: 10%;
    bottom: -40%;
    height: 60%;
    background: radial-gradient(circle at 50% 0, rgba(79, 70, 229, 0.2), transparent 70%);
    opacity: 0.7;
}

.card-stat-icon-wrap {
    position: relative;
    z-index: 1;
}

.card-stat-icon {
    width: 40px;
    height: 40px;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: radial-gradient(circle at 0 0, rgba(79, 70, 229, 0.9), rgba(99, 102, 241, 0.8));
    color: #eef2ff;
    box-shadow: 0 10px 24px rgba(79, 70, 229, 0.6);
    font-size: 1rem;
}

.card-stat-icon-accent {
    background: radial-gradient(circle at 0 0, rgba(236, 72, 153, 0.9), rgba(251, 113, 133, 0.85));
    box-shadow: 0 10px 24px rgba(236, 72, 153, 0.65);
}

.card-stat-icon-warning {
    background: radial-gradient(circle at 0 0, rgba(250, 204, 21, 0.9), rgba(245, 158, 11, 0.8));
    box-shadow: 0 10px 24px rgba(245, 158, 11, 0.55);
}

.card-stat-icon-success {
    background: radial-gradient(circle at 0 0, rgba(34, 197, 94, 0.85), rgba(22, 163, 74, 0.9));
    box-shadow: 0 10px 24px rgba(22, 163, 74, 0.6);
}

.card-stat-label {
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--panel-muted);
    margin-bottom: 0.1rem;
}

.card-stat-value {
    font-size: 1.35rem;
    font-weight: 600;
    letter-spacing: -0.03em;
}

.card-stat-trend {
    font-size: 0.74rem;
    display: inline-flex;
    align-items: center;
    gap: 0.2rem;
}

/* Timeline */
.timeline {
    list-style: none;
    margin: 0;
    padding: 0.5rem 0 0 0;
    position: relative;
}

.timeline::before {
    content: "";
    position: absolute;
    left: 15px;
    top: 0.25rem;
    bottom: 0.25rem;
    width: 2px;
    background: linear-gradient(to bottom, rgba(148, 163, 184, 0.4), transparent);
}

.timeline-item {
    position: relative;
    display: flex;
    gap: 0.75rem;
    padding-left: 2.25rem;
    padding-bottom: 0.9rem;
}

.timeline-badge {
    position: absolute;
    left: 6px;
    top: 0.1rem;
    width: 18px;
    height: 18px;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.65rem;
    box-shadow: 0 6px 14px rgba(15, 23, 42, 0.25);
}

.timeline-content {
    flex: 1;
    min-width: 0;
}

.timeline-title {
    font-size: 0.84rem;
    font-weight: 600;
}

.timeline-text {
    font-size: 0.8rem;
    color: var(--panel-body-color);
}

.timeline-text code {
    font-size: 0.75em;
    padding: 0.1rem 0.4rem;
    border-radius: 999px;
    background: rgba(148, 163, 184, 0.16);
    border: 1px solid rgba(148, 163, 184, 0.35);
}

.timeline-meta {
    font-size: 0.74rem;
    color: var(--panel-muted);
}

/* Instantané personnel */
.pill-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
}

.pill-item {
    border-radius: 999px;
    border: 1px solid transparent;
    font-size: 0.74rem;
    padding: 0.15rem 0.8rem;
    background: rgba(148, 163, 184, 0.10);
    color: var(--panel-muted);
    cursor: default;
}

.pill-item.active {
    background: linear-gradient(135deg, var(--panel-primary), var(--panel-accent));
    color: #f9fafb;
    border-color: transparent;
}

.gap-list {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.gap-list-item {
    padding: 0.45rem 0.4rem;
    border-radius: 0.7rem;
    background: rgba(148, 163, 184, 0.08);
}

.dot {
    width: 8px;
    height: 8px;
    border-radius: 999px;
}

.dot-green {
    background: #22c55e;
}

.dot-blue {
    background: #3b82f6;
}

.dot-amber {
    background: #f97316;
}

.badge-soft-primary {
    background: var(--panel-primary-soft);
    color: var(--panel-primary-strong);
}

/* AI Studio */
.ai-studio-card {
    background: radial-gradient(circle at 0 0, rgba(79, 70, 229, 0.24), rgba(15, 23, 42, 0.98));
    color: #e5e7eb;
    border-color: rgba(79, 70, 229, 0.5);
    box-shadow: 0 18px 40px rgba(79, 70, 229, 0.8);
}

/* Auth pages */
.auth-body {
    min-height: 100vh;
    background: radial-gradient(circle at top left, #0f172a 0, #020617 45%, #000000 100%);
    color: #e5e7eb;
}

.auth-wrapper {
    min-height: 100vh;
    display: flex;
    align-items: center;
}

.auth-card {
    background: radial-gradient(circle at 0 0, rgba(79, 70, 229, 0.25), rgba(15, 23, 42, 1));
    overflow: hidden;
}

.auth-card-aside {
    background: radial-gradient(circle at 0 0, rgba(79, 70, 229, 0.25), rgba(15, 23, 42, 0.9));
    border-right: 1px solid rgba(148, 163, 184, 0.25);
    color: #e5e7eb;
    position: relative;
}

.auth-card-aside::before {
    content: "";
    position: absolute;
    inset: -40%;
    background:
        radial-gradient(circle at 0 0, rgba(236, 72, 153, 0.25), transparent 50%),
        radial-gradient(circle at 100% 100%, rgba(56, 189, 248, 0.18), transparent 55%);
    opacity: 0.9;
    mix-blend-mode: screen;
    pointer-events: none;
}

.auth-heading {
    font-size: 1.5rem;
    font-weight: 600;
    letter-spacing: -0.03em;
}

.auth-perks li {
    font-size: 0.8rem;
    margin-bottom: 0.25rem;
}

.auth-aside-footer {
    border-top: 1px solid rgba(148, 163, 184, 0.25);
    background: rgba(15, 23, 42, 0.8);
}

/* Inputs auth */
.auth-form .form-label {
    font-weight: 500;
}

.auth-input-group .input-group-text {
    background: rgba(15, 23, 42, 0.9);
    border-color: rgba(148, 163, 184, 0.4);
    color: rgba(209, 213, 219, 0.96);
}

.auth-input-group .form-control {
    background: rgba(15, 23, 42, 0.86);
    border-color: rgba(148, 163, 184, 0.4);
    color: #f9fafb;
}

.auth-input-group .form-control::placeholder {
    color: rgba(156, 163, 175, 0.9);
}

.auth-input-group .form-control:focus {
    border-color: rgba(129, 140, 248, 0.9);
    box-shadow: 0 0 0 1px rgba(129, 140, 248, 0.8);
}

/* Ombre douce */
.shadow-soft {
    box-shadow: var(--panel-shadow-soft);
}

/* Animations */
@keyframes fade-in-up {
    from {
        opacity: 0;
        transform: translateY(8px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Responsif */
@media (max-width: 991.98px) {
    body {
        padding-top: calc(var(--panel-topbar-height) + 12px);
    }

    .navbar-panel-menu {
        top: var(--panel-topbar-height);
        padding-block: 0.3rem;
    }

    .panel-box {
        padding: 1.25rem 1.15rem 1.4rem;
    }

    .main-wrapper {
        padding-inline: 0.5rem;
    }
}

@media (max-width: 575.98px) {
    .navbar-panel.topbar {
        height: 60px;
    }
    .page-title {
        font-size: 1.35rem;
    }
    .breadcrumb-elevated {
        width: 100%;
        justify-content: space-between;
    }
}









/* PAGE AI GENERATION CONTENU */
/* Ajouts à assets/css/panel.css pour la page AI CMS */

/* Card CMS */
.cms-card {
    border-radius: 1rem;
}

.cms-card-body {
    padding-block: 1.1rem;
}

.cms-site-select-group {
    border-radius: 999px;
    overflow: hidden;
    border: 1px solid var(--panel-border-subtle);
    background: var(--panel-surface-bg);
}

.cms-site-select-group .input-group-text {
    border: 0;
    background: transparent;
    color: var(--panel-muted);
}

.cms-site-select-group .form-select {
    border: 0;
    background: transparent;
    font-size: 0.85rem;
}

/* Prompt maître */
.prompt-card {
    position: relative;
}

.prompt-card::before {
    content: "";
    position: absolute;
    inset-inline: 16px;
    top: 52px;
    height: 1px;
    background: linear-gradient(to right, rgba(148, 163, 184, 0.4), transparent);
    opacity: 0.7;
}

.prompt-textarea-wrap {
    position: relative;
    border-radius: 0.9rem;
    overflow: hidden;
    border: 1px solid var(--panel-border-subtle);
    background: radial-gradient(circle at 0 0, rgba(15, 23, 42, 0.04), transparent 55%);
}

body.theme-dark .prompt-textarea-wrap {
    background: radial-gradient(circle at 0 0, rgba(148, 163, 184, 0.14), transparent 55%);
}

.prompt-textarea {
    border: 0;
    resize: vertical;
    font-family: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    font-size: 0.8rem;
    line-height: 1.4;
    padding: 0.9rem 0.9rem;
    background: transparent;
}

/* Sources */
.source-blocks {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.card-soft-inner {
    border-radius: 0.9rem;
    padding: 0.75rem 0.75rem 0.9rem;
    background: rgba(148, 163, 184, 0.05);
    border: 1px dashed rgba(148, 163, 184, 0.45);
}

body.theme-dark .card-soft-inner {
    background: rgba(15, 23, 42, 0.92);
}

.source-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.15rem 0.55rem;
    border-radius: 999px;
    font-size: 0.72rem;
    font-weight: 500;
    background: rgba(79, 70, 229, 0.15);
    color: var(--panel-primary-strong);
}

.source-textarea {
    font-size: 0.8rem;
    border-radius: 0.7rem;
    border: 1px solid rgba(148, 163, 184, 0.45);
    background: rgba(255, 255, 255, 0.94);
}

body.theme-dark .source-textarea {
    background: rgba(15, 23, 42, 0.96);
    color: #e5e7eb;
}

/* XS ghost button */
.btn-xs {
    padding: 0.15rem 0.4rem;
    font-size: 0.7rem;
}

/* Modal glass */
.modal-glass .modal-content {
    border-radius: 1.25rem;
    border: 1px solid rgba(148, 163, 184, 0.45);
    background: radial-gradient(circle at 0 0, rgba(15, 23, 42, 0.96), rgba(15, 23, 42, 0.98));
    color: #e5e7eb;
    box-shadow: 0 24px 70px rgba(15, 23, 42, 0.95);
}

.modal-glass .modal-header .btn-close {
    filter: invert(1) grayscale(1);
}

/* Progress */
.progress-thin {
    height: 6px;
    border-radius: 999px;
    background-color: rgba(31, 41, 55, 0.7);
}

.progress-thin .progress-bar {
    border-radius: 999px;
    background-image: linear-gradient(90deg, #4f46e5, #ec4899, #22c55e);
    background-size: 200% 100%;
    animation: progress-stripes 1.1s linear infinite;
}

/* Log de génération */
.generation-log {
    max-height: 220px;
    border-radius: 0.75rem;
    border: 1px solid rgba(148, 163, 184, 0.3);
    background: rgba(15, 23, 42, 0.85);
    padding: 0.6rem 0.75rem;
    overflow-y: auto;
    font-size: 0.78rem;
}

.generation-log-item {
    padding: 0.25rem 0.4rem;
    border-radius: 0.45rem;
    margin-bottom: 0.2rem;
    display: flex;
    align-items: center;
}

.generation-log-item-info {
    color: #e5e7eb;
}

.generation-log-item-success {
    color: #bbf7d0;
    background: rgba(22, 163, 74, 0.12);
}

.generation-log-item-error {
    color: #fecaca;
    background: rgba(239, 68, 68, 0.2);
}

/* Alertes panel */
.alert-panel {
    border-radius: 0.8rem;
    border: 1px solid var(--panel-border-subtle);
}

/* Animations */
@keyframes progress-stripes {
    0% {
        background-position: 0% 50%;
    }
    100% {
        background-position: 200% 50%;
    }
}
