/* --- DESIGN SYSTEM CHANV OFFICIAL (APPS HUB) --- */
:root {
    --chanv-blanc: #FFFFFF;
    --chanv-beige: #DDCBA4;
    --chanv-fibre: #F1EADA;
    --chanv-terre: #282828;

    --bg-main: var(--chanv-blanc);
    --bg-alternate: var(--chanv-fibre);
    --text-main: var(--chanv-terre);
    --accent: var(--chanv-beige);

    --shadow-soft: 0 4px 20px rgba(40, 40, 40, 0.05);
    --shadow-bold: 0 12px 40px rgba(40, 40, 40, 0.1);
    --radius: 12px;
    --radius-lg: 20px;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

* {
    box-sizing: border-box;
    -webkit-font-smoothing: antialiased;
}

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--chanv-blanc);
    background-image: radial-gradient(var(--chanv-fibre) 1px, transparent 1px);
    background-size: 40px 40px;
    background-attachment: fixed;
    color: var(--text-main);
    margin: 0;
    min-height: 100vh;
}

h1,
h2,
h3,
.dash-title {
    font-family: 'Outfit', sans-serif;
    margin: 0;
}

.hidden {
    display: none !important;
}

/* --- HEADER --- */
.main-header {
    background: var(--chanv-terre);
    color: var(--chanv-blanc);
    padding: 40px 20px 90px;
    position: relative;
    overflow: hidden;
}

.main-header::after {
    content: "";
    position: absolute;
    bottom: -50px;
    left: 0;
    width: 100%;
    height: 100px;
    background: var(--chanv-blanc);
    transform: skewY(-2deg);
}

.header-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    gap: 24px;
    position: relative;
    z-index: 10;
    flex-wrap: wrap;
}

.header-titles h1 {
    font-size: 20px;
    font-weight: 700;
    color: white;
    margin: 0;
    line-height: 1.2;
}

.header-titles p {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 3px;
    margin-top: 4px;
    opacity: 0.7;
    max-width: 280px;
}

.logo-wrapper {
    text-decoration: none;
    display: flex;
    align-items: center;
    background: var(--chanv-fibre);
    padding: 12px 18px;
    border-radius: 20px;
    box-shadow: var(--shadow-soft);
    transition: var(--transition);
    flex-shrink: 0;
}

.logo-wrapper:hover {
    filter: brightness(0.97);
    box-shadow: var(--shadow-bold);
}

.main-logo {
    height: 40px;
    display: block;
}

.header-nav {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-left: 8px;
}

/* --- Global FR/EN Language Toggle --- */
.header-lang-toggle {
    display: flex;
    gap: 2px;
    background: rgba(255,255,255,0.12);
    border-radius: 8px;
    padding: 3px;
    margin-left: 4px;
    border: 1px solid rgba(255,255,255,0.1);
}

.lang-toggle-btn {
    padding: 5px 12px;
    border: none;
    background: transparent;
    color: rgba(255,255,255,0.5);
    font-family: 'Outfit', sans-serif;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.8px;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.lang-toggle-btn:hover {
    color: rgba(255,255,255,0.8);
    background: rgba(255,255,255,0.08);
}

.lang-toggle-btn.active {
    background: var(--chanv-beige);
    color: var(--chanv-terre);
    box-shadow: 0 1px 4px rgba(0,0,0,0.2);
}

.view-toggle {
    display: flex;
    background: var(--chanv-fibre);
    border-radius: 12px;
    padding: 4px;
    gap: 4px;
    margin-bottom: 24px;
    width: 100%;
    max-width: 600px;
}

.toggle-btn {
    flex: 1;
    padding: 10px 12px;
    border: none;
    background: transparent;
    color: #888;
    font-size: 13px;
    font-weight: 600;
    border-radius: 10px;
    cursor: pointer;
    transition: var(--transition);
    font-family: inherit;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    white-space: nowrap;
}

.toggle-btn:hover {
    color: var(--chanv-terre);
    background: rgba(40, 40, 40, 0.05);
}

.toggle-btn.active {
    background: var(--chanv-terre);
    color: white;
    box-shadow: 0 2px 8px rgba(40, 40, 40, 0.2);
}

.toggle-btn.active .toggle-label {
    color: white;
}

.header-user-section {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-left: auto;
}

/* --- AVATAR + BURGER BUTTON --- */
.avatar-burger-btn {
    position: relative;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
    outline: none;
    -webkit-tap-highlight-color: transparent;
}

.avatar-burger-inner {
    position: relative;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 5px 14px 5px 5px;
    border-radius: 50px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.12);
    transition: var(--transition);
}

.avatar-burger-btn:hover .avatar-burger-inner {
    background: rgba(255, 255, 255, 0.15);
    border-color: rgba(255, 255, 255, 0.25);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
}

.avatar-burger-photo {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    border: 2px solid rgba(255, 255, 255, 0.25);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    object-fit: cover;
    transition: var(--transition);
}

.avatar-burger-btn:hover .avatar-burger-photo {
    border-color: rgba(255, 255, 255, 0.5);
}

.avatar-burger-icon {
    display: flex;
    flex-direction: column;
    gap: 4px;
    width: 16px;
}

.avatar-burger-icon span {
    display: block;
    height: 2px;
    width: 100%;
    background: rgba(255, 255, 255, 0.7);
    border-radius: 2px;
    transition: var(--transition);
}

.avatar-burger-icon span:nth-child(2) {
    width: 70%;
}

.avatar-burger-btn:hover .avatar-burger-icon span {
    background: white;
}

.avatar-burger-btn:hover .avatar-burger-icon span:nth-child(2) {
    width: 100%;
}

.user-details {
    text-align: right;
}

.header-user-section .user-name {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: #ffffff !important;
    text-decoration: none;
}

.header-user-section .user-role {
    display: block;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: rgba(255, 255, 255, 0.6) !important;
}

.user-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: none;
    box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.2);
    object-fit: cover;
}

/* --- ECOSYSTEM DROPDOWN --- */
.dropdown {
    position: relative;
    display: inline-block;
}

.dropdown-content {
    display: none;
    position: absolute;
    right: 0;
    top: 100%;
    /* Accolé au bouton */
    background-color: white;
    min-width: 240px;
    box-shadow: var(--shadow-bold);
    border-radius: var(--radius);
    z-index: 1000;
    overflow: hidden;
    border: 1px solid var(--chanv-fibre);
}

.dropdown-section {
    padding: 10px 20px;
    font-size: 11px;
    font-weight: 800;
    color: #999;
    text-transform: uppercase;
    background: #fafafa;
    border-bottom: 1px solid var(--chanv-fibre);
}

.dropdown-content::before {
    content: '';
    position: absolute;
    top: -20px;
    left: 0;
    width: 100%;
    height: 20px;
}

.dropdown:hover .dropdown-content {
    display: block;
    animation: fadeIn 0.2s;
}

.dropdown-content a {
    color: var(--chanv-terre);
    padding: 15px 20px;
    text-decoration: none;
    display: block;
    font-size: 14px;
    font-weight: 500;
    transition: background 0.2s;
}

.dropdown-content a:hover {
    background-color: var(--chanv-fibre);
}

/* --- DASHBOARD --- */
.container-dashboard {
    max-width: 1200px;
    margin: -10px auto 60px auto;
    padding: 0 20px;
    position: relative;
    z-index: 10;
}

.welcome-section {
    margin-bottom: 40px;
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 30px;
}

.welcome-left {
    flex-shrink: 0;
}

.welcome-section h2 {
    font-size: 28px;
    color: var(--chanv-terre);
}

.welcome-right {
    text-align: right;
    min-width: 0;
}

.welcome-date {
    font-family: 'Outfit', sans-serif;
    font-size: 15px;
    font-weight: 600;
    color: var(--chanv-terre);
    margin: 0 0 6px 0;
    letter-spacing: 0.3px;
}

.welcome-quote {
    font-size: 13px;
    font-style: italic;
    color: #888;
    margin: 0;
    line-height: 1.5;
    max-width: 420px;
    margin-left: auto;
}

.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(185px, 1fr));
    gap: 20px;
    min-height: 200px;
}

.category-header {
    grid-column: 1 / -1;
    font-family: 'Outfit', sans-serif;
    font-size: 15px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: var(--chanv-terre);
    padding: 8px 0 0;
    border-bottom: 2px solid var(--chanv-beige);
    margin-top: 10px;
}

.category-header:first-child {
    margin-top: 0;
}

.restricted-notice {
    grid-column: 1 / -1;
    text-align: center;
    padding: 60px 20px;
    background: var(--chanv-fibre);
    border-radius: var(--radius-lg);
    border: 1px dashed var(--chanv-beige);
    max-width: 600px;
    margin: 40px auto;
}

.notice-icon {
    font-size: 48px;
    margin-bottom: 20px;
}

.restricted-notice h3 {
    font-size: 24px;
    margin-bottom: 10px;
    color: var(--chanv-terre);
}

.restricted-notice p {
    color: #666;
    margin: 5px 0;
}

.app-tile {
    background: white;
    border-radius: var(--radius-lg);
    text-decoration: none;
    color: inherit;
    border: 1px solid var(--chanv-fibre);
    box-shadow: var(--shadow-soft);
    transition: var(--transition);
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    overflow: hidden;
}

/* Tiles with image: no top padding, image fills card */
.app-tile.has-image {
    padding: 0;
}

/* Tiles with emoji only: keep padding */
.app-tile.emoji-only {
    padding: 24px 16px;
}

.app-tile:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-bold);
    border-color: var(--chanv-beige);
}

.app-icon {
    font-size: 40px;
    margin-bottom: 14px;
}

/* Image icon: fills the card width */
.app-icon-image {
    width: 100%;
    aspect-ratio: 1 / 1;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--chanv-fibre);
    overflow: hidden;
}

.app-icon-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.app-icon-image::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 40px;
    background: linear-gradient(to bottom, transparent, white);
    pointer-events: none;
}

/* Site tiles: logos need contain, not cover */
.app-tile.site-tile .app-icon-image img {
    object-fit: contain;
    padding: 20px;
}

.app-tile-text {
    padding: 10px 12px 14px;
    width: 100%;
}

.app-name {
    font-family: 'Outfit';
    font-size: 1em;
    font-weight: 700;
    margin-bottom: 3px;
}

.app-desc {
    font-size: 0.8em;
    color: #666;
    line-height: 1.4;
}

/* --- BOUTONS --- */
.btn {
    padding: 12px 20px;
    border-radius: 10px;
    border: none;
    font-weight: 700;
    cursor: pointer;
    transition: var(--transition);
    font-size: 14px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.btn-primary {
    background: var(--chanv-beige);
    color: var(--chanv-terre);
}

.btn-primary:hover {
    filter: brightness(1.05);
    transform: translateY(-2px);
}

.btn-ecosystem {
    background: rgba(255, 255, 255, 0.1);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.btn-ecosystem:hover {
    background: rgba(255, 255, 255, 0.2);
}

.btn-admin {
    background: var(--chanv-terre);
    color: white;
}

.btn-help {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    min-width: 32px;
    border-radius: 50%;
    background: rgba(255,255,255,0.1);
    color: rgba(255,255,255,0.6);
    font-size: 14px;
    font-weight: 800;
    text-decoration: none;
    transition: var(--transition);
    border: 1px solid rgba(255,255,255,0.15);
}

.btn-help:hover {
    background: rgba(255,255,255,0.25);
    color: white;
}

/* Emoji Picker */
.emoji-field-row {
    display: flex;
    gap: 8px;
    align-items: center;
}

.emoji-field-row input { flex: 1; }

.emoji-picker-btn {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    border: 1px solid var(--chanv-fibre);
    background: white;
    cursor: pointer;
    font-size: 18px;
    transition: var(--transition);
    flex-shrink: 0;
}

.emoji-picker-btn:hover {
    background: var(--chanv-fibre);
    transform: scale(1.08);
}

.emoji-picker-dropdown {
    position: fixed;
    z-index: 10000;
    background: white;
    border: 1px solid var(--chanv-fibre);
    border-radius: 14px;
    padding: 10px;
    box-shadow: 0 12px 40px rgba(0,0,0,0.15);
    width: 300px;
    max-height: 260px;
    overflow-y: auto;
    display: grid;
    grid-template-columns: repeat(8, 1fr);
    gap: 4px;
}

.emoji-picker-dropdown.hidden { display: none; }

.emoji-picker-item {
    width: 32px;
    height: 32px;
    border: none;
    background: transparent;
    font-size: 20px;
    cursor: pointer;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.15s;
}

.emoji-picker-item:hover {
    background: var(--chanv-fibre);
}

/* Footer */
.app-footer {
    text-align: center;
    padding: 24px 16px;
    font-size: 11px;
    color: rgba(0,0,0,0.3);
    font-weight: 600;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

.btn-logout {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 14px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.9);
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
}

.btn-logout:hover {
    background: rgba(229, 62, 62, 0.25);
    color: #fff;
}

/* --- MODALS & ADMIN --- */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(40, 40, 40, 0.8);
    backdrop-filter: blur(8px);
    z-index: 2000;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding: 20px;
    overflow-y: auto;
}

.modal-content {
    background: white;
    padding: 40px;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-bold);
    max-width: 600px;
    width: 100%;
    position: relative;
    margin: auto 0;
}

.admin-modal {
    max-width: 960px;
    max-height: 85vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.admin-modal > h2,
.admin-modal > .admin-tabs,
.admin-modal > .close-modal {
    flex-shrink: 0;
}

.admin-tab-content {
    flex: 1;
    overflow-y: auto;
    min-height: 0;
}

.close-modal {
    position: absolute;
    top: 20px;
    right: 25px;
    font-size: 28px;
    cursor: pointer;
    color: #999;
}

.admin-tabs {
    display: flex;
    gap: 10px;
    margin: 30px 0;
    border-bottom: 2px solid var(--chanv-fibre);
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
    scrollbar-color: var(--chanv-beige) transparent;
    padding-bottom: 4px;
}

.admin-tabs::-webkit-scrollbar {
    height: 4px;
}
.admin-tabs::-webkit-scrollbar-thumb {
    background: var(--chanv-beige);
    border-radius: 4px;
}

.tab-btn {
    padding: 10px 20px;
    background: none;
    border: none;
    font-weight: 700;
    color: #999;
    cursor: pointer;
    white-space: nowrap;
    flex-shrink: 0;
}

.tab-btn.active {
    color: var(--chanv-terre);
    border-bottom: 3px solid var(--chanv-beige);
}

/* --- ADMIN TABLES & SEARCH --- */
.admin-header-actions {
    margin-bottom: 20px;
}

.search-wrapper {
    position: relative;
    max-width: 400px;
}

.search-icon {
    position: absolute;
    left: 15px;
    top: 11px;
    font-size: 14px;
    pointer-events: none;
}

.search-wrapper input {
    padding-left: 45px;
}

.admin-table-wrapper {
    background: #fafafa;
    border-radius: var(--radius);
    border: 1px solid var(--chanv-fibre);
    overflow-x: auto;
}

.admin-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}

.admin-table th {
    background: #f0f0f0;
    padding: 12px 20px;
    text-align: left;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: #888;
}

.admin-table td {
    padding: 12px 20px;
    border-bottom: 1px solid var(--chanv-fibre);
    vertical-align: middle;
}

.admin-table tr:last-child td {
    border-bottom: none;
}

.user-cell {
    display: flex;
    align-items: center;
    gap: 12px;
}

.user-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    object-fit: cover;
    background: var(--chanv-fibre);
}

.user-info {
    display: flex;
    flex-direction: column;
}

.user-name {
    font-weight: 700;
    color: var(--chanv-terre);
}

.user-email {
    font-size: 11px;
    color: #999;
}

.role-select {
    padding: 6px 12px;
    border: 1px solid var(--chanv-fibre);
    border-radius: 6px;
    font-size: 13px;
    font-weight: 600;
    background: white;
    cursor: pointer;
}

.timestamp {
    font-size: 12px;
    color: #999;
}

/* --- BADGES & BUTTONS --- */
.access-badge {
    padding: 5px 12px;
    border-radius: 8px;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.3px;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    white-space: nowrap;
}

.access-badge.public {
    background: #E6FFFA;
    color: #2C7A7B;
}

.access-badge.restreint {
    background: #FFF5F5;
    color: #C53030;
}

.btn-settings {
    padding: 6px 14px;
    border-radius: 8px;
    border: 1px solid var(--chanv-fibre);
    background: white;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.btn-settings:hover {
    background: var(--chanv-fibre);
    border-color: var(--chanv-beige);
    transform: translateY(-1px);
}

.btn-icon {
    width: 34px;
    height: 34px;
    border-radius: 8px;
    border: 1px solid var(--chanv-fibre);
    background: white;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition);
    font-size: 14px;
}

.btn-icon:hover {
    background: var(--chanv-fibre);
    transform: scale(1.05);
}

.btn-icon-danger:hover {
    background: #FFE5E5;
    border-color: #FEB2B2;
}

.loading,
.error {
    text-align: center;
    padding: 40px;
    font-weight: 500;
    font-size: 14px;
    color: #999;
}

.error {
    color: #E53E3E;
}

/* --- FORMULAIRES --- */
.form-group {
    margin-bottom: 20px;
}

.toggle-label {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    text-transform: none;
    font-size: 14px;
    font-weight: 500;
    color: var(--chanv-terre);
}

.toggle-label input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: var(--chanv-vert);
    cursor: pointer;
}

.form-hint {
    font-size: 12px;
    color: #999;
    margin-top: 4px;
    line-height: 1.4;
}

label {
    display: block;
    font-size: 12px;
    font-weight: 700;
    margin-bottom: 8px;
    text-transform: uppercase;
    color: #666;
}

input,
select {
    width: 100%;
    padding: 12px 15px;
    border-radius: 10px;
    border: 2px solid var(--chanv-fibre);
    font-family: inherit;
    font-size: 14px;
}

input:focus {
    outline: none;
    border-color: var(--chanv-beige);
}

/* --- LOGIN --- */
#login-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--chanv-fibre);
    z-index: 5000;
    display: flex;
    align-items: center;
    justify-content: center;
}

.login-card {
    background: white;
    padding: 60px 40px;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-bold);
    text-align: center;
    max-width: 400px;
    width: 100%;
}

.main-logo-login {
    height: 60px;
    margin-bottom: 30px;
}

.error-text {
    color: #E53E3E;
    margin-top: 20px;
    font-size: 13px;
    font-weight: 600;
}

/* --- LOADER & TOAST --- */
.loader-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: white;
    z-index: 9000;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.spinner {
    width: 40px;
    height: 40px;
    border: 4px solid var(--chanv-fibre);
    border-top-color: var(--chanv-beige);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

#toast {
    position: fixed;
    bottom: -100px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--chanv-terre);
    color: white;
    padding: 15px 30px;
    border-radius: 50px;
    font-weight: 600;
    box-shadow: var(--shadow-bold);
    z-index: 10001;
    transition: 0.4s;
}

#toast.show {
    bottom: 40px;
}

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

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* --- SETTINGS MODAL (Per-App Roles) --- */
.settings-modal {
    max-width: 560px;
    padding: 0;
    overflow: hidden;
}

.settings-user-header {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 30px 30px 20px;
    background: var(--chanv-fibre);
}

.settings-avatar {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    object-fit: cover;
    background: #ddd;
    box-shadow: 0 0 0 3px rgba(40, 40, 40, 0.1);
}

.settings-user-info h3 {
    font-size: 18px;
    font-weight: 700;
    color: var(--chanv-terre);
    margin: 0;
}

.settings-user-info p {
    font-size: 13px;
    color: #888;
    margin: 2px 0 0;
}

.settings-divider {
    height: 1px;
    background: var(--chanv-fibre);
}

.settings-apps-list {
    padding: 20px 30px;
    max-height: 400px;
    overflow-y: auto;
}

.settings-super-admin {
    padding: 16px 30px;
    background: linear-gradient(135deg, rgba(58, 92, 57, 0.04), rgba(58, 92, 57, 0.08));
    border-bottom: 1px solid var(--chanv-fibre);
}

.toggle-label {
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    color: var(--chanv-terre);
    user-select: none;
}

.toggle-label input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: var(--chanv-green);
    cursor: pointer;
}

.settings-app-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 0;
    border-bottom: 1px solid var(--chanv-fibre);
}

.settings-app-row:last-child {
    border-bottom: none;
}

.settings-app-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.settings-app-icon {
    font-size: 22px;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--chanv-fibre);
    border-radius: 10px;
    flex-shrink: 0;
}

.settings-app-name {
    font-weight: 600;
    font-size: 14px;
    color: var(--chanv-terre);
}

.settings-apps-list .role-select {
    width: auto;
    min-width: 180px;
    padding: 8px 12px;
    font-size: 13px;
    border: 1px solid var(--chanv-fibre);
    border-radius: 8px;
    background: white;
    cursor: pointer;
    transition: var(--transition);
}

.settings-apps-list .role-select:focus {
    outline: none;
    border-color: var(--chanv-beige);
    box-shadow: 0 0 0 3px rgba(221, 203, 164, 0.2);
}

.settings-modal .modal-actions {
    padding: 16px 30px 24px;
    display: flex;
    gap: 10px;
    justify-content: flex-end;
}

.btn-secondary {
    background: var(--chanv-fibre);
    color: var(--chanv-terre);
    padding: 10px 20px;
    border-radius: 10px;
    border: none;
    font-weight: 600;
    cursor: pointer;
    font-size: 14px;
    transition: var(--transition);
}

.btn-secondary:hover {
    background: #e0d5c0;
}

.settings-modal .close-modal {
    top: 15px;
    right: 20px;
    z-index: 10;
}

@media (max-width: 768px) {
    .header-container {
        flex-direction: column;
        text-align: center;
        position: relative;
    }

    .header-user-section {
        position: absolute;
        top: 0;
        right: 0;
        margin: 0;
    }

    .header-nav {
        display: none;
    }

    .welcome-section {
        flex-direction: column;
        gap: 16px;
    }

    .welcome-right {
        text-align: left;
    }

    .welcome-quote {
        margin-left: 0;
        max-width: 100%;
    }

    /* Hide name/role on mobile — only show avatar burger */
    .header-user-section .user-details {
        display: none !important;
    }

    .avatar-burger-inner {
        padding: 3px 10px 3px 3px;
    }

    .avatar-burger-photo {
        width: 30px;
        height: 30px;
    }

    .avatar-burger-icon {
        width: 14px;
        gap: 3px;
    }

    .settings-app-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }

    .settings-apps-list .role-select {
        width: 100%;
    }

    .view-toggle {
        max-width: 100%;
        gap: 3px;
    }

    .toggle-btn {
        padding: 8px 4px;
        font-size: 12px;
        gap: 3px;
    }

    /* Admin panel mobile */
    .modal-overlay {
        padding: 10px;
    }

    .dashboard-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }

    .app-tile.emoji-only {
        padding: 16px 10px;
    }

    .app-icon {
        font-size: 32px;
        margin-bottom: 8px;
    }

    .app-tile-text {
        padding: 8px 8px 10px;
    }

    .app-name {
        font-size: 0.85em;
    }

    .app-desc {
        font-size: 0.72em;
    }

    .modal-content {
        padding: 20px 16px;
    }

    .admin-modal {
        max-width: 100%;
        max-height: 95vh;
    }

    .admin-tabs {
        gap: 0;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
        scroll-snap-type: x mandatory;
        padding-bottom: 2px;
    }

    .admin-tabs::-webkit-scrollbar {
        display: none;
    }

    .tab-btn {
        padding: 8px 14px;
        font-size: 12px;
        white-space: nowrap;
        flex-shrink: 0;
        scroll-snap-align: start;
    }

    .admin-table td,
    .admin-table th {
        padding: 10px 12px;
        font-size: 12px;
    }
}

/* --- UNIVERSAL SIDEBAR --- */
.sidebar-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    z-index: 9998;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.sidebar-overlay.open {
    opacity: 1;
}

.sidebar-panel {
    position: fixed;
    top: 0;
    right: -300px;
    width: 300px;
    height: 100%;
    background: var(--chanv-terre);
    z-index: 9999;
    padding: 0;
    display: flex;
    flex-direction: column;
    transition: right 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: -8px 0 40px rgba(0, 0, 0, 0.3);
}

.sidebar-panel.open {
    right: 0;
}

.sidebar-header {
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    padding: 36px 24px 24px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    background: linear-gradient(180deg, rgba(255,255,255,0.04) 0%, transparent 100%);
}

.sidebar-avatar {
    width: 68px;
    height: 68px;
    border-radius: 50%;
    object-fit: cover;
    box-shadow: 0 0 0 3px rgba(221, 203, 164, 0.3), 0 4px 20px rgba(0, 0, 0, 0.3);
    transition: var(--transition);
}

.sidebar-name {
    font-family: 'Outfit', sans-serif;
    font-size: 17px;
    font-weight: 700;
    color: white;
    text-align: center;
}

.sidebar-role {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: rgba(255, 255, 255, 0.5);
}

.sidebar-body {
    flex: 1;
    overflow-y: auto;
    padding: 0 24px;
    -webkit-overflow-scrolling: touch;
}

.sidebar-favs {
    padding: 20px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.sidebar-favs-title {
    font-family: 'Outfit', sans-serif;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: rgba(255, 255, 255, 0.4);
    padding: 0 0 12px;
}

.sidebar-favs-list {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.sidebar-fav-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 14px;
    border-radius: 10px;
    color: rgba(255, 255, 255, 0.85);
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: var(--transition);
}

.sidebar-fav-link:hover {
    background: rgba(255, 255, 255, 0.08);
    color: white;
    transform: translateX(4px);
}

.sidebar-fav-icon {
    font-size: 16px;
    width: 24px;
    text-align: center;
    flex-shrink: 0;
}

.sidebar-fav-img {
    width: 28px;
    height: 28px;
    border-radius: 6px;
    object-fit: contain;
    flex-shrink: 0;
    background: rgba(255, 255, 255, 0.1);
    padding: 3px;
}

.sidebar-no-favs {
    font-size: 13px;
    color: rgba(255, 255, 255, 0.35);
    font-style: italic;
    padding: 8px 0;
}

.sidebar-logout {
    flex-shrink: 0;
    width: calc(100% - 48px);
    margin: 0 24px 24px;
    justify-content: center;
    padding: 12px;
    font-size: 14px;
}

.sidebar-tour {
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.7);
    padding: 12px 16px;
    border-radius: var(--radius);
    cursor: pointer;
    font-size: 13px;
    font-weight: 600;
    font-family: inherit;
    margin: 16px 0 12px;
    width: 100%;
    transition: var(--transition);
}

.sidebar-tour:hover {
    background: rgba(255, 255, 255, 0.12);
    border-color: rgba(255, 255, 255, 0.2);
    color: white;
}

.sidebar-lang-toggle {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 0;
    margin-top: 8px;
    border-top: 1px solid rgba(255,255,255,0.08);
}

.sidebar-lang-label {
    font-size: 13px;
    color: rgba(255,255,255,0.6);
    font-weight: 500;
}

@media (max-width: 768px) {
    .sidebar-panel {
        width: 280px;
        right: -280px;
    }
    .sidebar-avatar {
        width: 60px;
        height: 60px;
    }
    .sidebar-name {
        font-size: 15px;
    }
}

/* ============================================== */
/* --- FAVORIS (Bouton cœur sur tiles) --- */
/* ============================================== */

/* Badge de notification (formations en attente, etc.) */
.app-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    min-width: 24px;
    height: 24px;
    padding: 0 7px;
    border-radius: 12px;
    background: #E53E3E;
    color: #fff;
    font-family: 'Inter', sans-serif;
    font-size: 12px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 6;
    box-shadow: 0 2px 8px rgba(229, 62, 62, 0.45);
    animation: app-badge-pop 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    pointer-events: auto;
}

.app-badge-overdue {
    animation: app-badge-pulse 1.8s ease-in-out infinite;
}

@keyframes app-badge-pop {
    from { transform: scale(0); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}

@keyframes app-badge-pulse {
    0%, 100% { box-shadow: 0 2px 8px rgba(229, 62, 62, 0.45); }
    50% { box-shadow: 0 2px 18px rgba(229, 62, 62, 0.85); }
}

/* Bouton cœur sur les tiles */
.fav-btn {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: none;
    background: transparent;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 5;
    transition: var(--transition);
    padding: 0;
}

.fav-btn img {
    transition: var(--transition);
}

.fav-btn:hover {
    transform: scale(1.15);
}

.fav-btn:hover img {
    content: url('images/favorite-hover.svg');
}

.fav-btn.fav-active:hover img {
    content: url('images/favorite-active-hover.svg');
}

/* ============================================== */
/* --- CHATBOT GANDALF (Floating bottom-right) --- */
/* ============================================== */

.chatbot-toggle {
    position: fixed;
    bottom: 24px;
    right: 24px;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    border: none;
    background: var(--chanv-terre);
    color: var(--chanv-blanc);
    font-size: 28px;
    cursor: pointer;
    box-shadow: var(--shadow-bold);
    z-index: 9000;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}

.chatbot-toggle:hover {
    transform: scale(1.08);
    background: #1a1a1a;
}

.chatbot-icon {
    line-height: 1;
}

.chatbot-panel {
    position: fixed;
    bottom: 100px;
    right: 24px;
    width: 380px;
    max-width: calc(100vw - 32px);
    height: 560px;
    max-height: calc(100vh - 140px);
    background: var(--chanv-blanc);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-bold);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    z-index: 9001;
    border: 1px solid rgba(40, 40, 40, 0.08);
}

.chatbot-header {
    background: var(--chanv-terre);
    color: var(--chanv-blanc);
    padding: 14px 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.chatbot-title-block {
    display: flex;
    align-items: center;
    gap: 10px;
}

.chatbot-avatar {
    font-size: 24px;
    line-height: 1;
}

.chatbot-title {
    font-family: 'Outfit', sans-serif;
    font-weight: 600;
    font-size: 16px;
}

.chatbot-subtitle {
    font-size: 11px;
    opacity: 0.7;
}

.chatbot-close {
    background: transparent;
    border: none;
    color: var(--chanv-blanc);
    font-size: 24px;
    cursor: pointer;
    padding: 0 8px;
    line-height: 1;
}

.chatbot-close:hover {
    opacity: 0.7;
}

.chatbot-messages {
    flex: 1;
    overflow-y: auto;
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    background: var(--chanv-fibre);
}

.chatbot-msg {
    padding: 10px 14px;
    border-radius: 14px;
    max-width: 85%;
    font-size: 14px;
    line-height: 1.5;
    white-space: pre-wrap;
    word-wrap: break-word;
}

.chatbot-msg-bot {
    background: var(--chanv-blanc);
    color: var(--chanv-terre);
    align-self: flex-start;
    border-bottom-left-radius: 4px;
    box-shadow: var(--shadow-soft);
}

.chatbot-msg-user {
    background: var(--chanv-terre);
    color: var(--chanv-blanc);
    align-self: flex-end;
    border-bottom-right-radius: 4px;
}

.chatbot-msg-streaming::after {
    content: '▌';
    animation: chatbot-blink 1s infinite;
    margin-left: 2px;
    opacity: 0.6;
}

@keyframes chatbot-blink {
    0%, 50% { opacity: 0.6; }
    51%, 100% { opacity: 0; }
}

.chatbot-msg-error {
    background: #fee;
    color: #c33;
    border: 1px solid #fbb;
}

.chatbot-tool-indicator {
    align-self: flex-start;
    font-size: 11px;
    opacity: 0.6;
    font-style: italic;
    padding: 4px 12px;
}

/* ============================================== */
/* --- ADMIN HEADER ROW (title + env toggle + close) --- */
/* ============================================== */

.admin-header-row {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 16px;
}

.admin-header-row h2 {
    margin: 0;
    white-space: nowrap;
    flex: 1;
}

.admin-header-row .close-modal {
    position: static;
}

/* Toggle switch */
.admin-env-toggle {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    user-select: none;
}

.admin-env-toggle input {
    opacity: 0;
    width: 0;
    height: 0;
    position: absolute;
}

.admin-env-toggle-label {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.5px;
    transition: color 0.2s, opacity 0.2s;
}

/* DEV label (left) — highlighted when on dev, dimmed on prod */
#adminEnvLabelDev  { color: #92400E; opacity: 1; transition: opacity 0.2s; }
#adminEnvLabelProd { color: #166534; opacity: 0.35; transition: opacity 0.2s; }

/* When checked (= prod), flip opacity */
.admin-env-toggle input:checked ~ #adminEnvLabelDev  { opacity: 0.35; }
.admin-env-toggle input:checked ~ #adminEnvLabelProd { opacity: 1; }

.admin-env-slider {
    position: relative;
    display: inline-block;
    width: 38px;
    height: 20px;
    border-radius: 20px;
    background: #FBBF24;
    transition: background 0.3s;
}

.admin-env-toggle input:checked + .admin-env-slider {
    background: #22C55E;
}

.admin-env-slider::before {
    content: "";
    position: absolute;
    height: 16px;
    width: 16px;
    left: 2px;
    bottom: 2px;
    background: white;
    border-radius: 50%;
    transition: transform 0.3s;
    box-shadow: 0 1px 3px rgba(0,0,0,0.2);
}

/* Checked = PROD (slider right) */
.admin-env-toggle input:checked + .admin-env-slider::before {
    transform: translateX(18px);
}

/* ============================================== */
/* --- FEEDBACK DASHBOARD --- */
/* ============================================== */

/* --- Skill editor modal --- */
.skill-editor-modal {
    max-width: 820px;
    width: 100%;
}

.skill-editor-meta {
    font-size: 12px;
    color: #888;
    margin: -10px 0 16px;
}

.skill-editor-body {
    font-family: 'SF Mono', 'Monaco', 'Menlo', 'Consolas', monospace;
    font-size: 13px;
    line-height: 1.5;
    width: 100%;
    box-sizing: border-box;
    min-height: 300px;
    resize: vertical;
}

.skill-tools-readonly {
    margin: 16px 0;
    background: var(--chanv-fibre);
    border-radius: 10px;
    padding: 12px 16px;
}

.skill-tools-readonly summary {
    cursor: pointer;
    font-weight: 600;
    font-size: 13px;
    color: var(--chanv-terre);
    user-select: none;
}

.skill-tools-readonly summary:hover {
    opacity: 0.7;
}

.skill-tool-row {
    margin-top: 12px;
    padding: 10px 12px;
    background: #fff;
    border-radius: 8px;
    font-size: 12px;
}

.skill-tool-name {
    margin-bottom: 4px;
}

.skill-tool-name code {
    background: var(--chanv-fibre);
    padding: 2px 6px;
    border-radius: 4px;
    font-weight: 600;
    color: var(--chanv-terre);
}

.skill-tool-desc {
    color: #555;
    margin-bottom: 6px;
}

.skill-tool-row details {
    margin-top: 6px;
}

.skill-tool-row details summary {
    font-size: 11px;
    cursor: pointer;
    color: #888;
}

.skill-tool-row details pre {
    background: #1a1a1a;
    color: #f4f4f4;
    padding: 10px;
    border-radius: 6px;
    overflow-x: auto;
    font-size: 11px;
    line-height: 1.4;
    margin: 6px 0 0;
}

/* --- Settings tabs (Apps / Skills IA) --- */
.settings-tabs {
    display: flex;
    gap: 0;
    margin: 16px 0 0;
    background: var(--chanv-fibre);
    border-radius: 12px;
    padding: 3px;
}

.settings-tab {
    flex: 1;
    padding: 10px 16px;
    border: none;
    background: transparent;
    font-family: 'Outfit', sans-serif;
    font-size: 14px;
    font-weight: 600;
    color: #888;
    cursor: pointer;
    border-radius: 10px;
    transition: all 0.25s ease;
}

.settings-tab:hover {
    color: var(--chanv-terre);
}

.settings-tab.active {
    background: var(--chanv-terre);
    color: #fff;
    box-shadow: 0 2px 8px rgba(40, 40, 40, 0.15);
}

.settings-tab-content {
    margin-top: 16px;
    animation: settingsTabFadeIn 0.25s ease-out;
}

.settings-tab-content.hidden {
    display: none;
}

@keyframes settingsTabFadeIn {
    from { opacity: 0; transform: translateY(6px); }
    to { opacity: 1; transform: translateY(0); }
}

.settings-section-hint {
    font-size: 12px;
    color: #888;
    margin: 0 0 14px;
    line-height: 1.4;
}

.settings-skills-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 16px;
}

.settings-skill-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    background: var(--chanv-fibre);
    border-radius: 12px;
    gap: 16px;
}

.settings-skill-info {
    flex: 1;
    min-width: 0;
}

.settings-skill-name {
    font-weight: 600;
    font-size: 14px;
    color: var(--chanv-terre);
}

.settings-skill-desc {
    font-size: 12px;
    color: #888;
    margin-top: 2px;
    line-height: 1.3;
}

/* Toggle switch */
.toggle-switch {
    position: relative;
    display: inline-block;
    width: 44px;
    height: 24px;
    flex-shrink: 0;
}

.toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.toggle-slider {
    position: absolute;
    cursor: pointer;
    inset: 0;
    background-color: #ccc;
    border-radius: 24px;
    transition: 0.3s;
}

.toggle-slider::before {
    content: "";
    position: absolute;
    height: 18px;
    width: 18px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    border-radius: 50%;
    transition: 0.3s;
}

.toggle-switch input:checked + .toggle-slider {
    background-color: var(--chanv-terre);
}

.toggle-switch input:checked + .toggle-slider::before {
    transform: translateX(20px);
}

/* Bandeau statut Basecamp en haut de l'onglet Feedback */
.basecamp-banner {
    padding: 12px 16px;
    border-radius: 10px;
    font-size: 13px;
    margin-bottom: 14px;
    border-left: 4px solid;
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}
.basecamp-banner[data-level="ok"]   { background: #D4F5E2; color: #166534; border-left-color: #22C55E; }
.basecamp-banner[data-level="info"] { background: #DBEAFE; color: #1E40AF; border-left-color: #3B82F6; }
.basecamp-banner[data-level="warn"] { background: #FEF3C7; color: #92400E; border-left-color: #F59E0B; }
.basecamp-banner a, .basecamp-banner .link-btn {
    color: inherit;
    text-decoration: underline;
    background: none;
    border: none;
    cursor: pointer;
    font: inherit;
    padding: 0;
}
.basecamp-banner a:hover, .basecamp-banner .link-btn:hover {
    opacity: 0.7;
}

/* Header de l'onglet Feedback : aligner boutons d'action + filtres */
#tab-feedback .admin-header-actions {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
}

/* Boutons "Rafraîchir" et "Importer" plus compacts pour matcher les filter chips */
#tab-feedback .admin-header-actions > .btn-secondary {
    padding: 8px 14px;
    font-size: 13px;
}

.feedback-filter {
    display: flex;
    gap: 4px;
    flex-wrap: wrap;
    align-items: center;
}

.feedback-filter-btn {
    background: transparent;
    border: 1px solid #ddd;
    color: #666;
    padding: 6px 12px;
    border-radius: 16px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    font-family: inherit;
    transition: var(--transition);
}

.feedback-filter-btn:hover {
    background: var(--chanv-fibre);
    color: var(--chanv-terre);
}

.feedback-filter-btn.active {
    background: var(--chanv-terre);
    color: #fff;
    border-color: var(--chanv-terre);
}

.feedback-table th, .feedback-table td {
    vertical-align: middle;
}

.fb-status {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 700;
    white-space: nowrap;
}

.fb-status-done    { background: #D4F5E2; color: #166534; }
.fb-status-pending { background: #FEF3C7; color: #92400E; }
.fb-status-deleted { background: #F3F4F6; color: #6B7280; }
.fb-status-error   { background: #FEE2E2; color: #991B1B; }
.fb-status-unknown { background: #F3F4F6; color: #6B7280; }

.fb-type {
    display: inline-block;
    padding: 3px 9px;
    border-radius: 10px;
    font-size: 11px;
    font-weight: 600;
    white-space: nowrap;
}

.fb-type-bug     { background: #FEE2E2; color: #991B1B; }
.fb-type-feature { background: #E0E7FF; color: #3730A3; }

/* ============================================== */
/* --- ONBOARDING --- */
/* ============================================== */

.onboarding-overlay {
    position: fixed;
    inset: 0;
    background: rgba(40, 40, 40, 0.6);
    backdrop-filter: blur(6px);
    z-index: 9500;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    animation: birthdayFadeIn 0.3s ease-out;
}

.onboarding-card {
    position: relative;
    background: var(--chanv-blanc);
    border-radius: var(--radius-lg);
    width: 560px;
    max-width: 100%;
    max-height: 90vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    box-shadow: 0 30px 80px rgba(40, 40, 40, 0.35);
    animation: birthdayPop 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.onboarding-skip {
    position: absolute;
    top: 16px;
    right: 20px;
    background: transparent;
    border: none;
    color: #999;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    padding: 6px 10px;
    border-radius: 8px;
    transition: var(--transition);
    z-index: 2;
}

.onboarding-skip:hover {
    color: var(--chanv-terre);
    background: var(--chanv-fibre);
}

.onboarding-slides {
    flex: 1;
    overflow-y: auto;
    padding: 50px 50px 30px;
    text-align: center;
}

.onboarding-slide {
    animation: onboardingSlideIn 0.35s ease-out;
}

@keyframes onboardingSlideIn {
    from { opacity: 0; transform: translateX(20px); }
    to { opacity: 1; transform: translateX(0); }
}

.onboarding-image {
    width: 100%;
    aspect-ratio: 16 / 9;
    background: var(--chanv-fibre);
    border-radius: var(--radius);
    margin-bottom: 24px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

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

.onboarding-emoji-large {
    font-size: 80px;
    line-height: 1;
    margin: 12px 0 24px;
}

.onboarding-title {
    font-family: 'Outfit', sans-serif;
    font-size: 26px;
    color: var(--chanv-terre);
    margin: 0 0 14px;
    line-height: 1.25;
}

.onboarding-body {
    font-size: 15px;
    line-height: 1.6;
    color: #555;
    margin: 0;
    max-width: 440px;
    margin-left: auto;
    margin-right: auto;
}

.onboarding-body strong {
    color: var(--chanv-terre);
    font-weight: 600;
}

.onboarding-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 30px 24px;
    border-top: 1px solid var(--chanv-fibre);
    gap: 16px;
    flex-wrap: wrap;
}

.onboarding-dots {
    display: flex;
    gap: 8px;
}

.onboarding-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #ddd;
    transition: var(--transition);
}

.onboarding-dot.active {
    background: var(--chanv-terre);
    transform: scale(1.3);
}

.onboarding-actions {
    display: flex;
    gap: 8px;
    margin-left: auto;
}

.onboarding-actions .btn {
    min-width: 110px;
}

@media (max-width: 480px) {
    .onboarding-slides { padding: 50px 24px 20px; }
    .onboarding-emoji-large { font-size: 64px; }
    .onboarding-title { font-size: 22px; }
    .onboarding-body { font-size: 14px; }
    .onboarding-footer { padding: 14px 18px; }
    .onboarding-actions .btn { min-width: 0; padding: 8px 14px; font-size: 13px; }
}

/* --- Bouton "Refaire le tour" --- */
.btn-tour {
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.25);
    color: #fff;
    padding: 6px 12px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 12px;
    font-weight: 600;
    font-family: inherit;
    transition: var(--transition);
    white-space: nowrap;
}

.btn-tour:hover {
    background: rgba(255, 255, 255, 0.12);
    border-color: rgba(255, 255, 255, 0.4);
}


/* ============================================== */
/* --- ANNIVERSAIRE --- */
/* ============================================== */

.birthday-overlay {
    position: fixed;
    inset: 0;
    background: rgba(40, 40, 40, 0.55);
    backdrop-filter: blur(4px);
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: birthdayFadeIn 0.4s ease-out;
}

#birthdayConfetti {
    position: fixed;
    inset: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1;
}

.birthday-card {
    position: relative;
    z-index: 2;
    background: var(--chanv-blanc);
    border-radius: var(--radius-lg);
    padding: 50px 60px;
    text-align: center;
    box-shadow: 0 30px 80px rgba(40, 40, 40, 0.3);
    max-width: 90vw;
    animation: birthdayPop 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.birthday-cake {
    font-size: 72px;
    line-height: 1;
    margin-bottom: 16px;
    animation: birthdayBounce 1.4s ease-in-out infinite;
    display: inline-block;
}

.birthday-title {
    font-family: 'Outfit', sans-serif;
    font-size: 32px;
    color: var(--chanv-terre);
    margin: 0 0 12px;
    line-height: 1.2;
}

.birthday-title span {
    background: linear-gradient(135deg, #DDCBA4, #E89F71);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.birthday-message {
    color: #666;
    font-size: 15px;
    margin: 0 0 28px;
}

.birthday-card .btn {
    min-width: 160px;
    margin: 0 auto;
}

@keyframes birthdayFadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes birthdayPop {
    0% { transform: scale(0.5) rotate(-5deg); opacity: 0; }
    100% { transform: scale(1) rotate(0); opacity: 1; }
}

@keyframes birthdayBounce {
    0%, 100% { transform: translateY(0) rotate(-5deg); }
    50% { transform: translateY(-12px) rotate(5deg); }
}

@media (max-width: 480px) {
    .birthday-card {
        padding: 36px 28px;
    }
    .birthday-cake { font-size: 56px; }
    .birthday-title { font-size: 24px; }
}

.chatbot-sources {
    margin-top: 8px;
    padding-top: 8px;
    border-top: 1px solid rgba(40, 40, 40, 0.1);
    font-size: 11px;
    opacity: 0.75;
}

.chatbot-sources-label {
    font-weight: 600;
    margin-right: 4px;
}

.chatbot-source-tag {
    display: inline-block;
    background: var(--chanv-fibre);
    padding: 2px 8px;
    border-radius: 10px;
    margin: 2px 2px 0 0;
    font-size: 10px;
}

.chatbot-input-form {
    display: flex;
    gap: 8px;
    padding: 12px;
    border-top: 1px solid rgba(40, 40, 40, 0.08);
    background: var(--chanv-blanc);
}

.chatbot-input-form input {
    flex: 1;
    padding: 10px 14px;
    border: 1px solid rgba(40, 40, 40, 0.15);
    border-radius: 20px;
    font-family: inherit;
    font-size: 14px;
    outline: none;
    transition: var(--transition);
}

.chatbot-input-form input:focus {
    border-color: var(--chanv-terre);
}

.chatbot-send {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: none;
    background: var(--chanv-terre);
    color: var(--chanv-blanc);
    cursor: pointer;
    font-size: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: var(--transition);
}

.chatbot-send:hover {
    background: #1a1a1a;
}

.chatbot-send:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

@media (max-width: 480px) {
    .chatbot-panel {
        right: 8px;
        bottom: 88px;
        width: calc(100vw - 16px);
        height: calc(100vh - 110px);
    }

    .chatbot-toggle {
        bottom: 12px;
        right: 12px;
        width: 44px;
        height: 44px;
        font-size: 22px;
        z-index: 900;
    }


}

/* --- BUG REPORT --- */
.bug-report-btn {
    position: fixed;
    bottom: 20px;
    left: 20px;
    z-index: 900;
    height: 38px;
    padding: 0 14px 0 10px;
    border-radius: 20px;
    border: 1px solid var(--chanv-fibre);
    background: white;
    box-shadow: 0 2px 12px rgba(0,0,0,0.08);
    cursor: pointer;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: var(--transition);
    opacity: 0.65;
    font-family: 'Inter', sans-serif;
}

.bug-report-btn span {
    font-size: 12px;
    font-weight: 600;
    color: var(--chanv-terre);
}

.bug-report-btn:hover {
    opacity: 1;
    transform: scale(1.05);
    box-shadow: 0 4px 20px rgba(0,0,0,0.12);
    border-color: var(--chanv-beige);
}

.bug-report-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(40, 40, 40, 0.6);
    backdrop-filter: blur(6px);
    z-index: 5000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.bug-report-overlay.hidden {
    display: none;
}

.bug-report-modal {
    background: white;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-bold);
    max-width: 480px;
    width: 100%;
    overflow: hidden;
    animation: bugSlideUp 0.3s ease;
}

@keyframes bugSlideUp {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.bug-report-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 24px;
    border-bottom: 1px solid var(--chanv-fibre);
}

.bug-report-header h3 {
    font-size: 16px;
    font-weight: 700;
    margin: 0;
}

.bug-report-close {
    background: none;
    border: none;
    font-size: 24px;
    color: #999;
    cursor: pointer;
    line-height: 1;
    padding: 0;
    transition: color 0.2s;
}

.bug-report-close:hover {
    color: var(--chanv-terre);
}

.bug-report-body {
    padding: 24px;
}

.bug-type-toggle {
    display: flex;
    gap: 4px;
    background: var(--chanv-fibre);
    border-radius: 12px;
    padding: 4px;
    margin-bottom: 20px;
    width: 100%;
}

.bug-type-btn {
    flex: 1;
    padding: 10px 16px;
    border: none;
    background: transparent;
    color: #888;
    font-size: 13px;
    font-weight: 600;
    border-radius: 8px;
    cursor: pointer;
    transition: var(--transition);
    font-family: inherit;
}

.bug-type-btn:hover {
    color: var(--chanv-terre);
    background: rgba(40, 40, 40, 0.04);
}

.bug-type-btn.active {
    background: var(--chanv-terre);
    color: #fff;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.15);
}

.bug-report-body label {
    display: block;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #888;
    margin-bottom: 6px;
}

.bug-report-body label + label {
    margin-top: 16px;
}

.bug-report-body textarea {
    width: 100%;
    border: 1px solid var(--chanv-fibre);
    border-radius: var(--radius);
    padding: 12px 14px;
    font-family: 'Inter', sans-serif;
    font-size: 14px;
    resize: vertical;
    transition: border-color 0.2s;
    color: var(--chanv-terre);
    margin-bottom: 4px;
}

.bug-report-body textarea:focus {
    outline: none;
    border-color: var(--chanv-beige);
}

.bug-screenshot-area {
    border: 2px dashed #ddd;
    border-radius: var(--radius);
    padding: 16px;
    text-align: center;
    transition: border-color 0.2s, background 0.2s;
    margin-top: 6px;
}

.bug-screenshot-area.drag-over {
    border-color: var(--chanv-beige);
    background: rgba(221, 203, 164, 0.08);
}

.bug-screenshot-placeholder {
    color: #aaa;
    font-size: 13px;
    cursor: pointer;
    padding: 12px;
}

.bug-screenshot-placeholder:hover {
    color: #888;
}

.bug-screenshot-preview {
    max-width: 100%;
    max-height: 180px;
    border-radius: 8px;
    object-fit: contain;
}

.bug-screenshot-area {
    position: relative;
}

.bug-screenshot-remove {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    border: none;
    background: rgba(0,0,0,0.55);
    color: white;
    font-size: 12px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
}

.bug-screenshot-remove:hover {
    background: rgba(200,50,50,0.8);
}

.bug-report-submit {
    width: 100%;
    padding: 12px;
    margin-top: 20px;
    border: none;
    border-radius: var(--radius);
    background: var(--chanv-terre);
    color: white;
    font-family: 'Outfit', sans-serif;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
}

.bug-report-submit:hover:not(:disabled) {
    filter: brightness(1.2);
    transform: translateY(-1px);
}

.bug-report-submit:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

@media (max-width: 768px) {
    .bug-report-btn {
        bottom: 12px;
        left: 12px;
        height: 32px;
        width: 32px;
        padding: 0;
        border-radius: 50%;
        justify-content: center;
        font-size: 14px;
    }
    .bug-report-btn span {
        display: none;
    }
}

/* ==================== DEVLOG BUTTON ==================== */
.actu-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    background: transparent;
    border: 1px solid rgba(255,255,255,0.25);
    color: rgba(255,255,255,0.85);
    padding: 7px 16px;
    border-radius: 10px;
    cursor: pointer;
    font-family: inherit;
    font-size: 13px;
    font-weight: 600;
    transition: var(--transition);
    flex-shrink: 0;
    position: relative;
}

.actu-btn:hover {
    background: rgba(255,255,255,0.1);
    color: white;
    border-color: rgba(255,255,255,0.4);
}

.actu-btn-icon { font-size: 13px; }

.actu-notif-dot {
    position: absolute;
    top: -6px;
    right: -6px;
    min-width: 20px;
    height: 20px;
    padding: 0 6px;
    border-radius: 10px;
    background: #E53E3E;
    color: #fff;
    font-family: 'Inter', sans-serif;
    font-size: 11px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 6;
    box-shadow: 0 2px 8px rgba(229, 62, 62, 0.45);
    animation: app-badge-pop 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.actu-notif-pulse {
    animation: app-badge-pulse 1.8s ease-in-out infinite;
}

/* ==================== L'ACTU VIEW ==================== */
.actu-view {
    max-width: 900px;
    margin: -10px auto 60px auto;
    padding: 0 20px;
    position: relative;
    z-index: 10;
}

.actu-container { animation: fadeIn 0.3s ease; }

.actu-header {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-bottom: 28px;
    flex-wrap: wrap;
}

.actu-back {
    background: var(--chanv-terre);
    border: none;
    font-size: 13px;
    font-weight: 700;
    color: white;
    cursor: pointer;
    padding: 8px 18px;
    border-radius: 50px;
    transition: var(--transition);
    font-family: inherit;
    letter-spacing: 0.3px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
    white-space: nowrap;
}

.actu-back:hover {
    background: #1a1a1a;
    transform: translateX(-3px);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
}
.actu-title-block {
    flex: 1;
    display: flex;
    align-items: baseline;
    gap: 12px;
}

.actu-title {
    font-size: 28px;
    font-weight: 800;
    color: var(--chanv-terre);
    margin: 0;
    line-height: 1.2;
}

.actu-subtitle {
    font-size: 13px;
    color: #888;
    margin: 0;
    letter-spacing: 0.3px;
    white-space: nowrap;
}

/* --- FR / EN toggle pill --- */
.actu-lang-toggle {
    display: flex;
    gap: 2px;
    background: var(--chanv-fibre);
    border-radius: 8px;
    padding: 3px;
    flex-shrink: 0;
    border: 1px solid rgba(0,0,0,0.06);
}

.actu-lang-btn {
    padding: 5px 14px;
    border: none;
    background: transparent;
    color: #999;
    font-family: 'Outfit', sans-serif;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.8px;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.actu-lang-btn:hover {
    color: var(--chanv-terre);
    background: rgba(40, 40, 40, 0.04);
}

.actu-lang-btn.active {
    background: var(--chanv-terre);
    color: white;
    box-shadow: 0 1px 4px rgba(40, 40, 40, 0.2);
}

/* ==================== HERO ==================== */
.actu-hero { margin-bottom: 32px; }

.actu-hero-card {
    background: linear-gradient(135deg, #FDFAF3, #F5EFE0);
    border: 1px solid var(--chanv-beige);
    border-radius: var(--radius-lg);
    padding: 28px 32px;
    cursor: pointer;
    transition: var(--transition);
    box-shadow: var(--shadow-soft);
    position: relative;
    overflow: hidden;
}

.actu-hero-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--chanv-beige), var(--chanv-terre), var(--chanv-beige));
}

.actu-hero-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-bold);
}

.actu-hero-card.unread { border-color: var(--chanv-terre); }

.actu-hero-top {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 12px;
}

.actu-hero-badge {
    font-family: 'Outfit', sans-serif;
    font-size: 11px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: var(--chanv-terre);
    background: rgba(40, 40, 40, 0.08);
    padding: 4px 12px;
    border-radius: 6px;
}

.actu-unread-badge {
    font-size: 11px;
    font-weight: 700;
    color: white;
    background: #EF5350;
    padding: 3px 10px;
    border-radius: 10px;
}

.actu-hero-lang { margin-left: auto; font-size: 18px; }

.actu-hero-dates {
    font-family: 'Outfit', sans-serif;
    font-size: 20px;
    font-weight: 700;
    color: var(--chanv-terre);
    margin-bottom: 10px;
}

.actu-hero-stats {
    display: flex;
    gap: 16px;
    font-size: 13px;
    color: #666;
    font-weight: 500;
    margin-bottom: 14px;
}

.actu-hero-preview {
    font-size: 14px;
    color: #555;
    line-height: 1.6;
    margin: 0 0 16px;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.actu-hero-cta {
    display: none;
}

.actu-hero-cta-btn {
    position: absolute;
    top: 20px;
    right: 20px;
    background: var(--chanv-terre);
    color: white;
    border: none;
    padding: 12px 28px;
    border-radius: 50px;
    font-family: 'Outfit', sans-serif;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    transition: var(--transition);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
    letter-spacing: 0.5px;
    z-index: 2;
}

.actu-hero-cta-btn:hover {
    background: #1a1a1a;
    transform: translateY(-2px) scale(1.03);
    box-shadow: 0 6px 24px rgba(0, 0, 0, 0.25);
}

.actu-hero-card { position: relative; }

.actu-hero-empty {
    text-align: center;
    padding: 50px 20px;
    background: var(--chanv-fibre);
    border-radius: var(--radius-lg);
    border: 1px dashed var(--chanv-beige);
}

.actu-hero-empty-icon { font-size: 40px; margin-bottom: 12px; }
.actu-hero-empty h3 { font-size: 20px; color: var(--chanv-terre); margin-bottom: 8px; }
.actu-hero-empty p { color: #888; max-width: 400px; margin: 0 auto; font-size: 14px; }
.actu-hero-loading { text-align: center; padding: 40px; }

/* ==================== RUBRIQUES / TABS ==================== */
.actu-rubriques { margin-bottom: 20px; }

.actu-rubriques-title {
    font-size: 13px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: #999;
    margin: 0 0 10px;
}

.actu-tabs {
    display: flex;
    gap: 6px;
    background: var(--chanv-fibre);
    border-radius: 12px;
    padding: 4px;
}

.actu-tab {
    flex: 1;
    padding: 10px 16px;
    border: none;
    background: transparent;
    color: var(--chanv-terre);
    font-size: 13px;
    font-weight: 600;
    border-radius: 10px;
    cursor: pointer;
    transition: var(--transition);
    font-family: inherit;
    text-align: center;
}

.actu-tab:hover { background: rgba(40, 40, 40, 0.05); }

.actu-tab.active {
    background: var(--chanv-terre);
    color: white;
    box-shadow: 0 2px 8px rgba(40, 40, 40, 0.2);
}

.actu-tab.coming-soon {
    color: #bbb;
    position: relative;
}

.actu-tab.coming-soon::after {
    content: 'bientôt';
    position: absolute;
    top: -6px;
    right: -2px;
    font-size: 8px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: white;
    background: var(--chanv-beige);
    padding: 1px 5px;
    border-radius: 4px;
}

.actu-tab.coming-soon.active {
    background: #eee;
    color: #999;
    box-shadow: none;
}

.actu-tab-content { padding-top: 8px; }
.actu-tab-icon { height: 16px; width: auto; vertical-align: middle; margin-right: 2px; }

.actu-no-more {
    text-align: center;
    color: #aaa;
    font-size: 13px;
    padding: 20px;
    font-style: italic;
}

.actu-coming-soon {
    text-align: center;
    padding: 60px 20px;
    background: var(--chanv-fibre);
    border-radius: var(--radius-lg);
    border: 1px dashed var(--chanv-beige);
}

.actu-coming-soon-icon { font-size: 42px; margin-bottom: 14px; }
.actu-coming-soon h3 { font-size: 18px; color: var(--chanv-terre); margin-bottom: 8px; }
.actu-coming-soon p { color: #888; max-width: 380px; margin: 0 auto; font-size: 14px; }

/* ==================== CHANGELOG CARDS ==================== */
.changelog-list {
    display: block;
}

.changelog-card {
    background: white;
    border-radius: var(--radius-lg);
    border: 1px solid var(--chanv-fibre);
    padding: 18px;
    cursor: pointer;
    transition: var(--transition);
    box-shadow: var(--shadow-soft);
    display: flex;
    flex-direction: column;
    gap: 8px;
    position: relative;
    overflow: hidden;
}

.changelog-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--chanv-beige), var(--chanv-terre));
    opacity: 0;
    transition: opacity 0.3s;
}

.changelog-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-bold);
    border-color: var(--chanv-beige);
}

.changelog-card:hover::before { opacity: 1; }

.card-unread-dot {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 10px;
    height: 10px;
    background: #EF5350;
    border-radius: 50%;
    animation: notifPulse 2s infinite;
}

.changelog-card.unread { border-left: 3px solid var(--chanv-terre); }

.changelog-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.changelog-card-badge {
    font-family: 'Outfit', sans-serif;
    font-size: 11px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--chanv-terre);
    background: var(--chanv-fibre);
    padding: 3px 8px;
    border-radius: 5px;
}

.changelog-card-badge.custom { background: #E8F5E9; color: #2E7D32; }
.changelog-card-lang { font-size: 15px; }

.changelog-card-period {
    font-family: 'Outfit', sans-serif;
    font-size: 14px;
    font-weight: 600;
    color: var(--chanv-terre);
}

.changelog-card-stats {
    display: flex;
    gap: 10px;
    font-size: 11px;
    color: #888;
    font-weight: 500;
}

.changelog-card-preview {
    font-size: 12px;
    color: #666;
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.changelog-card-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: auto;
    padding-top: 6px;
    border-top: 1px solid var(--chanv-fibre);
}

.changelog-card-author { font-size: 10px; color: #aaa; font-weight: 500; }

.changelog-card-arrow {
    font-size: 11px;
    font-weight: 700;
    color: var(--chanv-beige);
    transition: var(--transition);
}

.changelog-card:hover .changelog-card-arrow { transform: translateX(4px); color: var(--chanv-terre); }

.changelog-empty {
    grid-column: 1 / -1;
    text-align: center;
    padding: 60px 20px;
    background: var(--chanv-fibre);
    border-radius: var(--radius-lg);
    border: 1px dashed var(--chanv-beige);
}

.changelog-empty-icon { font-size: 42px; margin-bottom: 14px; }
.changelog-empty h3 { font-size: 20px; color: var(--chanv-terre); margin-bottom: 8px; }
.changelog-empty p { color: #888; max-width: 400px; margin: 0 auto; }
.changelog-loading { grid-column: 1 / -1; text-align: center; padding: 40px 20px; }
.changelog-loading p { color: #888; margin-top: 12px; }

/* ==================== ADMIN CONTROLS ==================== */
.changelog-admin-controls {
    margin-top: 32px;
    padding-top: 24px;
    border-top: 2px solid var(--chanv-fibre);
}

.changelog-admin-title {
    font-family: 'Outfit', sans-serif;
    font-size: 14px;
    font-weight: 700;
    color: #999;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 12px;
}

.changelog-token-warning {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 16px;
    background: #FFF8E1;
    border: 1px solid #FFD54F;
    border-radius: 10px;
    margin-bottom: 12px;
    font-size: 12px;
    font-weight: 500;
    color: #6D4C00;
}

.changelog-token-warning.critical { background: #FFF3E0; border-color: #FF9800; color: #B74600; }
.changelog-token-warning.expired { background: #FFEBEE; border-color: #EF5350; color: #B71C1C; }
.changelog-warning-icon { font-size: 16px; flex-shrink: 0; }

.changelog-generate-form {
    display: flex;
    flex-direction: column;
    gap: 0;
    padding: 14px 18px;
    background: var(--chanv-fibre);
    border-radius: 12px;
}

.changelog-generate-form label { font-size: 12px; font-weight: 600; color: #666; }

.changelog-date-input {
    padding: 7px 10px;
    border: 1px solid var(--chanv-fibre);
    border-radius: 8px;
    font-size: 12px;
    font-family: inherit;
    background: white;
}

.changelog-lang-select {
    padding: 7px 12px;
    border: 1px solid var(--chanv-fibre);
    border-radius: 8px;
    font-size: 12px;
    font-weight: 600;
    background: white;
    cursor: pointer;
    font-family: inherit;
}

.changelog-generate-btn { margin-left: auto; }

/* ==================== DETAIL / ARTICLE ==================== */
.changelog-detail { animation: fadeIn 0.3s ease; }

.actu-detail-topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
    gap: 16px;
    flex-wrap: wrap;
}

.changelog-detail-back {
    background: var(--chanv-terre);
    border: none;
    font-size: 13px;
    font-weight: 700;
    color: white;
    cursor: pointer;
    padding: 8px 18px;
    border-radius: 50px;
    transition: var(--transition);
    font-family: inherit;
    letter-spacing: 0.3px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
    white-space: nowrap;
}

.changelog-detail-back:hover {
    background: #1a1a1a;
    transform: translateX(-3px);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
}

.actu-detail-hebdo-link {
    background: linear-gradient(135deg, var(--chanv-beige), var(--chanv-fibre));
    border: 1px solid var(--chanv-beige);
    color: var(--chanv-terre);
    padding: 8px 20px;
    border-radius: 50px;
    font-family: 'Outfit', sans-serif;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    transition: var(--transition);
    text-decoration: none;
    white-space: nowrap;
}

.actu-detail-hebdo-link:hover {
    background: var(--chanv-terre);
    color: white;
    border-color: var(--chanv-terre);
    transform: translateX(3px);
}
.changelog-detail-period { margin-bottom: 12px; }

.changelog-detail-dates {
    font-family: 'Outfit', sans-serif;
    font-size: 16px;
    font-weight: 600;
    color: var(--chanv-terre);
    text-transform: capitalize;
}

.changelog-detail-stats-bar {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 24px;
}

.changelog-stat-pill {
    padding: 5px 12px;
    background: var(--chanv-fibre);
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    color: var(--chanv-terre);
}

.changelog-article {
    background: white;
    border-radius: var(--radius-lg);
    border: 1px solid var(--chanv-fibre);
    box-shadow: var(--shadow-soft);
    padding: 40px 48px;
    line-height: 1.85;
    font-size: 15.5px;
    color: #2d2d2d;
    max-width: 800px;
    margin: 0 auto;
}

/* First paragraph drop cap effect */
.changelog-article > p:first-of-type::first-letter {
    float: left;
    font-size: 3.2em;
    font-weight: 800;
    line-height: 0.85;
    margin: 4px 10px 0 0;
    color: var(--chanv-beige);
    font-family: 'Georgia', 'Times New Roman', serif;
}

.changelog-article h1 {
    font-size: 28px;
    font-weight: 800;
    margin: 0 0 20px;
    padding-bottom: 14px;
    border-bottom: 3px solid var(--chanv-beige);
    line-height: 1.3;
    color: var(--chanv-terre);
}

/* h2 — Magazine rubric style with left accent band */
.changelog-article h2 {
    font-size: 20px;
    font-weight: 700;
    margin: 40px 0 18px;
    padding: 12px 20px;
    color: var(--chanv-terre);
    background: linear-gradient(135deg, rgba(200,173,127,0.08), rgba(200,173,127,0.03));
    border-left: 4px solid var(--chanv-beige);
    border-bottom: none;
    border-radius: 0 var(--radius) var(--radius) 0;
    letter-spacing: 0.3px;
}
.changelog-article h3 { font-size: 17px; font-weight: 700; margin: 28px 0 12px; color: #444; }
.changelog-article h4 { font-size: 15px; font-weight: 700; margin: 20px 0 8px; color: #666; }
.changelog-article p {
    margin: 0 0 20px;
    padding-bottom: 18px;
    position: relative;
}
/* Subtle golden separator between consecutive paragraphs */
.changelog-article p + p::before {
    content: '';
    display: block;
    width: 60px;
    height: 1px;
    background: linear-gradient(90deg, var(--chanv-beige), transparent);
    margin: 0 auto 18px;
    opacity: 0.5;
}
.changelog-article ul { margin: 0 0 18px; padding-left: 0; list-style: none; }
.changelog-article li { padding: 5px 0 5px 24px; position: relative; line-height: 1.7; }
.changelog-article li::before { content: '\2022'; position: absolute; left: 6px; color: var(--chanv-beige); font-weight: 800; font-size: 18px; }
.changelog-article li.depth-1 { padding-left: 42px; font-size: 14px; color: #555; }
.changelog-article li.depth-1::before { left: 26px; content: '\25E6'; }
.changelog-article strong { font-weight: 700; color: var(--chanv-terre); }
.changelog-article em { font-style: italic; color: #777; }
.changelog-article code { background: var(--chanv-fibre); padding: 2px 6px; border-radius: 4px; font-size: 13px; font-family: 'Menlo', 'Monaco', monospace; }

/* Blockquote — Editorial pull-quote with decorative marks */
.changelog-article blockquote {
    border-left: 4px solid var(--chanv-beige);
    background: linear-gradient(135deg, rgba(200,173,127,0.08), rgba(200,173,127,0.02));
    margin: 28px 0;
    padding: 24px 28px 20px;
    border-radius: 0 var(--radius-lg) var(--radius-lg) 0;
    font-style: italic;
    font-size: 16px;
    color: #555;
    line-height: 1.7;
    position: relative;
}
.changelog-article blockquote::before {
    content: '\201C';
    position: absolute;
    top: -8px;
    left: 12px;
    font-size: 52px;
    font-family: Georgia, serif;
    color: var(--chanv-beige);
    opacity: 0.4;
    line-height: 1;
}
.changelog-article blockquote p { margin: 0; }

/* hr — Ornamental separator with central diamond */
.changelog-article hr {
    border: none;
    height: auto;
    margin: 36px 0;
    text-align: center;
    overflow: visible;
    background: none;
}
.changelog-article hr::before {
    content: '◆';
    display: block;
    position: relative;
    font-size: 12px;
    color: var(--chanv-beige);
    letter-spacing: 8px;
}
.changelog-article hr::after {
    content: '';
    display: block;
    width: 100%;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--chanv-beige), transparent);
    margin-top: -7px;
}

.changelog-article a { color: var(--chanv-terre); font-weight: 600; text-decoration: underline; text-decoration-color: var(--chanv-beige); text-underline-offset: 3px; }
.changelog-article a:hover { text-decoration-color: var(--chanv-terre); }

/* Images — Editorial style with shadow and rounded corners */
.changelog-article img {
    display: block;
    max-width: 100%;
    height: auto;
    border-radius: var(--radius-lg);
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
    margin: 24px auto;
}
.changelog-article .article-img-wrapper {
    margin: 28px 0;
    text-align: center;
}
.changelog-article .article-img-caption {
    display: block;
    margin-top: 8px;
    font-size: 12px;
    color: #999;
    font-style: italic;
    text-align: center;
}

/* Tables — Magazine style with dark header */
.changelog-table { width: 100%; border-collapse: collapse; margin: 24px 0; font-size: 13px; border-radius: 10px; overflow: hidden; border: 1px solid var(--chanv-fibre); }
.changelog-table th { background: var(--chanv-terre); color: #F1EADA; padding: 12px 16px; text-align: left; font-size: 11px; text-transform: uppercase; letter-spacing: 1px; font-weight: 700; }
.changelog-table td { padding: 10px 16px; border-bottom: 1px solid var(--chanv-fibre); }
.changelog-table tr:nth-child(even) { background: rgba(200,173,127,0.04); }
.changelog-table tr:last-child td { border-bottom: none; }
.changelog-table tr:hover { background: rgba(200,173,127,0.08); }

/* Inline "Lire l'article" clickable buttons */
.article-inline-link {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: linear-gradient(135deg, var(--chanv-beige), #c9a96e);
    color: white;
    border: none;
    padding: 5px 16px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s ease;
    font-family: inherit;
    margin-left: 6px;
    vertical-align: middle;
}
.article-inline-link:hover {
    transform: translateX(3px);
    box-shadow: 0 2px 8px rgba(200,173,127,0.4);
    background: linear-gradient(135deg, #c9a96e, var(--chanv-terre));
}

/* List items that contain article links — card-like style */
.changelog-article li.has-article-link {
    background: linear-gradient(135deg, #FDFAF3, #F9F3E8);
    border: 1px solid rgba(200,173,127,0.2);
    border-radius: var(--radius);
    padding: 14px 20px 14px 24px;
    margin-bottom: 10px;
    transition: var(--transition);
}
.changelog-article li.has-article-link:hover {
    border-color: var(--chanv-beige);
    box-shadow: 0 2px 12px rgba(200,173,127,0.15);
    transform: translateX(4px);
}
.changelog-article li.has-article-link::before {
    top: 16px;
}

/* Hero linked articles buttons */
.actu-hero-linked {
    display: flex;
    gap: 8px;
    margin: 12px 0 4px;
    flex-wrap: wrap;
}
.actu-hero-linked-btn {
    background: rgba(200,173,127,0.15);
    border: 1px solid var(--chanv-beige);
    color: var(--chanv-terre);
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
}
.actu-hero-linked-btn:hover {
    background: var(--chanv-beige);
    color: white;
}

/* Linked articles inside article detail */
.article-linked-section {
    margin-top: 32px;
    padding-top: 24px;
    border-top: 2px solid var(--chanv-fibre);
}
.article-linked-title {
    font-size: 18px;
    font-weight: 700;
    color: var(--chanv-terre);
    margin: 0 0 16px;
}
.article-linked-buttons {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}
.article-linked-btn {
    background: linear-gradient(135deg, var(--chanv-beige), #c9a96e);
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: var(--radius);
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    transition: var(--transition);
    box-shadow: var(--shadow-soft);
}
.article-linked-btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-bold);
}

/* Edition badge variant */
.actu-hero-badge.edition,
.changelog-card-badge.edition {
    background: linear-gradient(135deg, var(--chanv-terre), #444);
    color: white;
}
.changelog-card-badge.tech {
    background: linear-gradient(135deg, #4a90d9, #357abd);
    color: white;
}
.changelog-card-badge.production {
    background: linear-gradient(135deg, #C4A97D, #A68B5B);
    color: white;
}
.changelog-card-badge.ventes {
    background: linear-gradient(135deg, #00897B, #00695C);
    color: white;
}
.changelog-card-badge.groupe {
    background: linear-gradient(135deg, #2E7D32, #1B5E20);
    color: white;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* ==================== RESPONSIVE ==================== */
@media (max-width: 768px) {
    .actu-btn { padding: 8px 12px; font-size: 12px; }
    .actu-btn-label { display: none; }
    .actu-title { font-size: 22px; }
    .actu-header { gap: 12px; }
    .actu-hero-card { padding: 20px; }
    .actu-hero-dates { font-size: 17px; }
    .actu-hero-stats { flex-wrap: wrap; gap: 8px; font-size: 12px; }
    .actu-tabs { flex-wrap: wrap; }
    .actu-tab { font-size: 12px; padding: 8px 10px; }
    .changelog-list-grid { grid-template-columns: 1fr; }
    .changelog-article { padding: 20px; font-size: 14px; }
    .changelog-article h1 { font-size: 20px; }
    .changelog-article h2 { font-size: 18px; }
    .changelog-article h3 { font-size: 15px; }
    .changelog-generate-form { flex-direction: column; align-items: stretch; }
    .changelog-generate-btn { margin-left: 0; }
    .changelog-detail-stats-bar { gap: 6px; }
    .changelog-stat-pill { font-size: 11px; padding: 4px 10px; }
    .actu-hero-cta-btn { position: static; margin-top: 12px; width: 100%; }
    .actu-detail-topbar { flex-direction: row; }
}

/* ==================== PRIVATE CARDS ==================== */
.changelog-card.private {
    border: 1px dashed var(--chanv-beige);
    background: #FDFAF3;
}
.changelog-card.private::before { background: linear-gradient(90deg, #999, #bbb); }
.card-private-icon {
    position: absolute; top: 10px; right: 10px; font-size: 14px; opacity: 0.6;
}
.changelog-card-badge.private { background: #F3E5F5; color: #6A1B9A; }

.actu-private-section {
    margin-top: 32px;
    padding: 20px;
    border: 1px dashed var(--chanv-beige);
    border-radius: 12px;
    background: linear-gradient(135deg, #FDFAF3, #F9F3E8);
}
.actu-private-title {
    font-size: 14px;
    font-weight: 700;
    color: #888;
    margin-bottom: 14px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.detail-private-badge {
    display: inline-block;
    background: #F3E5F5;
    color: #6A1B9A;
    font-size: 11px;
    font-weight: 700;
    padding: 3px 10px;
    border-radius: 8px;
    margin-right: 10px;
}

/* ==================== ARCHIVES ==================== */
.actu-archives-btn {
    display: block;
    width: 100%;
    padding: 12px;
    margin-top: 14px;
    border: 1px dashed var(--chanv-beige);
    border-radius: 12px;
    background: transparent;
    color: var(--chanv-terre);
    font-family: inherit;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    text-align: center;
}
.actu-archives-btn:hover {
    background: var(--chanv-fibre);
    border-color: var(--chanv-terre);
}

.actu-archives-header {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 16px;
}
.actu-archives-header h3 { font-size: 18px; font-weight: 700; margin: 0; }

.actu-archives-filters {
    display: flex;
    gap: 8px;
    margin-bottom: 16px;
    flex-wrap: wrap;
    align-items: center;
}

.changelog-list-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 14px;
}

/* ==================== ARTICLE ACTIONS ==================== */
.changelog-detail-actions {
    display: flex;
    gap: 8px;
    margin-top: 6px;
}

.btn-action {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 6px 14px;
    border: 1px solid var(--chanv-fibre);
    border-radius: 8px;
    background: white;
    color: var(--chanv-terre);
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    font-family: inherit;
}
.btn-action:hover {
    background: var(--chanv-fibre);
    border-color: var(--chanv-beige);
}
.btn-action-danger:hover {
    background: #FFEBEE;
    border-color: #EF5350;
    color: #C62828;
}

/* ==================== ADMIN ROWS ==================== */
.changelog-admin-row {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: nowrap;
    padding: 10px 0;
}
.changelog-admin-row:not(:last-child) {
    border-bottom: 1px solid rgba(0,0,0,0.05);
    padding-bottom: 12px;
    margin-bottom: 4px;
}
.changelog-admin-label {
    font-size: 12px;
    font-weight: 700;
    color: var(--chanv-terre);
    min-width: 130px;
    white-space: nowrap;
}
.changelog-admin-dates {
    display: flex;
    align-items: center;
    gap: 6px;
    white-space: nowrap;
}
.changelog-admin-dates label {
    font-size: 12px;
    font-weight: 600;
    color: #666;
    text-transform: uppercase;
}
.changelog-admin-hint {
    font-size: 11px;
    color: #888;
    font-style: italic;
    white-space: nowrap;
}
@media (max-width: 768px) {
    .changelog-admin-row {
        flex-wrap: wrap;
        gap: 6px;
    }
    .changelog-admin-dates {
        width: 100%;
    }
}
/* =====================================================================
   --- NOTIFICATION BELL + PANEL (dark sidebar theme) ---
   ===================================================================== */

.sidebar-panel .notif-bell-wrapper {
    position: absolute;
    top: 14px;
    right: 14px;
    z-index: 10;
}

.notif-bell {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 50%;
    width: 38px;
    height: 38px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 18px;
    transition: var(--transition);
    position: relative;
    color: white;
}

.notif-bell:hover {
    background: rgba(221, 203, 164, 0.18);
    border-color: rgba(221, 203, 164, 0.35);
    transform: scale(1.08);
}

.notif-bell.notif-active {
    background: rgba(221, 203, 164, 0.15);
    border-color: var(--chanv-beige);
    box-shadow: 0 0 12px rgba(221, 203, 164, 0.12);
}

.notif-badge {
    position: absolute;
    top: -4px;
    right: -4px;
    background: #E53E3E;
    color: white;
    font-size: 10px;
    font-weight: 800;
    min-width: 18px;
    height: 18px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 4px;
    border: 2px solid var(--chanv-terre);
    animation: notifBounce 0.3s ease-out;
}

@keyframes notifBounce {
    0% { transform: scale(0); }
    60% { transform: scale(1.3); }
    100% { transform: scale(1); }
}

/* --- Panel dropdown (dark) --- */
.notif-panel {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    width: 310px;
    max-height: 480px;
    background: #232323;
    border-radius: var(--radius);
    box-shadow: 0 12px 50px rgba(0, 0, 0, 0.5);
    border: 1px solid rgba(221, 203, 164, 0.1);
    z-index: 9999;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    animation: fadeIn 0.2s ease-out;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-8px); }
    to { opacity: 1; transform: translateY(0); }
}

.notif-panel-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 14px;
    background: rgba(221, 203, 164, 0.05);
    border-bottom: 1px solid rgba(221, 203, 164, 0.08);
    font-family: 'Outfit', sans-serif;
    font-weight: 700;
    font-size: 13px;
    color: var(--chanv-beige);
}

.notif-panel-actions { display: flex; gap: 4px; }

.notif-panel-actions button {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 13px;
    padding: 4px 6px;
    border-radius: 6px;
    transition: background 0.15s;
    color: rgba(255, 255, 255, 0.4);
}

.notif-panel-actions button:hover {
    background: rgba(221, 203, 164, 0.12);
    color: var(--chanv-beige);
}

.notif-list { flex: 1; overflow-y: auto; max-height: 400px; }
.notif-list::-webkit-scrollbar { width: 4px; }
.notif-list::-webkit-scrollbar-thumb { background: rgba(221, 203, 164, 0.15); border-radius: 4px; }

/* --- Notification items --- */
.notif-item {
    display: flex;
    gap: 10px;
    padding: 12px 14px;
    cursor: pointer;
    transition: background 0.15s;
    border-bottom: 1px solid rgba(255, 255, 255, 0.03);
}
.notif-item:hover { background: rgba(221, 203, 164, 0.07); }
.notif-item.notif-unread { background: rgba(221, 203, 164, 0.04); border-left: 3px solid var(--chanv-beige); }
.notif-item.notif-read { opacity: 0.5; }

.notif-item-icon { font-size: 18px; flex-shrink: 0; width: 24px; text-align: center; padding-top: 2px; }
.notif-item-body { flex: 1; min-width: 0; }

.notif-item-title {
    font-weight: 700;
    font-size: 12.5px;
    color: rgba(255, 255, 255, 0.88);
    margin-bottom: 3px;
    white-space: normal;
    word-break: break-word;
}

.notif-item-text {
    font-size: 11.5px;
    color: rgba(255, 255, 255, 0.45);
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    word-break: break-word;
}

.notif-item-time { font-size: 10px; color: rgba(221, 203, 164, 0.35); margin-top: 4px; }
.notif-empty, .notif-loading { padding: 30px 16px; text-align: center; color: rgba(255, 255, 255, 0.3); font-size: 13px; }

/* =====================================================================
   --- NOTIFICATION DETAIL MODAL ---
   ===================================================================== */

.notif-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.55);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    z-index: 100000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    animation: fadeIn 0.15s ease-out;
}

.notif-modal {
    background: #1e1e1e;
    border: 1px solid rgba(221, 203, 164, 0.12);
    border-radius: var(--radius-lg);
    width: 100%;
    max-width: 480px;
    max-height: 80vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    box-shadow: 0 24px 80px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(221, 203, 164, 0.06);
    animation: modalSlideUp 0.25s ease-out;
}

@keyframes modalSlideUp {
    from { opacity: 0; transform: translateY(24px) scale(0.96); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

.notif-modal-header {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 22px 22px 16px;
    border-bottom: 1px solid rgba(221, 203, 164, 0.08);
    background: rgba(221, 203, 164, 0.03);
}

.notif-modal-header-icon { font-size: 28px; flex-shrink: 0; padding-top: 2px; }
.notif-modal-header-info { flex: 1; min-width: 0; }

.notif-modal-title {
    font-family: 'Outfit', sans-serif;
    font-weight: 700;
    font-size: 17px;
    color: rgba(255, 255, 255, 0.95);
    margin-bottom: 6px;
    word-break: break-word;
    line-height: 1.3;
}

.notif-modal-meta {
    font-size: 11px;
    color: rgba(221, 203, 164, 0.45);
    display: flex;
    gap: 10px;
    align-items: center;
    flex-wrap: wrap;
}

.notif-modal-source {
    background: rgba(221, 203, 164, 0.1);
    padding: 2px 8px;
    border-radius: 6px;
    font-weight: 600;
    color: var(--chanv-beige);
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.notif-modal-close {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 50%;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 18px;
    color: rgba(255, 255, 255, 0.4);
    transition: all 0.15s;
    flex-shrink: 0;
}
.notif-modal-close:hover { background: rgba(255, 255, 255, 0.1); color: white; }

.notif-modal-body { padding: 22px; overflow-y: auto; flex: 1; }

.notif-modal-text {
    font-size: 14px;
    line-height: 1.75;
    color: rgba(255, 255, 255, 0.72);
    word-break: break-word;
    white-space: pre-wrap;
}

.notif-modal-footer {
    padding: 14px 22px;
    border-top: 1px solid rgba(221, 203, 164, 0.06);
    display: flex;
    justify-content: flex-end;
    gap: 8px;
}

.notif-modal-btn {
    background: rgba(221, 203, 164, 0.1);
    border: 1px solid rgba(221, 203, 164, 0.18);
    color: var(--chanv-beige);
    padding: 8px 20px;
    border-radius: 8px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.15s;
    font-family: inherit;
}
.notif-modal-btn:hover { background: rgba(221, 203, 164, 0.18); border-color: var(--chanv-beige); }

/* =====================================================================
   "Mes demandes" — vue plein écran
   ===================================================================== */
.mytickets-view {
    max-width: 900px;
    margin: -10px auto 60px auto;
    padding: 0 20px;
    position: relative;
    z-index: 10;
}
.mytickets-container { animation: fadeIn 0.3s ease; }
.mytickets-header {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-bottom: 24px;
    flex-wrap: wrap;
}
.mytickets-back {
    background: var(--chanv-terre);
    border: none;
    font-size: 13px;
    font-weight: 700;
    color: white;
    cursor: pointer;
    padding: 8px 18px;
    border-radius: 50px;
    transition: var(--transition);
    font-family: inherit;
    letter-spacing: 0.3px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
    white-space: nowrap;
}
.mytickets-back:hover {
    background: #1a1a1a;
    transform: translateX(-3px);
}
.mytickets-title-block { flex: 1; display: flex; flex-direction: column; gap: 4px; }
.mytickets-title {
    font-size: 28px;
    font-weight: 800;
    color: var(--chanv-terre);
    margin: 0;
    line-height: 1.2;
}
.mytickets-subtitle { font-size: 13px; color: #888; margin: 0; }

.mytickets-filters { display: flex; gap: 8px; margin-bottom: 16px; flex-wrap: wrap; }
.mytickets-filter {
    background: white;
    border: 1px solid #e2e2e2;
    color: #555;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
}
.mytickets-filter:hover { border-color: var(--chanv-terre); color: var(--chanv-terre); }
.mytickets-filter.active {
    background: var(--chanv-terre);
    color: white;
    border-color: var(--chanv-terre);
}

.mytickets-list { display: flex; flex-direction: column; gap: 12px; }
.mytickets-loading, .mytickets-empty {
    padding: 40px 20px; text-align: center; color: #888;
    background: #fafafa; border-radius: 12px;
}

.mt-card {
    background: white;
    border: 1px solid #e8e8e8;
    border-radius: 14px;
    padding: 16px 18px;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.mt-card:hover {
    border-color: var(--chanv-terre);
    transform: translateY(-1px);
    box-shadow: 0 4px 16px rgba(0,0,0,0.06);
}
.mt-card-row { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.mt-card-row-top { font-size: 12px; }
.mt-card-row-bottom { font-size: 12px; color: #888; }
.mt-card-badges { display: flex; gap: 6px; flex-wrap: wrap; }
.mt-card-date { color: #999; font-size: 11px; white-space: nowrap; }
.mt-card-message {
    font-size: 14px;
    color: #333;
    line-height: 1.4;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
}
.mt-card-machine { color: #666; font-size: 12px; }
.mt-card-bclink {
    color: var(--chanv-terre, #555);
    font-size: 11px;
    font-weight: 600;
    text-decoration: none;
}
.mt-card-bclink:hover { text-decoration: underline; }

/* Badges */
.mt-badge {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.2px;
    line-height: 1.4;
}
.mt-badge-feature { background: #FEF3C7; color: #92400E; }
.mt-badge-bug { background: #FEE2E2; color: #991B1B; }
.mt-badge-support { background: #E0E7FF; color: #3730A3; }
.mt-badge-open { background: #DCFCE7; color: #166534; }
.mt-badge-resolved { background: #E5E7EB; color: #374151; }

/* Détail */
.mt-detail { font-size: 14px; color: #333; }
.mt-detail-badges { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-bottom: 12px; }
.mt-detail-date { font-size: 12px; color: #888; margin-left: auto; }
.mt-detail-title {
    font-size: 20px; font-weight: 700; color: var(--chanv-terre);
    margin: 0 0 16px 0; line-height: 1.3;
}
.mt-detail-meta {
    display: flex; flex-direction: column; gap: 4px;
    font-size: 13px; color: #555;
    background: #f8f8f8; padding: 12px 14px; border-radius: 10px;
    margin-bottom: 16px;
}
.mt-detail-meta a { color: var(--chanv-terre); text-decoration: none; font-weight: 600; }
.mt-detail-meta a:hover { text-decoration: underline; }
.mt-detail-message {
    background: #fafafa;
    padding: 14px 16px;
    border-radius: 10px;
    white-space: pre-wrap;
    line-height: 1.5;
    margin-bottom: 18px;
    border-left: 3px solid var(--chanv-beige, #DDCBA4);
}

.mt-cadrage {
    background: linear-gradient(135deg, #FEF3C7 0%, #FDE68A 100%);
    border-radius: 12px;
    padding: 14px 16px;
    margin-bottom: 18px;
}
.mt-cadrage-title { font-weight: 700; color: #78350F; margin-bottom: 6px; font-size: 14px; }
.mt-cadrage-status { font-size: 13px; color: #92400E; margin-bottom: 8px; }
.mt-cadrage-link {
    display: inline-block; margin-right: 10px;
    color: #78350F; font-weight: 600; font-size: 13px;
    text-decoration: none;
}
.mt-cadrage-link:hover { text-decoration: underline; }
.mt-cadrage-meta { font-size: 11px; color: #92400E; opacity: 0.7; margin-top: 6px; }

.mt-comments { margin-bottom: 18px; }
.mt-comments-title { font-weight: 700; color: #333; margin-bottom: 10px; font-size: 14px; }
.mt-comments-empty {
    color: #999; font-style: italic; font-size: 13px;
    padding: 12px; text-align: center;
}
.mt-comment {
    background: #f8f8f8;
    border-radius: 10px;
    padding: 10px 14px;
    margin-bottom: 8px;
}
.mt-comment-hdr {
    display: flex; justify-content: space-between; align-items: baseline;
    margin-bottom: 4px; gap: 8px;
}
.mt-comment-author { font-weight: 700; font-size: 13px; color: #333; }
.mt-comment-date { font-size: 11px; color: #999; }
.mt-comment-text { font-size: 13px; color: #444; white-space: pre-wrap; line-height: 1.4; }

.mt-add-comment { margin-top: 14px; }
.mt-add-comment textarea {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #e2e2e2;
    border-radius: 10px;
    font-family: inherit;
    font-size: 13px;
    resize: vertical;
    box-sizing: border-box;
}
.mt-add-comment textarea:focus {
    outline: none; border-color: var(--chanv-terre);
}
.mt-detail-actions {
    display: flex; gap: 10px; margin-top: 10px; justify-content: flex-end; flex-wrap: wrap;
}
.mt-resolved-note {
    text-align: center; padding: 12px; color: #666; font-style: italic;
    background: #f5f5f5; border-radius: 10px; margin-top: 12px; font-size: 13px;
}

/* --- Drive Access Cards (dans tab Agent IA) --- */
/* Drive ACL — Table compacte */
.drive-access-cards { margin-top: 8px; }
.drive-acl-table-wrapper {
    max-height: 280px; overflow-y: auto;
    border: 1px solid var(--chanv-fibre); border-radius: 10px;
    background: #fafafa;
}
.drive-acl-table {
    width: 100%; border-collapse: collapse; font-size: 13px;
}
.drive-acl-table thead th {
    position: sticky; top: 0; z-index: 1;
    background: #f2ede4; color: var(--chanv-terre);
    padding: 8px 12px; font-weight: 600; font-size: 11px;
    text-transform: uppercase; letter-spacing: 0.5px;
    border-bottom: 1px solid var(--chanv-fibre); text-align: left;
}
.drive-acl-row td { padding: 8px 12px; border-bottom: 1px solid rgba(0,0,0,0.05); vertical-align: middle; }
.drive-acl-row:last-child td { border-bottom: none; }
.drive-acl-row:hover { background: rgba(201,168,118,0.06); }
.drive-acl-name { font-weight: 600; color: var(--chanv-terre); white-space: nowrap; }
.drive-acl-perms { text-align: center; white-space: nowrap; }
.drive-acl-perm-badge { font-size: 14px; margin: 0 1px; }
.drive-acl-tags { display: flex; flex-wrap: wrap; gap: 4px; }
.drive-acl-tag {
    display: inline-flex; align-items: center;
    padding: 2px 8px; border-radius: 12px;
    font-size: 11px; font-weight: 500; white-space: nowrap;
}
.drive-acl-tag.group { background: rgba(201,168,118,0.12); color: var(--chanv-terre); }
.drive-acl-tag.email { background: #e8f4fd; color: #2b6cb0; }
.drive-acl-actions { text-align: right; white-space: nowrap; }
.drive-acl-action-btn {
    background: none; border: none; cursor: pointer; font-size: 13px;
    padding: 3px 5px; border-radius: 6px; opacity: 0.5; transition: opacity 0.2s;
}
.drive-acl-action-btn:hover { opacity: 1; }
.drive-acl-action-btn.delete:hover { background: rgba(255,100,100,0.1); }
.drive-acl-count {
    text-align: right; font-size: 11px; color: #999;
    padding: 6px 12px 0;
}

/* =====================================================================
   Vue "Plan" — bâtiment + capteurs Temp Stick
   ===================================================================== */
.plan-view {
    background: white;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 4px 24px rgba(0,0,0,0.06);
    margin-top: 20px;
}
.plan-tabs {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 8px 18px 0;
    background: #fafafa;
    border-bottom: 1px solid #eee;
    overflow-x: auto;
    scrollbar-width: thin;
}
.plan-tabs:empty { display: none; }
.plan-tab {
    background: transparent;
    border: 1px solid transparent;
    color: #666;
    padding: 8px 16px;
    border-radius: 8px 8px 0 0;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    font-family: inherit;
    white-space: nowrap;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    position: relative;
    bottom: -1px;
}
.plan-tab:hover {
    color: var(--chanv-terre);
    background: rgba(221,203,164,0.15);
}
.plan-tab-active {
    color: var(--chanv-terre);
    background: white;
    border-color: #eee;
    border-bottom-color: white;
    cursor: default;
}
.plan-tab-count {
    background: var(--chanv-beige, #DDCBA4);
    color: var(--chanv-terre);
    font-size: 11px;
    font-weight: 700;
    padding: 1px 7px;
    border-radius: 10px;
    line-height: 1.4;
}
.plan-tab-active .plan-tab-count {
    background: var(--chanv-terre);
    color: white;
}
.plan-tab-empty {
    color: #d97706;
    font-size: 18px;
    line-height: 1;
}
.plan-tab-rename {
    margin-left: 4px;
    opacity: 0.5;
    padding: 6px 10px;
    font-size: 12px;
}
.plan-tab-rename:hover { opacity: 1; background: transparent; }

.plan-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 18px;
    background: #fafafa;
    border-bottom: 1px solid #eee;
    gap: 12px;
    flex-wrap: wrap;
}
.plan-toolbar-left, .plan-toolbar-right {
    display: flex; gap: 8px; align-items: center;
}
.plan-btn {
    background: white;
    border: 1px solid #ddd;
    color: #333;
    padding: 6px 12px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    font-family: inherit;
}
.plan-btn:hover { background: var(--chanv-beige, #DDCBA4); border-color: var(--chanv-terre); }
.plan-btn:disabled { opacity: 0.5; cursor: not-allowed; }
.plan-btn-primary {
    background: var(--chanv-terre);
    color: white;
    border-color: var(--chanv-terre);
}
.plan-btn-primary:hover { background: #1a1a1a; }
.plan-zoom-level {
    font-size: 12px;
    color: #888;
    min-width: 48px;
    text-align: center;
    font-weight: 600;
}

.plan-status {
    padding: 8px 18px;
    font-size: 12px;
    color: #777;
    border-bottom: 1px solid #f0f0f0;
}
.plan-status-warn { color: #92400E; background: #FEF3C7; }
.plan-status-err  { color: #991B1B; background: #FEE2E2; }

.plan-stage {
    position: relative;
    width: 100%;
    height: 70vh;
    min-height: 500px;
    overflow: hidden;
    background:
        linear-gradient(45deg, #f8f8f8 25%, transparent 25%),
        linear-gradient(-45deg, #f8f8f8 25%, transparent 25%),
        linear-gradient(45deg, transparent 75%, #f8f8f8 75%),
        linear-gradient(-45deg, transparent 75%, #f8f8f8 75%);
    background-size: 20px 20px;
    background-position: 0 0, 0 10px, 10px -10px, 10px 0px;
    cursor: grab;
    user-select: none;
}
.plan-stage-grabbing { cursor: grabbing; }
.plan-edit-mode .plan-stage { cursor: default; }

.plan-canvas {
    position: absolute;
    top: 0;
    left: 0;
    transform-origin: 0 0;
    transition: transform 0.05s linear;
}

#planImage {
    display: block;
    max-width: none;
    pointer-events: none; /* on capture les events sur le stage */
    user-select: none;
}

.plan-markers {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    pointer-events: none;
}

/* --- Markers --- */
/* Le marker est positionné en % du canvas (qui se scale). Pour rester lisible
   à tout zoom, le marker se contre-scale via --plan-scale (set par JS).
   Limites : on borne entre 0.5x (sinon trop gros à fort zoom) et 4x. */
.plan-marker {
    position: absolute;
    width: 24px; height: 24px;
    transform: translate(-50%, -50%) scale(clamp(0.6, calc(1 / var(--plan-scale, 1)), 4));
    transform-origin: center center;
    pointer-events: auto;
    cursor: pointer;
    z-index: 2;
}
.plan-edit-mode .plan-marker[data-editable="true"] {
    cursor: grab;
}
.plan-edit-mode .plan-marker[data-editable="true"]:active { cursor: grabbing; }

.plan-marker-dot {
    position: absolute;
    top: 50%; left: 50%;
    transform: translate(-50%, -50%);
    width: 20px; height: 20px;
    border-radius: 50%;
    background: #10B981;
    border: 3px solid white;
    box-shadow: 0 0 0 1px rgba(0,0,0,0.25), 0 2px 8px rgba(0,0,0,0.35);
    animation: planPulse 2s infinite ease-out;
}
.plan-marker-offline .plan-marker-dot { background: #9CA3AF; animation: none; }
.plan-marker-unknown .plan-marker-dot { background: #F59E0B; animation: none; }
@keyframes planPulse {
    0%   { box-shadow: 0 0 0 1px rgba(0,0,0,0.25), 0 2px 8px rgba(0,0,0,0.35), 0 0 0 0 rgba(16,185,129,0.5); }
    70%  { box-shadow: 0 0 0 1px rgba(0,0,0,0.25), 0 2px 8px rgba(0,0,0,0.35), 0 0 0 16px rgba(16,185,129,0); }
    100% { box-shadow: 0 0 0 1px rgba(0,0,0,0.25), 0 2px 8px rgba(0,0,0,0.35), 0 0 0 0 rgba(16,185,129,0); }
}

/* Label permanent (temp + humidité) — visible en tout temps */
.plan-marker-label {
    position: absolute;
    left: calc(100% + 6px);
    top: 50%;
    transform: translateY(-50%);
    background: rgba(20,20,20,0.93);
    color: white;
    padding: 6px 12px;
    border-radius: 16px;
    font-size: 14px;
    font-weight: 800;
    letter-spacing: 0.2px;
    line-height: 1;
    white-space: nowrap;
    box-shadow: 0 4px 12px rgba(0,0,0,0.25);
    display: inline-flex;
    align-items: center;
    gap: 8px;
    pointer-events: none;
}
.plan-marker-offline .plan-marker-label { background: rgba(120,120,120,0.93); }
.plan-marker-temp { color: #FCA5A5; }
.plan-marker-hum  { color: #93C5FD; }
.plan-marker-label::before {
    content: '';
    position: absolute;
    right: 100%;
    top: 50%;
    transform: translateY(-50%);
    border: 5px solid transparent;
    border-right-color: rgba(20,20,20,0.93);
}
.plan-marker-offline .plan-marker-label::before { border-right-color: rgba(120,120,120,0.93); }

/* Bubble détail (nom + last check-in) — au survol uniquement */
.plan-marker-bubble {
    position: absolute;
    bottom: calc(100% + 10px);
    left: 50%;
    transform: translateX(-50%);
    background: white;
    color: #222;
    padding: 8px 12px;
    border-radius: 10px;
    font-size: 12px;
    line-height: 1.3;
    white-space: nowrap;
    box-shadow: 0 8px 24px rgba(0,0,0,0.25);
    border: 1px solid #e2e2e2;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.15s;
    z-index: 3;
}
.plan-marker:hover .plan-marker-bubble {
    opacity: 1;
}
.plan-marker-bubble::after {
    content: '';
    position: absolute;
    top: 100%; left: 50%;
    transform: translateX(-50%);
    border: 6px solid transparent;
    border-top-color: white;
}
.plan-marker-name { font-weight: 700; color: var(--chanv-terre, #555); }
.plan-marker-time { font-size: 11px; color: #888; margin-top: 2px; }

/* --- Tray (capteurs à placer) — overlay en coords écran, hors canvas transformé --- */
.plan-tray-container {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    pointer-events: none;
    z-index: 20;
}
.plan-tray-container:empty { display: none; }
.plan-tray {
    position: absolute;
    top: 16px; right: 16px;
    width: 240px;
    background: rgba(255,255,255,0.97);
    border: 1px solid #e2e2e2;
    border-radius: 12px;
    padding: 12px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.15);
    pointer-events: auto;
    max-height: calc(100% - 32px);
    overflow-y: auto;
    backdrop-filter: blur(4px);
}
.plan-tray-hint {
    margin-top: 8px;
    font-size: 10px; color: #999;
    font-style: italic; text-align: center;
}
.plan-tray-title {
    font-size: 11px; font-weight: 700; text-transform: uppercase;
    letter-spacing: 1px; color: #555; margin-bottom: 8px;
}
.plan-tray-list { display: flex; flex-direction: column; gap: 4px; }
.plan-tray-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 10px;
    background: #fafafa;
    border-radius: 8px;
    font-size: 12px;
    cursor: grab;
    transition: var(--transition);
    user-select: none;
}
.plan-tray-item:hover {
    background: var(--chanv-beige, #DDCBA4);
    transform: translateX(-2px);
}
.plan-tray-item:active { cursor: grabbing; }
.plan-tray-name { font-weight: 600; color: #333; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.plan-tray-temp { font-weight: 700; color: #666; }

/* =====================================================================
 * MONITEUR — Palantir service cards (Super Admin)
 * ===================================================================== */

.monitor-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 16px;
    padding: 8px 0;
}

.monitor-card {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 16px;
    background: var(--card-bg, #2a2a2a);
    border: 1px solid var(--border-color, #3a3a3a);
    border-left: 3px solid var(--status-color, #888);
    border-radius: 12px;
    text-decoration: none;
    color: inherit;
    transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
    cursor: pointer;
}
.monitor-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0,0,0,0.25);
    border-color: var(--status-color, #888);
}

.mc-header {
    display: flex;
    align-items: center;
    gap: 10px;
}
.mc-status-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--status-color, #888);
    box-shadow: 0 0 6px var(--status-color, transparent);
    flex-shrink: 0;
}
.mc-info {
    display: flex;
    align-items: center;
    gap: 8px;
    flex: 1;
    min-width: 0;
}
.mc-name {
    font-size: 0.95rem;
    font-weight: 600;
    margin: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    color: var(--text-primary, #f0f0f0);
}
.mc-env {
    font-size: 0.65rem;
    font-weight: 600;
    padding: 2px 6px;
    border-radius: 4px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    flex-shrink: 0;
}
.mc-env-prod {
    background: rgba(239,68,68,0.15);
    color: #f87171;
}
.mc-env-dev {
    background: rgba(59,130,246,0.15);
    color: #60a5fa;
}

.mc-sparkline {
    width: 100%;
    height: 36px;
    opacity: 0.9;
}

.mc-metrics {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 4px;
}
.mc-metric {
    display: flex;
    align-items: center;
    gap: 3px;
    font-size: 0.8rem;
    color: var(--text-secondary, #aaa);
}
.mc-metric-icon {
    font-size: 0.7rem;
}
.mc-metric span:not(.mc-metric-icon) {
    font-weight: 500;
    color: var(--text-primary, #f0f0f0);
}
.mc-metric small {
    font-size: 0.65rem;
    color: var(--text-secondary, #888);
}

.mc-footer {
    display: flex;
    gap: 12px;
    font-size: 0.7rem;
    color: var(--text-secondary, #777);
    padding-top: 8px;
    border-top: 1px solid var(--border-color, #333);
}

@media (max-width: 640px) {
    .monitor-grid {
        grid-template-columns: 1fr;
    }
    .mc-metrics {
        grid-template-columns: repeat(2, 1fr);
        gap: 6px;
    }
}

/* --- Firestore Monitor Section --- */
.monitor-firestore-section {
    grid-column: 1 / -1;
    margin-top: 8px;
}
.monitor-section-title {
    font-size: 14px;
    font-weight: 700;
    color: var(--text-primary, #f0f0f0);
    margin: 0 0 12px 0;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    display: flex;
    align-items: center;
    gap: 8px;
}
.monitor-firestore-cards {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 16px;
}
.monitor-fs-card {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 16px;
    background: var(--card-bg, #2a2a2a);
    border: 1px solid var(--border-color, #3a3a3a);
    border-left: 3px solid #f59e0b;
    border-radius: 12px;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.monitor-fs-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0,0,0,0.25);
    border-color: #f59e0b;
}
.fs-monitor-metrics {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
}
.fs-mon-metric {
    display: flex;
    flex-direction: column;
    gap: 2px;
}
.fs-mon-label {
    font-size: 10px;
    color: var(--text-secondary, #888);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 600;
}
.fs-mon-value {
    font-size: 16px;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
    color: var(--text-primary, #f0f0f0);
}
